diff --git a/src/main/fragment/mos6502-common/pdum1=vwuc1.asm b/src/main/fragment/mos6502-common/pdum1=vwuc1.asm new file mode 100644 index 000000000..7fa49e4f7 --- /dev/null +++ b/src/main/fragment/mos6502-common/pdum1=vwuc1.asm @@ -0,0 +1,4 @@ +lda #<{c1} +sta {m1} +lda #>{c1} +sta {m1}+1 diff --git a/src/main/fragment/mos6502-common/vboaa=pbuz1_derefidx_vbuyy_eq_vbuaa.asm b/src/main/fragment/mos6502-common/vboaa=pbuz1_derefidx_vbuyy_eq_vbuaa.asm new file mode 100644 index 000000000..1ba56d47f --- /dev/null +++ b/src/main/fragment/mos6502-common/vboaa=pbuz1_derefidx_vbuyy_eq_vbuaa.asm @@ -0,0 +1,5 @@ +eor ({z1}),y +beq !+ +lda #1 +!: +eor #1 diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index a967ce5f9..1a719979c 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -293,14 +293,15 @@ public class Compiler { optimizations.add(new PassNTypeIdSimplification(program)); optimizations.add(new PassNSizeOfSimplification(program)); optimizations.add(new PassNStatementIndices(program)); - optimizations.add(() -> { - program.clearVariableReferenceInfos(); - return false; - }); + optimizations.add(() -> { program.clearVariableReferenceInfos(); return false; }); optimizations.add(new Pass2UnaryNotSimplification(program)); optimizations.add(new Pass2AliasElimination(program)); optimizations.add(new Pass2IdenticalPhiElimination(program)); optimizations.add(new Pass2DuplicateRValueIdentification(program)); + optimizations.add(() -> { program.clearStatementIndices(); return false; }); + optimizations.add(() -> { program.clearVariableReferenceInfos(); return false; }); + optimizations.add(() -> { program.clearStatementInfos(); return false; }); + optimizations.add(new PassNStatementIndices(program)); optimizations.add(new Pass2ConditionalJumpSimplification(program)); optimizations.add(new Pass2ConditionalAndOrRewriting(program)); optimizations.add(new PassNAddBooleanCasts(program)); diff --git a/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java b/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java index d0032d239..a1d4e1e4a 100644 --- a/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java +++ b/src/main/java/dk/camelot64/kickc/model/ControlFlowBlock.java @@ -92,7 +92,25 @@ public class ControlFlowBlock implements Serializable { return; } } - throw new RuntimeException("No call statement in block " + getLabel().getFullName()); + throw new InternalError("No call statement in block " + getLabel().getFullName()); + } + + /** + * Adds a new statement after an existing predecessor statement + * @param newStatement The new statement to add + * @param predecessor The existing predecessor statement + */ + public void addStatementAfter(Statement newStatement, Statement predecessor) { + ListIterator listIterator = statements.listIterator(); + while(listIterator.hasNext()) { + Statement statement = listIterator.next(); + if(statement.equals(predecessor)) { + listIterator.previous(); + listIterator.add(newStatement); + return; + } + } + throw new InternalError("Predecessor not found in block " +getLabel().getFullName() + " predecessor: "+ predecessor.toString()); } public LabelRef getDefaultSuccessor() { diff --git a/src/main/java/dk/camelot64/kickc/model/ControlFlowGraph.java b/src/main/java/dk/camelot64/kickc/model/ControlFlowGraph.java index ae14cca1f..f9d642720 100644 --- a/src/main/java/dk/camelot64/kickc/model/ControlFlowGraph.java +++ b/src/main/java/dk/camelot64/kickc/model/ControlFlowGraph.java @@ -1,14 +1,14 @@ package dk.camelot64.kickc.model; import dk.camelot64.kickc.model.statements.Statement; -import dk.camelot64.kickc.model.statements.StatementLValue; +import dk.camelot64.kickc.model.statements.StatementInfos; import dk.camelot64.kickc.model.statements.StatementPhiBlock; -import dk.camelot64.kickc.model.statements.StatementSource; import dk.camelot64.kickc.model.symbols.Label; import dk.camelot64.kickc.model.symbols.Procedure; -import dk.camelot64.kickc.model.symbols.ProgramScope; -import dk.camelot64.kickc.model.symbols.Variable; -import dk.camelot64.kickc.model.values.*; +import dk.camelot64.kickc.model.values.LabelRef; +import dk.camelot64.kickc.model.values.ProcedureRef; +import dk.camelot64.kickc.model.values.ScopeRef; +import dk.camelot64.kickc.model.values.SymbolRef; import dk.camelot64.kickc.passes.Pass2ConstantIdentification; import java.io.Serializable; @@ -200,7 +200,7 @@ public class ControlFlowGraph implements Serializable { public Statement getStatementByIndex(int statementIdx) { for(ControlFlowBlock block : getAllBlocks()) { for(Statement statement : block.getStatements()) { - if(statementIdx == statement.getIndex()) { + if(statement.getIndex()!=null && statementIdx == statement.getIndex()) { return statement; } } @@ -238,4 +238,53 @@ public class ControlFlowGraph implements Serializable { return sizeInfo.toString(); } + /** + * Get all statements executed between two statements (none of these are included in the result) + * @param from The statement to start at + * @param to The statement to end at + * @return All statements executed between the two passed statements + */ + public Collection getStatementsBetween(Statement from, Statement to, StatementInfos statementInfos) { + Collection between = new LinkedHashSet<>(); + final ControlFlowBlock block = statementInfos.getBlock(from); + populateStatementsBetween(from, to, false, between, block); + return between; + } + + /** + * Fill the between collection with all statements executed between two statements (none of these are included in the result) + * @param from The statement to start at + * @param to The statement to end at + * @param between The between collection + * @param block The block to start from + */ + private void populateStatementsBetween(Statement from, Statement to, boolean isBetween, Collection between, ControlFlowBlock block) { + for(Statement statement : block.getStatements()) { + if(between.contains(statement)) + // Stop infinite recursion + return; + if(isBetween) { + if(statement.equals(to)) + // The end was reached! + isBetween = false; + else + // We are between - add the statement + between.add(statement); + } else { + if(statement.equals(from)) + // We are now between! + isBetween = true; + } + } + if(isBetween) { + // Recurse to successor blocks + final Collection successors = block.getSuccessors(); + for(LabelRef successor : successors) { + if(successor.getFullName().equals(ProcedureRef.PROCEXIT_BLOCK_NAME)) + continue; + final ControlFlowBlock successorBlock = getBlock(successor); + populateStatementsBetween(from, to, true, between, successorBlock); + } + } + } } diff --git a/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java b/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java index d830a1ecf..505a3b9bf 100644 --- a/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java +++ b/src/main/java/dk/camelot64/kickc/model/VariableReferenceInfos.java @@ -4,7 +4,10 @@ import dk.camelot64.kickc.model.statements.Statement; import dk.camelot64.kickc.model.values.*; import dk.camelot64.kickc.passes.calcs.PassNCalcVariableReferenceInfos; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.Map; import java.util.stream.Collectors; /** @@ -209,6 +212,9 @@ public class VariableReferenceInfos { */ public Collection getDefinedVars(Statement stmt) { Collection referenceToSymbolVars = statementVarReferences.get(stmt.getIndex()); + // TODO: This may cause problems since it is a sign that the maps are out of date! + if(referenceToSymbolVars==null) + return new ArrayList<>(); return referenceToSymbolVars .stream() .filter(referenceToSymbolVar -> referenceToSymbolVar.getReferenced() instanceof VariableRef) @@ -301,24 +307,36 @@ public class VariableReferenceInfos { } /** - * Get the index of the statement defining a variable + * Get the index of the statement defining a variable. Only returns if there is exactly one defining statement. * * @param variableRef The variable to look for * @return Index of the defining statement */ public Integer getVarDefineStatement(VariableRef variableRef) { - Collection refs = symbolVarReferences.get(variableRef); + final Collection stmts = getVarDefineStatements(variableRef); + if(stmts.size() == 1) + return stmts.iterator().next(); + else + return null; + } + + + /** + * Get all statements defining a variable + * + * @param varRef The variable to look for + * @return Index of all statements defining the variable (ie. assigning a value to it) + */ + public Collection getVarDefineStatements(VariableRef varRef) { LinkedHashSet stmts = new LinkedHashSet<>(); + Collection refs = symbolVarReferences.get(varRef); if(refs != null) { - Optional refDefine = refs.stream() + refs.stream() .filter(referenceToSymbolVar -> referenceToSymbolVar instanceof ReferenceInStatement) .filter(referenceToSymbolVar -> ReferenceToSymbolVar.ReferenceType.DEFINE.equals(referenceToSymbolVar.getReferenceType())) - .findFirst(); - if(refDefine.isPresent()) { - return ((ReferenceInStatement) refDefine.get()).getStatementIdx(); - } + .forEach(referenceToSymbolVar -> stmts.add(((ReferenceInStatement) referenceToSymbolVar).statementIdx)); } - return null; + return stmts; } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalAndOrRewriting.java b/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalAndOrRewriting.java index 1d1006cfd..68226e824 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalAndOrRewriting.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalAndOrRewriting.java @@ -3,6 +3,7 @@ package dk.camelot64.kickc.passes; import dk.camelot64.kickc.model.Comment; import dk.camelot64.kickc.model.ControlFlowBlock; import dk.camelot64.kickc.model.Program; +import dk.camelot64.kickc.model.VariableReferenceInfos; import dk.camelot64.kickc.model.operators.Operators; import dk.camelot64.kickc.model.statements.Statement; import dk.camelot64.kickc.model.statements.StatementAssignment; @@ -10,9 +11,14 @@ import dk.camelot64.kickc.model.statements.StatementConditionalJump; import dk.camelot64.kickc.model.statements.StatementPhiBlock; import dk.camelot64.kickc.model.symbols.Label; import dk.camelot64.kickc.model.symbols.Scope; -import dk.camelot64.kickc.model.values.*; +import dk.camelot64.kickc.model.values.LabelRef; +import dk.camelot64.kickc.model.values.RValue; +import dk.camelot64.kickc.model.values.ScopeRef; +import dk.camelot64.kickc.model.values.VariableRef; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; /** * Compiler Pass rewriting conditional jumps that use && or || operators @@ -25,12 +31,10 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization { @Override public boolean step() { - Map assignments = getAllAssignments(); - Map> usages = getAllUsages(); boolean done = false; boolean modified = false; while(!done) { - VariableRef obsoleteConditionVar = findAndRewriteBooleanCondition(assignments, usages); + VariableRef obsoleteConditionVar = findAndRewriteBooleanCondition(); if(obsoleteConditionVar != null) { Collection obsoleteVars = new ArrayList<>(); obsoleteVars.add(obsoleteConditionVar); @@ -47,31 +51,40 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization { /** * Look through the entire program looking for an if() condition that uses &&, || or !. * When found rewrite it (adding blocks) + * * @return Null if no condition was found to rewrite. The now obsolete variable containing the && / || / ! to be removed. */ - private VariableRef findAndRewriteBooleanCondition(Map assignments, Map> usages) { + private VariableRef findAndRewriteBooleanCondition() { + final VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos(); for(ControlFlowBlock block : getGraph().getAllBlocks()) { for(Statement statement : block.getStatements()) { if(statement instanceof StatementConditionalJump) { StatementConditionalJump conditional = (StatementConditionalJump) statement; - if(conditional.getrValue1()==null && conditional.getOperator()==null) { + if(conditional.getrValue1() == null && conditional.getOperator() == null) { RValue conditionRValue = conditional.getrValue2(); - if(conditionRValue instanceof VariableRef && usages.get(conditionRValue).size() == 1) { - VariableRef conditionVar = (VariableRef) conditionRValue; - StatementAssignment conditionAssignment = assignments.get(conditionVar); - if(conditionAssignment!=null) { - if(Operators.LOGIC_AND.equals(conditionAssignment.getOperator())) { - // Found if() with logical && condition - rewrite to if(c1) if(c2) { xx } - rewriteLogicAnd(block, conditional, conditionAssignment); - return conditionVar; - } else if(Operators.LOGIC_OR.equals(conditionAssignment.getOperator())) { - // Found if() with logical || condition - rewrite to if(c1) goto x else if(c2) goto x else goto end, x:{ xx } end: - rewriteLogicOr(block, conditional, conditionAssignment); - return conditionVar; - } else if(Operators.LOGIC_NOT.equals(conditionAssignment.getOperator())) { - // Found if() with logical ! condition - rewrite to if(!c1) goto x else goto end, x:{ xx } end: - rewriteLogicNot(block, conditional, conditionAssignment); - return conditionVar; + if(conditionRValue instanceof VariableRef) { + final int conditionRValueUsages = variableReferenceInfos.getVarUseStatements((VariableRef) conditionRValue).size(); + if(conditionRValueUsages == 1) { + VariableRef conditionVar = (VariableRef) conditionRValue; + final Integer conditionDefineStatementIdx = variableReferenceInfos.getVarDefineStatement(conditionVar); + if(conditionDefineStatementIdx != null) { + final Statement conditionDefineStatement = getGraph().getStatementByIndex(conditionDefineStatementIdx); + if(conditionDefineStatement instanceof StatementAssignment) { + StatementAssignment conditionAssignment = (StatementAssignment) conditionDefineStatement; + if(Operators.LOGIC_AND.equals(conditionAssignment.getOperator())) { + // Found if() with logical && condition - rewrite to if(c1) if(c2) { xx } + rewriteLogicAnd(block, conditional, conditionAssignment); + return conditionVar; + } else if(Operators.LOGIC_OR.equals(conditionAssignment.getOperator())) { + // Found if() with logical || condition - rewrite to if(c1) goto x else if(c2) goto x else goto end, x:{ xx } end: + rewriteLogicOr(block, conditional, conditionAssignment); + return conditionVar; + } else if(Operators.LOGIC_NOT.equals(conditionAssignment.getOperator())) { + // Found if() with logical ! condition - rewrite to if(!c1) goto x else goto end, x:{ xx } end: + rewriteLogicNot(block, conditional, conditionAssignment); + return conditionVar; + } + } } } } @@ -84,13 +97,14 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization { /** * Rewrite logical && condition if(c1&&c2) { xx } to if(c1) if(c2) { xx } + * * @param block The block containing the current if() * @param conditional The if()-statement * @param conditionAssignment The assignment defining the condition variable. */ private void rewriteLogicAnd(ControlFlowBlock block, StatementConditionalJump conditional, StatementAssignment conditionAssignment) { // Found an if with a logical && condition - rewrite to if(c1) if(c2) { xx } - getLog().append("Rewriting && if()-condition to two if()s "+conditionAssignment.toString(getProgram(), false)); + getLog().append("Rewriting && if()-condition to two if()s " + conditionAssignment.toString(getProgram(), false)); ScopeRef currentScopeRef = block.getScope(); Scope currentScope = getScope().getScope(currentScopeRef); // Add a new block containing the second part of the && condition expression @@ -118,12 +132,13 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization { /** * Rewrite logical || condition if(c1||c2) { xx } to if(c1) goto x else if(c2) goto x else goto end, x:{ xx } end: + * * @param block The block containing the current if() * @param conditional The if()-statement * @param conditionAssignment The assignment defining the condition variable. */ private void rewriteLogicOr(ControlFlowBlock block, StatementConditionalJump conditional, StatementAssignment conditionAssignment) { - getLog().append("Rewriting || if()-condition to two if()s "+conditionAssignment.toString(getProgram(), false)); + getLog().append("Rewriting || if()-condition to two if()s " + conditionAssignment.toString(getProgram(), false)); ScopeRef currentScopeRef = block.getScope(); Scope currentScope = getScope().getScope(currentScopeRef); // Add a new block containing the second part of the && condition expression @@ -174,12 +189,13 @@ public class Pass2ConditionalAndOrRewriting extends Pass2SsaOptimization { /** * Rewrite logical ! condition if(!c1) { xx } to if(c1) goto end else goto x, x:{ xx } end: + * * @param block The block containing the current if() * @param conditional The if()-statement * @param conditionAssignment The assignment defining the condition variable. */ private void rewriteLogicNot(ControlFlowBlock block, StatementConditionalJump conditional, StatementAssignment conditionAssignment) { - getLog().append("Rewriting ! if()-condition to reversed if() "+conditionAssignment.toString(getProgram(), false)); + getLog().append("Rewriting ! if()-condition to reversed if() " + conditionAssignment.toString(getProgram(), false)); // Rewrite the conditional to use only the first part of the && condition expression LabelRef defaultSuccessor = block.getDefaultSuccessor(); LabelRef conditionalSuccessor = block.getConditionalSuccessor(); diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalJumpSimplification.java b/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalJumpSimplification.java index 630634998..5999f62b6 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalJumpSimplification.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2ConditionalJumpSimplification.java @@ -1,17 +1,29 @@ package dk.camelot64.kickc.passes; +import dk.camelot64.kickc.model.Comment; import dk.camelot64.kickc.model.ControlFlowBlock; import dk.camelot64.kickc.model.Program; +import dk.camelot64.kickc.model.VariableReferenceInfos; +import dk.camelot64.kickc.model.iterator.ProgramValue; +import dk.camelot64.kickc.model.iterator.ProgramValueIterator; +import dk.camelot64.kickc.model.operators.Operator; import dk.camelot64.kickc.model.statements.Statement; import dk.camelot64.kickc.model.statements.StatementAssignment; import dk.camelot64.kickc.model.statements.StatementConditionalJump; -import dk.camelot64.kickc.model.values.LValue; +import dk.camelot64.kickc.model.statements.StatementInfos; +import dk.camelot64.kickc.model.symbols.Scope; +import dk.camelot64.kickc.model.symbols.Variable; import dk.camelot64.kickc.model.values.RValue; +import dk.camelot64.kickc.model.values.ScopeRef; +import dk.camelot64.kickc.model.values.SymbolRef; import dk.camelot64.kickc.model.values.VariableRef; +import dk.camelot64.kickc.passes.utils.AliasReplacer; import java.util.ArrayList; +import java.util.Collection; +import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; +import java.util.stream.Collectors; /** * Compiler Pass simplifying conditional jumps that are simple comparisons @@ -24,45 +36,65 @@ public class Pass2ConditionalJumpSimplification extends Pass2SsaOptimization { @Override public boolean step() { - final Map assignments = getAllAssignments(); - final Map> usages = getAllUsages(); - final List simpleConditionVars = getSimpleConditions(assignments, usages); + final List simpleConditionVars = new ArrayList<>(); + List simpleConditions = getSimpleConditionTodos(); + for(SimpleCondition simpleCondition : simpleConditions) { + rewriteSimpleCondition(simpleCondition); + simpleConditionVars.add(simpleCondition.conditionVar); + } removeAssignments(getGraph(), simpleConditionVars); deleteSymbols(getScope(), simpleConditionVars); return (simpleConditionVars.size() > 0); } - private List getSimpleConditions(final Map assignments, final Map> usages) { + /** An identified conditional jump with a one-variable condition that uses a comparison condition (less-than, greater-than, ...) and the assignment for that condition. */ + static class SimpleCondition { + StatementConditionalJump conditionalJump; + StatementAssignment conditionAssignment; + VariableRef conditionVar; - final List simpleConditionVars = new ArrayList<>(); + SimpleCondition(StatementConditionalJump conditionalJump, StatementAssignment conditionAssignment, VariableRef conditionVar) { + this.conditionalJump = conditionalJump; + this.conditionAssignment = conditionAssignment; + this.conditionVar = conditionVar; + } + } + /** + * Find all simple conditions that can be rewritten. + * Simple conditions are conditional jumps with a single variable as condition. The condition must be the result of an assignment with a comparison-operator. + * @return The simple conditions to rewrite + */ + private List getSimpleConditionTodos() { + final VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos(); + List todos = new ArrayList<>(); for(ControlFlowBlock block : getGraph().getAllBlocks()) { for(Statement statement : block.getStatements()) { if(statement instanceof StatementConditionalJump) { StatementConditionalJump conditionalJump = (StatementConditionalJump) statement; if(conditionalJump.getrValue1() == null && conditionalJump.getOperator() == null) { RValue conditionRValue = conditionalJump.getrValue2(); - if(conditionRValue instanceof VariableRef && usages.get(conditionRValue).size() == 1) { + if(conditionRValue instanceof VariableRef) { VariableRef conditionVar = (VariableRef) conditionRValue; - StatementAssignment conditionAssignment = assignments.get(conditionVar); - if(conditionAssignment != null && conditionAssignment.getOperator() != null) { - switch(conditionAssignment.getOperator().getOperator()) { - case "==": - case "<>": - case "!=": - case "<": - case ">": - case "<=": - case "=<": - case ">=": - case "=>": - conditionalJump.setrValue1(conditionAssignment.getrValue1()); - conditionalJump.setOperator(conditionAssignment.getOperator()); - conditionalJump.setrValue2(conditionAssignment.getrValue2()); - simpleConditionVars.add(conditionVar); - getLog().append("Simple Condition " + conditionVar.toString(getProgram()) + " " + conditionalJump.toString(getProgram(), false)); - break; - default: + final Collection conditionRvalueUsages = variableReferenceInfos.getVarUseStatements(conditionVar); + final Integer conditionDefineStmtIdx = variableReferenceInfos.getVarDefineStatement(conditionVar); + if(conditionRvalueUsages.size() == 1 && conditionDefineStmtIdx != null) { + final Statement conditionDefineStmt = getGraph().getStatementByIndex(conditionDefineStmtIdx); + if(conditionDefineStmt instanceof StatementAssignment && ((StatementAssignment) conditionDefineStmt).getOperator() != null) { + StatementAssignment conditionAssignment = (StatementAssignment) conditionDefineStmt; + switch(conditionAssignment.getOperator().getOperator()) { + case "==": + case "<>": + case "!=": + case "<": + case ">": + case "<=": + case "=<": + case ">=": + case "=>": + todos.add(new SimpleCondition(conditionalJump, conditionAssignment, conditionVar)); + default: + } } } } @@ -70,7 +102,78 @@ public class Pass2ConditionalJumpSimplification extends Pass2SsaOptimization { } } } - return simpleConditionVars; + return todos; + } + + /** + * Rewrite a simple condition - by inlining the comparison into the conditional jump. + * If the condition uses any load/store-variables that are modified between the condition assignment and the jump the values of these is preserved in a new intermediate variable. + * + * @param simpleCondition The simple condition to rewrite + */ + private void rewriteSimpleCondition(SimpleCondition simpleCondition) { + final VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos(); + // For each condition/assignment pair - do a rewrite to inline the condition if possible + final Operator operator = simpleCondition.conditionAssignment.getOperator(); + RValue rValue1 = simpleCondition.conditionAssignment.getrValue1(); + RValue rValue2 = simpleCondition.conditionAssignment.getrValue2(); + final Collection referencedLoadStoreVariables = getReferencedLoadStoreVariables(rValue1); + referencedLoadStoreVariables.addAll(getReferencedLoadStoreVariables(rValue2)); + if(referencedLoadStoreVariables.size() > 0) { + // Found referenced load/store variables + // Examine all statements between the conditionAssignment and conditionalJump for modifications + final StatementInfos statementInfos = getProgram().getStatementInfos(); + Collection statementsBetween = getGraph().getStatementsBetween(simpleCondition.conditionAssignment, simpleCondition.conditionalJump, statementInfos); + for(Statement statementBetween : statementsBetween) { + for(Variable referencedLoadStoreVariable : referencedLoadStoreVariables) { + if(variableReferenceInfos.getDefinedVars(statementBetween).contains(referencedLoadStoreVariable.getVariableRef())) { + // A referenced load/store-variable is modified in a statement between the assignment and the condition! + getLog().append("Condition not simple " + simpleCondition.conditionVar.toString(getProgram()) + " " + simpleCondition.conditionalJump.toString(getProgram(), false)); + // Create an intermediate variable copy of the load/store-variable at the position of the condition-variable to preserve the value + final ControlFlowBlock conditionDefineBlock = statementInfos.getBlock(simpleCondition.conditionAssignment); + final ScopeRef conditionDefineScopeRef = conditionDefineBlock.getScope(); + final Scope conditionDefineScope = getScope().getScope(conditionDefineScopeRef); + final Variable intermediateLoadStoreVar = conditionDefineScope.addVariableIntermediate(); + intermediateLoadStoreVar.setType(referencedLoadStoreVariable.getType()); + final StatementAssignment intermediateLoadStoreAssignment = new StatementAssignment(intermediateLoadStoreVar.getVariableRef(), referencedLoadStoreVariable.getRef(), true, simpleCondition.conditionAssignment.getSource(), Comment.NO_COMMENTS); + conditionDefineBlock.addStatementAfter(intermediateLoadStoreAssignment, simpleCondition.conditionAssignment); + // Replace all references to the load/store variable in the expressions with the new intermediate + final LinkedHashMap aliases = new LinkedHashMap<>(); + aliases.put(referencedLoadStoreVariable.getRef(), intermediateLoadStoreVar.getRef()); + { + final ProgramValue.GenericValue programValue1 = new ProgramValue.GenericValue(rValue1); + ProgramValueIterator.execute(programValue1, new AliasReplacer(aliases), null, null, null); + rValue1 = (RValue) programValue1.get(); + } + { + final ProgramValue.GenericValue programValue2 = new ProgramValue.GenericValue(rValue2); + ProgramValueIterator.execute(programValue2, new AliasReplacer(aliases), null, null, null); + rValue2 = (RValue) programValue2.get(); + } + getLog().append("Introduced intermediate condition variable " + intermediateLoadStoreAssignment.toString(getProgram(), false)); + } + } + } + } + // Perform the condition rewrite + simpleCondition.conditionalJump.setrValue1(rValue1); + simpleCondition.conditionalJump.setOperator(operator); + simpleCondition.conditionalJump.setrValue2(rValue2); + getLog().append("Simple Condition " + simpleCondition.conditionVar.toString(getProgram()) + " " + simpleCondition.conditionalJump.toString(getProgram(), false)); + } + + /** + * Get all referenced load/store variables in an RValue + * + * @param rValue The RValue + * @return All referenced load/store variables + */ + private Collection getReferencedLoadStoreVariables(RValue rValue) { + return VariableReferenceInfos.getReferencedVars(rValue) + .stream() + .map(variableRef -> getScope().getVariable(variableRef)) + .filter(Variable::isKindLoadStore) + .collect(Collectors.toList()); } } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java b/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java index c244c4d15..849d6119b 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2SsaOptimization.java @@ -127,62 +127,5 @@ public abstract class Pass2SsaOptimization extends Pass1Base implements PassStep } } - public Map getAllAssignments() { - final HashMap assignments = new LinkedHashMap<>(); - ControlFlowGraphBaseVisitor visitor = new ControlFlowGraphBaseVisitor() { - @Override - public Void visitAssignment(StatementAssignment assignment) { - assignments.put(assignment.getlValue(), assignment); - return null; - } - }; - visitor.visitGraph(getGraph()); - return assignments; - } - - public Map> getAllUsages() { - final HashMap> usages = new LinkedHashMap<>(); - ControlFlowGraphBaseVisitor visitor = new ControlFlowGraphBaseVisitor() { - @Override - public Void visitAssignment(StatementAssignment assignment) { - addUsage(assignment.getrValue1(), assignment); - addUsage(assignment.getrValue2(), assignment); - return null; - } - - @Override - public Void visitConditionalJump(StatementConditionalJump conditionalJump) { - addUsage(conditionalJump.getrValue1(), conditionalJump); - addUsage(conditionalJump.getrValue2(), conditionalJump); - return null; - } - - @Override - public Void visitPhiBlock(StatementPhiBlock phi) { - for(StatementPhiBlock.PhiVariable phiVariable : phi.getPhiVariables()) { - for(StatementPhiBlock.PhiRValue phiRValue : phiVariable.getValues()) { - addUsage(phiRValue.getrValue(), phi); - } - } - return null; - } - - private void addUsage(RValue rValue, Statement statement) { - if(rValue == null) { - return; - } - List use = usages.get(rValue); - if(use == null) { - use = new ArrayList<>(); - usages.put(rValue, use); - } - use.add(statement); - } - - }; - visitor.visitGraph(getGraph()); - - return usages; - } } diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java b/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java index 9134f0a23..4acee5d09 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass2UnaryNotSimplification.java @@ -1,14 +1,15 @@ package dk.camelot64.kickc.passes; -import dk.camelot64.kickc.model.*; +import dk.camelot64.kickc.model.ControlFlowBlock; +import dk.camelot64.kickc.model.Program; +import dk.camelot64.kickc.model.VariableReferenceInfos; import dk.camelot64.kickc.model.operators.Operators; -import dk.camelot64.kickc.model.values.LValue; -import dk.camelot64.kickc.model.values.VariableRef; +import dk.camelot64.kickc.model.statements.Statement; import dk.camelot64.kickc.model.statements.StatementAssignment; +import dk.camelot64.kickc.model.values.VariableRef; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * Compiler Pass simplifying unary not variables if they reference a comparison that can be inverted @@ -20,71 +21,80 @@ public class Pass2UnaryNotSimplification extends Pass2SsaOptimization { } /** - * Eliminate unary nots if they are the only usage of a reversable comparison + * Eliminate unary nots if they are the only usage of a reversible comparison */ @Override public boolean step() { - final VariableReferenceInfos usages = getProgram().getVariableReferenceInfos(); - final Map assignments = getAllAssignments(); - final List unusedComparisons = optimizeUnaryNots(assignments, usages); + final List unusedComparisons = optimizeUnaryNots(); removeAssignments(getGraph(), unusedComparisons); deleteSymbols(getScope(), unusedComparisons); return (unusedComparisons.size() > 0); } /** - * Examine all unary nots. If they are the only usage of a reversable unary not replace the unary not with the reversed comparison - and eliminate the riginal variable. + * Examine all unary nots. If they are the only usage of a reversible unary not replace the unary not with the reversed comparison - and eliminate the original variable. * * @param assignments Assignments to examine * @param usages All variable usages - * @return Unused comparisons (because they have been replaced with reversed comparisions) + * @return Unused comparisons (because they have been replaced with reversed comparisons) */ - private List optimizeUnaryNots(final Map assignments, VariableReferenceInfos usages) { - + private List optimizeUnaryNots() { + final VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos(); final List unused = new ArrayList<>(); - for(StatementAssignment assignment : assignments.values()) { - if(assignment.getrValue1() == null - && assignment.getOperator() != null - && ("!".equals(assignment.getOperator().getOperator()) || "not".equals(assignment.getOperator().getOperator())) - && assignment.getrValue2() instanceof VariableRef + for(ControlFlowBlock block : getGraph().getAllBlocks()) { + for(Statement statement : block.getStatements()) { + if(statement instanceof StatementAssignment) { + StatementAssignment assignment = (StatementAssignment) statement; + if(assignment.getrValue1() == null + && assignment.getOperator() != null + && ("!".equals(assignment.getOperator().getOperator()) || "not".equals(assignment.getOperator().getOperator())) + && assignment.getrValue2() instanceof VariableRef ) { - VariableRef tempVar = (VariableRef) assignment.getrValue2(); - StatementAssignment tempAssignment = assignments.get(tempVar); - int tempVarUsages = usages.getVarUseStatements(tempVar).size(); - if(tempVarUsages == 1 && tempAssignment!=null && tempAssignment.getOperator() != null) { - switch(tempAssignment.getOperator().getOperator()) { - case "<": - createInverse(">=", assignment, tempAssignment); - unused.add(tempVar); - break; - case ">": - createInverse("<=", assignment, tempAssignment); - unused.add(tempVar); - break; - case "<=": - case "=<": - createInverse(">", assignment, tempAssignment); - unused.add(tempVar); - break; - case ">=": - case "=>": - createInverse("<", assignment, tempAssignment); - unused.add(tempVar); - break; - case "==": - createInverse("!=", assignment, tempAssignment); - unused.add(tempVar); - break; - case "!=": - case "<>": - createInverse("==", assignment, tempAssignment); - unused.add(tempVar); - break; - case "!": - case "not": - createInverse(null, assignment, tempAssignment); - unused.add(tempVar); - break; + VariableRef tempVar = (VariableRef) assignment.getrValue2(); + final Integer tempVarDefineStmtIdx = variableReferenceInfos.getVarDefineStatement(tempVar); + if(tempVarDefineStmtIdx != null) { + final Statement tempVarDefineStmt = getGraph().getStatementByIndex(tempVarDefineStmtIdx); + if(tempVarDefineStmt instanceof StatementAssignment) { + StatementAssignment tempAssignment = (StatementAssignment) tempVarDefineStmt; + int tempVarUsages = variableReferenceInfos.getVarUseStatements(tempVar).size(); + if(tempVarUsages == 1 && tempAssignment.getOperator() != null) { + switch(tempAssignment.getOperator().getOperator()) { + case "<": + createInverse(">=", assignment, tempAssignment); + unused.add(tempVar); + break; + case ">": + createInverse("<=", assignment, tempAssignment); + unused.add(tempVar); + break; + case "<=": + case "=<": + createInverse(">", assignment, tempAssignment); + unused.add(tempVar); + break; + case ">=": + case "=>": + createInverse("<", assignment, tempAssignment); + unused.add(tempVar); + break; + case "==": + createInverse("!=", assignment, tempAssignment); + unused.add(tempVar); + break; + case "!=": + case "<>": + createInverse("==", assignment, tempAssignment); + unused.add(tempVar); + break; + case "!": + case "not": + createInverse(null, assignment, tempAssignment); + unused.add(tempVar); + break; + } + } + } + } } } } diff --git a/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java b/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java index 816929ad9..ab85cd545 100644 --- a/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java +++ b/src/main/java/dk/camelot64/kickc/passes/utils/Unroller.java @@ -475,7 +475,7 @@ public class Unroller { RValue rValueNew = valueToNew(origPhiRValue.getrValue(), varsOriginalToCopied); newPhiVariable.setrValue(blocksOriginalToCopied.get(predecessor), rValueNew); // - Then an entry from the existing predecessor block - RValue rValue = valueToOrig(origPhiRValue.getrValue()); + RValue rValue = copyValue(origPhiRValue.getrValue()); newPhiVariable.setrValue(predecessor, rValue); // Finally remove the phi entry into the original block (since both will hit the new block) origPhiRValuesIt.remove(); @@ -530,7 +530,7 @@ public class Unroller { */ private static RValue valueToNew(RValue rValue, Map definedToNewVar) { if(rValue == null) return null; - RValue rValueCopy = valueToOrig(rValue); + RValue rValueCopy = copyValue(rValue); ProgramValue.GenericValue genericValue = new ProgramValue.GenericValue(rValueCopy); ProgramValueIterator.execute(genericValue, (programValue, currentStmt, stmtIt, currentBlock) -> { Value rVal = programValue.get(); @@ -550,7 +550,7 @@ public class Unroller { * @param rValue The value to copy * @return An exact copy of the value */ - private static RValue valueToOrig(RValue rValue) { + public static RValue copyValue(RValue rValue) { if(rValue == null) return null; ProgramValue.GenericValue genericValue = new ProgramValue.GenericValue(rValue); ProgramValueIterator.execute(genericValue, (programValue, currentStmt, stmtIt, currentBlock) -> { diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index e348acde8..207cdfd04 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -43,6 +43,11 @@ public class TestPrograms { compileAndCompare("ma_coalesce_problem"); } + @Test + public void testVarModelMaMem5() throws IOException, URISyntaxException { + compileAndCompare("varmodel-ma_mem-5"); + } + @Test public void testVarModelMaMem4() throws IOException, URISyntaxException { compileAndCompare("varmodel-ma_mem-4"); @@ -3751,7 +3756,7 @@ public class TestPrograms { boolean success = true; ReferenceHelper helper = new ReferenceHelperFolder(refPath); - success &= helper.testOutput(fileName, ".asm", program.getAsm().toString(new AsmProgram.AsmPrintState(false, false, false, false), program)); + success &= helper.testOutput(fileName, ".asm", program.getAsm().toString(new AsmProgram.AsmPrintState(false, true, false, false), program)); success &= helper.testOutput(fileName, ".sym", program.getScope().toString(program, false)); success &= helper.testOutput(fileName, ".cfg", program.getGraph().toString(program)); success &= helper.testOutput(fileName, ".log", program.getLog().toString()); diff --git a/src/test/kc/complex/tetris/tetris-data.kc b/src/test/kc/complex/tetris/tetris-data.kc index 35313fbb1..0d2d64e9c 100644 --- a/src/test/kc/complex/tetris/tetris-data.kc +++ b/src/test/kc/complex/tetris/tetris-data.kc @@ -9,12 +9,8 @@ const char* PLAYFIELD_SCREEN_2 = 0x2c00; const char* PLAYFIELD_SPRITE_PTRS_1 = (PLAYFIELD_SCREEN_1+SPRITE_PTRS); // Screen Sprite pointers on screen 2 const char* PLAYFIELD_SPRITE_PTRS_2 = (PLAYFIELD_SCREEN_2+SPRITE_PTRS); -// Address of the original playscreen chars -const char* PLAYFIELD_SCREEN_ORIGINAL = 0x3000; -// Address of the original playscreen colors -const char* PLAYFIELD_COLORS_ORIGINAL = 0x1c00; // Address of the sprites covering the playfield -const char* PLAYFIELD_SPRITES = 0x2000; +const char* PLAYFIELD_SPRITES = 0x3000; // Address of the charset const char* PLAYFIELD_CHARSET = 0x2800; diff --git a/src/test/kc/complex/tetris/tetris-render.kc b/src/test/kc/complex/tetris/tetris-render.kc index 651a29395..f6873137d 100644 --- a/src/test/kc/complex/tetris/tetris-render.kc +++ b/src/test/kc/complex/tetris/tetris-render.kc @@ -10,8 +10,9 @@ kickasm(pc PLAYFIELD_CHARSET, resource "playfield-screen.imap") {{ .import binary "playfield-screen.imap" }} +// Address of the original playscreen chars const char PLAYFIELD_SCREEN_ORIGINAL_WIDTH=32; -kickasm(pc PLAYFIELD_SCREEN_ORIGINAL, resource "playfield-screen.iscr", resource "playfield-extended.col" ) {{ +const char[] PLAYFIELD_SCREEN_ORIGINAL = kickasm(resource "playfield-screen.iscr", resource "playfield-extended.col" ) {{ // Load chars for the screen .var screen = LoadBinary("playfield-screen.iscr") // Load extended colors for the screen @@ -20,12 +21,12 @@ kickasm(pc PLAYFIELD_SCREEN_ORIGINAL, resource "playfield-screen.iscr", resource // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) // <<6 to move extended colors to the upper 2 bits .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) -}} +}}; // Original Color Data -kickasm(pc PLAYFIELD_COLORS_ORIGINAL, resource "playfield-screen.col") {{ +const char[] PLAYFIELD_COLORS_ORIGINAL = kickasm(resource "playfield-screen.col") {{ .import binary "playfield-screen.col" -}} +}}; // The color #1 to use for the pieces for each level char[] PIECES_COLORS_1 = { @@ -106,16 +107,16 @@ void render_score() { char* score_bytes = (byte*)(&score_bcd); unsigned int score_offset = 40*0x05 + 0x1c; - render_bcd( screen, score_offset, score_bytes[2], 0); - render_bcd( screen, score_offset+2, score_bytes[1], 0); - render_bcd( screen, score_offset+4, score_bytes[0], 0); + render_bcd( screen, score_offset, score_bytes[2], 0); + render_bcd( screen, score_offset+2, score_bytes[1], 0); + render_bcd( screen, score_offset+4, score_bytes[0], 0); unsigned int lines_offset = 40*0x01 + 0x16; - render_bcd( screen, lines_offset, >lines_bcd, 1); - render_bcd( screen, lines_offset+1, lines_bcd, 1); + render_bcd( screen, lines_offset+1, ch sta SCREEN+1,y + // SCREEN[i++] = ch; inc.z i + // SCREEN[i++] = ch lda.z i asl tay @@ -30,6 +36,7 @@ main: { sta SCREEN,y lda #>ch sta SCREEN+1,y + // SCREEN[i++] = ch; inc.z i jmp __b1 } diff --git a/src/test/ref/address-5.asm b/src/test/ref/address-5.asm index 4d7e0359b..249429d0c 100644 --- a/src/test/ref/address-5.asm +++ b/src/test/ref/address-5.asm @@ -6,28 +6,35 @@ .label SCREEN = $400 .label idx = 3 __b1: + // idx lda #0 sta.z idx jsr main rts main: { + // print('c') lda #'c' sta.z print.ch jsr print + // print('m') lda #'m' sta.z print.ch jsr print + // print('l') lda #'l' sta.z print.ch jsr print + // } rts } // print(byte zp(2) ch) print: { .label ch = 2 + // asm ldx idx lda ch sta SCREEN,x inc idx + // } rts } diff --git a/src/test/ref/address-6.asm b/src/test/ref/address-6.asm index 213bcf965..4bb5911ea 100644 --- a/src/test/ref/address-6.asm +++ b/src/test/ref/address-6.asm @@ -6,28 +6,35 @@ .label SCREEN = $400 .label idx = $3000 __b1: + // idx lda #0 sta idx jsr main rts main: { + // print('c') lda #'c' sta print.ch jsr print + // print('m') lda #'m' sta print.ch jsr print + // print('l') lda #'l' sta print.ch jsr print + // } rts } // print(byte mem($3001) ch) print: { .label ch = $3001 + // asm ldx idx lda ch sta SCREEN,x inc idx + // } rts } diff --git a/src/test/ref/address-of-0.asm b/src/test/ref/address-of-0.asm index ac5b98c60..a180c1aad 100644 --- a/src/test/ref/address-of-0.asm +++ b/src/test/ref/address-of-0.asm @@ -6,17 +6,22 @@ main: { .label SCREEN = $400 .label bp = b .label b = 2 + // for( byte b: 0..10) lda #0 sta.z b __b1: + // c = *bp +1 lda.z bp clc adc #1 + // SCREEN[b] = c ldy.z b sta SCREEN,y + // for( byte b: 0..10) inc.z b lda #$b cmp.z b bne __b1 + // } rts } diff --git a/src/test/ref/address-of-0.log b/src/test/ref/address-of-0.log index 6bcafd4a1..c50f37303 100644 --- a/src/test/ref/address-of-0.log +++ b/src/test/ref/address-of-0.log @@ -56,10 +56,10 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) main::$0 ← *((const byte*) main::bp) + (byte) 1 Alias (byte) main::c#0 = (byte~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [6] if((byte) main::b!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [5] if((byte) main::b!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Resolved ranged next value [4] main::b ← ++ main::b to ++ -Resolved ranged comparison value [6] if(main::b!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [3] main::b ← ++ main::b to ++ +Resolved ranged comparison value [5] if(main::b!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::b!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/address-of-1.asm b/src/test/ref/address-of-1.asm index 0d1d21962..52ade1658 100644 --- a/src/test/ref/address-of-1.asm +++ b/src/test/ref/address-of-1.asm @@ -7,41 +7,53 @@ main: { .label b1 = 4 .label b2 = 5 .label b3 = 6 + // b1 = 0 lda #0 sta.z b1 + // b2 = 0 sta.z b2 + // b3 = 0 sta.z b3 + // setByte(&b1, 'c') lda #b1 sta.z setByte.ptr+1 ldx #'c' jsr setByte + // setByte(&b2, 'm') lda #b2 sta.z setByte.ptr+1 ldx #'m' jsr setByte + // setByte(&b3, 'l') lda #b3 sta.z setByte.ptr+1 ldx #'l' jsr setByte + // SCREEN[0] = b1 lda.z b1 sta SCREEN + // SCREEN[1] = b2 lda.z b2 sta SCREEN+1 + // SCREEN[2] = b3 lda.z b3 sta SCREEN+2 + // } rts } // setByte(byte* zp(2) ptr, byte register(X) b) setByte: { .label ptr = 2 + // *ptr = b txa ldy #0 sta (ptr),y + // } rts } diff --git a/src/test/ref/address-of-2.asm b/src/test/ref/address-of-2.asm index d556bd697..07145eb39 100644 --- a/src/test/ref/address-of-2.asm +++ b/src/test/ref/address-of-2.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" .label val = 2 __bbegin: + // val = 0 lda #0 sta.z val jsr main @@ -13,50 +14,72 @@ main: { .label SCREEN2 = SCREEN1+$28 // Use address-of - hereafter all versions of val must be in the same memory .label ptr = val + // SCREEN1[idx] = val lda.z val sta SCREEN1 + // SCREEN2[idx++] = '.' lda #'.' sta SCREEN2 + // val = 1 // Here we have not yet used address-of - so val can be versioned freely lda #1 sta.z val + // SCREEN1[idx] = val sta SCREEN1+1 + // SCREEN2[idx++] = '.' lda #'.' sta SCREEN2+1 + // val = 2 // Set value directly lda #2 sta.z val + // SCREEN1[idx] = val sta SCREEN1+2 + // SCREEN2[idx++] = *ptr lda.z ptr sta SCREEN2+2 + // *ptr = 3 // Set value through pointer lda #3 sta.z ptr + // SCREEN1[idx] = val lda.z val sta SCREEN1+3 + // SCREEN2[idx++] = *ptr lda.z ptr sta SCREEN2+3 + // setv(4) jsr setv + // SCREEN1[idx] = val lda.z val sta SCREEN1+4 + // SCREEN2[idx++] = *ptr lda.z ptr sta SCREEN2+4 + // setp(ptr, 5) jsr setp + // SCREEN1[idx] = val lda.z val sta SCREEN1+5 + // SCREEN2[idx++] = *ptr lda.z ptr sta SCREEN2+5 + // } rts } setp: { .const v = 5 + // *p = v lda #v sta.z main.ptr + // } rts } setv: { .const v = 4 + // val = v lda #v sta.z val + // } rts } diff --git a/src/test/ref/address-of-3.asm b/src/test/ref/address-of-3.asm index 750981abd..4c8aac328 100644 --- a/src/test/ref/address-of-3.asm +++ b/src/test/ref/address-of-3.asm @@ -7,6 +7,7 @@ .label idx = 3 main: { .label i = 2 + // print(VALS) lda #VALS @@ -14,6 +15,7 @@ main: { lda #0 sta.z idx jsr print + // print(&VALS[1]) lda #VALS+1*SIZEOF_SIGNED_WORD @@ -22,8 +24,10 @@ main: { lda #2 sta.z i __b1: + // &VALS[i] lda.z i asl + // print(&VALS[i]) clc adc #> 1 lsr + // (unsigned int)((arr16[index & 0x7f] & 0xff) >> 1) sta.z return lda #0 sta.z return+1 + // } rts } arr16: .fill 2*$80, 0 diff --git a/src/test/ref/array-16bit-lookup.log b/src/test/ref/array-16bit-lookup.log index 917e56fe2..8ba3f1bb1 100644 --- a/src/test/ref/array-16bit-lookup.log +++ b/src/test/ref/array-16bit-lookup.log @@ -121,12 +121,12 @@ Alias (word) getValue::return#1 = (word~) getValue::$3 (word) getValue::return#4 Successful SSA optimization Pass2AliasElimination Identical Phi Values (word) getValue::index#1 (word) getValue::index#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [11] if((byte) main::idx#1!=rangelast(0,$80)) goto main::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::idx#1!=rangelast(0,$80)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::idx#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::idx#1 ← ++ main::idx#2 to ++ -Resolved ranged comparison value [11] if(main::idx#1!=rangelast(0,$80)) goto main::@1 to (number) $81 +Resolved ranged next value [8] main::idx#1 ← ++ main::idx#2 to ++ +Resolved ranged comparison value [10] if(main::idx#1!=rangelast(0,$80)) goto main::@1 to (number) $81 Adding number conversion cast (unumber) $81 in if((byte) main::idx#1!=(number) $81) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $81 diff --git a/src/test/ref/array-length-symbolic-min.asm b/src/test/ref/array-length-symbolic-min.asm index fddec3840..02579646d 100644 --- a/src/test/ref/array-length-symbolic-min.asm +++ b/src/test/ref/array-length-symbolic-min.asm @@ -7,11 +7,14 @@ main: { ldx #0 __b1: + // cur_item[sub] = sub txa sta items,x + // for( byte sub: 0..SZ) inx cpx #SZ+1 bne __b1 + // } rts } items: .fill SZ, 0 diff --git a/src/test/ref/array-length-symbolic.asm b/src/test/ref/array-length-symbolic.asm index 003912e65..549670fb8 100644 --- a/src/test/ref/array-length-symbolic.asm +++ b/src/test/ref/array-length-symbolic.asm @@ -15,17 +15,22 @@ main: { __b1: ldy #0 __b2: + // item*$10 txa asl asl asl asl + // item*$10|sub sty.z $ff ora.z $ff + // cur_item[sub] = item*$10|sub sta (cur_item),y + // for( byte sub: 0..ITEM_SIZE-1) iny cpy #ITEM_SIZE-1+1 bne __b2 + // cur_item += ITEM_SIZE lda #ITEM_SIZE clc adc.z cur_item @@ -33,9 +38,11 @@ main: { bcc !+ inc.z cur_item+1 !: + // for( byte item: 0..ITEM_COUNT-1) inx cpx #ITEM_COUNT-1+1 bne __b1 + // } rts } items: .byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/src/test/ref/array-length-symbolic.log b/src/test/ref/array-length-symbolic.log index 8a5b39bce..026c9501e 100644 --- a/src/test/ref/array-length-symbolic.log +++ b/src/test/ref/array-length-symbolic.log @@ -100,7 +100,7 @@ Identical Phi Values (byte) main::item#2 (byte) main::item#4 Identical Phi Values (byte*) main::cur_item#2 (byte*) main::cur_item#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$2 [10] if((byte) main::sub#1!=rangelast(0,ITEM_SIZE-1)) goto main::@2 -Simple Condition (bool~) main::$3 [15] if((byte) main::item#1!=rangelast(0,ITEM_COUNT-1)) goto main::@1 +Simple Condition (bool~) main::$3 [14] if((byte) main::item#1!=rangelast(0,ITEM_COUNT-1)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::cur_item#0 = items Constant (const byte) main::item#0 = 0 @@ -108,8 +108,8 @@ Constant (const byte) main::sub#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [8] main::sub#1 ← ++ main::sub#2 to ++ Resolved ranged comparison value [10] if(main::sub#1!=rangelast(0,ITEM_SIZE-1)) goto main::@2 to (const byte) ITEM_SIZE-(byte) 1+(number) 1 -Resolved ranged next value [13] main::item#1 ← ++ main::item#4 to ++ -Resolved ranged comparison value [15] if(main::item#1!=rangelast(0,ITEM_COUNT-1)) goto main::@1 to (const byte) ITEM_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [12] main::item#1 ← ++ main::item#4 to ++ +Resolved ranged comparison value [14] if(main::item#1!=rangelast(0,ITEM_COUNT-1)) goto main::@1 to (const byte) ITEM_COUNT-(byte) 1+(number) 1 Adding number conversion cast (unumber) ITEM_SIZE-1+1 in if((byte) main::sub#1!=(const byte) ITEM_SIZE-(byte) 1+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::sub#1!=(unumber)(const byte) ITEM_SIZE-(byte) 1+(number) 1) goto main::@2 Adding number conversion cast (unumber) ITEM_COUNT-1+1 in if((byte) main::item#1!=(const byte) ITEM_COUNT-(byte) 1+(number) 1) goto main::@1 diff --git a/src/test/ref/arrays-init-kasm-0.asm b/src/test/ref/arrays-init-kasm-0.asm index d09586294..5880287f0 100644 --- a/src/test/ref/arrays-init-kasm-0.asm +++ b/src/test/ref/arrays-init-kasm-0.asm @@ -4,8 +4,10 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // SCREEN[0] = SINTAB[0] lda SINTAB sta SCREEN + // } rts } // Sinus table diff --git a/src/test/ref/arrays-init-short.asm b/src/test/ref/arrays-init-short.asm index e7ff03edb..185b0059c 100644 --- a/src/test/ref/arrays-init-short.asm +++ b/src/test/ref/arrays-init-short.asm @@ -6,23 +6,30 @@ main: { ldx #0 __b1: + // for(char i=0;msg1[i];i++) lda msg1,x cmp #0 bne __b2 ldx #0 __b3: + // for(char i=0;msg2[i];i++) lda msg2,x cmp #0 bne __b4 + // } rts __b4: + // (SCREEN+40)[i] = msg2[i] lda msg2,x sta SCREEN+$28,x + // for(char i=0;msg2[i];i++) inx jmp __b3 __b2: + // SCREEN[i] = msg1[i] lda msg1,x sta SCREEN,x + // for(char i=0;msg1[i];i++) inx jmp __b1 } diff --git a/src/test/ref/arrays-init-short.log b/src/test/ref/arrays-init-short.log index 28fa3a459..62c2a3caf 100644 --- a/src/test/ref/arrays-init-short.log +++ b/src/test/ref/arrays-init-short.log @@ -94,7 +94,7 @@ Alias (byte) main::i#2 = (byte) main::i#3 Alias (byte) main::i1#2 = (byte) main::i1#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [3] if((byte) 0!=*((const byte*) msg1 + (byte) main::i#2)) goto main::@2 -Simple Condition (bool~) main::$1 [10] if((byte) 0!=*((const byte*) msg2 + (byte) main::i1#2)) goto main::@8 +Simple Condition (bool~) main::$1 [9] if((byte) 0!=*((const byte*) msg2 + (byte) main::i1#2)) goto main::@8 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::i1#0 = 0 diff --git a/src/test/ref/arrays-init.asm b/src/test/ref/arrays-init.asm index d0726e755..c3cce1b43 100644 --- a/src/test/ref/arrays-init.asm +++ b/src/test/ref/arrays-init.asm @@ -3,13 +3,18 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // b[0] = 'c' lda #'c' sta b + // *SCREEN = b[0] sta SCREEN + // *(SCREEN+1) = c[1] lda c+1 sta SCREEN+1 + // *(SCREEN+2) = d[2] lda d+2 sta SCREEN+2 + // } rts } b: .fill 3, 0 diff --git a/src/test/ref/asm-culling-jmp.asm b/src/test/ref/asm-culling-jmp.asm index 0ab70306c..b4ba3b098 100644 --- a/src/test/ref/asm-culling-jmp.asm +++ b/src/test/ref/asm-culling-jmp.asm @@ -4,11 +4,14 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // asm jmp qwe .byte 0, 25, 51, 76, 102, 128, 153, 179, 204, 230 qwe: lda #$32 + // *((char*)0x0400) = 'c' lda #'c' sta $400 + // } rts } diff --git a/src/test/ref/asm-mnemonic-names.asm b/src/test/ref/asm-mnemonic-names.asm index f918d1fb6..7befdb645 100644 --- a/src/test/ref/asm-mnemonic-names.asm +++ b/src/test/ref/asm-mnemonic-names.asm @@ -6,17 +6,23 @@ .label lda = $400 main: { .label jmp = 1 + // *lda = jmp lda #jmp sta lda + // bne(jmp) jsr bne + // asm // Inline asm using the mnemonics lda a rts a: + // } rts } bne: { + // lda[1] = jsr lda #main.jmp sta lda+1 + // } rts } diff --git a/src/test/ref/asm-uses-0.asm b/src/test/ref/asm-uses-0.asm index c8b3ad70e..ac3c33f6d 100644 --- a/src/test/ref/asm-uses-0.asm +++ b/src/test/ref/asm-uses-0.asm @@ -4,12 +4,16 @@ .pc = $80d "Program" .label BGCOL = $d020 main: { + // asm jsr init + // } rts } // Function only used inside the inline asm init: { + // *BGCOL = 0 lda #0 sta BGCOL + // } rts } diff --git a/src/test/ref/assignment-chained.asm b/src/test/ref/assignment-chained.asm index 9025f9bfa..a41d21e13 100644 --- a/src/test/ref/assignment-chained.asm +++ b/src/test/ref/assignment-chained.asm @@ -4,16 +4,24 @@ .pc = $80d "Program" main: { .label screen = $400 + // screen[0] = a = 'c' lda #'c' sta screen + // screen[40] = a sta screen+$28 + // screen[1] = 'm' lda #'m' sta screen+1 + // a = screen[1] = 'm' + // screen[41] = a sta screen+$29 + // screen[2] = 1 + (a = 'l') lda #1+'l' sta screen+2 + // screen[42] = a // Chained assignment with a modification of the result lda #'l' sta screen+$2a + // } rts } diff --git a/src/test/ref/assignment-compound.asm b/src/test/ref/assignment-compound.asm index 7afa74aca..4bc808796 100644 --- a/src/test/ref/assignment-compound.asm +++ b/src/test/ref/assignment-compound.asm @@ -8,66 +8,84 @@ .const RED = 2 .label screen2 = screen1+$28 main: { + // test(i++, a) ldx #0 lda #3 sta.z test.a jsr test + // test(i++, a) ldx #1 lda #3+1 sta.z test.a jsr test + // test(i++, a) ldx #2 lda #3+1-1 sta.z test.a jsr test + // test(i++, a) ldx #3 lda #(3+1-1)*6 sta.z test.a jsr test + // test(i++, a) ldx #4 lda #(3+1-1)*6/2 sta.z test.a jsr test + // test(i++, a) ldx #5 lda #(3+1-1)*6/2&2-1 sta.z test.a jsr test + // test(i++, a) ldx #6 lda #((3+1-1)*6/2&2-1)<<2 sta.z test.a jsr test + // test(i++, a) ldx #7 lda #((3+1-1)*6/2&2-1)<<2>>1 sta.z test.a jsr test + // test(i++, a) ldx #8 lda #((3+1-1)*6/2&2-1)<<2>>1^6 sta.z test.a jsr test + // test(i++, a) ldx #9 lda #((3+1-1)*6/2&2-1)<<2>>1^6|1 sta.z test.a jsr test + // test(i++, a) ldx #$a lda #(((3+1-1)*6/2&2-1)<<2>>1^6|1)&1 sta.z test.a jsr test + // } rts } // test(byte register(X) i, byte zp(2) a) test: { .label a = 2 + // screen1[i] = a lda.z a sta screen1,x + // screen2[i] = ref[i] lda ref,x sta screen2,x + // if(ref[i]==a) lda ref,x cmp.z a beq __b1 + // cols[i] = RED lda #RED sta cols,x + // } rts __b1: + // cols[i] = GREEN lda #GREEN sta cols,x rts diff --git a/src/test/ref/assignment-compound.log b/src/test/ref/assignment-compound.log index b8b17b170..f08b1d8f8 100644 --- a/src/test/ref/assignment-compound.log +++ b/src/test/ref/assignment-compound.log @@ -343,7 +343,7 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) screen2#10 (byte*) screen2#0 Identical Phi Values (byte*) screen2#1 (byte*) screen2#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) test::$0 [75] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 +Simple Condition (bool~) test::$0 [63] if(*((const byte*) ref + (byte) test::i#11)==(byte) test::a#11) goto test::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte*) screen2#0 ← (const byte*) screen1 + (byte) $28 Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/bgblack.asm b/src/test/ref/bgblack.asm index d7262d1e5..8bcec5ce9 100644 --- a/src/test/ref/bgblack.asm +++ b/src/test/ref/bgblack.asm @@ -4,7 +4,9 @@ .label BGCOL = $d021 .const BLACK = 0 main: { + // *BGCOL = BLACK lda #BLACK sta BGCOL + // } rts } diff --git a/src/test/ref/bitmap-circle-2.asm b/src/test/ref/bitmap-circle-2.asm index b544b2e83..fb07db13d 100644 --- a/src/test/ref/bitmap-circle-2.asm +++ b/src/test/ref/bitmap-circle-2.asm @@ -12,6 +12,7 @@ .label BITMAP = $2000 main: { .label i = 6 + // fill(BITMAP,40*25*8,0) ldx #0 lda #<$28*$19*8 sta.z fill.size @@ -22,6 +23,7 @@ main: { lda #>BITMAP sta.z fill.addr+1 jsr fill + // fill(SCREEN,40*25,$16) ldx #$16 lda #<$28*$19 sta.z fill.size @@ -32,10 +34,13 @@ main: { lda #>SCREEN sta.z fill.addr+1 jsr fill + // *BORDERCOL = BLUE lda #BLUE sta BORDERCOL + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)) lda #(SCREEN&$3fff)/$40|(BITMAP&$3fff)/$400 sta VIC_MEMORY lda #<1 @@ -43,6 +48,7 @@ main: { lda #>1 sta.z i+1 __b1: + // for (int i = 1; i < 180; i += 5) lda.z i cmp #<$b4 lda.z i+1 @@ -54,11 +60,13 @@ main: { __b3: jmp __b3 __b2: + // circle(160,100,i) lda.z i sta.z circle.r lda.z i+1 sta.z circle.r+1 jsr circle + // i += 5 lda.z i clc adc #<5 @@ -82,12 +90,14 @@ circle: { .label p = 4 .label y = 2 .label x1 = 8 + // r << 1 lda.z r asl sta.z __0 lda.z r+1 rol sta.z __0+1 + // p = 3-(r << 1) sec lda #<3 sbc.z p @@ -99,6 +109,7 @@ circle: { sta.z x1 sta.z x1+1 __b1: + // for(int x = 0; x <= y; x ++) lda.z y cmp.z x1 lda.z y+1 @@ -107,12 +118,15 @@ circle: { eor #$80 !: bpl __b2 + // } rts __b2: + // if(p < 0) lda.z p+1 bpl !__b3+ jmp __b3 !__b3: + // y=y-1 sec lda.z y sbc #1 @@ -120,6 +134,7 @@ circle: { bcs !+ dec.z y+1 !: + // x-y lda.z x1 sec sbc.z y @@ -127,10 +142,12 @@ circle: { lda.z x1+1 sbc.z y+1 sta.z __5+1 + // (x-y) << 2 asl.z __6 rol.z __6+1 asl.z __6 rol.z __6+1 + // p + ((x-y) << 2) lda.z __7 clc adc.z __6 @@ -138,6 +155,7 @@ circle: { lda.z __7+1 adc.z __6+1 sta.z __7+1 + // p = p + ((x-y) << 2) + 10 lda.z p clc adc #<$a @@ -146,6 +164,7 @@ circle: { adc #>$a sta.z p+1 __b4: + // plot(xc+x,yc-y) lda.z x1 clc adc #yc sta.z plot.y+1 jsr plot + // plot(xc-x,yc+y) lda #yc sta.z plot.y+1 jsr plot + // plot(xc+y,yc-x) lda.z y clc adc #yc sta.z plot.y+1 jsr plot + // plot(xc-y,yc+x) lda #yc sta.z plot.y+1 jsr plot + // for(int x = 0; x <= y; x ++) inc.z x1 bne !+ inc.z x1+1 !: jmp __b1 __b3: + // x << 2 lda.z x1 asl sta.z __9 @@ -280,6 +308,7 @@ circle: { sta.z __9+1 asl.z __9 rol.z __9+1 + // p + (x << 2) lda.z __10 clc adc.z __9 @@ -287,6 +316,7 @@ circle: { lda.z __10+1 adc.z __9+1 sta.z __10+1 + // p = p + (x << 2) + 6 lda.z p clc adc #<6 @@ -306,6 +336,7 @@ plot: { .label location = $e .label __15 = $10 .label __16 = $10 + // if (x < 0 || x > 319 || y < 0 || y > 199) lda.z x+1 bpl !__breturn+ jmp __breturn @@ -334,12 +365,14 @@ plot: { bmi !__breturn+ jmp __breturn !__breturn: + // x & $fff8 lda.z x and #<$fff8 sta.z __8 lda.z x+1 and #>$fff8 sta.z __8+1 + // location += x & $fff8 clc lda.z location adc #BITMAP sta.z location+1 + // > 3 lda.z __11+1 cmp #$80 ror.z __11+1 @@ -367,6 +404,7 @@ plot: { cmp #$80 ror.z __11+1 ror.z __11 + // (y >> 3) * 320 lda.z __11 asl sta.z __15 @@ -394,6 +432,7 @@ plot: { lsr.z $ff ror.z __12+1 ror.z __12 + // location += ((y >> 3) * 320) lda.z location clc adc.z __12 @@ -401,14 +440,18 @@ plot: { lda.z location+1 adc.z __12+1 sta.z location+1 + // x & 7 lda #7 and.z x + // (*location) | bitmask[x & 7] tay lda bitmask,y ldy #0 ora (location),y + // (*location) = (*location) | bitmask[x & 7] sta (location),y __breturn: + // } rts } // Fill some memory with a value @@ -417,6 +460,7 @@ fill: { .label end = 6 .label addr = 8 .label size = 6 + // end = start + size lda.z end clc adc.z addr @@ -425,17 +469,21 @@ fill: { adc.z addr+1 sta.z end+1 __b1: + // for(byte* addr = start; addr!=end; addr++) lda.z addr+1 cmp.z end+1 bne __b2 lda.z addr cmp.z end bne __b2 + // } rts __b2: + // *addr = val txa ldy #0 sta (addr),y + // for(byte* addr = start; addr!=end; addr++) inc.z addr bne !+ inc.z addr+1 diff --git a/src/test/ref/bitmap-circle-2.log b/src/test/ref/bitmap-circle-2.log index b8a3fad16..c2a6eebff 100644 --- a/src/test/ref/bitmap-circle-2.log +++ b/src/test/ref/bitmap-circle-2.log @@ -705,14 +705,14 @@ Identical Phi Values (byte*) fill::end#1 (byte*) fill::end#0 Identical Phi Values (byte) fill::val#2 (byte) fill::val#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$2 [14] if((signed word) main::i#2<(signed word) $b4) goto main::@2 -Simple Condition (bool~) circle::$2 [32] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2 -Simple Condition (bool~) circle::$3 [35] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4 -Simple Condition (bool~) fill::$1 [130] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2 +Simple Condition (bool~) circle::$2 [28] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2 +Simple Condition (bool~) circle::$3 [30] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4 +Simple Condition (bool~) fill::$1 [93] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [108] (bool~) plot::$7 ← ! (bool~) plot::$6 -Rewriting || if()-condition to two if()s [107] (bool~) plot::$6 ← (bool~) plot::$4 || (bool~) plot::$5 -Rewriting || if()-condition to two if()s [105] (bool~) plot::$4 ← (bool~) plot::$2 || (bool~) plot::$3 -Rewriting || if()-condition to two if()s [103] (bool~) plot::$2 ← (bool~) plot::$0 || (bool~) plot::$1 +Rewriting ! if()-condition to reversed if() [74] (bool~) plot::$7 ← ! (bool~) plot::$6 +Rewriting || if()-condition to two if()s [73] (bool~) plot::$6 ← (bool~) plot::$4 || (bool~) plot::$5 +Rewriting || if()-condition to two if()s [71] (bool~) plot::$4 ← (bool~) plot::$2 || (bool~) plot::$3 +Rewriting || if()-condition to two if()s [69] (bool~) plot::$2 ← (bool~) plot::$0 || (bool~) plot::$1 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant right-side identified [1] (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8 Constant right-side identified [5] (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19 @@ -729,7 +729,7 @@ Constant (const signed word) circle::yc#0 = $64 Constant (const signed word) circle::x1#0 = 0 Constant (const byte*) plot::location#0 = BITMAP Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [22] if(true) goto main::@7 +if() condition always true - replacing block destination [20] if(true) goto main::@7 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/bitmap-circle.asm b/src/test/ref/bitmap-circle.asm index 28d395e1c..f00a2e940 100644 --- a/src/test/ref/bitmap-circle.asm +++ b/src/test/ref/bitmap-circle.asm @@ -14,6 +14,7 @@ .label SCREEN = $400 .label BITMAP = $2000 main: { + // fill(BITMAP,40*25*8,0) ldx #0 lda #<$28*$19*8 sta.z fill.size @@ -24,6 +25,7 @@ main: { lda #>BITMAP sta.z fill.addr+1 jsr fill + // fill(SCREEN,40*25,$16) ldx #$16 lda #<$28*$19 sta.z fill.size @@ -34,12 +36,16 @@ main: { lda #>SCREEN sta.z fill.addr+1 jsr fill + // *BORDERCOL = BLUE lda #BLUE sta BORDERCOL + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)) lda #(SCREEN&$3fff)/$40|(BITMAP&$3fff)/$400 sta VIC_MEMORY + // circle(100,100,50) jsr circle __b1: jmp __b1 @@ -68,6 +74,7 @@ circle: { sta.z x1 sta.z x1+1 __b1: + // for(int x = 0; x <= y; x ++) lda.z y cmp.z x1 lda.z y+1 @@ -76,12 +83,15 @@ circle: { eor #$80 !: bpl __b2 + // } rts __b2: + // if(p < 0) lda.z p+1 bpl !__b3+ jmp __b3 !__b3: + // y=y-1 sec lda.z y sbc #1 @@ -89,6 +99,7 @@ circle: { bcs !+ dec.z y+1 !: + // x-y lda.z x1 sec sbc.z y @@ -96,10 +107,12 @@ circle: { lda.z x1+1 sbc.z y+1 sta.z __5+1 + // (x-y) << 2 asl.z __6 rol.z __6+1 asl.z __6 rol.z __6+1 + // p + ((x-y) << 2) lda.z __7 clc adc.z __6 @@ -107,6 +120,7 @@ circle: { lda.z __7+1 adc.z __6+1 sta.z __7+1 + // p = p + ((x-y) << 2) + 10 lda.z p clc adc #<$a @@ -115,6 +129,7 @@ circle: { adc #>$a sta.z p+1 __b4: + // plot(xc+x,yc-y) lda.z x1 clc adc #yc sta.z plot.y+1 jsr plot + // plot(xc-x,yc+y) lda #yc sta.z plot.y+1 jsr plot + // plot(xc+y,yc-x) lda.z y clc adc #yc sta.z plot.y+1 jsr plot + // plot(xc-y,yc+x) lda #yc sta.z plot.y+1 jsr plot + // for(int x = 0; x <= y; x ++) inc.z x1 bne !+ inc.z x1+1 !: jmp __b1 __b3: + // x << 2 lda.z x1 asl sta.z __9 @@ -249,6 +273,7 @@ circle: { sta.z __9+1 asl.z __9 rol.z __9+1 + // p + (x << 2) lda.z __10 clc adc.z __9 @@ -256,6 +281,7 @@ circle: { lda.z __10+1 adc.z __9+1 sta.z __10+1 + // p = p + (x << 2) + 6 lda.z p clc adc #<6 @@ -275,12 +301,14 @@ plot: { .label location = $c .label __7 = $e .label __8 = $e + // x & $fff8 lda.z x and #<$fff8 sta.z __0 lda.z x+1 and #>$fff8 sta.z __0+1 + // location += x & $fff8 clc lda.z location adc #BITMAP sta.z location+1 + // > 3 lda.z __3+1 cmp #$80 ror.z __3+1 @@ -308,6 +340,7 @@ plot: { cmp #$80 ror.z __3+1 ror.z __3 + // (y >> 3) * 320 lda.z __3 asl sta.z __7 @@ -335,6 +368,7 @@ plot: { lsr.z $ff ror.z __4+1 ror.z __4 + // location += ((y >> 3) * 320) lda.z location clc adc.z __4 @@ -342,13 +376,17 @@ plot: { lda.z location+1 adc.z __4+1 sta.z location+1 + // x & 7 lda #7 and.z x + // (*location) | bitmask[x & 7] tay lda bitmask,y ldy #0 ora (location),y + // (*location) = (*location) | bitmask[x & 7] sta (location),y + // } rts } // Fill some memory with a value @@ -357,6 +395,7 @@ fill: { .label end = 4 .label addr = 6 .label size = 4 + // end = start + size lda.z end clc adc.z addr @@ -365,17 +404,21 @@ fill: { adc.z addr+1 sta.z end+1 __b1: + // for(byte* addr = start; addr!=end; addr++) lda.z addr+1 cmp.z end+1 bne __b2 lda.z addr cmp.z end bne __b2 + // } rts __b2: + // *addr = val txa ldy #0 sta (addr),y + // for(byte* addr = start; addr!=end; addr++) inc.z addr bne !+ inc.z addr+1 diff --git a/src/test/ref/bitmap-circle.log b/src/test/ref/bitmap-circle.log index e49fb8311..18997ea32 100644 --- a/src/test/ref/bitmap-circle.log +++ b/src/test/ref/bitmap-circle.log @@ -637,9 +637,9 @@ Identical Phi Values (signed word) circle::yc#1 (signed word) circle::yc#13 Identical Phi Values (byte*) fill::end#1 (byte*) fill::end#0 Identical Phi Values (byte) fill::val#2 (byte) fill::val#4 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) circle::$2 [25] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2 -Simple Condition (bool~) circle::$3 [28] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4 -Simple Condition (bool~) fill::$1 [113] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2 +Simple Condition (bool~) circle::$2 [23] if((signed word) circle::x1#10<=(signed word) circle::y#13) goto circle::@2 +Simple Condition (bool~) circle::$3 [25] if((signed word) circle::p#3<(signed byte) 0) goto circle::@4 +Simple Condition (bool~) fill::$1 [79] if((byte*) fill::addr#2!=(byte*) fill::end#0) goto fill::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [1] (signed word) fill::size#0 ← (snumber)(number) $28*(number) $19*(number) 8 Constant right-side identified [5] (signed word) fill::size#1 ← (snumber)(number) $28*(number) $19 diff --git a/src/test/ref/bitmap-line-anim-1.asm b/src/test/ref/bitmap-line-anim-1.asm index 62a67099d..f323bae7c 100644 --- a/src/test/ref/bitmap-line-anim-1.asm +++ b/src/test/ref/bitmap-line-anim-1.asm @@ -14,21 +14,30 @@ .label BITMAP = $2000 .label next = 5 main: { + // *BORDERCOL = 0 lda #0 sta BORDERCOL + // *BGCOL = 0 sta BGCOL + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)) lda #(SCREEN&$3fff)/$40|(BITMAP&$3fff)/$400 sta VIC_MEMORY + // bitmap_init(BITMAP) jsr bitmap_init + // bitmap_clear() jsr bitmap_clear + // init_screen() jsr init_screen lda #0 sta.z next __b1: + // bitmap_line(0,next,0,100) ldx.z next jsr bitmap_line + // next++; inc.z next jmp __b1 } @@ -38,33 +47,43 @@ bitmap_line: { .label x0 = 0 .label y0 = 0 .label y1 = $64 + // if(x0>1 lda.z xd lsr sta.z e @@ -146,25 +181,33 @@ bitmap_line_ydxi: { lda #bitmap_line.x0 sta.z x __b1: + // bitmap_plot(x,y) ldx.z x ldy.z y jsr bitmap_plot + // y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(yd>1 lda.z xd lsr sta.z e @@ -213,25 +265,33 @@ bitmap_line_ydxd: { lda #bitmap_line.x0 sta.z x __b1: + // bitmap_plot(x,y) ldx.z x ldy.z y jsr bitmap_plot + // y = y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(ydSCREEN sta.z c+1 __b1: + // for(byte* c = SCREEN; c!=SCREEN+$400;c++) lda.z c+1 cmp #>SCREEN+$400 bne __b2 lda.z c cmp #bitmap lda #>BITMAP sta bitmap_plot_xhi,x + // bitmap_plot_bit[x] = bits tya sta bitmap_plot_bit,x + // bits = bits>>1 tya lsr tay + // if(bits==0) cpy #0 bne __b2 ldy #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -316,16 +393,24 @@ bitmap_init: { sta.z yoffs+1 tax __b3: + // y&$7 lda #7 sax.z __10 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __10 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -334,9 +419,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Tables for the plotter - initialized by calling bitmap_draw_init(); diff --git a/src/test/ref/bitmap-line-anim-1.log b/src/test/ref/bitmap-line-anim-1.log index e46127d10..6e67d4988 100644 --- a/src/test/ref/bitmap-line-anim-1.log +++ b/src/test/ref/bitmap-line-anim-1.log @@ -1465,28 +1465,28 @@ Identical Phi Values (byte) next#3 (byte) next#1 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [29] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) bitmap_init::$4 [13] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$5 [17] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$12 [32] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$14 [36] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_clear::$1 [52] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 [56] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 -Simple Condition (bool~) bitmap_line::$0 [72] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$12 [77] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 -Simple Condition (bool~) bitmap_line::$2 [82] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line::$8 [87] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 -Simple Condition (bool~) bitmap_line::$4 [92] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 -Simple Condition (bool~) bitmap_line::$18 [125] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 -Simple Condition (bool~) bitmap_line::$14 [130] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 -Simple Condition (bool~) bitmap_line_xdyi::$4 [173] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 [177] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 [196] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 [200] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 [219] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 [223] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 [243] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 [247] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) init_screen::$0 [281] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@2 +Simple Condition (bool~) bitmap_init::$4 [11] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [15] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [28] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$14 [32] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_clear::$1 [45] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [48] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [62] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [65] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 +Simple Condition (bool~) bitmap_line::$2 [68] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line::$8 [71] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 +Simple Condition (bool~) bitmap_line::$4 [74] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 +Simple Condition (bool~) bitmap_line::$18 [101] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 +Simple Condition (bool~) bitmap_line::$14 [104] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 +Simple Condition (bool~) bitmap_line_xdyi::$4 [139] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [143] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [156] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [160] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [173] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [177] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [190] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [194] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) init_screen::$0 [220] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) bitmap_init::bits#0 = $80 Constant (const byte) bitmap_init::x#0 = 0 @@ -1523,26 +1523,26 @@ Constant (const byte) bitmap_line_ydxi::y#1 = bitmap_line::y0#0 Constant (const byte) bitmap_line_ydxi::x#1 = bitmap_line::x0#0 Constant (const byte) bitmap_line_ydxi::y1#1 = bitmap_line::y1#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [77] if((const byte) bitmap_line::y0#0<(const byte) bitmap_line::y1#0) goto bitmap_line::@20 -if() condition always true - replacing block destination [82] if((const byte) bitmap_line::y0#0<(const byte) bitmap_line::y1#0) goto bitmap_line::@10 -if() condition always true - replacing block destination [274] if(true) goto main::@1 +if() condition always true - replacing block destination [65] if((const byte) bitmap_line::y0#0<(const byte) bitmap_line::y1#0) goto bitmap_line::@20 +if() condition always true - replacing block destination [68] if((const byte) bitmap_line::y0#0<(const byte) bitmap_line::y1#0) goto bitmap_line::@10 +if() condition always true - replacing block destination [215] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [15] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [17] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [34] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [36] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [50] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ -Resolved ranged comparison value [52] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 -Resolved ranged next value [54] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ -Resolved ranged comparison value [56] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 -Simplifying expression containing zero bitmap_plot_xhi in [41] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero bitmap_plot_xlo in [41] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero bitmap_line::x1#0 in [74] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (const byte) bitmap_line::x0#0 -Simplifying expression containing zero bitmap_line::x1#0 in [79] (byte) bitmap_line::xd#2 ← (const byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 -Simplifying expression containing zero bitmap_line::y1#0 in [84] (byte) bitmap_line::yd#1 ← (const byte) bitmap_line::y1#0 - (const byte) bitmap_line::y0#0 -Simplifying expression containing zero bitmap_line::y1#0 in [89] (byte) bitmap_line::yd#2 ← (const byte) bitmap_line::y0#0 - (const byte) bitmap_line::y1#0 -Simplifying expression containing zero bitmap_line::y1#0 in [122] (byte) bitmap_line::yd#11 ← (const byte) bitmap_line::y1#0 - (const byte) bitmap_line::y0#0 -Simplifying expression containing zero bitmap_line::y1#0 in [127] (byte) bitmap_line::yd#10 ← (const byte) bitmap_line::y0#0 - (const byte) bitmap_line::y1#0 +Resolved ranged next value [13] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [15] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [30] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [32] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [43] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ +Resolved ranged comparison value [45] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 +Resolved ranged next value [46] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ +Resolved ranged comparison value [48] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 +Simplifying expression containing zero bitmap_plot_xhi in [35] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero bitmap_plot_xlo in [35] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero bitmap_line::x1#0 in [63] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (const byte) bitmap_line::x0#0 +Simplifying expression containing zero bitmap_line::x1#0 in [66] (byte) bitmap_line::xd#2 ← (const byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 +Simplifying expression containing zero bitmap_line::y1#0 in [69] (byte) bitmap_line::yd#1 ← (const byte) bitmap_line::y1#0 - (const byte) bitmap_line::y0#0 +Simplifying expression containing zero bitmap_line::y1#0 in [72] (byte) bitmap_line::yd#2 ← (const byte) bitmap_line::y0#0 - (const byte) bitmap_line::y1#0 +Simplifying expression containing zero bitmap_line::y1#0 in [99] (byte) bitmap_line::yd#11 ← (const byte) bitmap_line::y1#0 - (const byte) bitmap_line::y0#0 +Simplifying expression containing zero bitmap_line::y1#0 in [102] (byte) bitmap_line::yd#10 ← (const byte) bitmap_line::y0#0 - (const byte) bitmap_line::y1#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) bitmap_line::xd#0 Eliminating unused constant (const byte) bitmap_line::yd#0 @@ -1634,9 +1634,9 @@ Identical Phi Values (byte) bitmap_line_ydxd::yd#5 (byte) bitmap_line_ydxd::yd#0 Identical Phi Values (byte) bitmap_line_ydxd::y1#6 (const byte) bitmap_line_ydxd::y1#0 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [3] (byte~) bitmap_init::$1 ← > (const byte*) bitmap_init::bitmap#0 -Constant right-side identified [91] (byte~) bitmap_line_xdyd::$6 ← (const byte) bitmap_line_xdyd::x1#0 + (byte) 1 -Constant right-side identified [106] (byte~) bitmap_line_ydxi::$6 ← (const byte) bitmap_line_ydxi::y1#1 + (byte) 1 -Constant right-side identified [121] (byte~) bitmap_line_ydxd::$6 ← (const byte) bitmap_line_ydxd::y1#0 + (byte) 1 +Constant right-side identified [90] (byte~) bitmap_line_xdyd::$6 ← (const byte) bitmap_line_xdyd::x1#0 + (byte) 1 +Constant right-side identified [105] (byte~) bitmap_line_ydxi::$6 ← (const byte) bitmap_line_ydxi::y1#1 + (byte) 1 +Constant right-side identified [120] (byte~) bitmap_line_ydxd::$6 ← (const byte) bitmap_line_ydxd::y1#0 + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) bitmap_init::$1 = >bitmap_init::bitmap#0 Constant (const byte) bitmap_line::yd#1 = bitmap_line::y1#0 diff --git a/src/test/ref/bitmap-line-anim-2.asm b/src/test/ref/bitmap-line-anim-2.asm index 044fe08d4..cf3b296d5 100644 --- a/src/test/ref/bitmap-line-anim-2.asm +++ b/src/test/ref/bitmap-line-anim-2.asm @@ -16,24 +16,33 @@ .label BITMAP = $2000 .label next = $a main: { + // *BORDERCOL = 0 lda #0 sta BORDERCOL + // *BGCOL = 0 sta BGCOL + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)) lda #(SCREEN&$3fff)/$40|(BITMAP&$3fff)/$400 sta VIC_MEMORY + // bitmap_init(BITMAP, SCREEN) jsr bitmap_init + // bitmap_clear(PURPLE, WHITE) jsr bitmap_clear lda #<0 sta.z next sta.z next+1 __b1: + // bitmap_line(0,0,next,100) jsr bitmap_line + // next++; inc.z next bne !+ inc.z next+1 !: + // if(next==320) lda.z next+1 cmp #>$140 bne __b1 @@ -60,20 +69,27 @@ bitmap_line: { .label y = $c .label x = $e .label x2 = $a + // abs_u16(x2-x1) lda.z x2 sta.z abs_u16.w lda.z x2+1 sta.z abs_u16.w+1 jsr abs_u16 + // abs_u16(x2-x1) + // dx = abs_u16(x2-x1) lda.z abs_u16.return sta.z dx lda.z abs_u16.return+1 sta.z dx+1 + // abs_u16(y2-y1) lda #y2 sta.z abs_u16.w+1 jsr abs_u16 + // abs_u16(y2-y1) + // dy = abs_u16(y2-y1) + // if(dx==0 && dy==0) lda.z dx bne __b1 lda.z dx+1 @@ -86,20 +102,27 @@ bitmap_line: { !__b4: !: __b1: + // sgn_u16(x2-x1) lda.z x2 sta.z sgn_u16.w lda.z x2+1 sta.z sgn_u16.w+1 jsr sgn_u16 + // sgn_u16(x2-x1) + // sx = sgn_u16(x2-x1) lda.z sgn_u16.return sta.z sx lda.z sgn_u16.return+1 sta.z sx+1 + // sgn_u16(y2-y1) lda #y2 sta.z sgn_u16.w+1 jsr sgn_u16 + // sgn_u16(y2-y1) + // sy = sgn_u16(y2-y1) + // if(dx > dy) lda.z dy+1 cmp.z dx+1 bcc __b2 @@ -108,6 +131,7 @@ bitmap_line: { cmp.z dx bcc __b2 !: + // e = dx/2 lda.z dx+1 lsr sta.z e+1 @@ -123,9 +147,11 @@ bitmap_line: { lda #>y1 sta.z y+1 __b6: + // bitmap_plot(x,(byte)y) lda.z y tax jsr bitmap_plot + // y += sy lda.z y clc adc.z sy @@ -133,6 +159,7 @@ bitmap_line: { lda.z y+1 adc.z sy+1 sta.z y+1 + // e += dx lda.z e clc adc.z dx @@ -140,6 +167,7 @@ bitmap_line: { lda.z e+1 adc.z dx+1 sta.z e+1 + // if(dyy2 bne __b6 @@ -169,11 +200,14 @@ bitmap_line: { cmp #y1 sta.z y+1 __b9: + // bitmap_plot(x,(byte)y) lda.z y tax jsr bitmap_plot + // x += sx lda.z x clc adc.z sx @@ -199,6 +235,7 @@ bitmap_line: { lda.z x+1 adc.z sx+1 sta.z x+1 + // e += dy lda.z e1 clc adc.z dy @@ -206,6 +243,7 @@ bitmap_line: { lda.z e1+1 adc.z dy+1 sta.z e1+1 + // if(dx < e) cmp.z dx+1 bne !+ lda.z e1 @@ -213,6 +251,7 @@ bitmap_line: { beq __b10 !: bcc __b10 + // y += sy lda.z y clc adc.z sy @@ -220,6 +259,7 @@ bitmap_line: { lda.z y+1 adc.z sy+1 sta.z y+1 + // e -= dx lda.z e1 sec sbc.z dx @@ -228,6 +268,7 @@ bitmap_line: { sbc.z dx+1 sta.z e1+1 __b10: + // while (x != x2) lda.z x+1 cmp.z x2+1 bne __b9 @@ -236,6 +277,7 @@ bitmap_line: { bne __b9 jmp __b3 __b4: + // bitmap_plot(x,(byte)y) lda #x1 @@ -250,16 +292,19 @@ bitmap_plot: { .label __1 = $16 .label plotter = $14 .label x = $e + // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } lda bitmap_plot_yhi,x sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter + // x & $fff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -267,12 +312,15 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // w lda.z w+1 + // >w&0x80 and #$80 + // if(>w&0x80) cmp #0 bne __b1 lda #<1 @@ -294,6 +345,7 @@ sgn_u16: { lda #<-1 sta.z return sta.z return+1 + // } rts } // Get the absolute value of a 16-bit unsigned number treated as a signed number. @@ -301,12 +353,16 @@ sgn_u16: { abs_u16: { .label w = 8 .label return = 8 + // >w lda.z w+1 + // >w&0x80 and #$80 + // if(>w&0x80) cmp #0 bne __b1 rts __b1: + // return -w; sec lda #0 sbc.z return @@ -314,6 +370,7 @@ abs_u16: { lda #0 sbc.z return+1 sta.z return+1 + // } rts } // Clear all graphics on the bitmap @@ -321,6 +378,7 @@ abs_u16: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10+PURPLE + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -350,11 +410,13 @@ memset: { .label dst = $c .label num = $a .label str = $c + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -363,6 +425,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -370,11 +433,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -388,12 +454,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -403,16 +473,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -421,9 +499,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Tables for the plotter - initialized by calling bitmap_init(); diff --git a/src/test/ref/bitmap-line-anim-2.log b/src/test/ref/bitmap-line-anim-2.log index f1c850a12..b2ae8a8da 100644 --- a/src/test/ref/bitmap-line-anim-2.log +++ b/src/test/ref/bitmap-line-anim-2.log @@ -1382,23 +1382,23 @@ Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [49] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [32] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [36] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [52] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [56] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_line::$12 [127] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$21 [150] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 -Simple Condition (bool~) bitmap_line::$22 [153] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@7 -Simple Condition (bool~) bitmap_line::$27 [172] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$28 [175] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#0) goto bitmap_line::@12 -Simple Condition (bool~) abs_u16::$3 [183] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 -Simple Condition (bool~) sgn_u16::$2 [196] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 -Simple Condition (bool~) main::$4 [229] if((word) next#1!=(word) $140) goto main::@2 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [24] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [28] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [40] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [44] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_line::$12 [92] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$21 [106] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 +Simple Condition (bool~) bitmap_line::$22 [109] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@7 +Simple Condition (bool~) bitmap_line::$27 [123] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$28 [126] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#0) goto bitmap_line::@12 +Simple Condition (bool~) abs_u16::$3 [133] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 +Simple Condition (bool~) sgn_u16::$2 [141] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 +Simple Condition (bool~) main::$4 [167] if((word) next#1!=(word) $140) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [109] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 -Rewriting && if()-condition to two if()s [108] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 +Rewriting ! if()-condition to reversed if() [81] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 +Rewriting && if()-condition to two if()s [80] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) bitmap_screen#0 = (byte*) 0 Constant (const byte*) bitmap_gfx#0 = (byte*) 0 @@ -1429,18 +1429,18 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [231] if(true) goto main::@1 +if() condition always true - replacing block destination [169] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [34] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [36] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [54] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [56] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [26] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [28] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [42] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [44] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 Simplifying constant evaluating to zero (byte)(const word) bitmap_line::y1#0 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero bitmap_line::x2#0 in [92] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 - (const word) bitmap_line::x1#0 -Simplifying expression containing zero bitmap_line::y2#0 in [99] (word) abs_u16::w#1 ← (const word) bitmap_line::y2#0 - (const word) bitmap_line::y1#0 -Simplifying expression containing zero bitmap_line::x2#0 in [112] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#0 - (const word) bitmap_line::x1#0 -Simplifying expression containing zero bitmap_line::y2#0 in [119] (word) sgn_u16::w#1 ← (const word) bitmap_line::y2#0 - (const word) bitmap_line::y1#0 +Simplifying expression containing zero bitmap_line::x2#0 in [70] (word) abs_u16::w#0 ← (word) bitmap_line::x2#0 - (const word) bitmap_line::x1#0 +Simplifying expression containing zero bitmap_line::y2#0 in [74] (word) abs_u16::w#1 ← (const word) bitmap_line::y2#0 - (const word) bitmap_line::y1#0 +Simplifying expression containing zero bitmap_line::x2#0 in [83] (word) sgn_u16::w#0 ← (word) bitmap_line::x2#0 - (const word) bitmap_line::x1#0 +Simplifying expression containing zero bitmap_line::y2#0 in [87] (word) sgn_u16::w#1 ← (const word) bitmap_line::y2#0 - (const word) bitmap_line::y1#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [37] (void*) memset::return#3 ← (void*) memset::str#3 @@ -1462,12 +1462,12 @@ Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) bitmap_line::$4 [55] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 -Simple Condition (bool~) bitmap_line::$5 [121] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 +Simple Condition (bool~) bitmap_line::$4 [54] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 +Simple Condition (bool~) bitmap_line::$5 [120] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [55] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 +Negating conditional jump and destination [54] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [31] (byte~) bitmap_clear::$0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [30] (byte~) bitmap_clear::$0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) bitmap_clear::$0 = bitmap_clear::fgcol#0*$10 Constant (const word) abs_u16::w#1 = bitmap_line::y2#0 diff --git a/src/test/ref/bitmap-plot-0.asm b/src/test/ref/bitmap-plot-0.asm index 6d7c84924..e7450c743 100644 --- a/src/test/ref/bitmap-plot-0.asm +++ b/src/test/ref/bitmap-plot-0.asm @@ -38,6 +38,7 @@ .label SCREEN = $400 .label frame_cnt = 7 __b1: + // frame_cnt = 1 // Counts frames - updated by the IRQ lda #1 sta.z frame_cnt @@ -49,12 +50,17 @@ main: { .label y = $c .label vx = 5 .label vy = 2 + // bitmap_init(BITMAP, SCREEN) jsr bitmap_init + // bitmap_clear(BLACK, WHITE) jsr bitmap_clear + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *D018 = toD018(SCREEN, BITMAP) lda #toD0181_return sta D018 + // init_irq() jsr init_irq lda #1 sta.z vy @@ -65,8 +71,10 @@ main: { sta.z x sta.z x+1 __b2: + // bitmap_plot(x, y) ldx.z y jsr bitmap_plot + // x += vx lda.z x clc adc.z vx @@ -74,10 +82,12 @@ main: { lda.z x+1 adc.z vx+1 sta.z x+1 + // y += vy lda.z y clc adc.z vy sta.z y + // if(x==319 || x==0) lda.z x cmp #<$13f bne !+ @@ -90,6 +100,7 @@ main: { lda.z x+1 bne __b3 __b5: + // vx = -vx sec lda #0 sbc.z vx @@ -98,6 +109,7 @@ main: { sbc.z vx+1 sta.z vx+1 __b3: + // if(y==199 || y==0) lda #$c7 cmp.z y beq __b6 @@ -105,12 +117,14 @@ main: { cmp #0 bne __b4 __b6: + // vy = -vy lda.z vy eor #$ff clc adc #1 sta.z vy __b4: + // plots_per_frame[frame_cnt]++; ldx.z frame_cnt inc plots_per_frame,x jmp __b2 @@ -121,16 +135,19 @@ bitmap_plot: { .label __1 = $a .label plotter = 8 .label x = 3 + // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } lda bitmap_plot_yhi,x sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter + // x & $fff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -138,40 +155,53 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // irq sta HARDWARE_IRQ+1 + // asm cli + // } rts } // Clear all graphics on the bitmap @@ -179,6 +209,7 @@ init_irq: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -208,11 +241,13 @@ memset: { .label dst = 5 .label num = 3 .label str = 5 + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -221,6 +256,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -228,11 +264,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -246,12 +285,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -261,16 +304,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -279,26 +330,34 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Interrupt Routine counting frames irq: { sta rega+1 + // *BGCOL = WHITE lda #WHITE sta BGCOL + // if(frame_cnt) lda #0 cmp.z frame_cnt beq __b1 + // frame_cnt++; inc.z frame_cnt __b1: + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 rti diff --git a/src/test/ref/bitmap-plot-0.log b/src/test/ref/bitmap-plot-0.log index 847645460..10d2b5c08 100644 --- a/src/test/ref/bitmap-plot-0.log +++ b/src/test/ref/bitmap-plot-0.log @@ -969,18 +969,18 @@ Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [49] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [32] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [36] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [52] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [56] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) irq::$0 [172] if((byte) 0==(byte) frame_cnt) goto irq::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [24] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [28] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [40] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [44] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) irq::$0 [131] if((byte) 0==(byte) frame_cnt) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [137] (bool~) main::$8 ← ! (bool~) main::$7 -Rewriting || if()-condition to two if()s [136] (bool~) main::$7 ← (bool~) main::$5 || (bool~) main::$6 -Rewriting ! if()-condition to reversed if() [143] (bool~) main::$13 ← ! (bool~) main::$12 -Rewriting || if()-condition to two if()s [142] (bool~) main::$12 ← (bool~) main::$10 || (bool~) main::$11 +Rewriting ! if()-condition to reversed if() [105] (bool~) main::$8 ← ! (bool~) main::$7 +Rewriting || if()-condition to two if()s [104] (bool~) main::$7 ← (bool~) main::$5 || (bool~) main::$6 +Rewriting ! if()-condition to reversed if() [111] (bool~) main::$13 ← ! (bool~) main::$12 +Rewriting || if()-condition to two if()s [110] (bool~) main::$12 ← (bool~) main::$10 || (bool~) main::$11 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) bitmap_screen#0 = (byte*) 0 Constant (const byte*) bitmap_gfx#0 = (byte*) 0 @@ -1010,13 +1010,13 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [126] if(true) goto main::@2 +if() condition always true - replacing block destination [96] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [34] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [36] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [54] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [56] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Simplifying expression containing zero bitmap_clear::$0 in [66] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Resolved ranged next value [26] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [28] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [42] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [44] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [49] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [37] (void*) memset::return#3 ← (void*) memset::str#3 @@ -1040,17 +1040,17 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$5 [64] if((word) main::x#1==(word) $13f) goto main::@8 -Simple Condition (bool~) main::$10 [68] if((byte) main::y#1==(byte) $c7) goto main::@9 -Simple Condition (bool~) main::$6 [91] if((word) main::x#1==(byte) 0) goto main::@8 -Simple Condition (bool~) main::$11 [92] if((byte) main::y#1==(byte) 0) goto main::@9 +Simple Condition (bool~) main::$5 [62] if((word) main::x#1==(word) $13f) goto main::@8 +Simple Condition (bool~) main::$10 [66] if((byte) main::y#1==(byte) $c7) goto main::@9 +Simple Condition (bool~) main::$6 [89] if((word) main::x#1==(byte) 0) goto main::@8 +Simple Condition (bool~) main::$11 [90] if((byte) main::y#1==(byte) 0) goto main::@9 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [91] if((word) main::x#1!=(byte) 0) goto main::@4 -Negating conditional jump and destination [92] if((byte) main::y#1!=(byte) 0) goto main::@5 +Negating conditional jump and destination [89] if((word) main::x#1!=(byte) 0) goto main::@4 +Negating conditional jump and destination [90] if((byte) main::y#1!=(byte) 0) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [31] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [47] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [50] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [30] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [45] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [48] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10 Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff diff --git a/src/test/ref/bitmap-plot-1.asm b/src/test/ref/bitmap-plot-1.asm index 34edcbd40..08cd4d9a9 100644 --- a/src/test/ref/bitmap-plot-1.asm +++ b/src/test/ref/bitmap-plot-1.asm @@ -47,6 +47,7 @@ // Remainder after unsigned 16-bit division .label rem16u = $13 __b1: + // frame_cnt = 1 // Counts frames - updated by the IRQ lda #1 sta.z frame_cnt @@ -68,13 +69,19 @@ main: { .label idx_y = $20 .label __24 = $a .label __25 = $a + // sin16s_gen2(SINUS, 512, -0x1001, 0x1001) jsr sin16s_gen2 + // bitmap_init(BITMAP, SCREEN) jsr bitmap_init + // bitmap_clear(BLACK, WHITE) jsr bitmap_clear + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *D018 = toD018(SCREEN, BITMAP) lda #toD0181_return sta D018 + // init_irq() jsr init_irq lda #<$80 sta.z idx_y @@ -84,6 +91,7 @@ main: { sta.z idx_x sta.z idx_x+1 __b2: + // cos_x = SINUS[idx_x] lda.z idx_x asl sta.z __22 @@ -105,11 +113,15 @@ main: { sta.z cos_x+1 pla sta.z cos_x + // mul16s(160, cos_x) lda #<$a0 sta.z mul16s.a lda #>$a0 sta.z mul16s.a+1 jsr mul16s + // mul16s(160, cos_x) + // xpos = mul16s(160, cos_x) + // xpos<<4 asl.z __6 rol.z __6+1 rol.z __6+2 @@ -126,6 +138,8 @@ main: { rol.z __6+1 rol.z __6+2 rol.z __6+3 + // >(xpos<<4) + // x = (word)(160 + >(xpos<<4)) clc lda #<$a0 adc.z __6+2 @@ -133,6 +147,7 @@ main: { lda #>$a0 adc.z __6+3 sta.z x+1 + // sin_y = SINUS[idx_y] lda.z idx_y asl sta.z __23 @@ -154,11 +169,15 @@ main: { sta.z sin_y+1 pla sta.z sin_y + // mul16s(100, sin_y) lda #<$64 sta.z mul16s.a lda #>$64 sta.z mul16s.a+1 jsr mul16s + // mul16s(100, sin_y) + // ypos = mul16s(100, sin_y) + // ypos<<4 asl.z __11 rol.z __11+1 rol.z __11+2 @@ -175,6 +194,8 @@ main: { rol.z __11+1 rol.z __11+2 rol.z __11+3 + // >(ypos<<4) + // y = (word)(100 + >(ypos<<4)) clc lda #<$64 adc.z __11+2 @@ -182,9 +203,11 @@ main: { lda #>$64 adc.z __11+3 sta.z y+1 + // bitmap_plot(x, (byte)y) lda.z y tax jsr bitmap_plot + // if(++idx_x==512) inc.z idx_x bne !+ inc.z idx_x+1 @@ -199,6 +222,7 @@ main: { sta.z idx_x sta.z idx_x+1 __b3: + // if(++idx_y==512) inc.z idx_y bne !+ inc.z idx_y+1 @@ -213,6 +237,7 @@ main: { sta.z idx_y sta.z idx_y+1 __b4: + // plots_per_frame[frame_cnt]++; ldx.z frame_cnt inc plots_per_frame,x jmp __b2 @@ -223,16 +248,19 @@ bitmap_plot: { .label __1 = $13 .label plotter = $11 .label x = $f + // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } lda bitmap_plot_yhi,x sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter + // x & $fff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -240,12 +268,15 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc.z b @@ -287,12 +324,15 @@ mul16s: { lda.z __16+1 sta.z m+3 __b1: + // if(b<0) lda.z b+1 bpl __b2 + // >m lda.z m+2 sta.z __13 lda.z m+3 sta.z __13+1 + // >m = (>m)-(word)a lda.z __13 sec sbc.z __17 @@ -305,6 +345,8 @@ mul16s: { lda.z __17+1 sta.z m+3 __b2: + // (signed dword)m + // } rts } // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word @@ -315,6 +357,7 @@ mul16u: { .label res = 6 .label b = $13 .label return = 6 + // mb = b lda.z b sta.z mb lda.z b+1 @@ -329,16 +372,21 @@ mul16u: { lda #>0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -353,8 +401,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -363,30 +413,40 @@ mul16u: { } // Setup the IRQ init_irq: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &irq // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 + // asm cli + // } rts } // Clear all graphics on the bitmap @@ -394,6 +454,7 @@ init_irq: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -423,11 +486,13 @@ memset: { .label dst = $20 .label num = $c .label str = $20 + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -436,6 +501,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -443,11 +509,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -461,12 +530,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -476,16 +549,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -494,9 +575,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Generate signed word sinus table - with values in the range min-max. @@ -516,7 +599,10 @@ sin16s_gen2: { // Iterate over the table .label x = 2 .label i = $c + // div32u16u(PI2_u4f28, wavelength) jsr div32u16u + // div32u16u(PI2_u4f28, wavelength) + // step = div32u16u(PI2_u4f28, wavelength) lda #SINUS @@ -533,6 +619,7 @@ sin16s_gen2: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; iwavelength bcc __b2 @@ -541,8 +628,10 @@ sin16s_gen2: { cmp #ampl sta.z mul16s.b+1 jsr mul16s + // mul16s(sin16s(x), ampl) + // >mul16s(sin16s(x), ampl) lda.z __6+2 sta.z __9 lda.z __6+3 sta.z __9+1 + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl) ldy #0 lda.z __9 sta (sintab),y iny lda.z __9+1 sta (sintab),y + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl); lda #SIZEOF_SIGNED_WORD clc adc.z sintab @@ -574,6 +668,7 @@ sin16s_gen2: { bcc !+ inc.z sintab+1 !: + // x = x + step lda.z x clc adc.z step @@ -587,6 +682,7 @@ sin16s_gen2: { lda.z x+3 adc.z step+3 sta.z x+3 + // for( word i=0; i= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -626,6 +723,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -660,6 +759,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -708,26 +811,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) + // x2 = mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return sta.z x2 lda.z mulu16_sel.return+1 sta.z x2+1 + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -735,22 +847,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -759,6 +878,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -766,8 +886,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -776,6 +898,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -788,11 +911,14 @@ mulu16_sel: { .label v2 = $13 .label return = $20 .label return_1 = $a + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2) + // mul16u(v1, v2)<dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -823,15 +952,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>sin16s_gen2.wavelength bcc __b3 @@ -879,10 +1023,12 @@ divr16u: { cmp #sin16s_gen2.wavelength sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Interrupt Routine counting frames irq: { sta rega+1 + // *BGCOL = WHITE lda #WHITE sta BGCOL + // if(frame_cnt) lda #0 cmp.z frame_cnt beq __b1 + // frame_cnt++; inc.z frame_cnt __b1: + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 rti diff --git a/src/test/ref/bitmap-plot-1.log b/src/test/ref/bitmap-plot-1.log index d5e582778..71451fde6 100644 --- a/src/test/ref/bitmap-plot-1.log +++ b/src/test/ref/bitmap-plot-1.log @@ -2295,28 +2295,28 @@ Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [310] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [71] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [76] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 [102] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$6 [106] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$4 [143] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 -Simple Condition (bool~) sin16s::$1 [171] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [175] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [234] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$1 [263] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [273] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [293] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [297] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [313] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [317] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) main::$18 [430] if((word) main::idx_x#1!=(word) $200) goto main::@4 -Simple Condition (bool~) main::$20 [435] if((word) main::idx_y#1!=(word) $200) goto main::@5 -Simple Condition (bool~) irq::$0 [462] if((byte) 0==(byte) frame_cnt) goto irq::@1 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [62] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [65] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$4 [91] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 +Simple Condition (bool~) sin16s::$1 [111] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [114] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [155] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$1 [172] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [179] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [194] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [198] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [210] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [214] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) main::$18 [298] if((word) main::idx_x#1!=(word) $200) goto main::@4 +Simple Condition (bool~) main::$20 [302] if((word) main::idx_y#1!=(word) $200) goto main::@5 +Simple Condition (bool~) irq::$0 [321] if((byte) 0==(byte) frame_cnt) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [201] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [133] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2371,18 +2371,18 @@ Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [392] if(true) goto main::@2 +if() condition always true - replacing block destination [270] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [295] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [297] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [315] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [317] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -De-inlining pointer[w] to *(pointer+w) [395] (signed word) main::cos_x#0 ← *((const signed word*) SINUS + (word~) main::$22) -De-inlining pointer[w] to *(pointer+w) [409] (signed word) main::sin_y#0 ← *((const signed word*) SINUS + (word~) main::$23) +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [196] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [198] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [212] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [214] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +De-inlining pointer[w] to *(pointer+w) [272] (signed word) main::cos_x#0 ← *((const signed word*) SINUS + (word~) main::$22) +De-inlining pointer[w] to *(pointer+w) [283] (signed word) main::sin_y#0 ← *((const signed word*) SINUS + (word~) main::$23) Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying expression containing zero bitmap_clear::$0 in [327] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Simplifying expression containing zero bitmap_clear::$0 in [219] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [169] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [171] (void*) memset::return#3 ← (void*) memset::str#3 @@ -2417,9 +2417,9 @@ Successful SSA optimization Pass2AliasElimination Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [60] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [165] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [182] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [185] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [164] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [180] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [183] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = xpos lda.z xpos+2 sta.z __7 lda.z xpos+3 sta.z __7+1 + // ((signed word)>xpos)>>2 lda.z __8+1 cmp #$80 ror.z __8+1 @@ -127,6 +140,7 @@ main: { cmp #$80 ror.z __8+1 ror.z __8 + // 160 + ((signed word)>xpos)>>2 clc lda.z x adc #<$a0 @@ -134,6 +148,7 @@ main: { lda.z x+1 adc #>$a0 sta.z x+1 + // sin_y = SINUS[idx_y] lda.z idx_y asl sta.z __32 @@ -155,11 +170,16 @@ main: { sta.z sin_y+1 pla sta.z sin_y + // mul16s(r, sin_y) jsr mul16s + // mul16s(r, sin_y) + // ypos = mul16s(r, sin_y) + // >ypos lda.z ypos+2 sta.z __13 lda.z ypos+3 sta.z __13+1 + // ((signed word)>ypos)>>2 lda.z __14+1 cmp #$80 ror.z __14+1 @@ -168,6 +188,7 @@ main: { cmp #$80 ror.z __14+1 ror.z __14 + // 100 + ((signed word)>ypos)>>2 lda.z y clc adc #<$64 @@ -175,11 +196,14 @@ main: { lda.z y+1 adc #>$64 sta.z y+1 + // bitmap_plot(x, (byte)y) lda.z y tax jsr bitmap_plot + // plots_per_frame[frame_cnt]++; ldx.z frame_cnt inc plots_per_frame,x + // idx_x += r_add lda.z r_add clc adc.z idx_x @@ -187,6 +211,7 @@ main: { bcc !+ inc.z idx_x+1 !: + // if(idx_x>=512) lda.z idx_x+1 cmp #>$200 bcc __b3 @@ -199,6 +224,7 @@ main: { sta.z idx_x sta.z idx_x+1 __b3: + // idx_y += r_add lda.z r_add clc adc.z idx_y @@ -206,6 +232,7 @@ main: { bcc !+ inc.z idx_y+1 !: + // if(idx_y>=512) lda.z idx_y+1 cmp #>$200 bcc __b4 @@ -218,6 +245,7 @@ main: { sta.z idx_y sta.z idx_y+1 __b4: + // r += r_add clc lda.z r adc.z r_add @@ -225,6 +253,7 @@ main: { lda.z r+1 adc #0 sta.z r+1 + // if((idx_x==0) && (r_add!=1)) lda.z idx_x bne b1 lda.z idx_x+1 @@ -232,8 +261,10 @@ main: { lda #1 cmp.z r_add beq b1 + // r_add /= 2 lsr.z r_add b1: + // if(r>=512*12+256) lda.z r cmp #<$200*$c+$100 lda.z r+1 @@ -244,6 +275,7 @@ main: { bpl __b7 jmp __b2 __b7: + // (*BORDERCOL)++; inc BORDERCOL jmp __b7 } @@ -253,16 +285,19 @@ bitmap_plot: { .label __1 = $15 .label plotter = $13 .label x = $11 + // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } lda bitmap_plot_yhi,x sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter + // x & $fff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -270,12 +305,15 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc.z b @@ -317,12 +361,15 @@ mul16s: { lda.z __16+1 sta.z m+3 __b1: + // if(b<0) lda.z b+1 bpl __b2 + // >m lda.z m+2 sta.z __13 lda.z m+3 sta.z __13+1 + // >m = (>m)-(word)a lda.z __17 sec sbc.z a @@ -335,6 +382,8 @@ mul16s: { lda.z __17+1 sta.z m+3 __b2: + // (signed dword)m + // } rts } // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word @@ -345,6 +394,7 @@ mul16u: { .label res = 8 .label b = $13 .label return = 8 + // mb = b lda.z b sta.z mb lda.z b+1 @@ -359,16 +409,21 @@ mul16u: { lda #>0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -383,8 +438,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -393,30 +450,40 @@ mul16u: { } // Setup the IRQ init_irq: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &irq // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 + // asm cli + // } rts } // Clear all graphics on the bitmap @@ -424,6 +491,7 @@ init_irq: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -453,11 +523,13 @@ memset: { .label dst = 2 .label num = $e .label str = 2 + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -466,6 +538,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -473,11 +546,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -491,12 +567,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -506,16 +586,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -524,9 +612,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Generate signed word sinus table - with values in the range min-max. @@ -546,7 +636,10 @@ sin16s_gen2: { // Iterate over the table .label x = 4 .label i = $e + // div32u16u(PI2_u4f28, wavelength) jsr div32u16u + // div32u16u(PI2_u4f28, wavelength) + // step = div32u16u(PI2_u4f28, wavelength) lda #SINUS @@ -563,6 +656,7 @@ sin16s_gen2: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; iwavelength bcc __b2 @@ -571,8 +665,10 @@ sin16s_gen2: { cmp #ampl sta.z mul16s.b+1 jsr mul16s + // mul16s(sin16s(x), ampl) + // >mul16s(sin16s(x), ampl) lda.z __6+2 sta.z __9 lda.z __6+3 sta.z __9+1 + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl) ldy #0 lda.z __9 sta (sintab),y iny lda.z __9+1 sta (sintab),y + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl); lda #SIZEOF_SIGNED_WORD clc adc.z sintab @@ -604,6 +705,7 @@ sin16s_gen2: { bcc !+ inc.z sintab+1 !: + // x = x + step lda.z x clc adc.z step @@ -617,6 +719,7 @@ sin16s_gen2: { lda.z x+3 adc.z step+3 sta.z x+3 + // for( word i=0; i= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -656,6 +760,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -690,6 +796,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -738,26 +848,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) + // x2 = mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return sta.z x2 lda.z mulu16_sel.return+1 sta.z x2+1 + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -765,22 +884,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -789,6 +915,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -796,8 +923,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -806,6 +935,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -818,11 +948,14 @@ mulu16_sel: { .label v2 = $13 .label return = $20 .label return_1 = $c + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2) + // mul16u(v1, v2)<dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -853,15 +989,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>sin16s_gen2.wavelength bcc __b3 @@ -909,10 +1060,12 @@ divr16u: { cmp #sin16s_gen2.wavelength sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Interrupt Routine counting frames irq: { sta rega+1 + // *BGCOL = WHITE lda #WHITE sta BGCOL + // if(frame_cnt) lda #0 cmp.z frame_cnt beq __b1 + // frame_cnt++; inc.z frame_cnt __b1: + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 rti diff --git a/src/test/ref/bitmap-plot-2.log b/src/test/ref/bitmap-plot-2.log index b36c9751a..365a82715 100644 --- a/src/test/ref/bitmap-plot-2.log +++ b/src/test/ref/bitmap-plot-2.log @@ -2449,33 +2449,33 @@ Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [310] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [71] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [76] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 [102] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$6 [106] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$4 [143] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 -Simple Condition (bool~) sin16s::$1 [171] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [175] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [234] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$1 [263] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [273] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [293] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [297] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [313] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [317] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) main::$21 [435] if((word) main::idx_x#1<(word) $200) goto main::@4 -Simple Condition (bool~) main::$23 [440] if((word) main::idx_y#1<(word) $200) goto main::@5 -Simple Condition (bool~) main::$29 [455] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 -Simple Condition (bool~) irq::$0 [482] if((byte) 0==(byte) frame_cnt) goto irq::@1 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [62] if((signed word) mul16s::a#3>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [65] if((signed word) mul16s::b#3>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$4 [91] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 +Simple Condition (bool~) sin16s::$1 [111] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [114] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [155] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$1 [172] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [179] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [194] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [198] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [210] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [214] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) main::$21 [303] if((word) main::idx_x#1<(word) $200) goto main::@4 +Simple Condition (bool~) main::$23 [307] if((word) main::idx_y#1<(word) $200) goto main::@5 +Simple Condition (bool~) main::$29 [319] if((signed word) main::r#1<(signed word)(number) $200*(number) $c+(number) $100) goto main::@1 +Simple Condition (bool~) irq::$0 [338] if((byte) 0==(byte) frame_cnt) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [448] (bool~) main::$27 ← ! (bool~) main::$26 -Rewriting && if()-condition to two if()s [447] (bool~) main::$26 ← (bool~) main::$24 && (bool~) main::$25 +Rewriting ! if()-condition to reversed if() [314] (bool~) main::$27 ← ! (bool~) main::$26 +Rewriting && if()-condition to two if()s [313] (bool~) main::$26 ← (bool~) main::$24 && (bool~) main::$25 Successful SSA optimization Pass2ConditionalAndOrRewriting -Negating conditional jump and destination [455] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@17 -Constant right-side identified [201] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Negating conditional jump and destination [319] if((signed word) main::r#1>=(signed word)(number) $200*(number) $c+(number) $100) goto main::@17 +Constant right-side identified [133] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2530,19 +2530,19 @@ Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [394] if(true) goto main::@2 -if() condition always true - replacing block destination [459] if(true) goto main::@18 +if() condition always true - replacing block destination [272] if(true) goto main::@2 +if() condition always true - replacing block destination [322] if(true) goto main::@18 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [295] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [297] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [315] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [317] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -De-inlining pointer[w] to *(pointer+w) [397] (signed word) main::cos_x#0 ← *((const signed word*) SINUS + (word~) main::$31) -De-inlining pointer[w] to *(pointer+w) [412] (signed word) main::sin_y#0 ← *((const signed word*) SINUS + (word~) main::$32) +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [196] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [198] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [212] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [214] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +De-inlining pointer[w] to *(pointer+w) [274] (signed word) main::cos_x#0 ← *((const signed word*) SINUS + (word~) main::$31) +De-inlining pointer[w] to *(pointer+w) [286] (signed word) main::sin_y#0 ← *((const signed word*) SINUS + (word~) main::$32) Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying expression containing zero bitmap_clear::$0 in [327] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Simplifying expression containing zero bitmap_clear::$0 in [219] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [169] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [171] (void*) memset::return#3 ← (void*) memset::str#3 @@ -2570,18 +2570,18 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$24 [231] if((word) main::idx_x#10==(byte) 0) goto main::@31 -Simple Condition (bool~) main::$25 [254] if((byte) main::r_add#10!=(byte) 1) goto main::@13 +Simple Condition (bool~) main::$24 [229] if((word) main::idx_x#10==(byte) 0) goto main::@31 +Simple Condition (bool~) main::$25 [252] if((byte) main::r_add#10!=(byte) 1) goto main::@13 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [231] if((word) main::idx_x#10!=(byte) 0) goto main::@6 -Negating conditional jump and destination [254] if((byte) main::r_add#10==(byte) 1) goto main::@6 +Negating conditional jump and destination [229] if((word) main::idx_x#10!=(byte) 0) goto main::@6 +Negating conditional jump and destination [252] if((byte) main::r_add#10==(byte) 1) goto main::@6 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [60] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [165] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [182] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [185] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [164] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [180] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [183] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = dy) lda.z dy+1 cmp.z dx+1 bcc __b2 @@ -150,6 +176,7 @@ bitmap_line: { cmp.z dx bcc __b2 !: + // e = dx/2 lda.z dx+1 lsr sta.z e+1 @@ -157,9 +184,11 @@ bitmap_line: { ror sta.z e __b6: + // bitmap_plot(x,(byte)y) lda.z y tax jsr bitmap_plot + // y += sy lda.z y clc adc.z sy @@ -167,6 +196,7 @@ bitmap_line: { lda.z y+1 adc.z sy+1 sta.z y+1 + // e += dx lda.z e clc adc.z dx @@ -174,6 +204,7 @@ bitmap_line: { lda.z e+1 adc.z dx+1 sta.z e+1 + // if(dy$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -290,12 +338,15 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // w lda.z w+1 + // >w&0x80 and #$80 + // if(>w&0x80) cmp #0 bne __b1 lda #<1 @@ -317,6 +371,7 @@ sgn_u16: { lda #<-1 sta.z return sta.z return+1 + // } rts } // Get the absolute value of a 16-bit unsigned number treated as a signed number. @@ -324,12 +379,16 @@ sgn_u16: { abs_u16: { .label w = 7 .label return = 7 + // >w lda.z w+1 + // >w&0x80 and #$80 + // if(>w&0x80) cmp #0 bne __b1 rts __b1: + // return -w; sec lda #0 sbc.z return @@ -337,6 +396,7 @@ abs_u16: { lda #0 sbc.z return+1 sta.z return+1 + // } rts } // Clear all graphics on the bitmap @@ -344,6 +404,7 @@ abs_u16: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -373,11 +436,13 @@ memset: { .label dst = $b .label num = 9 .label str = $b + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -386,6 +451,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -393,11 +459,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -411,12 +480,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -426,16 +499,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -444,9 +525,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Tables for the plotter - initialized by calling bitmap_init(); diff --git a/src/test/ref/bitmap-plot-3.log b/src/test/ref/bitmap-plot-3.log index 0c9f6c6eb..7dbdc4ce2 100644 --- a/src/test/ref/bitmap-plot-3.log +++ b/src/test/ref/bitmap-plot-3.log @@ -1531,25 +1531,25 @@ Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [49] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [32] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [36] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [52] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [56] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_line::$12 [127] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$21 [150] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 -Simple Condition (bool~) bitmap_line::$22 [153] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@7 -Simple Condition (bool~) bitmap_line::$27 [172] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$28 [175] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#0) goto bitmap_line::@12 -Simple Condition (bool~) abs_u16::$3 [183] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 -Simple Condition (bool~) sgn_u16::$2 [196] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 -Simple Condition (bool~) main::$3 [236] if((byte) main::i#2!=(byte) 8) goto main::@2 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [24] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [28] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [40] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [44] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_line::$12 [92] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$21 [106] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 +Simple Condition (bool~) bitmap_line::$22 [109] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#0) goto bitmap_line::@7 +Simple Condition (bool~) bitmap_line::$27 [123] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$28 [126] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#0) goto bitmap_line::@12 +Simple Condition (bool~) abs_u16::$3 [133] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 +Simple Condition (bool~) sgn_u16::$2 [141] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 +Simple Condition (bool~) main::$3 [171] if((byte) main::i#2!=(byte) 8) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [109] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 -Rewriting && if()-condition to two if()s [108] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 +Rewriting ! if()-condition to reversed if() [81] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 +Rewriting && if()-condition to two if()s [80] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [257] (byte*~) main::$16 ← (const byte*) SCREEN + (word) $3e7 +Constant right-side identified [185] (byte*~) main::$16 ← (const byte*) SCREEN + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) bitmap_screen#0 = (byte*) 0 Constant (const byte*) bitmap_gfx#0 = (byte*) 0 @@ -1580,13 +1580,13 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [255] if(true) goto main::@8 +if() condition always true - replacing block destination [184] if(true) goto main::@8 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [34] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [36] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [54] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [56] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Simplifying expression containing zero bitmap_clear::$0 in [66] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Resolved ranged next value [26] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [28] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [42] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [44] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [49] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [37] (void*) memset::return#3 ← (void*) memset::str#3 @@ -1612,14 +1612,14 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte) bitmap_clear::col#0 = (byte~) bitmap_clear::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) bitmap_line::$4 [55] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 -Simple Condition (bool~) bitmap_line::$5 [136] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 +Simple Condition (bool~) bitmap_line::$4 [53] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 +Simple Condition (bool~) bitmap_line::$5 [134] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [55] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 +Negating conditional jump and destination [53] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [31] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [113] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [116] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [30] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [111] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [114] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) bitmap_clear::col#0 = bitmap_clear::fgcol#0*$10 Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff diff --git a/src/test/ref/bitmap-plotter.asm b/src/test/ref/bitmap-plotter.asm index c6dc7c806..7b32c3c2d 100644 --- a/src/test/ref/bitmap-plotter.asm +++ b/src/test/ref/bitmap-plotter.asm @@ -13,36 +13,50 @@ .label SCREEN = $400 .const plots_cnt = 8 main: { + // *BGCOL = 0 lda #0 sta BGCOL + // *FGCOL = 0 sta FGCOL + // *D011 = BMM|DEN|RSEL|3 lda #BMM|DEN|RSEL|3 sta D011 + // *D018 = (byte)(((word)SCREEN/$40)|((word)BITMAP/$400)) lda #SCREEN/$40|BITMAP/$400 sta D018 + // init_screen() jsr init_screen + // init_plot_tables() jsr init_plot_tables __b1: + // while (*RASTER!=$ff) lda #$ff cmp RASTER bne __b1 + // (*BGCOL)++; inc BGCOL + // plots() jsr plots + // (*BGCOL)--; dec BGCOL jmp __b1 } plots: { ldx #0 __b1: + // for(byte i=0; iplotter_x = plot_xhi[x] ldy.z x lda plot_xhi,y sta.z plotter_x+1 lda #<0 sta.z plotter_x + // plotter_y = plot_yhi[y] ldy.z y lda plot_yhi,y sta.z plotter_y+1 lda #<0 sta.z plotter_y + // BITMAP lda #>BITMAP sta plot_xhi,x + // plot_bit[x] = bits tya sta plot_bit,x + // bits = bits/2 tya lsr tay + // if(bits==0) cpy #0 bne __b2 ldy #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -110,16 +139,24 @@ init_plot_tables: { sta.z yoffs+1 tax __b3: + // y&$7 lda #7 sax.z __9 + // yoffs lda.z yoffs+1 + // plot_yhi[y] = >yoffs sta plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __9 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -128,9 +165,11 @@ init_plot_tables: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } init_screen: { @@ -141,6 +180,7 @@ init_screen: { lda #>BITMAP sta.z b+1 __b1: + // for(byte* b = BITMAP; b!=BITMAP+$2000; b++) lda.z b+1 cmp #>BITMAP+$2000 bne __b2 @@ -152,26 +192,32 @@ init_screen: { lda #>SCREEN sta.z c+1 __b3: + // for(byte* c = SCREEN; c!=SCREEN+$400;c++) lda.z c+1 cmp #>SCREEN+$400 bne __b4 lda.z c cmp #= (const byte) bool_const_vars::a -Constant right-side identified [13] (bool~) bool_const_vars::$4 ← (const byte) bool_const_vars::a != (byte) $2c -Constant right-side identified [14] (bool~) bool_const_vars::$5 ← (const byte) bool_const_vars::a >= (byte) -8 -Constant right-side identified [25] (bool~) bool_const_inline::$0 ← (const byte) bool_const_inline::a != (byte) $2c -Constant right-side identified [26] (bool~) bool_const_inline::$1 ← (const byte) bool_const_inline::a >= (byte) -8 -Constant right-side identified [27] (bool~) bool_const_inline::$2 ← (const byte) bool_const_inline::a == (byte) $f -Constant right-side identified [31] (bool~) bool_const_inline::$6 ← (byte) $15 >= (const byte) bool_const_inline::a +Constant right-side identified [9] (bool~) bool_const_vars::$2 ← (byte) $15 >= (const byte) bool_const_vars::a +Constant right-side identified [11] (bool~) bool_const_vars::$4 ← (const byte) bool_const_vars::a != (byte) $2c +Constant right-side identified [12] (bool~) bool_const_vars::$5 ← (const byte) bool_const_vars::a >= (byte) -8 +Constant right-side identified [21] (bool~) bool_const_inline::$0 ← (const byte) bool_const_inline::a != (byte) $2c +Constant right-side identified [22] (bool~) bool_const_inline::$1 ← (const byte) bool_const_inline::a >= (byte) -8 +Constant right-side identified [23] (bool~) bool_const_inline::$2 ← (const byte) bool_const_inline::a == (byte) $f +Constant right-side identified [26] (bool~) bool_const_inline::$6 ← (byte) $15 >= (const byte) bool_const_inline::a Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const bool) bool_const_vars::$0 = bool_const_vars::a==$f Constant (const bool) bool_const_vars::$2 = $15>=bool_const_vars::a @@ -232,8 +232,8 @@ Constant (const bool) bool_const_inline::$2 = bool_const_inline::a==$f Constant (const bool) bool_const_inline::$6 = $15>=bool_const_inline::a Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [4] if((const bool) bool_const_if::b) goto bool_const_if::@1 -if() condition always false - eliminating [21] if((const bool) bool_const_vars::$0) goto bool_const_vars::@6 -if() condition always true - replacing block destination [33] if((const bool) bool_const_inline::$0) goto bool_const_inline::@1 +if() condition always false - eliminating [17] if((const bool) bool_const_vars::$0) goto bool_const_vars::@6 +if() condition always true - replacing block destination [28] if((const bool) bool_const_inline::$0) goto bool_const_inline::@1 if() condition always false - eliminating if(false) goto bool_const_vars::@1 if() condition always true - replacing block destination if((const bool) bool_const_vars::$4) goto bool_const_vars::@5 if() condition always true - replacing block destination if((const bool) bool_const_vars::$2) goto bool_const_vars::@6 diff --git a/src/test/ref/bool-function.asm b/src/test/ref/bool-function.asm index fe53cfc26..70a59cdda 100644 --- a/src/test/ref/bool-function.asm +++ b/src/test/ref/bool-function.asm @@ -6,8 +6,10 @@ main: { .label screen = $400 ldx #0 __b1: + // i&1 txa and #1 + // isSet(i, (i&1)==0) eor #0 beq !+ lda #1 @@ -15,16 +17,21 @@ main: { eor #1 tay jsr isSet + // if( isSet(i, (i&1)==0)) cmp #0 bne __b2 + // screen[i] = ' ' lda #' ' sta screen,x __b3: + // for(byte i: 0..100) inx cpx #$65 bne __b1 + // } rts __b2: + // screen[i] = '*' lda #'*' sta screen,x jmp __b3 @@ -33,13 +40,17 @@ main: { // Returns true if i&8!=0 or b=true // isSet(byte register(X) i, bool register(Y) b) isSet: { + // i&8 txa and #8 + // (i&8)!=0 eor #0 beq !+ lda #1 !: + // b || ((i&8)!=0) sty.z $ff ora.z $ff + // } rts } diff --git a/src/test/ref/bool-function.log b/src/test/ref/bool-function.log index 737e1b7a0..32109c71a 100644 --- a/src/test/ref/bool-function.log +++ b/src/test/ref/bool-function.log @@ -139,12 +139,12 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) isSet::i#1 (byte) isSet::i#0 Identical Phi Values (bool) isSet::b#1 (bool) isSet::b#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$3 [18] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$3 [13] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [16] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [18] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 Adding number conversion cast (unumber) $65 in if((byte) main::i#1!=(number) $65) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $65 diff --git a/src/test/ref/bool-ifs-min.asm b/src/test/ref/bool-ifs-min.asm index 425795bca..ba0ad9b79 100644 --- a/src/test/ref/bool-ifs-min.asm +++ b/src/test/ref/bool-ifs-min.asm @@ -6,17 +6,22 @@ main: { .label screen = $400 ldx #0 __b1: + // i&1 txa and #1 + // if( (i<10) && ((i&1)==0) ) cpx #$a bcs __b2 cmp #0 bne __b2 + // screen[i] = '*' lda #'*' sta screen,x __b2: + // for( char i : 0..20) inx cpx #$15 bne __b1 + // } rts } diff --git a/src/test/ref/bool-ifs-min.log b/src/test/ref/bool-ifs-min.log index 6d1993c1d..7c5e898e0 100644 --- a/src/test/ref/bool-ifs-min.log +++ b/src/test/ref/bool-ifs-min.log @@ -80,15 +80,15 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$5 [11] if((byte) main::i#1!=rangelast(0,$14)) goto main::@1 +Simple Condition (bool~) main::$5 [10] if((byte) main::i#1!=rangelast(0,$14)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Rewriting ! if()-condition to reversed if() [6] (bool~) main::$4 ← ! (bool~) main::$3 Rewriting && if()-condition to two if()s [5] (bool~) main::$3 ← (bool~) main::$0 && (bool~) main::$2 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$14)) goto main::@1 to (number) $15 +Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$14)) goto main::@1 to (number) $15 Adding number conversion cast (unumber) $15 in if((byte) main::i#1!=(number) $15) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $15 diff --git a/src/test/ref/bool-nullpointer-exception.asm b/src/test/ref/bool-nullpointer-exception.asm index 6968867be..a0a6c038f 100644 --- a/src/test/ref/bool-nullpointer-exception.asm +++ b/src/test/ref/bool-nullpointer-exception.asm @@ -8,6 +8,7 @@ main: { b1: lda #0 __b2: + // while(!framedone) cmp #0 bne b1 jmp __b2 diff --git a/src/test/ref/bool-pointer.asm b/src/test/ref/bool-pointer.asm index d278325ad..181316c43 100644 --- a/src/test/ref/bool-pointer.asm +++ b/src/test/ref/bool-pointer.asm @@ -3,17 +3,23 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // bscreen[0] = true lda #1 sta $400 + // bscreen[1] = false lda #0 sta $400+1 + // *bscreen = true lda #1 sta $400+2 + // if(*bscreen) cmp #0 bne __b1 rts __b1: + // *(++bscreen)= true lda #1 sta $400+3 + // } rts } diff --git a/src/test/ref/bool-pointer.log b/src/test/ref/bool-pointer.log index 723418901..9360e6114 100644 --- a/src/test/ref/bool-pointer.log +++ b/src/test/ref/bool-pointer.log @@ -61,7 +61,7 @@ Finalized unsigned number type (byte) 2 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (bool*) main::bscreen#1 = (bool*~) main::$0 (bool*) main::bscreen#3 Successful SSA optimization Pass2AliasElimination -Rewriting ! if()-condition to reversed if() [6] (bool~) main::$1 ← ! *((bool*) main::bscreen#1) +Rewriting ! if()-condition to reversed if() [5] (bool~) main::$1 ← ! *((bool*) main::bscreen#1) Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const bool*) main::bscreen#0 = (bool*) 1024 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/bool-vars.asm b/src/test/ref/bool-vars.asm index e5b1d0b4e..4c67769ad 100644 --- a/src/test/ref/bool-vars.asm +++ b/src/test/ref/bool-vars.asm @@ -3,28 +3,37 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // bool_and() jsr bool_and + // bool_or() jsr bool_or + // bool_not() jsr bool_not + // bool_complex() jsr bool_complex + // } rts } bool_complex: { .label screen = $478 ldy #0 __b1: + // o1 = (i<10) cpy #$a lda #0 rol eor #1 tax + // i&1 tya and #1 + // o2 = (i&1)==0 eor #0 beq !+ lda #1 !: eor #1 + // if( o5 ) cpx #0 bne __b6 jmp __b5 @@ -37,14 +46,18 @@ bool_complex: { cmp #0 bne __b4 __b2: + // screen[i] = '*' lda #'*' sta screen,y __b3: + // for( byte i : 0..20) iny cpy #$15 bne __b1 + // } rts __b4: + // screen[i] = ' ' lda #' ' sta screen,y jmp __b3 @@ -53,20 +66,26 @@ bool_not: { .label screen = $450 ldx #0 __b1: + // i&1 txa and #1 + // if(o3) cpx #$a bcc __b4 cmp #0 beq __b4 + // screen[i] = '*' lda #'*' sta screen,x __b3: + // for( byte i : 0..20) inx cpx #$15 bne __b1 + // } rts __b4: + // screen[i] = ' ' lda #' ' sta screen,x jmp __b3 @@ -75,20 +94,26 @@ bool_or: { .label screen = $428 ldx #0 __b1: + // i&1 txa and #1 + // if(o3) cpx #$a bcc __b2 cmp #0 beq __b2 + // screen[i] = ' ' lda #' ' sta screen,x __b3: + // for( byte i : 0..20) inx cpx #$15 bne __b1 + // } rts __b2: + // screen[i] = '*' lda #'*' sta screen,x jmp __b3 @@ -97,21 +122,27 @@ bool_and: { .label screen = $400 ldx #0 __b1: + // i&1 txa and #1 + // if(o3) cpx #$a bcs __b4 cmp #0 beq __b2 __b4: + // screen[i] = ' ' lda #' ' sta screen,x __b3: + // for( byte i : 0..20) inx cpx #$15 bne __b1 + // } rts __b2: + // screen[i] = '*' lda #'*' sta screen,x jmp __b3 diff --git a/src/test/ref/bool-vars.log b/src/test/ref/bool-vars.log index c6c61888a..5277386a6 100644 --- a/src/test/ref/bool-vars.log +++ b/src/test/ref/bool-vars.log @@ -373,33 +373,33 @@ Alias (byte) bool_or::i#2 = (byte) bool_or::i#5 Alias (byte) bool_not::i#2 = (byte) bool_not::i#5 Alias (byte) bool_complex::i#2 = (byte) bool_complex::i#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) bool_and::$4 [22] if((byte) bool_and::i#1!=rangelast(0,$14)) goto bool_and::@1 -Simple Condition (bool~) bool_or::$4 [41] if((byte) bool_or::i#1!=rangelast(0,$14)) goto bool_or::@1 -Simple Condition (bool~) bool_not::$5 [61] if((byte) bool_not::i#1!=rangelast(0,$14)) goto bool_not::@1 -Simple Condition (bool~) bool_complex::$7 [85] if((byte) bool_complex::i#1!=rangelast(0,$14)) goto bool_complex::@1 +Simple Condition (bool~) bool_and::$4 [16] if((byte) bool_and::i#1!=rangelast(0,$14)) goto bool_and::@1 +Simple Condition (bool~) bool_or::$4 [29] if((byte) bool_or::i#1!=rangelast(0,$14)) goto bool_or::@1 +Simple Condition (bool~) bool_not::$5 [43] if((byte) bool_not::i#1!=rangelast(0,$14)) goto bool_not::@1 +Simple Condition (bool~) bool_complex::$7 [59] if((byte) bool_complex::i#1!=rangelast(0,$14)) goto bool_complex::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s [12] (bool) bool_and::o3#0 ← (bool) bool_and::o1#0 && (bool) bool_and::o2#0 -Rewriting || if()-condition to two if()s [31] (bool) bool_or::o3#0 ← (bool) bool_or::o1#0 || (bool) bool_or::o2#0 -Rewriting ! if()-condition to reversed if() [51] (bool) bool_not::o3#0 ← ! (bool~) bool_not::$3 -Rewriting || if()-condition to two if()s [50] (bool~) bool_not::$3 ← (bool) bool_not::o1#0 || (bool) bool_not::o2#0 -Rewriting || if()-condition to two if()s [75] (bool) bool_complex::o5#0 ← (bool) bool_complex::o3#0 || (bool) bool_complex::o4#0 -Rewriting && if()-condition to two if()s [70] (bool) bool_complex::o3#0 ← (bool) bool_complex::o1#0 && (bool) bool_complex::o2#0 -Rewriting ! if()-condition to reversed if() [73] (bool) bool_complex::o4#0 ← ! (bool~) bool_complex::$4 -Rewriting || if()-condition to two if()s [72] (bool~) bool_complex::$4 ← (bool) bool_complex::o1#0 || (bool) bool_complex::o2#0 +Rewriting && if()-condition to two if()s [10] (bool) bool_and::o3#0 ← (bool) bool_and::o1#0 && (bool) bool_and::o2#0 +Rewriting || if()-condition to two if()s [23] (bool) bool_or::o3#0 ← (bool) bool_or::o1#0 || (bool) bool_or::o2#0 +Rewriting ! if()-condition to reversed if() [37] (bool) bool_not::o3#0 ← ! (bool~) bool_not::$3 +Rewriting || if()-condition to two if()s [36] (bool~) bool_not::$3 ← (bool) bool_not::o1#0 || (bool) bool_not::o2#0 +Rewriting || if()-condition to two if()s [53] (bool) bool_complex::o5#0 ← (bool) bool_complex::o3#0 || (bool) bool_complex::o4#0 +Rewriting && if()-condition to two if()s [50] (bool) bool_complex::o3#0 ← (bool) bool_complex::o1#0 && (bool) bool_complex::o2#0 +Rewriting ! if()-condition to reversed if() [52] (bool) bool_complex::o4#0 ← ! (bool~) bool_complex::$4 +Rewriting || if()-condition to two if()s [51] (bool~) bool_complex::$4 ← (bool) bool_complex::o1#0 || (bool) bool_complex::o2#0 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte) bool_and::i#0 = 0 Constant (const byte) bool_or::i#0 = 0 Constant (const byte) bool_not::i#0 = 0 Constant (const byte) bool_complex::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [20] bool_and::i#1 ← ++ bool_and::i#2 to ++ -Resolved ranged comparison value [22] if(bool_and::i#1!=rangelast(0,$14)) goto bool_and::@1 to (number) $15 -Resolved ranged next value [39] bool_or::i#1 ← ++ bool_or::i#2 to ++ -Resolved ranged comparison value [41] if(bool_or::i#1!=rangelast(0,$14)) goto bool_or::@1 to (number) $15 -Resolved ranged next value [59] bool_not::i#1 ← ++ bool_not::i#2 to ++ -Resolved ranged comparison value [61] if(bool_not::i#1!=rangelast(0,$14)) goto bool_not::@1 to (number) $15 -Resolved ranged next value [83] bool_complex::i#1 ← ++ bool_complex::i#2 to ++ -Resolved ranged comparison value [85] if(bool_complex::i#1!=rangelast(0,$14)) goto bool_complex::@1 to (number) $15 +Resolved ranged next value [14] bool_and::i#1 ← ++ bool_and::i#2 to ++ +Resolved ranged comparison value [16] if(bool_and::i#1!=rangelast(0,$14)) goto bool_and::@1 to (number) $15 +Resolved ranged next value [27] bool_or::i#1 ← ++ bool_or::i#2 to ++ +Resolved ranged comparison value [29] if(bool_or::i#1!=rangelast(0,$14)) goto bool_or::@1 to (number) $15 +Resolved ranged next value [41] bool_not::i#1 ← ++ bool_not::i#2 to ++ +Resolved ranged comparison value [43] if(bool_not::i#1!=rangelast(0,$14)) goto bool_not::@1 to (number) $15 +Resolved ranged next value [57] bool_complex::i#1 ← ++ bool_complex::i#2 to ++ +Resolved ranged comparison value [59] if(bool_complex::i#1!=rangelast(0,$14)) goto bool_complex::@1 to (number) $15 Adding number conversion cast (unumber) $15 in if((byte) bool_and::i#1!=(number) $15) goto bool_and::@1 Adding number conversion cast (unumber) $15 in if((byte) bool_or::i#1!=(number) $15) goto bool_or::@1 Adding number conversion cast (unumber) $15 in if((byte) bool_not::i#1!=(number) $15) goto bool_not::@1 diff --git a/src/test/ref/bresenham.asm b/src/test/ref/bresenham.asm index 3da3a8b7b..7f38bebfd 100644 --- a/src/test/ref/bresenham.asm +++ b/src/test/ref/bresenham.asm @@ -23,19 +23,26 @@ main: { lda #>SCREEN+y0*$28+x0 sta.z cursor+1 __b1: + // *cursor = STAR lda #STAR ldy #0 sta (cursor),y + // x = x + 1 inc.z x + // cursor = cursor + 1 inc.z cursor bne !+ inc.z cursor+1 !: + // e = e+yd txa axs #-[yd] + // if(xd<=e) cpx #xd bcc __b2 + // y = y+1 inc.z y + // cursor = cursor + 40 lda #$28 clc adc.z cursor @@ -43,11 +50,14 @@ main: { bcc !+ inc.z cursor+1 !: + // e = e - xd txa axs #xd __b2: + // while (x<(x1+1)) lda.z x cmp #x1+1 bcc __b1 + // } rts } diff --git a/src/test/ref/bresenham.log b/src/test/ref/bresenham.log index ef857f504..d45060a30 100644 --- a/src/test/ref/bresenham.log +++ b/src/test/ref/bresenham.log @@ -204,12 +204,12 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::yd#1 (byte) main::yd#0 Identical Phi Values (byte) main::xd#1 (byte) main::xd#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$10 [22] if((byte) main::xd#0>(byte) main::e#1) goto main::@2 -Simple Condition (bool~) main::$15 [26] if((byte) main::x#1<(byte~) main::$14) goto main::@1 +Simple Condition (bool~) main::$10 [14] if((byte) main::xd#0>(byte) main::e#1) goto main::@2 +Simple Condition (bool~) main::$15 [18] if((byte) main::x#1<(byte~) main::$14) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte) main::xd#0 ← (const byte) main::x1 - (const byte) main::x0 -Constant right-side identified [2] (byte) main::yd#0 ← (const byte) main::y1 - (const byte) main::y0 -Constant right-side identified [24] (byte~) main::$14 ← (const byte) main::x1 + (byte) 1 +Constant right-side identified [1] (byte) main::yd#0 ← (const byte) main::y1 - (const byte) main::y0 +Constant right-side identified [16] (byte~) main::$14 ← (const byte) main::x1 + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::xd#0 = main::x1-main::x0 Constant (const byte) main::yd#0 = main::y1-main::y0 diff --git a/src/test/ref/bresenhamarr.asm b/src/test/ref/bresenhamarr.asm index 32503f2f4..44000b7c0 100644 --- a/src/test/ref/bresenhamarr.asm +++ b/src/test/ref/bresenhamarr.asm @@ -21,6 +21,7 @@ main: { sta.z idx sta.z idx+1 __b1: + // screen[idx] = STAR lda.z idx clc adc #=(byte) main::e#1) goto main::@2 -Simple Condition (bool~) main::$14 [25] if((byte) main::x#1<(byte~) main::$13) goto main::@1 +Simple Condition (bool~) main::$9 [13] if((byte) main::xd#0>=(byte) main::e#1) goto main::@2 +Simple Condition (bool~) main::$14 [17] if((byte) main::x#1<(byte~) main::$13) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte) main::xd#0 ← (const byte) main::x1 - (const byte) main::x0 -Constant right-side identified [2] (byte) main::yd#0 ← (const byte) main::y1 - (const byte) main::y0 -Constant right-side identified [23] (byte~) main::$13 ← (const byte) main::x1 + (byte) 1 +Constant right-side identified [1] (byte) main::yd#0 ← (const byte) main::y1 - (const byte) main::y0 +Constant right-side identified [15] (byte~) main::$13 ← (const byte) main::x1 + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::xd#0 = main::x1-main::x0 Constant (const byte) main::yd#0 = main::y1-main::y0 @@ -221,11 +221,11 @@ Constant (const byte) main::x#0 = main::x0 Constant (const byte) main::y#0 = main::y0 Constant (const byte) main::$13 = main::x1+1 Successful SSA optimization Pass2ConstantIdentification -De-inlining pointer[w] to *(pointer+w) [12] *((const byte*) main::screen + (word) main::idx#3) ← (const byte) main::STAR +De-inlining pointer[w] to *(pointer+w) [8] *((const byte*) main::screen + (word) main::idx#3) ← (const byte) main::STAR Successful SSA optimization Pass2DeInlineWordDerefIdx Simplifying expression containing zero main::x1 in Simplifying expression containing zero main::y1 in -Simplifying expression containing zero main::$3 in [9] (word) main::idx#0 ← (const byte) main::x#0 + (byte~) main::$3 +Simplifying expression containing zero main::$3 in [6] (word) main::idx#0 ← (const byte) main::x#0 + (byte~) main::$3 Successful SSA optimization PassNSimplifyExpressionWithZero Alias (word) main::idx#0 = (byte~) main::$3 Successful SSA optimization Pass2AliasElimination diff --git a/src/test/ref/c-types.asm b/src/test/ref/c-types.asm index 79546a966..6641ac669 100644 --- a/src/test/ref/c-types.asm +++ b/src/test/ref/c-types.asm @@ -5,11 +5,17 @@ .label print_char_cursor = 6 .label print_line_cursor = $a main: { + // print_cls() jsr print_cls + // testChar() jsr testChar + // testShort() jsr testShort + // testInt() jsr testInt + // testLong() jsr testLong + // } rts } testLong: { @@ -20,11 +26,13 @@ testLong: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("long: ") lda #str sta.z print_str.str+1 jsr print_str + // print_dword(u) lda #u @@ -34,8 +42,10 @@ testLong: { lda #>u>>$10 sta.z print_dword.dw+3 jsr print_dword + // print_char(' ') lda #' ' jsr print_char + // print_sdword(n) lda #n @@ -45,8 +55,10 @@ testLong: { lda #>n>>$10 sta.z print_sdword.dw+3 jsr print_sdword + // print_char(' ') lda #' ' jsr print_char + // print_sdword(s) lda #s @@ -56,7 +68,9 @@ testLong: { lda #>s>>$10 sta.z print_sdword.dw+3 jsr print_sdword + // print_ln() jsr print_ln + // } rts str: .text "long: " .byte 0 @@ -64,6 +78,7 @@ testLong: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -71,6 +86,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursordw) lda.z dw+2 sta.z print_word.w lda.z dw+3 sta.z print_word.w+1 jsr print_word + // print_word(w) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a zero-terminated string @@ -175,15 +212,19 @@ print_byte: { print_str: { .label str = 8 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -202,31 +243,39 @@ testInt: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("int: ") lda #str sta.z print_str.str+1 jsr print_str + // print_word(u) lda #u sta.z print_word.w+1 jsr print_word + // print_char(' ') lda #' ' jsr print_char + // print_sword(n) lda #n sta.z print_sword.w+1 jsr print_sword + // print_char(' ') lda #' ' jsr print_char + // print_sword(s) lda #s sta.z print_sword.w+1 jsr print_sword + // print_ln() jsr print_ln + // } rts str: .text "int: " .byte 0 @@ -235,16 +284,22 @@ testInt: { // print_sword(signed word zp(8) w) print_sword: { .label w = 8 + // if(w<0) lda.z w+1 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_word((word)w) jsr print_word + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // w = -w sec lda #0 sbc.z w @@ -262,31 +317,39 @@ testShort: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("short: ") lda #str sta.z print_str.str+1 jsr print_str + // print_word(u) lda #u sta.z print_word.w+1 jsr print_word + // print_char(' ') lda #' ' jsr print_char + // print_sword(n) lda #n sta.z print_sword.w+1 jsr print_sword + // print_char(' ') lda #' ' jsr print_char + // print_sword(s) lda #s sta.z print_sword.w+1 jsr print_sword + // print_ln() jsr print_ln + // } rts str: .text "short: " .byte 0 @@ -295,6 +358,7 @@ testChar: { .const u = $e .const n = $e .label s = -$e + // print_str("char: ") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -304,20 +368,27 @@ testChar: { lda #>str sta.z print_str.str+1 jsr print_str + // print_byte(u) ldx #u jsr print_byte + // print_char(' ') lda #' ' jsr print_char + // print_byte(n) ldx #n jsr print_byte + // print_char(' ') lda #' ' jsr print_char + // print_sbyte(s) jsr print_sbyte + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 sta.z print_line_cursor+1 jsr print_ln + // } rts str: .text "char: " .byte 0 @@ -325,15 +396,20 @@ testChar: { // Print a signed byte as HEX print_sbyte: { .const b = -testChar.s + // print_char('-') lda #'-' jsr print_char + // print_byte((byte)b) ldx #b jsr print_byte + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -348,17 +424,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp # SCREEN lda #>SCREEN sta DTV_PLANEA_START_MI + // *DTV_PLANEA_START_HI = 0 lda #0 sta DTV_PLANEA_START_HI + // *DTV_PLANEA_STEP = 1 lda #1 sta DTV_PLANEA_STEP + // *DTV_PLANEA_MODULO_LO = 0 lda #0 sta DTV_PLANEA_MODULO_LO + // *DTV_PLANEA_MODULO_HI = 0 sta DTV_PLANEA_MODULO_HI + // *DTV_PLANEB_START_LO = < CHARSET8 // Plane B: CHARSET8 sta DTV_PLANEB_START_LO + // *DTV_PLANEB_START_MI = > CHARSET8 lda #>CHARSET8 sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = 0 lda #0 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 0 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)SCREEN/$4000) // Set VIC Bank bits to output - all others to input lda #3^SCREEN/$4000 sta CIA2_PORT_A + // *VIC_MEMORY = (byte)((((word)SCREEN)&$3fff)/$40) | ((>(((word)SCREEN)&$3fff))/4) // Set VIC Bank // VIC memory lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4 @@ -110,12 +133,15 @@ main: { ldx #0 // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[j] = j txa sta DTV_PALETTE,x + // for(byte j : 0..$f) inx cpx #$10 bne __b1 __b2: + // asm // Stabilize Raster ldx #$ff rff: @@ -153,14 +179,18 @@ main: { inx cpx #8 bne stabilize + // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL + // *BORDERCOL = 0 lda #0 sta BORDERCOL __b3: + // while(*RASTER!=rst) lda #$42 cmp RASTER bne __b3 + // asm nop nop nop @@ -180,17 +210,24 @@ main: { nop nop __b5: + // rst = *RASTER ldx RASTER + // rst&7 txa and #7 + // VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7) ora #VIC_DEN|VIC_ECM|VIC_RSEL + // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7) sta VIC_CONTROL + // rst*$10 txa asl asl asl asl + // *BORDERCOL = rst*$10 sta BORDERCOL + // asm nop nop nop @@ -206,14 +243,18 @@ main: { nop nop nop + // while (rst!=$f2) cpx #$f2 bne __b5 jmp __b2 } // Initialize the different graphics in the memory gfx_init: { + // gfx_init_screen0() jsr gfx_init_screen0 + // gfx_init_plane_charset8() jsr gfx_init_plane_charset8 + // } rts } // Initialize Plane with 8bpp charset @@ -226,8 +267,10 @@ gfx_init_plane_charset8: { .label col = 5 .label cr = 9 .label ch = 6 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 + // *PROCPORT = PROCPORT_RAM_CHARROM lda #PROCPORT_RAM_CHARROM sta PROCPORT lda #0 @@ -245,6 +288,7 @@ gfx_init_plane_charset8: { lda #0 sta.z cr __b2: + // bits = *chargen++ ldy #0 lda (chargen),y sta.z bits @@ -254,8 +298,10 @@ gfx_init_plane_charset8: { !: ldx #0 __b3: + // bits & $80 lda #$80 and.z bits + // if((bits & $80) != 0) cmp #0 beq b1 lda.z col @@ -263,29 +309,39 @@ gfx_init_plane_charset8: { b1: lda #0 __b4: + // *gfxa++ = c ldy #0 sta (gfxa),y + // *gfxa++ = c; inc.z gfxa bne !+ inc.z gfxa+1 !: + // bits = bits*2 asl.z bits + // col++; inc.z col + // for ( byte cp : 0..7) inx cpx #8 bne __b3 + // for ( byte cr : 0..7) inc.z cr lda #8 cmp.z cr bne __b2 + // for(byte ch : $00..$ff) inc.z ch lda.z ch cmp #0 bne __b1 + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts } // Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff) @@ -295,10 +351,13 @@ gfx_init_plane_charset8: { dtvSetCpuBankSegment1: { // Move CPU BANK 1 SEGMENT ($4000-$7fff) .label cpuBank = $ff + // *cpuBank = cpuBankIdx sta cpuBank + // asm .byte $32, $dd lda.z $ff .byte $32, $00 + // } rts } // Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) @@ -315,28 +374,37 @@ gfx_init_screen0: { __b1: ldx #0 __b2: + // cy&$f lda #$f and.z cy + // (cy&$f)*$10 asl asl asl asl sta.z __1 + // cx&$f txa and #$f + // (cy&$f)*$10|(cx&$f) ora.z __1 + // *ch++ = (cy&$f)*$10|(cx&$f) ldy #0 sta (ch),y + // *ch++ = (cy&$f)*$10|(cx&$f); inc.z ch bne !+ inc.z ch+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b2 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy bne __b1 + // } rts } diff --git a/src/test/ref/c64dtv-8bppcharstretch.log b/src/test/ref/c64dtv-8bppcharstretch.log index acefd54ea..4ba80c306 100644 --- a/src/test/ref/c64dtv-8bppcharstretch.log +++ b/src/test/ref/c64dtv-8bppcharstretch.log @@ -662,11 +662,11 @@ Simple Condition (bool~) main::$1 [32] if((byte) main::j#1!=rangelast(0,$f)) got Simple Condition (bool~) main::$2 [40] if(*((const byte*) RASTER)!=(byte) main::rst#0) goto main::@6 Simple Condition (bool~) main::$6 [50] if((byte) main::rst#1!=(byte) $f2) goto main::@12 Simple Condition (bool~) gfx_init_screen0::$4 [68] if((byte) gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 -Simple Condition (bool~) gfx_init_screen0::$5 [72] if((byte) gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 -Simple Condition (bool~) gfx_init_plane_charset8::$4 [95] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -Simple Condition (bool~) gfx_init_plane_charset8::$6 [104] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 -Simple Condition (bool~) gfx_init_plane_charset8::$7 [110] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 -Simple Condition (bool~) gfx_init_plane_charset8::$8 [114] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 +Simple Condition (bool~) gfx_init_screen0::$5 [71] if((byte) gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 +Simple Condition (bool~) gfx_init_plane_charset8::$4 [92] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 +Simple Condition (bool~) gfx_init_plane_charset8::$6 [100] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 +Simple Condition (bool~) gfx_init_plane_charset8::$7 [103] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 +Simple Condition (bool~) gfx_init_plane_charset8::$8 [106] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::j#0 = 0 Constant (const byte) main::rst#0 = $42 @@ -691,14 +691,14 @@ Resolved ranged next value [30] main::j#1 ← ++ main::j#2 to ++ Resolved ranged comparison value [32] if(main::j#1!=rangelast(0,$f)) goto main::@1 to (number) $10 Resolved ranged next value [66] gfx_init_screen0::cx#1 ← ++ gfx_init_screen0::cx#2 to ++ Resolved ranged comparison value [68] if(gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 to (number) $28 -Resolved ranged next value [70] gfx_init_screen0::cy#1 ← ++ gfx_init_screen0::cy#4 to ++ -Resolved ranged comparison value [72] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 to (number) $19 -Resolved ranged next value [102] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_plane_charset8::cp#2 to ++ -Resolved ranged comparison value [104] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8 -Resolved ranged next value [108] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++ -Resolved ranged comparison value [110] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8 -Resolved ranged next value [112] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++ -Resolved ranged comparison value [114] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0 +Resolved ranged next value [69] gfx_init_screen0::cy#1 ← ++ gfx_init_screen0::cy#4 to ++ +Resolved ranged comparison value [71] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 to (number) $19 +Resolved ranged next value [98] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_plane_charset8::cp#2 to ++ +Resolved ranged comparison value [100] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8 +Resolved ranged next value [101] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++ +Resolved ranged comparison value [103] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8 +Resolved ranged next value [104] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++ +Resolved ranged comparison value [106] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0 Simplifying constant evaluating to zero (word)(const byte*) CHARSET8&(word) $3fff in Simplifying constant evaluating to zero <(const byte*) SCREEN in [12] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) SCREEN Simplifying constant evaluating to zero <(const byte*) CHARSET8 in [18] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) CHARSET8 diff --git a/src/test/ref/c64dtv-8bppchunkystretch.asm b/src/test/ref/c64dtv-8bppchunkystretch.asm index e496114ef..5438e055d 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.asm +++ b/src/test/ref/c64dtv-8bppchunkystretch.asm @@ -46,42 +46,59 @@ // Plane with all pixels .label CHUNKY = $8000 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal) // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // gfx_init_chunky() jsr gfx_init_chunky + // *DTV_FEATURE = DTV_FEATURE_ENABLE // Enable DTV extended modes lda #DTV_FEATURE_ENABLE sta DTV_FEATURE + // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_COLORRAM_OFF | DTV_CHUNKY | DTV_BADLINE_OFF // 8BPP Pixel Cell Mode lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_COLORRAM_OFF|DTV_CHUNKY|DTV_BADLINE_OFF sta DTV_CONTROL + // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_MCM | VIC_CSEL lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 + // *DTV_PLANEB_START_LO = < CHUNKY // Plane B: CHUNKY lda #0 sta DTV_PLANEB_START_LO + // *DTV_PLANEB_START_MI = > CHUNKY lda #>CHUNKY sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = 0 lda #0 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 8 lda #8 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 lda #0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHUNKY/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHUNKY/$4000 sta CIA2_PORT_A + // *VIC_MEMORY = (byte)((((word)CHUNKY)&$3fff)/$40) | ((>(((word)CHUNKY)&$3fff))/4) // Set VIC Bank // VIC memory lda #0 @@ -89,12 +106,15 @@ main: { tax // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[j] = j txa sta DTV_PALETTE,x + // for(byte j : 0..$f) inx cpx #$10 bne __b1 __b2: + // asm // Stabilize Raster ldx #$ff rff: @@ -132,14 +152,18 @@ main: { inx cpx #8 bne stabilize + // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3 lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 sta VIC_CONTROL + // *BORDERCOL = 0 lda #0 sta BORDERCOL __b3: + // while(*RASTER!=rst) lda #$42 cmp RASTER bne __b3 + // asm nop nop nop @@ -159,17 +183,24 @@ main: { nop nop __b5: + // rst = *RASTER ldx RASTER + // rst&7 txa and #7 + // VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7) ora #VIC_DEN|VIC_ECM|VIC_RSEL + // *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7) sta VIC_CONTROL + // rst*$10 txa asl asl asl asl + // *BORDERCOL = rst*$10 sta BORDERCOL + // asm nop nop nop @@ -185,6 +216,7 @@ main: { nop nop nop + // while (rst!=$f2) cpx #$f2 bne __b5 jmp __b2 @@ -195,6 +227,7 @@ gfx_init_chunky: { .label gfxb = 5 .label x = 3 .label y = 2 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #CHUNKY/$4000 jsr dtvSetCpuBankSegment1 ldx #($ff&CHUNKY/$4000)+1 @@ -209,20 +242,24 @@ gfx_init_chunky: { sta.z x sta.z x+1 __b2: + // if(gfxb==$8000) lda.z gfxb+1 cmp #>$8000 bne __b3 lda.z gfxb cmp #<$8000 bne __b3 + // dtvSetCpuBankSegment1(gfxbCpuBank++) txa jsr dtvSetCpuBankSegment1 + // dtvSetCpuBankSegment1(gfxbCpuBank++); inx lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 __b3: + // x+y lda.z y clc adc.z x @@ -230,13 +267,17 @@ gfx_init_chunky: { lda #0 adc.z x+1 sta.z __5+1 + // c = (byte)(x+y) lda.z __5 + // *gfxb++ = c ldy #0 sta (gfxb),y + // *gfxb++ = c; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for (word x : 0..319) inc.z x bne !+ inc.z x+1 @@ -247,12 +288,15 @@ gfx_init_chunky: { lda.z x cmp #<$140 bne __b2 + // for(byte y : 0..50) inc.z y lda #$33 cmp.z y bne __b1 + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts } // Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff) @@ -262,9 +306,12 @@ gfx_init_chunky: { dtvSetCpuBankSegment1: { // Move CPU BANK 1 SEGMENT ($4000-$7fff) .label cpuBank = $ff + // *cpuBank = cpuBankIdx sta cpuBank + // asm .byte $32, $dd lda.z $ff .byte $32, $00 + // } rts } diff --git a/src/test/ref/c64dtv-8bppchunkystretch.log b/src/test/ref/c64dtv-8bppchunkystretch.log index 720fd3158..ea52021d9 100644 --- a/src/test/ref/c64dtv-8bppchunkystretch.log +++ b/src/test/ref/c64dtv-8bppchunkystretch.log @@ -428,9 +428,9 @@ Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$1 [26] if((byte) main::j#1!=rangelast(0,$f)) goto main::@1 Simple Condition (bool~) main::$2 [34] if(*((const byte*) RASTER)!=(byte) main::rst#0) goto main::@6 Simple Condition (bool~) main::$6 [44] if((byte) main::rst#1!=(byte) $f2) goto main::@12 -Simple Condition (bool~) gfx_init_chunky::$3 [58] if((byte*) gfx_init_chunky::gfxb#3!=(word) $8000) goto gfx_init_chunky::@3 -Simple Condition (bool~) gfx_init_chunky::$7 [67] if((word) gfx_init_chunky::x#1!=rangelast(0,$13f)) goto gfx_init_chunky::@2 -Simple Condition (bool~) gfx_init_chunky::$8 [77] if((byte) gfx_init_chunky::y#1!=rangelast(0,$32)) goto gfx_init_chunky::@1 +Simple Condition (bool~) gfx_init_chunky::$3 [56] if((byte*) gfx_init_chunky::gfxb#3!=(word) $8000) goto gfx_init_chunky::@3 +Simple Condition (bool~) gfx_init_chunky::$7 [64] if((word) gfx_init_chunky::x#1!=rangelast(0,$13f)) goto gfx_init_chunky::@2 +Simple Condition (bool~) gfx_init_chunky::$8 [71] if((byte) gfx_init_chunky::y#1!=rangelast(0,$32)) goto gfx_init_chunky::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::j#0 = 0 Constant (const byte) main::rst#0 = $42 @@ -447,10 +447,10 @@ if() condition always true - replacing block destination [27] if(true) goto main Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [24] main::j#1 ← ++ main::j#2 to ++ Resolved ranged comparison value [26] if(main::j#1!=rangelast(0,$f)) goto main::@1 to (number) $10 -Resolved ranged next value [65] gfx_init_chunky::x#1 ← ++ gfx_init_chunky::x#2 to ++ -Resolved ranged comparison value [67] if(gfx_init_chunky::x#1!=rangelast(0,$13f)) goto gfx_init_chunky::@2 to (number) $140 -Resolved ranged next value [75] gfx_init_chunky::y#1 ← ++ gfx_init_chunky::y#6 to ++ -Resolved ranged comparison value [77] if(gfx_init_chunky::y#1!=rangelast(0,$32)) goto gfx_init_chunky::@1 to (number) $33 +Resolved ranged next value [62] gfx_init_chunky::x#1 ← ++ gfx_init_chunky::x#2 to ++ +Resolved ranged comparison value [64] if(gfx_init_chunky::x#1!=rangelast(0,$13f)) goto gfx_init_chunky::@2 to (number) $140 +Resolved ranged next value [69] gfx_init_chunky::y#1 ← ++ gfx_init_chunky::y#6 to ++ +Resolved ranged comparison value [71] if(gfx_init_chunky::y#1!=rangelast(0,$32)) goto gfx_init_chunky::@1 to (number) $33 Simplifying constant evaluating to zero <(const byte*) CHUNKY in [12] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) CHUNKY Simplifying constant evaluating to zero (byte)(word)(const byte*) CHUNKY&(word) $3fff/(byte) $40|>(word)(const byte*) CHUNKY&(word) $3fff/(byte) 4 in [20] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) CHUNKY&(word) $3fff/(byte) $40|>(word)(const byte*) CHUNKY&(word) $3fff/(byte) 4 Successful SSA optimization PassNSimplifyConstantZero diff --git a/src/test/ref/c64dtv-blitter-box.asm b/src/test/ref/c64dtv-blitter-box.asm index d25cf80a1..322a7c1f7 100644 --- a/src/test/ref/c64dtv-blitter-box.asm +++ b/src/test/ref/c64dtv-blitter-box.asm @@ -72,76 +72,111 @@ // Controls the ALU operation .label DTV_BLITTER_ALU = $d33e main: { + // *DTV_FEATURE = DTV_FEATURE_ENABLE lda #DTV_FEATURE_ENABLE sta DTV_FEATURE + // *DTV_BLITTER_CONTROL2 = DTV_BLIT_CLEAR_IRQ // Instruct blitter not to continue previous blit lda #DTV_BLIT_CLEAR_IRQ sta DTV_BLITTER_CONTROL2 + // *DTV_BLITTER_SRCA_LO = SRCA lda #>SRCA sta DTV_BLITTER_SRCA_MI + // *DTV_BLITTER_SRCA_HI = 0 lda #0 sta DTV_BLITTER_SRCA_HI + // *DTV_BLITTER_SRCA_MOD_LO = 0 sta DTV_BLITTER_SRCA_MOD_LO + // *DTV_BLITTER_SRCA_MOD_HI = 0 sta DTV_BLITTER_SRCA_MOD_HI + // *DTV_BLITTER_SRCA_LIN_LO = <$100uw sta DTV_BLITTER_SRCA_LIN_LO + // *DTV_BLITTER_SRCA_LIN_HI = >$100uw lda #>$100 sta DTV_BLITTER_SRCA_LIN_HI + // *DTV_BLITTER_SRCA_STEP = 01 lda #1 sta DTV_BLITTER_SRCA_STEP + // *DTV_BLITTER_SRCB_LO = SRCB lda #>SRCB sta DTV_BLITTER_SRCB_MI + // *DTV_BLITTER_SRCB_HI = 0 lda #0 sta DTV_BLITTER_SRCB_HI + // *DTV_BLITTER_SRCB_MOD_LO = 0 sta DTV_BLITTER_SRCB_MOD_LO + // *DTV_BLITTER_SRCB_MOD_HI = 0 sta DTV_BLITTER_SRCB_MOD_HI + // *DTV_BLITTER_SRCB_LIN_LO = <$100uw sta DTV_BLITTER_SRCB_LIN_LO + // *DTV_BLITTER_SRCB_LIN_HI = >$100uw lda #>$100 sta DTV_BLITTER_SRCB_LIN_HI + // *DTV_BLITTER_SRCB_STEP = $00 lda #0 sta DTV_BLITTER_SRCB_STEP + // *DTV_BLITTER_DEST_LO = SCREEN+40+5 lda #>SCREEN+$28+5 sta DTV_BLITTER_DEST_MI + // *DTV_BLITTER_DEST_HI = 0 lda #0 sta DTV_BLITTER_DEST_HI + // *DTV_BLITTER_DEST_MOD_LO = <21uw lda #<$15 sta DTV_BLITTER_DEST_MOD_LO + // *DTV_BLITTER_DEST_MOD_HI = >21uw lda #0 sta DTV_BLITTER_DEST_MOD_HI + // *DTV_BLITTER_DEST_LIN_LO = <19uw lda #<$13 sta DTV_BLITTER_DEST_LIN_LO + // *DTV_BLITTER_DEST_LIN_HI = >19uw lda #0 sta DTV_BLITTER_DEST_LIN_HI + // *DTV_BLITTER_DEST_STEP = $10 lda #$10 sta DTV_BLITTER_DEST_STEP + // *DTV_BLITTER_LEN_LO = <20*10uw // Step 1.0 lda #<$14*$a sta DTV_BLITTER_LEN_LO + // *DTV_BLITTER_LEN_HI = >20*10uw lda #0 sta DTV_BLITTER_LEN_HI + // *DTV_BLITTER_ALU = DTV_BLIT_ADD lda #DTV_BLIT_ADD sta DTV_BLITTER_ALU + // *DTV_BLITTER_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE lda #DTV_BLIT_TRANSPARANCY_NONE sta DTV_BLITTER_TRANSPARANCY + // *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD // Start blitter lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD sta DTV_BLITTER_CONTROL + // *DTV_BLITTER_CONTROL2 = DTV_BLIT_DEST_CONT // Instruct blitter to continue at DEST and restart SRC A/B lda #DTV_BLIT_DEST_CONT sta DTV_BLITTER_CONTROL2 // wait til blitter is ready __b1: + // *DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY lda #DTV_BLIT_STATUS_BUSY and DTV_BLITTER_CONTROL2 + // while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0) cmp #0 bne __b1 + // } rts } SRCA: .text "camelot rules!" diff --git a/src/test/ref/c64dtv-blittermin.asm b/src/test/ref/c64dtv-blittermin.asm index 25129bf14..b6158700f 100644 --- a/src/test/ref/c64dtv-blittermin.asm +++ b/src/test/ref/c64dtv-blittermin.asm @@ -72,79 +72,116 @@ // Controls the ALU operation .label DTV_BLITTER_ALU = $d33e main: { + // *DTV_FEATURE = DTV_FEATURE_ENABLE lda #DTV_FEATURE_ENABLE sta DTV_FEATURE + // *DTV_BLITTER_CONTROL2 = DTV_BLIT_CLEAR_IRQ // Instruct blitter not to continue previous blit lda #DTV_BLIT_CLEAR_IRQ sta DTV_BLITTER_CONTROL2 + // *DTV_BLITTER_SRCA_LO = SRCA lda #>SRCA sta DTV_BLITTER_SRCA_MI + // *DTV_BLITTER_SRCA_HI = 0 lda #0 sta DTV_BLITTER_SRCA_HI + // *DTV_BLITTER_SRCA_MOD_LO = 0 sta DTV_BLITTER_SRCA_MOD_LO + // *DTV_BLITTER_SRCA_MOD_HI = 0 sta DTV_BLITTER_SRCA_MOD_HI + // *DTV_BLITTER_SRCA_LIN_LO = <$100uw sta DTV_BLITTER_SRCA_LIN_LO + // *DTV_BLITTER_SRCA_LIN_HI = >$100uw lda #>$100 sta DTV_BLITTER_SRCA_LIN_HI + // *DTV_BLITTER_SRCA_STEP = $10 lda #$10 sta DTV_BLITTER_SRCA_STEP + // *DTV_BLITTER_SRCB_LO = SRCB lda #>SRCB sta DTV_BLITTER_SRCB_MI + // *DTV_BLITTER_SRCB_HI = 0 lda #0 sta DTV_BLITTER_SRCB_HI + // *DTV_BLITTER_SRCB_MOD_LO = 0 sta DTV_BLITTER_SRCB_MOD_LO + // *DTV_BLITTER_SRCB_MOD_HI = 0 sta DTV_BLITTER_SRCB_MOD_HI + // *DTV_BLITTER_SRCB_LIN_LO = <$100uw sta DTV_BLITTER_SRCB_LIN_LO + // *DTV_BLITTER_SRCB_LIN_HI = >$100uw lda #>$100 sta DTV_BLITTER_SRCB_LIN_HI + // *DTV_BLITTER_SRCB_STEP = $00 lda #0 sta DTV_BLITTER_SRCB_STEP + // *DTV_BLITTER_DEST_LO = SCREEN lda #>SCREEN sta DTV_BLITTER_DEST_MI + // *DTV_BLITTER_DEST_HI = 0 lda #0 sta DTV_BLITTER_DEST_HI + // *DTV_BLITTER_DEST_MOD_LO = 0 sta DTV_BLITTER_DEST_MOD_LO + // *DTV_BLITTER_DEST_MOD_HI = 0 sta DTV_BLITTER_DEST_MOD_HI + // *DTV_BLITTER_DEST_LIN_LO = <$100uw sta DTV_BLITTER_DEST_LIN_LO + // *DTV_BLITTER_DEST_LIN_HI = >$100uw lda #>$100 sta DTV_BLITTER_DEST_LIN_HI + // *DTV_BLITTER_DEST_STEP = $10 lda #$10 sta DTV_BLITTER_DEST_STEP + // *DTV_BLITTER_LEN_LO = SRCA_LEN // Step 1.0 lda #SRCA_LEN sta DTV_BLITTER_LEN_LO + // *DTV_BLITTER_LEN_HI = 0 lda #0 sta DTV_BLITTER_LEN_HI + // *DTV_BLITTER_ALU = DTV_BLIT_ADD lda #DTV_BLIT_ADD sta DTV_BLITTER_ALU + // *DTV_BLITTER_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE lda #DTV_BLIT_TRANSPARANCY_NONE sta DTV_BLITTER_TRANSPARANCY + // *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD // Start blitter lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD sta DTV_BLITTER_CONTROL + // *DTV_BLITTER_CONTROL2 = DTV_BLIT_DEST_CONT // Instruct blitter to continue at DEST and restart SRC A/B lda #DTV_BLIT_DEST_CONT sta DTV_BLITTER_CONTROL2 ldx #0 // wait til blitter is ready __b1: + // *DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY lda #DTV_BLIT_STATUS_BUSY and DTV_BLITTER_CONTROL2 + // while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0) cmp #0 bne __b1 + // *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD // restart lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD sta DTV_BLITTER_CONTROL + // for( byte r: 0..7 ) inx cpx #8 bne __b1 + // } rts } SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' diff --git a/src/test/ref/c64dtv-blittermin.log b/src/test/ref/c64dtv-blittermin.log index eea548bee..c8c363f78 100644 --- a/src/test/ref/c64dtv-blittermin.log +++ b/src/test/ref/c64dtv-blittermin.log @@ -229,12 +229,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::r#2 = (byte) main::r#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$1 [36] if((byte~) main::$0!=(byte) 0) goto main::@2 -Simple Condition (bool~) main::$2 [41] if((byte) main::r#1!=rangelast(0,7)) goto main::@2 +Simple Condition (bool~) main::$2 [40] if((byte) main::r#1!=rangelast(0,7)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::r#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [39] main::r#1 ← ++ main::r#2 to ++ -Resolved ranged comparison value [41] if(main::r#1!=rangelast(0,7)) goto main::@2 to (number) 8 +Resolved ranged next value [38] main::r#1 ← ++ main::r#2 to ++ +Resolved ranged comparison value [40] if(main::r#1!=rangelast(0,7)) goto main::@2 to (number) 8 Simplifying constant evaluating to zero <(word) $100 in [7] *((const byte*) DTV_BLITTER_SRCA_LIN_LO) ← <(word) $100 Simplifying constant evaluating to zero <(word) $100 in [15] *((const byte*) DTV_BLITTER_SRCB_LIN_LO) ← <(word) $100 Simplifying constant evaluating to zero <(const byte*) SCREEN in [18] *((const byte*) DTV_BLITTER_DEST_LO) ← <(const byte*) SCREEN diff --git a/src/test/ref/c64dtv-color.asm b/src/test/ref/c64dtv-color.asm index 8e3fe0cbc..204cce866 100644 --- a/src/test/ref/c64dtv-color.asm +++ b/src/test/ref/c64dtv-color.asm @@ -15,20 +15,26 @@ // Defines colors for the 16 first colors ($00-$0f) .label DTV_PALETTE = $d200 main: { + // asm sei + // *DTV_FEATURE = DTV_FEATURE_ENABLE lda #DTV_FEATURE_ENABLE sta DTV_FEATURE + // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_BORDER_OFF | DTV_BADLINE_OFF lda #DTV_HIGHCOLOR|DTV_BORDER_OFF|DTV_BADLINE_OFF sta DTV_CONTROL __b1: + // while(*RASTER!=$40) lda #$40 cmp RASTER bne __b1 + // *BGCOL = 0 // Create rasterbars lda #0 sta BGCOL ldx #$31 __b3: + // asm nop nop nop @@ -54,16 +60,21 @@ main: { nop nop nop + // (*BGCOL)++; inc BGCOL + // for (byte r : $31..$ff) inx cpx #0 bne __b3 ldx #0 // Rotate palette __b4: + // DTV_PALETTE[c] = palette[c] lda palette,x sta DTV_PALETTE,x + // palette[c]++; inc palette,x + // for(byte c : 0..$f) inx cpx #$10 bne __b4 diff --git a/src/test/ref/c64dtv-gfxexplorer.asm b/src/test/ref/c64dtv-gfxexplorer.asm index f3444e516..dde94c4bb 100644 --- a/src/test/ref/c64dtv-gfxexplorer.asm +++ b/src/test/ref/c64dtv-gfxexplorer.asm @@ -165,27 +165,33 @@ .const FORM_CURSOR_BLINK = $28 // Number of form fields .const form_fields_cnt = $24 - .label print_char_cursor = $b - .label print_line_cursor = $e + .label print_char_cursor = $a + .label print_line_cursor = $d // Keyboard event buffer size. The number of events currently in the event buffer - .label keyboard_events_size = 8 + .label keyboard_events_size = $1e // Counts down to blink for form cursor (it is inversed in the lower half) // Always blink cursor in new field - .label form_cursor_count = $10 + .label form_cursor_count = $f // Current selected field in the form - .label form_field_idx = 9 + .label form_field_idx = 8 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal) // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *DTV_FEATURE = DTV_FEATURE_ENABLE // Enable DTV extended modes lda #DTV_FEATURE_ENABLE sta DTV_FEATURE + // keyboard_init() jsr keyboard_init + // gfx_init() jsr gfx_init lda #0 sta.z form_field_idx @@ -193,29 +199,32 @@ main: { lda #FORM_CURSOR_BLINK/2 sta.z form_cursor_count __b2: + // form_mode() jsr form_mode + // gfx_mode() jsr gfx_mode jmp __b2 } // Change graphics mode to show the selected graphics mode gfx_mode: { .label __20 = 2 - .label __24 = $1a - .label __26 = $1c + .label __24 = $19 + .label __26 = $1b .label __34 = 2 - .label __38 = $16 - .label __40 = $18 + .label __38 = $11 + .label __40 = $17 .label __47 = 6 .label __48 = 6 .label __49 = 6 - .label __50 = $1f - .label __52 = $e - .label __53 = $e + .label __50 = $1d + .label __52 = $d + .label __53 = $d .label plane_a = 2 .label plane_b = 2 .label vic_colors = 6 - .label col = $b - .label cy = $a + .label col = $a + .label cy = 9 + // if(*form_ctrl_line!=0) lda form_ctrl_line cmp #0 beq b1 @@ -224,42 +233,54 @@ gfx_mode: { b1: ldx #0 __b1: + // if(*form_ctrl_borof!=0) lda form_ctrl_borof cmp #0 beq __b2 + // dtv_control = dtv_control | DTV_BORDER_OFF txa ora #DTV_BORDER_OFF tax __b2: + // if(*form_ctrl_hicol!=0) lda form_ctrl_hicol cmp #0 beq __b3 + // dtv_control = dtv_control | DTV_HIGHCOLOR txa ora #DTV_HIGHCOLOR tax __b3: + // if(*form_ctrl_overs!=0) lda form_ctrl_overs cmp #0 beq __b4 + // dtv_control = dtv_control | DTV_OVERSCAN txa ora #DTV_OVERSCAN tax __b4: + // if(*form_ctrl_colof!=0) lda form_ctrl_colof cmp #0 beq __b5 + // dtv_control = dtv_control | DTV_COLORRAM_OFF txa ora #DTV_COLORRAM_OFF tax __b5: + // if(*form_ctrl_chunk!=0) lda form_ctrl_chunk cmp #0 beq __b6 + // dtv_control = dtv_control | DTV_CHUNKY txa ora #DTV_CHUNKY tax __b6: + // *DTV_CONTROL = dtv_control stx DTV_CONTROL + // if(*form_ctrl_ecm!=0) lda form_ctrl_ecm cmp #0 beq b2 @@ -268,14 +289,18 @@ gfx_mode: { b2: ldx #VIC_DEN|VIC_RSEL|3 __b7: + // if(*form_ctrl_bmm!=0) lda form_ctrl_bmm cmp #0 beq __b8 + // vic_control = vic_control | VIC_BMM txa ora #VIC_BMM tax __b8: + // *VIC_CONTROL = vic_control stx VIC_CONTROL + // if(*form_ctrl_mcm!=0) lda form_ctrl_mcm cmp #0 beq b3 @@ -284,16 +309,22 @@ gfx_mode: { b3: lda #VIC_CSEL __b9: + // *VIC_CONTROL2 = vic_control2 sta VIC_CONTROL2 + // *form_a_start_hi*$10 lda form_a_start_hi asl asl asl asl + // plane_a_offs = *form_a_start_hi*$10|*form_a_start_lo ora form_a_start_lo tax + // get_plane(*form_a_pattern) lda form_a_pattern jsr get_plane + // get_plane(*form_a_pattern) + // plane_a = get_plane(*form_a_pattern) + plane_a_offs txa clc adc.z plane_a @@ -307,45 +338,65 @@ gfx_mode: { lda.z plane_a+3 adc #0 sta.z plane_a+3 + // < plane_a lda.z plane_a sta.z __24 lda.z plane_a+1 sta.z __24+1 + // < < plane_a lda.z __24 + // *DTV_PLANEA_START_LO = < < plane_a sta DTV_PLANEA_START_LO + // > < plane_a lda.z __24+1 + // *DTV_PLANEA_START_MI = > < plane_a sta DTV_PLANEA_START_MI + // > plane_a lda.z plane_a+2 sta.z __26 lda.z plane_a+3 sta.z __26+1 + // < > plane_a lda.z __26 + // *DTV_PLANEA_START_HI = < > plane_a sta DTV_PLANEA_START_HI + // *form_a_step_hi*$10 lda form_a_step_hi asl asl asl asl + // *form_a_step_hi*$10|*form_a_step_lo ora form_a_step_lo + // *DTV_PLANEA_STEP = *form_a_step_hi*$10|*form_a_step_lo sta DTV_PLANEA_STEP + // *form_a_mod_hi*$10 lda form_a_mod_hi asl asl asl asl + // *form_a_mod_hi*$10|*form_a_mod_lo ora form_a_mod_lo + // *DTV_PLANEA_MODULO_LO = *form_a_mod_hi*$10|*form_a_mod_lo sta DTV_PLANEA_MODULO_LO + // *DTV_PLANEA_MODULO_HI = 0 lda #0 sta DTV_PLANEA_MODULO_HI + // *form_b_start_hi*$10 lda form_b_start_hi asl asl asl asl + // plane_b_offs = *form_b_start_hi*$10|*form_b_start_lo ora form_b_start_lo tax + // get_plane(*form_b_pattern) lda form_b_pattern jsr get_plane + // get_plane(*form_b_pattern) + // plane_b = get_plane(*form_b_pattern) + plane_b_offs txa clc adc.z plane_b @@ -359,74 +410,105 @@ gfx_mode: { lda.z plane_b+3 adc #0 sta.z plane_b+3 + // < plane_b lda.z plane_b sta.z __38 lda.z plane_b+1 sta.z __38+1 + // < < plane_b lda.z __38 + // *DTV_PLANEB_START_LO = < < plane_b sta DTV_PLANEB_START_LO + // > < plane_b lda.z __38+1 + // *DTV_PLANEB_START_MI = > < plane_b sta DTV_PLANEB_START_MI + // > plane_b lda.z plane_b+2 sta.z __40 lda.z plane_b+3 sta.z __40+1 + // < > plane_b lda.z __40 + // *DTV_PLANEB_START_HI = < > plane_b sta DTV_PLANEB_START_HI + // *form_b_step_hi*$10 lda form_b_step_hi asl asl asl asl + // *form_b_step_hi*$10|*form_b_step_lo ora form_b_step_lo + // *DTV_PLANEB_STEP = *form_b_step_hi*$10|*form_b_step_lo sta DTV_PLANEB_STEP + // *form_b_mod_hi*$10 lda form_b_mod_hi asl asl asl asl + // *form_b_mod_hi*$10|*form_b_mod_lo ora form_b_mod_lo + // *DTV_PLANEB_MODULO_LO = *form_b_mod_hi*$10|*form_b_mod_lo sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 lda #0 sta DTV_PLANEB_MODULO_HI + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)VIC_SCREEN0/$4000) // Set VIC Bank bits to output - all others to input lda #3^VIC_SCREEN0/$4000 sta CIA2_PORT_A + // get_vic_screen(*form_vic_screen) lda form_vic_screen jsr get_vic_screen + // get_vic_screen(*form_vic_screen) + // (word)get_vic_screen(*form_vic_screen)&$3fff lda.z __48 and #<$3fff sta.z __48 lda.z __48+1 and #>$3fff sta.z __48+1 + // ((word)get_vic_screen(*form_vic_screen)&$3fff)/$40 ldy #6 !: lsr.z __49+1 ror.z __49 dey bne !- + // (byte)(((word)get_vic_screen(*form_vic_screen)&$3fff)/$40) lda.z __49 sta.z __50 + // get_vic_charset(*form_vic_gfx) lda form_vic_gfx jsr get_vic_charset + // (word)get_vic_charset(*form_vic_gfx)&$3fff lda.z __53 and #<$3fff sta.z __53 lda.z __53+1 and #>$3fff sta.z __53+1 + // >((word)get_vic_charset(*form_vic_gfx)&$3fff) + // (>((word)get_vic_charset(*form_vic_gfx)&$3fff))/4 lsr lsr + // (byte)(((word)get_vic_screen(*form_vic_screen)&$3fff)/$40) | ((>((word)get_vic_charset(*form_vic_gfx)&$3fff))/4) ora.z __50 + // *VIC_MEMORY = (byte)(((word)get_vic_screen(*form_vic_screen)&$3fff)/$40) | ((>((word)get_vic_charset(*form_vic_gfx)&$3fff))/4) // Set VIC Bank // VIC memory sta VIC_MEMORY + // get_vic_screen(*form_vic_cols) lda form_vic_cols jsr get_vic_screen + // get_vic_screen(*form_vic_cols) + // vic_colors = get_vic_screen(*form_vic_cols) lda #0 sta.z cy lda #>3 lda.z keycode lsr lsr lsr + // row_bits = keyboard_scan_values[keycode>>3] tay lda keyboard_scan_values,y sta.z row_bits + // keycode&7 lda #7 and.z keycode + // row_bits & keyboard_matrix_col_bitmask[keycode&7] tay lda keyboard_matrix_col_bitmask,y and.z row_bits + // } rts } // Read a single row of the keyboard matrix @@ -666,24 +819,32 @@ keyboard_event_pressed: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Get the VIC screen address from the screen index // get_vic_screen(byte register(A) idx) get_vic_screen: { .label return = 6 + // if(idx==0) cmp #0 beq __b1 + // if(idx==1) cmp #1 beq b1 + // if(idx==2) cmp #2 beq b2 + // if(idx==3) cmp #3 beq b3 + // if(idx==4) cmp #4 bne __b1 lda #VIC_SCREEN3 sta.z return+1 + // } rts } // Get the VIC charset/bitmap address from the index // get_vic_charset(byte register(A) idx) get_vic_charset: { - .label return = $e + .label return = $d + // if(idx==0) cmp #0 beq __b1 + // if(idx==1) cmp #1 bne __b1 lda #VIC_CHARSET_ROM sta.z return+1 + // } rts } // Get plane address from a plane index (from the form) // get_plane(byte register(A) idx) get_plane: { .label return = 2 + // if(idx==0) cmp #0 beq b1 + // if(idx==1) cmp #1 bne !b6+ jmp b6 !b6: + // if(idx==2) cmp #2 bne !b7+ jmp b7 !b7: + // if(idx==3) cmp #3 bne !b8+ jmp b8 !b8: + // if(idx==4) cmp #4 bne !b9+ jmp b9 !b9: + // if(idx==5) cmp #5 bne !b10+ jmp b10 !b10: + // if(idx==6) cmp #6 bne !b11+ jmp b11 !b11: + // if(idx==7) cmp #7 bne !b12+ jmp b12 !b12: + // if(idx==8) cmp #8 bne !b13+ jmp b13 !b13: + // if(idx==9) cmp #9 beq b2 + // if(idx==10) cmp #$a beq b3 + // if(idx==11) cmp #$b beq b4 + // if(idx==12) cmp #$c beq b5 + // if(idx==13) cmp #$d bne __b1 lda #PLANE_VERTICAL>>$10 sta.z return+3 + // } rts } // Show the form - and let the user change values form_mode: { - .label preset_current = $11 + .label preset_current = $10 + // print_set_screen(COLS) lda #COLS sta.z print_set_screen.screen+1 jsr print_set_screen + // print_cls() jsr print_cls + // print_str_lines(FORM_COLS) lda #FORM_COLS sta.z print_str_lines.str+1 jsr print_str_lines + // print_set_screen(FORM_SCREEN) lda #FORM_SCREEN sta.z print_set_screen.screen+1 jsr print_set_screen + // print_cls() jsr print_cls + // print_str_lines(FORM_TEXT) lda #FORM_TEXT sta.z print_str_lines.str+1 jsr print_str_lines + // form_set_screen(FORM_SCREEN) jsr form_set_screen + // form_render_values() jsr form_render_values + // render_preset_name(*form_preset) lda form_fields_val jsr render_preset_name + // *DTV_GRAPHICS_VIC_BANK = (byte)((dword)FORM_CHARSET/$10000) // DTV Graphics Bank lda #0 sta DTV_GRAPHICS_VIC_BANK + // *DTV_COLOR_BANK_LO = <((word)(DTV_COLOR_BANK_DEFAULT/$400)) // DTV Color Bank lda #((word)(DTV_COLOR_BANK_DEFAULT/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)FORM_CHARSET/$4000) // Set VIC Bank bits to output - all others to input sta CIA2_PORT_A + // *DTV_CONTROL = 0 // Set VIC Bank // DTV Graphics Mode lda #0 sta DTV_CONTROL + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|3 // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)FORM_SCREEN&$3fff)/$40)|(((word)FORM_CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(FORM_SCREEN&$3fff)/$40|(FORM_CHARSET&$3fff)/$400 sta VIC_MEMORY + // *DTV_PLANEA_START_LO = < FORM_SCREEN // DTV Plane A to FORM_SCREEN also lda #0 sta DTV_PLANEA_START_LO + // *DTV_PLANEA_START_MI = > FORM_SCREEN lda #>FORM_SCREEN sta DTV_PLANEA_START_MI + // *DTV_PLANEA_START_HI = 0 lda #0 sta DTV_PLANEA_START_HI tax // DTV Palette - default __b1: + // DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i] lda DTV_PALETTE_DEFAULT,x sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BGCOL = 0 // Screen colors lda #0 sta BGCOL + // *BORDERCOL = 0 sta BORDERCOL + // preset_current = *form_preset lda form_fields_val sta.z preset_current b1: // Let the user change values in the form __b4: + // while(*RASTER!=$ff) lda #$ff cmp RASTER bne __b4 + // form_control() jsr form_control txa + // if(form_control()!=0) cmp #0 beq __b6 + // } rts __b6: + // if(preset_current!=*form_preset) lda form_fields_val cmp.z preset_current beq b1 + // apply_preset(*form_preset) jsr apply_preset + // preset_current = *form_preset lda form_fields_val sta.z preset_current + // form_render_values() jsr form_render_values + // render_preset_name(*form_preset) lda form_fields_val jsr render_preset_name jmp b1 @@ -1037,26 +1252,37 @@ form_mode: { // render_preset_name(byte register(A) idx) render_preset_name: { .label name = 6 + // if(idx==0) cmp #0 beq b1 + // if(idx==1) cmp #1 beq b4 + // if(idx==2) cmp #2 beq b5 + // if(idx==3) cmp #3 beq b6 + // if(idx==4) cmp #4 beq b7 + // if(idx==5) cmp #5 beq b8 + // if(idx==6) cmp #6 beq b9 + // if(idx==7) cmp #7 beq b10 + // if(idx==8) cmp #8 beq b2 + // if(idx==9) cmp #9 beq b3 + // if(idx==10) cmp #$a beq __b1 b1: @@ -1125,7 +1351,9 @@ render_preset_name: { lda #>name_8 sta.z name+1 __b2: + // print_str_at(name, FORM_SCREEN+40*2+10) jsr print_str_at + // } rts name_1: .text "Standard Charset " .byte 0 @@ -1151,24 +1379,28 @@ render_preset_name: { .byte 0 } // Print a string at a specific screen position -// print_str_at(byte* zp(6) str, byte* zp($b) at) +// print_str_at(byte* zp(6) str, byte* zp($a) at) print_str_at: { - .label at = $b + .label at = $a .label str = 6 lda #FORM_SCREEN+$28*2+$a sta.z at+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(at++) = *(str++) ldy #0 lda (str),y sta (at),y + // *(at++) = *(str++); inc.z at bne !+ inc.z at+1 @@ -1183,15 +1415,20 @@ print_str_at: { form_render_values: { ldx #0 __b1: + // for( byte idx=0; idxform_fields_max[form_field_idx]) ldx.z form_field_idx inc form_fields_val,x ldy.z form_field_idx lda form_fields_max,y cmp form_fields_val,y bcs __b16 + // form_fields_val[form_field_idx] = 0 lda #0 sta form_fields_val,y jmp __b16 __b5: + // if(key_event==KEY_SPACE) cmp #KEY_SPACE bne b1 ldx #$ff rts __b2: + // *field | $80 lda #$80 - ldy.z form_field_ptr.x - ora (form_field_ptr.line),y - sta (form_field_ptr.line),y + ldy #0 + ora (field),y + // *field = *field | $80 + sta (field),y jmp __b3 } // Set the screen to use for the form. @@ -1431,10 +1724,15 @@ form_set_screen: { lda #>FORM_SCREEN sta.z line+1 __b1: + // line lda.z line+1 + // form_line_hi[y] = >line sta form_line_hi,x + // line = line + 40 lda #$28 clc adc.z line @@ -1442,9 +1740,11 @@ form_set_screen: { bcc !+ inc.z line+1 !: + // for(byte y: 0..24) inx cpx #$19 bne __b1 + // } rts } // Print a number of zero-terminated strings, each followed by a newline. @@ -1457,29 +1757,37 @@ print_str_lines: { lda.z print_set_screen.screen+1 sta.z print_char_cursor+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // ch = *(str++) ldy #0 lda (str),y inc.z str bne !+ inc.z str+1 !: + // if(ch) cmp #0 beq __b3 + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: __b3: + // while (ch) cmp #0 bne __b2 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor @@ -1490,6 +1798,7 @@ print_str_lines: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -1497,6 +1806,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursornum sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 lda.z dst cmp.z end bne __b3 + // } rts __b3: + // *dst = c lda #c ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -1550,32 +1868,50 @@ memset: { jmp __b2 } // Set the screen to print on. Also resets current line/char cursor. -// print_set_screen(byte* zp($e) screen) +// print_set_screen(byte* zp($d) screen) print_set_screen: { - .label screen = $e + .label screen = $d + // } rts } // Initialize the different graphics in the memory gfx_init: { + // gfx_init_screen0() jsr gfx_init_screen0 + // gfx_init_screen1() jsr gfx_init_screen1 + // gfx_init_screen2() jsr gfx_init_screen2 + // gfx_init_screen3() jsr gfx_init_screen3 + // gfx_init_screen4() jsr gfx_init_screen4 + // gfx_init_charset() jsr gfx_init_charset + // gfx_init_vic_bitmap() jsr gfx_init_vic_bitmap + // gfx_init_plane_8bppchunky() jsr gfx_init_plane_8bppchunky + // gfx_init_plane_charset8() jsr gfx_init_plane_charset8 + // gfx_init_plane_horisontal() jsr gfx_init_plane_horisontal + // gfx_init_plane_vertical() jsr gfx_init_plane_vertical + // gfx_init_plane_horisontal2() jsr gfx_init_plane_horisontal2 + // gfx_init_plane_vertical2() jsr gfx_init_plane_vertical2 + // gfx_init_plane_blank() jsr gfx_init_plane_blank + // gfx_init_plane_full() jsr gfx_init_plane_full + // } rts } // Initialize Plane with all pixels gfx_init_plane_full: { + // gfx_init_plane_fill(PLANE_FULL, $ff) lda #$ff sta.z gfx_init_plane_fill.fill lda #PLANE_FULL>>$10 sta.z gfx_init_plane_fill.plane_addr+3 jsr gfx_init_plane_fill + // } rts } // Initialize 320*200 1bpp pixel ($2000) plane with identical bytes -// gfx_init_plane_fill(dword zp(2) plane_addr, byte zp(8) fill) +// gfx_init_plane_fill(dword zp(2) plane_addr, byte zp($1e) fill) gfx_init_plane_fill: { - .label __0 = $12 - .label __1 = $16 - .label __4 = $e - .label __5 = $e - .label gfxb = $e - .label by = $10 + .label __0 = $13 + .label __1 = $17 + .label __4 = $d + .label __5 = $d + .label gfxb = $d + .label by = $f .label plane_addr = 2 - .label fill = 8 + .label fill = $1e + // plane_addr*4 lda.z plane_addr asl sta.z __0 @@ -1616,22 +1954,28 @@ gfx_init_plane_fill: { rol.z __0+1 rol.z __0+2 rol.z __0+3 + // >(plane_addr*4) lda.z __0+2 sta.z __1 lda.z __0+3 sta.z __1+1 + // gfxbCpuBank = < >(plane_addr*4) lda.z __1 + // dtvSetCpuBankSegment1(gfxbCpuBank++) jsr dtvSetCpuBankSegment1 + // $3fff sta.z __5+1 + // $4000 + (PLANE_BLANK>>$10 sta.z gfx_init_plane_fill.plane_addr+3 jsr gfx_init_plane_fill + // } rts } // Initialize Plane with Vertical Stripes every 2 pixels gfx_init_plane_vertical2: { + // gfx_init_plane_fill(PLANE_VERTICAL2, %00011011) lda #$1b sta.z gfx_init_plane_fill.fill lda #PLANE_VERTICAL2>>$10 sta.z gfx_init_plane_fill.plane_addr+3 jsr gfx_init_plane_fill + // } rts } // Initialize Plane with Horizontal Stripes every 2 pixels gfx_init_plane_horisontal2: { .const gfxbCpuBank = PLANE_HORISONTAL2/$4000 .label gfxa = 6 - .label ay = 9 + .label ay = 8 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 lda #<$4000 @@ -1721,26 +2079,34 @@ gfx_init_plane_horisontal2: { __b1: ldx #0 __b2: + // ay/2 lda.z ay lsr + // row = (ay/2) & 3 and #3 + // *gfxa++ = row_bitmask[row] tay lda row_bitmask,y ldy #0 sta (gfxa),y + // *gfxa++ = row_bitmask[row]; inc.z gfxa bne !+ inc.z gfxa+1 !: + // for (byte ax : 0..39) inx cpx #$28 bne __b2 + // for(byte ay : 0..199) inc.z ay lda #$c8 cmp.z ay bne __b1 + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts row_bitmask: .byte 0, $55, $aa, $ff } @@ -1748,7 +2114,8 @@ gfx_init_plane_horisontal2: { gfx_init_plane_vertical: { .const gfxbCpuBank = PLANE_VERTICAL/$4000 .label gfxb = 6 - .label by = $11 + .label by = $10 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 lda #0 @@ -1760,29 +2127,36 @@ gfx_init_plane_vertical: { __b1: ldx #0 __b2: + // *gfxb++ = %00001111 lda #$f ldy #0 sta (gfxb),y + // *gfxb++ = %00001111; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for ( byte bx : 0..39) inx cpx #$28 bne __b2 + // for(byte by : 0..199) inc.z by lda #$c8 cmp.z by bne __b1 + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts } // Initialize Plane with Horizontal Stripes gfx_init_plane_horisontal: { .const gfxbCpuBank = PLANE_HORISONTAL/$4000 .label gfxa = 6 - .label ay = $a + .label ay = 9 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 lda #<$4000 @@ -1794,32 +2168,42 @@ gfx_init_plane_horisontal: { __b1: ldx #0 __b2: + // ay&4 lda #4 and.z ay + // if((ay&4)==0) cmp #0 beq __b3 + // *gfxa++ = %11111111 lda #$ff ldy #0 sta (gfxa),y + // *gfxa++ = %11111111; inc.z gfxa bne !+ inc.z gfxa+1 !: __b4: + // for (byte ax : 0..39) inx cpx #$28 bne __b2 + // for(byte ay : 0..199) inc.z ay lda #$c8 cmp.z ay bne __b1 + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts __b3: + // *gfxa++ = %00000000 lda #0 tay sta (gfxa),y + // *gfxa++ = %00000000; inc.z gfxa bne !+ inc.z gfxa+1 @@ -1830,14 +2214,16 @@ gfx_init_plane_horisontal: { gfx_init_plane_charset8: { // 8bpp cells for Plane B (charset) - ROM charset with 256 colors .const gfxbCpuBank = PLANE_CHARSET8/$4000 - .label bits = 8 + .label bits = $1e .label chargen = 6 - .label gfxa = $b - .label col = $10 - .label cr = $d - .label ch = $a + .label gfxa = $a + .label col = $f + .label cr = $c + .label ch = 9 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 + // *PROCPORT = PROCPORT_RAM_CHARROM lda #PROCPORT_RAM_CHARROM sta PROCPORT lda #0 @@ -1855,6 +2241,7 @@ gfx_init_plane_charset8: { lda #0 sta.z cr __b2: + // bits = *chargen++ ldy #0 lda (chargen),y sta.z bits @@ -1864,8 +2251,10 @@ gfx_init_plane_charset8: { !: ldx #0 __b3: + // bits & $80 lda #$80 and.z bits + // if((bits & $80) != 0) cmp #0 beq b1 lda.z col @@ -1873,37 +2262,48 @@ gfx_init_plane_charset8: { b1: lda #0 __b4: + // *gfxa++ = c ldy #0 sta (gfxa),y + // *gfxa++ = c; inc.z gfxa bne !+ inc.z gfxa+1 !: + // bits = bits*2 asl.z bits + // col++; inc.z col + // for ( byte cp : 0..7) inx cpx #8 bne __b3 + // for ( byte cr : 0..7) inc.z cr lda #8 cmp.z cr bne __b2 + // for(byte ch : $00..$ff) inc.z ch lda.z ch cmp #0 bne __b1 + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts } // Initialize 8BPP Chunky Bitmap (contains 8bpp pixels) gfx_init_plane_8bppchunky: { - .label __5 = $18 - .label gfxb = $e - .label x = $b - .label y = $d + .label __5 = $19 + .label gfxb = $d + .label x = $a + .label y = $c + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #PLANE_8BPP_CHUNKY/$4000 jsr dtvSetCpuBankSegment1 ldx #PLANE_8BPP_CHUNKY/$4000+1 @@ -1918,20 +2318,24 @@ gfx_init_plane_8bppchunky: { sta.z x sta.z x+1 __b2: + // if(gfxb==$8000) lda.z gfxb+1 cmp #>$8000 bne __b3 lda.z gfxb cmp #<$8000 bne __b3 + // dtvSetCpuBankSegment1(gfxbCpuBank++) txa jsr dtvSetCpuBankSegment1 + // dtvSetCpuBankSegment1(gfxbCpuBank++); inx lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 __b3: + // x+y lda.z y clc adc.z x @@ -1939,13 +2343,17 @@ gfx_init_plane_8bppchunky: { lda #0 adc.z x+1 sta.z __5+1 + // c = (byte)(x+y) lda.z __5 + // *gfxb++ = c ldy #0 sta (gfxb),y + // *gfxb++ = c; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for (word x : 0..319) inc.z x bne !+ inc.z x+1 @@ -1956,28 +2364,36 @@ gfx_init_plane_8bppchunky: { lda.z x cmp #<$140 bne __b2 + // for(byte y : 0..199) inc.z y lda #$c8 cmp.z y bne __b1 + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // } rts } // Initialize VIC bitmap gfx_init_vic_bitmap: { .const lines_cnt = 9 - .label l = 8 + .label l = $1e + // bitmap_init(VIC_BITMAP) jsr bitmap_init + // bitmap_clear() jsr bitmap_clear lda #0 sta.z l __b1: + // for(byte l=0; l>1 lda.z yd lsr sta.z e __b1: + // bitmap_plot(x,y) ldx.z x ldy.z y jsr bitmap_plot + // x++; inc.z x + // e = e+yd lda.z e clc adc.z yd sta.z e + // if(xd>1 lda.z xd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(yd>1 lda.z yd lsr sta.z e __b1: + // bitmap_plot(x,y) ldx.z x ldy.z y jsr bitmap_plot + // x++; inc.z x + // e = e+yd lda.z e clc adc.z yd sta.z e + // if(xd>1 lda.z xd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // y = y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(ydbitmap lda #>VIC_BITMAP sta bitmap_plot_xhi,x + // bitmap_plot_bit[x] = bits tya sta bitmap_plot_bit,x + // bits = bits>>1 tya lsr tay + // if(bits==0) cpy #0 bne __b2 ldy #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -2321,16 +2819,24 @@ bitmap_init: { sta.z yoffs+1 tax __b3: + // y&$7 lda #7 sax.z __10 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __10 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -2339,15 +2845,18 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } gfx_init_charset: { - .label charset = $e - .label chargen = $b - .label c = $d + .label charset = $d + .label chargen = $a + .label c = $c + // *PROCPORT = $32 lda #$32 sta PROCPORT lda #0 @@ -2363,9 +2872,11 @@ gfx_init_charset: { __b1: ldx #0 __b2: + // *charset++ = *chargen++ ldy #0 lda (chargen),y sta (charset),y + // *charset++ = *chargen++; inc.z charset bne !+ inc.z charset+1 @@ -2374,21 +2885,25 @@ gfx_init_charset: { bne !+ inc.z chargen+1 !: + // for( byte l: 0..7) inx cpx #8 bne __b2 + // for(byte c: 0..$ff) inc.z c lda.z c cmp #0 bne __b1 + // *PROCPORT = $37 lda #$37 sta PROCPORT + // } rts } // Initialize VIC screen 4 - all chars are 00 gfx_init_screen4: { - .label ch = $e - .label cy = $d + .label ch = $d + .label cy = $c lda #0 sta.z cy lda #VIC_SCREEN3 @@ -2428,36 +2948,45 @@ gfx_init_screen3: { __b1: ldx #0 __b2: + // cx&3 txa and #3 + // (cx&3)*$10 asl asl asl asl sta.z __1 + // cy&3 lda #3 and.z cy + // (cx&3)*$10|(cy&3) ora.z __1 + // *ch++ = (cx&3)*$10|(cy&3) ldy #0 sta (ch),y + // *ch++ = (cx&3)*$10|(cy&3); inc.z ch bne !+ inc.z ch+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b2 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy bne __b1 + // } rts } // Initialize VIC screen 2 ( value is %ccccrrrr where cccc is (x+y mod $f) and rrrr is %1111-%cccc) gfx_init_screen2: { - .label col2 = $1f - .label ch = $16 - .label cy = $10 + .label col2 = $1e + .label ch = $11 + .label cy = $f lda #VIC_SCREEN2 @@ -2467,41 +2996,51 @@ gfx_init_screen2: { __b1: ldx #0 __b2: + // cx+cy txa clc adc.z cy + // col = (cx+cy)&$f and #$f tay + // col2 = ($f-col) tya eor #$ff clc adc #$f+1 sta.z col2 + // col*$10 tya asl asl asl asl + // col*$10 | col2 ora.z col2 + // *ch++ = col*$10 | col2 ldy #0 sta (ch),y + // *ch++ = col*$10 | col2; inc.z ch bne !+ inc.z ch+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b2 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy bne __b1 + // } rts } // Initialize VIC screen 1 ( value is %0000cccc where cccc is (x+y mod $f)) gfx_init_screen1: { - .label ch = $16 - .label cy = $11 + .label ch = $11 + .label cy = $10 lda #VIC_SCREEN1 @@ -2511,30 +3050,37 @@ gfx_init_screen1: { __b1: ldx #0 __b2: + // cx+cy txa clc adc.z cy + // (cx+cy)&$f and #$f + // *ch++ = (cx+cy)&$f ldy #0 sta (ch),y + // *ch++ = (cx+cy)&$f; inc.z ch bne !+ inc.z ch+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b2 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy bne __b1 + // } rts } // Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) gfx_init_screen0: { - .label __1 = $1f - .label ch = $16 - .label cy = $11 + .label __1 = $1e + .label ch = $11 + .label cy = $10 lda #VIC_SCREEN0 @@ -2544,39 +3090,51 @@ gfx_init_screen0: { __b1: ldx #0 __b2: + // cy&$f lda #$f and.z cy + // (cy&$f)*$10 asl asl asl asl sta.z __1 + // cx&$f txa and #$f + // (cy&$f)*$10|(cx&$f) ora.z __1 + // *ch++ = (cy&$f)*$10|(cx&$f) ldy #0 sta (ch),y + // *ch++ = (cy&$f)*$10|(cx&$f); inc.z ch bne !+ inc.z ch+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b2 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy bne __b1 + // } rts } // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { + // *CIA1_PORT_A_DDR = $ff // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR + // *CIA1_PORT_B_DDR = $00 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR + // } rts } // Default vallues for the palette diff --git a/src/test/ref/c64dtv-gfxexplorer.cfg b/src/test/ref/c64dtv-gfxexplorer.cfg index c5ebf605b..2e9f40d0c 100644 --- a/src/test/ref/c64dtv-gfxexplorer.cfg +++ b/src/test/ref/c64dtv-gfxexplorer.cfg @@ -674,1132 +674,1135 @@ form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [339] (byte) form_field_ptr::x#0 ← *((const byte*) form_fields_x + (byte) form_field_ptr::field_idx#2) + [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 to:form_field_ptr::@return form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr - [340] return + [341] return to:@return (void()) apply_preset((byte) apply_preset::idx) apply_preset: scope:[apply_preset] from form_mode::@7 - [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 + [342] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 to:apply_preset::@3 apply_preset::@3: scope:[apply_preset] from apply_preset - [342] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 + [343] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 to:apply_preset::@4 apply_preset::@4: scope:[apply_preset] from apply_preset::@3 - [343] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 + [344] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 to:apply_preset::@5 apply_preset::@5: scope:[apply_preset] from apply_preset::@4 - [344] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 + [345] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 to:apply_preset::@6 apply_preset::@6: scope:[apply_preset] from apply_preset::@5 - [345] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 + [346] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 to:apply_preset::@7 apply_preset::@7: scope:[apply_preset] from apply_preset::@6 - [346] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 + [347] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 to:apply_preset::@8 apply_preset::@8: scope:[apply_preset] from apply_preset::@7 - [347] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 + [348] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 to:apply_preset::@9 apply_preset::@9: scope:[apply_preset] from apply_preset::@8 - [348] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 + [349] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 to:apply_preset::@10 apply_preset::@10: scope:[apply_preset] from apply_preset::@9 - [349] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 + [350] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 to:apply_preset::@11 apply_preset::@11: scope:[apply_preset] from apply_preset::@10 - [350] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 + [351] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 to:apply_preset::@12 apply_preset::@12: scope:[apply_preset] from apply_preset::@11 - [351] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 + [352] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 to:apply_preset::@2 apply_preset::@1: scope:[apply_preset] from apply_preset::@12 - [352] phi() + [353] phi() to:apply_preset::@2 apply_preset::@2: scope:[apply_preset] from apply_preset apply_preset::@1 apply_preset::@10 apply_preset::@11 apply_preset::@12 apply_preset::@3 apply_preset::@4 apply_preset::@5 apply_preset::@6 apply_preset::@7 apply_preset::@8 apply_preset::@9 - [353] (byte*) apply_preset::preset#15 ← phi( apply_preset/(const byte*) preset_stdchar apply_preset::@11/(const byte*) preset_sixsfred2 apply_preset::@1/(const byte*) preset_8bpppixelcell apply_preset::@3/(const byte*) preset_ecmchar apply_preset::@4/(const byte*) preset_stdbm apply_preset::@12/(const byte*) preset_stdchar apply_preset::@5/(const byte*) preset_mcbm apply_preset::@6/(const byte*) preset_hi_stdchar apply_preset::@7/(const byte*) preset_hi_ecmchar apply_preset::@8/(const byte*) preset_twoplane apply_preset::@9/(const byte*) preset_chunky apply_preset::@10/(const byte*) preset_sixsfred ) + [354] (byte*) apply_preset::preset#15 ← phi( apply_preset/(const byte*) preset_stdchar apply_preset::@11/(const byte*) preset_sixsfred2 apply_preset::@1/(const byte*) preset_8bpppixelcell apply_preset::@3/(const byte*) preset_ecmchar apply_preset::@4/(const byte*) preset_stdbm apply_preset::@12/(const byte*) preset_stdchar apply_preset::@5/(const byte*) preset_mcbm apply_preset::@6/(const byte*) preset_hi_stdchar apply_preset::@7/(const byte*) preset_hi_ecmchar apply_preset::@8/(const byte*) preset_twoplane apply_preset::@9/(const byte*) preset_chunky apply_preset::@10/(const byte*) preset_sixsfred ) to:apply_preset::@13 apply_preset::@13: scope:[apply_preset] from apply_preset::@14 apply_preset::@2 - [354] (byte) apply_preset::i#2 ← phi( apply_preset::@2/(byte) 0 apply_preset::@14/(byte) apply_preset::i#1 ) - [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 + [355] (byte) apply_preset::i#2 ← phi( apply_preset::@2/(byte) 0 apply_preset::@14/(byte) apply_preset::i#1 ) + [356] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 to:apply_preset::@return apply_preset::@return: scope:[apply_preset] from apply_preset::@13 - [356] return + [357] return to:@return apply_preset::@14: scope:[apply_preset] from apply_preset::@13 - [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) - [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 + [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) + [359] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 to:apply_preset::@13 (byte()) form_control() form_control: scope:[form_control] from form_mode::@5 - [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 - [360] call form_field_ptr + [360] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 + [361] call form_field_ptr + [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 to:form_control::@18 form_control::@18: scope:[form_control] from form_control - [361] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 - [362] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 + [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 + [364] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 + [365] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 to:form_control::@1 form_control::@21: scope:[form_control] from form_control::@18 - [363] phi() + [366] phi() to:form_control::@1 form_control::@1: scope:[form_control] from form_control::@18 form_control::@21 - [364] (signed byte) form_cursor_count#15 ← phi( form_control::@21/(signed byte) form_cursor_count#5 form_control::@18/(const signed byte) FORM_CURSOR_BLINK ) - [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 + [367] (signed byte) form_cursor_count#15 ← phi( form_control::@21/(signed byte) form_cursor_count#5 form_control::@18/(const signed byte) FORM_CURSOR_BLINK ) + [368] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 to:form_control::@7 form_control::@7: scope:[form_control] from form_control::@1 - [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f - [367] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$12 + [369] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f + [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 to:form_control::@3 form_control::@3: scope:[form_control] from form_control::@2 form_control::@7 - [368] phi() - [369] call keyboard_event_scan + [371] phi() + [372] call keyboard_event_scan to:form_control::@19 form_control::@19: scope:[form_control] from form_control::@3 - [370] phi() - [371] call keyboard_event_get - [372] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 + [373] phi() + [374] call keyboard_event_get + [375] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 to:form_control::@20 form_control::@20: scope:[form_control] from form_control::@19 - [373] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 - [374] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 + [376] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 + [377] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 to:form_control::@8 form_control::@8: scope:[form_control] from form_control::@20 - [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f - [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 - [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT - [378] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 + [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f + [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 + [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT + [381] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 to:form_control::@9 form_control::@9: scope:[form_control] from form_control::@8 - [379] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 - [380] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 + [382] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 + [383] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 to:form_control::@14 form_control::@22: scope:[form_control] from form_control::@9 - [381] phi() + [384] phi() to:form_control::@14 form_control::@14: scope:[form_control] from form_control::@13 form_control::@22 form_control::@23 form_control::@9 - [382] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 ) + [385] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 ) to:form_control::@return form_control::@return: scope:[form_control] from form_control::@14 form_control::@16 form_control::@5 form_control::@6 - [383] (byte) form_field_idx#18 ← phi( form_control::@5/(byte) form_field_idx#28 form_control::@14/(byte) form_field_idx#31 form_control::@16/(byte) form_field_idx#28 form_control::@6/(byte) form_field_idx#28 ) - [383] (signed byte) form_cursor_count#16 ← phi( form_control::@5/(signed byte) form_cursor_count#15 form_control::@14/(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 form_control::@16/(signed byte) form_cursor_count#15 form_control::@6/(signed byte) form_cursor_count#15 ) - [383] (byte) form_control::return#2 ← phi( form_control::@5/(byte) $ff form_control::@14/(byte) 0 form_control::@16/(byte) 0 form_control::@6/(byte) 0 ) - [384] return + [386] (byte) form_field_idx#18 ← phi( form_control::@5/(byte) form_field_idx#28 form_control::@14/(byte) form_field_idx#31 form_control::@16/(byte) form_field_idx#28 form_control::@6/(byte) form_field_idx#28 ) + [386] (signed byte) form_cursor_count#16 ← phi( form_control::@5/(signed byte) form_cursor_count#15 form_control::@14/(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 form_control::@16/(signed byte) form_cursor_count#15 form_control::@6/(signed byte) form_cursor_count#15 ) + [386] (byte) form_control::return#2 ← phi( form_control::@5/(byte) $ff form_control::@14/(byte) 0 form_control::@16/(byte) 0 form_control::@6/(byte) 0 ) + [387] return to:@return form_control::@13: scope:[form_control] from form_control::@8 - [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 - [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 + [388] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 + [389] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 to:form_control::@14 form_control::@23: scope:[form_control] from form_control::@13 - [387] phi() + [390] phi() to:form_control::@14 form_control::@4: scope:[form_control] from form_control::@20 - [388] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 + [391] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 to:form_control::@10 form_control::@10: scope:[form_control] from form_control::@4 - [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT - [390] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 + [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT + [393] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 to:form_control::@11 form_control::@11: scope:[form_control] from form_control::@10 - [391] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) - [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 + [394] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) + [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 to:form_control::@12 form_control::@12: scope:[form_control] from form_control::@11 - [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) + [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) to:form_control::@16 form_control::@16: scope:[form_control] from form_control::@11 form_control::@12 form_control::@15 form_control::@17 - [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) + [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) to:form_control::@return form_control::@15: scope:[form_control] from form_control::@10 - [395] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) - [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 + [398] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) + [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 to:form_control::@17 form_control::@17: scope:[form_control] from form_control::@15 - [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 + [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 to:form_control::@16 form_control::@5: scope:[form_control] from form_control::@4 - [398] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 + [401] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 to:form_control::@return form_control::@6: scope:[form_control] from form_control::@5 - [399] phi() + [402] phi() to:form_control::@return form_control::@2: scope:[form_control] from form_control::@1 - [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 - [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 + [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 + [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 to:form_control::@3 (void()) form_set_screen((byte*) form_set_screen::screen) form_set_screen: scope:[form_set_screen] from form_mode::@13 - [402] phi() + [405] phi() to:form_set_screen::@1 form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_screen::@1 - [403] (byte) form_set_screen::y#2 ← phi( form_set_screen/(byte) 0 form_set_screen::@1/(byte) form_set_screen::y#1 ) - [403] (byte*) form_set_screen::line#2 ← phi( form_set_screen/(const byte*) FORM_SCREEN form_set_screen::@1/(byte*) form_set_screen::line#1 ) - [404] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 - [405] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 - [406] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 - [407] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 - [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 - [409] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 - [410] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 + [406] (byte) form_set_screen::y#2 ← phi( form_set_screen/(byte) 0 form_set_screen::@1/(byte) form_set_screen::y#1 ) + [406] (byte*) form_set_screen::line#2 ← phi( form_set_screen/(const byte*) FORM_SCREEN form_set_screen::@1/(byte*) form_set_screen::line#1 ) + [407] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 + [408] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 + [409] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 + [410] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 + [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 + [412] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 + [413] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 to:form_set_screen::@return form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1 - [411] return + [414] return to:@return (void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from form_mode::@12 form_mode::@9 - [412] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte*) FORM_COLS form_mode::@12/(const byte*) FORM_TEXT ) - [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 + [415] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte*) FORM_COLS form_mode::@12/(const byte*) FORM_TEXT ) + [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 to:print_str_lines::@1 print_str_lines::@1: scope:[print_str_lines] from print_str_lines print_str_lines::@6 - [414] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@6/(byte*) print_line_cursor#22 ) - [414] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*) print_char_cursor#67 print_str_lines::@6/(byte*) print_char_cursor#68 ) - [414] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@6/(byte*) print_str_lines::str#0 ) - [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 + [417] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@6/(byte*) print_line_cursor#22 ) + [417] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*) print_char_cursor#67 print_str_lines::@6/(byte*) print_char_cursor#68 ) + [417] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@6/(byte*) print_str_lines::str#0 ) + [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 to:print_str_lines::@return print_str_lines::@return: scope:[print_str_lines] from print_str_lines::@1 - [416] return + [419] return to:@return print_str_lines::@2: scope:[print_str_lines] from print_str_lines::@1 print_str_lines::@3 - [417] (byte*) print_char_cursor#20 ← phi( print_str_lines::@1/(byte*) print_char_cursor#22 print_str_lines::@3/(byte*) print_char_cursor#38 ) - [417] (byte*) print_str_lines::str#4 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#3 print_str_lines::@3/(byte*) print_str_lines::str#0 ) - [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) - [419] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 - [420] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 + [420] (byte*) print_char_cursor#20 ← phi( print_str_lines::@1/(byte*) print_char_cursor#22 print_str_lines::@3/(byte*) print_char_cursor#38 ) + [420] (byte*) print_str_lines::str#4 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#3 print_str_lines::@3/(byte*) print_str_lines::str#0 ) + [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) + [422] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 + [423] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 to:print_str_lines::@4 print_str_lines::@4: scope:[print_str_lines] from print_str_lines::@2 - [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 - [422] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 + [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 + [425] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 to:print_str_lines::@3 print_str_lines::@3: scope:[print_str_lines] from print_str_lines::@2 print_str_lines::@4 - [423] (byte*) print_char_cursor#38 ← phi( print_str_lines::@2/(byte*) print_char_cursor#20 print_str_lines::@4/(byte*) print_char_cursor#1 ) - [424] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 + [426] (byte*) print_char_cursor#38 ← phi( print_str_lines::@2/(byte*) print_char_cursor#20 print_str_lines::@4/(byte*) print_char_cursor#1 ) + [427] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 to:print_str_lines::@5 print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3 - [425] phi() - [426] call print_ln + [428] phi() + [429] call print_ln to:print_str_lines::@6 print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5 - [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 + [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 to:print_str_lines::@1 (void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@5 - [428] phi() + [431] phi() to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 - [429] (byte*) print_line_cursor#21 ← phi( print_ln/(byte*) print_line_cursor#2 print_ln::@1/(byte*) print_line_cursor#22 ) - [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 - [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 + [432] (byte*) print_line_cursor#21 ← phi( print_ln/(byte*) print_line_cursor#2 print_ln::@1/(byte*) print_line_cursor#22 ) + [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 + [434] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 to:print_ln::@return print_ln::@return: scope:[print_ln] from print_ln::@1 - [432] return + [435] return to:@return (void()) print_cls() print_cls: scope:[print_cls] from form_mode::@11 form_mode::@8 - [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 - [434] call memset + [436] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 + [437] call memset to:print_cls::@return print_cls::@return: scope:[print_cls] from print_cls - [435] return + [438] return to:@return (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls - [436] phi() + [439] phi() to:memset::@1 memset::@1: scope:[memset] from memset - [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 - [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 + [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 + [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 to:memset::@2 memset::@2: scope:[memset] from memset::@1 memset::@3 - [439] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 ) - [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 + [442] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 ) + [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 to:memset::@return memset::@return: scope:[memset] from memset::@2 - [441] return + [444] return to:@return memset::@3: scope:[memset] from memset::@2 - [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 - [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 + [446] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 (void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from form_mode form_mode::@10 - [444] (byte*) print_set_screen::screen#2 ← phi( form_mode/(const byte*) COLS form_mode::@10/(const byte*) FORM_SCREEN ) + [447] (byte*) print_set_screen::screen#2 ← phi( form_mode/(const byte*) COLS form_mode::@10/(const byte*) FORM_SCREEN ) to:print_set_screen::@return print_set_screen::@return: scope:[print_set_screen] from print_set_screen - [445] return + [448] return to:@return (void()) gfx_init() gfx_init: scope:[gfx_init] from main::@3 - [446] phi() - [447] call gfx_init_screen0 + [449] phi() + [450] call gfx_init_screen0 to:gfx_init::@1 gfx_init::@1: scope:[gfx_init] from gfx_init - [448] phi() - [449] call gfx_init_screen1 + [451] phi() + [452] call gfx_init_screen1 to:gfx_init::@2 gfx_init::@2: scope:[gfx_init] from gfx_init::@1 - [450] phi() - [451] call gfx_init_screen2 + [453] phi() + [454] call gfx_init_screen2 to:gfx_init::@3 gfx_init::@3: scope:[gfx_init] from gfx_init::@2 - [452] phi() - [453] call gfx_init_screen3 + [455] phi() + [456] call gfx_init_screen3 to:gfx_init::@4 gfx_init::@4: scope:[gfx_init] from gfx_init::@3 - [454] phi() - [455] call gfx_init_screen4 + [457] phi() + [458] call gfx_init_screen4 to:gfx_init::@5 gfx_init::@5: scope:[gfx_init] from gfx_init::@4 - [456] phi() - [457] call gfx_init_charset + [459] phi() + [460] call gfx_init_charset to:gfx_init::@6 gfx_init::@6: scope:[gfx_init] from gfx_init::@5 - [458] phi() - [459] call gfx_init_vic_bitmap + [461] phi() + [462] call gfx_init_vic_bitmap to:gfx_init::@7 gfx_init::@7: scope:[gfx_init] from gfx_init::@6 - [460] phi() - [461] call gfx_init_plane_8bppchunky + [463] phi() + [464] call gfx_init_plane_8bppchunky to:gfx_init::@8 gfx_init::@8: scope:[gfx_init] from gfx_init::@7 - [462] phi() - [463] call gfx_init_plane_charset8 + [465] phi() + [466] call gfx_init_plane_charset8 to:gfx_init::@9 gfx_init::@9: scope:[gfx_init] from gfx_init::@8 - [464] phi() - [465] call gfx_init_plane_horisontal + [467] phi() + [468] call gfx_init_plane_horisontal to:gfx_init::@10 gfx_init::@10: scope:[gfx_init] from gfx_init::@9 - [466] phi() - [467] call gfx_init_plane_vertical + [469] phi() + [470] call gfx_init_plane_vertical to:gfx_init::@11 gfx_init::@11: scope:[gfx_init] from gfx_init::@10 - [468] phi() - [469] call gfx_init_plane_horisontal2 + [471] phi() + [472] call gfx_init_plane_horisontal2 to:gfx_init::@12 gfx_init::@12: scope:[gfx_init] from gfx_init::@11 - [470] phi() - [471] call gfx_init_plane_vertical2 + [473] phi() + [474] call gfx_init_plane_vertical2 to:gfx_init::@13 gfx_init::@13: scope:[gfx_init] from gfx_init::@12 - [472] phi() - [473] call gfx_init_plane_blank + [475] phi() + [476] call gfx_init_plane_blank to:gfx_init::@14 gfx_init::@14: scope:[gfx_init] from gfx_init::@13 - [474] phi() - [475] call gfx_init_plane_full + [477] phi() + [478] call gfx_init_plane_full to:gfx_init::@return gfx_init::@return: scope:[gfx_init] from gfx_init::@14 - [476] return + [479] return to:@return (void()) gfx_init_plane_full() gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 - [477] phi() - [478] call gfx_init_plane_fill + [480] phi() + [481] call gfx_init_plane_fill to:gfx_init_plane_full::@return gfx_init_plane_full::@return: scope:[gfx_init_plane_full] from gfx_init_plane_full - [479] return + [482] return to:@return (void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) gfx_init_plane_fill: scope:[gfx_init_plane_fill] from gfx_init_plane_blank gfx_init_plane_full gfx_init_plane_vertical2 - [480] (byte) gfx_init_plane_fill::fill#6 ← phi( gfx_init_plane_blank/(byte) 0 gfx_init_plane_full/(byte) $ff gfx_init_plane_vertical2/(byte) $1b ) - [480] (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(const dword) PLANE_BLANK gfx_init_plane_full/(const dword) PLANE_FULL gfx_init_plane_vertical2/(const dword) PLANE_VERTICAL2 ) - [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 - [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 - [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 - [484] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 - [485] call dtvSetCpuBankSegment1 + [483] (byte) gfx_init_plane_fill::fill#6 ← phi( gfx_init_plane_blank/(byte) 0 gfx_init_plane_full/(byte) $ff gfx_init_plane_vertical2/(byte) $1b ) + [483] (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(const dword) PLANE_BLANK gfx_init_plane_full/(const dword) PLANE_FULL gfx_init_plane_vertical2/(const dword) PLANE_VERTICAL2 ) + [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 + [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 + [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 + [487] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 + [488] call dtvSetCpuBankSegment1 to:gfx_init_plane_fill::@5 gfx_init_plane_fill::@5: scope:[gfx_init_plane_fill] from gfx_init_plane_fill - [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 - [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff - [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 - [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 + [489] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 + [490] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff + [491] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 + [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 to:gfx_init_plane_fill::@1 gfx_init_plane_fill::@1: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3 gfx_init_plane_fill::@5 - [490] (byte) gfx_init_plane_fill::by#4 ← phi( gfx_init_plane_fill::@3/(byte) gfx_init_plane_fill::by#1 gfx_init_plane_fill::@5/(byte) 0 ) - [490] (byte*) gfx_init_plane_fill::gfxb#3 ← phi( gfx_init_plane_fill::@3/(byte*) gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::@5/(byte*) gfx_init_plane_fill::gfxb#6 ) + [493] (byte) gfx_init_plane_fill::by#4 ← phi( gfx_init_plane_fill::@3/(byte) gfx_init_plane_fill::by#1 gfx_init_plane_fill::@5/(byte) 0 ) + [493] (byte*) gfx_init_plane_fill::gfxb#3 ← phi( gfx_init_plane_fill::@3/(byte*) gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::@5/(byte*) gfx_init_plane_fill::gfxb#6 ) to:gfx_init_plane_fill::@2 gfx_init_plane_fill::@2: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@1 gfx_init_plane_fill::@2 - [491] (byte) gfx_init_plane_fill::bx#2 ← phi( gfx_init_plane_fill::@1/(byte) 0 gfx_init_plane_fill::@2/(byte) gfx_init_plane_fill::bx#1 ) - [491] (byte*) gfx_init_plane_fill::gfxb#2 ← phi( gfx_init_plane_fill::@1/(byte*) gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::@2/(byte*) gfx_init_plane_fill::gfxb#1 ) - [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 - [493] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 - [494] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 - [495] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 + [494] (byte) gfx_init_plane_fill::bx#2 ← phi( gfx_init_plane_fill::@1/(byte) 0 gfx_init_plane_fill::@2/(byte) gfx_init_plane_fill::bx#1 ) + [494] (byte*) gfx_init_plane_fill::gfxb#2 ← phi( gfx_init_plane_fill::@1/(byte*) gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::@2/(byte*) gfx_init_plane_fill::gfxb#1 ) + [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 + [496] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 + [497] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 + [498] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 to:gfx_init_plane_fill::@3 gfx_init_plane_fill::@3: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@2 - [496] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 - [497] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 + [499] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 + [500] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 to:gfx_init_plane_fill::@4 gfx_init_plane_fill::@4: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3 - [498] phi() - [499] call dtvSetCpuBankSegment1 + [501] phi() + [502] call dtvSetCpuBankSegment1 to:gfx_init_plane_fill::@return gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@4 - [500] return + [503] return to:@return (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@7 gfx_init_plane_vertical gfx_init_plane_vertical::@4 - [501] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 ) - [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 + [504] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 ) + [505] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 asm { .byte$32,$dd lda$ff .byte$32,$00 } to:dtvSetCpuBankSegment1::@return dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 - [504] return + [507] return to:@return (void()) gfx_init_plane_blank() gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 - [505] phi() - [506] call gfx_init_plane_fill + [508] phi() + [509] call gfx_init_plane_fill to:gfx_init_plane_blank::@return gfx_init_plane_blank::@return: scope:[gfx_init_plane_blank] from gfx_init_plane_blank - [507] return + [510] return to:@return (void()) gfx_init_plane_vertical2() gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 - [508] phi() - [509] call gfx_init_plane_fill + [511] phi() + [512] call gfx_init_plane_fill to:gfx_init_plane_vertical2::@return gfx_init_plane_vertical2::@return: scope:[gfx_init_plane_vertical2] from gfx_init_plane_vertical2 - [510] return + [513] return to:@return (void()) gfx_init_plane_horisontal2() gfx_init_plane_horisontal2: scope:[gfx_init_plane_horisontal2] from gfx_init::@11 - [511] phi() - [512] call dtvSetCpuBankSegment1 + [514] phi() + [515] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal2::@1 gfx_init_plane_horisontal2::@1: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@3 - [513] (byte*) gfx_init_plane_horisontal2::gfxa#3 ← phi( gfx_init_plane_horisontal2::@3/(byte*) gfx_init_plane_horisontal2::gfxa#1 gfx_init_plane_horisontal2/(byte*)(word) $4000 ) - [513] (byte) gfx_init_plane_horisontal2::ay#4 ← phi( gfx_init_plane_horisontal2::@3/(byte) gfx_init_plane_horisontal2::ay#1 gfx_init_plane_horisontal2/(byte) 0 ) + [516] (byte*) gfx_init_plane_horisontal2::gfxa#3 ← phi( gfx_init_plane_horisontal2::@3/(byte*) gfx_init_plane_horisontal2::gfxa#1 gfx_init_plane_horisontal2/(byte*)(word) $4000 ) + [516] (byte) gfx_init_plane_horisontal2::ay#4 ← phi( gfx_init_plane_horisontal2::@3/(byte) gfx_init_plane_horisontal2::ay#1 gfx_init_plane_horisontal2/(byte) 0 ) to:gfx_init_plane_horisontal2::@2 gfx_init_plane_horisontal2::@2: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@1 gfx_init_plane_horisontal2::@2 - [514] (byte) gfx_init_plane_horisontal2::ax#2 ← phi( gfx_init_plane_horisontal2::@1/(byte) 0 gfx_init_plane_horisontal2::@2/(byte) gfx_init_plane_horisontal2::ax#1 ) - [514] (byte*) gfx_init_plane_horisontal2::gfxa#2 ← phi( gfx_init_plane_horisontal2::@1/(byte*) gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::@2/(byte*) gfx_init_plane_horisontal2::gfxa#1 ) - [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 - [516] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 - [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) - [518] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 - [519] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 - [520] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 + [517] (byte) gfx_init_plane_horisontal2::ax#2 ← phi( gfx_init_plane_horisontal2::@1/(byte) 0 gfx_init_plane_horisontal2::@2/(byte) gfx_init_plane_horisontal2::ax#1 ) + [517] (byte*) gfx_init_plane_horisontal2::gfxa#2 ← phi( gfx_init_plane_horisontal2::@1/(byte*) gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::@2/(byte*) gfx_init_plane_horisontal2::gfxa#1 ) + [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 + [519] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 + [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) + [521] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 + [522] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 + [523] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 to:gfx_init_plane_horisontal2::@3 gfx_init_plane_horisontal2::@3: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@2 - [521] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 - [522] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 + [524] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 + [525] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 to:gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal2::@4: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@3 - [523] phi() - [524] call dtvSetCpuBankSegment1 + [526] phi() + [527] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal2::@return gfx_init_plane_horisontal2::@return: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@4 - [525] return + [528] return to:@return (void()) gfx_init_plane_vertical() gfx_init_plane_vertical: scope:[gfx_init_plane_vertical] from gfx_init::@10 - [526] phi() - [527] call dtvSetCpuBankSegment1 + [529] phi() + [530] call dtvSetCpuBankSegment1 to:gfx_init_plane_vertical::@1 gfx_init_plane_vertical::@1: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical gfx_init_plane_vertical::@3 - [528] (byte) gfx_init_plane_vertical::by#4 ← phi( gfx_init_plane_vertical::@3/(byte) gfx_init_plane_vertical::by#1 gfx_init_plane_vertical/(byte) 0 ) - [528] (byte*) gfx_init_plane_vertical::gfxb#3 ← phi( gfx_init_plane_vertical::@3/(byte*) gfx_init_plane_vertical::gfxb#1 gfx_init_plane_vertical/(byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff ) + [531] (byte) gfx_init_plane_vertical::by#4 ← phi( gfx_init_plane_vertical::@3/(byte) gfx_init_plane_vertical::by#1 gfx_init_plane_vertical/(byte) 0 ) + [531] (byte*) gfx_init_plane_vertical::gfxb#3 ← phi( gfx_init_plane_vertical::@3/(byte*) gfx_init_plane_vertical::gfxb#1 gfx_init_plane_vertical/(byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff ) to:gfx_init_plane_vertical::@2 gfx_init_plane_vertical::@2: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@1 gfx_init_plane_vertical::@2 - [529] (byte) gfx_init_plane_vertical::bx#2 ← phi( gfx_init_plane_vertical::@1/(byte) 0 gfx_init_plane_vertical::@2/(byte) gfx_init_plane_vertical::bx#1 ) - [529] (byte*) gfx_init_plane_vertical::gfxb#2 ← phi( gfx_init_plane_vertical::@1/(byte*) gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::@2/(byte*) gfx_init_plane_vertical::gfxb#1 ) - [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f - [531] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 - [532] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 - [533] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 + [532] (byte) gfx_init_plane_vertical::bx#2 ← phi( gfx_init_plane_vertical::@1/(byte) 0 gfx_init_plane_vertical::@2/(byte) gfx_init_plane_vertical::bx#1 ) + [532] (byte*) gfx_init_plane_vertical::gfxb#2 ← phi( gfx_init_plane_vertical::@1/(byte*) gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::@2/(byte*) gfx_init_plane_vertical::gfxb#1 ) + [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f + [534] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 + [535] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 + [536] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 to:gfx_init_plane_vertical::@3 gfx_init_plane_vertical::@3: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@2 - [534] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 - [535] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 + [537] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 + [538] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 to:gfx_init_plane_vertical::@4 gfx_init_plane_vertical::@4: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@3 - [536] phi() - [537] call dtvSetCpuBankSegment1 + [539] phi() + [540] call dtvSetCpuBankSegment1 to:gfx_init_plane_vertical::@return gfx_init_plane_vertical::@return: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@4 - [538] return + [541] return to:@return (void()) gfx_init_plane_horisontal() gfx_init_plane_horisontal: scope:[gfx_init_plane_horisontal] from gfx_init::@9 - [539] phi() - [540] call dtvSetCpuBankSegment1 + [542] phi() + [543] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal::@1 gfx_init_plane_horisontal::@1: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal gfx_init_plane_horisontal::@6 - [541] (byte*) gfx_init_plane_horisontal::gfxa#6 ← phi( gfx_init_plane_horisontal::@6/(byte*) gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal/(byte*)(word) $4000 ) - [541] (byte) gfx_init_plane_horisontal::ay#4 ← phi( gfx_init_plane_horisontal::@6/(byte) gfx_init_plane_horisontal::ay#1 gfx_init_plane_horisontal/(byte) 0 ) + [544] (byte*) gfx_init_plane_horisontal::gfxa#6 ← phi( gfx_init_plane_horisontal::@6/(byte*) gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal/(byte*)(word) $4000 ) + [544] (byte) gfx_init_plane_horisontal::ay#4 ← phi( gfx_init_plane_horisontal::@6/(byte) gfx_init_plane_horisontal::ay#1 gfx_init_plane_horisontal/(byte) 0 ) to:gfx_init_plane_horisontal::@2 gfx_init_plane_horisontal::@2: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@1 gfx_init_plane_horisontal::@4 - [542] (byte) gfx_init_plane_horisontal::ax#2 ← phi( gfx_init_plane_horisontal::@1/(byte) 0 gfx_init_plane_horisontal::@4/(byte) gfx_init_plane_horisontal::ax#1 ) - [542] (byte*) gfx_init_plane_horisontal::gfxa#3 ← phi( gfx_init_plane_horisontal::@1/(byte*) gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::@4/(byte*) gfx_init_plane_horisontal::gfxa#7 ) - [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 - [544] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 + [545] (byte) gfx_init_plane_horisontal::ax#2 ← phi( gfx_init_plane_horisontal::@1/(byte) 0 gfx_init_plane_horisontal::@4/(byte) gfx_init_plane_horisontal::ax#1 ) + [545] (byte*) gfx_init_plane_horisontal::gfxa#3 ← phi( gfx_init_plane_horisontal::@1/(byte*) gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::@4/(byte*) gfx_init_plane_horisontal::gfxa#7 ) + [546] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 + [547] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 to:gfx_init_plane_horisontal::@5 gfx_init_plane_horisontal::@5: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@2 - [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff - [546] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 + [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff + [549] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 to:gfx_init_plane_horisontal::@4 gfx_init_plane_horisontal::@4: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 - [547] (byte*) gfx_init_plane_horisontal::gfxa#7 ← phi( gfx_init_plane_horisontal::@3/(byte*) gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::@5/(byte*) gfx_init_plane_horisontal::gfxa#2 ) - [548] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 - [549] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 + [550] (byte*) gfx_init_plane_horisontal::gfxa#7 ← phi( gfx_init_plane_horisontal::@3/(byte*) gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::@5/(byte*) gfx_init_plane_horisontal::gfxa#2 ) + [551] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 + [552] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 to:gfx_init_plane_horisontal::@6 gfx_init_plane_horisontal::@6: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@4 - [550] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 - [551] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 + [553] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 + [554] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 to:gfx_init_plane_horisontal::@7 gfx_init_plane_horisontal::@7: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@6 - [552] phi() - [553] call dtvSetCpuBankSegment1 + [555] phi() + [556] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal::@return gfx_init_plane_horisontal::@return: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@7 - [554] return + [557] return to:@return gfx_init_plane_horisontal::@3: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@2 - [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 - [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 + [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 + [559] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 to:gfx_init_plane_horisontal::@4 (void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@8 - [557] phi() - [558] call dtvSetCpuBankSegment1 + [560] phi() + [561] call dtvSetCpuBankSegment1 to:gfx_init_plane_charset8::@9 gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8 - [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM + [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM to:gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9 - [560] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) 0 ) - [560] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte) 0 ) - [560] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/(byte*)(word) $4000 ) - [560] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN ) + [563] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) 0 ) + [563] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte) 0 ) + [563] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/(byte*)(word) $4000 ) + [563] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN ) to:gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6 - [561] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) - [561] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 ) - [561] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 ) - [561] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 ) - [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) - [563] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 + [564] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) + [564] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 ) + [564] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 ) + [564] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 ) + [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) + [566] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 to:gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4 - [564] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) - [564] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) - [564] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) - [564] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) - [565] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 - [566] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 + [567] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) + [567] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) + [567] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) + [567] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) + [568] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 + [569] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 to:gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 - [567] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 + [570] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 to:gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 - [568] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) 0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#3 ) - [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 - [570] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 - [571] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 - [572] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 - [573] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 - [574] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 + [571] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) 0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#3 ) + [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 + [573] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 + [574] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 + [575] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 + [576] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 + [577] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 to:gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4 - [575] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 - [576] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 + [578] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 + [579] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 to:gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6 - [577] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 - [578] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 + [580] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 + [581] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 to:gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 - [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO - [580] call dtvSetCpuBankSegment1 + [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO + [583] call dtvSetCpuBankSegment1 to:gfx_init_plane_charset8::@return gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 - [581] return + [584] return to:@return (void()) gfx_init_plane_8bppchunky() gfx_init_plane_8bppchunky: scope:[gfx_init_plane_8bppchunky] from gfx_init::@7 - [582] phi() - [583] call dtvSetCpuBankSegment1 + [585] phi() + [586] call dtvSetCpuBankSegment1 to:gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@1: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@5 - [584] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky/++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 ) - [584] (byte) gfx_init_plane_8bppchunky::y#6 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::y#1 gfx_init_plane_8bppchunky/(byte) 0 ) - [584] (byte*) gfx_init_plane_8bppchunky::gfxb#5 ← phi( gfx_init_plane_8bppchunky::@5/(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky/(byte*) 16384 ) + [587] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky/++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 ) + [587] (byte) gfx_init_plane_8bppchunky::y#6 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::y#1 gfx_init_plane_8bppchunky/(byte) 0 ) + [587] (byte*) gfx_init_plane_8bppchunky::gfxb#5 ← phi( gfx_init_plane_8bppchunky::@5/(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky/(byte*) 16384 ) to:gfx_init_plane_8bppchunky::@2 gfx_init_plane_8bppchunky::@2: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@3 - [585] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ) - [585] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(word) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 ) - [585] (byte*) gfx_init_plane_8bppchunky::gfxb#3 ← phi( gfx_init_plane_8bppchunky::@1/(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::@3/(byte*) gfx_init_plane_8bppchunky::gfxb#1 ) - [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 + [588] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ) + [588] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(word) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 ) + [588] (byte*) gfx_init_plane_8bppchunky::gfxb#3 ← phi( gfx_init_plane_8bppchunky::@1/(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::@3/(byte*) gfx_init_plane_8bppchunky::gfxb#1 ) + [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 to:gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@4: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@2 - [587] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 - [588] call dtvSetCpuBankSegment1 + [590] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 + [591] call dtvSetCpuBankSegment1 to:gfx_init_plane_8bppchunky::@7 gfx_init_plane_8bppchunky::@7: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@4 - [589] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 + [592] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 to:gfx_init_plane_8bppchunky::@3 gfx_init_plane_8bppchunky::@3: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@2 gfx_init_plane_8bppchunky::@7 - [590] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ← phi( gfx_init_plane_8bppchunky::@2/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::@7/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ) - [590] (byte*) gfx_init_plane_8bppchunky::gfxb#4 ← phi( gfx_init_plane_8bppchunky::@2/(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::@7/(byte*) 16384 ) - [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 - [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 - [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 - [594] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 - [595] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 - [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 + [593] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ← phi( gfx_init_plane_8bppchunky::@2/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::@7/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ) + [593] (byte*) gfx_init_plane_8bppchunky::gfxb#4 ← phi( gfx_init_plane_8bppchunky::@2/(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::@7/(byte*) 16384 ) + [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 + [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 + [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 + [597] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 + [598] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 + [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 to:gfx_init_plane_8bppchunky::@5 gfx_init_plane_8bppchunky::@5: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@3 - [597] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 - [598] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 + [600] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 + [601] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 to:gfx_init_plane_8bppchunky::@6 gfx_init_plane_8bppchunky::@6: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@5 - [599] phi() - [600] call dtvSetCpuBankSegment1 + [602] phi() + [603] call dtvSetCpuBankSegment1 to:gfx_init_plane_8bppchunky::@return gfx_init_plane_8bppchunky::@return: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@6 - [601] return + [604] return to:@return (void()) gfx_init_vic_bitmap() gfx_init_vic_bitmap: scope:[gfx_init_vic_bitmap] from gfx_init::@6 - [602] phi() - [603] call bitmap_init + [605] phi() + [606] call bitmap_init to:gfx_init_vic_bitmap::@3 gfx_init_vic_bitmap::@3: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap - [604] phi() - [605] call bitmap_clear + [607] phi() + [608] call bitmap_clear to:gfx_init_vic_bitmap::@1 gfx_init_vic_bitmap::@1: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@3 gfx_init_vic_bitmap::@4 - [606] (byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@3/(byte) 0 gfx_init_vic_bitmap::@4/(byte) gfx_init_vic_bitmap::l#1 ) - [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 + [609] (byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@3/(byte) 0 gfx_init_vic_bitmap::@4/(byte) gfx_init_vic_bitmap::l#1 ) + [610] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 to:gfx_init_vic_bitmap::@return gfx_init_vic_bitmap::@return: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1 - [608] return + [611] return to:@return gfx_init_vic_bitmap::@2: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1 - [609] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) - [610] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) - [611] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) - [612] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) - [613] call bitmap_line + [612] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) + [613] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) + [614] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) + [615] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) + [616] call bitmap_line to:gfx_init_vic_bitmap::@4 gfx_init_vic_bitmap::@4: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@2 - [614] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 + [617] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 to:gfx_init_vic_bitmap::@1 (void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from gfx_init_vic_bitmap::@2 - [615] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 + [618] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 bitmap_line::@2: scope:[bitmap_line] from bitmap_line - [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 - [617] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 + [619] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 + [620] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 to:bitmap_line::@3 bitmap_line::@3: scope:[bitmap_line] from bitmap_line::@2 - [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 - [619] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 + [621] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 + [622] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 to:bitmap_line::@4 bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@3 - [620] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 - [621] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 - [622] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 - [623] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 - [624] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 - [625] call bitmap_line_ydxi + [623] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 + [624] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 + [625] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 + [626] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 + [627] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 + [628] call bitmap_line_ydxi to:bitmap_line::@return bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@12 bitmap_line::@13 bitmap_line::@14 bitmap_line::@4 bitmap_line::@6 bitmap_line::@8 bitmap_line::@9 - [626] return + [629] return to:@return bitmap_line::@8: scope:[bitmap_line] from bitmap_line::@3 - [627] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 - [628] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 - [629] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 - [630] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 - [631] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 - [632] call bitmap_line_xdyi + [630] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 + [631] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 + [632] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 + [633] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 + [634] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 + [635] call bitmap_line_xdyi to:bitmap_line::@return bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@2 - [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 - [634] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 + [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 + [637] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 to:bitmap_line::@10 bitmap_line::@10: scope:[bitmap_line] from bitmap_line::@7 - [635] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 - [636] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 - [637] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 - [638] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 - [639] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 - [640] call bitmap_line_ydxd + [638] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 + [639] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 + [640] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 + [641] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 + [642] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 + [643] call bitmap_line_ydxd to:bitmap_line::@return bitmap_line::@9: scope:[bitmap_line] from bitmap_line::@7 - [641] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 - [642] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 - [643] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 - [644] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 - [645] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 - [646] call bitmap_line_xdyd + [644] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 + [645] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 + [646] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 + [647] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 + [648] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 + [649] call bitmap_line_xdyd to:bitmap_line::@return bitmap_line::@1: scope:[bitmap_line] from bitmap_line - [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 - [648] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 + [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 + [651] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 to:bitmap_line::@5 bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@1 - [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 - [650] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 + [652] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 + [653] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 to:bitmap_line::@6 bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 - [651] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 - [652] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 - [653] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 - [654] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 - [655] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 - [656] call bitmap_line_ydxd + [654] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 + [655] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 + [656] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 + [657] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 + [658] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 + [659] call bitmap_line_ydxd to:bitmap_line::@return bitmap_line::@12: scope:[bitmap_line] from bitmap_line::@5 - [657] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 - [658] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 - [659] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 - [660] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 - [661] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 - [662] call bitmap_line_xdyd + [660] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 + [661] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 + [662] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 + [663] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 + [664] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 + [665] call bitmap_line_xdyd to:bitmap_line::@return bitmap_line::@11: scope:[bitmap_line] from bitmap_line::@1 - [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 - [664] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 + [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 + [667] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 to:bitmap_line::@14 bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@11 - [665] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 - [666] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 - [667] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 - [668] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 - [669] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 - [670] call bitmap_line_ydxi + [668] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 + [669] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 + [670] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 + [671] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 + [672] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 + [673] call bitmap_line_ydxi to:bitmap_line::@return bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 - [671] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 - [672] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 - [673] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 - [674] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 - [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 - [676] call bitmap_line_xdyi + [674] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 + [675] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 + [676] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 + [677] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 + [678] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 + [679] call bitmap_line_xdyi to:bitmap_line::@return (void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 - [677] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) - [677] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) - [677] (byte) bitmap_line_xdyi::y#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::y#0 bitmap_line::@13/(byte) bitmap_line_xdyi::y#1 ) - [677] (byte) bitmap_line_xdyi::x#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x#1 ) - [677] (byte) bitmap_line_xdyi::yd#2 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::yd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::yd#1 ) - [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 + [680] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) + [680] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) + [680] (byte) bitmap_line_xdyi::y#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::y#0 bitmap_line::@13/(byte) bitmap_line_xdyi::y#1 ) + [680] (byte) bitmap_line_xdyi::x#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x#1 ) + [680] (byte) bitmap_line_xdyi::yd#2 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::yd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::yd#1 ) + [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 to:bitmap_line_xdyi::@1 bitmap_line_xdyi::@1: scope:[bitmap_line_xdyi] from bitmap_line_xdyi bitmap_line_xdyi::@2 - [679] (byte) bitmap_line_xdyi::e#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::e#0 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::e#6 ) - [679] (byte) bitmap_line_xdyi::y#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::y#5 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::y#6 ) - [679] (byte) bitmap_line_xdyi::x#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::x#6 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::x#2 ) - [680] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 - [681] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 - [682] call bitmap_plot + [682] (byte) bitmap_line_xdyi::e#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::e#0 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::e#6 ) + [682] (byte) bitmap_line_xdyi::y#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::y#5 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::y#6 ) + [682] (byte) bitmap_line_xdyi::x#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::x#6 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::x#2 ) + [683] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 + [684] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 + [685] call bitmap_plot to:bitmap_line_xdyi::@4 bitmap_line_xdyi::@4: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@1 - [683] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 - [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 - [685] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 + [686] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 + [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 + [688] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 to:bitmap_line_xdyi::@3 bitmap_line_xdyi::@3: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@4 - [686] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 - [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 + [689] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 + [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 to:bitmap_line_xdyi::@2 bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 - [688] (byte) bitmap_line_xdyi::e#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::e#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::e#1 ) - [688] (byte) bitmap_line_xdyi::y#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::y#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::y#3 ) - [689] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 - [690] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 + [691] (byte) bitmap_line_xdyi::e#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::e#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::e#1 ) + [691] (byte) bitmap_line_xdyi::y#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::y#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::y#3 ) + [692] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 + [693] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 to:bitmap_line_xdyi::@return bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 - [691] return + [694] return to:@return (void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 - [692] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) - [692] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) - [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) - [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) - [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 - [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) - [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 + [695] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) + [695] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) + [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) + [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) + [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 + [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) + [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 to:bitmap_plot::@return bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot - [698] return + [701] return to:@return (void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 - [699] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) - [699] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) - [699] (byte) bitmap_line_ydxi::y#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y#0 ) - [699] (byte) bitmap_line_ydxi::x#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::x#1 bitmap_line::@4/(byte) bitmap_line_ydxi::x#0 ) - [699] (byte) bitmap_line_ydxi::xd#2 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::xd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::xd#0 ) - [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 + [702] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) + [702] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) + [702] (byte) bitmap_line_ydxi::y#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y#0 ) + [702] (byte) bitmap_line_ydxi::x#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::x#1 bitmap_line::@4/(byte) bitmap_line_ydxi::x#0 ) + [702] (byte) bitmap_line_ydxi::xd#2 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::xd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::xd#0 ) + [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 to:bitmap_line_ydxi::@1 bitmap_line_ydxi::@1: scope:[bitmap_line_ydxi] from bitmap_line_ydxi bitmap_line_ydxi::@2 - [701] (byte) bitmap_line_ydxi::e#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::e#0 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::e#6 ) - [701] (byte) bitmap_line_ydxi::y#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::y#6 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::y#2 ) - [701] (byte) bitmap_line_ydxi::x#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::x#5 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::x#6 ) - [702] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 - [703] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 - [704] call bitmap_plot + [704] (byte) bitmap_line_ydxi::e#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::e#0 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::e#6 ) + [704] (byte) bitmap_line_ydxi::y#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::y#6 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::y#2 ) + [704] (byte) bitmap_line_ydxi::x#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::x#5 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::x#6 ) + [705] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 + [706] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 + [707] call bitmap_plot to:bitmap_line_ydxi::@4 bitmap_line_ydxi::@4: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@1 - [705] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 - [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 - [707] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 + [708] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 + [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 + [710] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 to:bitmap_line_ydxi::@3 bitmap_line_ydxi::@3: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@4 - [708] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 - [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 + [711] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 + [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 to:bitmap_line_ydxi::@2 bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 - [710] (byte) bitmap_line_ydxi::e#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::e#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::e#1 ) - [710] (byte) bitmap_line_ydxi::x#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::x#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::x#3 ) - [711] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 - [712] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 + [713] (byte) bitmap_line_ydxi::e#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::e#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::e#1 ) + [713] (byte) bitmap_line_ydxi::x#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::x#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::x#3 ) + [714] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 + [715] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 to:bitmap_line_ydxi::@return bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 - [713] return + [716] return to:@return (void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 - [714] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) - [714] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) - [714] (byte) bitmap_line_xdyd::y#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::y#0 bitmap_line::@12/(byte) bitmap_line_xdyd::y#1 ) - [714] (byte) bitmap_line_xdyd::x#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x#1 ) - [714] (byte) bitmap_line_xdyd::yd#2 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::yd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::yd#1 ) - [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 + [717] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) + [717] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) + [717] (byte) bitmap_line_xdyd::y#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::y#0 bitmap_line::@12/(byte) bitmap_line_xdyd::y#1 ) + [717] (byte) bitmap_line_xdyd::x#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x#1 ) + [717] (byte) bitmap_line_xdyd::yd#2 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::yd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::yd#1 ) + [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 to:bitmap_line_xdyd::@1 bitmap_line_xdyd::@1: scope:[bitmap_line_xdyd] from bitmap_line_xdyd bitmap_line_xdyd::@2 - [716] (byte) bitmap_line_xdyd::e#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::e#0 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::e#6 ) - [716] (byte) bitmap_line_xdyd::y#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::y#5 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::y#6 ) - [716] (byte) bitmap_line_xdyd::x#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::x#6 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::x#2 ) - [717] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 - [718] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 - [719] call bitmap_plot + [719] (byte) bitmap_line_xdyd::e#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::e#0 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::e#6 ) + [719] (byte) bitmap_line_xdyd::y#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::y#5 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::y#6 ) + [719] (byte) bitmap_line_xdyd::x#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::x#6 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::x#2 ) + [720] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 + [721] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 + [722] call bitmap_plot to:bitmap_line_xdyd::@4 bitmap_line_xdyd::@4: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@1 - [720] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 - [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 - [722] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 + [723] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 + [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 + [725] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 to:bitmap_line_xdyd::@3 bitmap_line_xdyd::@3: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@4 - [723] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 - [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 + [726] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 + [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 to:bitmap_line_xdyd::@2 bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 - [725] (byte) bitmap_line_xdyd::e#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::e#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::e#1 ) - [725] (byte) bitmap_line_xdyd::y#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::y#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::y#3 ) - [726] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 - [727] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 + [728] (byte) bitmap_line_xdyd::e#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::e#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::e#1 ) + [728] (byte) bitmap_line_xdyd::y#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::y#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::y#3 ) + [729] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 + [730] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 to:bitmap_line_xdyd::@return bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 - [728] return + [731] return to:@return (void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 - [729] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) - [729] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) - [729] (byte) bitmap_line_ydxd::y#7 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y#1 ) - [729] (byte) bitmap_line_ydxd::x#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::x#0 bitmap_line::@6/(byte) bitmap_line_ydxd::x#1 ) - [729] (byte) bitmap_line_ydxd::xd#2 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::xd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::xd#1 ) - [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 + [732] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) + [732] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) + [732] (byte) bitmap_line_ydxd::y#7 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y#1 ) + [732] (byte) bitmap_line_ydxd::x#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::x#0 bitmap_line::@6/(byte) bitmap_line_ydxd::x#1 ) + [732] (byte) bitmap_line_ydxd::xd#2 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::xd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::xd#1 ) + [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 to:bitmap_line_ydxd::@1 bitmap_line_ydxd::@1: scope:[bitmap_line_ydxd] from bitmap_line_ydxd bitmap_line_ydxd::@2 - [731] (byte) bitmap_line_ydxd::e#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::e#0 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::e#6 ) - [731] (byte) bitmap_line_ydxd::y#2 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::y#7 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::y#3 ) - [731] (byte) bitmap_line_ydxd::x#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::x#5 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::x#6 ) - [732] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 - [733] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 - [734] call bitmap_plot + [734] (byte) bitmap_line_ydxd::e#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::e#0 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::e#6 ) + [734] (byte) bitmap_line_ydxd::y#2 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::y#7 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::y#3 ) + [734] (byte) bitmap_line_ydxd::x#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::x#5 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::x#6 ) + [735] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 + [736] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 + [737] call bitmap_plot to:bitmap_line_ydxd::@4 bitmap_line_ydxd::@4: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@1 - [735] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 - [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 - [737] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 + [738] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 + [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 + [740] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 to:bitmap_line_ydxd::@3 bitmap_line_ydxd::@3: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@4 - [738] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 - [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 + [741] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 + [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 to:bitmap_line_ydxd::@2 bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 - [740] (byte) bitmap_line_ydxd::e#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::e#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::e#1 ) - [740] (byte) bitmap_line_ydxd::x#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::x#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::x#3 ) - [741] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 - [742] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 + [743] (byte) bitmap_line_ydxd::e#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::e#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::e#1 ) + [743] (byte) bitmap_line_ydxd::x#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::x#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::x#3 ) + [744] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 + [745] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 to:bitmap_line_ydxd::@return bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 - [743] return + [746] return to:@return (void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from gfx_init_vic_bitmap::@3 - [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) - [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 + [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) + [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 to:bitmap_clear::@1 bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3 - [746] (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) 0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) - [746] (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#5 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#1 ) + [749] (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) 0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) + [749] (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#5 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#1 ) to:bitmap_clear::@2 bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2 - [747] (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) 0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) - [747] (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) - [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 - [749] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 - [750] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 - [751] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 + [750] (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) 0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) + [750] (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) + [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 + [752] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 + [753] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 + [754] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 to:bitmap_clear::@3 bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 - [752] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 - [753] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 + [755] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 + [756] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 to:bitmap_clear::@return bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 - [754] return + [757] return to:@return (void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from gfx_init_vic_bitmap - [755] phi() + [758] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [756] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [756] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 - [758] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 - [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP - [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [761] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [762] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [759] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [759] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [760] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 + [761] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 + [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP + [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [764] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [765] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [763] phi() + [766] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [764] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [765] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [766] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [767] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [768] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [769] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [767] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(byte*) 0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [767] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 - [769] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 - [770] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 - [771] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 - [772] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 - [773] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 - [774] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 + [770] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(byte*) 0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [770] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [771] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 + [772] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 + [773] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 + [774] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 + [775] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 + [776] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 + [777] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [776] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [777] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [778] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [779] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [780] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [781] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [779] return + [782] return to:@return (void()) gfx_init_charset() gfx_init_charset: scope:[gfx_init_charset] from gfx_init::@5 - [780] *((const byte*) PROCPORT) ← (byte) $32 + [783] *((const byte*) PROCPORT) ← (byte) $32 to:gfx_init_charset::@1 gfx_init_charset::@1: scope:[gfx_init_charset] from gfx_init_charset gfx_init_charset::@3 - [781] (byte) gfx_init_charset::c#4 ← phi( gfx_init_charset/(byte) 0 gfx_init_charset::@3/(byte) gfx_init_charset::c#1 ) - [781] (byte*) gfx_init_charset::charset#3 ← phi( gfx_init_charset/(const byte*) VIC_CHARSET_ROM gfx_init_charset::@3/(byte*) gfx_init_charset::charset#1 ) - [781] (byte*) gfx_init_charset::chargen#3 ← phi( gfx_init_charset/(const byte*) CHARGEN gfx_init_charset::@3/(byte*) gfx_init_charset::chargen#1 ) + [784] (byte) gfx_init_charset::c#4 ← phi( gfx_init_charset/(byte) 0 gfx_init_charset::@3/(byte) gfx_init_charset::c#1 ) + [784] (byte*) gfx_init_charset::charset#3 ← phi( gfx_init_charset/(const byte*) VIC_CHARSET_ROM gfx_init_charset::@3/(byte*) gfx_init_charset::charset#1 ) + [784] (byte*) gfx_init_charset::chargen#3 ← phi( gfx_init_charset/(const byte*) CHARGEN gfx_init_charset::@3/(byte*) gfx_init_charset::chargen#1 ) to:gfx_init_charset::@2 gfx_init_charset::@2: scope:[gfx_init_charset] from gfx_init_charset::@1 gfx_init_charset::@2 - [782] (byte) gfx_init_charset::l#2 ← phi( gfx_init_charset::@1/(byte) 0 gfx_init_charset::@2/(byte) gfx_init_charset::l#1 ) - [782] (byte*) gfx_init_charset::charset#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::charset#3 gfx_init_charset::@2/(byte*) gfx_init_charset::charset#1 ) - [782] (byte*) gfx_init_charset::chargen#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::chargen#3 gfx_init_charset::@2/(byte*) gfx_init_charset::chargen#1 ) - [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) - [784] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 - [785] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 - [786] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 - [787] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 + [785] (byte) gfx_init_charset::l#2 ← phi( gfx_init_charset::@1/(byte) 0 gfx_init_charset::@2/(byte) gfx_init_charset::l#1 ) + [785] (byte*) gfx_init_charset::charset#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::charset#3 gfx_init_charset::@2/(byte*) gfx_init_charset::charset#1 ) + [785] (byte*) gfx_init_charset::chargen#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::chargen#3 gfx_init_charset::@2/(byte*) gfx_init_charset::chargen#1 ) + [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) + [787] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 + [788] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 + [789] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 + [790] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 to:gfx_init_charset::@3 gfx_init_charset::@3: scope:[gfx_init_charset] from gfx_init_charset::@2 - [788] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 - [789] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 + [791] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 + [792] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 to:gfx_init_charset::@4 gfx_init_charset::@4: scope:[gfx_init_charset] from gfx_init_charset::@3 - [790] *((const byte*) PROCPORT) ← (byte) $37 + [793] *((const byte*) PROCPORT) ← (byte) $37 to:gfx_init_charset::@return gfx_init_charset::@return: scope:[gfx_init_charset] from gfx_init_charset::@4 - [791] return + [794] return to:@return (void()) gfx_init_screen4() gfx_init_screen4: scope:[gfx_init_screen4] from gfx_init::@4 - [792] phi() + [795] phi() to:gfx_init_screen4::@1 gfx_init_screen4::@1: scope:[gfx_init_screen4] from gfx_init_screen4 gfx_init_screen4::@3 - [793] (byte) gfx_init_screen4::cy#4 ← phi( gfx_init_screen4/(byte) 0 gfx_init_screen4::@3/(byte) gfx_init_screen4::cy#1 ) - [793] (byte*) gfx_init_screen4::ch#3 ← phi( gfx_init_screen4/(const byte*) VIC_SCREEN4 gfx_init_screen4::@3/(byte*) gfx_init_screen4::ch#1 ) + [796] (byte) gfx_init_screen4::cy#4 ← phi( gfx_init_screen4/(byte) 0 gfx_init_screen4::@3/(byte) gfx_init_screen4::cy#1 ) + [796] (byte*) gfx_init_screen4::ch#3 ← phi( gfx_init_screen4/(const byte*) VIC_SCREEN4 gfx_init_screen4::@3/(byte*) gfx_init_screen4::ch#1 ) to:gfx_init_screen4::@2 gfx_init_screen4::@2: scope:[gfx_init_screen4] from gfx_init_screen4::@1 gfx_init_screen4::@2 - [794] (byte) gfx_init_screen4::cx#2 ← phi( gfx_init_screen4::@1/(byte) 0 gfx_init_screen4::@2/(byte) gfx_init_screen4::cx#1 ) - [794] (byte*) gfx_init_screen4::ch#2 ← phi( gfx_init_screen4::@1/(byte*) gfx_init_screen4::ch#3 gfx_init_screen4::@2/(byte*) gfx_init_screen4::ch#1 ) - [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 - [796] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 - [797] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 - [798] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 + [797] (byte) gfx_init_screen4::cx#2 ← phi( gfx_init_screen4::@1/(byte) 0 gfx_init_screen4::@2/(byte) gfx_init_screen4::cx#1 ) + [797] (byte*) gfx_init_screen4::ch#2 ← phi( gfx_init_screen4::@1/(byte*) gfx_init_screen4::ch#3 gfx_init_screen4::@2/(byte*) gfx_init_screen4::ch#1 ) + [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 + [799] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 + [800] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 + [801] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 to:gfx_init_screen4::@3 gfx_init_screen4::@3: scope:[gfx_init_screen4] from gfx_init_screen4::@2 - [799] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 - [800] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 + [802] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 + [803] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 to:gfx_init_screen4::@return gfx_init_screen4::@return: scope:[gfx_init_screen4] from gfx_init_screen4::@3 - [801] return + [804] return to:@return (void()) gfx_init_screen3() gfx_init_screen3: scope:[gfx_init_screen3] from gfx_init::@3 - [802] phi() + [805] phi() to:gfx_init_screen3::@1 gfx_init_screen3::@1: scope:[gfx_init_screen3] from gfx_init_screen3 gfx_init_screen3::@3 - [803] (byte*) gfx_init_screen3::ch#3 ← phi( gfx_init_screen3/(const byte*) VIC_SCREEN3 gfx_init_screen3::@3/(byte*) gfx_init_screen3::ch#1 ) - [803] (byte) gfx_init_screen3::cy#4 ← phi( gfx_init_screen3/(byte) 0 gfx_init_screen3::@3/(byte) gfx_init_screen3::cy#1 ) + [806] (byte*) gfx_init_screen3::ch#3 ← phi( gfx_init_screen3/(const byte*) VIC_SCREEN3 gfx_init_screen3::@3/(byte*) gfx_init_screen3::ch#1 ) + [806] (byte) gfx_init_screen3::cy#4 ← phi( gfx_init_screen3/(byte) 0 gfx_init_screen3::@3/(byte) gfx_init_screen3::cy#1 ) to:gfx_init_screen3::@2 gfx_init_screen3::@2: scope:[gfx_init_screen3] from gfx_init_screen3::@1 gfx_init_screen3::@2 - [804] (byte*) gfx_init_screen3::ch#2 ← phi( gfx_init_screen3::@1/(byte*) gfx_init_screen3::ch#3 gfx_init_screen3::@2/(byte*) gfx_init_screen3::ch#1 ) - [804] (byte) gfx_init_screen3::cx#2 ← phi( gfx_init_screen3::@1/(byte) 0 gfx_init_screen3::@2/(byte) gfx_init_screen3::cx#1 ) - [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 - [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 - [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 - [808] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 - [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 - [810] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 - [811] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 - [812] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 + [807] (byte*) gfx_init_screen3::ch#2 ← phi( gfx_init_screen3::@1/(byte*) gfx_init_screen3::ch#3 gfx_init_screen3::@2/(byte*) gfx_init_screen3::ch#1 ) + [807] (byte) gfx_init_screen3::cx#2 ← phi( gfx_init_screen3::@1/(byte) 0 gfx_init_screen3::@2/(byte) gfx_init_screen3::cx#1 ) + [808] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 + [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 + [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 + [811] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 + [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 + [813] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 + [814] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 + [815] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 to:gfx_init_screen3::@3 gfx_init_screen3::@3: scope:[gfx_init_screen3] from gfx_init_screen3::@2 - [813] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 - [814] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 + [816] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 + [817] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 to:gfx_init_screen3::@return gfx_init_screen3::@return: scope:[gfx_init_screen3] from gfx_init_screen3::@3 - [815] return + [818] return to:@return (void()) gfx_init_screen2() gfx_init_screen2: scope:[gfx_init_screen2] from gfx_init::@2 - [816] phi() + [819] phi() to:gfx_init_screen2::@1 gfx_init_screen2::@1: scope:[gfx_init_screen2] from gfx_init_screen2 gfx_init_screen2::@3 - [817] (byte*) gfx_init_screen2::ch#3 ← phi( gfx_init_screen2/(const byte*) VIC_SCREEN2 gfx_init_screen2::@3/(byte*) gfx_init_screen2::ch#1 ) - [817] (byte) gfx_init_screen2::cy#4 ← phi( gfx_init_screen2/(byte) 0 gfx_init_screen2::@3/(byte) gfx_init_screen2::cy#1 ) + [820] (byte*) gfx_init_screen2::ch#3 ← phi( gfx_init_screen2/(const byte*) VIC_SCREEN2 gfx_init_screen2::@3/(byte*) gfx_init_screen2::ch#1 ) + [820] (byte) gfx_init_screen2::cy#4 ← phi( gfx_init_screen2/(byte) 0 gfx_init_screen2::@3/(byte) gfx_init_screen2::cy#1 ) to:gfx_init_screen2::@2 gfx_init_screen2::@2: scope:[gfx_init_screen2] from gfx_init_screen2::@1 gfx_init_screen2::@2 - [818] (byte*) gfx_init_screen2::ch#2 ← phi( gfx_init_screen2::@1/(byte*) gfx_init_screen2::ch#3 gfx_init_screen2::@2/(byte*) gfx_init_screen2::ch#1 ) - [818] (byte) gfx_init_screen2::cx#2 ← phi( gfx_init_screen2::@1/(byte) 0 gfx_init_screen2::@2/(byte) gfx_init_screen2::cx#1 ) - [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 - [820] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f - [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 - [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 - [823] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 - [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 - [825] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 - [826] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 - [827] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 + [821] (byte*) gfx_init_screen2::ch#2 ← phi( gfx_init_screen2::@1/(byte*) gfx_init_screen2::ch#3 gfx_init_screen2::@2/(byte*) gfx_init_screen2::ch#1 ) + [821] (byte) gfx_init_screen2::cx#2 ← phi( gfx_init_screen2::@1/(byte) 0 gfx_init_screen2::@2/(byte) gfx_init_screen2::cx#1 ) + [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 + [823] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f + [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 + [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 + [826] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 + [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 + [828] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 + [829] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 + [830] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 to:gfx_init_screen2::@3 gfx_init_screen2::@3: scope:[gfx_init_screen2] from gfx_init_screen2::@2 - [828] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 - [829] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 + [831] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 + [832] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 to:gfx_init_screen2::@return gfx_init_screen2::@return: scope:[gfx_init_screen2] from gfx_init_screen2::@3 - [830] return + [833] return to:@return (void()) gfx_init_screen1() gfx_init_screen1: scope:[gfx_init_screen1] from gfx_init::@1 - [831] phi() + [834] phi() to:gfx_init_screen1::@1 gfx_init_screen1::@1: scope:[gfx_init_screen1] from gfx_init_screen1 gfx_init_screen1::@3 - [832] (byte*) gfx_init_screen1::ch#3 ← phi( gfx_init_screen1/(const byte*) VIC_SCREEN1 gfx_init_screen1::@3/(byte*) gfx_init_screen1::ch#1 ) - [832] (byte) gfx_init_screen1::cy#4 ← phi( gfx_init_screen1/(byte) 0 gfx_init_screen1::@3/(byte) gfx_init_screen1::cy#1 ) + [835] (byte*) gfx_init_screen1::ch#3 ← phi( gfx_init_screen1/(const byte*) VIC_SCREEN1 gfx_init_screen1::@3/(byte*) gfx_init_screen1::ch#1 ) + [835] (byte) gfx_init_screen1::cy#4 ← phi( gfx_init_screen1/(byte) 0 gfx_init_screen1::@3/(byte) gfx_init_screen1::cy#1 ) to:gfx_init_screen1::@2 gfx_init_screen1::@2: scope:[gfx_init_screen1] from gfx_init_screen1::@1 gfx_init_screen1::@2 - [833] (byte*) gfx_init_screen1::ch#2 ← phi( gfx_init_screen1::@1/(byte*) gfx_init_screen1::ch#3 gfx_init_screen1::@2/(byte*) gfx_init_screen1::ch#1 ) - [833] (byte) gfx_init_screen1::cx#2 ← phi( gfx_init_screen1::@1/(byte) 0 gfx_init_screen1::@2/(byte) gfx_init_screen1::cx#1 ) - [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 - [835] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f - [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 - [837] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 - [838] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 - [839] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 + [836] (byte*) gfx_init_screen1::ch#2 ← phi( gfx_init_screen1::@1/(byte*) gfx_init_screen1::ch#3 gfx_init_screen1::@2/(byte*) gfx_init_screen1::ch#1 ) + [836] (byte) gfx_init_screen1::cx#2 ← phi( gfx_init_screen1::@1/(byte) 0 gfx_init_screen1::@2/(byte) gfx_init_screen1::cx#1 ) + [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 + [838] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f + [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 + [840] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 + [841] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 + [842] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 to:gfx_init_screen1::@3 gfx_init_screen1::@3: scope:[gfx_init_screen1] from gfx_init_screen1::@2 - [840] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 - [841] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 + [843] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 + [844] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 to:gfx_init_screen1::@return gfx_init_screen1::@return: scope:[gfx_init_screen1] from gfx_init_screen1::@3 - [842] return + [845] return to:@return (void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init - [843] phi() + [846] phi() to:gfx_init_screen0::@1 gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3 - [844] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) VIC_SCREEN0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 ) - [844] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) + [847] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) VIC_SCREEN0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 ) + [847] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) to:gfx_init_screen0::@2 gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2 - [845] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) - [845] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) - [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f - [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 - [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f - [849] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 - [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 - [851] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 - [852] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 - [853] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 + [848] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) + [848] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) + [849] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f + [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 + [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f + [852] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 + [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 + [854] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 + [855] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 + [856] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 to:gfx_init_screen0::@3 gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 - [854] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 - [855] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 + [857] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 + [858] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 to:gfx_init_screen0::@return gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 - [856] return + [859] return to:@return (void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main - [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff - [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 + [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff + [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 to:keyboard_init::@return keyboard_init::@return: scope:[keyboard_init] from keyboard_init - [859] return + [862] return to:@return diff --git a/src/test/ref/c64dtv-gfxexplorer.log b/src/test/ref/c64dtv-gfxexplorer.log index a481f7347..421d1ca18 100644 --- a/src/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/ref/c64dtv-gfxexplorer.log @@ -7906,155 +7906,155 @@ Identified duplicate assignment right side [262] (byte~) bitmap_init::$10 ← (b Identified duplicate assignment right side [805] (word~) gfx_mode::$24 ← < (dword) gfx_mode::plane_a#0 Identified duplicate assignment right side [831] (word~) gfx_mode::$38 ← < (dword) gfx_mode::plane_b#0 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$1 [7] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [17] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str_lines::$2 [30] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@4 -Simple Condition (bool~) print_str_lines::$0 [36] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@5 -Simple Condition (bool~) print_str_lines::$3 [39] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@4 -Simple Condition (bool~) print_str_at::$0 [55] if((byte) 0!=*((byte*) print_str_at::str#2)) goto print_str_at::@2 -Simple Condition (bool~) print_ln::$1 [66] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 -Simple Condition (bool~) keyboard_event_scan::$13 [120] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -Simple Condition (bool~) keyboard_event_scan::$25 [129] if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 -Simple Condition (bool~) keyboard_event_scan::$18 [135] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@12 -Simple Condition (bool~) keyboard_event_scan::$24 [140] if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 -Simple Condition (bool~) keyboard_event_scan::$20 [144] if((byte) keyboard_events_size#18==(byte) 8) goto keyboard_event_scan::@12 -Simple Condition (bool~) keyboard_event_scan::$22 [149] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@14 -Simple Condition (bool~) keyboard_event_scan::$2 [168] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -Simple Condition (bool~) keyboard_event_scan::$5 [177] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -Simple Condition (bool~) keyboard_event_scan::$8 [189] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -Simple Condition (bool~) keyboard_event_scan::$11 [201] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -Simple Condition (bool~) keyboard_event_get::$0 [223] if((byte) keyboard_events_size#100==(byte) 0) goto keyboard_event_get::@1 -Simple Condition (bool~) bitmap_init::$4 [246] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$5 [250] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$12 [265] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$14 [269] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_clear::$1 [285] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 [289] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 -Simple Condition (bool~) bitmap_line::$0 [305] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$12 [310] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 -Simple Condition (bool~) bitmap_line::$2 [315] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line::$8 [320] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 -Simple Condition (bool~) bitmap_line::$4 [325] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 -Simple Condition (bool~) bitmap_line::$18 [358] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 -Simple Condition (bool~) bitmap_line::$14 [363] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 -Simple Condition (bool~) bitmap_line_xdyi::$4 [406] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 [410] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 [429] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 [433] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 [452] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 [456] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 [476] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 [480] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) get_plane::$0 [522] if((byte) get_plane::idx#10==(byte) 0) goto get_plane::@1 -Simple Condition (bool~) get_plane::$1 [526] if((byte) get_plane::idx#10==(byte) 1) goto get_plane::@2 -Simple Condition (bool~) get_plane::$2 [530] if((byte) get_plane::idx#10==(byte) 2) goto get_plane::@3 -Simple Condition (bool~) get_plane::$3 [534] if((byte) get_plane::idx#10==(byte) 3) goto get_plane::@4 -Simple Condition (bool~) get_plane::$4 [538] if((byte) get_plane::idx#10==(byte) 4) goto get_plane::@5 -Simple Condition (bool~) get_plane::$5 [542] if((byte) get_plane::idx#10==(byte) 5) goto get_plane::@6 -Simple Condition (bool~) get_plane::$6 [546] if((byte) get_plane::idx#10==(byte) 6) goto get_plane::@7 -Simple Condition (bool~) get_plane::$7 [550] if((byte) get_plane::idx#10==(byte) 7) goto get_plane::@8 -Simple Condition (bool~) get_plane::$8 [554] if((byte) get_plane::idx#10==(byte) 8) goto get_plane::@9 -Simple Condition (bool~) get_plane::$9 [558] if((byte) get_plane::idx#10==(byte) 9) goto get_plane::@10 -Simple Condition (bool~) get_plane::$10 [562] if((byte) get_plane::idx#10==(byte) $a) goto get_plane::@11 -Simple Condition (bool~) get_plane::$11 [566] if((byte) get_plane::idx#10==(byte) $b) goto get_plane::@12 -Simple Condition (bool~) get_plane::$12 [570] if((byte) get_plane::idx#10==(byte) $c) goto get_plane::@13 -Simple Condition (bool~) get_plane::$14 [575] if((byte) get_plane::idx#10!=(byte) $d) goto get_plane::@27 -Simple Condition (bool~) get_vic_screen::$0 [583] if((byte) get_vic_screen::idx#2==(byte) 0) goto get_vic_screen::@1 -Simple Condition (bool~) get_vic_screen::$1 [587] if((byte) get_vic_screen::idx#2==(byte) 1) goto get_vic_screen::@2 -Simple Condition (bool~) get_vic_screen::$2 [591] if((byte) get_vic_screen::idx#2==(byte) 2) goto get_vic_screen::@3 -Simple Condition (bool~) get_vic_screen::$3 [595] if((byte) get_vic_screen::idx#2==(byte) 3) goto get_vic_screen::@4 -Simple Condition (bool~) get_vic_screen::$5 [600] if((byte) get_vic_screen::idx#2!=(byte) 4) goto get_vic_screen::@9 -Simple Condition (bool~) get_vic_charset::$0 [608] if((byte) get_vic_charset::idx#0==(byte) 0) goto get_vic_charset::@1 -Simple Condition (bool~) get_vic_charset::$2 [613] if((byte) get_vic_charset::idx#0!=(byte) 1) goto get_vic_charset::@3 -Simple Condition (bool~) apply_preset::$0 [622] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@1 -Simple Condition (bool~) apply_preset::$1 [626] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -Simple Condition (bool~) apply_preset::$2 [630] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@3 -Simple Condition (bool~) apply_preset::$3 [634] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@4 -Simple Condition (bool~) apply_preset::$4 [638] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@5 -Simple Condition (bool~) apply_preset::$5 [642] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@6 -Simple Condition (bool~) apply_preset::$6 [646] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@7 -Simple Condition (bool~) apply_preset::$7 [650] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@8 -Simple Condition (bool~) apply_preset::$8 [654] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@9 -Simple Condition (bool~) apply_preset::$9 [658] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@10 -Simple Condition (bool~) apply_preset::$10 [662] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@11 -Simple Condition (bool~) apply_preset::$11 [669] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@46 -Simple Condition (bool~) render_preset_name::$0 [677] if((byte) render_preset_name::idx#10==(byte) 0) goto render_preset_name::@1 -Simple Condition (bool~) render_preset_name::$1 [681] if((byte) render_preset_name::idx#10==(byte) 1) goto render_preset_name::@2 -Simple Condition (bool~) render_preset_name::$2 [685] if((byte) render_preset_name::idx#10==(byte) 2) goto render_preset_name::@3 -Simple Condition (bool~) render_preset_name::$3 [689] if((byte) render_preset_name::idx#10==(byte) 3) goto render_preset_name::@4 -Simple Condition (bool~) render_preset_name::$4 [693] if((byte) render_preset_name::idx#10==(byte) 4) goto render_preset_name::@5 -Simple Condition (bool~) render_preset_name::$5 [697] if((byte) render_preset_name::idx#10==(byte) 5) goto render_preset_name::@6 -Simple Condition (bool~) render_preset_name::$6 [701] if((byte) render_preset_name::idx#10==(byte) 6) goto render_preset_name::@7 -Simple Condition (bool~) render_preset_name::$7 [705] if((byte) render_preset_name::idx#10==(byte) 7) goto render_preset_name::@8 -Simple Condition (bool~) render_preset_name::$8 [709] if((byte) render_preset_name::idx#10==(byte) 8) goto render_preset_name::@9 -Simple Condition (bool~) render_preset_name::$9 [713] if((byte) render_preset_name::idx#10==(byte) 9) goto render_preset_name::@10 -Simple Condition (bool~) render_preset_name::$10 [717] if((byte) render_preset_name::idx#10==(byte) $a) goto render_preset_name::@11 -Simple Condition (bool~) gfx_mode::$1 [729] if(*((const byte*) form_ctrl_line)==(byte) 0) goto gfx_mode::@1 -Simple Condition (bool~) gfx_mode::$3 [733] if(*((const byte*) form_ctrl_borof)==(byte) 0) goto gfx_mode::@2 -Simple Condition (bool~) gfx_mode::$5 [740] if(*((const byte*) form_ctrl_hicol)==(byte) 0) goto gfx_mode::@3 -Simple Condition (bool~) gfx_mode::$7 [747] if(*((const byte*) form_ctrl_overs)==(byte) 0) goto gfx_mode::@4 -Simple Condition (bool~) gfx_mode::$9 [754] if(*((const byte*) form_ctrl_colof)==(byte) 0) goto gfx_mode::@5 -Simple Condition (bool~) gfx_mode::$11 [761] if(*((const byte*) form_ctrl_chunk)==(byte) 0) goto gfx_mode::@6 -Simple Condition (bool~) gfx_mode::$13 [770] if(*((const byte*) form_ctrl_ecm)==(byte) 0) goto gfx_mode::@7 -Simple Condition (bool~) gfx_mode::$15 [777] if(*((const byte*) form_ctrl_bmm)==(byte) 0) goto gfx_mode::@8 -Simple Condition (bool~) gfx_mode::$17 [786] if(*((const byte*) form_ctrl_mcm)==(byte) 0) goto gfx_mode::@9 -Simple Condition (bool~) gfx_mode::$76 [885] if((byte) gfx_mode::cx#1!=rangelast(0,$27)) goto gfx_mode::@22 -Simple Condition (bool~) gfx_mode::$77 [889] if((byte) gfx_mode::cy#1!=rangelast(0,$18)) goto gfx_mode::@21 -Simple Condition (bool~) gfx_mode::$66 [905] if(*((const byte*) form_dtv_palet)==(byte) 0) goto gfx_mode::@10 -Simple Condition (bool~) gfx_mode::$78 [914] if((byte) gfx_mode::j#1!=rangelast(0,$f)) goto gfx_mode::@26 -Simple Condition (bool~) gfx_mode::$79 [919] if((byte) gfx_mode::i#1!=rangelast(0,$f)) goto gfx_mode::@29 -Simple Condition (bool~) gfx_mode::$80 [924] if(*((const byte*) RASTER)!=(byte) $ff) goto gfx_mode::@34 -Simple Condition (bool~) gfx_mode::$84 [938] if((byte) gfx_mode::keyboard_event#0!=(const byte) KEY_SPACE) goto gfx_mode::@31 -Simple Condition (bool~) gfx_init_charset::$0 [971] if((byte) gfx_init_charset::l#1!=rangelast(0,7)) goto gfx_init_charset::@2 -Simple Condition (bool~) gfx_init_charset::$1 [975] if((byte) gfx_init_charset::c#1!=rangelast(0,$ff)) goto gfx_init_charset::@1 -Simple Condition (bool~) gfx_init_screen0::$4 [991] if((byte) gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 -Simple Condition (bool~) gfx_init_screen0::$5 [995] if((byte) gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 -Simple Condition (bool~) gfx_init_screen1::$2 [1008] if((byte) gfx_init_screen1::cx#1!=rangelast(0,$27)) goto gfx_init_screen1::@2 -Simple Condition (bool~) gfx_init_screen1::$3 [1012] if((byte) gfx_init_screen1::cy#1!=rangelast(0,$18)) goto gfx_init_screen1::@1 -Simple Condition (bool~) gfx_init_screen2::$5 [1030] if((byte) gfx_init_screen2::cx#1!=rangelast(0,$27)) goto gfx_init_screen2::@2 -Simple Condition (bool~) gfx_init_screen2::$6 [1034] if((byte) gfx_init_screen2::cy#1!=rangelast(0,$18)) goto gfx_init_screen2::@1 -Simple Condition (bool~) gfx_init_screen3::$4 [1049] if((byte) gfx_init_screen3::cx#1!=rangelast(0,$27)) goto gfx_init_screen3::@2 -Simple Condition (bool~) gfx_init_screen3::$5 [1053] if((byte) gfx_init_screen3::cy#1!=rangelast(0,$18)) goto gfx_init_screen3::@1 -Simple Condition (bool~) gfx_init_screen4::$0 [1064] if((byte) gfx_init_screen4::cx#1!=rangelast(0,$27)) goto gfx_init_screen4::@2 -Simple Condition (bool~) gfx_init_screen4::$1 [1068] if((byte) gfx_init_screen4::cy#1!=rangelast(0,$18)) goto gfx_init_screen4::@1 -Simple Condition (bool~) gfx_init_vic_bitmap::$2 [1076] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -Simple Condition (bool~) gfx_init_plane_8bppchunky::$3 [1100] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -Simple Condition (bool~) gfx_init_plane_8bppchunky::$7 [1109] if((word) gfx_init_plane_8bppchunky::x#1!=rangelast(0,$13f)) goto gfx_init_plane_8bppchunky::@2 -Simple Condition (bool~) gfx_init_plane_8bppchunky::$8 [1119] if((byte) gfx_init_plane_8bppchunky::y#1!=rangelast(0,$c7)) goto gfx_init_plane_8bppchunky::@1 -Simple Condition (bool~) gfx_init_plane_horisontal::$3 [1135] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -Simple Condition (bool~) gfx_init_plane_horisontal::$4 [1145] if((byte) gfx_init_plane_horisontal::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal::@2 -Simple Condition (bool~) gfx_init_plane_horisontal::$5 [1149] if((byte) gfx_init_plane_horisontal::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal::@1 -Simple Condition (bool~) gfx_init_plane_horisontal2::$4 [1170] if((byte) gfx_init_plane_horisontal2::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal2::@2 -Simple Condition (bool~) gfx_init_plane_horisontal2::$5 [1174] if((byte) gfx_init_plane_horisontal2::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal2::@1 -Simple Condition (bool~) gfx_init_plane_vertical::$2 [1192] if((byte) gfx_init_plane_vertical::bx#1!=rangelast(0,$27)) goto gfx_init_plane_vertical::@2 -Simple Condition (bool~) gfx_init_plane_vertical::$3 [1196] if((byte) gfx_init_plane_vertical::by#1!=rangelast(0,$c7)) goto gfx_init_plane_vertical::@1 -Simple Condition (bool~) gfx_init_plane_charset8::$4 [1221] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -Simple Condition (bool~) gfx_init_plane_charset8::$6 [1230] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 -Simple Condition (bool~) gfx_init_plane_charset8::$7 [1236] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 -Simple Condition (bool~) gfx_init_plane_charset8::$8 [1240] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 -Simple Condition (bool~) gfx_init_plane_fill::$8 [1278] if((byte) gfx_init_plane_fill::bx#1!=rangelast(0,$27)) goto gfx_init_plane_fill::@2 -Simple Condition (bool~) gfx_init_plane_fill::$9 [1282] if((byte) gfx_init_plane_fill::by#1!=rangelast(0,$c7)) goto gfx_init_plane_fill::@1 -Simple Condition (bool~) form_mode::$9 [1342] if((byte) form_mode::i#1!=rangelast(0,$f)) goto form_mode::@1 -Simple Condition (bool~) form_mode::$10 [1351] if(*((const byte*) RASTER)!=(byte) $ff) goto form_mode::@6 -Simple Condition (bool~) form_mode::$13 [1363] if((byte~) form_mode::$11==(byte) 0) goto form_mode::@14 -Simple Condition (bool~) form_mode::$15 [1367] if((byte) form_mode::preset_current#6==*((const byte*) form_preset)) goto form_mode::@3 -Simple Condition (bool~) form_set_screen::$3 [1402] if((byte) form_set_screen::y#1!=rangelast(0,$18)) goto form_set_screen::@1 -Simple Condition (bool~) form_render_values::$0 [1419] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2 -Simple Condition (bool~) form_control::$2 [1440] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@1 -Simple Condition (bool~) form_control::$3 [1443] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 -Simple Condition (bool~) form_control::$7 [1465] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -Simple Condition (bool~) form_control::$9 [1469] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -Simple Condition (bool~) form_control::$16 [1475] if((byte~) form_control::$15==(byte) 0) goto form_control::@19 -Simple Condition (bool~) form_control::$21 [1480] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@22 -Simple Condition (bool~) form_control::$18 [1485] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -Simple Condition (bool~) form_control::$11 [1504] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -Simple Condition (bool~) form_control::$23 [1508] if((byte~) form_control::$22==(byte) 0) goto form_control::@26 -Simple Condition (bool~) form_control::$27 [1513] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@29 -Simple Condition (bool~) form_control::$25 [1518] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@29 +Simple Condition (bool~) memset::$1 [6] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str_lines::$2 [21] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@4 +Simple Condition (bool~) print_str_lines::$0 [26] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@5 +Simple Condition (bool~) print_str_lines::$3 [29] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@4 +Simple Condition (bool~) print_str_at::$0 [38] if((byte) 0!=*((byte*) print_str_at::str#2)) goto print_str_at::@2 +Simple Condition (bool~) print_ln::$1 [47] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 +Simple Condition (bool~) keyboard_event_scan::$13 [77] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 +Simple Condition (bool~) keyboard_event_scan::$25 [83] if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 +Simple Condition (bool~) keyboard_event_scan::$18 [88] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_scan::$24 [93] if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 +Simple Condition (bool~) keyboard_event_scan::$20 [95] if((byte) keyboard_events_size#18==(byte) 8) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_scan::$22 [98] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@14 +Simple Condition (bool~) keyboard_event_scan::$2 [111] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 +Simple Condition (bool~) keyboard_event_scan::$5 [118] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 +Simple Condition (bool~) keyboard_event_scan::$8 [126] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 +Simple Condition (bool~) keyboard_event_scan::$11 [134] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return +Simple Condition (bool~) keyboard_event_get::$0 [147] if((byte) keyboard_events_size#100==(byte) 0) goto keyboard_event_get::@1 +Simple Condition (bool~) bitmap_init::$4 [164] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [168] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [181] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$14 [185] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_clear::$1 [198] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [201] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [215] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [218] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 +Simple Condition (bool~) bitmap_line::$2 [221] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line::$8 [224] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 +Simple Condition (bool~) bitmap_line::$4 [227] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 +Simple Condition (bool~) bitmap_line::$18 [254] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 +Simple Condition (bool~) bitmap_line::$14 [257] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 +Simple Condition (bool~) bitmap_line_xdyi::$4 [292] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [296] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [309] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [313] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [326] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [330] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [343] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [347] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) get_plane::$0 [367] if((byte) get_plane::idx#10==(byte) 0) goto get_plane::@1 +Simple Condition (bool~) get_plane::$1 [370] if((byte) get_plane::idx#10==(byte) 1) goto get_plane::@2 +Simple Condition (bool~) get_plane::$2 [373] if((byte) get_plane::idx#10==(byte) 2) goto get_plane::@3 +Simple Condition (bool~) get_plane::$3 [376] if((byte) get_plane::idx#10==(byte) 3) goto get_plane::@4 +Simple Condition (bool~) get_plane::$4 [379] if((byte) get_plane::idx#10==(byte) 4) goto get_plane::@5 +Simple Condition (bool~) get_plane::$5 [382] if((byte) get_plane::idx#10==(byte) 5) goto get_plane::@6 +Simple Condition (bool~) get_plane::$6 [385] if((byte) get_plane::idx#10==(byte) 6) goto get_plane::@7 +Simple Condition (bool~) get_plane::$7 [388] if((byte) get_plane::idx#10==(byte) 7) goto get_plane::@8 +Simple Condition (bool~) get_plane::$8 [391] if((byte) get_plane::idx#10==(byte) 8) goto get_plane::@9 +Simple Condition (bool~) get_plane::$9 [394] if((byte) get_plane::idx#10==(byte) 9) goto get_plane::@10 +Simple Condition (bool~) get_plane::$10 [397] if((byte) get_plane::idx#10==(byte) $a) goto get_plane::@11 +Simple Condition (bool~) get_plane::$11 [400] if((byte) get_plane::idx#10==(byte) $b) goto get_plane::@12 +Simple Condition (bool~) get_plane::$12 [403] if((byte) get_plane::idx#10==(byte) $c) goto get_plane::@13 +Simple Condition (bool~) get_plane::$14 [406] if((byte) get_plane::idx#10!=(byte) $d) goto get_plane::@27 +Simple Condition (bool~) get_vic_screen::$0 [413] if((byte) get_vic_screen::idx#2==(byte) 0) goto get_vic_screen::@1 +Simple Condition (bool~) get_vic_screen::$1 [416] if((byte) get_vic_screen::idx#2==(byte) 1) goto get_vic_screen::@2 +Simple Condition (bool~) get_vic_screen::$2 [419] if((byte) get_vic_screen::idx#2==(byte) 2) goto get_vic_screen::@3 +Simple Condition (bool~) get_vic_screen::$3 [422] if((byte) get_vic_screen::idx#2==(byte) 3) goto get_vic_screen::@4 +Simple Condition (bool~) get_vic_screen::$5 [425] if((byte) get_vic_screen::idx#2!=(byte) 4) goto get_vic_screen::@9 +Simple Condition (bool~) get_vic_charset::$0 [432] if((byte) get_vic_charset::idx#0==(byte) 0) goto get_vic_charset::@1 +Simple Condition (bool~) get_vic_charset::$2 [435] if((byte) get_vic_charset::idx#0!=(byte) 1) goto get_vic_charset::@3 +Simple Condition (bool~) apply_preset::$0 [443] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@1 +Simple Condition (bool~) apply_preset::$1 [446] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 +Simple Condition (bool~) apply_preset::$2 [449] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@3 +Simple Condition (bool~) apply_preset::$3 [452] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@4 +Simple Condition (bool~) apply_preset::$4 [455] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@5 +Simple Condition (bool~) apply_preset::$5 [458] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@6 +Simple Condition (bool~) apply_preset::$6 [461] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@7 +Simple Condition (bool~) apply_preset::$7 [464] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@8 +Simple Condition (bool~) apply_preset::$8 [467] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@9 +Simple Condition (bool~) apply_preset::$9 [470] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@10 +Simple Condition (bool~) apply_preset::$10 [473] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@11 +Simple Condition (bool~) apply_preset::$11 [480] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@46 +Simple Condition (bool~) render_preset_name::$0 [487] if((byte) render_preset_name::idx#10==(byte) 0) goto render_preset_name::@1 +Simple Condition (bool~) render_preset_name::$1 [490] if((byte) render_preset_name::idx#10==(byte) 1) goto render_preset_name::@2 +Simple Condition (bool~) render_preset_name::$2 [493] if((byte) render_preset_name::idx#10==(byte) 2) goto render_preset_name::@3 +Simple Condition (bool~) render_preset_name::$3 [496] if((byte) render_preset_name::idx#10==(byte) 3) goto render_preset_name::@4 +Simple Condition (bool~) render_preset_name::$4 [499] if((byte) render_preset_name::idx#10==(byte) 4) goto render_preset_name::@5 +Simple Condition (bool~) render_preset_name::$5 [502] if((byte) render_preset_name::idx#10==(byte) 5) goto render_preset_name::@6 +Simple Condition (bool~) render_preset_name::$6 [505] if((byte) render_preset_name::idx#10==(byte) 6) goto render_preset_name::@7 +Simple Condition (bool~) render_preset_name::$7 [508] if((byte) render_preset_name::idx#10==(byte) 7) goto render_preset_name::@8 +Simple Condition (bool~) render_preset_name::$8 [511] if((byte) render_preset_name::idx#10==(byte) 8) goto render_preset_name::@9 +Simple Condition (bool~) render_preset_name::$9 [514] if((byte) render_preset_name::idx#10==(byte) 9) goto render_preset_name::@10 +Simple Condition (bool~) render_preset_name::$10 [517] if((byte) render_preset_name::idx#10==(byte) $a) goto render_preset_name::@11 +Simple Condition (bool~) gfx_mode::$1 [528] if(*((const byte*) form_ctrl_line)==(byte) 0) goto gfx_mode::@1 +Simple Condition (bool~) gfx_mode::$3 [531] if(*((const byte*) form_ctrl_borof)==(byte) 0) goto gfx_mode::@2 +Simple Condition (bool~) gfx_mode::$5 [535] if(*((const byte*) form_ctrl_hicol)==(byte) 0) goto gfx_mode::@3 +Simple Condition (bool~) gfx_mode::$7 [539] if(*((const byte*) form_ctrl_overs)==(byte) 0) goto gfx_mode::@4 +Simple Condition (bool~) gfx_mode::$9 [543] if(*((const byte*) form_ctrl_colof)==(byte) 0) goto gfx_mode::@5 +Simple Condition (bool~) gfx_mode::$11 [547] if(*((const byte*) form_ctrl_chunk)==(byte) 0) goto gfx_mode::@6 +Simple Condition (bool~) gfx_mode::$13 [553] if(*((const byte*) form_ctrl_ecm)==(byte) 0) goto gfx_mode::@7 +Simple Condition (bool~) gfx_mode::$15 [557] if(*((const byte*) form_ctrl_bmm)==(byte) 0) goto gfx_mode::@8 +Simple Condition (bool~) gfx_mode::$17 [563] if(*((const byte*) form_ctrl_mcm)==(byte) 0) goto gfx_mode::@9 +Simple Condition (bool~) gfx_mode::$76 [648] if((byte) gfx_mode::cx#1!=rangelast(0,$27)) goto gfx_mode::@22 +Simple Condition (bool~) gfx_mode::$77 [651] if((byte) gfx_mode::cy#1!=rangelast(0,$18)) goto gfx_mode::@21 +Simple Condition (bool~) gfx_mode::$66 [666] if(*((const byte*) form_dtv_palet)==(byte) 0) goto gfx_mode::@10 +Simple Condition (bool~) gfx_mode::$78 [673] if((byte) gfx_mode::j#1!=rangelast(0,$f)) goto gfx_mode::@26 +Simple Condition (bool~) gfx_mode::$79 [678] if((byte) gfx_mode::i#1!=rangelast(0,$f)) goto gfx_mode::@29 +Simple Condition (bool~) gfx_mode::$80 [683] if(*((const byte*) RASTER)!=(byte) $ff) goto gfx_mode::@34 +Simple Condition (bool~) gfx_mode::$84 [691] if((byte) gfx_mode::keyboard_event#0!=(const byte) KEY_SPACE) goto gfx_mode::@31 +Simple Condition (bool~) gfx_init_charset::$0 [722] if((byte) gfx_init_charset::l#1!=rangelast(0,7)) goto gfx_init_charset::@2 +Simple Condition (bool~) gfx_init_charset::$1 [725] if((byte) gfx_init_charset::c#1!=rangelast(0,$ff)) goto gfx_init_charset::@1 +Simple Condition (bool~) gfx_init_screen0::$4 [741] if((byte) gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 +Simple Condition (bool~) gfx_init_screen0::$5 [744] if((byte) gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 +Simple Condition (bool~) gfx_init_screen1::$2 [757] if((byte) gfx_init_screen1::cx#1!=rangelast(0,$27)) goto gfx_init_screen1::@2 +Simple Condition (bool~) gfx_init_screen1::$3 [760] if((byte) gfx_init_screen1::cy#1!=rangelast(0,$18)) goto gfx_init_screen1::@1 +Simple Condition (bool~) gfx_init_screen2::$5 [776] if((byte) gfx_init_screen2::cx#1!=rangelast(0,$27)) goto gfx_init_screen2::@2 +Simple Condition (bool~) gfx_init_screen2::$6 [779] if((byte) gfx_init_screen2::cy#1!=rangelast(0,$18)) goto gfx_init_screen2::@1 +Simple Condition (bool~) gfx_init_screen3::$4 [794] if((byte) gfx_init_screen3::cx#1!=rangelast(0,$27)) goto gfx_init_screen3::@2 +Simple Condition (bool~) gfx_init_screen3::$5 [797] if((byte) gfx_init_screen3::cy#1!=rangelast(0,$18)) goto gfx_init_screen3::@1 +Simple Condition (bool~) gfx_init_screen4::$0 [808] if((byte) gfx_init_screen4::cx#1!=rangelast(0,$27)) goto gfx_init_screen4::@2 +Simple Condition (bool~) gfx_init_screen4::$1 [811] if((byte) gfx_init_screen4::cy#1!=rangelast(0,$18)) goto gfx_init_screen4::@1 +Simple Condition (bool~) gfx_init_vic_bitmap::$2 [819] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 +Simple Condition (bool~) gfx_init_plane_8bppchunky::$3 [839] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 +Simple Condition (bool~) gfx_init_plane_8bppchunky::$7 [847] if((word) gfx_init_plane_8bppchunky::x#1!=rangelast(0,$13f)) goto gfx_init_plane_8bppchunky::@2 +Simple Condition (bool~) gfx_init_plane_8bppchunky::$8 [854] if((byte) gfx_init_plane_8bppchunky::y#1!=rangelast(0,$c7)) goto gfx_init_plane_8bppchunky::@1 +Simple Condition (bool~) gfx_init_plane_horisontal::$3 [869] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 +Simple Condition (bool~) gfx_init_plane_horisontal::$4 [877] if((byte) gfx_init_plane_horisontal::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal::@2 +Simple Condition (bool~) gfx_init_plane_horisontal::$5 [880] if((byte) gfx_init_plane_horisontal::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal::@1 +Simple Condition (bool~) gfx_init_plane_horisontal2::$4 [899] if((byte) gfx_init_plane_horisontal2::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal2::@2 +Simple Condition (bool~) gfx_init_plane_horisontal2::$5 [902] if((byte) gfx_init_plane_horisontal2::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal2::@1 +Simple Condition (bool~) gfx_init_plane_vertical::$2 [919] if((byte) gfx_init_plane_vertical::bx#1!=rangelast(0,$27)) goto gfx_init_plane_vertical::@2 +Simple Condition (bool~) gfx_init_plane_vertical::$3 [922] if((byte) gfx_init_plane_vertical::by#1!=rangelast(0,$c7)) goto gfx_init_plane_vertical::@1 +Simple Condition (bool~) gfx_init_plane_charset8::$4 [945] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 +Simple Condition (bool~) gfx_init_plane_charset8::$6 [953] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 +Simple Condition (bool~) gfx_init_plane_charset8::$7 [956] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 +Simple Condition (bool~) gfx_init_plane_charset8::$8 [959] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 +Simple Condition (bool~) gfx_init_plane_fill::$8 [995] if((byte) gfx_init_plane_fill::bx#1!=rangelast(0,$27)) goto gfx_init_plane_fill::@2 +Simple Condition (bool~) gfx_init_plane_fill::$9 [998] if((byte) gfx_init_plane_fill::by#1!=rangelast(0,$c7)) goto gfx_init_plane_fill::@1 +Simple Condition (bool~) form_mode::$9 [1041] if((byte) form_mode::i#1!=rangelast(0,$f)) goto form_mode::@1 +Simple Condition (bool~) form_mode::$10 [1049] if(*((const byte*) RASTER)!=(byte) $ff) goto form_mode::@6 +Simple Condition (bool~) form_mode::$13 [1055] if((byte~) form_mode::$11==(byte) 0) goto form_mode::@14 +Simple Condition (bool~) form_mode::$15 [1057] if((byte) form_mode::preset_current#6==*((const byte*) form_preset)) goto form_mode::@3 +Simple Condition (bool~) form_set_screen::$3 [1078] if((byte) form_set_screen::y#1!=rangelast(0,$18)) goto form_set_screen::@1 +Simple Condition (bool~) form_render_values::$0 [1090] if((byte) form_render_values::idx#2<(const byte) form_fields_cnt) goto form_render_values::@2 +Simple Condition (bool~) form_control::$2 [1105] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@1 +Simple Condition (bool~) form_control::$3 [1108] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 +Simple Condition (bool~) form_control::$7 [1121] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 +Simple Condition (bool~) form_control::$9 [1123] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 +Simple Condition (bool~) form_control::$16 [1128] if((byte~) form_control::$15==(byte) 0) goto form_control::@19 +Simple Condition (bool~) form_control::$21 [1131] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@22 +Simple Condition (bool~) form_control::$18 [1134] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 +Simple Condition (bool~) form_control::$11 [1143] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 +Simple Condition (bool~) form_control::$23 [1146] if((byte~) form_control::$22==(byte) 0) goto form_control::@26 +Simple Condition (bool~) form_control::$27 [1149] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@29 +Simple Condition (bool~) form_control::$25 [1152] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@29 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [938] if((byte) gfx_mode::keyboard_event#0==(const byte) KEY_SPACE) goto gfx_mode::@return +Negating conditional jump and destination [691] if((byte) gfx_mode::keyboard_event#0==(const byte) KEY_SPACE) goto gfx_mode::@return Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [1487] (byte) form_field_idx#7 ← (const byte) form_fields_cnt - (byte) 1 +Constant right-side identified [1135] (byte) form_field_idx#7 ← (const byte) form_fields_cnt - (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) print_screen#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -8224,119 +8224,112 @@ Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#5 = gfx_init_plane_horis Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#7 = gfx_init_plane_vertical::gfxbCpuBank#0 Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#9 = gfx_init_plane_charset8::gfxbCpuBank#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [7] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [496] if(true) goto main::@2 +if() condition always false - eliminating [6] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [359] if(true) goto main::@2 Removing PHI-reference to removed block (gfx_mode::@31) in block gfx_mode::@return Removing PHI-reference to removed block (gfx_mode::@31) in block gfx_mode::@return -if() condition always true - replacing block destination [921] if(true) goto gfx_mode::@34 +if() condition always true - replacing block destination [680] if(true) goto gfx_mode::@34 Removing PHI-reference to removed block (form_mode::@3) in block form_mode::@return Removing PHI-reference to removed block (form_mode::@3) in block form_mode::@return Removing PHI-reference to removed block (form_mode::@3) in block form_mode::@return Removing PHI-reference to removed block (form_mode::@3) in block form_mode::@return -if() condition always true - replacing block destination [1348] if(true) goto form_mode::@6 +if() condition always true - replacing block destination [1046] if(true) goto form_mode::@6 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) render_preset_name::$12 Successful SSA optimization Pass2ConstantStringConsolidation -Resolved ranged next value [127] keyboard_event_scan::row#1 ← ++ keyboard_event_scan::row#2 to ++ -Resolved ranged comparison value [129] if(keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 to (number) 8 -Resolved ranged next value [138] keyboard_event_scan::col#1 ← ++ keyboard_event_scan::col#2 to ++ -Resolved ranged comparison value [140] if(keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 to (number) 8 -Resolved ranged next value [248] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [250] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [267] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [269] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [283] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ -Resolved ranged comparison value [285] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 -Resolved ranged next value [287] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ -Resolved ranged comparison value [289] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 -Resolved ranged next value [883] gfx_mode::cx#1 ← ++ gfx_mode::cx#2 to ++ -Resolved ranged comparison value [885] if(gfx_mode::cx#1!=rangelast(0,$27)) goto gfx_mode::@22 to (number) $28 -Resolved ranged next value [887] gfx_mode::cy#1 ← ++ gfx_mode::cy#4 to ++ -Resolved ranged comparison value [889] if(gfx_mode::cy#1!=rangelast(0,$18)) goto gfx_mode::@21 to (number) $19 -Resolved ranged next value [912] gfx_mode::j#1 ← ++ gfx_mode::j#2 to ++ -Resolved ranged comparison value [914] if(gfx_mode::j#1!=rangelast(0,$f)) goto gfx_mode::@26 to (number) $10 -Resolved ranged next value [917] gfx_mode::i#1 ← ++ gfx_mode::i#2 to ++ -Resolved ranged comparison value [919] if(gfx_mode::i#1!=rangelast(0,$f)) goto gfx_mode::@29 to (number) $10 -Resolved ranged next value [969] gfx_init_charset::l#1 ← ++ gfx_init_charset::l#2 to ++ -Resolved ranged comparison value [971] if(gfx_init_charset::l#1!=rangelast(0,7)) goto gfx_init_charset::@2 to (number) 8 -Resolved ranged next value [973] gfx_init_charset::c#1 ← ++ gfx_init_charset::c#4 to ++ -Resolved ranged comparison value [975] if(gfx_init_charset::c#1!=rangelast(0,$ff)) goto gfx_init_charset::@1 to (number) 0 -Resolved ranged next value [989] gfx_init_screen0::cx#1 ← ++ gfx_init_screen0::cx#2 to ++ -Resolved ranged comparison value [991] if(gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 to (number) $28 -Resolved ranged next value [993] gfx_init_screen0::cy#1 ← ++ gfx_init_screen0::cy#4 to ++ -Resolved ranged comparison value [995] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 to (number) $19 -Resolved ranged next value [1006] gfx_init_screen1::cx#1 ← ++ gfx_init_screen1::cx#2 to ++ -Resolved ranged comparison value [1008] if(gfx_init_screen1::cx#1!=rangelast(0,$27)) goto gfx_init_screen1::@2 to (number) $28 -Resolved ranged next value [1010] gfx_init_screen1::cy#1 ← ++ gfx_init_screen1::cy#4 to ++ -Resolved ranged comparison value [1012] if(gfx_init_screen1::cy#1!=rangelast(0,$18)) goto gfx_init_screen1::@1 to (number) $19 -Resolved ranged next value [1028] gfx_init_screen2::cx#1 ← ++ gfx_init_screen2::cx#2 to ++ -Resolved ranged comparison value [1030] if(gfx_init_screen2::cx#1!=rangelast(0,$27)) goto gfx_init_screen2::@2 to (number) $28 -Resolved ranged next value [1032] gfx_init_screen2::cy#1 ← ++ gfx_init_screen2::cy#4 to ++ -Resolved ranged comparison value [1034] if(gfx_init_screen2::cy#1!=rangelast(0,$18)) goto gfx_init_screen2::@1 to (number) $19 -Resolved ranged next value [1047] gfx_init_screen3::cx#1 ← ++ gfx_init_screen3::cx#2 to ++ -Resolved ranged comparison value [1049] if(gfx_init_screen3::cx#1!=rangelast(0,$27)) goto gfx_init_screen3::@2 to (number) $28 -Resolved ranged next value [1051] gfx_init_screen3::cy#1 ← ++ gfx_init_screen3::cy#4 to ++ -Resolved ranged comparison value [1053] if(gfx_init_screen3::cy#1!=rangelast(0,$18)) goto gfx_init_screen3::@1 to (number) $19 -Resolved ranged next value [1062] gfx_init_screen4::cx#1 ← ++ gfx_init_screen4::cx#2 to ++ -Resolved ranged comparison value [1064] if(gfx_init_screen4::cx#1!=rangelast(0,$27)) goto gfx_init_screen4::@2 to (number) $28 -Resolved ranged next value [1066] gfx_init_screen4::cy#1 ← ++ gfx_init_screen4::cy#4 to ++ -Resolved ranged comparison value [1068] if(gfx_init_screen4::cy#1!=rangelast(0,$18)) goto gfx_init_screen4::@1 to (number) $19 -Resolved ranged next value [1107] gfx_init_plane_8bppchunky::x#1 ← ++ gfx_init_plane_8bppchunky::x#2 to ++ -Resolved ranged comparison value [1109] if(gfx_init_plane_8bppchunky::x#1!=rangelast(0,$13f)) goto gfx_init_plane_8bppchunky::@2 to (number) $140 -Resolved ranged next value [1117] gfx_init_plane_8bppchunky::y#1 ← ++ gfx_init_plane_8bppchunky::y#6 to ++ -Resolved ranged comparison value [1119] if(gfx_init_plane_8bppchunky::y#1!=rangelast(0,$c7)) goto gfx_init_plane_8bppchunky::@1 to (number) $c8 -Resolved ranged next value [1143] gfx_init_plane_horisontal::ax#1 ← ++ gfx_init_plane_horisontal::ax#2 to ++ -Resolved ranged comparison value [1145] if(gfx_init_plane_horisontal::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal::@2 to (number) $28 -Resolved ranged next value [1147] gfx_init_plane_horisontal::ay#1 ← ++ gfx_init_plane_horisontal::ay#4 to ++ -Resolved ranged comparison value [1149] if(gfx_init_plane_horisontal::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal::@1 to (number) $c8 -Resolved ranged next value [1168] gfx_init_plane_horisontal2::ax#1 ← ++ gfx_init_plane_horisontal2::ax#2 to ++ -Resolved ranged comparison value [1170] if(gfx_init_plane_horisontal2::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal2::@2 to (number) $28 -Resolved ranged next value [1172] gfx_init_plane_horisontal2::ay#1 ← ++ gfx_init_plane_horisontal2::ay#4 to ++ -Resolved ranged comparison value [1174] if(gfx_init_plane_horisontal2::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal2::@1 to (number) $c8 -Resolved ranged next value [1190] gfx_init_plane_vertical::bx#1 ← ++ gfx_init_plane_vertical::bx#2 to ++ -Resolved ranged comparison value [1192] if(gfx_init_plane_vertical::bx#1!=rangelast(0,$27)) goto gfx_init_plane_vertical::@2 to (number) $28 -Resolved ranged next value [1194] gfx_init_plane_vertical::by#1 ← ++ gfx_init_plane_vertical::by#4 to ++ -Resolved ranged comparison value [1196] if(gfx_init_plane_vertical::by#1!=rangelast(0,$c7)) goto gfx_init_plane_vertical::@1 to (number) $c8 -Resolved ranged next value [1228] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_plane_charset8::cp#2 to ++ -Resolved ranged comparison value [1230] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8 -Resolved ranged next value [1234] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++ -Resolved ranged comparison value [1236] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8 -Resolved ranged next value [1238] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++ -Resolved ranged comparison value [1240] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0 -Resolved ranged next value [1276] gfx_init_plane_fill::bx#1 ← ++ gfx_init_plane_fill::bx#2 to ++ -Resolved ranged comparison value [1278] if(gfx_init_plane_fill::bx#1!=rangelast(0,$27)) goto gfx_init_plane_fill::@2 to (number) $28 -Resolved ranged next value [1280] gfx_init_plane_fill::by#1 ← ++ gfx_init_plane_fill::by#4 to ++ -Resolved ranged comparison value [1282] if(gfx_init_plane_fill::by#1!=rangelast(0,$c7)) goto gfx_init_plane_fill::@1 to (number) $c8 -Resolved ranged next value [1340] form_mode::i#1 ← ++ form_mode::i#2 to ++ -Resolved ranged comparison value [1342] if(form_mode::i#1!=rangelast(0,$f)) goto form_mode::@1 to (number) $10 -Resolved ranged next value [1400] form_set_screen::y#1 ← ++ form_set_screen::y#2 to ++ -Resolved ranged comparison value [1402] if(form_set_screen::y#1!=rangelast(0,$18)) goto form_set_screen::@1 to (number) $19 -Converting *(pointer+n) to pointer[n] [1427] *((byte*) form_render_values::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_render_values::idx#2)) -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1447] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1448] *((byte*) form_control::field#0) ← (byte~) form_control::$13 -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1450] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1451] *((byte*) form_control::field#0) ← (byte~) form_control::$12 -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1471] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1472] *((byte*) form_control::field#0) ← (byte~) form_control::$14 -- *(form_field_ptr::line#0 + form_field_ptr::x#0) -Converting *(pointer+n) to pointer[n] [1522] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- *(form_field_ptr::line#0 + form_field_ptr::x#0) +Resolved ranged next value [81] keyboard_event_scan::row#1 ← ++ keyboard_event_scan::row#2 to ++ +Resolved ranged comparison value [83] if(keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 to (number) 8 +Resolved ranged next value [91] keyboard_event_scan::col#1 ← ++ keyboard_event_scan::col#2 to ++ +Resolved ranged comparison value [93] if(keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 to (number) 8 +Resolved ranged next value [166] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [168] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [183] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [185] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [196] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ +Resolved ranged comparison value [198] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 +Resolved ranged next value [199] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ +Resolved ranged comparison value [201] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 +Resolved ranged next value [646] gfx_mode::cx#1 ← ++ gfx_mode::cx#2 to ++ +Resolved ranged comparison value [648] if(gfx_mode::cx#1!=rangelast(0,$27)) goto gfx_mode::@22 to (number) $28 +Resolved ranged next value [649] gfx_mode::cy#1 ← ++ gfx_mode::cy#4 to ++ +Resolved ranged comparison value [651] if(gfx_mode::cy#1!=rangelast(0,$18)) goto gfx_mode::@21 to (number) $19 +Resolved ranged next value [671] gfx_mode::j#1 ← ++ gfx_mode::j#2 to ++ +Resolved ranged comparison value [673] if(gfx_mode::j#1!=rangelast(0,$f)) goto gfx_mode::@26 to (number) $10 +Resolved ranged next value [676] gfx_mode::i#1 ← ++ gfx_mode::i#2 to ++ +Resolved ranged comparison value [678] if(gfx_mode::i#1!=rangelast(0,$f)) goto gfx_mode::@29 to (number) $10 +Resolved ranged next value [720] gfx_init_charset::l#1 ← ++ gfx_init_charset::l#2 to ++ +Resolved ranged comparison value [722] if(gfx_init_charset::l#1!=rangelast(0,7)) goto gfx_init_charset::@2 to (number) 8 +Resolved ranged next value [723] gfx_init_charset::c#1 ← ++ gfx_init_charset::c#4 to ++ +Resolved ranged comparison value [725] if(gfx_init_charset::c#1!=rangelast(0,$ff)) goto gfx_init_charset::@1 to (number) 0 +Resolved ranged next value [739] gfx_init_screen0::cx#1 ← ++ gfx_init_screen0::cx#2 to ++ +Resolved ranged comparison value [741] if(gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 to (number) $28 +Resolved ranged next value [742] gfx_init_screen0::cy#1 ← ++ gfx_init_screen0::cy#4 to ++ +Resolved ranged comparison value [744] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 to (number) $19 +Resolved ranged next value [755] gfx_init_screen1::cx#1 ← ++ gfx_init_screen1::cx#2 to ++ +Resolved ranged comparison value [757] if(gfx_init_screen1::cx#1!=rangelast(0,$27)) goto gfx_init_screen1::@2 to (number) $28 +Resolved ranged next value [758] gfx_init_screen1::cy#1 ← ++ gfx_init_screen1::cy#4 to ++ +Resolved ranged comparison value [760] if(gfx_init_screen1::cy#1!=rangelast(0,$18)) goto gfx_init_screen1::@1 to (number) $19 +Resolved ranged next value [774] gfx_init_screen2::cx#1 ← ++ gfx_init_screen2::cx#2 to ++ +Resolved ranged comparison value [776] if(gfx_init_screen2::cx#1!=rangelast(0,$27)) goto gfx_init_screen2::@2 to (number) $28 +Resolved ranged next value [777] gfx_init_screen2::cy#1 ← ++ gfx_init_screen2::cy#4 to ++ +Resolved ranged comparison value [779] if(gfx_init_screen2::cy#1!=rangelast(0,$18)) goto gfx_init_screen2::@1 to (number) $19 +Resolved ranged next value [792] gfx_init_screen3::cx#1 ← ++ gfx_init_screen3::cx#2 to ++ +Resolved ranged comparison value [794] if(gfx_init_screen3::cx#1!=rangelast(0,$27)) goto gfx_init_screen3::@2 to (number) $28 +Resolved ranged next value [795] gfx_init_screen3::cy#1 ← ++ gfx_init_screen3::cy#4 to ++ +Resolved ranged comparison value [797] if(gfx_init_screen3::cy#1!=rangelast(0,$18)) goto gfx_init_screen3::@1 to (number) $19 +Resolved ranged next value [806] gfx_init_screen4::cx#1 ← ++ gfx_init_screen4::cx#2 to ++ +Resolved ranged comparison value [808] if(gfx_init_screen4::cx#1!=rangelast(0,$27)) goto gfx_init_screen4::@2 to (number) $28 +Resolved ranged next value [809] gfx_init_screen4::cy#1 ← ++ gfx_init_screen4::cy#4 to ++ +Resolved ranged comparison value [811] if(gfx_init_screen4::cy#1!=rangelast(0,$18)) goto gfx_init_screen4::@1 to (number) $19 +Resolved ranged next value [845] gfx_init_plane_8bppchunky::x#1 ← ++ gfx_init_plane_8bppchunky::x#2 to ++ +Resolved ranged comparison value [847] if(gfx_init_plane_8bppchunky::x#1!=rangelast(0,$13f)) goto gfx_init_plane_8bppchunky::@2 to (number) $140 +Resolved ranged next value [852] gfx_init_plane_8bppchunky::y#1 ← ++ gfx_init_plane_8bppchunky::y#6 to ++ +Resolved ranged comparison value [854] if(gfx_init_plane_8bppchunky::y#1!=rangelast(0,$c7)) goto gfx_init_plane_8bppchunky::@1 to (number) $c8 +Resolved ranged next value [875] gfx_init_plane_horisontal::ax#1 ← ++ gfx_init_plane_horisontal::ax#2 to ++ +Resolved ranged comparison value [877] if(gfx_init_plane_horisontal::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal::@2 to (number) $28 +Resolved ranged next value [878] gfx_init_plane_horisontal::ay#1 ← ++ gfx_init_plane_horisontal::ay#4 to ++ +Resolved ranged comparison value [880] if(gfx_init_plane_horisontal::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal::@1 to (number) $c8 +Resolved ranged next value [897] gfx_init_plane_horisontal2::ax#1 ← ++ gfx_init_plane_horisontal2::ax#2 to ++ +Resolved ranged comparison value [899] if(gfx_init_plane_horisontal2::ax#1!=rangelast(0,$27)) goto gfx_init_plane_horisontal2::@2 to (number) $28 +Resolved ranged next value [900] gfx_init_plane_horisontal2::ay#1 ← ++ gfx_init_plane_horisontal2::ay#4 to ++ +Resolved ranged comparison value [902] if(gfx_init_plane_horisontal2::ay#1!=rangelast(0,$c7)) goto gfx_init_plane_horisontal2::@1 to (number) $c8 +Resolved ranged next value [917] gfx_init_plane_vertical::bx#1 ← ++ gfx_init_plane_vertical::bx#2 to ++ +Resolved ranged comparison value [919] if(gfx_init_plane_vertical::bx#1!=rangelast(0,$27)) goto gfx_init_plane_vertical::@2 to (number) $28 +Resolved ranged next value [920] gfx_init_plane_vertical::by#1 ← ++ gfx_init_plane_vertical::by#4 to ++ +Resolved ranged comparison value [922] if(gfx_init_plane_vertical::by#1!=rangelast(0,$c7)) goto gfx_init_plane_vertical::@1 to (number) $c8 +Resolved ranged next value [951] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_plane_charset8::cp#2 to ++ +Resolved ranged comparison value [953] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8 +Resolved ranged next value [954] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++ +Resolved ranged comparison value [956] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8 +Resolved ranged next value [957] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++ +Resolved ranged comparison value [959] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0 +Resolved ranged next value [993] gfx_init_plane_fill::bx#1 ← ++ gfx_init_plane_fill::bx#2 to ++ +Resolved ranged comparison value [995] if(gfx_init_plane_fill::bx#1!=rangelast(0,$27)) goto gfx_init_plane_fill::@2 to (number) $28 +Resolved ranged next value [996] gfx_init_plane_fill::by#1 ← ++ gfx_init_plane_fill::by#4 to ++ +Resolved ranged comparison value [998] if(gfx_init_plane_fill::by#1!=rangelast(0,$c7)) goto gfx_init_plane_fill::@1 to (number) $c8 +Resolved ranged next value [1039] form_mode::i#1 ← ++ form_mode::i#2 to ++ +Resolved ranged comparison value [1041] if(form_mode::i#1!=rangelast(0,$f)) goto form_mode::@1 to (number) $10 +Resolved ranged next value [1076] form_set_screen::y#1 ← ++ form_set_screen::y#2 to ++ +Resolved ranged comparison value [1078] if(form_set_screen::y#1!=rangelast(0,$18)) goto form_set_screen::@1 to (number) $19 +Converting *(pointer+n) to pointer[n] [1095] *((byte*) form_render_values::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_render_values::idx#2)) -- *(form_field_ptr::line#0 + form_field_ptr::x#0) Successful SSA optimization Pass2InlineDerefIdx Simplifying constant evaluating to zero (const dword) PLANE_HORISONTAL&(word) $3fff in Simplifying constant evaluating to zero (const dword) PLANE_HORISONTAL2&(word) $3fff in Simplifying constant evaluating to zero (const dword) PLANE_CHARSET8&(word) $3fff in -Simplifying constant evaluating to zero (byte)(dword)(const byte*) FORM_CHARSET/(dword) $10000 in [1325] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) FORM_CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [1327] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 -Simplifying constant evaluating to zero (byte)(word)(const byte*) FORM_CHARSET/(word) $4000 in [1329] *((const byte*) CIA2_PORT_A) ← (byte) 3^(byte)(word)(const byte*) FORM_CHARSET/(word) $4000 -Simplifying constant evaluating to zero <(const byte*) FORM_SCREEN in [1334] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) FORM_SCREEN +Simplifying constant evaluating to zero (byte)(dword)(const byte*) FORM_CHARSET/(dword) $10000 in [1024] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) FORM_CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [1026] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 +Simplifying constant evaluating to zero (byte)(word)(const byte*) FORM_CHARSET/(word) $4000 in [1028] *((const byte*) CIA2_PORT_A) ← (byte) 3^(byte)(word)(const byte*) FORM_CHARSET/(word) $4000 +Simplifying constant evaluating to zero <(const byte*) FORM_SCREEN in [1033] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) FORM_SCREEN Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero form_fields_val in Simplifying expression containing zero $4000 in Simplifying expression containing zero $4000 in Simplifying expression containing zero $4000 in -Simplifying expression containing zero KEY_MODIFIER_LSHIFT in [179] (byte) keyboard_modifiers#2 ← (const byte) keyboard_modifiers#1 | (const byte) KEY_MODIFIER_LSHIFT -Simplifying expression containing zero bitmap_plot_xhi in [274] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero bitmap_plot_xlo in [274] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero DTV_LINEAR in [735] (byte) gfx_mode::dtv_control#1 ← (const byte) gfx_mode::dtv_control#0 | (const byte) DTV_LINEAR -Simplifying expression containing zero 3 in [1329] *((const byte*) CIA2_PORT_A) ← (byte) 3^(byte) 0 +Simplifying expression containing zero KEY_MODIFIER_LSHIFT in [119] (byte) keyboard_modifiers#2 ← (const byte) keyboard_modifiers#1 | (const byte) KEY_MODIFIER_LSHIFT +Simplifying expression containing zero bitmap_plot_xhi in [188] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero bitmap_plot_xlo in [188] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero DTV_LINEAR in [532] (byte) gfx_mode::dtv_control#1 ← (const byte) gfx_mode::dtv_control#0 | (const byte) DTV_LINEAR +Simplifying expression containing zero 3 in [1028] *((const byte*) CIA2_PORT_A) ← (byte) 3^(byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [37] (void*) memset::return#2 ← (void*) memset::str#0 Eliminating unused variable - keeping the phi block (byte*) print_screen#13 @@ -8350,7 +8343,6 @@ Eliminating unused variable (byte) gfx_init_plane_charset8::gfxbCpuBank#1 and as Eliminating unused variable (byte) gfx_init_plane_fill::gfxbCpuBank#1 and assignment [689] (byte) gfx_init_plane_fill::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_fill::gfxbCpuBank#0 Eliminating unused variable - keeping the phi block (byte) keyboard_modifiers#44 Eliminating unused variable (byte*) form_render_values::field#0 and assignment [769] (byte*) form_render_values::field#0 ← (byte*) form_field_ptr::return#2 -Eliminating unused variable (byte*) form_control::field#0 and assignment [776] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 Eliminating unused constant (const byte) bitmap_line::xd#0 Eliminating unused constant (const byte) bitmap_line::yd#0 Eliminating unused constant (const byte*) apply_preset::preset#0 @@ -8359,11 +8351,9 @@ Successful SSA optimization PassNEliminateUnusedVars Eliminating unused variable - keeping the phi block (byte) keyboard_modifiers#24 Eliminating unused variable - keeping the phi block (byte) keyboard_modifiers#13 Eliminating unused variable (byte*) form_field_ptr::return#2 and assignment [762] (byte*) form_field_ptr::return#2 ← (byte*) form_field_ptr::return#0 -Eliminating unused variable (byte*) form_field_ptr::return#3 and assignment [768] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 Eliminating unused constant (const byte*) print_screen#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused variable - keeping the phi block (byte) keyboard_modifiers#11 -Eliminating unused variable (byte*) form_field_ptr::return#0 and assignment [756] (byte*) form_field_ptr::return#0 ← (byte*) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 Eliminating unused constant (const byte) keyboard_modifiers#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return @@ -8499,9 +8489,9 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte) keyboard_events_size#45 (byte) keyboard_events_size#24 Successful SSA optimization Pass2IdenticalPhiElimination Constant right-side identified [114] (byte~) bitmap_init::$1 ← > (const byte*) bitmap_init::bitmap#0 -Constant right-side identified [370] (byte) gfx_mode::vic_control#1 ← (const byte) gfx_mode::vic_control#0 | (const byte) VIC_ECM -Constant right-side identified [447] (byte) gfx_mode::vic_control2#1 ← (const byte) gfx_mode::vic_control2#0 | (const byte) VIC_MCM -Constant right-side identified [590] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#1 ← ++ (const byte) gfx_init_plane_8bppchunky::gfxbCpuBank#0 +Constant right-side identified [369] (byte) gfx_mode::vic_control#1 ← (const byte) gfx_mode::vic_control#0 | (const byte) VIC_ECM +Constant right-side identified [444] (byte) gfx_mode::vic_control2#1 ← (const byte) gfx_mode::vic_control2#0 | (const byte) VIC_MCM +Constant right-side identified [587] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#1 ← ++ (const byte) gfx_init_plane_8bppchunky::gfxbCpuBank#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) keyboard_modifiers#2 = KEY_MODIFIER_LSHIFT Constant (const byte) bitmap_init::$1 = >bitmap_init::bitmap#0 @@ -9138,25 +9128,25 @@ Calls in [keyboard_event_scan] to keyboard_matrix_read:202 keyboard_event_presse Calls in [form_mode] to print_set_screen:338 print_cls:340 print_str_lines:342 print_set_screen:344 print_cls:346 print_str_lines:348 form_set_screen:350 form_render_values:352 render_preset_name:355 form_control:382 apply_preset:389 form_render_values:391 render_preset_name:394 Calls in [render_preset_name] to print_str_at:419 Calls in [form_render_values] to form_field_ptr:448 -Calls in [form_control] to form_field_ptr:489 keyboard_event_scan:498 keyboard_event_get:500 -Calls in [print_str_lines] to print_ln:571 -Calls in [print_cls] to memset:586 -Calls in [gfx_init] to gfx_init_screen0:603 gfx_init_screen1:605 gfx_init_screen2:607 gfx_init_screen3:609 gfx_init_screen4:611 gfx_init_charset:613 gfx_init_vic_bitmap:615 gfx_init_plane_8bppchunky:617 gfx_init_plane_charset8:619 gfx_init_plane_horisontal:621 gfx_init_plane_vertical:623 gfx_init_plane_horisontal2:625 gfx_init_plane_vertical2:627 gfx_init_plane_blank:629 gfx_init_plane_full:631 -Calls in [gfx_init_plane_full] to gfx_init_plane_fill:635 -Calls in [gfx_init_plane_fill] to dtvSetCpuBankSegment1:644 dtvSetCpuBankSegment1:659 -Calls in [gfx_init_plane_blank] to gfx_init_plane_fill:671 -Calls in [gfx_init_plane_vertical2] to gfx_init_plane_fill:675 -Calls in [gfx_init_plane_horisontal2] to dtvSetCpuBankSegment1:679 dtvSetCpuBankSegment1:693 -Calls in [gfx_init_plane_vertical] to dtvSetCpuBankSegment1:701 dtvSetCpuBankSegment1:713 -Calls in [gfx_init_plane_horisontal] to dtvSetCpuBankSegment1:721 dtvSetCpuBankSegment1:737 -Calls in [gfx_init_plane_charset8] to dtvSetCpuBankSegment1:748 dtvSetCpuBankSegment1:776 -Calls in [gfx_init_plane_8bppchunky] to dtvSetCpuBankSegment1:792 dtvSetCpuBankSegment1:801 dtvSetCpuBankSegment1:814 -Calls in [gfx_init_vic_bitmap] to bitmap_init:826 bitmap_clear:828 bitmap_line:837 -Calls in [bitmap_line] to bitmap_line_ydxi:855 bitmap_line_xdyi:868 bitmap_line_ydxd:882 bitmap_line_xdyd:894 bitmap_line_ydxd:910 bitmap_line_xdyd:922 bitmap_line_ydxi:936 bitmap_line_xdyi:948 -Calls in [bitmap_line_xdyi] to bitmap_plot:960 -Calls in [bitmap_line_ydxi] to bitmap_plot:994 -Calls in [bitmap_line_xdyd] to bitmap_plot:1021 -Calls in [bitmap_line_ydxd] to bitmap_plot:1048 +Calls in [form_control] to form_field_ptr:490 keyboard_event_scan:501 keyboard_event_get:503 +Calls in [print_str_lines] to print_ln:574 +Calls in [print_cls] to memset:589 +Calls in [gfx_init] to gfx_init_screen0:606 gfx_init_screen1:608 gfx_init_screen2:610 gfx_init_screen3:612 gfx_init_screen4:614 gfx_init_charset:616 gfx_init_vic_bitmap:618 gfx_init_plane_8bppchunky:620 gfx_init_plane_charset8:622 gfx_init_plane_horisontal:624 gfx_init_plane_vertical:626 gfx_init_plane_horisontal2:628 gfx_init_plane_vertical2:630 gfx_init_plane_blank:632 gfx_init_plane_full:634 +Calls in [gfx_init_plane_full] to gfx_init_plane_fill:638 +Calls in [gfx_init_plane_fill] to dtvSetCpuBankSegment1:647 dtvSetCpuBankSegment1:662 +Calls in [gfx_init_plane_blank] to gfx_init_plane_fill:674 +Calls in [gfx_init_plane_vertical2] to gfx_init_plane_fill:678 +Calls in [gfx_init_plane_horisontal2] to dtvSetCpuBankSegment1:682 dtvSetCpuBankSegment1:696 +Calls in [gfx_init_plane_vertical] to dtvSetCpuBankSegment1:704 dtvSetCpuBankSegment1:716 +Calls in [gfx_init_plane_horisontal] to dtvSetCpuBankSegment1:724 dtvSetCpuBankSegment1:740 +Calls in [gfx_init_plane_charset8] to dtvSetCpuBankSegment1:751 dtvSetCpuBankSegment1:779 +Calls in [gfx_init_plane_8bppchunky] to dtvSetCpuBankSegment1:795 dtvSetCpuBankSegment1:804 dtvSetCpuBankSegment1:817 +Calls in [gfx_init_vic_bitmap] to bitmap_init:829 bitmap_clear:831 bitmap_line:840 +Calls in [bitmap_line] to bitmap_line_ydxi:858 bitmap_line_xdyi:871 bitmap_line_ydxd:885 bitmap_line_xdyd:897 bitmap_line_ydxd:913 bitmap_line_xdyd:925 bitmap_line_ydxi:939 bitmap_line_xdyi:951 +Calls in [bitmap_line_xdyi] to bitmap_plot:963 +Calls in [bitmap_line_ydxi] to bitmap_plot:997 +Calls in [bitmap_line_xdyd] to bitmap_plot:1024 +Calls in [bitmap_line_ydxd] to bitmap_plot:1051 Created 192 initial phi equivalence classes Coalesced [21] form_cursor_count#61 ← form_cursor_count#16 @@ -9236,225 +9226,225 @@ Coalesced [440] print_str_at::str#6 ← print_str_at::str#0 Coalesced [441] print_str_at::at#5 ← print_str_at::at#0 Coalesced [447] form_field_ptr::field_idx#4 ← form_field_ptr::field_idx#0 Coalesced [451] form_render_values::idx#5 ← form_render_values::idx#1 -Coalesced [475] apply_preset::i#4 ← apply_preset::i#1 -Coalesced [488] form_field_ptr::field_idx#3 ← form_field_ptr::field_idx#1 -Coalesced (already) [497] keyboard_events_size#145 ← keyboard_events_size#47 -Coalesced [512] form_field_idx#74 ← form_field_idx#31 -Coalesced [515] form_field_idx#71 ← form_field_idx#6 -Coalesced [519] form_field_idx#72 ← form_field_idx#5 -Coalesced [527] form_cursor_count#67 ← form_cursor_count#15 -Coalesced (already) [528] form_field_idx#75 ← form_field_idx#28 -Coalesced (already) [533] form_cursor_count#66 ← form_cursor_count#15 -Coalesced (already) [534] form_field_idx#73 ← form_field_idx#28 -Coalesced (already) [535] form_cursor_count#68 ← form_cursor_count#15 -Coalesced (already) [536] form_field_idx#76 ← form_field_idx#28 -Coalesced [539] form_cursor_count#65 ← form_cursor_count#5 -Coalesced [550] form_set_screen::line#3 ← form_set_screen::line#1 -Coalesced [551] form_set_screen::y#3 ← form_set_screen::y#1 -Coalesced [553] print_str_lines::str#10 ← print_str_lines::str#5 -Not coalescing [554] print_char_cursor#67 ← print_screen#1 -Coalesced [555] print_line_cursor#67 ← print_screen#1 -Coalesced [559] print_str_lines::str#12 ← print_str_lines::str#3 -Coalesced [560] print_char_cursor#69 ← print_char_cursor#22 -Coalesced [567] print_char_cursor#72 ← print_char_cursor#1 -Coalesced [572] print_str_lines::str#11 ← print_str_lines::str#0 -Not coalescing [573] print_char_cursor#68 ← print_line_cursor#22 -Coalesced [574] print_line_cursor#68 ← print_line_cursor#22 -Coalesced (already) [575] print_str_lines::str#13 ← print_str_lines::str#0 -Coalesced [576] print_char_cursor#70 ← print_char_cursor#38 -Coalesced (already) [577] print_char_cursor#71 ← print_char_cursor#20 -Coalesced [578] print_line_cursor#69 ← print_line_cursor#2 -Coalesced (already) [584] print_line_cursor#70 ← print_line_cursor#22 -Coalesced [598] memset::dst#5 ← memset::dst#1 -Coalesced [600] print_screen#1 ← print_set_screen::screen#2 -Coalesced [643] dtvSetCpuBankSegment1::cpuBankIdx#15 ← dtvSetCpuBankSegment1::cpuBankIdx#11 -Coalesced [650] gfx_init_plane_fill::gfxb#7 ← gfx_init_plane_fill::gfxb#3 -Coalesced [662] gfx_init_plane_fill::gfxb#5 ← gfx_init_plane_fill::gfxb#1 -Coalesced [663] gfx_init_plane_fill::by#5 ← gfx_init_plane_fill::by#1 -Coalesced (already) [664] gfx_init_plane_fill::gfxb#8 ← gfx_init_plane_fill::gfxb#1 -Coalesced [665] gfx_init_plane_fill::bx#3 ← gfx_init_plane_fill::bx#1 -Coalesced [682] gfx_init_plane_horisontal2::gfxa#6 ← gfx_init_plane_horisontal2::gfxa#3 -Coalesced [696] gfx_init_plane_horisontal2::ay#5 ← gfx_init_plane_horisontal2::ay#1 -Coalesced [697] gfx_init_plane_horisontal2::gfxa#5 ← gfx_init_plane_horisontal2::gfxa#1 -Coalesced (already) [698] gfx_init_plane_horisontal2::gfxa#7 ← gfx_init_plane_horisontal2::gfxa#1 -Coalesced [699] gfx_init_plane_horisontal2::ax#3 ← gfx_init_plane_horisontal2::ax#1 -Coalesced [704] gfx_init_plane_vertical::gfxb#6 ← gfx_init_plane_vertical::gfxb#3 -Coalesced [716] gfx_init_plane_vertical::gfxb#5 ← gfx_init_plane_vertical::gfxb#1 -Coalesced [717] gfx_init_plane_vertical::by#5 ← gfx_init_plane_vertical::by#1 -Coalesced (already) [718] gfx_init_plane_vertical::gfxb#7 ← gfx_init_plane_vertical::gfxb#1 -Coalesced [719] gfx_init_plane_vertical::bx#3 ← gfx_init_plane_vertical::bx#1 -Coalesced [724] gfx_init_plane_horisontal::gfxa#10 ← gfx_init_plane_horisontal::gfxa#6 -Coalesced [730] gfx_init_plane_horisontal::gfxa#13 ← gfx_init_plane_horisontal::gfxa#2 -Coalesced [740] gfx_init_plane_horisontal::ay#8 ← gfx_init_plane_horisontal::ay#1 -Coalesced [741] gfx_init_plane_horisontal::gfxa#9 ← gfx_init_plane_horisontal::gfxa#7 -Coalesced (already) [742] gfx_init_plane_horisontal::gfxa#11 ← gfx_init_plane_horisontal::gfxa#7 -Coalesced [743] gfx_init_plane_horisontal::ax#6 ← gfx_init_plane_horisontal::ax#1 -Coalesced [746] gfx_init_plane_horisontal::gfxa#12 ← gfx_init_plane_horisontal::gfxa#1 -Coalesced [751] gfx_init_plane_charset8::chargen#10 ← gfx_init_plane_charset8::chargen#3 -Coalesced [752] gfx_init_plane_charset8::gfxa#10 ← gfx_init_plane_charset8::gfxa#6 -Coalesced [753] gfx_init_plane_charset8::col#10 ← gfx_init_plane_charset8::col#6 -Coalesced [757] gfx_init_plane_charset8::bits#5 ← gfx_init_plane_charset8::bits#0 -Coalesced [758] gfx_init_plane_charset8::gfxa#12 ← gfx_init_plane_charset8::gfxa#5 -Coalesced [759] gfx_init_plane_charset8::col#12 ← gfx_init_plane_charset8::col#5 -Not coalescing [763] gfx_init_plane_charset8::c#3 ← gfx_init_plane_charset8::col#2 -Coalesced [779] gfx_init_plane_charset8::chargen#9 ← gfx_init_plane_charset8::chargen#1 -Coalesced [780] gfx_init_plane_charset8::gfxa#9 ← gfx_init_plane_charset8::gfxa#1 -Coalesced [781] gfx_init_plane_charset8::col#9 ← gfx_init_plane_charset8::col#1 -Coalesced [782] gfx_init_plane_charset8::ch#9 ← gfx_init_plane_charset8::ch#1 -Coalesced (already) [783] gfx_init_plane_charset8::chargen#11 ← gfx_init_plane_charset8::chargen#1 -Coalesced (already) [784] gfx_init_plane_charset8::gfxa#11 ← gfx_init_plane_charset8::gfxa#1 -Coalesced (already) [785] gfx_init_plane_charset8::col#11 ← gfx_init_plane_charset8::col#1 -Coalesced [786] gfx_init_plane_charset8::cr#7 ← gfx_init_plane_charset8::cr#1 -Coalesced [787] gfx_init_plane_charset8::bits#6 ← gfx_init_plane_charset8::bits#1 -Coalesced (already) [788] gfx_init_plane_charset8::gfxa#13 ← gfx_init_plane_charset8::gfxa#1 -Coalesced (already) [789] gfx_init_plane_charset8::col#13 ← gfx_init_plane_charset8::col#1 -Coalesced [790] gfx_init_plane_charset8::cp#5 ← gfx_init_plane_charset8::cp#1 -Coalesced [795] gfx_init_plane_8bppchunky::gfxb#8 ← gfx_init_plane_8bppchunky::gfxb#5 -Coalesced [796] gfx_init_plane_8bppchunky::gfxbCpuBank#11 ← gfx_init_plane_8bppchunky::gfxbCpuBank#7 -Coalesced [800] dtvSetCpuBankSegment1::cpuBankIdx#14 ← dtvSetCpuBankSegment1::cpuBankIdx#1 -Coalesced [803] gfx_init_plane_8bppchunky::gfxbCpuBank#14 ← gfx_init_plane_8bppchunky::gfxbCpuBank#2 -Coalesced [817] gfx_init_plane_8bppchunky::gfxb#7 ← gfx_init_plane_8bppchunky::gfxb#1 -Coalesced [818] gfx_init_plane_8bppchunky::y#8 ← gfx_init_plane_8bppchunky::y#1 -Coalesced [819] gfx_init_plane_8bppchunky::gfxbCpuBank#10 ← gfx_init_plane_8bppchunky::gfxbCpuBank#8 -Coalesced (already) [820] gfx_init_plane_8bppchunky::gfxb#9 ← gfx_init_plane_8bppchunky::gfxb#1 -Coalesced [821] gfx_init_plane_8bppchunky::x#6 ← gfx_init_plane_8bppchunky::x#1 -Coalesced (already) [822] gfx_init_plane_8bppchunky::gfxbCpuBank#12 ← gfx_init_plane_8bppchunky::gfxbCpuBank#8 -Coalesced [823] gfx_init_plane_8bppchunky::gfxb#10 ← gfx_init_plane_8bppchunky::gfxb#3 -Coalesced (already) [824] gfx_init_plane_8bppchunky::gfxbCpuBank#13 ← gfx_init_plane_8bppchunky::gfxbCpuBank#4 -Coalesced [839] gfx_init_vic_bitmap::l#5 ← gfx_init_vic_bitmap::l#1 -Coalesced [850] bitmap_line_ydxi::xd#8 ← bitmap_line_ydxi::xd#0 -Coalesced [851] bitmap_line_ydxi::x#9 ← bitmap_line_ydxi::x#0 -Coalesced [852] bitmap_line_ydxi::y#9 ← bitmap_line_ydxi::y#0 -Coalesced [853] bitmap_line_ydxi::yd#8 ← bitmap_line_ydxi::yd#0 -Coalesced [854] bitmap_line_ydxi::y1#8 ← bitmap_line_ydxi::y1#0 -Coalesced [863] bitmap_line_xdyi::yd#7 ← bitmap_line_xdyi::yd#0 -Coalesced [864] bitmap_line_xdyi::x#8 ← bitmap_line_xdyi::x#0 -Coalesced [865] bitmap_line_xdyi::y#8 ← bitmap_line_xdyi::y#0 -Coalesced [866] bitmap_line_xdyi::xd#7 ← bitmap_line_xdyi::xd#0 -Coalesced [867] bitmap_line_xdyi::x1#7 ← bitmap_line_xdyi::x1#0 -Coalesced [877] bitmap_line_ydxd::xd#7 ← bitmap_line_ydxd::xd#0 -Coalesced [878] bitmap_line_ydxd::x#8 ← bitmap_line_ydxd::x#0 -Coalesced [879] bitmap_line_ydxd::y#9 ← bitmap_line_ydxd::y#0 -Coalesced [880] bitmap_line_ydxd::yd#7 ← bitmap_line_ydxd::yd#0 -Coalesced [881] bitmap_line_ydxd::y1#7 ← bitmap_line_ydxd::y1#0 -Coalesced [889] bitmap_line_xdyd::yd#7 ← bitmap_line_xdyd::yd#0 -Coalesced [890] bitmap_line_xdyd::x#8 ← bitmap_line_xdyd::x#0 -Coalesced [891] bitmap_line_xdyd::y#8 ← bitmap_line_xdyd::y#0 -Coalesced [892] bitmap_line_xdyd::xd#7 ← bitmap_line_xdyd::xd#0 -Coalesced [893] bitmap_line_xdyd::x1#7 ← bitmap_line_xdyd::x1#0 -Coalesced [905] bitmap_line_ydxd::xd#8 ← bitmap_line_ydxd::xd#1 -Coalesced [906] bitmap_line_ydxd::x#9 ← bitmap_line_ydxd::x#1 -Coalesced [907] bitmap_line_ydxd::y#10 ← bitmap_line_ydxd::y#1 -Coalesced [908] bitmap_line_ydxd::yd#8 ← bitmap_line_ydxd::yd#1 -Coalesced [909] bitmap_line_ydxd::y1#8 ← bitmap_line_ydxd::y1#1 -Coalesced [917] bitmap_line_xdyd::yd#8 ← bitmap_line_xdyd::yd#1 -Coalesced [918] bitmap_line_xdyd::x#9 ← bitmap_line_xdyd::x#1 -Coalesced [919] bitmap_line_xdyd::y#9 ← bitmap_line_xdyd::y#1 -Coalesced [920] bitmap_line_xdyd::xd#8 ← bitmap_line_xdyd::xd#1 -Coalesced [921] bitmap_line_xdyd::x1#8 ← bitmap_line_xdyd::x1#1 -Coalesced [931] bitmap_line_ydxi::xd#7 ← bitmap_line_ydxi::xd#1 -Coalesced [932] bitmap_line_ydxi::x#8 ← bitmap_line_ydxi::x#1 -Coalesced [933] bitmap_line_ydxi::y#8 ← bitmap_line_ydxi::y#1 -Coalesced [934] bitmap_line_ydxi::yd#7 ← bitmap_line_ydxi::yd#1 -Coalesced [935] bitmap_line_ydxi::y1#7 ← bitmap_line_ydxi::y1#1 -Coalesced [943] bitmap_line_xdyi::yd#8 ← bitmap_line_xdyi::yd#1 -Coalesced [944] bitmap_line_xdyi::x#9 ← bitmap_line_xdyi::x#1 -Coalesced [945] bitmap_line_xdyi::y#9 ← bitmap_line_xdyi::y#1 -Coalesced [946] bitmap_line_xdyi::xd#8 ← bitmap_line_xdyi::xd#1 -Coalesced [947] bitmap_line_xdyi::x1#8 ← bitmap_line_xdyi::x1#1 -Coalesced [952] bitmap_line_xdyi::x#10 ← bitmap_line_xdyi::x#6 -Coalesced [953] bitmap_line_xdyi::y#10 ← bitmap_line_xdyi::y#5 -Coalesced [954] bitmap_line_xdyi::e#7 ← bitmap_line_xdyi::e#0 -Coalesced [958] bitmap_plot::x#6 ← bitmap_plot::x#0 -Coalesced [959] bitmap_plot::y#6 ← bitmap_plot::y#0 -Coalesced [966] bitmap_line_xdyi::y#12 ← bitmap_line_xdyi::y#2 -Coalesced [967] bitmap_line_xdyi::e#9 ← bitmap_line_xdyi::e#2 -Coalesced [972] bitmap_line_xdyi::x#11 ← bitmap_line_xdyi::x#2 -Coalesced [973] bitmap_line_xdyi::y#11 ← bitmap_line_xdyi::y#6 -Coalesced [974] bitmap_line_xdyi::e#8 ← bitmap_line_xdyi::e#6 -Coalesced (already) [975] bitmap_line_xdyi::y#13 ← bitmap_line_xdyi::y#3 -Coalesced [976] bitmap_line_xdyi::e#10 ← bitmap_line_xdyi::e#1 -Coalesced [986] bitmap_line_ydxi::x#10 ← bitmap_line_ydxi::x#5 -Coalesced [987] bitmap_line_ydxi::y#10 ← bitmap_line_ydxi::y#6 -Coalesced [988] bitmap_line_ydxi::e#7 ← bitmap_line_ydxi::e#0 -Coalesced [992] bitmap_plot::x#8 ← bitmap_plot::x#2 -Coalesced [993] bitmap_plot::y#8 ← bitmap_plot::y#2 -Coalesced [1000] bitmap_line_ydxi::x#12 ← bitmap_line_ydxi::x#2 -Coalesced [1001] bitmap_line_ydxi::e#9 ← bitmap_line_ydxi::e#2 -Coalesced [1006] bitmap_line_ydxi::x#11 ← bitmap_line_ydxi::x#6 -Coalesced [1007] bitmap_line_ydxi::y#11 ← bitmap_line_ydxi::y#2 -Coalesced [1008] bitmap_line_ydxi::e#8 ← bitmap_line_ydxi::e#6 -Coalesced (already) [1009] bitmap_line_ydxi::x#13 ← bitmap_line_ydxi::x#3 -Coalesced [1010] bitmap_line_ydxi::e#10 ← bitmap_line_ydxi::e#1 -Coalesced [1013] bitmap_line_xdyd::x#10 ← bitmap_line_xdyd::x#6 -Coalesced [1014] bitmap_line_xdyd::y#10 ← bitmap_line_xdyd::y#5 -Coalesced [1015] bitmap_line_xdyd::e#7 ← bitmap_line_xdyd::e#0 -Coalesced [1019] bitmap_plot::x#5 ← bitmap_plot::x#1 -Coalesced [1020] bitmap_plot::y#5 ← bitmap_plot::y#1 -Coalesced [1027] bitmap_line_xdyd::y#12 ← bitmap_line_xdyd::y#2 -Coalesced [1028] bitmap_line_xdyd::e#9 ← bitmap_line_xdyd::e#2 -Coalesced [1033] bitmap_line_xdyd::x#11 ← bitmap_line_xdyd::x#2 -Coalesced [1034] bitmap_line_xdyd::y#11 ← bitmap_line_xdyd::y#6 -Coalesced [1035] bitmap_line_xdyd::e#8 ← bitmap_line_xdyd::e#6 -Coalesced (already) [1036] bitmap_line_xdyd::y#13 ← bitmap_line_xdyd::y#3 -Coalesced [1037] bitmap_line_xdyd::e#10 ← bitmap_line_xdyd::e#1 -Coalesced [1040] bitmap_line_ydxd::x#10 ← bitmap_line_ydxd::x#5 -Coalesced [1041] bitmap_line_ydxd::y#11 ← bitmap_line_ydxd::y#7 -Coalesced [1042] bitmap_line_ydxd::e#7 ← bitmap_line_ydxd::e#0 -Coalesced [1046] bitmap_plot::x#7 ← bitmap_plot::x#3 -Coalesced [1047] bitmap_plot::y#7 ← bitmap_plot::y#3 -Coalesced [1054] bitmap_line_ydxd::x#12 ← bitmap_line_ydxd::x#2 -Coalesced [1055] bitmap_line_ydxd::e#9 ← bitmap_line_ydxd::e#2 -Coalesced [1060] bitmap_line_ydxd::x#11 ← bitmap_line_ydxd::x#6 -Coalesced [1061] bitmap_line_ydxd::y#12 ← bitmap_line_ydxd::y#3 -Coalesced [1062] bitmap_line_ydxd::e#8 ← bitmap_line_ydxd::e#6 -Coalesced (already) [1063] bitmap_line_ydxd::x#13 ← bitmap_line_ydxd::x#3 -Coalesced [1064] bitmap_line_ydxd::e#10 ← bitmap_line_ydxd::e#1 -Coalesced [1068] bitmap_clear::bitmap#7 ← bitmap_clear::bitmap#3 -Coalesced [1077] bitmap_clear::bitmap#6 ← bitmap_clear::bitmap#1 -Coalesced [1078] bitmap_clear::y#5 ← bitmap_clear::y#1 -Coalesced (already) [1079] bitmap_clear::bitmap#8 ← bitmap_clear::bitmap#1 -Coalesced [1080] bitmap_clear::x#3 ← bitmap_clear::x#1 -Coalesced [1103] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 -Coalesced [1108] bitmap_init::y#5 ← bitmap_init::y#1 -Coalesced [1109] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 -Coalesced (already) [1110] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 -Coalesced [1111] bitmap_init::x#5 ← bitmap_init::x#1 -Coalesced [1112] bitmap_init::bits#5 ← bitmap_init::bits#4 -Coalesced [1113] bitmap_init::bits#6 ← bitmap_init::bits#1 -Coalesced [1116] gfx_init_charset::chargen#6 ← gfx_init_charset::chargen#3 -Coalesced [1117] gfx_init_charset::charset#6 ← gfx_init_charset::charset#3 -Coalesced [1128] gfx_init_charset::chargen#5 ← gfx_init_charset::chargen#1 -Coalesced [1129] gfx_init_charset::charset#5 ← gfx_init_charset::charset#1 -Coalesced [1130] gfx_init_charset::c#5 ← gfx_init_charset::c#1 -Coalesced (already) [1131] gfx_init_charset::chargen#7 ← gfx_init_charset::chargen#1 -Coalesced (already) [1132] gfx_init_charset::charset#7 ← gfx_init_charset::charset#1 -Coalesced [1133] gfx_init_charset::l#3 ← gfx_init_charset::l#1 -Coalesced [1136] gfx_init_screen4::ch#6 ← gfx_init_screen4::ch#3 -Coalesced [1145] gfx_init_screen4::ch#5 ← gfx_init_screen4::ch#1 -Coalesced [1146] gfx_init_screen4::cy#5 ← gfx_init_screen4::cy#1 -Coalesced (already) [1147] gfx_init_screen4::ch#7 ← gfx_init_screen4::ch#1 -Coalesced [1148] gfx_init_screen4::cx#3 ← gfx_init_screen4::cx#1 -Coalesced [1151] gfx_init_screen3::ch#6 ← gfx_init_screen3::ch#3 -Coalesced [1164] gfx_init_screen3::cy#5 ← gfx_init_screen3::cy#1 -Coalesced [1165] gfx_init_screen3::ch#5 ← gfx_init_screen3::ch#1 -Coalesced [1166] gfx_init_screen3::cx#3 ← gfx_init_screen3::cx#1 -Coalesced (already) [1167] gfx_init_screen3::ch#7 ← gfx_init_screen3::ch#1 -Coalesced [1170] gfx_init_screen2::ch#6 ← gfx_init_screen2::ch#3 -Coalesced [1184] gfx_init_screen2::cy#5 ← gfx_init_screen2::cy#1 -Coalesced [1185] gfx_init_screen2::ch#5 ← gfx_init_screen2::ch#1 -Coalesced [1186] gfx_init_screen2::cx#3 ← gfx_init_screen2::cx#1 -Coalesced (already) [1187] gfx_init_screen2::ch#7 ← gfx_init_screen2::ch#1 -Coalesced [1190] gfx_init_screen1::ch#6 ← gfx_init_screen1::ch#3 -Coalesced [1201] gfx_init_screen1::cy#5 ← gfx_init_screen1::cy#1 -Coalesced [1202] gfx_init_screen1::ch#5 ← gfx_init_screen1::ch#1 -Coalesced [1203] gfx_init_screen1::cx#3 ← gfx_init_screen1::cx#1 -Coalesced (already) [1204] gfx_init_screen1::ch#7 ← gfx_init_screen1::ch#1 -Coalesced [1207] gfx_init_screen0::ch#6 ← gfx_init_screen0::ch#3 -Coalesced [1220] gfx_init_screen0::cy#5 ← gfx_init_screen0::cy#1 -Coalesced [1221] gfx_init_screen0::ch#5 ← gfx_init_screen0::ch#1 -Coalesced [1222] gfx_init_screen0::cx#3 ← gfx_init_screen0::cx#1 -Coalesced (already) [1223] gfx_init_screen0::ch#7 ← gfx_init_screen0::ch#1 +Coalesced [476] apply_preset::i#4 ← apply_preset::i#1 +Coalesced [489] form_field_ptr::field_idx#3 ← form_field_ptr::field_idx#1 +Coalesced (already) [500] keyboard_events_size#145 ← keyboard_events_size#47 +Coalesced [515] form_field_idx#74 ← form_field_idx#31 +Coalesced [518] form_field_idx#71 ← form_field_idx#6 +Coalesced [522] form_field_idx#72 ← form_field_idx#5 +Coalesced [530] form_cursor_count#67 ← form_cursor_count#15 +Coalesced (already) [531] form_field_idx#75 ← form_field_idx#28 +Coalesced (already) [536] form_cursor_count#66 ← form_cursor_count#15 +Coalesced (already) [537] form_field_idx#73 ← form_field_idx#28 +Coalesced (already) [538] form_cursor_count#68 ← form_cursor_count#15 +Coalesced (already) [539] form_field_idx#76 ← form_field_idx#28 +Coalesced [542] form_cursor_count#65 ← form_cursor_count#5 +Coalesced [553] form_set_screen::line#3 ← form_set_screen::line#1 +Coalesced [554] form_set_screen::y#3 ← form_set_screen::y#1 +Coalesced [556] print_str_lines::str#10 ← print_str_lines::str#5 +Not coalescing [557] print_char_cursor#67 ← print_screen#1 +Coalesced [558] print_line_cursor#67 ← print_screen#1 +Coalesced [562] print_str_lines::str#12 ← print_str_lines::str#3 +Coalesced [563] print_char_cursor#69 ← print_char_cursor#22 +Coalesced [570] print_char_cursor#72 ← print_char_cursor#1 +Coalesced [575] print_str_lines::str#11 ← print_str_lines::str#0 +Not coalescing [576] print_char_cursor#68 ← print_line_cursor#22 +Coalesced [577] print_line_cursor#68 ← print_line_cursor#22 +Coalesced (already) [578] print_str_lines::str#13 ← print_str_lines::str#0 +Coalesced [579] print_char_cursor#70 ← print_char_cursor#38 +Coalesced (already) [580] print_char_cursor#71 ← print_char_cursor#20 +Coalesced [581] print_line_cursor#69 ← print_line_cursor#2 +Coalesced (already) [587] print_line_cursor#70 ← print_line_cursor#22 +Coalesced [601] memset::dst#5 ← memset::dst#1 +Coalesced [603] print_screen#1 ← print_set_screen::screen#2 +Coalesced [646] dtvSetCpuBankSegment1::cpuBankIdx#15 ← dtvSetCpuBankSegment1::cpuBankIdx#11 +Coalesced [653] gfx_init_plane_fill::gfxb#7 ← gfx_init_plane_fill::gfxb#3 +Coalesced [665] gfx_init_plane_fill::gfxb#5 ← gfx_init_plane_fill::gfxb#1 +Coalesced [666] gfx_init_plane_fill::by#5 ← gfx_init_plane_fill::by#1 +Coalesced (already) [667] gfx_init_plane_fill::gfxb#8 ← gfx_init_plane_fill::gfxb#1 +Coalesced [668] gfx_init_plane_fill::bx#3 ← gfx_init_plane_fill::bx#1 +Coalesced [685] gfx_init_plane_horisontal2::gfxa#6 ← gfx_init_plane_horisontal2::gfxa#3 +Coalesced [699] gfx_init_plane_horisontal2::ay#5 ← gfx_init_plane_horisontal2::ay#1 +Coalesced [700] gfx_init_plane_horisontal2::gfxa#5 ← gfx_init_plane_horisontal2::gfxa#1 +Coalesced (already) [701] gfx_init_plane_horisontal2::gfxa#7 ← gfx_init_plane_horisontal2::gfxa#1 +Coalesced [702] gfx_init_plane_horisontal2::ax#3 ← gfx_init_plane_horisontal2::ax#1 +Coalesced [707] gfx_init_plane_vertical::gfxb#6 ← gfx_init_plane_vertical::gfxb#3 +Coalesced [719] gfx_init_plane_vertical::gfxb#5 ← gfx_init_plane_vertical::gfxb#1 +Coalesced [720] gfx_init_plane_vertical::by#5 ← gfx_init_plane_vertical::by#1 +Coalesced (already) [721] gfx_init_plane_vertical::gfxb#7 ← gfx_init_plane_vertical::gfxb#1 +Coalesced [722] gfx_init_plane_vertical::bx#3 ← gfx_init_plane_vertical::bx#1 +Coalesced [727] gfx_init_plane_horisontal::gfxa#10 ← gfx_init_plane_horisontal::gfxa#6 +Coalesced [733] gfx_init_plane_horisontal::gfxa#13 ← gfx_init_plane_horisontal::gfxa#2 +Coalesced [743] gfx_init_plane_horisontal::ay#8 ← gfx_init_plane_horisontal::ay#1 +Coalesced [744] gfx_init_plane_horisontal::gfxa#9 ← gfx_init_plane_horisontal::gfxa#7 +Coalesced (already) [745] gfx_init_plane_horisontal::gfxa#11 ← gfx_init_plane_horisontal::gfxa#7 +Coalesced [746] gfx_init_plane_horisontal::ax#6 ← gfx_init_plane_horisontal::ax#1 +Coalesced [749] gfx_init_plane_horisontal::gfxa#12 ← gfx_init_plane_horisontal::gfxa#1 +Coalesced [754] gfx_init_plane_charset8::chargen#10 ← gfx_init_plane_charset8::chargen#3 +Coalesced [755] gfx_init_plane_charset8::gfxa#10 ← gfx_init_plane_charset8::gfxa#6 +Coalesced [756] gfx_init_plane_charset8::col#10 ← gfx_init_plane_charset8::col#6 +Coalesced [760] gfx_init_plane_charset8::bits#5 ← gfx_init_plane_charset8::bits#0 +Coalesced [761] gfx_init_plane_charset8::gfxa#12 ← gfx_init_plane_charset8::gfxa#5 +Coalesced [762] gfx_init_plane_charset8::col#12 ← gfx_init_plane_charset8::col#5 +Not coalescing [766] gfx_init_plane_charset8::c#3 ← gfx_init_plane_charset8::col#2 +Coalesced [782] gfx_init_plane_charset8::chargen#9 ← gfx_init_plane_charset8::chargen#1 +Coalesced [783] gfx_init_plane_charset8::gfxa#9 ← gfx_init_plane_charset8::gfxa#1 +Coalesced [784] gfx_init_plane_charset8::col#9 ← gfx_init_plane_charset8::col#1 +Coalesced [785] gfx_init_plane_charset8::ch#9 ← gfx_init_plane_charset8::ch#1 +Coalesced (already) [786] gfx_init_plane_charset8::chargen#11 ← gfx_init_plane_charset8::chargen#1 +Coalesced (already) [787] gfx_init_plane_charset8::gfxa#11 ← gfx_init_plane_charset8::gfxa#1 +Coalesced (already) [788] gfx_init_plane_charset8::col#11 ← gfx_init_plane_charset8::col#1 +Coalesced [789] gfx_init_plane_charset8::cr#7 ← gfx_init_plane_charset8::cr#1 +Coalesced [790] gfx_init_plane_charset8::bits#6 ← gfx_init_plane_charset8::bits#1 +Coalesced (already) [791] gfx_init_plane_charset8::gfxa#13 ← gfx_init_plane_charset8::gfxa#1 +Coalesced (already) [792] gfx_init_plane_charset8::col#13 ← gfx_init_plane_charset8::col#1 +Coalesced [793] gfx_init_plane_charset8::cp#5 ← gfx_init_plane_charset8::cp#1 +Coalesced [798] gfx_init_plane_8bppchunky::gfxb#8 ← gfx_init_plane_8bppchunky::gfxb#5 +Coalesced [799] gfx_init_plane_8bppchunky::gfxbCpuBank#11 ← gfx_init_plane_8bppchunky::gfxbCpuBank#7 +Coalesced [803] dtvSetCpuBankSegment1::cpuBankIdx#14 ← dtvSetCpuBankSegment1::cpuBankIdx#1 +Coalesced [806] gfx_init_plane_8bppchunky::gfxbCpuBank#14 ← gfx_init_plane_8bppchunky::gfxbCpuBank#2 +Coalesced [820] gfx_init_plane_8bppchunky::gfxb#7 ← gfx_init_plane_8bppchunky::gfxb#1 +Coalesced [821] gfx_init_plane_8bppchunky::y#8 ← gfx_init_plane_8bppchunky::y#1 +Coalesced [822] gfx_init_plane_8bppchunky::gfxbCpuBank#10 ← gfx_init_plane_8bppchunky::gfxbCpuBank#8 +Coalesced (already) [823] gfx_init_plane_8bppchunky::gfxb#9 ← gfx_init_plane_8bppchunky::gfxb#1 +Coalesced [824] gfx_init_plane_8bppchunky::x#6 ← gfx_init_plane_8bppchunky::x#1 +Coalesced (already) [825] gfx_init_plane_8bppchunky::gfxbCpuBank#12 ← gfx_init_plane_8bppchunky::gfxbCpuBank#8 +Coalesced [826] gfx_init_plane_8bppchunky::gfxb#10 ← gfx_init_plane_8bppchunky::gfxb#3 +Coalesced (already) [827] gfx_init_plane_8bppchunky::gfxbCpuBank#13 ← gfx_init_plane_8bppchunky::gfxbCpuBank#4 +Coalesced [842] gfx_init_vic_bitmap::l#5 ← gfx_init_vic_bitmap::l#1 +Coalesced [853] bitmap_line_ydxi::xd#8 ← bitmap_line_ydxi::xd#0 +Coalesced [854] bitmap_line_ydxi::x#9 ← bitmap_line_ydxi::x#0 +Coalesced [855] bitmap_line_ydxi::y#9 ← bitmap_line_ydxi::y#0 +Coalesced [856] bitmap_line_ydxi::yd#8 ← bitmap_line_ydxi::yd#0 +Coalesced [857] bitmap_line_ydxi::y1#8 ← bitmap_line_ydxi::y1#0 +Coalesced [866] bitmap_line_xdyi::yd#7 ← bitmap_line_xdyi::yd#0 +Coalesced [867] bitmap_line_xdyi::x#8 ← bitmap_line_xdyi::x#0 +Coalesced [868] bitmap_line_xdyi::y#8 ← bitmap_line_xdyi::y#0 +Coalesced [869] bitmap_line_xdyi::xd#7 ← bitmap_line_xdyi::xd#0 +Coalesced [870] bitmap_line_xdyi::x1#7 ← bitmap_line_xdyi::x1#0 +Coalesced [880] bitmap_line_ydxd::xd#7 ← bitmap_line_ydxd::xd#0 +Coalesced [881] bitmap_line_ydxd::x#8 ← bitmap_line_ydxd::x#0 +Coalesced [882] bitmap_line_ydxd::y#9 ← bitmap_line_ydxd::y#0 +Coalesced [883] bitmap_line_ydxd::yd#7 ← bitmap_line_ydxd::yd#0 +Coalesced [884] bitmap_line_ydxd::y1#7 ← bitmap_line_ydxd::y1#0 +Coalesced [892] bitmap_line_xdyd::yd#7 ← bitmap_line_xdyd::yd#0 +Coalesced [893] bitmap_line_xdyd::x#8 ← bitmap_line_xdyd::x#0 +Coalesced [894] bitmap_line_xdyd::y#8 ← bitmap_line_xdyd::y#0 +Coalesced [895] bitmap_line_xdyd::xd#7 ← bitmap_line_xdyd::xd#0 +Coalesced [896] bitmap_line_xdyd::x1#7 ← bitmap_line_xdyd::x1#0 +Coalesced [908] bitmap_line_ydxd::xd#8 ← bitmap_line_ydxd::xd#1 +Coalesced [909] bitmap_line_ydxd::x#9 ← bitmap_line_ydxd::x#1 +Coalesced [910] bitmap_line_ydxd::y#10 ← bitmap_line_ydxd::y#1 +Coalesced [911] bitmap_line_ydxd::yd#8 ← bitmap_line_ydxd::yd#1 +Coalesced [912] bitmap_line_ydxd::y1#8 ← bitmap_line_ydxd::y1#1 +Coalesced [920] bitmap_line_xdyd::yd#8 ← bitmap_line_xdyd::yd#1 +Coalesced [921] bitmap_line_xdyd::x#9 ← bitmap_line_xdyd::x#1 +Coalesced [922] bitmap_line_xdyd::y#9 ← bitmap_line_xdyd::y#1 +Coalesced [923] bitmap_line_xdyd::xd#8 ← bitmap_line_xdyd::xd#1 +Coalesced [924] bitmap_line_xdyd::x1#8 ← bitmap_line_xdyd::x1#1 +Coalesced [934] bitmap_line_ydxi::xd#7 ← bitmap_line_ydxi::xd#1 +Coalesced [935] bitmap_line_ydxi::x#8 ← bitmap_line_ydxi::x#1 +Coalesced [936] bitmap_line_ydxi::y#8 ← bitmap_line_ydxi::y#1 +Coalesced [937] bitmap_line_ydxi::yd#7 ← bitmap_line_ydxi::yd#1 +Coalesced [938] bitmap_line_ydxi::y1#7 ← bitmap_line_ydxi::y1#1 +Coalesced [946] bitmap_line_xdyi::yd#8 ← bitmap_line_xdyi::yd#1 +Coalesced [947] bitmap_line_xdyi::x#9 ← bitmap_line_xdyi::x#1 +Coalesced [948] bitmap_line_xdyi::y#9 ← bitmap_line_xdyi::y#1 +Coalesced [949] bitmap_line_xdyi::xd#8 ← bitmap_line_xdyi::xd#1 +Coalesced [950] bitmap_line_xdyi::x1#8 ← bitmap_line_xdyi::x1#1 +Coalesced [955] bitmap_line_xdyi::x#10 ← bitmap_line_xdyi::x#6 +Coalesced [956] bitmap_line_xdyi::y#10 ← bitmap_line_xdyi::y#5 +Coalesced [957] bitmap_line_xdyi::e#7 ← bitmap_line_xdyi::e#0 +Coalesced [961] bitmap_plot::x#6 ← bitmap_plot::x#0 +Coalesced [962] bitmap_plot::y#6 ← bitmap_plot::y#0 +Coalesced [969] bitmap_line_xdyi::y#12 ← bitmap_line_xdyi::y#2 +Coalesced [970] bitmap_line_xdyi::e#9 ← bitmap_line_xdyi::e#2 +Coalesced [975] bitmap_line_xdyi::x#11 ← bitmap_line_xdyi::x#2 +Coalesced [976] bitmap_line_xdyi::y#11 ← bitmap_line_xdyi::y#6 +Coalesced [977] bitmap_line_xdyi::e#8 ← bitmap_line_xdyi::e#6 +Coalesced (already) [978] bitmap_line_xdyi::y#13 ← bitmap_line_xdyi::y#3 +Coalesced [979] bitmap_line_xdyi::e#10 ← bitmap_line_xdyi::e#1 +Coalesced [989] bitmap_line_ydxi::x#10 ← bitmap_line_ydxi::x#5 +Coalesced [990] bitmap_line_ydxi::y#10 ← bitmap_line_ydxi::y#6 +Coalesced [991] bitmap_line_ydxi::e#7 ← bitmap_line_ydxi::e#0 +Coalesced [995] bitmap_plot::x#8 ← bitmap_plot::x#2 +Coalesced [996] bitmap_plot::y#8 ← bitmap_plot::y#2 +Coalesced [1003] bitmap_line_ydxi::x#12 ← bitmap_line_ydxi::x#2 +Coalesced [1004] bitmap_line_ydxi::e#9 ← bitmap_line_ydxi::e#2 +Coalesced [1009] bitmap_line_ydxi::x#11 ← bitmap_line_ydxi::x#6 +Coalesced [1010] bitmap_line_ydxi::y#11 ← bitmap_line_ydxi::y#2 +Coalesced [1011] bitmap_line_ydxi::e#8 ← bitmap_line_ydxi::e#6 +Coalesced (already) [1012] bitmap_line_ydxi::x#13 ← bitmap_line_ydxi::x#3 +Coalesced [1013] bitmap_line_ydxi::e#10 ← bitmap_line_ydxi::e#1 +Coalesced [1016] bitmap_line_xdyd::x#10 ← bitmap_line_xdyd::x#6 +Coalesced [1017] bitmap_line_xdyd::y#10 ← bitmap_line_xdyd::y#5 +Coalesced [1018] bitmap_line_xdyd::e#7 ← bitmap_line_xdyd::e#0 +Coalesced [1022] bitmap_plot::x#5 ← bitmap_plot::x#1 +Coalesced [1023] bitmap_plot::y#5 ← bitmap_plot::y#1 +Coalesced [1030] bitmap_line_xdyd::y#12 ← bitmap_line_xdyd::y#2 +Coalesced [1031] bitmap_line_xdyd::e#9 ← bitmap_line_xdyd::e#2 +Coalesced [1036] bitmap_line_xdyd::x#11 ← bitmap_line_xdyd::x#2 +Coalesced [1037] bitmap_line_xdyd::y#11 ← bitmap_line_xdyd::y#6 +Coalesced [1038] bitmap_line_xdyd::e#8 ← bitmap_line_xdyd::e#6 +Coalesced (already) [1039] bitmap_line_xdyd::y#13 ← bitmap_line_xdyd::y#3 +Coalesced [1040] bitmap_line_xdyd::e#10 ← bitmap_line_xdyd::e#1 +Coalesced [1043] bitmap_line_ydxd::x#10 ← bitmap_line_ydxd::x#5 +Coalesced [1044] bitmap_line_ydxd::y#11 ← bitmap_line_ydxd::y#7 +Coalesced [1045] bitmap_line_ydxd::e#7 ← bitmap_line_ydxd::e#0 +Coalesced [1049] bitmap_plot::x#7 ← bitmap_plot::x#3 +Coalesced [1050] bitmap_plot::y#7 ← bitmap_plot::y#3 +Coalesced [1057] bitmap_line_ydxd::x#12 ← bitmap_line_ydxd::x#2 +Coalesced [1058] bitmap_line_ydxd::e#9 ← bitmap_line_ydxd::e#2 +Coalesced [1063] bitmap_line_ydxd::x#11 ← bitmap_line_ydxd::x#6 +Coalesced [1064] bitmap_line_ydxd::y#12 ← bitmap_line_ydxd::y#3 +Coalesced [1065] bitmap_line_ydxd::e#8 ← bitmap_line_ydxd::e#6 +Coalesced (already) [1066] bitmap_line_ydxd::x#13 ← bitmap_line_ydxd::x#3 +Coalesced [1067] bitmap_line_ydxd::e#10 ← bitmap_line_ydxd::e#1 +Coalesced [1071] bitmap_clear::bitmap#7 ← bitmap_clear::bitmap#3 +Coalesced [1080] bitmap_clear::bitmap#6 ← bitmap_clear::bitmap#1 +Coalesced [1081] bitmap_clear::y#5 ← bitmap_clear::y#1 +Coalesced (already) [1082] bitmap_clear::bitmap#8 ← bitmap_clear::bitmap#1 +Coalesced [1083] bitmap_clear::x#3 ← bitmap_clear::x#1 +Coalesced [1106] bitmap_init::yoffs#7 ← bitmap_init::yoffs#1 +Coalesced [1111] bitmap_init::y#5 ← bitmap_init::y#1 +Coalesced [1112] bitmap_init::yoffs#5 ← bitmap_init::yoffs#4 +Coalesced (already) [1113] bitmap_init::yoffs#6 ← bitmap_init::yoffs#2 +Coalesced [1114] bitmap_init::x#5 ← bitmap_init::x#1 +Coalesced [1115] bitmap_init::bits#5 ← bitmap_init::bits#4 +Coalesced [1116] bitmap_init::bits#6 ← bitmap_init::bits#1 +Coalesced [1119] gfx_init_charset::chargen#6 ← gfx_init_charset::chargen#3 +Coalesced [1120] gfx_init_charset::charset#6 ← gfx_init_charset::charset#3 +Coalesced [1131] gfx_init_charset::chargen#5 ← gfx_init_charset::chargen#1 +Coalesced [1132] gfx_init_charset::charset#5 ← gfx_init_charset::charset#1 +Coalesced [1133] gfx_init_charset::c#5 ← gfx_init_charset::c#1 +Coalesced (already) [1134] gfx_init_charset::chargen#7 ← gfx_init_charset::chargen#1 +Coalesced (already) [1135] gfx_init_charset::charset#7 ← gfx_init_charset::charset#1 +Coalesced [1136] gfx_init_charset::l#3 ← gfx_init_charset::l#1 +Coalesced [1139] gfx_init_screen4::ch#6 ← gfx_init_screen4::ch#3 +Coalesced [1148] gfx_init_screen4::ch#5 ← gfx_init_screen4::ch#1 +Coalesced [1149] gfx_init_screen4::cy#5 ← gfx_init_screen4::cy#1 +Coalesced (already) [1150] gfx_init_screen4::ch#7 ← gfx_init_screen4::ch#1 +Coalesced [1151] gfx_init_screen4::cx#3 ← gfx_init_screen4::cx#1 +Coalesced [1154] gfx_init_screen3::ch#6 ← gfx_init_screen3::ch#3 +Coalesced [1167] gfx_init_screen3::cy#5 ← gfx_init_screen3::cy#1 +Coalesced [1168] gfx_init_screen3::ch#5 ← gfx_init_screen3::ch#1 +Coalesced [1169] gfx_init_screen3::cx#3 ← gfx_init_screen3::cx#1 +Coalesced (already) [1170] gfx_init_screen3::ch#7 ← gfx_init_screen3::ch#1 +Coalesced [1173] gfx_init_screen2::ch#6 ← gfx_init_screen2::ch#3 +Coalesced [1187] gfx_init_screen2::cy#5 ← gfx_init_screen2::cy#1 +Coalesced [1188] gfx_init_screen2::ch#5 ← gfx_init_screen2::ch#1 +Coalesced [1189] gfx_init_screen2::cx#3 ← gfx_init_screen2::cx#1 +Coalesced (already) [1190] gfx_init_screen2::ch#7 ← gfx_init_screen2::ch#1 +Coalesced [1193] gfx_init_screen1::ch#6 ← gfx_init_screen1::ch#3 +Coalesced [1204] gfx_init_screen1::cy#5 ← gfx_init_screen1::cy#1 +Coalesced [1205] gfx_init_screen1::ch#5 ← gfx_init_screen1::ch#1 +Coalesced [1206] gfx_init_screen1::cx#3 ← gfx_init_screen1::cx#1 +Coalesced (already) [1207] gfx_init_screen1::ch#7 ← gfx_init_screen1::ch#1 +Coalesced [1210] gfx_init_screen0::ch#6 ← gfx_init_screen0::ch#3 +Coalesced [1223] gfx_init_screen0::cy#5 ← gfx_init_screen0::cy#1 +Coalesced [1224] gfx_init_screen0::ch#5 ← gfx_init_screen0::ch#1 +Coalesced [1225] gfx_init_screen0::cx#3 ← gfx_init_screen0::cx#1 +Coalesced (already) [1226] gfx_init_screen0::ch#7 ← gfx_init_screen0::ch#1 Coalesced down to 120 phi equivalence classes Culled Empty Block (label) @18 Culled Empty Block (label) @46 @@ -10524,1134 +10514,1137 @@ form_field_ptr: scope:[form_field_ptr] from form_control form_render_values::@2 [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [339] (byte) form_field_ptr::x#0 ← *((const byte*) form_fields_x + (byte) form_field_ptr::field_idx#2) + [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 to:form_field_ptr::@return form_field_ptr::@return: scope:[form_field_ptr] from form_field_ptr - [340] return + [341] return to:@return (void()) apply_preset((byte) apply_preset::idx) apply_preset: scope:[apply_preset] from form_mode::@7 - [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 + [342] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 to:apply_preset::@3 apply_preset::@3: scope:[apply_preset] from apply_preset - [342] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 + [343] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 to:apply_preset::@4 apply_preset::@4: scope:[apply_preset] from apply_preset::@3 - [343] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 + [344] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 to:apply_preset::@5 apply_preset::@5: scope:[apply_preset] from apply_preset::@4 - [344] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 + [345] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 to:apply_preset::@6 apply_preset::@6: scope:[apply_preset] from apply_preset::@5 - [345] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 + [346] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 to:apply_preset::@7 apply_preset::@7: scope:[apply_preset] from apply_preset::@6 - [346] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 + [347] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 to:apply_preset::@8 apply_preset::@8: scope:[apply_preset] from apply_preset::@7 - [347] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 + [348] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 to:apply_preset::@9 apply_preset::@9: scope:[apply_preset] from apply_preset::@8 - [348] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 + [349] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 to:apply_preset::@10 apply_preset::@10: scope:[apply_preset] from apply_preset::@9 - [349] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 + [350] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 to:apply_preset::@11 apply_preset::@11: scope:[apply_preset] from apply_preset::@10 - [350] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 + [351] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 to:apply_preset::@12 apply_preset::@12: scope:[apply_preset] from apply_preset::@11 - [351] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 + [352] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 to:apply_preset::@2 apply_preset::@1: scope:[apply_preset] from apply_preset::@12 - [352] phi() + [353] phi() to:apply_preset::@2 apply_preset::@2: scope:[apply_preset] from apply_preset apply_preset::@1 apply_preset::@10 apply_preset::@11 apply_preset::@12 apply_preset::@3 apply_preset::@4 apply_preset::@5 apply_preset::@6 apply_preset::@7 apply_preset::@8 apply_preset::@9 - [353] (byte*) apply_preset::preset#15 ← phi( apply_preset/(const byte*) preset_stdchar apply_preset::@11/(const byte*) preset_sixsfred2 apply_preset::@1/(const byte*) preset_8bpppixelcell apply_preset::@3/(const byte*) preset_ecmchar apply_preset::@4/(const byte*) preset_stdbm apply_preset::@12/(const byte*) preset_stdchar apply_preset::@5/(const byte*) preset_mcbm apply_preset::@6/(const byte*) preset_hi_stdchar apply_preset::@7/(const byte*) preset_hi_ecmchar apply_preset::@8/(const byte*) preset_twoplane apply_preset::@9/(const byte*) preset_chunky apply_preset::@10/(const byte*) preset_sixsfred ) + [354] (byte*) apply_preset::preset#15 ← phi( apply_preset/(const byte*) preset_stdchar apply_preset::@11/(const byte*) preset_sixsfred2 apply_preset::@1/(const byte*) preset_8bpppixelcell apply_preset::@3/(const byte*) preset_ecmchar apply_preset::@4/(const byte*) preset_stdbm apply_preset::@12/(const byte*) preset_stdchar apply_preset::@5/(const byte*) preset_mcbm apply_preset::@6/(const byte*) preset_hi_stdchar apply_preset::@7/(const byte*) preset_hi_ecmchar apply_preset::@8/(const byte*) preset_twoplane apply_preset::@9/(const byte*) preset_chunky apply_preset::@10/(const byte*) preset_sixsfred ) to:apply_preset::@13 apply_preset::@13: scope:[apply_preset] from apply_preset::@14 apply_preset::@2 - [354] (byte) apply_preset::i#2 ← phi( apply_preset::@2/(byte) 0 apply_preset::@14/(byte) apply_preset::i#1 ) - [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 + [355] (byte) apply_preset::i#2 ← phi( apply_preset::@2/(byte) 0 apply_preset::@14/(byte) apply_preset::i#1 ) + [356] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 to:apply_preset::@return apply_preset::@return: scope:[apply_preset] from apply_preset::@13 - [356] return + [357] return to:@return apply_preset::@14: scope:[apply_preset] from apply_preset::@13 - [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) - [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 + [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) + [359] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 to:apply_preset::@13 (byte()) form_control() form_control: scope:[form_control] from form_mode::@5 - [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 - [360] call form_field_ptr + [360] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 + [361] call form_field_ptr + [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 to:form_control::@18 form_control::@18: scope:[form_control] from form_control - [361] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 - [362] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 + [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 + [364] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 + [365] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 to:form_control::@1 form_control::@21: scope:[form_control] from form_control::@18 - [363] phi() + [366] phi() to:form_control::@1 form_control::@1: scope:[form_control] from form_control::@18 form_control::@21 - [364] (signed byte) form_cursor_count#15 ← phi( form_control::@21/(signed byte) form_cursor_count#5 form_control::@18/(const signed byte) FORM_CURSOR_BLINK ) - [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 + [367] (signed byte) form_cursor_count#15 ← phi( form_control::@21/(signed byte) form_cursor_count#5 form_control::@18/(const signed byte) FORM_CURSOR_BLINK ) + [368] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 to:form_control::@7 form_control::@7: scope:[form_control] from form_control::@1 - [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f - [367] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$12 + [369] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f + [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 to:form_control::@3 form_control::@3: scope:[form_control] from form_control::@2 form_control::@7 - [368] phi() - [369] call keyboard_event_scan + [371] phi() + [372] call keyboard_event_scan to:form_control::@19 form_control::@19: scope:[form_control] from form_control::@3 - [370] phi() - [371] call keyboard_event_get - [372] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 + [373] phi() + [374] call keyboard_event_get + [375] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 to:form_control::@20 form_control::@20: scope:[form_control] from form_control::@19 - [373] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 - [374] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 + [376] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 + [377] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 to:form_control::@8 form_control::@8: scope:[form_control] from form_control::@20 - [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f - [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 - [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT - [378] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 + [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f + [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 + [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT + [381] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 to:form_control::@9 form_control::@9: scope:[form_control] from form_control::@8 - [379] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 - [380] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 + [382] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 + [383] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 to:form_control::@14 form_control::@22: scope:[form_control] from form_control::@9 - [381] phi() + [384] phi() to:form_control::@14 form_control::@14: scope:[form_control] from form_control::@13 form_control::@22 form_control::@23 form_control::@9 - [382] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 ) + [385] (byte) form_field_idx#31 ← phi( form_control::@22/(byte) form_field_idx#6 form_control::@9/(const byte) form_fields_cnt-(byte) 1 form_control::@23/(byte) form_field_idx#5 form_control::@13/(byte) 0 ) to:form_control::@return form_control::@return: scope:[form_control] from form_control::@14 form_control::@16 form_control::@5 form_control::@6 - [383] (byte) form_field_idx#18 ← phi( form_control::@5/(byte) form_field_idx#28 form_control::@14/(byte) form_field_idx#31 form_control::@16/(byte) form_field_idx#28 form_control::@6/(byte) form_field_idx#28 ) - [383] (signed byte) form_cursor_count#16 ← phi( form_control::@5/(signed byte) form_cursor_count#15 form_control::@14/(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 form_control::@16/(signed byte) form_cursor_count#15 form_control::@6/(signed byte) form_cursor_count#15 ) - [383] (byte) form_control::return#2 ← phi( form_control::@5/(byte) $ff form_control::@14/(byte) 0 form_control::@16/(byte) 0 form_control::@6/(byte) 0 ) - [384] return + [386] (byte) form_field_idx#18 ← phi( form_control::@5/(byte) form_field_idx#28 form_control::@14/(byte) form_field_idx#31 form_control::@16/(byte) form_field_idx#28 form_control::@6/(byte) form_field_idx#28 ) + [386] (signed byte) form_cursor_count#16 ← phi( form_control::@5/(signed byte) form_cursor_count#15 form_control::@14/(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 form_control::@16/(signed byte) form_cursor_count#15 form_control::@6/(signed byte) form_cursor_count#15 ) + [386] (byte) form_control::return#2 ← phi( form_control::@5/(byte) $ff form_control::@14/(byte) 0 form_control::@16/(byte) 0 form_control::@6/(byte) 0 ) + [387] return to:@return form_control::@13: scope:[form_control] from form_control::@8 - [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 - [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 + [388] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 + [389] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 to:form_control::@14 form_control::@23: scope:[form_control] from form_control::@13 - [387] phi() + [390] phi() to:form_control::@14 form_control::@4: scope:[form_control] from form_control::@20 - [388] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 + [391] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 to:form_control::@10 form_control::@10: scope:[form_control] from form_control::@4 - [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT - [390] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 + [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT + [393] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 to:form_control::@11 form_control::@11: scope:[form_control] from form_control::@10 - [391] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) - [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 + [394] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) + [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 to:form_control::@12 form_control::@12: scope:[form_control] from form_control::@11 - [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) + [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) to:form_control::@16 form_control::@16: scope:[form_control] from form_control::@11 form_control::@12 form_control::@15 form_control::@17 - [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) + [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) to:form_control::@return form_control::@15: scope:[form_control] from form_control::@10 - [395] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) - [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 + [398] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) + [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 to:form_control::@17 form_control::@17: scope:[form_control] from form_control::@15 - [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 + [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 to:form_control::@16 form_control::@5: scope:[form_control] from form_control::@4 - [398] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 + [401] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 to:form_control::@return form_control::@6: scope:[form_control] from form_control::@5 - [399] phi() + [402] phi() to:form_control::@return form_control::@2: scope:[form_control] from form_control::@1 - [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 - [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 + [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 + [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 to:form_control::@3 (void()) form_set_screen((byte*) form_set_screen::screen) form_set_screen: scope:[form_set_screen] from form_mode::@13 - [402] phi() + [405] phi() to:form_set_screen::@1 form_set_screen::@1: scope:[form_set_screen] from form_set_screen form_set_screen::@1 - [403] (byte) form_set_screen::y#2 ← phi( form_set_screen/(byte) 0 form_set_screen::@1/(byte) form_set_screen::y#1 ) - [403] (byte*) form_set_screen::line#2 ← phi( form_set_screen/(const byte*) FORM_SCREEN form_set_screen::@1/(byte*) form_set_screen::line#1 ) - [404] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 - [405] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 - [406] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 - [407] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 - [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 - [409] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 - [410] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 + [406] (byte) form_set_screen::y#2 ← phi( form_set_screen/(byte) 0 form_set_screen::@1/(byte) form_set_screen::y#1 ) + [406] (byte*) form_set_screen::line#2 ← phi( form_set_screen/(const byte*) FORM_SCREEN form_set_screen::@1/(byte*) form_set_screen::line#1 ) + [407] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 + [408] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 + [409] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 + [410] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 + [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 + [412] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 + [413] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 to:form_set_screen::@return form_set_screen::@return: scope:[form_set_screen] from form_set_screen::@1 - [411] return + [414] return to:@return (void()) print_str_lines((byte*) print_str_lines::str) print_str_lines: scope:[print_str_lines] from form_mode::@12 form_mode::@9 - [412] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte*) FORM_COLS form_mode::@12/(const byte*) FORM_TEXT ) - [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 + [415] (byte*) print_str_lines::str#5 ← phi( form_mode::@9/(const byte*) FORM_COLS form_mode::@12/(const byte*) FORM_TEXT ) + [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 to:print_str_lines::@1 print_str_lines::@1: scope:[print_str_lines] from print_str_lines print_str_lines::@6 - [414] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@6/(byte*) print_line_cursor#22 ) - [414] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*) print_char_cursor#67 print_str_lines::@6/(byte*) print_char_cursor#68 ) - [414] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@6/(byte*) print_str_lines::str#0 ) - [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 + [417] (byte*) print_line_cursor#2 ← phi( print_str_lines/(byte*) print_set_screen::screen#2 print_str_lines::@6/(byte*) print_line_cursor#22 ) + [417] (byte*) print_char_cursor#22 ← phi( print_str_lines/(byte*) print_char_cursor#67 print_str_lines::@6/(byte*) print_char_cursor#68 ) + [417] (byte*) print_str_lines::str#3 ← phi( print_str_lines/(byte*) print_str_lines::str#5 print_str_lines::@6/(byte*) print_str_lines::str#0 ) + [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 to:print_str_lines::@return print_str_lines::@return: scope:[print_str_lines] from print_str_lines::@1 - [416] return + [419] return to:@return print_str_lines::@2: scope:[print_str_lines] from print_str_lines::@1 print_str_lines::@3 - [417] (byte*) print_char_cursor#20 ← phi( print_str_lines::@1/(byte*) print_char_cursor#22 print_str_lines::@3/(byte*) print_char_cursor#38 ) - [417] (byte*) print_str_lines::str#4 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#3 print_str_lines::@3/(byte*) print_str_lines::str#0 ) - [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) - [419] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 - [420] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 + [420] (byte*) print_char_cursor#20 ← phi( print_str_lines::@1/(byte*) print_char_cursor#22 print_str_lines::@3/(byte*) print_char_cursor#38 ) + [420] (byte*) print_str_lines::str#4 ← phi( print_str_lines::@1/(byte*) print_str_lines::str#3 print_str_lines::@3/(byte*) print_str_lines::str#0 ) + [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) + [422] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 + [423] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 to:print_str_lines::@4 print_str_lines::@4: scope:[print_str_lines] from print_str_lines::@2 - [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 - [422] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 + [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 + [425] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 to:print_str_lines::@3 print_str_lines::@3: scope:[print_str_lines] from print_str_lines::@2 print_str_lines::@4 - [423] (byte*) print_char_cursor#38 ← phi( print_str_lines::@2/(byte*) print_char_cursor#20 print_str_lines::@4/(byte*) print_char_cursor#1 ) - [424] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 + [426] (byte*) print_char_cursor#38 ← phi( print_str_lines::@2/(byte*) print_char_cursor#20 print_str_lines::@4/(byte*) print_char_cursor#1 ) + [427] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 to:print_str_lines::@5 print_str_lines::@5: scope:[print_str_lines] from print_str_lines::@3 - [425] phi() - [426] call print_ln + [428] phi() + [429] call print_ln to:print_str_lines::@6 print_str_lines::@6: scope:[print_str_lines] from print_str_lines::@5 - [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 + [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 to:print_str_lines::@1 (void()) print_ln() print_ln: scope:[print_ln] from print_str_lines::@5 - [428] phi() + [431] phi() to:print_ln::@1 print_ln::@1: scope:[print_ln] from print_ln print_ln::@1 - [429] (byte*) print_line_cursor#21 ← phi( print_ln/(byte*) print_line_cursor#2 print_ln::@1/(byte*) print_line_cursor#22 ) - [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 - [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 + [432] (byte*) print_line_cursor#21 ← phi( print_ln/(byte*) print_line_cursor#2 print_ln::@1/(byte*) print_line_cursor#22 ) + [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 + [434] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 to:print_ln::@return print_ln::@return: scope:[print_ln] from print_ln::@1 - [432] return + [435] return to:@return (void()) print_cls() print_cls: scope:[print_cls] from form_mode::@11 form_mode::@8 - [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 - [434] call memset + [436] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 + [437] call memset to:print_cls::@return print_cls::@return: scope:[print_cls] from print_cls - [435] return + [438] return to:@return (void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num) memset: scope:[memset] from print_cls - [436] phi() + [439] phi() to:memset::@1 memset::@1: scope:[memset] from memset - [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 - [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 + [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 + [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 to:memset::@2 memset::@2: scope:[memset] from memset::@1 memset::@3 - [439] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 ) - [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 + [442] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 ) + [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 to:memset::@return memset::@return: scope:[memset] from memset::@2 - [441] return + [444] return to:@return memset::@3: scope:[memset] from memset::@2 - [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 - [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 + [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 + [446] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 to:memset::@2 (void()) print_set_screen((byte*) print_set_screen::screen) print_set_screen: scope:[print_set_screen] from form_mode form_mode::@10 - [444] (byte*) print_set_screen::screen#2 ← phi( form_mode/(const byte*) COLS form_mode::@10/(const byte*) FORM_SCREEN ) + [447] (byte*) print_set_screen::screen#2 ← phi( form_mode/(const byte*) COLS form_mode::@10/(const byte*) FORM_SCREEN ) to:print_set_screen::@return print_set_screen::@return: scope:[print_set_screen] from print_set_screen - [445] return + [448] return to:@return (void()) gfx_init() gfx_init: scope:[gfx_init] from main::@3 - [446] phi() - [447] call gfx_init_screen0 + [449] phi() + [450] call gfx_init_screen0 to:gfx_init::@1 gfx_init::@1: scope:[gfx_init] from gfx_init - [448] phi() - [449] call gfx_init_screen1 + [451] phi() + [452] call gfx_init_screen1 to:gfx_init::@2 gfx_init::@2: scope:[gfx_init] from gfx_init::@1 - [450] phi() - [451] call gfx_init_screen2 + [453] phi() + [454] call gfx_init_screen2 to:gfx_init::@3 gfx_init::@3: scope:[gfx_init] from gfx_init::@2 - [452] phi() - [453] call gfx_init_screen3 + [455] phi() + [456] call gfx_init_screen3 to:gfx_init::@4 gfx_init::@4: scope:[gfx_init] from gfx_init::@3 - [454] phi() - [455] call gfx_init_screen4 + [457] phi() + [458] call gfx_init_screen4 to:gfx_init::@5 gfx_init::@5: scope:[gfx_init] from gfx_init::@4 - [456] phi() - [457] call gfx_init_charset + [459] phi() + [460] call gfx_init_charset to:gfx_init::@6 gfx_init::@6: scope:[gfx_init] from gfx_init::@5 - [458] phi() - [459] call gfx_init_vic_bitmap + [461] phi() + [462] call gfx_init_vic_bitmap to:gfx_init::@7 gfx_init::@7: scope:[gfx_init] from gfx_init::@6 - [460] phi() - [461] call gfx_init_plane_8bppchunky + [463] phi() + [464] call gfx_init_plane_8bppchunky to:gfx_init::@8 gfx_init::@8: scope:[gfx_init] from gfx_init::@7 - [462] phi() - [463] call gfx_init_plane_charset8 + [465] phi() + [466] call gfx_init_plane_charset8 to:gfx_init::@9 gfx_init::@9: scope:[gfx_init] from gfx_init::@8 - [464] phi() - [465] call gfx_init_plane_horisontal + [467] phi() + [468] call gfx_init_plane_horisontal to:gfx_init::@10 gfx_init::@10: scope:[gfx_init] from gfx_init::@9 - [466] phi() - [467] call gfx_init_plane_vertical + [469] phi() + [470] call gfx_init_plane_vertical to:gfx_init::@11 gfx_init::@11: scope:[gfx_init] from gfx_init::@10 - [468] phi() - [469] call gfx_init_plane_horisontal2 + [471] phi() + [472] call gfx_init_plane_horisontal2 to:gfx_init::@12 gfx_init::@12: scope:[gfx_init] from gfx_init::@11 - [470] phi() - [471] call gfx_init_plane_vertical2 + [473] phi() + [474] call gfx_init_plane_vertical2 to:gfx_init::@13 gfx_init::@13: scope:[gfx_init] from gfx_init::@12 - [472] phi() - [473] call gfx_init_plane_blank + [475] phi() + [476] call gfx_init_plane_blank to:gfx_init::@14 gfx_init::@14: scope:[gfx_init] from gfx_init::@13 - [474] phi() - [475] call gfx_init_plane_full + [477] phi() + [478] call gfx_init_plane_full to:gfx_init::@return gfx_init::@return: scope:[gfx_init] from gfx_init::@14 - [476] return + [479] return to:@return (void()) gfx_init_plane_full() gfx_init_plane_full: scope:[gfx_init_plane_full] from gfx_init::@14 - [477] phi() - [478] call gfx_init_plane_fill + [480] phi() + [481] call gfx_init_plane_fill to:gfx_init_plane_full::@return gfx_init_plane_full::@return: scope:[gfx_init_plane_full] from gfx_init_plane_full - [479] return + [482] return to:@return (void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) gfx_init_plane_fill: scope:[gfx_init_plane_fill] from gfx_init_plane_blank gfx_init_plane_full gfx_init_plane_vertical2 - [480] (byte) gfx_init_plane_fill::fill#6 ← phi( gfx_init_plane_blank/(byte) 0 gfx_init_plane_full/(byte) $ff gfx_init_plane_vertical2/(byte) $1b ) - [480] (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(const dword) PLANE_BLANK gfx_init_plane_full/(const dword) PLANE_FULL gfx_init_plane_vertical2/(const dword) PLANE_VERTICAL2 ) - [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 - [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 - [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 - [484] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 - [485] call dtvSetCpuBankSegment1 + [483] (byte) gfx_init_plane_fill::fill#6 ← phi( gfx_init_plane_blank/(byte) 0 gfx_init_plane_full/(byte) $ff gfx_init_plane_vertical2/(byte) $1b ) + [483] (dword) gfx_init_plane_fill::plane_addr#3 ← phi( gfx_init_plane_blank/(const dword) PLANE_BLANK gfx_init_plane_full/(const dword) PLANE_FULL gfx_init_plane_vertical2/(const dword) PLANE_VERTICAL2 ) + [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 + [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 + [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 + [487] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 + [488] call dtvSetCpuBankSegment1 to:gfx_init_plane_fill::@5 gfx_init_plane_fill::@5: scope:[gfx_init_plane_fill] from gfx_init_plane_fill - [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 - [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff - [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 - [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 + [489] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 + [490] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff + [491] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 + [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 to:gfx_init_plane_fill::@1 gfx_init_plane_fill::@1: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3 gfx_init_plane_fill::@5 - [490] (byte) gfx_init_plane_fill::by#4 ← phi( gfx_init_plane_fill::@3/(byte) gfx_init_plane_fill::by#1 gfx_init_plane_fill::@5/(byte) 0 ) - [490] (byte*) gfx_init_plane_fill::gfxb#3 ← phi( gfx_init_plane_fill::@3/(byte*) gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::@5/(byte*) gfx_init_plane_fill::gfxb#6 ) + [493] (byte) gfx_init_plane_fill::by#4 ← phi( gfx_init_plane_fill::@3/(byte) gfx_init_plane_fill::by#1 gfx_init_plane_fill::@5/(byte) 0 ) + [493] (byte*) gfx_init_plane_fill::gfxb#3 ← phi( gfx_init_plane_fill::@3/(byte*) gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::@5/(byte*) gfx_init_plane_fill::gfxb#6 ) to:gfx_init_plane_fill::@2 gfx_init_plane_fill::@2: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@1 gfx_init_plane_fill::@2 - [491] (byte) gfx_init_plane_fill::bx#2 ← phi( gfx_init_plane_fill::@1/(byte) 0 gfx_init_plane_fill::@2/(byte) gfx_init_plane_fill::bx#1 ) - [491] (byte*) gfx_init_plane_fill::gfxb#2 ← phi( gfx_init_plane_fill::@1/(byte*) gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::@2/(byte*) gfx_init_plane_fill::gfxb#1 ) - [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 - [493] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 - [494] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 - [495] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 + [494] (byte) gfx_init_plane_fill::bx#2 ← phi( gfx_init_plane_fill::@1/(byte) 0 gfx_init_plane_fill::@2/(byte) gfx_init_plane_fill::bx#1 ) + [494] (byte*) gfx_init_plane_fill::gfxb#2 ← phi( gfx_init_plane_fill::@1/(byte*) gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::@2/(byte*) gfx_init_plane_fill::gfxb#1 ) + [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 + [496] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 + [497] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 + [498] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 to:gfx_init_plane_fill::@3 gfx_init_plane_fill::@3: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@2 - [496] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 - [497] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 + [499] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 + [500] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 to:gfx_init_plane_fill::@4 gfx_init_plane_fill::@4: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@3 - [498] phi() - [499] call dtvSetCpuBankSegment1 + [501] phi() + [502] call dtvSetCpuBankSegment1 to:gfx_init_plane_fill::@return gfx_init_plane_fill::@return: scope:[gfx_init_plane_fill] from gfx_init_plane_fill::@4 - [500] return + [503] return to:@return (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@6 gfx_init_plane_charset8 gfx_init_plane_charset8::@8 gfx_init_plane_fill gfx_init_plane_fill::@4 gfx_init_plane_horisontal gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal::@7 gfx_init_plane_vertical gfx_init_plane_vertical::@4 - [501] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 ) - [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 + [504] (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 ← phi( gfx_init_plane_8bppchunky/(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 gfx_init_plane_8bppchunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_plane_8bppchunky::@6/(byte)(number) $4000/(number) $4000 gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 gfx_init_plane_fill/(byte) dtvSetCpuBankSegment1::cpuBankIdx#11 gfx_init_plane_fill::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal/(const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 gfx_init_plane_horisontal2/(const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 gfx_init_plane_horisontal2::@4/(byte)(number) $4000/(number) $4000 gfx_init_plane_horisontal::@7/(byte)(number) $4000/(number) $4000 gfx_init_plane_vertical/(const byte) gfx_init_plane_vertical::gfxbCpuBank#0 gfx_init_plane_vertical::@4/(byte)(number) $4000/(number) $4000 ) + [505] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 asm { .byte$32,$dd lda$ff .byte$32,$00 } to:dtvSetCpuBankSegment1::@return dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 - [504] return + [507] return to:@return (void()) gfx_init_plane_blank() gfx_init_plane_blank: scope:[gfx_init_plane_blank] from gfx_init::@13 - [505] phi() - [506] call gfx_init_plane_fill + [508] phi() + [509] call gfx_init_plane_fill to:gfx_init_plane_blank::@return gfx_init_plane_blank::@return: scope:[gfx_init_plane_blank] from gfx_init_plane_blank - [507] return + [510] return to:@return (void()) gfx_init_plane_vertical2() gfx_init_plane_vertical2: scope:[gfx_init_plane_vertical2] from gfx_init::@12 - [508] phi() - [509] call gfx_init_plane_fill + [511] phi() + [512] call gfx_init_plane_fill to:gfx_init_plane_vertical2::@return gfx_init_plane_vertical2::@return: scope:[gfx_init_plane_vertical2] from gfx_init_plane_vertical2 - [510] return + [513] return to:@return (void()) gfx_init_plane_horisontal2() gfx_init_plane_horisontal2: scope:[gfx_init_plane_horisontal2] from gfx_init::@11 - [511] phi() - [512] call dtvSetCpuBankSegment1 + [514] phi() + [515] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal2::@1 gfx_init_plane_horisontal2::@1: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2 gfx_init_plane_horisontal2::@3 - [513] (byte*) gfx_init_plane_horisontal2::gfxa#3 ← phi( gfx_init_plane_horisontal2::@3/(byte*) gfx_init_plane_horisontal2::gfxa#1 gfx_init_plane_horisontal2/(byte*)(word) $4000 ) - [513] (byte) gfx_init_plane_horisontal2::ay#4 ← phi( gfx_init_plane_horisontal2::@3/(byte) gfx_init_plane_horisontal2::ay#1 gfx_init_plane_horisontal2/(byte) 0 ) + [516] (byte*) gfx_init_plane_horisontal2::gfxa#3 ← phi( gfx_init_plane_horisontal2::@3/(byte*) gfx_init_plane_horisontal2::gfxa#1 gfx_init_plane_horisontal2/(byte*)(word) $4000 ) + [516] (byte) gfx_init_plane_horisontal2::ay#4 ← phi( gfx_init_plane_horisontal2::@3/(byte) gfx_init_plane_horisontal2::ay#1 gfx_init_plane_horisontal2/(byte) 0 ) to:gfx_init_plane_horisontal2::@2 gfx_init_plane_horisontal2::@2: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@1 gfx_init_plane_horisontal2::@2 - [514] (byte) gfx_init_plane_horisontal2::ax#2 ← phi( gfx_init_plane_horisontal2::@1/(byte) 0 gfx_init_plane_horisontal2::@2/(byte) gfx_init_plane_horisontal2::ax#1 ) - [514] (byte*) gfx_init_plane_horisontal2::gfxa#2 ← phi( gfx_init_plane_horisontal2::@1/(byte*) gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::@2/(byte*) gfx_init_plane_horisontal2::gfxa#1 ) - [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 - [516] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 - [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) - [518] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 - [519] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 - [520] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 + [517] (byte) gfx_init_plane_horisontal2::ax#2 ← phi( gfx_init_plane_horisontal2::@1/(byte) 0 gfx_init_plane_horisontal2::@2/(byte) gfx_init_plane_horisontal2::ax#1 ) + [517] (byte*) gfx_init_plane_horisontal2::gfxa#2 ← phi( gfx_init_plane_horisontal2::@1/(byte*) gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::@2/(byte*) gfx_init_plane_horisontal2::gfxa#1 ) + [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 + [519] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 + [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) + [521] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 + [522] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 + [523] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 to:gfx_init_plane_horisontal2::@3 gfx_init_plane_horisontal2::@3: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@2 - [521] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 - [522] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 + [524] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 + [525] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 to:gfx_init_plane_horisontal2::@4 gfx_init_plane_horisontal2::@4: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@3 - [523] phi() - [524] call dtvSetCpuBankSegment1 + [526] phi() + [527] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal2::@return gfx_init_plane_horisontal2::@return: scope:[gfx_init_plane_horisontal2] from gfx_init_plane_horisontal2::@4 - [525] return + [528] return to:@return (void()) gfx_init_plane_vertical() gfx_init_plane_vertical: scope:[gfx_init_plane_vertical] from gfx_init::@10 - [526] phi() - [527] call dtvSetCpuBankSegment1 + [529] phi() + [530] call dtvSetCpuBankSegment1 to:gfx_init_plane_vertical::@1 gfx_init_plane_vertical::@1: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical gfx_init_plane_vertical::@3 - [528] (byte) gfx_init_plane_vertical::by#4 ← phi( gfx_init_plane_vertical::@3/(byte) gfx_init_plane_vertical::by#1 gfx_init_plane_vertical/(byte) 0 ) - [528] (byte*) gfx_init_plane_vertical::gfxb#3 ← phi( gfx_init_plane_vertical::@3/(byte*) gfx_init_plane_vertical::gfxb#1 gfx_init_plane_vertical/(byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff ) + [531] (byte) gfx_init_plane_vertical::by#4 ← phi( gfx_init_plane_vertical::@3/(byte) gfx_init_plane_vertical::by#1 gfx_init_plane_vertical/(byte) 0 ) + [531] (byte*) gfx_init_plane_vertical::gfxb#3 ← phi( gfx_init_plane_vertical::@3/(byte*) gfx_init_plane_vertical::gfxb#1 gfx_init_plane_vertical/(byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff ) to:gfx_init_plane_vertical::@2 gfx_init_plane_vertical::@2: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@1 gfx_init_plane_vertical::@2 - [529] (byte) gfx_init_plane_vertical::bx#2 ← phi( gfx_init_plane_vertical::@1/(byte) 0 gfx_init_plane_vertical::@2/(byte) gfx_init_plane_vertical::bx#1 ) - [529] (byte*) gfx_init_plane_vertical::gfxb#2 ← phi( gfx_init_plane_vertical::@1/(byte*) gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::@2/(byte*) gfx_init_plane_vertical::gfxb#1 ) - [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f - [531] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 - [532] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 - [533] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 + [532] (byte) gfx_init_plane_vertical::bx#2 ← phi( gfx_init_plane_vertical::@1/(byte) 0 gfx_init_plane_vertical::@2/(byte) gfx_init_plane_vertical::bx#1 ) + [532] (byte*) gfx_init_plane_vertical::gfxb#2 ← phi( gfx_init_plane_vertical::@1/(byte*) gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::@2/(byte*) gfx_init_plane_vertical::gfxb#1 ) + [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f + [534] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 + [535] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 + [536] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 to:gfx_init_plane_vertical::@3 gfx_init_plane_vertical::@3: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@2 - [534] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 - [535] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 + [537] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 + [538] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 to:gfx_init_plane_vertical::@4 gfx_init_plane_vertical::@4: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@3 - [536] phi() - [537] call dtvSetCpuBankSegment1 + [539] phi() + [540] call dtvSetCpuBankSegment1 to:gfx_init_plane_vertical::@return gfx_init_plane_vertical::@return: scope:[gfx_init_plane_vertical] from gfx_init_plane_vertical::@4 - [538] return + [541] return to:@return (void()) gfx_init_plane_horisontal() gfx_init_plane_horisontal: scope:[gfx_init_plane_horisontal] from gfx_init::@9 - [539] phi() - [540] call dtvSetCpuBankSegment1 + [542] phi() + [543] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal::@1 gfx_init_plane_horisontal::@1: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal gfx_init_plane_horisontal::@6 - [541] (byte*) gfx_init_plane_horisontal::gfxa#6 ← phi( gfx_init_plane_horisontal::@6/(byte*) gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal/(byte*)(word) $4000 ) - [541] (byte) gfx_init_plane_horisontal::ay#4 ← phi( gfx_init_plane_horisontal::@6/(byte) gfx_init_plane_horisontal::ay#1 gfx_init_plane_horisontal/(byte) 0 ) + [544] (byte*) gfx_init_plane_horisontal::gfxa#6 ← phi( gfx_init_plane_horisontal::@6/(byte*) gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal/(byte*)(word) $4000 ) + [544] (byte) gfx_init_plane_horisontal::ay#4 ← phi( gfx_init_plane_horisontal::@6/(byte) gfx_init_plane_horisontal::ay#1 gfx_init_plane_horisontal/(byte) 0 ) to:gfx_init_plane_horisontal::@2 gfx_init_plane_horisontal::@2: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@1 gfx_init_plane_horisontal::@4 - [542] (byte) gfx_init_plane_horisontal::ax#2 ← phi( gfx_init_plane_horisontal::@1/(byte) 0 gfx_init_plane_horisontal::@4/(byte) gfx_init_plane_horisontal::ax#1 ) - [542] (byte*) gfx_init_plane_horisontal::gfxa#3 ← phi( gfx_init_plane_horisontal::@1/(byte*) gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::@4/(byte*) gfx_init_plane_horisontal::gfxa#7 ) - [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 - [544] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 + [545] (byte) gfx_init_plane_horisontal::ax#2 ← phi( gfx_init_plane_horisontal::@1/(byte) 0 gfx_init_plane_horisontal::@4/(byte) gfx_init_plane_horisontal::ax#1 ) + [545] (byte*) gfx_init_plane_horisontal::gfxa#3 ← phi( gfx_init_plane_horisontal::@1/(byte*) gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::@4/(byte*) gfx_init_plane_horisontal::gfxa#7 ) + [546] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 + [547] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 to:gfx_init_plane_horisontal::@5 gfx_init_plane_horisontal::@5: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@2 - [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff - [546] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 + [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff + [549] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 to:gfx_init_plane_horisontal::@4 gfx_init_plane_horisontal::@4: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 - [547] (byte*) gfx_init_plane_horisontal::gfxa#7 ← phi( gfx_init_plane_horisontal::@3/(byte*) gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::@5/(byte*) gfx_init_plane_horisontal::gfxa#2 ) - [548] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 - [549] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 + [550] (byte*) gfx_init_plane_horisontal::gfxa#7 ← phi( gfx_init_plane_horisontal::@3/(byte*) gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::@5/(byte*) gfx_init_plane_horisontal::gfxa#2 ) + [551] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 + [552] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 to:gfx_init_plane_horisontal::@6 gfx_init_plane_horisontal::@6: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@4 - [550] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 - [551] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 + [553] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 + [554] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 to:gfx_init_plane_horisontal::@7 gfx_init_plane_horisontal::@7: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@6 - [552] phi() - [553] call dtvSetCpuBankSegment1 + [555] phi() + [556] call dtvSetCpuBankSegment1 to:gfx_init_plane_horisontal::@return gfx_init_plane_horisontal::@return: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@7 - [554] return + [557] return to:@return gfx_init_plane_horisontal::@3: scope:[gfx_init_plane_horisontal] from gfx_init_plane_horisontal::@2 - [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 - [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 + [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 + [559] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 to:gfx_init_plane_horisontal::@4 (void()) gfx_init_plane_charset8() gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@8 - [557] phi() - [558] call dtvSetCpuBankSegment1 + [560] phi() + [561] call dtvSetCpuBankSegment1 to:gfx_init_plane_charset8::@9 gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8 - [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM + [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM to:gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9 - [560] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) 0 ) - [560] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte) 0 ) - [560] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/(byte*)(word) $4000 ) - [560] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN ) + [563] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) 0 ) + [563] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte) 0 ) + [563] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/(byte*)(word) $4000 ) + [563] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN ) to:gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6 - [561] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) - [561] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 ) - [561] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 ) - [561] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 ) - [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) - [563] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 + [564] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) + [564] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 ) + [564] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 ) + [564] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 ) + [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) + [566] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 to:gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4 - [564] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) - [564] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) - [564] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) - [564] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) - [565] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 - [566] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 + [567] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) + [567] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) + [567] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) + [567] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) + [568] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 + [569] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 to:gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 - [567] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 + [570] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 to:gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 - [568] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) 0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#3 ) - [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 - [570] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 - [571] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 - [572] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 - [573] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 - [574] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 + [571] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) 0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#3 ) + [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 + [573] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 + [574] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 + [575] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 + [576] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 + [577] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 to:gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4 - [575] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 - [576] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 + [578] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 + [579] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 to:gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6 - [577] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 - [578] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 + [580] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 + [581] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 to:gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 - [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO - [580] call dtvSetCpuBankSegment1 + [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO + [583] call dtvSetCpuBankSegment1 to:gfx_init_plane_charset8::@return gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 - [581] return + [584] return to:@return (void()) gfx_init_plane_8bppchunky() gfx_init_plane_8bppchunky: scope:[gfx_init_plane_8bppchunky] from gfx_init::@7 - [582] phi() - [583] call dtvSetCpuBankSegment1 + [585] phi() + [586] call dtvSetCpuBankSegment1 to:gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@1: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky gfx_init_plane_8bppchunky::@5 - [584] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky/++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 ) - [584] (byte) gfx_init_plane_8bppchunky::y#6 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::y#1 gfx_init_plane_8bppchunky/(byte) 0 ) - [584] (byte*) gfx_init_plane_8bppchunky::gfxb#5 ← phi( gfx_init_plane_8bppchunky::@5/(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky/(byte*) 16384 ) + [587] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky/++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 ) + [587] (byte) gfx_init_plane_8bppchunky::y#6 ← phi( gfx_init_plane_8bppchunky::@5/(byte) gfx_init_plane_8bppchunky::y#1 gfx_init_plane_8bppchunky/(byte) 0 ) + [587] (byte*) gfx_init_plane_8bppchunky::gfxb#5 ← phi( gfx_init_plane_8bppchunky::@5/(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky/(byte*) 16384 ) to:gfx_init_plane_8bppchunky::@2 gfx_init_plane_8bppchunky::@2: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@1 gfx_init_plane_8bppchunky::@3 - [585] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ) - [585] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(word) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 ) - [585] (byte*) gfx_init_plane_8bppchunky::gfxb#3 ← phi( gfx_init_plane_8bppchunky::@1/(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::@3/(byte*) gfx_init_plane_8bppchunky::gfxb#1 ) - [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 + [588] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 ← phi( gfx_init_plane_8bppchunky::@1/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::@3/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ) + [588] (word) gfx_init_plane_8bppchunky::x#2 ← phi( gfx_init_plane_8bppchunky::@1/(word) 0 gfx_init_plane_8bppchunky::@3/(word) gfx_init_plane_8bppchunky::x#1 ) + [588] (byte*) gfx_init_plane_8bppchunky::gfxb#3 ← phi( gfx_init_plane_8bppchunky::@1/(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::@3/(byte*) gfx_init_plane_8bppchunky::gfxb#1 ) + [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 to:gfx_init_plane_8bppchunky::@4 gfx_init_plane_8bppchunky::@4: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@2 - [587] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 - [588] call dtvSetCpuBankSegment1 + [590] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 + [591] call dtvSetCpuBankSegment1 to:gfx_init_plane_8bppchunky::@7 gfx_init_plane_8bppchunky::@7: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@4 - [589] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 + [592] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 to:gfx_init_plane_8bppchunky::@3 gfx_init_plane_8bppchunky::@3: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@2 gfx_init_plane_8bppchunky::@7 - [590] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ← phi( gfx_init_plane_8bppchunky::@2/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::@7/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ) - [590] (byte*) gfx_init_plane_8bppchunky::gfxb#4 ← phi( gfx_init_plane_8bppchunky::@2/(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::@7/(byte*) 16384 ) - [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 - [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 - [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 - [594] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 - [595] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 - [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 + [593] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 ← phi( gfx_init_plane_8bppchunky::@2/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::@7/(byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ) + [593] (byte*) gfx_init_plane_8bppchunky::gfxb#4 ← phi( gfx_init_plane_8bppchunky::@2/(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::@7/(byte*) 16384 ) + [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 + [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 + [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 + [597] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 + [598] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 + [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 to:gfx_init_plane_8bppchunky::@5 gfx_init_plane_8bppchunky::@5: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@3 - [597] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 - [598] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 + [600] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 + [601] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 to:gfx_init_plane_8bppchunky::@6 gfx_init_plane_8bppchunky::@6: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@5 - [599] phi() - [600] call dtvSetCpuBankSegment1 + [602] phi() + [603] call dtvSetCpuBankSegment1 to:gfx_init_plane_8bppchunky::@return gfx_init_plane_8bppchunky::@return: scope:[gfx_init_plane_8bppchunky] from gfx_init_plane_8bppchunky::@6 - [601] return + [604] return to:@return (void()) gfx_init_vic_bitmap() gfx_init_vic_bitmap: scope:[gfx_init_vic_bitmap] from gfx_init::@6 - [602] phi() - [603] call bitmap_init + [605] phi() + [606] call bitmap_init to:gfx_init_vic_bitmap::@3 gfx_init_vic_bitmap::@3: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap - [604] phi() - [605] call bitmap_clear + [607] phi() + [608] call bitmap_clear to:gfx_init_vic_bitmap::@1 gfx_init_vic_bitmap::@1: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@3 gfx_init_vic_bitmap::@4 - [606] (byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@3/(byte) 0 gfx_init_vic_bitmap::@4/(byte) gfx_init_vic_bitmap::l#1 ) - [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 + [609] (byte) gfx_init_vic_bitmap::l#2 ← phi( gfx_init_vic_bitmap::@3/(byte) 0 gfx_init_vic_bitmap::@4/(byte) gfx_init_vic_bitmap::l#1 ) + [610] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 to:gfx_init_vic_bitmap::@return gfx_init_vic_bitmap::@return: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1 - [608] return + [611] return to:@return gfx_init_vic_bitmap::@2: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@1 - [609] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) - [610] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) - [611] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) - [612] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) - [613] call bitmap_line + [612] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) + [613] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) + [614] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) + [615] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) + [616] call bitmap_line to:gfx_init_vic_bitmap::@4 gfx_init_vic_bitmap::@4: scope:[gfx_init_vic_bitmap] from gfx_init_vic_bitmap::@2 - [614] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 + [617] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 to:gfx_init_vic_bitmap::@1 (void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) bitmap_line: scope:[bitmap_line] from gfx_init_vic_bitmap::@2 - [615] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 + [618] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 to:bitmap_line::@2 bitmap_line::@2: scope:[bitmap_line] from bitmap_line - [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 - [617] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 + [619] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 + [620] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 to:bitmap_line::@3 bitmap_line::@3: scope:[bitmap_line] from bitmap_line::@2 - [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 - [619] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 + [621] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 + [622] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 to:bitmap_line::@4 bitmap_line::@4: scope:[bitmap_line] from bitmap_line::@3 - [620] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 - [621] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 - [622] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 - [623] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 - [624] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 - [625] call bitmap_line_ydxi + [623] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 + [624] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 + [625] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 + [626] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 + [627] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 + [628] call bitmap_line_ydxi to:bitmap_line::@return bitmap_line::@return: scope:[bitmap_line] from bitmap_line::@10 bitmap_line::@12 bitmap_line::@13 bitmap_line::@14 bitmap_line::@4 bitmap_line::@6 bitmap_line::@8 bitmap_line::@9 - [626] return + [629] return to:@return bitmap_line::@8: scope:[bitmap_line] from bitmap_line::@3 - [627] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 - [628] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 - [629] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 - [630] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 - [631] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 - [632] call bitmap_line_xdyi + [630] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 + [631] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 + [632] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 + [633] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 + [634] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 + [635] call bitmap_line_xdyi to:bitmap_line::@return bitmap_line::@7: scope:[bitmap_line] from bitmap_line::@2 - [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 - [634] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 + [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 + [637] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 to:bitmap_line::@10 bitmap_line::@10: scope:[bitmap_line] from bitmap_line::@7 - [635] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 - [636] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 - [637] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 - [638] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 - [639] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 - [640] call bitmap_line_ydxd + [638] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 + [639] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 + [640] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 + [641] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 + [642] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 + [643] call bitmap_line_ydxd to:bitmap_line::@return bitmap_line::@9: scope:[bitmap_line] from bitmap_line::@7 - [641] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 - [642] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 - [643] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 - [644] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 - [645] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 - [646] call bitmap_line_xdyd + [644] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 + [645] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 + [646] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 + [647] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 + [648] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 + [649] call bitmap_line_xdyd to:bitmap_line::@return bitmap_line::@1: scope:[bitmap_line] from bitmap_line - [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 - [648] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 + [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 + [651] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 to:bitmap_line::@5 bitmap_line::@5: scope:[bitmap_line] from bitmap_line::@1 - [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 - [650] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 + [652] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 + [653] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 to:bitmap_line::@6 bitmap_line::@6: scope:[bitmap_line] from bitmap_line::@5 - [651] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 - [652] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 - [653] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 - [654] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 - [655] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 - [656] call bitmap_line_ydxd + [654] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 + [655] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 + [656] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 + [657] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 + [658] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 + [659] call bitmap_line_ydxd to:bitmap_line::@return bitmap_line::@12: scope:[bitmap_line] from bitmap_line::@5 - [657] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 - [658] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 - [659] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 - [660] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 - [661] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 - [662] call bitmap_line_xdyd + [660] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 + [661] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 + [662] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 + [663] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 + [664] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 + [665] call bitmap_line_xdyd to:bitmap_line::@return bitmap_line::@11: scope:[bitmap_line] from bitmap_line::@1 - [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 - [664] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 + [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 + [667] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 to:bitmap_line::@14 bitmap_line::@14: scope:[bitmap_line] from bitmap_line::@11 - [665] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 - [666] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 - [667] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 - [668] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 - [669] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 - [670] call bitmap_line_ydxi + [668] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 + [669] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 + [670] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 + [671] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 + [672] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 + [673] call bitmap_line_ydxi to:bitmap_line::@return bitmap_line::@13: scope:[bitmap_line] from bitmap_line::@11 - [671] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 - [672] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 - [673] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 - [674] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 - [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 - [676] call bitmap_line_xdyi + [674] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 + [675] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 + [676] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 + [677] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 + [678] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 + [679] call bitmap_line_xdyi to:bitmap_line::@return (void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) bitmap_line_xdyi: scope:[bitmap_line_xdyi] from bitmap_line::@13 bitmap_line::@8 - [677] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) - [677] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) - [677] (byte) bitmap_line_xdyi::y#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::y#0 bitmap_line::@13/(byte) bitmap_line_xdyi::y#1 ) - [677] (byte) bitmap_line_xdyi::x#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x#1 ) - [677] (byte) bitmap_line_xdyi::yd#2 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::yd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::yd#1 ) - [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 + [680] (byte) bitmap_line_xdyi::x1#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x1#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x1#1 ) + [680] (byte) bitmap_line_xdyi::xd#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::xd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::xd#1 ) + [680] (byte) bitmap_line_xdyi::y#5 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::y#0 bitmap_line::@13/(byte) bitmap_line_xdyi::y#1 ) + [680] (byte) bitmap_line_xdyi::x#6 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::x#0 bitmap_line::@13/(byte) bitmap_line_xdyi::x#1 ) + [680] (byte) bitmap_line_xdyi::yd#2 ← phi( bitmap_line::@8/(byte) bitmap_line_xdyi::yd#0 bitmap_line::@13/(byte) bitmap_line_xdyi::yd#1 ) + [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 to:bitmap_line_xdyi::@1 bitmap_line_xdyi::@1: scope:[bitmap_line_xdyi] from bitmap_line_xdyi bitmap_line_xdyi::@2 - [679] (byte) bitmap_line_xdyi::e#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::e#0 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::e#6 ) - [679] (byte) bitmap_line_xdyi::y#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::y#5 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::y#6 ) - [679] (byte) bitmap_line_xdyi::x#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::x#6 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::x#2 ) - [680] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 - [681] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 - [682] call bitmap_plot + [682] (byte) bitmap_line_xdyi::e#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::e#0 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::e#6 ) + [682] (byte) bitmap_line_xdyi::y#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::y#5 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::y#6 ) + [682] (byte) bitmap_line_xdyi::x#3 ← phi( bitmap_line_xdyi/(byte) bitmap_line_xdyi::x#6 bitmap_line_xdyi::@2/(byte) bitmap_line_xdyi::x#2 ) + [683] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 + [684] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 + [685] call bitmap_plot to:bitmap_line_xdyi::@4 bitmap_line_xdyi::@4: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@1 - [683] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 - [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 - [685] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 + [686] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 + [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 + [688] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 to:bitmap_line_xdyi::@3 bitmap_line_xdyi::@3: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@4 - [686] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 - [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 + [689] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 + [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 to:bitmap_line_xdyi::@2 bitmap_line_xdyi::@2: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 - [688] (byte) bitmap_line_xdyi::e#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::e#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::e#1 ) - [688] (byte) bitmap_line_xdyi::y#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::y#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::y#3 ) - [689] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 - [690] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 + [691] (byte) bitmap_line_xdyi::e#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::e#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::e#1 ) + [691] (byte) bitmap_line_xdyi::y#6 ← phi( bitmap_line_xdyi::@3/(byte) bitmap_line_xdyi::y#2 bitmap_line_xdyi::@4/(byte) bitmap_line_xdyi::y#3 ) + [692] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 + [693] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 to:bitmap_line_xdyi::@return bitmap_line_xdyi::@return: scope:[bitmap_line_xdyi] from bitmap_line_xdyi::@2 - [691] return + [694] return to:@return (void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) bitmap_plot: scope:[bitmap_plot] from bitmap_line_xdyd::@1 bitmap_line_xdyi::@1 bitmap_line_ydxd::@1 bitmap_line_ydxi::@1 - [692] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) - [692] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) - [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) - [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) - [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 - [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) - [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 + [695] (byte) bitmap_plot::y#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::y#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::y#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::y#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::y#2 ) + [695] (byte) bitmap_plot::x#4 ← phi( bitmap_line_xdyd::@1/(byte) bitmap_plot::x#1 bitmap_line_xdyi::@1/(byte) bitmap_plot::x#0 bitmap_line_ydxd::@1/(byte) bitmap_plot::x#3 bitmap_line_ydxi::@1/(byte) bitmap_plot::x#2 ) + [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) + [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) + [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 + [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) + [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 to:bitmap_plot::@return bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot - [698] return + [701] return to:@return (void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) bitmap_line_ydxi: scope:[bitmap_line_ydxi] from bitmap_line::@14 bitmap_line::@4 - [699] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) - [699] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) - [699] (byte) bitmap_line_ydxi::y#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y#0 ) - [699] (byte) bitmap_line_ydxi::x#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::x#1 bitmap_line::@4/(byte) bitmap_line_ydxi::x#0 ) - [699] (byte) bitmap_line_ydxi::xd#2 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::xd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::xd#0 ) - [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 + [702] (byte) bitmap_line_ydxi::y1#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y1#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y1#0 ) + [702] (byte) bitmap_line_ydxi::yd#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::yd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::yd#0 ) + [702] (byte) bitmap_line_ydxi::y#6 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::y#1 bitmap_line::@4/(byte) bitmap_line_ydxi::y#0 ) + [702] (byte) bitmap_line_ydxi::x#5 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::x#1 bitmap_line::@4/(byte) bitmap_line_ydxi::x#0 ) + [702] (byte) bitmap_line_ydxi::xd#2 ← phi( bitmap_line::@14/(byte) bitmap_line_ydxi::xd#1 bitmap_line::@4/(byte) bitmap_line_ydxi::xd#0 ) + [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 to:bitmap_line_ydxi::@1 bitmap_line_ydxi::@1: scope:[bitmap_line_ydxi] from bitmap_line_ydxi bitmap_line_ydxi::@2 - [701] (byte) bitmap_line_ydxi::e#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::e#0 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::e#6 ) - [701] (byte) bitmap_line_ydxi::y#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::y#6 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::y#2 ) - [701] (byte) bitmap_line_ydxi::x#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::x#5 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::x#6 ) - [702] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 - [703] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 - [704] call bitmap_plot + [704] (byte) bitmap_line_ydxi::e#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::e#0 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::e#6 ) + [704] (byte) bitmap_line_ydxi::y#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::y#6 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::y#2 ) + [704] (byte) bitmap_line_ydxi::x#3 ← phi( bitmap_line_ydxi/(byte) bitmap_line_ydxi::x#5 bitmap_line_ydxi::@2/(byte) bitmap_line_ydxi::x#6 ) + [705] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 + [706] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 + [707] call bitmap_plot to:bitmap_line_ydxi::@4 bitmap_line_ydxi::@4: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@1 - [705] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 - [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 - [707] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 + [708] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 + [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 + [710] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 to:bitmap_line_ydxi::@3 bitmap_line_ydxi::@3: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@4 - [708] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 - [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 + [711] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 + [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 to:bitmap_line_ydxi::@2 bitmap_line_ydxi::@2: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 - [710] (byte) bitmap_line_ydxi::e#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::e#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::e#1 ) - [710] (byte) bitmap_line_ydxi::x#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::x#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::x#3 ) - [711] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 - [712] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 + [713] (byte) bitmap_line_ydxi::e#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::e#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::e#1 ) + [713] (byte) bitmap_line_ydxi::x#6 ← phi( bitmap_line_ydxi::@3/(byte) bitmap_line_ydxi::x#2 bitmap_line_ydxi::@4/(byte) bitmap_line_ydxi::x#3 ) + [714] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 + [715] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 to:bitmap_line_ydxi::@return bitmap_line_ydxi::@return: scope:[bitmap_line_ydxi] from bitmap_line_ydxi::@2 - [713] return + [716] return to:@return (void()) bitmap_line_xdyd((byte) bitmap_line_xdyd::x , (byte) bitmap_line_xdyd::y , (byte) bitmap_line_xdyd::x1 , (byte) bitmap_line_xdyd::xd , (byte) bitmap_line_xdyd::yd) bitmap_line_xdyd: scope:[bitmap_line_xdyd] from bitmap_line::@12 bitmap_line::@9 - [714] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) - [714] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) - [714] (byte) bitmap_line_xdyd::y#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::y#0 bitmap_line::@12/(byte) bitmap_line_xdyd::y#1 ) - [714] (byte) bitmap_line_xdyd::x#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x#1 ) - [714] (byte) bitmap_line_xdyd::yd#2 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::yd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::yd#1 ) - [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 + [717] (byte) bitmap_line_xdyd::x1#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x1#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x1#1 ) + [717] (byte) bitmap_line_xdyd::xd#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::xd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::xd#1 ) + [717] (byte) bitmap_line_xdyd::y#5 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::y#0 bitmap_line::@12/(byte) bitmap_line_xdyd::y#1 ) + [717] (byte) bitmap_line_xdyd::x#6 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::x#0 bitmap_line::@12/(byte) bitmap_line_xdyd::x#1 ) + [717] (byte) bitmap_line_xdyd::yd#2 ← phi( bitmap_line::@9/(byte) bitmap_line_xdyd::yd#0 bitmap_line::@12/(byte) bitmap_line_xdyd::yd#1 ) + [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 to:bitmap_line_xdyd::@1 bitmap_line_xdyd::@1: scope:[bitmap_line_xdyd] from bitmap_line_xdyd bitmap_line_xdyd::@2 - [716] (byte) bitmap_line_xdyd::e#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::e#0 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::e#6 ) - [716] (byte) bitmap_line_xdyd::y#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::y#5 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::y#6 ) - [716] (byte) bitmap_line_xdyd::x#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::x#6 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::x#2 ) - [717] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 - [718] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 - [719] call bitmap_plot + [719] (byte) bitmap_line_xdyd::e#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::e#0 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::e#6 ) + [719] (byte) bitmap_line_xdyd::y#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::y#5 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::y#6 ) + [719] (byte) bitmap_line_xdyd::x#3 ← phi( bitmap_line_xdyd/(byte) bitmap_line_xdyd::x#6 bitmap_line_xdyd::@2/(byte) bitmap_line_xdyd::x#2 ) + [720] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 + [721] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 + [722] call bitmap_plot to:bitmap_line_xdyd::@4 bitmap_line_xdyd::@4: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@1 - [720] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 - [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 - [722] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 + [723] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 + [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 + [725] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 to:bitmap_line_xdyd::@3 bitmap_line_xdyd::@3: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@4 - [723] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 - [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 + [726] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 + [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 to:bitmap_line_xdyd::@2 bitmap_line_xdyd::@2: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 - [725] (byte) bitmap_line_xdyd::e#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::e#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::e#1 ) - [725] (byte) bitmap_line_xdyd::y#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::y#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::y#3 ) - [726] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 - [727] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 + [728] (byte) bitmap_line_xdyd::e#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::e#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::e#1 ) + [728] (byte) bitmap_line_xdyd::y#6 ← phi( bitmap_line_xdyd::@3/(byte) bitmap_line_xdyd::y#2 bitmap_line_xdyd::@4/(byte) bitmap_line_xdyd::y#3 ) + [729] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 + [730] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 to:bitmap_line_xdyd::@return bitmap_line_xdyd::@return: scope:[bitmap_line_xdyd] from bitmap_line_xdyd::@2 - [728] return + [731] return to:@return (void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) bitmap_line_ydxd: scope:[bitmap_line_ydxd] from bitmap_line::@10 bitmap_line::@6 - [729] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) - [729] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) - [729] (byte) bitmap_line_ydxd::y#7 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y#1 ) - [729] (byte) bitmap_line_ydxd::x#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::x#0 bitmap_line::@6/(byte) bitmap_line_ydxd::x#1 ) - [729] (byte) bitmap_line_ydxd::xd#2 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::xd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::xd#1 ) - [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 + [732] (byte) bitmap_line_ydxd::y1#6 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y1#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y1#1 ) + [732] (byte) bitmap_line_ydxd::yd#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::yd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::yd#1 ) + [732] (byte) bitmap_line_ydxd::y#7 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::y#0 bitmap_line::@6/(byte) bitmap_line_ydxd::y#1 ) + [732] (byte) bitmap_line_ydxd::x#5 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::x#0 bitmap_line::@6/(byte) bitmap_line_ydxd::x#1 ) + [732] (byte) bitmap_line_ydxd::xd#2 ← phi( bitmap_line::@10/(byte) bitmap_line_ydxd::xd#0 bitmap_line::@6/(byte) bitmap_line_ydxd::xd#1 ) + [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 to:bitmap_line_ydxd::@1 bitmap_line_ydxd::@1: scope:[bitmap_line_ydxd] from bitmap_line_ydxd bitmap_line_ydxd::@2 - [731] (byte) bitmap_line_ydxd::e#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::e#0 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::e#6 ) - [731] (byte) bitmap_line_ydxd::y#2 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::y#7 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::y#3 ) - [731] (byte) bitmap_line_ydxd::x#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::x#5 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::x#6 ) - [732] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 - [733] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 - [734] call bitmap_plot + [734] (byte) bitmap_line_ydxd::e#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::e#0 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::e#6 ) + [734] (byte) bitmap_line_ydxd::y#2 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::y#7 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::y#3 ) + [734] (byte) bitmap_line_ydxd::x#3 ← phi( bitmap_line_ydxd/(byte) bitmap_line_ydxd::x#5 bitmap_line_ydxd::@2/(byte) bitmap_line_ydxd::x#6 ) + [735] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 + [736] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 + [737] call bitmap_plot to:bitmap_line_ydxd::@4 bitmap_line_ydxd::@4: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@1 - [735] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 - [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 - [737] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 + [738] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 + [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 + [740] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 to:bitmap_line_ydxd::@3 bitmap_line_ydxd::@3: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@4 - [738] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 - [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 + [741] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 + [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 to:bitmap_line_ydxd::@2 bitmap_line_ydxd::@2: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 - [740] (byte) bitmap_line_ydxd::e#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::e#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::e#1 ) - [740] (byte) bitmap_line_ydxd::x#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::x#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::x#3 ) - [741] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 - [742] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 + [743] (byte) bitmap_line_ydxd::e#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::e#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::e#1 ) + [743] (byte) bitmap_line_ydxd::x#6 ← phi( bitmap_line_ydxd::@3/(byte) bitmap_line_ydxd::x#2 bitmap_line_ydxd::@4/(byte) bitmap_line_ydxd::x#3 ) + [744] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 + [745] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 to:bitmap_line_ydxd::@return bitmap_line_ydxd::@return: scope:[bitmap_line_ydxd] from bitmap_line_ydxd::@2 - [743] return + [746] return to:@return (void()) bitmap_clear() bitmap_clear: scope:[bitmap_clear] from gfx_init_vic_bitmap::@3 - [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) - [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 + [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) + [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 to:bitmap_clear::@1 bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear bitmap_clear::@3 - [746] (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) 0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) - [746] (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#5 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#1 ) + [749] (byte) bitmap_clear::y#4 ← phi( bitmap_clear/(byte) 0 bitmap_clear::@3/(byte) bitmap_clear::y#1 ) + [749] (byte*) bitmap_clear::bitmap#3 ← phi( bitmap_clear/(byte*) bitmap_clear::bitmap#5 bitmap_clear::@3/(byte*) bitmap_clear::bitmap#1 ) to:bitmap_clear::@2 bitmap_clear::@2: scope:[bitmap_clear] from bitmap_clear::@1 bitmap_clear::@2 - [747] (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) 0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) - [747] (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) - [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 - [749] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 - [750] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 - [751] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 + [750] (byte) bitmap_clear::x#2 ← phi( bitmap_clear::@1/(byte) 0 bitmap_clear::@2/(byte) bitmap_clear::x#1 ) + [750] (byte*) bitmap_clear::bitmap#2 ← phi( bitmap_clear::@1/(byte*) bitmap_clear::bitmap#3 bitmap_clear::@2/(byte*) bitmap_clear::bitmap#1 ) + [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 + [752] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 + [753] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 + [754] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 to:bitmap_clear::@3 bitmap_clear::@3: scope:[bitmap_clear] from bitmap_clear::@2 - [752] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 - [753] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 + [755] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 + [756] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 to:bitmap_clear::@return bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@3 - [754] return + [757] return to:@return (void()) bitmap_init((byte*) bitmap_init::bitmap) bitmap_init: scope:[bitmap_init] from gfx_init_vic_bitmap - [755] phi() + [758] phi() to:bitmap_init::@1 bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2 - [756] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) - [756] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) - [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 - [758] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 - [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP - [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 - [761] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 - [762] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 + [759] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 ) + [759] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 ) + [760] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 + [761] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 + [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP + [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 + [764] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 + [765] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 to:bitmap_init::@2 bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1 - [763] phi() + [766] phi() to:bitmap_init::@2 bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6 - [764] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) - [765] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 - [766] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 + [767] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 ) + [768] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 + [769] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 to:bitmap_init::@3 bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4 - [767] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(byte*) 0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) - [767] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) - [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 - [769] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 - [770] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 - [771] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 - [772] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 - [773] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 - [774] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 + [770] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(byte*) 0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 ) + [770] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 ) + [771] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 + [772] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 + [773] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 + [774] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 + [775] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 + [776] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 + [777] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 to:bitmap_init::@5 bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3 - [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 + [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 to:bitmap_init::@4 bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5 - [776] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) - [777] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 - [778] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 + [779] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 ) + [780] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 + [781] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 to:bitmap_init::@return bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4 - [779] return + [782] return to:@return (void()) gfx_init_charset() gfx_init_charset: scope:[gfx_init_charset] from gfx_init::@5 - [780] *((const byte*) PROCPORT) ← (byte) $32 + [783] *((const byte*) PROCPORT) ← (byte) $32 to:gfx_init_charset::@1 gfx_init_charset::@1: scope:[gfx_init_charset] from gfx_init_charset gfx_init_charset::@3 - [781] (byte) gfx_init_charset::c#4 ← phi( gfx_init_charset/(byte) 0 gfx_init_charset::@3/(byte) gfx_init_charset::c#1 ) - [781] (byte*) gfx_init_charset::charset#3 ← phi( gfx_init_charset/(const byte*) VIC_CHARSET_ROM gfx_init_charset::@3/(byte*) gfx_init_charset::charset#1 ) - [781] (byte*) gfx_init_charset::chargen#3 ← phi( gfx_init_charset/(const byte*) CHARGEN gfx_init_charset::@3/(byte*) gfx_init_charset::chargen#1 ) + [784] (byte) gfx_init_charset::c#4 ← phi( gfx_init_charset/(byte) 0 gfx_init_charset::@3/(byte) gfx_init_charset::c#1 ) + [784] (byte*) gfx_init_charset::charset#3 ← phi( gfx_init_charset/(const byte*) VIC_CHARSET_ROM gfx_init_charset::@3/(byte*) gfx_init_charset::charset#1 ) + [784] (byte*) gfx_init_charset::chargen#3 ← phi( gfx_init_charset/(const byte*) CHARGEN gfx_init_charset::@3/(byte*) gfx_init_charset::chargen#1 ) to:gfx_init_charset::@2 gfx_init_charset::@2: scope:[gfx_init_charset] from gfx_init_charset::@1 gfx_init_charset::@2 - [782] (byte) gfx_init_charset::l#2 ← phi( gfx_init_charset::@1/(byte) 0 gfx_init_charset::@2/(byte) gfx_init_charset::l#1 ) - [782] (byte*) gfx_init_charset::charset#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::charset#3 gfx_init_charset::@2/(byte*) gfx_init_charset::charset#1 ) - [782] (byte*) gfx_init_charset::chargen#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::chargen#3 gfx_init_charset::@2/(byte*) gfx_init_charset::chargen#1 ) - [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) - [784] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 - [785] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 - [786] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 - [787] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 + [785] (byte) gfx_init_charset::l#2 ← phi( gfx_init_charset::@1/(byte) 0 gfx_init_charset::@2/(byte) gfx_init_charset::l#1 ) + [785] (byte*) gfx_init_charset::charset#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::charset#3 gfx_init_charset::@2/(byte*) gfx_init_charset::charset#1 ) + [785] (byte*) gfx_init_charset::chargen#2 ← phi( gfx_init_charset::@1/(byte*) gfx_init_charset::chargen#3 gfx_init_charset::@2/(byte*) gfx_init_charset::chargen#1 ) + [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) + [787] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 + [788] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 + [789] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 + [790] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 to:gfx_init_charset::@3 gfx_init_charset::@3: scope:[gfx_init_charset] from gfx_init_charset::@2 - [788] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 - [789] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 + [791] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 + [792] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 to:gfx_init_charset::@4 gfx_init_charset::@4: scope:[gfx_init_charset] from gfx_init_charset::@3 - [790] *((const byte*) PROCPORT) ← (byte) $37 + [793] *((const byte*) PROCPORT) ← (byte) $37 to:gfx_init_charset::@return gfx_init_charset::@return: scope:[gfx_init_charset] from gfx_init_charset::@4 - [791] return + [794] return to:@return (void()) gfx_init_screen4() gfx_init_screen4: scope:[gfx_init_screen4] from gfx_init::@4 - [792] phi() + [795] phi() to:gfx_init_screen4::@1 gfx_init_screen4::@1: scope:[gfx_init_screen4] from gfx_init_screen4 gfx_init_screen4::@3 - [793] (byte) gfx_init_screen4::cy#4 ← phi( gfx_init_screen4/(byte) 0 gfx_init_screen4::@3/(byte) gfx_init_screen4::cy#1 ) - [793] (byte*) gfx_init_screen4::ch#3 ← phi( gfx_init_screen4/(const byte*) VIC_SCREEN4 gfx_init_screen4::@3/(byte*) gfx_init_screen4::ch#1 ) + [796] (byte) gfx_init_screen4::cy#4 ← phi( gfx_init_screen4/(byte) 0 gfx_init_screen4::@3/(byte) gfx_init_screen4::cy#1 ) + [796] (byte*) gfx_init_screen4::ch#3 ← phi( gfx_init_screen4/(const byte*) VIC_SCREEN4 gfx_init_screen4::@3/(byte*) gfx_init_screen4::ch#1 ) to:gfx_init_screen4::@2 gfx_init_screen4::@2: scope:[gfx_init_screen4] from gfx_init_screen4::@1 gfx_init_screen4::@2 - [794] (byte) gfx_init_screen4::cx#2 ← phi( gfx_init_screen4::@1/(byte) 0 gfx_init_screen4::@2/(byte) gfx_init_screen4::cx#1 ) - [794] (byte*) gfx_init_screen4::ch#2 ← phi( gfx_init_screen4::@1/(byte*) gfx_init_screen4::ch#3 gfx_init_screen4::@2/(byte*) gfx_init_screen4::ch#1 ) - [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 - [796] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 - [797] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 - [798] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 + [797] (byte) gfx_init_screen4::cx#2 ← phi( gfx_init_screen4::@1/(byte) 0 gfx_init_screen4::@2/(byte) gfx_init_screen4::cx#1 ) + [797] (byte*) gfx_init_screen4::ch#2 ← phi( gfx_init_screen4::@1/(byte*) gfx_init_screen4::ch#3 gfx_init_screen4::@2/(byte*) gfx_init_screen4::ch#1 ) + [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 + [799] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 + [800] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 + [801] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 to:gfx_init_screen4::@3 gfx_init_screen4::@3: scope:[gfx_init_screen4] from gfx_init_screen4::@2 - [799] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 - [800] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 + [802] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 + [803] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 to:gfx_init_screen4::@return gfx_init_screen4::@return: scope:[gfx_init_screen4] from gfx_init_screen4::@3 - [801] return + [804] return to:@return (void()) gfx_init_screen3() gfx_init_screen3: scope:[gfx_init_screen3] from gfx_init::@3 - [802] phi() + [805] phi() to:gfx_init_screen3::@1 gfx_init_screen3::@1: scope:[gfx_init_screen3] from gfx_init_screen3 gfx_init_screen3::@3 - [803] (byte*) gfx_init_screen3::ch#3 ← phi( gfx_init_screen3/(const byte*) VIC_SCREEN3 gfx_init_screen3::@3/(byte*) gfx_init_screen3::ch#1 ) - [803] (byte) gfx_init_screen3::cy#4 ← phi( gfx_init_screen3/(byte) 0 gfx_init_screen3::@3/(byte) gfx_init_screen3::cy#1 ) + [806] (byte*) gfx_init_screen3::ch#3 ← phi( gfx_init_screen3/(const byte*) VIC_SCREEN3 gfx_init_screen3::@3/(byte*) gfx_init_screen3::ch#1 ) + [806] (byte) gfx_init_screen3::cy#4 ← phi( gfx_init_screen3/(byte) 0 gfx_init_screen3::@3/(byte) gfx_init_screen3::cy#1 ) to:gfx_init_screen3::@2 gfx_init_screen3::@2: scope:[gfx_init_screen3] from gfx_init_screen3::@1 gfx_init_screen3::@2 - [804] (byte*) gfx_init_screen3::ch#2 ← phi( gfx_init_screen3::@1/(byte*) gfx_init_screen3::ch#3 gfx_init_screen3::@2/(byte*) gfx_init_screen3::ch#1 ) - [804] (byte) gfx_init_screen3::cx#2 ← phi( gfx_init_screen3::@1/(byte) 0 gfx_init_screen3::@2/(byte) gfx_init_screen3::cx#1 ) - [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 - [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 - [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 - [808] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 - [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 - [810] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 - [811] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 - [812] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 + [807] (byte*) gfx_init_screen3::ch#2 ← phi( gfx_init_screen3::@1/(byte*) gfx_init_screen3::ch#3 gfx_init_screen3::@2/(byte*) gfx_init_screen3::ch#1 ) + [807] (byte) gfx_init_screen3::cx#2 ← phi( gfx_init_screen3::@1/(byte) 0 gfx_init_screen3::@2/(byte) gfx_init_screen3::cx#1 ) + [808] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 + [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 + [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 + [811] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 + [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 + [813] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 + [814] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 + [815] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 to:gfx_init_screen3::@3 gfx_init_screen3::@3: scope:[gfx_init_screen3] from gfx_init_screen3::@2 - [813] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 - [814] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 + [816] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 + [817] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 to:gfx_init_screen3::@return gfx_init_screen3::@return: scope:[gfx_init_screen3] from gfx_init_screen3::@3 - [815] return + [818] return to:@return (void()) gfx_init_screen2() gfx_init_screen2: scope:[gfx_init_screen2] from gfx_init::@2 - [816] phi() + [819] phi() to:gfx_init_screen2::@1 gfx_init_screen2::@1: scope:[gfx_init_screen2] from gfx_init_screen2 gfx_init_screen2::@3 - [817] (byte*) gfx_init_screen2::ch#3 ← phi( gfx_init_screen2/(const byte*) VIC_SCREEN2 gfx_init_screen2::@3/(byte*) gfx_init_screen2::ch#1 ) - [817] (byte) gfx_init_screen2::cy#4 ← phi( gfx_init_screen2/(byte) 0 gfx_init_screen2::@3/(byte) gfx_init_screen2::cy#1 ) + [820] (byte*) gfx_init_screen2::ch#3 ← phi( gfx_init_screen2/(const byte*) VIC_SCREEN2 gfx_init_screen2::@3/(byte*) gfx_init_screen2::ch#1 ) + [820] (byte) gfx_init_screen2::cy#4 ← phi( gfx_init_screen2/(byte) 0 gfx_init_screen2::@3/(byte) gfx_init_screen2::cy#1 ) to:gfx_init_screen2::@2 gfx_init_screen2::@2: scope:[gfx_init_screen2] from gfx_init_screen2::@1 gfx_init_screen2::@2 - [818] (byte*) gfx_init_screen2::ch#2 ← phi( gfx_init_screen2::@1/(byte*) gfx_init_screen2::ch#3 gfx_init_screen2::@2/(byte*) gfx_init_screen2::ch#1 ) - [818] (byte) gfx_init_screen2::cx#2 ← phi( gfx_init_screen2::@1/(byte) 0 gfx_init_screen2::@2/(byte) gfx_init_screen2::cx#1 ) - [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 - [820] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f - [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 - [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 - [823] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 - [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 - [825] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 - [826] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 - [827] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 + [821] (byte*) gfx_init_screen2::ch#2 ← phi( gfx_init_screen2::@1/(byte*) gfx_init_screen2::ch#3 gfx_init_screen2::@2/(byte*) gfx_init_screen2::ch#1 ) + [821] (byte) gfx_init_screen2::cx#2 ← phi( gfx_init_screen2::@1/(byte) 0 gfx_init_screen2::@2/(byte) gfx_init_screen2::cx#1 ) + [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 + [823] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f + [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 + [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 + [826] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 + [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 + [828] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 + [829] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 + [830] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 to:gfx_init_screen2::@3 gfx_init_screen2::@3: scope:[gfx_init_screen2] from gfx_init_screen2::@2 - [828] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 - [829] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 + [831] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 + [832] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 to:gfx_init_screen2::@return gfx_init_screen2::@return: scope:[gfx_init_screen2] from gfx_init_screen2::@3 - [830] return + [833] return to:@return (void()) gfx_init_screen1() gfx_init_screen1: scope:[gfx_init_screen1] from gfx_init::@1 - [831] phi() + [834] phi() to:gfx_init_screen1::@1 gfx_init_screen1::@1: scope:[gfx_init_screen1] from gfx_init_screen1 gfx_init_screen1::@3 - [832] (byte*) gfx_init_screen1::ch#3 ← phi( gfx_init_screen1/(const byte*) VIC_SCREEN1 gfx_init_screen1::@3/(byte*) gfx_init_screen1::ch#1 ) - [832] (byte) gfx_init_screen1::cy#4 ← phi( gfx_init_screen1/(byte) 0 gfx_init_screen1::@3/(byte) gfx_init_screen1::cy#1 ) + [835] (byte*) gfx_init_screen1::ch#3 ← phi( gfx_init_screen1/(const byte*) VIC_SCREEN1 gfx_init_screen1::@3/(byte*) gfx_init_screen1::ch#1 ) + [835] (byte) gfx_init_screen1::cy#4 ← phi( gfx_init_screen1/(byte) 0 gfx_init_screen1::@3/(byte) gfx_init_screen1::cy#1 ) to:gfx_init_screen1::@2 gfx_init_screen1::@2: scope:[gfx_init_screen1] from gfx_init_screen1::@1 gfx_init_screen1::@2 - [833] (byte*) gfx_init_screen1::ch#2 ← phi( gfx_init_screen1::@1/(byte*) gfx_init_screen1::ch#3 gfx_init_screen1::@2/(byte*) gfx_init_screen1::ch#1 ) - [833] (byte) gfx_init_screen1::cx#2 ← phi( gfx_init_screen1::@1/(byte) 0 gfx_init_screen1::@2/(byte) gfx_init_screen1::cx#1 ) - [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 - [835] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f - [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 - [837] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 - [838] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 - [839] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 + [836] (byte*) gfx_init_screen1::ch#2 ← phi( gfx_init_screen1::@1/(byte*) gfx_init_screen1::ch#3 gfx_init_screen1::@2/(byte*) gfx_init_screen1::ch#1 ) + [836] (byte) gfx_init_screen1::cx#2 ← phi( gfx_init_screen1::@1/(byte) 0 gfx_init_screen1::@2/(byte) gfx_init_screen1::cx#1 ) + [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 + [838] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f + [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 + [840] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 + [841] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 + [842] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 to:gfx_init_screen1::@3 gfx_init_screen1::@3: scope:[gfx_init_screen1] from gfx_init_screen1::@2 - [840] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 - [841] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 + [843] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 + [844] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 to:gfx_init_screen1::@return gfx_init_screen1::@return: scope:[gfx_init_screen1] from gfx_init_screen1::@3 - [842] return + [845] return to:@return (void()) gfx_init_screen0() gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init - [843] phi() + [846] phi() to:gfx_init_screen0::@1 gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3 - [844] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) VIC_SCREEN0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 ) - [844] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) + [847] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) VIC_SCREEN0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 ) + [847] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) to:gfx_init_screen0::@2 gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2 - [845] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) - [845] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) - [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f - [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 - [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f - [849] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 - [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 - [851] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 - [852] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 - [853] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 + [848] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) + [848] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) + [849] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f + [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 + [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f + [852] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 + [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 + [854] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 + [855] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 + [856] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 to:gfx_init_screen0::@3 gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 - [854] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 - [855] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 + [857] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 + [858] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 to:gfx_init_screen0::@return gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 - [856] return + [859] return to:@return (void()) keyboard_init() keyboard_init: scope:[keyboard_init] from main - [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff - [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 + [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff + [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 to:keyboard_init::@return keyboard_init::@return: scope:[keyboard_init] from keyboard_init - [859] return + [862] return to:@return @@ -11879,6 +11872,7 @@ VARIABLE REGISTER WEIGHTS (byte~) form_control::$15 4.0 (byte~) form_control::$22 4.0 (byte*) form_control::field +(byte*) form_control::field#0 0.5925925925925926 (byte) form_control::key_event (byte) form_control::key_event#0 2.6666666666666665 (byte) form_control::return @@ -11888,12 +11882,12 @@ VARIABLE REGISTER WEIGHTS (signed byte) form_cursor_count#1 0.3333333333333333 (signed byte) form_cursor_count#15 0.4 (signed byte) form_cursor_count#16 65.82352941176472 -(signed byte) form_cursor_count#21 221.2 +(signed byte) form_cursor_count#21 157.99999999999997 (signed byte) form_cursor_count#5 2.0 (byte) form_field_idx (byte) form_field_idx#1 0.3333333333333333 (byte) form_field_idx#18 65.94117647058826 -(byte) form_field_idx#28 30.75675675675673 +(byte) form_field_idx#28 29.17948717948718 (byte) form_field_idx#31 6.0 (byte) form_field_idx#5 2.0 (byte) form_field_idx#6 2.0 @@ -11904,10 +11898,12 @@ VARIABLE REGISTER WEIGHTS (byte) form_field_ptr::field_idx#1 4.0 (byte) form_field_ptr::field_idx#2 335.66666666666674 (byte*) form_field_ptr::line -(word) form_field_ptr::line#0 0.06451612903225806 +(word) form_field_ptr::line#0 0.4 (byte*) form_field_ptr::return +(byte*) form_field_ptr::return#0 1.3333333333333333 +(byte*) form_field_ptr::return#3 4.0 (byte) form_field_ptr::x -(byte) form_field_ptr::x#0 33.90000000000003 +(byte) form_field_ptr::x#0 251.25 (byte) form_field_ptr::y (byte) form_field_ptr::y#0 6.0 (void()) form_mode() @@ -12313,7 +12309,7 @@ VARIABLE REGISTER WEIGHTS (byte) keyboard_events_size#24 6.766666666666667 (byte) keyboard_events_size#27 0.3333333333333333 (byte) keyboard_events_size#4 3.0 -(byte) keyboard_events_size#47 73.73333333333335 +(byte) keyboard_events_size#47 65.05882352941177 (byte) keyboard_events_size#97 105.0 (void()) keyboard_init() (byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) @@ -12583,6 +12579,9 @@ Added variable apply_preset::idx#0 to live range equivalence class [ apply_prese Added variable form_field_ptr::y#0 to live range equivalence class [ form_field_ptr::y#0 ] Added variable form_field_ptr::line#0 to live range equivalence class [ form_field_ptr::line#0 ] Added variable form_field_ptr::x#0 to live range equivalence class [ form_field_ptr::x#0 ] +Added variable form_field_ptr::return#0 to live range equivalence class [ form_field_ptr::return#0 ] +Added variable form_field_ptr::return#3 to live range equivalence class [ form_field_ptr::return#3 ] +Added variable form_control::field#0 to live range equivalence class [ form_control::field#0 ] Added variable form_control::$12 to live range equivalence class [ form_control::$12 ] Added variable keyboard_event_get::return#4 to live range equivalence class [ keyboard_event_get::return#4 ] Added variable form_control::key_event#0 to live range equivalence class [ form_control::key_event#0 ] @@ -12844,6 +12843,9 @@ Complete equivalence classes [ form_field_ptr::y#0 ] [ form_field_ptr::line#0 ] [ form_field_ptr::x#0 ] +[ form_field_ptr::return#0 ] +[ form_field_ptr::return#3 ] +[ form_control::field#0 ] [ form_control::$12 ] [ keyboard_event_get::return#4 ] [ form_control::key_event#0 ] @@ -13104,69 +13106,72 @@ Allocated zp[1]:261 [ apply_preset::idx#0 ] Allocated zp[1]:262 [ form_field_ptr::y#0 ] Allocated zp[2]:263 [ form_field_ptr::line#0 ] Allocated zp[1]:265 [ form_field_ptr::x#0 ] -Allocated zp[1]:266 [ form_control::$12 ] -Allocated zp[1]:267 [ keyboard_event_get::return#4 ] -Allocated zp[1]:268 [ form_control::key_event#0 ] -Allocated zp[1]:269 [ form_control::$14 ] -Allocated zp[1]:270 [ form_control::$15 ] -Allocated zp[1]:271 [ form_control::$22 ] -Allocated zp[1]:272 [ form_control::$13 ] -Allocated zp[1]:273 [ form_set_screen::$0 ] -Allocated zp[1]:274 [ form_set_screen::$1 ] -Allocated zp[1]:275 [ print_str_lines::ch#0 ] -Allocated zp[2]:276 [ memset::str#0 ] -Allocated zp[2]:278 [ memset::end#0 ] -Allocated zp[4]:280 [ gfx_init_plane_fill::$0 ] -Allocated zp[2]:284 [ gfx_init_plane_fill::$1 ] -Allocated zp[1]:286 [ gfx_init_plane_fill::gfxbCpuBank#0 ] -Allocated zp[2]:287 [ gfx_init_plane_fill::$4 ] -Allocated zp[2]:289 [ gfx_init_plane_fill::$5 ] -Allocated zp[2]:291 [ gfx_init_plane_fill::gfxb#0 ] -Allocated zp[1]:293 [ gfx_init_plane_horisontal2::$2 ] -Allocated zp[1]:294 [ gfx_init_plane_horisontal2::row#0 ] -Allocated zp[1]:295 [ gfx_init_plane_horisontal::$2 ] -Allocated zp[1]:296 [ gfx_init_plane_charset8::$2 ] -Allocated zp[2]:297 [ gfx_init_plane_8bppchunky::$5 ] -Allocated zp[1]:299 [ gfx_init_plane_8bppchunky::c#0 ] -Allocated zp[1]:300 [ bitmap_line::x0#0 ] -Allocated zp[1]:301 [ bitmap_line::x1#0 ] -Allocated zp[1]:302 [ bitmap_line::y0#0 ] -Allocated zp[1]:303 [ bitmap_line::y1#0 ] -Allocated zp[1]:304 [ bitmap_line::xd#2 ] -Allocated zp[1]:305 [ bitmap_line::yd#2 ] -Allocated zp[1]:306 [ bitmap_line::yd#1 ] -Allocated zp[1]:307 [ bitmap_line::xd#1 ] -Allocated zp[1]:308 [ bitmap_line::yd#10 ] -Allocated zp[1]:309 [ bitmap_line::yd#11 ] -Allocated zp[1]:310 [ bitmap_line_xdyi::$6 ] -Allocated zp[2]:311 [ bitmap_plot::plotter_x#0 ] -Allocated zp[2]:313 [ bitmap_plot::plotter_y#0 ] -Allocated zp[2]:315 [ bitmap_plot::plotter#0 ] -Allocated zp[1]:317 [ bitmap_plot::$1 ] -Allocated zp[1]:318 [ bitmap_line_ydxi::$6 ] -Allocated zp[1]:319 [ bitmap_line_xdyd::$6 ] -Allocated zp[1]:320 [ bitmap_line_ydxd::$6 ] -Allocated zp[2]:321 [ bitmap_clear::bitmap#0 ] -Allocated zp[1]:323 [ bitmap_init::$0 ] -Allocated zp[1]:324 [ bitmap_init::$10 ] -Allocated zp[1]:325 [ bitmap_init::$7 ] -Allocated zp[1]:326 [ bitmap_init::$8 ] -Allocated zp[1]:327 [ bitmap_init::$9 ] -Allocated zp[1]:328 [ gfx_init_screen3::$0 ] -Allocated zp[1]:329 [ gfx_init_screen3::$1 ] -Allocated zp[1]:330 [ gfx_init_screen3::$2 ] -Allocated zp[1]:331 [ gfx_init_screen3::$3 ] -Allocated zp[1]:332 [ gfx_init_screen2::$0 ] -Allocated zp[1]:333 [ gfx_init_screen2::col#0 ] -Allocated zp[1]:334 [ gfx_init_screen2::col2#0 ] -Allocated zp[1]:335 [ gfx_init_screen2::$3 ] -Allocated zp[1]:336 [ gfx_init_screen2::$4 ] -Allocated zp[1]:337 [ gfx_init_screen1::$0 ] -Allocated zp[1]:338 [ gfx_init_screen1::$1 ] -Allocated zp[1]:339 [ gfx_init_screen0::$0 ] -Allocated zp[1]:340 [ gfx_init_screen0::$1 ] -Allocated zp[1]:341 [ gfx_init_screen0::$2 ] -Allocated zp[1]:342 [ gfx_init_screen0::$3 ] +Allocated zp[2]:266 [ form_field_ptr::return#0 ] +Allocated zp[2]:268 [ form_field_ptr::return#3 ] +Allocated zp[2]:270 [ form_control::field#0 ] +Allocated zp[1]:272 [ form_control::$12 ] +Allocated zp[1]:273 [ keyboard_event_get::return#4 ] +Allocated zp[1]:274 [ form_control::key_event#0 ] +Allocated zp[1]:275 [ form_control::$14 ] +Allocated zp[1]:276 [ form_control::$15 ] +Allocated zp[1]:277 [ form_control::$22 ] +Allocated zp[1]:278 [ form_control::$13 ] +Allocated zp[1]:279 [ form_set_screen::$0 ] +Allocated zp[1]:280 [ form_set_screen::$1 ] +Allocated zp[1]:281 [ print_str_lines::ch#0 ] +Allocated zp[2]:282 [ memset::str#0 ] +Allocated zp[2]:284 [ memset::end#0 ] +Allocated zp[4]:286 [ gfx_init_plane_fill::$0 ] +Allocated zp[2]:290 [ gfx_init_plane_fill::$1 ] +Allocated zp[1]:292 [ gfx_init_plane_fill::gfxbCpuBank#0 ] +Allocated zp[2]:293 [ gfx_init_plane_fill::$4 ] +Allocated zp[2]:295 [ gfx_init_plane_fill::$5 ] +Allocated zp[2]:297 [ gfx_init_plane_fill::gfxb#0 ] +Allocated zp[1]:299 [ gfx_init_plane_horisontal2::$2 ] +Allocated zp[1]:300 [ gfx_init_plane_horisontal2::row#0 ] +Allocated zp[1]:301 [ gfx_init_plane_horisontal::$2 ] +Allocated zp[1]:302 [ gfx_init_plane_charset8::$2 ] +Allocated zp[2]:303 [ gfx_init_plane_8bppchunky::$5 ] +Allocated zp[1]:305 [ gfx_init_plane_8bppchunky::c#0 ] +Allocated zp[1]:306 [ bitmap_line::x0#0 ] +Allocated zp[1]:307 [ bitmap_line::x1#0 ] +Allocated zp[1]:308 [ bitmap_line::y0#0 ] +Allocated zp[1]:309 [ bitmap_line::y1#0 ] +Allocated zp[1]:310 [ bitmap_line::xd#2 ] +Allocated zp[1]:311 [ bitmap_line::yd#2 ] +Allocated zp[1]:312 [ bitmap_line::yd#1 ] +Allocated zp[1]:313 [ bitmap_line::xd#1 ] +Allocated zp[1]:314 [ bitmap_line::yd#10 ] +Allocated zp[1]:315 [ bitmap_line::yd#11 ] +Allocated zp[1]:316 [ bitmap_line_xdyi::$6 ] +Allocated zp[2]:317 [ bitmap_plot::plotter_x#0 ] +Allocated zp[2]:319 [ bitmap_plot::plotter_y#0 ] +Allocated zp[2]:321 [ bitmap_plot::plotter#0 ] +Allocated zp[1]:323 [ bitmap_plot::$1 ] +Allocated zp[1]:324 [ bitmap_line_ydxi::$6 ] +Allocated zp[1]:325 [ bitmap_line_xdyd::$6 ] +Allocated zp[1]:326 [ bitmap_line_ydxd::$6 ] +Allocated zp[2]:327 [ bitmap_clear::bitmap#0 ] +Allocated zp[1]:329 [ bitmap_init::$0 ] +Allocated zp[1]:330 [ bitmap_init::$10 ] +Allocated zp[1]:331 [ bitmap_init::$7 ] +Allocated zp[1]:332 [ bitmap_init::$8 ] +Allocated zp[1]:333 [ bitmap_init::$9 ] +Allocated zp[1]:334 [ gfx_init_screen3::$0 ] +Allocated zp[1]:335 [ gfx_init_screen3::$1 ] +Allocated zp[1]:336 [ gfx_init_screen3::$2 ] +Allocated zp[1]:337 [ gfx_init_screen3::$3 ] +Allocated zp[1]:338 [ gfx_init_screen2::$0 ] +Allocated zp[1]:339 [ gfx_init_screen2::col#0 ] +Allocated zp[1]:340 [ gfx_init_screen2::col2#0 ] +Allocated zp[1]:341 [ gfx_init_screen2::$3 ] +Allocated zp[1]:342 [ gfx_init_screen2::$4 ] +Allocated zp[1]:343 [ gfx_init_screen1::$0 ] +Allocated zp[1]:344 [ gfx_init_screen1::$1 ] +Allocated zp[1]:345 [ gfx_init_screen0::$0 ] +Allocated zp[1]:346 [ gfx_init_screen0::$1 ] +Allocated zp[1]:347 [ gfx_init_screen0::$2 ] +Allocated zp[1]:348 [ gfx_init_screen0::$3 ] INITIAL ASM Target platform is c64basic / MOS6502X @@ -13390,7 +13395,7 @@ main: { // main::@3 __b3: // [10] call gfx_init - // [446] phi from main::@3 to gfx_init [phi:main::@3->gfx_init] + // [449] phi from main::@3 to gfx_init [phi:main::@3->gfx_init] gfx_init_from___b3: jsr gfx_init // [11] phi from main::@3 to main::@1 [phi:main::@3->main::@1] @@ -14251,7 +14256,7 @@ gfx_mode: { keyboard_event_get: { .label return = $d .label return_1 = $ed - .label return_2 = $10b + .label return_2 = $111 // [152] if((byte) keyboard_events_size#100==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda.z keyboard_events_size cmp #0 @@ -15107,9 +15112,9 @@ form_mode: { .label i = $1e .label preset_current = $21 // [253] call print_set_screen - // [444] phi from form_mode to print_set_screen [phi:form_mode->print_set_screen] + // [447] phi from form_mode to print_set_screen [phi:form_mode->print_set_screen] print_set_screen_from_form_mode: - // [444] phi (byte*) print_set_screen::screen#2 = (const byte*) COLS [phi:form_mode->print_set_screen#0] -- pbuz1=pbuc1 + // [447] phi (byte*) print_set_screen::screen#2 = (const byte*) COLS [phi:form_mode->print_set_screen#0] -- pbuz1=pbuc1 lda #COLS @@ -15128,9 +15133,9 @@ form_mode: { // form_mode::@9 __b9: // [257] call print_str_lines - // [412] phi from form_mode::@9 to print_str_lines [phi:form_mode::@9->print_str_lines] + // [415] phi from form_mode::@9 to print_str_lines [phi:form_mode::@9->print_str_lines] print_str_lines_from___b9: - // [412] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_COLS [phi:form_mode::@9->print_str_lines#0] -- pbuz1=pbuc1 + // [415] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_COLS [phi:form_mode::@9->print_str_lines#0] -- pbuz1=pbuc1 lda #FORM_COLS @@ -15142,9 +15147,9 @@ form_mode: { // form_mode::@10 __b10: // [259] call print_set_screen - // [444] phi from form_mode::@10 to print_set_screen [phi:form_mode::@10->print_set_screen] + // [447] phi from form_mode::@10 to print_set_screen [phi:form_mode::@10->print_set_screen] print_set_screen_from___b10: - // [444] phi (byte*) print_set_screen::screen#2 = (const byte*) FORM_SCREEN [phi:form_mode::@10->print_set_screen#0] -- pbuz1=pbuc1 + // [447] phi (byte*) print_set_screen::screen#2 = (const byte*) FORM_SCREEN [phi:form_mode::@10->print_set_screen#0] -- pbuz1=pbuc1 lda #FORM_SCREEN @@ -15163,9 +15168,9 @@ form_mode: { // form_mode::@12 __b12: // [263] call print_str_lines - // [412] phi from form_mode::@12 to print_str_lines [phi:form_mode::@12->print_str_lines] + // [415] phi from form_mode::@12 to print_str_lines [phi:form_mode::@12->print_str_lines] print_str_lines_from___b12: - // [412] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_TEXT [phi:form_mode::@12->print_str_lines#0] -- pbuz1=pbuc1 + // [415] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_TEXT [phi:form_mode::@12->print_str_lines#0] -- pbuz1=pbuc1 lda #FORM_TEXT @@ -15177,7 +15182,7 @@ form_mode: { // form_mode::@13 __b13: // [265] call form_set_screen - // [402] phi from form_mode::@13 to form_set_screen [phi:form_mode::@13->form_set_screen] + // [405] phi from form_mode::@13 to form_set_screen [phi:form_mode::@13->form_set_screen] form_set_screen_from___b13: jsr form_set_screen // [266] phi from form_mode::@13 to form_mode::@14 [phi:form_mode::@13->form_mode::@14] @@ -15684,7 +15689,9 @@ form_field_ptr: { .label y = $106 .label line = $107 .label x = $109 + .label return = $10a .label field_idx = $2a + .label return_1 = $10c // [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z field_idx lda form_fields_y,y @@ -15699,10 +15706,18 @@ form_field_ptr: { ldy.z field_idx lda form_fields_x,y sta.z x + // [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 -- pbuz1=pbuz2_plus_vbuz3 + lda.z x + clc + adc.z line + sta.z return + lda #0 + adc.z line+1 + sta.z return+1 jmp __breturn // form_field_ptr::@return __breturn: - // [340] return + // [341] return rts } // apply_preset @@ -15713,169 +15728,169 @@ apply_preset: { .label i = $2d .label idx = $105 .label preset = $2b - // [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 -- vbuz1_eq_0_then_la1 + // [342] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 -- vbuz1_eq_0_then_la1 lda.z idx cmp #0 beq __b2_from_apply_preset jmp __b3 // apply_preset::@3 __b3: - // [342] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [343] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #1 cmp.z idx beq __b2_from___b3 jmp __b4 // apply_preset::@4 __b4: - // [343] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [344] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #2 cmp.z idx beq __b2_from___b4 jmp __b5 // apply_preset::@5 __b5: - // [344] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [345] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #3 cmp.z idx beq __b2_from___b5 jmp __b6 // apply_preset::@6 __b6: - // [345] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [346] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #4 cmp.z idx beq __b2_from___b6 jmp __b7 // apply_preset::@7 __b7: - // [346] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [347] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #5 cmp.z idx beq __b2_from___b7 jmp __b8 // apply_preset::@8 __b8: - // [347] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [348] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #6 cmp.z idx beq __b2_from___b8 jmp __b9 // apply_preset::@9 __b9: - // [348] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [349] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #7 cmp.z idx beq __b2_from___b9 jmp __b10 // apply_preset::@10 __b10: - // [349] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [350] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp.z idx beq __b2_from___b10 jmp __b11 // apply_preset::@11 __b11: - // [350] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 + // [351] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 -- vbuz1_eq_vbuc1_then_la1 lda #9 cmp.z idx beq __b2_from___b11 jmp __b12 // apply_preset::@12 __b12: - // [351] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 -- vbuz1_eq_vbuc1_then_la1 + // [352] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 -- vbuz1_eq_vbuc1_then_la1 lda #$a cmp.z idx beq __b1_from___b12 - // [353] phi from apply_preset apply_preset::@12 to apply_preset::@2 [phi:apply_preset/apply_preset::@12->apply_preset::@2] + // [354] phi from apply_preset apply_preset::@12 to apply_preset::@2 [phi:apply_preset/apply_preset::@12->apply_preset::@2] __b2_from_apply_preset: __b2_from___b12: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdchar [phi:apply_preset/apply_preset::@12->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdchar [phi:apply_preset/apply_preset::@12->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_stdchar sta.z preset+1 jmp __b2 - // [352] phi from apply_preset::@12 to apply_preset::@1 [phi:apply_preset::@12->apply_preset::@1] + // [353] phi from apply_preset::@12 to apply_preset::@1 [phi:apply_preset::@12->apply_preset::@1] __b1_from___b12: jmp __b1 // apply_preset::@1 __b1: - // [353] phi from apply_preset::@1 to apply_preset::@2 [phi:apply_preset::@1->apply_preset::@2] + // [354] phi from apply_preset::@1 to apply_preset::@2 [phi:apply_preset::@1->apply_preset::@2] __b2_from___b1: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_8bpppixelcell [phi:apply_preset::@1->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_8bpppixelcell [phi:apply_preset::@1->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_8bpppixelcell sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@10 to apply_preset::@2 [phi:apply_preset::@10->apply_preset::@2] + // [354] phi from apply_preset::@10 to apply_preset::@2 [phi:apply_preset::@10->apply_preset::@2] __b2_from___b10: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred [phi:apply_preset::@10->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred [phi:apply_preset::@10->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_sixsfred sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@11 to apply_preset::@2 [phi:apply_preset::@11->apply_preset::@2] + // [354] phi from apply_preset::@11 to apply_preset::@2 [phi:apply_preset::@11->apply_preset::@2] __b2_from___b11: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred2 [phi:apply_preset::@11->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred2 [phi:apply_preset::@11->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_sixsfred2 sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@3 to apply_preset::@2 [phi:apply_preset::@3->apply_preset::@2] + // [354] phi from apply_preset::@3 to apply_preset::@2 [phi:apply_preset::@3->apply_preset::@2] __b2_from___b3: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_ecmchar [phi:apply_preset::@3->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_ecmchar [phi:apply_preset::@3->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_ecmchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@4 to apply_preset::@2 [phi:apply_preset::@4->apply_preset::@2] + // [354] phi from apply_preset::@4 to apply_preset::@2 [phi:apply_preset::@4->apply_preset::@2] __b2_from___b4: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdbm [phi:apply_preset::@4->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdbm [phi:apply_preset::@4->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_stdbm sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@5 to apply_preset::@2 [phi:apply_preset::@5->apply_preset::@2] + // [354] phi from apply_preset::@5 to apply_preset::@2 [phi:apply_preset::@5->apply_preset::@2] __b2_from___b5: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_mcbm [phi:apply_preset::@5->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_mcbm [phi:apply_preset::@5->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_mcbm sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@6 to apply_preset::@2 [phi:apply_preset::@6->apply_preset::@2] + // [354] phi from apply_preset::@6 to apply_preset::@2 [phi:apply_preset::@6->apply_preset::@2] __b2_from___b6: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_stdchar [phi:apply_preset::@6->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_stdchar [phi:apply_preset::@6->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_hi_stdchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@7 to apply_preset::@2 [phi:apply_preset::@7->apply_preset::@2] + // [354] phi from apply_preset::@7 to apply_preset::@2 [phi:apply_preset::@7->apply_preset::@2] __b2_from___b7: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_ecmchar [phi:apply_preset::@7->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_ecmchar [phi:apply_preset::@7->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_hi_ecmchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@8 to apply_preset::@2 [phi:apply_preset::@8->apply_preset::@2] + // [354] phi from apply_preset::@8 to apply_preset::@2 [phi:apply_preset::@8->apply_preset::@2] __b2_from___b8: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_twoplane [phi:apply_preset::@8->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_twoplane [phi:apply_preset::@8->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_twoplane sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@9 to apply_preset::@2 [phi:apply_preset::@9->apply_preset::@2] + // [354] phi from apply_preset::@9 to apply_preset::@2 [phi:apply_preset::@9->apply_preset::@2] __b2_from___b9: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_chunky [phi:apply_preset::@9->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_chunky [phi:apply_preset::@9->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_chunky @@ -15883,86 +15898,97 @@ apply_preset: { jmp __b2 // apply_preset::@2 __b2: - // [354] phi from apply_preset::@2 to apply_preset::@13 [phi:apply_preset::@2->apply_preset::@13] + // [355] phi from apply_preset::@2 to apply_preset::@13 [phi:apply_preset::@2->apply_preset::@13] __b13_from___b2: - // [354] phi (byte) apply_preset::i#2 = (byte) 0 [phi:apply_preset::@2->apply_preset::@13#0] -- vbuz1=vbuc1 + // [355] phi (byte) apply_preset::i#2 = (byte) 0 [phi:apply_preset::@2->apply_preset::@13#0] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b13 // Copy preset values into the fields // apply_preset::@13 __b13: - // [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuz1_neq_vbuc1_then_la1 + // [356] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuz1_neq_vbuc1_then_la1 lda #form_fields_cnt cmp.z i bne __b14 jmp __breturn // apply_preset::@return __breturn: - // [356] return + // [357] return rts // apply_preset::@14 __b14: - // [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) -- pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuz1 + // [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) -- pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuz1 ldy.z i lda (preset),y sta form_fields_val,y - // [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 -- vbuz1=_inc_vbuz1 + // [359] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [354] phi from apply_preset::@14 to apply_preset::@13 [phi:apply_preset::@14->apply_preset::@13] + // [355] phi from apply_preset::@14 to apply_preset::@13 [phi:apply_preset::@14->apply_preset::@13] __b13_from___b14: - // [354] phi (byte) apply_preset::i#2 = (byte) apply_preset::i#1 [phi:apply_preset::@14->apply_preset::@13#0] -- register_copy + // [355] phi (byte) apply_preset::i#2 = (byte) apply_preset::i#1 [phi:apply_preset::@14->apply_preset::@13#0] -- register_copy jmp __b13 } // form_control // Reads keyboard and allows the user to navigate and change the fields of the form // Returns 0 if space is not pressed, non-0 if space is pressed form_control: { - .label __12 = $10a - .label __13 = $110 - .label __14 = $10d - .label __15 = $10e - .label __22 = $10f + .label __12 = $110 + .label __13 = $116 + .label __14 = $113 + .label __15 = $114 + .label __22 = $115 // Return to refresh .label return = $103 - .label key_event = $10c + .label field = $10e + .label key_event = $112 // Return to refresh .label return_1 = $2e - // [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 -- vbuz1=vbuz2 + // [360] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 -- vbuz1=vbuz2 lda.z form_field_idx sta.z form_field_ptr.field_idx - // [360] call form_field_ptr + // [361] call form_field_ptr // [336] phi from form_control to form_field_ptr [phi:form_control->form_field_ptr] form_field_ptr_from_form_control: // [336] phi (byte) form_field_ptr::field_idx#2 = (byte) form_field_ptr::field_idx#1 [phi:form_control->form_field_ptr#0] -- register_copy jsr form_field_ptr + // [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 -- pbuz1=pbuz2 + lda.z form_field_ptr.return + sta.z form_field_ptr.return_1 + lda.z form_field_ptr.return+1 + sta.z form_field_ptr.return_1+1 jmp __b18 // form_control::@18 __b18: - // [361] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 -- vbsz1=_dec_vbsz1 + // [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 -- pbuz1=pbuz2 + lda.z form_field_ptr.return_1 + sta.z field + lda.z form_field_ptr.return_1+1 + sta.z field+1 + // [364] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 -- vbsz1=_dec_vbsz1 dec.z form_cursor_count - // [362] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 -- vbsz1_ge_0_then_la1 + // [365] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 -- vbsz1_ge_0_then_la1 lda.z form_cursor_count cmp #0 bpl __b21_from___b18 - // [364] phi from form_control::@18 to form_control::@1 [phi:form_control::@18->form_control::@1] + // [367] phi from form_control::@18 to form_control::@1 [phi:form_control::@18->form_control::@1] __b1_from___b18: - // [364] phi (signed byte) form_cursor_count#15 = (const signed byte) FORM_CURSOR_BLINK [phi:form_control::@18->form_control::@1#0] -- vbsz1=vbsc1 + // [367] phi (signed byte) form_cursor_count#15 = (const signed byte) FORM_CURSOR_BLINK [phi:form_control::@18->form_control::@1#0] -- vbsz1=vbsc1 lda #FORM_CURSOR_BLINK sta.z form_cursor_count jmp __b1 - // [363] phi from form_control::@18 to form_control::@21 [phi:form_control::@18->form_control::@21] + // [366] phi from form_control::@18 to form_control::@21 [phi:form_control::@18->form_control::@21] __b21_from___b18: jmp __b21 // form_control::@21 __b21: - // [364] phi from form_control::@21 to form_control::@1 [phi:form_control::@21->form_control::@1] + // [367] phi from form_control::@21 to form_control::@1 [phi:form_control::@21->form_control::@1] __b1_from___b21: - // [364] phi (signed byte) form_cursor_count#15 = (signed byte) form_cursor_count#5 [phi:form_control::@21->form_control::@1#0] -- register_copy + // [367] phi (signed byte) form_cursor_count#15 = (signed byte) form_cursor_count#5 [phi:form_control::@21->form_control::@1#0] -- register_copy jmp __b1 // form_control::@1 __b1: - // [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 -- vbsz1_lt_vbsc1_then_la1 + // [368] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 -- vbsz1_lt_vbsc1_then_la1 lda.z form_cursor_count sec sbc #FORM_CURSOR_BLINK/2 @@ -15973,123 +15999,123 @@ form_control: { jmp __b7 // form_control::@7 __b7: - // [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f -- vbuz1=pbuz2_derefidx_vbuz3_band_vbuc1 + // [369] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f -- vbuz1=_deref_pbuz2_band_vbuc1 lda #$7f - ldy.z form_field_ptr.x - and (form_field_ptr.line),y + ldy #0 + and (field),y sta.z __12 - // [367] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$12 -- pbuz1_derefidx_vbuz2=vbuz3 + // [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 -- _deref_pbuz1=vbuz2 lda.z __12 - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [368] phi from form_control::@2 form_control::@7 to form_control::@3 [phi:form_control::@2/form_control::@7->form_control::@3] + ldy #0 + sta (field),y + // [371] phi from form_control::@2 form_control::@7 to form_control::@3 [phi:form_control::@2/form_control::@7->form_control::@3] __b3_from___b2: __b3_from___b7: jmp __b3 // form_control::@3 __b3: - // [369] call keyboard_event_scan + // [372] call keyboard_event_scan // [157] phi from form_control::@3 to keyboard_event_scan [phi:form_control::@3->keyboard_event_scan] keyboard_event_scan_from___b3: // [157] phi (byte) keyboard_events_size#97 = (byte) keyboard_events_size#47 [phi:form_control::@3->keyboard_event_scan#0] -- register_copy jsr keyboard_event_scan - // [370] phi from form_control::@3 to form_control::@19 [phi:form_control::@3->form_control::@19] + // [373] phi from form_control::@3 to form_control::@19 [phi:form_control::@3->form_control::@19] __b19_from___b3: jmp __b19 // form_control::@19 __b19: - // [371] call keyboard_event_get + // [374] call keyboard_event_get jsr keyboard_event_get - // [372] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 -- vbuz1=vbuz2 + // [375] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 -- vbuz1=vbuz2 lda.z keyboard_event_get.return sta.z keyboard_event_get.return_2 jmp __b20 // form_control::@20 __b20: - // [373] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 -- vbuz1=vbuz2 + // [376] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 -- vbuz1=vbuz2 lda.z keyboard_event_get.return_2 sta.z key_event - // [374] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -- vbuz1_neq_vbuc1_then_la1 + // [377] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -- vbuz1_neq_vbuc1_then_la1 lda #KEY_CRSR_DOWN cmp.z key_event bne __b4 jmp __b8 // form_control::@8 __b8: - // [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f -- vbuz1=pbuz2_derefidx_vbuz3_band_vbuc1 + // [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f -- vbuz1=_deref_pbuz2_band_vbuc1 lda #$7f - ldy.z form_field_ptr.x - and (form_field_ptr.line),y + ldy #0 + and (field),y sta.z __14 - // [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 -- pbuz1_derefidx_vbuz2=vbuz3 + // [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 -- _deref_pbuz1=vbuz2 // Unblink the cursor lda.z __14 - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuz1=vbuz2_band_vbuc1 + ldy #0 + sta (field),y + // [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuz1=vbuz2_band_vbuc1 lda #KEY_MODIFIER_SHIFT and.z keyboard_modifiers sta.z __15 - // [378] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 -- vbuz1_eq_0_then_la1 + // [381] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 -- vbuz1_eq_0_then_la1 lda.z __15 cmp #0 beq __b13 jmp __b9 // form_control::@9 __b9: - // [379] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 -- vbuz1=_dec_vbuz1 + // [382] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 -- vbuz1=_dec_vbuz1 dec.z form_field_idx - // [380] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -- vbuz1_neq_vbuc1_then_la1 + // [383] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z form_field_idx bne __b22_from___b9 - // [382] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14] + // [385] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14] __b14_from___b9: - // [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1 + // [385] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1 lda #form_fields_cnt-1 sta.z form_field_idx jmp __b14 - // [381] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22] + // [384] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22] __b22_from___b9: jmp __b22 // form_control::@22 __b22: - // [382] phi from form_control::@22 form_control::@23 to form_control::@14 [phi:form_control::@22/form_control::@23->form_control::@14] + // [385] phi from form_control::@22 form_control::@23 to form_control::@14 [phi:form_control::@22/form_control::@23->form_control::@14] __b14_from___b22: __b14_from___b23: - // [382] phi (byte) form_field_idx#31 = (byte) form_field_idx#6 [phi:form_control::@22/form_control::@23->form_control::@14#0] -- register_copy + // [385] phi (byte) form_field_idx#31 = (byte) form_field_idx#6 [phi:form_control::@22/form_control::@23->form_control::@14#0] -- register_copy jmp __b14 // form_control::@14 __b14: - // [383] phi from form_control::@14 to form_control::@return [phi:form_control::@14->form_control::@return] + // [386] phi from form_control::@14 to form_control::@return [phi:form_control::@14->form_control::@return] __breturn_from___b14: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#31 [phi:form_control::@14->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 [phi:form_control::@14->form_control::@return#1] -- vbsz1=vbsc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#31 [phi:form_control::@14->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 [phi:form_control::@14->form_control::@return#1] -- vbsz1=vbsc1 lda #FORM_CURSOR_BLINK/2 sta.z form_cursor_count - // [383] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@14->form_control::@return#2] -- vbuz1=vbuc1 + // [386] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@14->form_control::@return#2] -- vbuz1=vbuc1 lda #0 sta.z return_1 jmp __breturn // form_control::@return __breturn: - // [384] return + // [387] return rts // form_control::@13 __b13: - // [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1 + // [388] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1 inc.z form_field_idx - // [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1 + // [389] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1 lda #form_fields_cnt cmp.z form_field_idx bne __b23_from___b13 - // [382] phi from form_control::@13 to form_control::@14 [phi:form_control::@13->form_control::@14] + // [385] phi from form_control::@13 to form_control::@14 [phi:form_control::@13->form_control::@14] __b14_from___b13: - // [382] phi (byte) form_field_idx#31 = (byte) 0 [phi:form_control::@13->form_control::@14#0] -- vbuz1=vbuc1 + // [385] phi (byte) form_field_idx#31 = (byte) 0 [phi:form_control::@13->form_control::@14#0] -- vbuz1=vbuc1 lda #0 sta.z form_field_idx jmp __b14 - // [387] phi from form_control::@13 to form_control::@23 [phi:form_control::@13->form_control::@23] + // [390] phi from form_control::@13 to form_control::@23 [phi:form_control::@13->form_control::@23] __b23_from___b13: jmp __b23 // form_control::@23 @@ -16097,28 +16123,28 @@ form_control: { jmp __b14_from___b23 // form_control::@4 __b4: - // [388] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -- vbuz1_neq_vbuc1_then_la1 + // [391] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -- vbuz1_neq_vbuc1_then_la1 lda #KEY_CRSR_RIGHT cmp.z key_event bne __b5 jmp __b10 // form_control::@10 __b10: - // [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuz1=vbuz2_band_vbuc1 + // [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuz1=vbuz2_band_vbuc1 lda #KEY_MODIFIER_SHIFT and.z keyboard_modifiers sta.z __22 - // [390] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 -- vbuz1_eq_0_then_la1 + // [393] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 -- vbuz1_eq_0_then_la1 lda.z __22 cmp #0 beq __b15 jmp __b11 // form_control::@11 __b11: - // [391] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 + // [394] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 ldx.z form_field_idx dec form_fields_val,x - // [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 + // [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 lda #$ff ldy.z form_field_idx cmp form_fields_val,y @@ -16126,35 +16152,35 @@ form_control: { jmp __b12 // form_control::@12 __b12: - // [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + // [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 ldy.z form_field_idx lda form_fields_max,y sta form_fields_val,y jmp __b16 // form_control::@16 __b16: - // [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuz3) + // [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- _deref_pbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) // Render field value ldx.z form_field_idx ldy form_fields_val,x lda print_hextab,y - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [383] phi from form_control::@16 form_control::@6 to form_control::@return [phi:form_control::@16/form_control::@6->form_control::@return] + ldy #0 + sta (field),y + // [386] phi from form_control::@16 form_control::@6 to form_control::@return [phi:form_control::@16/form_control::@6->form_control::@return] __breturn_from___b16: __breturn_from___b6: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@16/form_control::@6->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@16/form_control::@6->form_control::@return#1] -- register_copy - // [383] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@16/form_control::@6->form_control::@return#2] -- vbuz1=vbuc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@16/form_control::@6->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@16/form_control::@6->form_control::@return#1] -- register_copy + // [386] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@16/form_control::@6->form_control::@return#2] -- vbuz1=vbuc1 lda #0 sta.z return_1 jmp __breturn // form_control::@15 __b15: - // [395] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + // [398] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 ldx.z form_field_idx inc form_fields_val,x - // [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 -- pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 + // [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 -- pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 ldy.z form_field_idx lda form_fields_max,y cmp form_fields_val,y @@ -16162,26 +16188,26 @@ form_control: { jmp __b17 // form_control::@17 __b17: - // [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy.z form_field_idx sta form_fields_val,y jmp __b16 // form_control::@5 __b5: - // [398] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -- vbuz1_neq_vbuc1_then_la1 + // [401] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -- vbuz1_neq_vbuc1_then_la1 lda #KEY_SPACE cmp.z key_event bne __b6_from___b5 - // [383] phi from form_control::@5 to form_control::@return [phi:form_control::@5->form_control::@return] + // [386] phi from form_control::@5 to form_control::@return [phi:form_control::@5->form_control::@return] __breturn_from___b5: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@5->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy - // [383] phi (byte) form_control::return#2 = (byte) $ff [phi:form_control::@5->form_control::@return#2] -- vbuz1=vbuc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@5->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy + // [386] phi (byte) form_control::return#2 = (byte) $ff [phi:form_control::@5->form_control::@return#2] -- vbuz1=vbuc1 lda #$ff sta.z return_1 jmp __breturn - // [399] phi from form_control::@5 to form_control::@6 [phi:form_control::@5->form_control::@6] + // [402] phi from form_control::@5 to form_control::@6 [phi:form_control::@5->form_control::@6] __b6_from___b5: jmp __b6 // form_control::@6 @@ -16189,58 +16215,58 @@ form_control: { jmp __breturn_from___b6 // form_control::@2 __b2: - // [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 -- vbuz1=pbuz2_derefidx_vbuz3_bor_vbuc1 + // [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 -- vbuz1=_deref_pbuz2_bor_vbuc1 lda #$80 - ldy.z form_field_ptr.x - ora (form_field_ptr.line),y + ldy #0 + ora (field),y sta.z __13 - // [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 -- pbuz1_derefidx_vbuz2=vbuz3 + // [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 -- _deref_pbuz1=vbuz2 lda.z __13 - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y + ldy #0 + sta (field),y jmp __b3_from___b2 } // form_set_screen // Set the screen to use for the form. // screen is the start address of the screen to use form_set_screen: { - .label __0 = $111 - .label __1 = $112 + .label __0 = $117 + .label __1 = $118 .label line = $2f .label y = $31 - // [403] phi from form_set_screen to form_set_screen::@1 [phi:form_set_screen->form_set_screen::@1] + // [406] phi from form_set_screen to form_set_screen::@1 [phi:form_set_screen->form_set_screen::@1] __b1_from_form_set_screen: - // [403] phi (byte) form_set_screen::y#2 = (byte) 0 [phi:form_set_screen->form_set_screen::@1#0] -- vbuz1=vbuc1 + // [406] phi (byte) form_set_screen::y#2 = (byte) 0 [phi:form_set_screen->form_set_screen::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [403] phi (byte*) form_set_screen::line#2 = (const byte*) FORM_SCREEN [phi:form_set_screen->form_set_screen::@1#1] -- pbuz1=pbuc1 + // [406] phi (byte*) form_set_screen::line#2 = (const byte*) FORM_SCREEN [phi:form_set_screen->form_set_screen::@1#1] -- pbuz1=pbuc1 lda #FORM_SCREEN sta.z line+1 jmp __b1 - // [403] phi from form_set_screen::@1 to form_set_screen::@1 [phi:form_set_screen::@1->form_set_screen::@1] + // [406] phi from form_set_screen::@1 to form_set_screen::@1 [phi:form_set_screen::@1->form_set_screen::@1] __b1_from___b1: - // [403] phi (byte) form_set_screen::y#2 = (byte) form_set_screen::y#1 [phi:form_set_screen::@1->form_set_screen::@1#0] -- register_copy - // [403] phi (byte*) form_set_screen::line#2 = (byte*) form_set_screen::line#1 [phi:form_set_screen::@1->form_set_screen::@1#1] -- register_copy + // [406] phi (byte) form_set_screen::y#2 = (byte) form_set_screen::y#1 [phi:form_set_screen::@1->form_set_screen::@1#0] -- register_copy + // [406] phi (byte*) form_set_screen::line#2 = (byte*) form_set_screen::line#1 [phi:form_set_screen::@1->form_set_screen::@1#1] -- register_copy jmp __b1 // form_set_screen::@1 __b1: - // [404] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 -- vbuz1=_lo_pbuz2 + // [407] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 -- vbuz1=_lo_pbuz2 lda.z line sta.z __0 - // [405] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [408] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __0 ldy.z y sta form_line_lo,y - // [406] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 -- vbuz1=_hi_pbuz2 + // [409] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 -- vbuz1=_hi_pbuz2 lda.z line+1 sta.z __1 - // [407] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 -- pbuc1_derefidx_vbuz1=vbuz2 + // [410] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __1 ldy.z y sta form_line_hi,y - // [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z line @@ -16248,16 +16274,16 @@ form_set_screen: { bcc !+ inc.z line+1 !: - // [409] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 -- vbuz1=_inc_vbuz1 + // [412] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 -- vbuz1=_inc_vbuz1 inc.z y - // [410] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 -- vbuz1_neq_vbuc1_then_la1 + // [413] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z y bne __b1_from___b1 jmp __breturn // form_set_screen::@return __breturn: - // [411] return + // [414] return rts } // print_str_lines @@ -16265,23 +16291,23 @@ form_set_screen: { // The sequence of lines is terminated by another zero. // print_str_lines(byte* zp($32) str) print_str_lines: { - .label ch = $113 + .label ch = $119 .label str = $32 - // [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 -- pbuz1=pbuz2 + // [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 -- pbuz1=pbuz2 lda.z print_set_screen.screen sta.z print_char_cursor lda.z print_set_screen.screen+1 sta.z print_char_cursor+1 - // [414] phi from print_str_lines print_str_lines::@6 to print_str_lines::@1 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1] + // [417] phi from print_str_lines print_str_lines::@6 to print_str_lines::@1 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1] __b1_from_print_str_lines: __b1_from___b6: - // [414] phi (byte*) print_line_cursor#2 = (byte*) print_set_screen::screen#2 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#0] -- register_copy - // [414] phi (byte*) print_char_cursor#22 = (byte*) print_char_cursor#67 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#1] -- register_copy - // [414] phi (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#5 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#2] -- register_copy + // [417] phi (byte*) print_line_cursor#2 = (byte*) print_set_screen::screen#2 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#0] -- register_copy + // [417] phi (byte*) print_char_cursor#22 = (byte*) print_char_cursor#67 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#1] -- register_copy + // [417] phi (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#5 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#2] -- register_copy jmp __b1 // print_str_lines::@1 __b1: - // [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 -- vbuc1_neq__deref_pbuz1_then_la1 + // [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 -- vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda (str),y cmp #0 @@ -16289,65 +16315,65 @@ print_str_lines: { jmp __breturn // print_str_lines::@return __breturn: - // [416] return + // [419] return rts - // [417] phi from print_str_lines::@1 print_str_lines::@3 to print_str_lines::@2 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2] + // [420] phi from print_str_lines::@1 print_str_lines::@3 to print_str_lines::@2 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2] __b2_from___b1: __b2_from___b3: - // [417] phi (byte*) print_char_cursor#20 = (byte*) print_char_cursor#22 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#0] -- register_copy - // [417] phi (byte*) print_str_lines::str#4 = (byte*) print_str_lines::str#3 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#1] -- register_copy + // [420] phi (byte*) print_char_cursor#20 = (byte*) print_char_cursor#22 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#0] -- register_copy + // [420] phi (byte*) print_str_lines::str#4 = (byte*) print_str_lines::str#3 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#1] -- register_copy jmp __b2 // print_str_lines::@2 __b2: - // [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) -- vbuz1=_deref_pbuz2 + // [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) -- vbuz1=_deref_pbuz2 ldy #0 lda (str),y sta.z ch - // [419] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 -- pbuz1=_inc_pbuz1 + // [422] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 -- pbuz1=_inc_pbuz1 inc.z str bne !+ inc.z str+1 !: - // [420] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 -- vbuc1_eq_vbuz1_then_la1 + // [423] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z ch beq __b3_from___b2 jmp __b4 // print_str_lines::@4 __b4: - // [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 -- _deref_pbuz1=vbuz2 + // [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 -- _deref_pbuz1=vbuz2 lda.z ch ldy #0 sta (print_char_cursor),y - // [422] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 -- pbuz1=_inc_pbuz1 + // [425] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 -- pbuz1=_inc_pbuz1 inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: - // [423] phi from print_str_lines::@2 print_str_lines::@4 to print_str_lines::@3 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3] + // [426] phi from print_str_lines::@2 print_str_lines::@4 to print_str_lines::@3 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3] __b3_from___b2: __b3_from___b4: - // [423] phi (byte*) print_char_cursor#38 = (byte*) print_char_cursor#20 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3#0] -- register_copy + // [426] phi (byte*) print_char_cursor#38 = (byte*) print_char_cursor#20 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3#0] -- register_copy jmp __b3 // print_str_lines::@3 __b3: - // [424] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 -- vbuc1_neq_vbuz1_then_la1 + // [427] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 -- vbuc1_neq_vbuz1_then_la1 lda #0 cmp.z ch bne __b2_from___b3 - // [425] phi from print_str_lines::@3 to print_str_lines::@5 [phi:print_str_lines::@3->print_str_lines::@5] + // [428] phi from print_str_lines::@3 to print_str_lines::@5 [phi:print_str_lines::@3->print_str_lines::@5] __b5_from___b3: jmp __b5 // print_str_lines::@5 __b5: - // [426] call print_ln - // [428] phi from print_str_lines::@5 to print_ln [phi:print_str_lines::@5->print_ln] + // [429] call print_ln + // [431] phi from print_str_lines::@5 to print_ln [phi:print_str_lines::@5->print_ln] print_ln_from___b5: jsr print_ln jmp __b6 // print_str_lines::@6 __b6: - // [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 -- pbuz1=pbuz2 + // [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 -- pbuz1=pbuz2 lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 @@ -16357,14 +16383,14 @@ print_str_lines: { // print_ln // Print a newline print_ln: { - // [429] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + // [432] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] __b1_from_print_ln: __b1_from___b1: - // [429] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#2 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + // [432] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#2 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy jmp __b1 // print_ln::@1 __b1: - // [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z print_line_cursor @@ -16372,7 +16398,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: - // [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + // [434] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 lda.z print_line_cursor+1 cmp.z print_char_cursor+1 bcc __b1_from___b1 @@ -16384,40 +16410,40 @@ print_ln: { jmp __breturn // print_ln::@return __breturn: - // [432] return + // [435] return rts } // print_cls // Clear the screen. Also resets current line/char cursor. print_cls: { - // [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 -- pvoz1=pvoz2 + // [436] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 -- pvoz1=pvoz2 lda.z print_set_screen.screen sta.z memset.str lda.z print_set_screen.screen+1 sta.z memset.str+1 - // [434] call memset - // [436] phi from print_cls to memset [phi:print_cls->memset] + // [437] call memset + // [439] phi from print_cls to memset [phi:print_cls->memset] memset_from_print_cls: jsr memset jmp __breturn // print_cls::@return __breturn: - // [435] return + // [438] return rts } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($114) str) +// memset(void* zp($11a) str) memset: { .const c = ' ' .const num = $3e8 - .label end = $116 + .label end = $11c .label dst = $38 - .label str = $114 + .label str = $11a jmp __b1 // memset::@1 __b1: - // [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 -- pbuz1=pbuz2_plus_vwuc1 + // [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 -- pbuz1=pbuz2_plus_vwuc1 lda.z str clc adc #num sta.z end+1 - // [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 -- pbuz1=pbuz2 + // [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 -- pbuz1=pbuz2 lda.z str sta.z dst lda.z str+1 sta.z dst+1 - // [439] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2] + // [442] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2] __b2_from___b1: __b2_from___b3: - // [439] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy + // [442] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy jmp __b2 // memset::@2 __b2: - // [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 + // [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 lda.z dst+1 cmp.z end+1 bne __b3 @@ -16447,15 +16473,15 @@ memset: { jmp __breturn // memset::@return __breturn: - // [441] return + // [444] return rts // memset::@3 __b3: - // [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y - // [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [446] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 @@ -16470,156 +16496,156 @@ print_set_screen: { jmp __breturn // print_set_screen::@return __breturn: - // [445] return + // [448] return rts } // gfx_init // Initialize the different graphics in the memory gfx_init: { - // [447] call gfx_init_screen0 - // [843] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] + // [450] call gfx_init_screen0 + // [846] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] gfx_init_screen0_from_gfx_init: jsr gfx_init_screen0 - // [448] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] + // [451] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] __b1_from_gfx_init: jmp __b1 // gfx_init::@1 __b1: - // [449] call gfx_init_screen1 - // [831] phi from gfx_init::@1 to gfx_init_screen1 [phi:gfx_init::@1->gfx_init_screen1] + // [452] call gfx_init_screen1 + // [834] phi from gfx_init::@1 to gfx_init_screen1 [phi:gfx_init::@1->gfx_init_screen1] gfx_init_screen1_from___b1: jsr gfx_init_screen1 - // [450] phi from gfx_init::@1 to gfx_init::@2 [phi:gfx_init::@1->gfx_init::@2] + // [453] phi from gfx_init::@1 to gfx_init::@2 [phi:gfx_init::@1->gfx_init::@2] __b2_from___b1: jmp __b2 // gfx_init::@2 __b2: - // [451] call gfx_init_screen2 - // [816] phi from gfx_init::@2 to gfx_init_screen2 [phi:gfx_init::@2->gfx_init_screen2] + // [454] call gfx_init_screen2 + // [819] phi from gfx_init::@2 to gfx_init_screen2 [phi:gfx_init::@2->gfx_init_screen2] gfx_init_screen2_from___b2: jsr gfx_init_screen2 - // [452] phi from gfx_init::@2 to gfx_init::@3 [phi:gfx_init::@2->gfx_init::@3] + // [455] phi from gfx_init::@2 to gfx_init::@3 [phi:gfx_init::@2->gfx_init::@3] __b3_from___b2: jmp __b3 // gfx_init::@3 __b3: - // [453] call gfx_init_screen3 - // [802] phi from gfx_init::@3 to gfx_init_screen3 [phi:gfx_init::@3->gfx_init_screen3] + // [456] call gfx_init_screen3 + // [805] phi from gfx_init::@3 to gfx_init_screen3 [phi:gfx_init::@3->gfx_init_screen3] gfx_init_screen3_from___b3: jsr gfx_init_screen3 - // [454] phi from gfx_init::@3 to gfx_init::@4 [phi:gfx_init::@3->gfx_init::@4] + // [457] phi from gfx_init::@3 to gfx_init::@4 [phi:gfx_init::@3->gfx_init::@4] __b4_from___b3: jmp __b4 // gfx_init::@4 __b4: - // [455] call gfx_init_screen4 - // [792] phi from gfx_init::@4 to gfx_init_screen4 [phi:gfx_init::@4->gfx_init_screen4] + // [458] call gfx_init_screen4 + // [795] phi from gfx_init::@4 to gfx_init_screen4 [phi:gfx_init::@4->gfx_init_screen4] gfx_init_screen4_from___b4: jsr gfx_init_screen4 - // [456] phi from gfx_init::@4 to gfx_init::@5 [phi:gfx_init::@4->gfx_init::@5] + // [459] phi from gfx_init::@4 to gfx_init::@5 [phi:gfx_init::@4->gfx_init::@5] __b5_from___b4: jmp __b5 // gfx_init::@5 __b5: - // [457] call gfx_init_charset + // [460] call gfx_init_charset jsr gfx_init_charset - // [458] phi from gfx_init::@5 to gfx_init::@6 [phi:gfx_init::@5->gfx_init::@6] + // [461] phi from gfx_init::@5 to gfx_init::@6 [phi:gfx_init::@5->gfx_init::@6] __b6_from___b5: jmp __b6 // gfx_init::@6 __b6: - // [459] call gfx_init_vic_bitmap - // [602] phi from gfx_init::@6 to gfx_init_vic_bitmap [phi:gfx_init::@6->gfx_init_vic_bitmap] + // [462] call gfx_init_vic_bitmap + // [605] phi from gfx_init::@6 to gfx_init_vic_bitmap [phi:gfx_init::@6->gfx_init_vic_bitmap] gfx_init_vic_bitmap_from___b6: jsr gfx_init_vic_bitmap - // [460] phi from gfx_init::@6 to gfx_init::@7 [phi:gfx_init::@6->gfx_init::@7] + // [463] phi from gfx_init::@6 to gfx_init::@7 [phi:gfx_init::@6->gfx_init::@7] __b7_from___b6: jmp __b7 // gfx_init::@7 __b7: - // [461] call gfx_init_plane_8bppchunky - // [582] phi from gfx_init::@7 to gfx_init_plane_8bppchunky [phi:gfx_init::@7->gfx_init_plane_8bppchunky] + // [464] call gfx_init_plane_8bppchunky + // [585] phi from gfx_init::@7 to gfx_init_plane_8bppchunky [phi:gfx_init::@7->gfx_init_plane_8bppchunky] gfx_init_plane_8bppchunky_from___b7: jsr gfx_init_plane_8bppchunky - // [462] phi from gfx_init::@7 to gfx_init::@8 [phi:gfx_init::@7->gfx_init::@8] + // [465] phi from gfx_init::@7 to gfx_init::@8 [phi:gfx_init::@7->gfx_init::@8] __b8_from___b7: jmp __b8 // gfx_init::@8 __b8: - // [463] call gfx_init_plane_charset8 - // [557] phi from gfx_init::@8 to gfx_init_plane_charset8 [phi:gfx_init::@8->gfx_init_plane_charset8] + // [466] call gfx_init_plane_charset8 + // [560] phi from gfx_init::@8 to gfx_init_plane_charset8 [phi:gfx_init::@8->gfx_init_plane_charset8] gfx_init_plane_charset8_from___b8: jsr gfx_init_plane_charset8 - // [464] phi from gfx_init::@8 to gfx_init::@9 [phi:gfx_init::@8->gfx_init::@9] + // [467] phi from gfx_init::@8 to gfx_init::@9 [phi:gfx_init::@8->gfx_init::@9] __b9_from___b8: jmp __b9 // gfx_init::@9 __b9: - // [465] call gfx_init_plane_horisontal - // [539] phi from gfx_init::@9 to gfx_init_plane_horisontal [phi:gfx_init::@9->gfx_init_plane_horisontal] + // [468] call gfx_init_plane_horisontal + // [542] phi from gfx_init::@9 to gfx_init_plane_horisontal [phi:gfx_init::@9->gfx_init_plane_horisontal] gfx_init_plane_horisontal_from___b9: jsr gfx_init_plane_horisontal - // [466] phi from gfx_init::@9 to gfx_init::@10 [phi:gfx_init::@9->gfx_init::@10] + // [469] phi from gfx_init::@9 to gfx_init::@10 [phi:gfx_init::@9->gfx_init::@10] __b10_from___b9: jmp __b10 // gfx_init::@10 __b10: - // [467] call gfx_init_plane_vertical - // [526] phi from gfx_init::@10 to gfx_init_plane_vertical [phi:gfx_init::@10->gfx_init_plane_vertical] + // [470] call gfx_init_plane_vertical + // [529] phi from gfx_init::@10 to gfx_init_plane_vertical [phi:gfx_init::@10->gfx_init_plane_vertical] gfx_init_plane_vertical_from___b10: jsr gfx_init_plane_vertical - // [468] phi from gfx_init::@10 to gfx_init::@11 [phi:gfx_init::@10->gfx_init::@11] + // [471] phi from gfx_init::@10 to gfx_init::@11 [phi:gfx_init::@10->gfx_init::@11] __b11_from___b10: jmp __b11 // gfx_init::@11 __b11: - // [469] call gfx_init_plane_horisontal2 - // [511] phi from gfx_init::@11 to gfx_init_plane_horisontal2 [phi:gfx_init::@11->gfx_init_plane_horisontal2] + // [472] call gfx_init_plane_horisontal2 + // [514] phi from gfx_init::@11 to gfx_init_plane_horisontal2 [phi:gfx_init::@11->gfx_init_plane_horisontal2] gfx_init_plane_horisontal2_from___b11: jsr gfx_init_plane_horisontal2 - // [470] phi from gfx_init::@11 to gfx_init::@12 [phi:gfx_init::@11->gfx_init::@12] + // [473] phi from gfx_init::@11 to gfx_init::@12 [phi:gfx_init::@11->gfx_init::@12] __b12_from___b11: jmp __b12 // gfx_init::@12 __b12: - // [471] call gfx_init_plane_vertical2 - // [508] phi from gfx_init::@12 to gfx_init_plane_vertical2 [phi:gfx_init::@12->gfx_init_plane_vertical2] + // [474] call gfx_init_plane_vertical2 + // [511] phi from gfx_init::@12 to gfx_init_plane_vertical2 [phi:gfx_init::@12->gfx_init_plane_vertical2] gfx_init_plane_vertical2_from___b12: jsr gfx_init_plane_vertical2 - // [472] phi from gfx_init::@12 to gfx_init::@13 [phi:gfx_init::@12->gfx_init::@13] + // [475] phi from gfx_init::@12 to gfx_init::@13 [phi:gfx_init::@12->gfx_init::@13] __b13_from___b12: jmp __b13 // gfx_init::@13 __b13: - // [473] call gfx_init_plane_blank - // [505] phi from gfx_init::@13 to gfx_init_plane_blank [phi:gfx_init::@13->gfx_init_plane_blank] + // [476] call gfx_init_plane_blank + // [508] phi from gfx_init::@13 to gfx_init_plane_blank [phi:gfx_init::@13->gfx_init_plane_blank] gfx_init_plane_blank_from___b13: jsr gfx_init_plane_blank - // [474] phi from gfx_init::@13 to gfx_init::@14 [phi:gfx_init::@13->gfx_init::@14] + // [477] phi from gfx_init::@13 to gfx_init::@14 [phi:gfx_init::@13->gfx_init::@14] __b14_from___b13: jmp __b14 // gfx_init::@14 __b14: - // [475] call gfx_init_plane_full - // [477] phi from gfx_init::@14 to gfx_init_plane_full [phi:gfx_init::@14->gfx_init_plane_full] + // [478] call gfx_init_plane_full + // [480] phi from gfx_init::@14 to gfx_init_plane_full [phi:gfx_init::@14->gfx_init_plane_full] gfx_init_plane_full_from___b14: jsr gfx_init_plane_full jmp __breturn // gfx_init::@return __breturn: - // [476] return + // [479] return rts } // gfx_init_plane_full // Initialize Plane with all pixels gfx_init_plane_full: { - // [478] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_full to gfx_init_plane_fill [phi:gfx_init_plane_full->gfx_init_plane_fill] + // [481] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_full to gfx_init_plane_fill [phi:gfx_init_plane_full->gfx_init_plane_fill] gfx_init_plane_fill_from_gfx_init_plane_full: - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $ff [phi:gfx_init_plane_full->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $ff [phi:gfx_init_plane_full->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #$ff sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_FULL [phi:gfx_init_plane_full->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_FULL [phi:gfx_init_plane_full->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_FULL @@ -16632,25 +16658,25 @@ gfx_init_plane_full: { jmp __breturn // gfx_init_plane_full::@return __breturn: - // [479] return + // [482] return rts } // gfx_init_plane_fill // Initialize 320*200 1bpp pixel ($2000) plane with identical bytes // gfx_init_plane_fill(dword zp($3a) plane_addr, byte zp($3e) fill) gfx_init_plane_fill: { - .label __0 = $118 - .label __1 = $11c - .label __4 = $11f - .label __5 = $121 - .label gfxbCpuBank = $11e - .label gfxb = $123 + .label __0 = $11e + .label __1 = $122 + .label __4 = $125 + .label __5 = $127 + .label gfxbCpuBank = $124 + .label gfxb = $129 .label gfxb_1 = $40 .label bx = $42 .label by = $3f .label plane_addr = $3a .label fill = $3e - // [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 -- vduz1=vduz2_rol_2 + // [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 -- vduz1=vduz2_rol_2 lda.z plane_addr asl sta.z __0 @@ -16667,38 +16693,38 @@ gfx_init_plane_fill: { rol.z __0+1 rol.z __0+2 rol.z __0+3 - // [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 -- vwuz1=_hi_vduz2 + // [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 -- vwuz1=_hi_vduz2 lda.z __0+2 sta.z __1 lda.z __0+3 sta.z __1+1 - // [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 -- vbuz1=_lo_vwuz2 + // [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 -- vbuz1=_lo_vwuz2 lda.z __1 sta.z gfxbCpuBank - // [484] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 -- vbuz1=vbuz2 + // [487] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 -- vbuz1=vbuz2 lda.z gfxbCpuBank sta.z dtvSetCpuBankSegment1.cpuBankIdx - // [485] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_fill to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1] + // [488] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_fill to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_fill: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1#0] -- register_copy + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1#0] -- register_copy jsr dtvSetCpuBankSegment1 jmp __b5 // gfx_init_plane_fill::@5 __b5: - // [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 -- vwuz1=_lo_vduz2 + // [489] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 -- vwuz1=_lo_vduz2 lda.z plane_addr sta.z __4 lda.z plane_addr+1 sta.z __4+1 - // [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff -- vwuz1=vwuz2_band_vwuc1 + // [490] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff -- vwuz1=vwuz2_band_vwuc1 lda.z __4 and #<$3fff sta.z __5 lda.z __4+1 and #>$3fff sta.z __5+1 - // [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 -- vwuz1=vwuc1_plus_vwuz2 + // [491] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 -- vwuz1=vwuc1_plus_vwuz2 lda.z __5 clc adc #<$4000 @@ -16706,79 +16732,79 @@ gfx_init_plane_fill: { lda.z __5+1 adc #>$4000 sta.z gfxb+1 - // [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 -- pbuz1=pbuz2 + // [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 -- pbuz1=pbuz2 lda.z gfxb sta.z gfxb_1 lda.z gfxb+1 sta.z gfxb_1+1 - // [490] phi from gfx_init_plane_fill::@5 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1] + // [493] phi from gfx_init_plane_fill::@5 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1] __b1_from___b5: - // [490] phi (byte) gfx_init_plane_fill::by#4 = (byte) 0 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#0] -- vbuz1=vbuc1 + // [493] phi (byte) gfx_init_plane_fill::by#4 = (byte) 0 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#0] -- vbuz1=vbuc1 lda #0 sta.z by - // [490] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#6 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#1] -- register_copy + // [493] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#6 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#1] -- register_copy jmp __b1 - // [490] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1] + // [493] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1] __b1_from___b3: - // [490] phi (byte) gfx_init_plane_fill::by#4 = (byte) gfx_init_plane_fill::by#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#0] -- register_copy - // [490] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#1] -- register_copy + // [493] phi (byte) gfx_init_plane_fill::by#4 = (byte) gfx_init_plane_fill::by#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#0] -- register_copy + // [493] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#1] -- register_copy jmp __b1 // gfx_init_plane_fill::@1 __b1: - // [491] phi from gfx_init_plane_fill::@1 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2] + // [494] phi from gfx_init_plane_fill::@1 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2] __b2_from___b1: - // [491] phi (byte) gfx_init_plane_fill::bx#2 = (byte) 0 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#0] -- vbuz1=vbuc1 + // [494] phi (byte) gfx_init_plane_fill::bx#2 = (byte) 0 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#0] -- vbuz1=vbuc1 lda #0 sta.z bx - // [491] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#3 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#1] -- register_copy + // [494] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#3 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#1] -- register_copy jmp __b2 - // [491] phi from gfx_init_plane_fill::@2 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2] + // [494] phi from gfx_init_plane_fill::@2 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2] __b2_from___b2: - // [491] phi (byte) gfx_init_plane_fill::bx#2 = (byte) gfx_init_plane_fill::bx#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#0] -- register_copy - // [491] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#1] -- register_copy + // [494] phi (byte) gfx_init_plane_fill::bx#2 = (byte) gfx_init_plane_fill::bx#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#0] -- register_copy + // [494] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#1] -- register_copy jmp __b2 // gfx_init_plane_fill::@2 __b2: - // [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 -- _deref_pbuz1=vbuz2 + // [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 -- _deref_pbuz1=vbuz2 lda.z fill ldy #0 sta (gfxb_1),y - // [493] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 -- pbuz1=_inc_pbuz1 + // [496] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 -- pbuz1=_inc_pbuz1 inc.z gfxb_1 bne !+ inc.z gfxb_1+1 !: - // [494] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 -- vbuz1=_inc_vbuz1 + // [497] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 -- vbuz1=_inc_vbuz1 inc.z bx - // [495] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 -- vbuz1_neq_vbuc1_then_la1 + // [498] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z bx bne __b2_from___b2 jmp __b3 // gfx_init_plane_fill::@3 __b3: - // [496] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 -- vbuz1=_inc_vbuz1 + // [499] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 -- vbuz1=_inc_vbuz1 inc.z by - // [497] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 -- vbuz1_neq_vbuc1_then_la1 + // [500] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z by bne __b1_from___b3 - // [498] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@4 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@4] + // [501] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@4 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@4] __b4_from___b3: jmp __b4 // gfx_init_plane_fill::@4 __b4: - // [499] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_fill::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1] + // [502] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_fill::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #$4000/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_fill::@return __breturn: - // [500] return + // [503] return rts } // dtvSetCpuBankSegment1 @@ -16790,7 +16816,7 @@ dtvSetCpuBankSegment1: { // Move CPU BANK 1 SEGMENT ($4000-$7fff) .label cpuBank = $ff .label cpuBankIdx = $43 - // [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuz1 + // [505] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuz1 lda.z cpuBankIdx sta cpuBank // asm { .byte$32,$dd lda$ff .byte$32,$00 } @@ -16800,19 +16826,19 @@ dtvSetCpuBankSegment1: { jmp __breturn // dtvSetCpuBankSegment1::@return __breturn: - // [504] return + // [507] return rts } // gfx_init_plane_blank // Initialize Plane with blank pixels gfx_init_plane_blank: { - // [506] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_blank to gfx_init_plane_fill [phi:gfx_init_plane_blank->gfx_init_plane_fill] + // [509] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_blank to gfx_init_plane_fill [phi:gfx_init_plane_blank->gfx_init_plane_fill] gfx_init_plane_fill_from_gfx_init_plane_blank: - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) 0 [phi:gfx_init_plane_blank->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) 0 [phi:gfx_init_plane_blank->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #0 sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_BLANK [phi:gfx_init_plane_blank->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_BLANK [phi:gfx_init_plane_blank->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_BLANK @@ -16825,19 +16851,19 @@ gfx_init_plane_blank: { jmp __breturn // gfx_init_plane_blank::@return __breturn: - // [507] return + // [510] return rts } // gfx_init_plane_vertical2 // Initialize Plane with Vertical Stripes every 2 pixels gfx_init_plane_vertical2: { - // [509] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_vertical2 to gfx_init_plane_fill [phi:gfx_init_plane_vertical2->gfx_init_plane_fill] + // [512] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_vertical2 to gfx_init_plane_fill [phi:gfx_init_plane_vertical2->gfx_init_plane_fill] gfx_init_plane_fill_from_gfx_init_plane_vertical2: - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $1b [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $1b [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #$1b sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_VERTICAL2 [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_VERTICAL2 [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_VERTICAL2 @@ -16850,106 +16876,106 @@ gfx_init_plane_vertical2: { jmp __breturn // gfx_init_plane_vertical2::@return __breturn: - // [510] return + // [513] return rts } // gfx_init_plane_horisontal2 // Initialize Plane with Horizontal Stripes every 2 pixels gfx_init_plane_horisontal2: { .const gfxbCpuBank = PLANE_HORISONTAL2/$4000 - .label __2 = $125 - .label row = $126 + .label __2 = $12b + .label row = $12c .label gfxa = $45 .label ax = $47 .label ay = $44 - // [512] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal2 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1] + // [515] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal2 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_horisontal2: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #gfxbCpuBank sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 - // [513] phi from gfx_init_plane_horisontal2 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1] + // [516] phi from gfx_init_plane_horisontal2 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1] __b1_from_gfx_init_plane_horisontal2: - // [513] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#0] -- pbuz1=pbuc1 + // [516] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#0] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [513] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#1] -- vbuz1=vbuc1 + // [516] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#1] -- vbuz1=vbuc1 lda #0 sta.z ay jmp __b1 - // [513] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1] + // [516] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1] __b1_from___b3: - // [513] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#0] -- register_copy - // [513] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) gfx_init_plane_horisontal2::ay#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#1] -- register_copy + // [516] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#0] -- register_copy + // [516] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) gfx_init_plane_horisontal2::ay#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#1] -- register_copy jmp __b1 // gfx_init_plane_horisontal2::@1 __b1: - // [514] phi from gfx_init_plane_horisontal2::@1 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2] + // [517] phi from gfx_init_plane_horisontal2::@1 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2] __b2_from___b1: - // [514] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#0] -- vbuz1=vbuc1 + // [517] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#0] -- vbuz1=vbuc1 lda #0 sta.z ax - // [514] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#3 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#1] -- register_copy + // [517] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#3 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#1] -- register_copy jmp __b2 - // [514] phi from gfx_init_plane_horisontal2::@2 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2] + // [517] phi from gfx_init_plane_horisontal2::@2 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2] __b2_from___b2: - // [514] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) gfx_init_plane_horisontal2::ax#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#0] -- register_copy - // [514] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#1] -- register_copy + // [517] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) gfx_init_plane_horisontal2::ax#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#0] -- register_copy + // [517] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#1] -- register_copy jmp __b2 // gfx_init_plane_horisontal2::@2 __b2: - // [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z ay lsr sta.z __2 - // [516] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 + // [519] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 lda #3 and.z __2 sta.z row - // [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy.z row lda row_bitmask,y ldy #0 sta (gfxa),y - // [518] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 -- pbuz1=_inc_pbuz1 + // [521] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [519] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 -- vbuz1=_inc_vbuz1 + // [522] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 -- vbuz1=_inc_vbuz1 inc.z ax - // [520] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 -- vbuz1_neq_vbuc1_then_la1 + // [523] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z ax bne __b2_from___b2 jmp __b3 // gfx_init_plane_horisontal2::@3 __b3: - // [521] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 -- vbuz1=_inc_vbuz1 + // [524] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 -- vbuz1=_inc_vbuz1 inc.z ay - // [522] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 -- vbuz1_neq_vbuc1_then_la1 + // [525] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z ay bne __b1_from___b3 - // [523] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@4 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@4] + // [526] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@4 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@4] __b4_from___b3: jmp __b4 // gfx_init_plane_horisontal2::@4 __b4: - // [524] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal2::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1] + // [527] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal2::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #$4000/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_horisontal2::@return __breturn: - // [525] return + // [528] return rts row_bitmask: .byte 0, $55, $aa, $ff } @@ -16960,200 +16986,200 @@ gfx_init_plane_vertical: { .label gfxb = $49 .label bx = $4b .label by = $48 - // [527] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_vertical to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1] + // [530] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_vertical to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_vertical: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_vertical::gfxbCpuBank#0 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_vertical::gfxbCpuBank#0 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #gfxbCpuBank sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 - // [528] phi from gfx_init_plane_vertical to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1] + // [531] phi from gfx_init_plane_vertical to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1] __b1_from_gfx_init_plane_vertical: - // [528] phi (byte) gfx_init_plane_vertical::by#4 = (byte) 0 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#0] -- vbuz1=vbuc1 + // [531] phi (byte) gfx_init_plane_vertical::by#4 = (byte) 0 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#0] -- vbuz1=vbuc1 lda #0 sta.z by - // [528] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#1] -- pbuz1=pbuc1 + // [531] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#1] -- pbuz1=pbuc1 lda #<$4000+(PLANE_VERTICAL&$3fff) sta.z gfxb lda #>$4000+(PLANE_VERTICAL&$3fff) sta.z gfxb+1 jmp __b1 - // [528] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1] + // [531] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1] __b1_from___b3: - // [528] phi (byte) gfx_init_plane_vertical::by#4 = (byte) gfx_init_plane_vertical::by#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#0] -- register_copy - // [528] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#1] -- register_copy + // [531] phi (byte) gfx_init_plane_vertical::by#4 = (byte) gfx_init_plane_vertical::by#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#0] -- register_copy + // [531] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#1] -- register_copy jmp __b1 // gfx_init_plane_vertical::@1 __b1: - // [529] phi from gfx_init_plane_vertical::@1 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2] + // [532] phi from gfx_init_plane_vertical::@1 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2] __b2_from___b1: - // [529] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) 0 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#0] -- vbuz1=vbuc1 + // [532] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) 0 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#0] -- vbuz1=vbuc1 lda #0 sta.z bx - // [529] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#3 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#1] -- register_copy + // [532] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#3 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#1] -- register_copy jmp __b2 - // [529] phi from gfx_init_plane_vertical::@2 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2] + // [532] phi from gfx_init_plane_vertical::@2 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2] __b2_from___b2: - // [529] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) gfx_init_plane_vertical::bx#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#0] -- register_copy - // [529] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#1] -- register_copy + // [532] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) gfx_init_plane_vertical::bx#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#0] -- register_copy + // [532] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#1] -- register_copy jmp __b2 // gfx_init_plane_vertical::@2 __b2: - // [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f -- _deref_pbuz1=vbuc1 + // [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f -- _deref_pbuz1=vbuc1 lda #$f ldy #0 sta (gfxb),y - // [531] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 -- pbuz1=_inc_pbuz1 + // [534] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: - // [532] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 -- vbuz1=_inc_vbuz1 + // [535] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 -- vbuz1=_inc_vbuz1 inc.z bx - // [533] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 -- vbuz1_neq_vbuc1_then_la1 + // [536] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z bx bne __b2_from___b2 jmp __b3 // gfx_init_plane_vertical::@3 __b3: - // [534] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 -- vbuz1=_inc_vbuz1 + // [537] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 -- vbuz1=_inc_vbuz1 inc.z by - // [535] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 -- vbuz1_neq_vbuc1_then_la1 + // [538] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z by bne __b1_from___b3 - // [536] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@4 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@4] + // [539] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@4 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@4] __b4_from___b3: jmp __b4 // gfx_init_plane_vertical::@4 __b4: - // [537] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_vertical::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1] + // [540] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_vertical::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #$4000/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_vertical::@return __breturn: - // [538] return + // [541] return rts } // gfx_init_plane_horisontal // Initialize Plane with Horizontal Stripes gfx_init_plane_horisontal: { .const gfxbCpuBank = PLANE_HORISONTAL/$4000 - .label __2 = $127 + .label __2 = $12d .label gfxa = $4d .label ax = $4f .label ay = $4c - // [540] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1] + // [543] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_horisontal: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #gfxbCpuBank sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 - // [541] phi from gfx_init_plane_horisontal to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1] + // [544] phi from gfx_init_plane_horisontal to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1] __b1_from_gfx_init_plane_horisontal: - // [541] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#0] -- pbuz1=pbuc1 + // [544] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#0] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [541] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#1] -- vbuz1=vbuc1 + // [544] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#1] -- vbuz1=vbuc1 lda #0 sta.z ay jmp __b1 - // [541] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1] + // [544] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1] __b1_from___b6: - // [541] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#0] -- register_copy - // [541] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) gfx_init_plane_horisontal::ay#1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#1] -- register_copy + // [544] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#0] -- register_copy + // [544] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) gfx_init_plane_horisontal::ay#1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#1] -- register_copy jmp __b1 // gfx_init_plane_horisontal::@1 __b1: - // [542] phi from gfx_init_plane_horisontal::@1 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2] + // [545] phi from gfx_init_plane_horisontal::@1 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2] __b2_from___b1: - // [542] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#0] -- vbuz1=vbuc1 + // [545] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#0] -- vbuz1=vbuc1 lda #0 sta.z ax - // [542] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#6 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#1] -- register_copy + // [545] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#6 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#1] -- register_copy jmp __b2 - // [542] phi from gfx_init_plane_horisontal::@4 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2] + // [545] phi from gfx_init_plane_horisontal::@4 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2] __b2_from___b4: - // [542] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) gfx_init_plane_horisontal::ax#1 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#0] -- register_copy - // [542] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#1] -- register_copy + // [545] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) gfx_init_plane_horisontal::ax#1 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#0] -- register_copy + // [545] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#1] -- register_copy jmp __b2 // gfx_init_plane_horisontal::@2 __b2: - // [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 -- vbuz1=vbuz2_band_vbuc1 + // [546] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 -- vbuz1=vbuz2_band_vbuc1 lda #4 and.z ay sta.z __2 - // [544] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -- vbuz1_eq_0_then_la1 + // [547] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -- vbuz1_eq_0_then_la1 lda.z __2 cmp #0 beq __b3 jmp __b5 // gfx_init_plane_horisontal::@5 __b5: - // [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff -- _deref_pbuz1=vbuc1 + // [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff -- _deref_pbuz1=vbuc1 lda #$ff ldy #0 sta (gfxa),y - // [546] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 + // [549] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [547] phi from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 to gfx_init_plane_horisontal::@4 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4] + // [550] phi from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 to gfx_init_plane_horisontal::@4 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4] __b4_from___b3: __b4_from___b5: - // [547] phi (byte*) gfx_init_plane_horisontal::gfxa#7 = (byte*) gfx_init_plane_horisontal::gfxa#1 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4#0] -- register_copy + // [550] phi (byte*) gfx_init_plane_horisontal::gfxa#7 = (byte*) gfx_init_plane_horisontal::gfxa#1 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4#0] -- register_copy jmp __b4 // gfx_init_plane_horisontal::@4 __b4: - // [548] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 -- vbuz1=_inc_vbuz1 + // [551] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 -- vbuz1=_inc_vbuz1 inc.z ax - // [549] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 -- vbuz1_neq_vbuc1_then_la1 + // [552] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z ax bne __b2_from___b4 jmp __b6 // gfx_init_plane_horisontal::@6 __b6: - // [550] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 -- vbuz1=_inc_vbuz1 + // [553] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 -- vbuz1=_inc_vbuz1 inc.z ay - // [551] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 -- vbuz1_neq_vbuc1_then_la1 + // [554] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z ay bne __b1_from___b6 - // [552] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@7] + // [555] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@7] __b7_from___b6: jmp __b7 // gfx_init_plane_horisontal::@7 __b7: - // [553] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal::@7 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1] + // [556] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal::@7 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b7: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #$4000/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_horisontal::@return __breturn: - // [554] return + // [557] return rts // gfx_init_plane_horisontal::@3 __b3: - // [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (gfxa),y - // [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 + // [559] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 @@ -17165,7 +17191,7 @@ gfx_init_plane_horisontal: { gfx_init_plane_charset8: { // 8bpp cells for Plane B (charset) - ROM charset with 256 colors .const gfxbCpuBank = PLANE_CHARSET8/$4000 - .label __2 = $128 + .label __2 = $12e .label bits = $54 .label chargen = $51 .label gfxa = $55 @@ -17174,232 +17200,232 @@ gfx_init_plane_charset8: { .label cr = $53 .label ch = $50 .label c = $59 - // [558] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] + // [561] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_charset8: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #gfxbCpuBank sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __b9 // gfx_init_plane_charset8::@9 __b9: - // [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2 + // [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_CHARROM sta PROCPORT - // [560] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] + // [563] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] __b1_from___b9: - // [560] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 + // [563] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 lda #0 sta.z ch - // [560] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 + // [563] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 lda #0 sta.z col - // [560] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 + // [563] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [560] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + // [563] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 lda #CHARGEN sta.z chargen+1 jmp __b1 - // [560] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] + // [563] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] __b1_from___b7: - // [560] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy - // [560] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy - // [560] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy - // [560] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy + // [563] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy + // [563] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy + // [563] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy + // [563] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy jmp __b1 // gfx_init_plane_charset8::@1 __b1: - // [561] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] + // [564] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] __b2_from___b1: - // [561] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 + // [564] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 lda #0 sta.z cr - // [561] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy jmp __b2 - // [561] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] + // [564] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] __b2_from___b6: - // [561] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy - // [561] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy jmp __b2 // gfx_init_plane_charset8::@2 __b2: - // [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 + // [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 ldy #0 lda (chargen),y sta.z bits - // [563] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 + // [566] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 inc.z chargen bne !+ inc.z chargen+1 !: - // [564] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] + // [567] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] __b3_from___b2: - // [564] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuz1=vbuc1 + // [567] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuz1=vbuc1 lda #0 sta.z cp - // [564] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy - // [564] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy + // [567] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy jmp __b3 - // [564] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] + // [567] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] __b3_from___b4: - // [564] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy - // [564] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy + // [567] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy jmp __b3 // gfx_init_plane_charset8::@3 __b3: - // [565] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + // [568] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and.z bits sta.z __2 - // [566] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuz1_eq_0_then_la1 + // [569] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuz1_eq_0_then_la1 lda.z __2 cmp #0 beq __b4_from___b3 jmp __b5 // gfx_init_plane_charset8::@5 __b5: - // [567] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuz1=vbuz2 + // [570] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuz1=vbuz2 lda.z col sta.z c - // [568] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] + // [571] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] __b4_from___b5: - // [568] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy + // [571] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy jmp __b4 - // [568] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] + // [571] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] __b4_from___b3: - // [568] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuz1=vbuc1 + // [571] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuz1=vbuc1 lda #0 sta.z c jmp __b4 // gfx_init_plane_charset8::@4 __b4: - // [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuz2 + // [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuz2 lda.z c ldy #0 sta (gfxa),y - // [570] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 + // [573] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [571] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [574] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z bits - // [572] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 + // [575] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 inc.z col - // [573] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuz1=_inc_vbuz1 + // [576] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuz1=_inc_vbuz1 inc.z cp - // [574] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuz1_neq_vbuc1_then_la1 + // [577] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z cp bne __b3_from___b4 jmp __b6 // gfx_init_plane_charset8::@6 __b6: - // [575] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 + // [578] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 inc.z cr - // [576] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 + // [579] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z cr bne __b2_from___b6 jmp __b7 // gfx_init_plane_charset8::@7 __b7: - // [577] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 + // [580] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 inc.z ch - // [578] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 + // [581] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 lda.z ch cmp #0 bne __b1_from___b7 jmp __b8 // gfx_init_plane_charset8::@8 __b8: - // [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 + // [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - // [580] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] + // [583] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b8: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #$4000/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_charset8::@return __breturn: - // [581] return + // [584] return rts } // gfx_init_plane_8bppchunky // Initialize 8BPP Chunky Bitmap (contains 8bpp pixels) gfx_init_plane_8bppchunky: { - .label __5 = $129 - .label c = $12b + .label __5 = $12f + .label c = $131 .label gfxb = $5e .label x = $5b // 320x200 8bpp pixels for Plane .label gfxbCpuBank = $5d .label y = $5a - // [583] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1] + // [586] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_8bppchunky: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #PLANE_8BPP_CHUNKY/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 - // [584] phi from gfx_init_plane_8bppchunky to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1] + // [587] phi from gfx_init_plane_8bppchunky to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1] __b1_from_gfx_init_plane_8bppchunky: - // [584] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = ++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#0] -- vbuz1=vbuc1 + // [587] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = ++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#0] -- vbuz1=vbuc1 lda #PLANE_8BPP_CHUNKY/$4000+1 sta.z gfxbCpuBank - // [584] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) 0 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#1] -- vbuz1=vbuc1 + // [587] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) 0 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#1] -- vbuz1=vbuc1 lda #0 sta.z y - // [584] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#2] -- pbuz1=pbuc1 + // [587] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#2] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 jmp __b1 - // [584] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1] + // [587] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1] __b1_from___b5: - // [584] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#0] -- register_copy - // [584] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) gfx_init_plane_8bppchunky::y#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#1] -- register_copy - // [584] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#2] -- register_copy + // [587] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#0] -- register_copy + // [587] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) gfx_init_plane_8bppchunky::y#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#1] -- register_copy + // [587] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#2] -- register_copy jmp __b1 // gfx_init_plane_8bppchunky::@1 __b1: - // [585] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2] + // [588] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2] __b2_from___b1: - // [585] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy - // [585] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1 + // [588] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy + // [588] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1 lda #<0 sta.z x lda #>0 sta.z x+1 - // [585] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy + // [588] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy jmp __b2 - // [585] phi from gfx_init_plane_8bppchunky::@3 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2] + // [588] phi from gfx_init_plane_8bppchunky::@3 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2] __b2_from___b3: - // [585] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#0] -- register_copy - // [585] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) gfx_init_plane_8bppchunky::x#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#1] -- register_copy - // [585] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#2] -- register_copy + // [588] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#0] -- register_copy + // [588] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) gfx_init_plane_8bppchunky::x#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#1] -- register_copy + // [588] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#2] -- register_copy jmp __b2 // gfx_init_plane_8bppchunky::@2 __b2: - // [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -- pbuz1_neq_vwuc1_then_la1 + // [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -- pbuz1_neq_vwuc1_then_la1 lda.z gfxb+1 cmp #>$8000 bne __b3_from___b2 @@ -17409,36 +17435,36 @@ gfx_init_plane_8bppchunky: { jmp __b4 // gfx_init_plane_8bppchunky::@4 __b4: - // [587] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuz1=vbuz2 + // [590] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuz1=vbuz2 lda.z gfxbCpuBank sta.z dtvSetCpuBankSegment1.cpuBankIdx - // [588] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1] + // [591] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1#0] -- register_copy + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1#0] -- register_copy jsr dtvSetCpuBankSegment1 jmp __b7 // gfx_init_plane_8bppchunky::@7 __b7: - // [589] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuz1=_inc_vbuz1 + // [592] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuz1=_inc_vbuz1 inc.z gfxbCpuBank - // [590] phi from gfx_init_plane_8bppchunky::@7 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3] + // [593] phi from gfx_init_plane_8bppchunky::@7 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3] __b3_from___b7: - // [590] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#0] -- register_copy - // [590] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#1] -- pbuz1=pbuc1 + // [593] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#0] -- register_copy + // [593] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#1] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 jmp __b3 - // [590] phi from gfx_init_plane_8bppchunky::@2 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3] + // [593] phi from gfx_init_plane_8bppchunky::@2 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3] __b3_from___b2: - // [590] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#0] -- register_copy - // [590] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) gfx_init_plane_8bppchunky::gfxb#3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#1] -- register_copy + // [593] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#0] -- register_copy + // [593] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) gfx_init_plane_8bppchunky::gfxb#3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#1] -- register_copy jmp __b3 // gfx_init_plane_8bppchunky::@3 __b3: - // [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 -- vwuz1=vwuz2_plus_vbuz3 + // [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 -- vwuz1=vwuz2_plus_vbuz3 lda.z y clc adc.z x @@ -17446,24 +17472,24 @@ gfx_init_plane_8bppchunky: { lda #0 adc.z x+1 sta.z __5+1 - // [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 -- vbuz1=_byte_vwuz2 + // [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 -- vbuz1=_byte_vwuz2 lda.z __5 sta.z c - // [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 -- _deref_pbuz1=vbuz2 + // [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 -- _deref_pbuz1=vbuz2 lda.z c ldy #0 sta (gfxb),y - // [594] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 -- pbuz1=_inc_pbuz1 + // [597] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: - // [595] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 -- vwuz1=_inc_vwuz1 + // [598] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 -- vwuz1=_inc_vwuz1 inc.z x bne !+ inc.z x+1 !: - // [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 -- vwuz1_neq_vwuc1_then_la1 + // [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 -- vwuz1_neq_vwuc1_then_la1 lda.z x+1 cmp #>$140 bne __b2_from___b3 @@ -17473,28 +17499,28 @@ gfx_init_plane_8bppchunky: { jmp __b5 // gfx_init_plane_8bppchunky::@5 __b5: - // [597] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 -- vbuz1=_inc_vbuz1 + // [600] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 -- vbuz1=_inc_vbuz1 inc.z y - // [598] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 -- vbuz1_neq_vbuc1_then_la1 + // [601] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z y bne __b1_from___b5 - // [599] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@6 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@6] + // [602] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@6 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@6] __b6_from___b5: jmp __b6 // gfx_init_plane_8bppchunky::@6 __b6: - // [600] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1] + // [603] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b6: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 lda #$4000/$4000 sta.z dtvSetCpuBankSegment1.cpuBankIdx jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_8bppchunky::@return __breturn: - // [601] return + // [604] return rts } // gfx_init_vic_bitmap @@ -17502,481 +17528,481 @@ gfx_init_plane_8bppchunky: { gfx_init_vic_bitmap: { .const lines_cnt = 9 .label l = $60 - // [603] call bitmap_init - // [755] phi from gfx_init_vic_bitmap to bitmap_init [phi:gfx_init_vic_bitmap->bitmap_init] + // [606] call bitmap_init + // [758] phi from gfx_init_vic_bitmap to bitmap_init [phi:gfx_init_vic_bitmap->bitmap_init] bitmap_init_from_gfx_init_vic_bitmap: jsr bitmap_init - // [604] phi from gfx_init_vic_bitmap to gfx_init_vic_bitmap::@3 [phi:gfx_init_vic_bitmap->gfx_init_vic_bitmap::@3] + // [607] phi from gfx_init_vic_bitmap to gfx_init_vic_bitmap::@3 [phi:gfx_init_vic_bitmap->gfx_init_vic_bitmap::@3] __b3_from_gfx_init_vic_bitmap: jmp __b3 // gfx_init_vic_bitmap::@3 __b3: - // [605] call bitmap_clear + // [608] call bitmap_clear jsr bitmap_clear - // [606] phi from gfx_init_vic_bitmap::@3 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1] + // [609] phi from gfx_init_vic_bitmap::@3 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1] __b1_from___b3: - // [606] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) 0 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1#0] -- vbuz1=vbuc1 + // [609] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) 0 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l jmp __b1 // gfx_init_vic_bitmap::@1 __b1: - // [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1 + // [610] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z l cmp #lines_cnt bcc __b2 jmp __breturn // gfx_init_vic_bitmap::@return __breturn: - // [608] return + // [611] return rts // gfx_init_vic_bitmap::@2 __b2: - // [609] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [612] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_x,y sta.z bitmap_line.x0 - // [610] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [613] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_x+1,y sta.z bitmap_line.x1 - // [611] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [614] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_y,y sta.z bitmap_line.y0 - // [612] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [615] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_y+1,y sta.z bitmap_line.y1 - // [613] call bitmap_line + // [616] call bitmap_line jsr bitmap_line jmp __b4 // gfx_init_vic_bitmap::@4 __b4: - // [614] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 -- vbuz1=_inc_vbuz1 + // [617] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 -- vbuz1=_inc_vbuz1 inc.z l - // [606] phi from gfx_init_vic_bitmap::@4 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1] + // [609] phi from gfx_init_vic_bitmap::@4 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1] __b1_from___b4: - // [606] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) gfx_init_vic_bitmap::l#1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1#0] -- register_copy + // [609] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) gfx_init_vic_bitmap::l#1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1#0] -- register_copy jmp __b1 lines_x: .byte 0, $ff, $ff, 0, 0, $80, $ff, $80, 0, $80 lines_y: .byte 0, 0, $c7, $c7, 0, 0, $64, $c7, $64, 0 } // bitmap_line // Draw a line on the bitmap -// bitmap_line(byte zp($12c) x0, byte zp($12d) x1, byte zp($12e) y0, byte zp($12f) y1) +// bitmap_line(byte zp($132) x0, byte zp($133) x1, byte zp($134) y0, byte zp($135) y1) bitmap_line: { - .label xd = $133 - .label xd_1 = $130 - .label yd = $132 - .label yd_1 = $131 - .label x0 = $12c - .label x1 = $12d - .label y0 = $12e - .label y1 = $12f - .label yd_2 = $134 - .label yd_3 = $135 - // [615] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -- vbuz1_lt_vbuz2_then_la1 + .label xd = $139 + .label xd_1 = $136 + .label yd = $138 + .label yd_1 = $137 + .label x0 = $132 + .label x1 = $133 + .label y0 = $134 + .label y1 = $135 + .label yd_2 = $13a + .label yd_3 = $13b + // [618] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -- vbuz1_lt_vbuz2_then_la1 lda.z x0 cmp.z x1 bcc __b1 jmp __b2 // bitmap_line::@2 __b2: - // [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 -- vbuz1=vbuz2_minus_vbuz3 + // [619] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z x0 sec sbc.z x1 sta.z xd_1 - // [617] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 -- vbuz1_lt_vbuz2_then_la1 + // [620] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 -- vbuz1_lt_vbuz2_then_la1 lda.z y0 cmp.z y1 bcc __b7 jmp __b3 // bitmap_line::@3 __b3: - // [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuz1=vbuz2_minus_vbuz3 + // [621] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z y0 sec sbc.z y1 sta.z yd_1 - // [619] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 -- vbuz1_lt_vbuz2_then_la1 + // [622] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 -- vbuz1_lt_vbuz2_then_la1 lda.z yd_1 cmp.z xd_1 bcc __b8 jmp __b4 // bitmap_line::@4 __b4: - // [620] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [623] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxi.y - // [621] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 + // [624] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 lda.z x1 sta.z bitmap_line_ydxi.x - // [622] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [625] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxi.y1 - // [623] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuz2 + // [626] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuz2 lda.z yd_1 sta.z bitmap_line_ydxi.yd - // [624] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 + // [627] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 lda.z xd_1 sta.z bitmap_line_ydxi.xd - // [625] call bitmap_line_ydxi - // [699] phi from bitmap_line::@4 to bitmap_line_ydxi [phi:bitmap_line::@4->bitmap_line_ydxi] + // [628] call bitmap_line_ydxi + // [702] phi from bitmap_line::@4 to bitmap_line_ydxi [phi:bitmap_line::@4->bitmap_line_ydxi] bitmap_line_ydxi_from___b4: - // [699] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#0 [phi:bitmap_line::@4->bitmap_line_ydxi#0] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#1] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#0 [phi:bitmap_line::@4->bitmap_line_ydxi#2] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#0 [phi:bitmap_line::@4->bitmap_line_ydxi#3] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#0 [phi:bitmap_line::@4->bitmap_line_ydxi#0] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#1] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#0 [phi:bitmap_line::@4->bitmap_line_ydxi#2] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#0 [phi:bitmap_line::@4->bitmap_line_ydxi#3] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy jsr bitmap_line_ydxi jmp __breturn // bitmap_line::@return __breturn: - // [626] return + // [629] return rts // bitmap_line::@8 __b8: - // [627] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 + // [630] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 lda.z x1 sta.z bitmap_line_xdyi.x - // [628] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [631] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_xdyi.y - // [629] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [632] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyi.x1 - // [630] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 + // [633] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 lda.z xd_1 sta.z bitmap_line_xdyi.xd - // [631] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuz2 + // [634] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuz2 lda.z yd_1 sta.z bitmap_line_xdyi.yd - // [632] call bitmap_line_xdyi - // [677] phi from bitmap_line::@8 to bitmap_line_xdyi [phi:bitmap_line::@8->bitmap_line_xdyi] + // [635] call bitmap_line_xdyi + // [680] phi from bitmap_line::@8 to bitmap_line_xdyi [phi:bitmap_line::@8->bitmap_line_xdyi] bitmap_line_xdyi_from___b8: - // [677] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#0 [phi:bitmap_line::@8->bitmap_line_xdyi#0] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#1] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#0 [phi:bitmap_line::@8->bitmap_line_xdyi#2] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#0 [phi:bitmap_line::@8->bitmap_line_xdyi#0] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#1] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#0 [phi:bitmap_line::@8->bitmap_line_xdyi#2] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy jsr bitmap_line_xdyi jmp __breturn // bitmap_line::@7 __b7: - // [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuz1=vbuz2_minus_vbuz3 + // [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z y1 sec sbc.z y0 sta.z yd - // [634] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 -- vbuz1_lt_vbuz2_then_la1 + // [637] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 -- vbuz1_lt_vbuz2_then_la1 lda.z yd cmp.z xd_1 bcc __b9 jmp __b10 // bitmap_line::@10 __b10: - // [635] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [638] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxd.y - // [636] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [639] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_ydxd.x - // [637] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [640] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxd.y1 - // [638] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuz2 + // [641] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuz2 lda.z yd sta.z bitmap_line_ydxd.yd - // [639] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 + // [642] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 lda.z xd_1 sta.z bitmap_line_ydxd.xd - // [640] call bitmap_line_ydxd - // [729] phi from bitmap_line::@10 to bitmap_line_ydxd [phi:bitmap_line::@10->bitmap_line_ydxd] + // [643] call bitmap_line_ydxd + // [732] phi from bitmap_line::@10 to bitmap_line_ydxd [phi:bitmap_line::@10->bitmap_line_ydxd] bitmap_line_ydxd_from___b10: - // [729] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#0 [phi:bitmap_line::@10->bitmap_line_ydxd#0] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#1] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#0 [phi:bitmap_line::@10->bitmap_line_ydxd#2] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#0 [phi:bitmap_line::@10->bitmap_line_ydxd#0] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#1] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#0 [phi:bitmap_line::@10->bitmap_line_ydxd#2] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy jsr bitmap_line_ydxd jmp __breturn // bitmap_line::@9 __b9: - // [641] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 + // [644] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 lda.z x1 sta.z bitmap_line_xdyd.x - // [642] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [645] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_xdyd.y - // [643] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [646] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyd.x1 - // [644] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 + // [647] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 -- vbuz1=vbuz2 lda.z xd_1 sta.z bitmap_line_xdyd.xd - // [645] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuz2 + // [648] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuz2 lda.z yd sta.z bitmap_line_xdyd.yd - // [646] call bitmap_line_xdyd - // [714] phi from bitmap_line::@9 to bitmap_line_xdyd [phi:bitmap_line::@9->bitmap_line_xdyd] + // [649] call bitmap_line_xdyd + // [717] phi from bitmap_line::@9 to bitmap_line_xdyd [phi:bitmap_line::@9->bitmap_line_xdyd] bitmap_line_xdyd_from___b9: - // [714] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#0 [phi:bitmap_line::@9->bitmap_line_xdyd#0] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#1] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#0 [phi:bitmap_line::@9->bitmap_line_xdyd#2] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#0 [phi:bitmap_line::@9->bitmap_line_xdyd#0] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#1] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#0 [phi:bitmap_line::@9->bitmap_line_xdyd#2] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy jsr bitmap_line_xdyd jmp __breturn // bitmap_line::@1 __b1: - // [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuz2_minus_vbuz3 + // [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z x1 sec sbc.z x0 sta.z xd - // [648] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 -- vbuz1_lt_vbuz2_then_la1 + // [651] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 -- vbuz1_lt_vbuz2_then_la1 lda.z y0 cmp.z y1 bcc __b11 jmp __b5 // bitmap_line::@5 __b5: - // [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuz1=vbuz2_minus_vbuz3 + // [652] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z y0 sec sbc.z y1 sta.z yd_2 - // [650] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 -- vbuz1_lt_vbuz2_then_la1 + // [653] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 -- vbuz1_lt_vbuz2_then_la1 lda.z yd_2 cmp.z xd bcc __b12 jmp __b6 // bitmap_line::@6 __b6: - // [651] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [654] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxd.y - // [652] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 + // [655] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 lda.z x1 sta.z bitmap_line_ydxd.x - // [653] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [656] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxd.y1 - // [654] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuz2 + // [657] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuz2 lda.z yd_2 sta.z bitmap_line_ydxd.yd - // [655] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 + // [658] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 lda.z xd sta.z bitmap_line_ydxd.xd - // [656] call bitmap_line_ydxd - // [729] phi from bitmap_line::@6 to bitmap_line_ydxd [phi:bitmap_line::@6->bitmap_line_ydxd] + // [659] call bitmap_line_ydxd + // [732] phi from bitmap_line::@6 to bitmap_line_ydxd [phi:bitmap_line::@6->bitmap_line_ydxd] bitmap_line_ydxd_from___b6: - // [729] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#1 [phi:bitmap_line::@6->bitmap_line_ydxd#0] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#1] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#1 [phi:bitmap_line::@6->bitmap_line_ydxd#2] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#1 [phi:bitmap_line::@6->bitmap_line_ydxd#0] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#1] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#1 [phi:bitmap_line::@6->bitmap_line_ydxd#2] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy jsr bitmap_line_ydxd jmp __breturn // bitmap_line::@12 __b12: - // [657] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [660] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyd.x - // [658] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [661] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_xdyd.y - // [659] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 + // [662] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 lda.z x1 sta.z bitmap_line_xdyd.x1 - // [660] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 + // [663] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 lda.z xd sta.z bitmap_line_xdyd.xd - // [661] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuz2 + // [664] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuz2 lda.z yd_2 sta.z bitmap_line_xdyd.yd - // [662] call bitmap_line_xdyd - // [714] phi from bitmap_line::@12 to bitmap_line_xdyd [phi:bitmap_line::@12->bitmap_line_xdyd] + // [665] call bitmap_line_xdyd + // [717] phi from bitmap_line::@12 to bitmap_line_xdyd [phi:bitmap_line::@12->bitmap_line_xdyd] bitmap_line_xdyd_from___b12: - // [714] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#1 [phi:bitmap_line::@12->bitmap_line_xdyd#0] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#1] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#1 [phi:bitmap_line::@12->bitmap_line_xdyd#2] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#1 [phi:bitmap_line::@12->bitmap_line_xdyd#0] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#1] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#1 [phi:bitmap_line::@12->bitmap_line_xdyd#2] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy jsr bitmap_line_xdyd jmp __breturn // bitmap_line::@11 __b11: - // [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuz1=vbuz2_minus_vbuz3 + // [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuz1=vbuz2_minus_vbuz3 lda.z y1 sec sbc.z y0 sta.z yd_3 - // [664] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 -- vbuz1_lt_vbuz2_then_la1 + // [667] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 -- vbuz1_lt_vbuz2_then_la1 lda.z yd_3 cmp.z xd bcc __b13 jmp __b14 // bitmap_line::@14 __b14: - // [665] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [668] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxi.y - // [666] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [669] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_ydxi.x - // [667] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [670] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxi.y1 - // [668] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuz2 + // [671] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuz2 lda.z yd_3 sta.z bitmap_line_ydxi.yd - // [669] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 + // [672] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 lda.z xd sta.z bitmap_line_ydxi.xd - // [670] call bitmap_line_ydxi - // [699] phi from bitmap_line::@14 to bitmap_line_ydxi [phi:bitmap_line::@14->bitmap_line_ydxi] + // [673] call bitmap_line_ydxi + // [702] phi from bitmap_line::@14 to bitmap_line_ydxi [phi:bitmap_line::@14->bitmap_line_ydxi] bitmap_line_ydxi_from___b14: - // [699] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#1 [phi:bitmap_line::@14->bitmap_line_ydxi#0] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#1] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#1 [phi:bitmap_line::@14->bitmap_line_ydxi#2] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#1 [phi:bitmap_line::@14->bitmap_line_ydxi#0] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#1] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#1 [phi:bitmap_line::@14->bitmap_line_ydxi#2] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy jsr bitmap_line_ydxi jmp __breturn // bitmap_line::@13 __b13: - // [671] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [674] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyi.x - // [672] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [675] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_xdyi.y - // [673] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 + // [676] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuz2 lda.z x1 sta.z bitmap_line_xdyi.x1 - // [674] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 + // [677] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 -- vbuz1=vbuz2 lda.z xd sta.z bitmap_line_xdyi.xd - // [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuz2 + // [678] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuz2 lda.z yd_3 sta.z bitmap_line_xdyi.yd - // [676] call bitmap_line_xdyi - // [677] phi from bitmap_line::@13 to bitmap_line_xdyi [phi:bitmap_line::@13->bitmap_line_xdyi] + // [679] call bitmap_line_xdyi + // [680] phi from bitmap_line::@13 to bitmap_line_xdyi [phi:bitmap_line::@13->bitmap_line_xdyi] bitmap_line_xdyi_from___b13: - // [677] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#1 [phi:bitmap_line::@13->bitmap_line_xdyi#0] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#1] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#1 [phi:bitmap_line::@13->bitmap_line_xdyi#2] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#1 [phi:bitmap_line::@13->bitmap_line_xdyi#0] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#1] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#1 [phi:bitmap_line::@13->bitmap_line_xdyi#2] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy jsr bitmap_line_xdyi jmp __breturn } // bitmap_line_xdyi // bitmap_line_xdyi(byte zp($64) x, byte zp($65) y, byte zp($63) x1, byte zp($62) xd, byte zp($61) yd) bitmap_line_xdyi: { - .label __6 = $136 + .label __6 = $13c .label x = $64 .label y = $65 .label x1 = $63 .label xd = $62 .label yd = $61 .label e = $66 - // [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z yd lsr sta.z e - // [679] phi from bitmap_line_xdyi bitmap_line_xdyi::@2 to bitmap_line_xdyi::@1 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1] + // [682] phi from bitmap_line_xdyi bitmap_line_xdyi::@2 to bitmap_line_xdyi::@1 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1] __b1_from_bitmap_line_xdyi: __b1_from___b2: - // [679] phi (byte) bitmap_line_xdyi::e#3 = (byte) bitmap_line_xdyi::e#0 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#0] -- register_copy - // [679] phi (byte) bitmap_line_xdyi::y#3 = (byte) bitmap_line_xdyi::y#5 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#1] -- register_copy - // [679] phi (byte) bitmap_line_xdyi::x#3 = (byte) bitmap_line_xdyi::x#6 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#2] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::e#3 = (byte) bitmap_line_xdyi::e#0 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#0] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::y#3 = (byte) bitmap_line_xdyi::y#5 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#1] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::x#3 = (byte) bitmap_line_xdyi::x#6 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#2] -- register_copy jmp __b1 // bitmap_line_xdyi::@1 __b1: - // [680] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 -- vbuz1=vbuz2 + // [683] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 -- vbuz1=vbuz2 lda.z x sta.z bitmap_plot.x - // [681] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 -- vbuz1=vbuz2 + // [684] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 -- vbuz1=vbuz2 lda.z y sta.z bitmap_plot.y - // [682] call bitmap_plot - // [692] phi from bitmap_line_xdyi::@1 to bitmap_plot [phi:bitmap_line_xdyi::@1->bitmap_plot] + // [685] call bitmap_plot + // [695] phi from bitmap_line_xdyi::@1 to bitmap_plot [phi:bitmap_line_xdyi::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_xdyi::@4 __b4: - // [683] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 -- vbuz1=_inc_vbuz1 + // [686] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 -- vbuz1=_inc_vbuz1 inc.z x - // [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z yd sta.z e - // [685] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -- vbuz1_ge_vbuz2_then_la1 + // [688] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z xd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_xdyi::@3 __b3: - // [686] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 -- vbuz1=_inc_vbuz1 + // [689] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 -- vbuz1=_inc_vbuz1 inc.z y - // [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z xd sta.z e - // [688] phi from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 to bitmap_line_xdyi::@2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2] + // [691] phi from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 to bitmap_line_xdyi::@2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2] __b2_from___b3: __b2_from___b4: - // [688] phi (byte) bitmap_line_xdyi::e#6 = (byte) bitmap_line_xdyi::e#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#0] -- register_copy - // [688] phi (byte) bitmap_line_xdyi::y#6 = (byte) bitmap_line_xdyi::y#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#1] -- register_copy + // [691] phi (byte) bitmap_line_xdyi::e#6 = (byte) bitmap_line_xdyi::e#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#0] -- register_copy + // [691] phi (byte) bitmap_line_xdyi::y#6 = (byte) bitmap_line_xdyi::y#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#1] -- register_copy jmp __b2 // bitmap_line_xdyi::@2 __b2: - // [689] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [692] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z x1 iny sty.z __6 - // [690] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -- vbuz1_neq_vbuz2_then_la1 + // [693] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -- vbuz1_neq_vbuz2_then_la1 lda.z x cmp.z __6 bne __b1_from___b2 jmp __breturn // bitmap_line_xdyi::@return __breturn: - // [691] return + // [694] return rts } // bitmap_plot // bitmap_plot(byte zp($67) x, byte zp($68) y) bitmap_plot: { - .label __1 = $13d - .label plotter_x = $137 - .label plotter_y = $139 - .label plotter = $13b + .label __1 = $143 + .label plotter_x = $13d + .label plotter_y = $13f + .label plotter = $141 .label x = $67 .label y = $68 - // [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 + // [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 ldy.z x lda bitmap_plot_xhi,y sta.z plotter_x+1 lda bitmap_plot_xlo,y sta.z plotter_x - // [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 + // [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) -- vwuz1=pbuc1_derefidx_vbuz2_word_pbuc2_derefidx_vbuz2 ldy.z y lda bitmap_plot_yhi,y sta.z plotter_y+1 lda bitmap_plot_ylo,y sta.z plotter_y - // [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 -- vwuz1=vwuz2_plus_vwuz3 + // [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 -- vwuz1=vwuz2_plus_vwuz3 lda.z plotter_x clc adc.z plotter_y @@ -17984,461 +18010,461 @@ bitmap_plot: { lda.z plotter_x+1 adc.z plotter_y+1 sta.z plotter+1 - // [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) -- vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuz3 + // [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) -- vbuz1=_deref_pbuz2_bor_pbuc1_derefidx_vbuz3 ldy #0 lda (plotter),y ldy.z x ora bitmap_plot_bit,y sta.z __1 - // [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 -- _deref_pbuz1=vbuz2 + // [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 -- _deref_pbuz1=vbuz2 lda.z __1 ldy #0 sta (plotter),y jmp __breturn // bitmap_plot::@return __breturn: - // [698] return + // [701] return rts } // bitmap_line_ydxi // bitmap_line_ydxi(byte zp($6d) y, byte zp($6c) x, byte zp($6b) y1, byte zp($6a) yd, byte zp($69) xd) bitmap_line_ydxi: { - .label __6 = $13e + .label __6 = $144 .label y = $6d .label x = $6c .label y1 = $6b .label yd = $6a .label xd = $69 .label e = $6e - // [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z xd lsr sta.z e - // [701] phi from bitmap_line_ydxi bitmap_line_ydxi::@2 to bitmap_line_ydxi::@1 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1] + // [704] phi from bitmap_line_ydxi bitmap_line_ydxi::@2 to bitmap_line_ydxi::@1 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1] __b1_from_bitmap_line_ydxi: __b1_from___b2: - // [701] phi (byte) bitmap_line_ydxi::e#3 = (byte) bitmap_line_ydxi::e#0 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#0] -- register_copy - // [701] phi (byte) bitmap_line_ydxi::y#3 = (byte) bitmap_line_ydxi::y#6 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#1] -- register_copy - // [701] phi (byte) bitmap_line_ydxi::x#3 = (byte) bitmap_line_ydxi::x#5 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#2] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::e#3 = (byte) bitmap_line_ydxi::e#0 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#0] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::y#3 = (byte) bitmap_line_ydxi::y#6 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#1] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::x#3 = (byte) bitmap_line_ydxi::x#5 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#2] -- register_copy jmp __b1 // bitmap_line_ydxi::@1 __b1: - // [702] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 -- vbuz1=vbuz2 + // [705] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 -- vbuz1=vbuz2 lda.z x sta.z bitmap_plot.x - // [703] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 -- vbuz1=vbuz2 + // [706] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 -- vbuz1=vbuz2 lda.z y sta.z bitmap_plot.y - // [704] call bitmap_plot - // [692] phi from bitmap_line_ydxi::@1 to bitmap_plot [phi:bitmap_line_ydxi::@1->bitmap_plot] + // [707] call bitmap_plot + // [695] phi from bitmap_line_ydxi::@1 to bitmap_plot [phi:bitmap_line_ydxi::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_ydxi::@4 __b4: - // [705] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 -- vbuz1=_inc_vbuz1 + // [708] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 -- vbuz1=_inc_vbuz1 inc.z y - // [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z xd sta.z e - // [707] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -- vbuz1_ge_vbuz2_then_la1 + // [710] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z yd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_ydxi::@3 __b3: - // [708] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 -- vbuz1=_inc_vbuz1 + // [711] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 -- vbuz1=_inc_vbuz1 inc.z x - // [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z yd sta.z e - // [710] phi from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 to bitmap_line_ydxi::@2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2] + // [713] phi from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 to bitmap_line_ydxi::@2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2] __b2_from___b3: __b2_from___b4: - // [710] phi (byte) bitmap_line_ydxi::e#6 = (byte) bitmap_line_ydxi::e#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#0] -- register_copy - // [710] phi (byte) bitmap_line_ydxi::x#6 = (byte) bitmap_line_ydxi::x#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#1] -- register_copy + // [713] phi (byte) bitmap_line_ydxi::e#6 = (byte) bitmap_line_ydxi::e#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#0] -- register_copy + // [713] phi (byte) bitmap_line_ydxi::x#6 = (byte) bitmap_line_ydxi::x#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#1] -- register_copy jmp __b2 // bitmap_line_ydxi::@2 __b2: - // [711] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [714] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z y1 iny sty.z __6 - // [712] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -- vbuz1_neq_vbuz2_then_la1 + // [715] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -- vbuz1_neq_vbuz2_then_la1 lda.z y cmp.z __6 bne __b1_from___b2 jmp __breturn // bitmap_line_ydxi::@return __breturn: - // [713] return + // [716] return rts } // bitmap_line_xdyd // bitmap_line_xdyd(byte zp($72) x, byte zp($73) y, byte zp($71) x1, byte zp($70) xd, byte zp($6f) yd) bitmap_line_xdyd: { - .label __6 = $13f + .label __6 = $145 .label x = $72 .label y = $73 .label x1 = $71 .label xd = $70 .label yd = $6f .label e = $74 - // [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z yd lsr sta.z e - // [716] phi from bitmap_line_xdyd bitmap_line_xdyd::@2 to bitmap_line_xdyd::@1 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1] + // [719] phi from bitmap_line_xdyd bitmap_line_xdyd::@2 to bitmap_line_xdyd::@1 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1] __b1_from_bitmap_line_xdyd: __b1_from___b2: - // [716] phi (byte) bitmap_line_xdyd::e#3 = (byte) bitmap_line_xdyd::e#0 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#0] -- register_copy - // [716] phi (byte) bitmap_line_xdyd::y#3 = (byte) bitmap_line_xdyd::y#5 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#1] -- register_copy - // [716] phi (byte) bitmap_line_xdyd::x#3 = (byte) bitmap_line_xdyd::x#6 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#2] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::e#3 = (byte) bitmap_line_xdyd::e#0 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#0] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::y#3 = (byte) bitmap_line_xdyd::y#5 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#1] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::x#3 = (byte) bitmap_line_xdyd::x#6 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#2] -- register_copy jmp __b1 // bitmap_line_xdyd::@1 __b1: - // [717] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 -- vbuz1=vbuz2 + // [720] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 -- vbuz1=vbuz2 lda.z x sta.z bitmap_plot.x - // [718] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 -- vbuz1=vbuz2 + // [721] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 -- vbuz1=vbuz2 lda.z y sta.z bitmap_plot.y - // [719] call bitmap_plot - // [692] phi from bitmap_line_xdyd::@1 to bitmap_plot [phi:bitmap_line_xdyd::@1->bitmap_plot] + // [722] call bitmap_plot + // [695] phi from bitmap_line_xdyd::@1 to bitmap_plot [phi:bitmap_line_xdyd::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_xdyd::@4 __b4: - // [720] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 -- vbuz1=_inc_vbuz1 + // [723] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 -- vbuz1=_inc_vbuz1 inc.z x - // [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z yd sta.z e - // [722] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -- vbuz1_ge_vbuz2_then_la1 + // [725] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z xd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_xdyd::@3 __b3: - // [723] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 -- vbuz1=_dec_vbuz1 + // [726] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 -- vbuz1=_dec_vbuz1 dec.z y - // [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z xd sta.z e - // [725] phi from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 to bitmap_line_xdyd::@2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2] + // [728] phi from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 to bitmap_line_xdyd::@2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2] __b2_from___b3: __b2_from___b4: - // [725] phi (byte) bitmap_line_xdyd::e#6 = (byte) bitmap_line_xdyd::e#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#0] -- register_copy - // [725] phi (byte) bitmap_line_xdyd::y#6 = (byte) bitmap_line_xdyd::y#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#1] -- register_copy + // [728] phi (byte) bitmap_line_xdyd::e#6 = (byte) bitmap_line_xdyd::e#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#0] -- register_copy + // [728] phi (byte) bitmap_line_xdyd::y#6 = (byte) bitmap_line_xdyd::y#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#1] -- register_copy jmp __b2 // bitmap_line_xdyd::@2 __b2: - // [726] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [729] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z x1 iny sty.z __6 - // [727] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -- vbuz1_neq_vbuz2_then_la1 + // [730] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -- vbuz1_neq_vbuz2_then_la1 lda.z x cmp.z __6 bne __b1_from___b2 jmp __breturn // bitmap_line_xdyd::@return __breturn: - // [728] return + // [731] return rts } // bitmap_line_ydxd // bitmap_line_ydxd(byte zp($79) y, byte zp($78) x, byte zp($77) y1, byte zp($76) yd, byte zp($75) xd) bitmap_line_ydxd: { - .label __6 = $140 + .label __6 = $146 .label y = $79 .label x = $78 .label y1 = $77 .label yd = $76 .label xd = $75 .label e = $7a - // [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z xd lsr sta.z e - // [731] phi from bitmap_line_ydxd bitmap_line_ydxd::@2 to bitmap_line_ydxd::@1 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1] + // [734] phi from bitmap_line_ydxd bitmap_line_ydxd::@2 to bitmap_line_ydxd::@1 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1] __b1_from_bitmap_line_ydxd: __b1_from___b2: - // [731] phi (byte) bitmap_line_ydxd::e#3 = (byte) bitmap_line_ydxd::e#0 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#0] -- register_copy - // [731] phi (byte) bitmap_line_ydxd::y#2 = (byte) bitmap_line_ydxd::y#7 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#1] -- register_copy - // [731] phi (byte) bitmap_line_ydxd::x#3 = (byte) bitmap_line_ydxd::x#5 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#2] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::e#3 = (byte) bitmap_line_ydxd::e#0 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#0] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::y#2 = (byte) bitmap_line_ydxd::y#7 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#1] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::x#3 = (byte) bitmap_line_ydxd::x#5 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#2] -- register_copy jmp __b1 // bitmap_line_ydxd::@1 __b1: - // [732] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 -- vbuz1=vbuz2 + // [735] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 -- vbuz1=vbuz2 lda.z x sta.z bitmap_plot.x - // [733] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 -- vbuz1=vbuz2 + // [736] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 -- vbuz1=vbuz2 lda.z y sta.z bitmap_plot.y - // [734] call bitmap_plot - // [692] phi from bitmap_line_ydxd::@1 to bitmap_plot [phi:bitmap_line_ydxd::@1->bitmap_plot] + // [737] call bitmap_plot + // [695] phi from bitmap_line_ydxd::@1 to bitmap_plot [phi:bitmap_line_ydxd::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_ydxd::@4 __b4: - // [735] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 -- vbuz1=_inc_vbuz1 + // [738] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 -- vbuz1=_inc_vbuz1 inc.z y - // [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z xd sta.z e - // [737] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -- vbuz1_ge_vbuz2_then_la1 + // [740] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z yd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_ydxd::@3 __b3: - // [738] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 -- vbuz1=_dec_vbuz1 + // [741] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 -- vbuz1=_dec_vbuz1 dec.z x - // [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z yd sta.z e - // [740] phi from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 to bitmap_line_ydxd::@2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2] + // [743] phi from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 to bitmap_line_ydxd::@2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2] __b2_from___b3: __b2_from___b4: - // [740] phi (byte) bitmap_line_ydxd::e#6 = (byte) bitmap_line_ydxd::e#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#0] -- register_copy - // [740] phi (byte) bitmap_line_ydxd::x#6 = (byte) bitmap_line_ydxd::x#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#1] -- register_copy + // [743] phi (byte) bitmap_line_ydxd::e#6 = (byte) bitmap_line_ydxd::e#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#0] -- register_copy + // [743] phi (byte) bitmap_line_ydxd::x#6 = (byte) bitmap_line_ydxd::x#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#1] -- register_copy jmp __b2 // bitmap_line_ydxd::@2 __b2: - // [741] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [744] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z y1 iny sty.z __6 - // [742] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -- vbuz1_neq_vbuz2_then_la1 + // [745] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -- vbuz1_neq_vbuz2_then_la1 lda.z y cmp.z __6 bne __b1_from___b2 jmp __breturn // bitmap_line_ydxd::@return __breturn: - // [743] return + // [746] return rts } // bitmap_clear // Clear all graphics on the bitmap bitmap_clear: { - .label bitmap = $141 + .label bitmap = $147 .label bitmap_1 = $7c .label x = $7e .label y = $7b - // [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 + // [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 lda bitmap_plot_xlo sta.z bitmap lda bitmap_plot_xhi sta.z bitmap+1 - // [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 -- pbuz1=pbuz2 + // [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 -- pbuz1=pbuz2 lda.z bitmap sta.z bitmap_1 lda.z bitmap+1 sta.z bitmap_1+1 - // [746] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + // [749] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] __b1_from_bitmap_clear: - // [746] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 + // [749] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [746] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy + // [749] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy jmp __b1 - // [746] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] + // [749] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] __b1_from___b3: - // [746] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy - // [746] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy + // [749] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy + // [749] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy jmp __b1 // bitmap_clear::@1 __b1: - // [747] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] + // [750] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] __b2_from___b1: - // [747] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuz1=vbuc1 + // [750] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuz1=vbuc1 lda #0 sta.z x - // [747] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy + // [750] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy jmp __b2 - // [747] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] + // [750] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] __b2_from___b2: - // [747] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy - // [747] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy + // [750] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy + // [750] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy jmp __b2 // bitmap_clear::@2 __b2: - // [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (bitmap_1),y - // [749] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 + // [752] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 inc.z bitmap_1 bne !+ inc.z bitmap_1+1 !: - // [750] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuz1=_inc_vbuz1 + // [753] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuz1=_inc_vbuz1 inc.z x - // [751] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuz1_neq_vbuc1_then_la1 + // [754] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z x bne __b2_from___b2 jmp __b3 // bitmap_clear::@3 __b3: - // [752] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 + // [755] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 inc.z y - // [753] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 + // [756] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z y bne __b1_from___b3 jmp __breturn // bitmap_clear::@return __breturn: - // [754] return + // [757] return rts } // bitmap_init // Initialize the bitmap plotter tables for a specific bitmap bitmap_init: { - .label __0 = $143 - .label __7 = $145 - .label __8 = $146 - .label __9 = $147 - .label __10 = $144 + .label __0 = $149 + .label __7 = $14b + .label __8 = $14c + .label __9 = $14d + .label __10 = $14a .label bits = $80 .label x = $7f .label y = $81 .label yoffs = $82 - // [756] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [759] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] __b1_from_bitmap_init: - // [756] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 + // [759] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#0] -- vbuz1=vbuc1 lda #$80 sta.z bits - // [756] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 + // [759] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#1] -- vbuz1=vbuc1 lda #0 sta.z x jmp __b1 - // [756] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [759] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] __b1_from___b2: - // [756] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [756] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [759] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [759] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp __b1 // bitmap_init::@1 __b1: - // [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 -- vbuz1=vbuz2_band_vbuc1 + // [760] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 -- vbuz1=vbuz2_band_vbuc1 lda #$f8 and.z x sta.z __0 - // [758] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [761] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __0 ldy.z x sta bitmap_plot_xlo,y - // [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP -- pbuc1_derefidx_vbuz1=vbuc2 + // [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP -- pbuc1_derefidx_vbuz1=vbuc2 lda #>VIC_BITMAP ldy.z x sta bitmap_plot_xhi,y - // [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 + // [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z bits ldy.z x sta bitmap_plot_bit,y - // [761] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + // [764] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr.z bits - // [762] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 + // [765] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuz1_neq_0_then_la1 lda.z bits cmp #0 bne __b6_from___b1 - // [764] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [767] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] __b2_from___b1: - // [764] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 + // [767] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuz1=vbuc1 lda #$80 sta.z bits jmp __b2 - // [763] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [766] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] __b6_from___b1: jmp __b6 // bitmap_init::@6 __b6: - // [764] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [767] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] __b2_from___b6: - // [764] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [767] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp __b2 // bitmap_init::@2 __b2: - // [765] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 + // [768] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuz1=_inc_vbuz1 inc.z x - // [766] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 + // [769] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuz1_neq_0_then_la1 lda.z x cmp #0 bne __b1_from___b2 - // [767] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [770] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] __b3_from___b2: - // [767] phi (byte*) bitmap_init::yoffs#2 = (byte*) 0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [770] phi (byte*) bitmap_init::yoffs#2 = (byte*) 0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<0 sta.z yoffs lda #>0 sta.z yoffs+1 - // [767] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 + // [770] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuz1=vbuc1 lda #0 sta.z y jmp __b3 - // [767] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [770] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] __b3_from___b4: - // [767] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [767] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [770] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [770] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp __b3 // bitmap_init::@3 __b3: - // [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [771] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z y sta.z __10 - // [769] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 + // [772] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 -- vbuz1=_lo_pbuz2 lda.z yoffs sta.z __7 - // [770] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 -- vbuz1=vbuz2_bor_vbuz3 + // [773] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 -- vbuz1=vbuz2_bor_vbuz3 lda.z __10 ora.z __7 sta.z __8 - // [771] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 -- pbuc1_derefidx_vbuz1=vbuz2 + // [774] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __8 ldy.z y sta bitmap_plot_ylo,y - // [772] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 + // [775] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 -- vbuz1=_hi_pbuz2 lda.z yoffs+1 sta.z __9 - // [773] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 -- pbuc1_derefidx_vbuz1=vbuz2 + // [776] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z __9 ldy.z y sta bitmap_plot_yhi,y - // [774] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [777] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __10 bne __b4_from___b3 jmp __b5 // bitmap_init::@5 __b5: - // [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda.z yoffs adc #<$28*8 @@ -18446,23 +18472,23 @@ bitmap_init: { lda.z yoffs+1 adc #>$28*8 sta.z yoffs+1 - // [776] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [779] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] __b4_from___b3: __b4_from___b5: - // [776] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [779] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp __b4 // bitmap_init::@4 __b4: - // [777] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 + // [780] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuz1=_inc_vbuz1 inc.z y - // [778] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 + // [781] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuz1_neq_0_then_la1 lda.z y cmp #0 bne __b3_from___b4 jmp __breturn // bitmap_init::@return __breturn: - // [779] return + // [782] return rts } // gfx_init_charset @@ -18471,89 +18497,89 @@ gfx_init_charset: { .label chargen = $85 .label l = $89 .label c = $84 - // [780] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 + // [783] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 lda #$32 sta PROCPORT - // [781] phi from gfx_init_charset to gfx_init_charset::@1 [phi:gfx_init_charset->gfx_init_charset::@1] + // [784] phi from gfx_init_charset to gfx_init_charset::@1 [phi:gfx_init_charset->gfx_init_charset::@1] __b1_from_gfx_init_charset: - // [781] phi (byte) gfx_init_charset::c#4 = (byte) 0 [phi:gfx_init_charset->gfx_init_charset::@1#0] -- vbuz1=vbuc1 + // [784] phi (byte) gfx_init_charset::c#4 = (byte) 0 [phi:gfx_init_charset->gfx_init_charset::@1#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [781] phi (byte*) gfx_init_charset::charset#3 = (const byte*) VIC_CHARSET_ROM [phi:gfx_init_charset->gfx_init_charset::@1#1] -- pbuz1=pbuc1 + // [784] phi (byte*) gfx_init_charset::charset#3 = (const byte*) VIC_CHARSET_ROM [phi:gfx_init_charset->gfx_init_charset::@1#1] -- pbuz1=pbuc1 lda #VIC_CHARSET_ROM sta.z charset+1 - // [781] phi (byte*) gfx_init_charset::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_charset->gfx_init_charset::@1#2] -- pbuz1=pbuc1 + // [784] phi (byte*) gfx_init_charset::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_charset->gfx_init_charset::@1#2] -- pbuz1=pbuc1 lda #CHARGEN sta.z chargen+1 jmp __b1 - // [781] phi from gfx_init_charset::@3 to gfx_init_charset::@1 [phi:gfx_init_charset::@3->gfx_init_charset::@1] + // [784] phi from gfx_init_charset::@3 to gfx_init_charset::@1 [phi:gfx_init_charset::@3->gfx_init_charset::@1] __b1_from___b3: - // [781] phi (byte) gfx_init_charset::c#4 = (byte) gfx_init_charset::c#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#0] -- register_copy - // [781] phi (byte*) gfx_init_charset::charset#3 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#1] -- register_copy - // [781] phi (byte*) gfx_init_charset::chargen#3 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#2] -- register_copy + // [784] phi (byte) gfx_init_charset::c#4 = (byte) gfx_init_charset::c#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#0] -- register_copy + // [784] phi (byte*) gfx_init_charset::charset#3 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#1] -- register_copy + // [784] phi (byte*) gfx_init_charset::chargen#3 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#2] -- register_copy jmp __b1 // gfx_init_charset::@1 __b1: - // [782] phi from gfx_init_charset::@1 to gfx_init_charset::@2 [phi:gfx_init_charset::@1->gfx_init_charset::@2] + // [785] phi from gfx_init_charset::@1 to gfx_init_charset::@2 [phi:gfx_init_charset::@1->gfx_init_charset::@2] __b2_from___b1: - // [782] phi (byte) gfx_init_charset::l#2 = (byte) 0 [phi:gfx_init_charset::@1->gfx_init_charset::@2#0] -- vbuz1=vbuc1 + // [785] phi (byte) gfx_init_charset::l#2 = (byte) 0 [phi:gfx_init_charset::@1->gfx_init_charset::@2#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [782] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#1] -- register_copy - // [782] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#2] -- register_copy + // [785] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#1] -- register_copy + // [785] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#2] -- register_copy jmp __b2 - // [782] phi from gfx_init_charset::@2 to gfx_init_charset::@2 [phi:gfx_init_charset::@2->gfx_init_charset::@2] + // [785] phi from gfx_init_charset::@2 to gfx_init_charset::@2 [phi:gfx_init_charset::@2->gfx_init_charset::@2] __b2_from___b2: - // [782] phi (byte) gfx_init_charset::l#2 = (byte) gfx_init_charset::l#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#0] -- register_copy - // [782] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#1] -- register_copy - // [782] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#2] -- register_copy + // [785] phi (byte) gfx_init_charset::l#2 = (byte) gfx_init_charset::l#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#0] -- register_copy + // [785] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#1] -- register_copy + // [785] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#2] -- register_copy jmp __b2 // gfx_init_charset::@2 __b2: - // [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) -- _deref_pbuz1=_deref_pbuz2 + // [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (chargen),y ldy #0 sta (charset),y - // [784] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 -- pbuz1=_inc_pbuz1 + // [787] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 -- pbuz1=_inc_pbuz1 inc.z charset bne !+ inc.z charset+1 !: - // [785] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 -- pbuz1=_inc_pbuz1 + // [788] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 -- pbuz1=_inc_pbuz1 inc.z chargen bne !+ inc.z chargen+1 !: - // [786] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 -- vbuz1=_inc_vbuz1 + // [789] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 -- vbuz1=_inc_vbuz1 inc.z l - // [787] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 -- vbuz1_neq_vbuc1_then_la1 + // [790] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z l bne __b2_from___b2 jmp __b3 // gfx_init_charset::@3 __b3: - // [788] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 -- vbuz1=_inc_vbuz1 + // [791] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 -- vbuz1=_inc_vbuz1 inc.z c - // [789] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 -- vbuz1_neq_0_then_la1 + // [792] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 -- vbuz1_neq_0_then_la1 lda.z c cmp #0 bne __b1_from___b3 jmp __b4 // gfx_init_charset::@4 __b4: - // [790] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 + // [793] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 lda #$37 sta PROCPORT jmp __breturn // gfx_init_charset::@return __breturn: - // [791] return + // [794] return rts } // gfx_init_screen4 @@ -18562,442 +18588,442 @@ gfx_init_screen4: { .label ch = $8b .label cx = $8d .label cy = $8a - // [793] phi from gfx_init_screen4 to gfx_init_screen4::@1 [phi:gfx_init_screen4->gfx_init_screen4::@1] + // [796] phi from gfx_init_screen4 to gfx_init_screen4::@1 [phi:gfx_init_screen4->gfx_init_screen4::@1] __b1_from_gfx_init_screen4: - // [793] phi (byte) gfx_init_screen4::cy#4 = (byte) 0 [phi:gfx_init_screen4->gfx_init_screen4::@1#0] -- vbuz1=vbuc1 + // [796] phi (byte) gfx_init_screen4::cy#4 = (byte) 0 [phi:gfx_init_screen4->gfx_init_screen4::@1#0] -- vbuz1=vbuc1 lda #0 sta.z cy - // [793] phi (byte*) gfx_init_screen4::ch#3 = (const byte*) VIC_SCREEN4 [phi:gfx_init_screen4->gfx_init_screen4::@1#1] -- pbuz1=pbuc1 + // [796] phi (byte*) gfx_init_screen4::ch#3 = (const byte*) VIC_SCREEN4 [phi:gfx_init_screen4->gfx_init_screen4::@1#1] -- pbuz1=pbuc1 lda #VIC_SCREEN4 sta.z ch+1 jmp __b1 - // [793] phi from gfx_init_screen4::@3 to gfx_init_screen4::@1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1] + // [796] phi from gfx_init_screen4::@3 to gfx_init_screen4::@1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1] __b1_from___b3: - // [793] phi (byte) gfx_init_screen4::cy#4 = (byte) gfx_init_screen4::cy#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#0] -- register_copy - // [793] phi (byte*) gfx_init_screen4::ch#3 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#1] -- register_copy + // [796] phi (byte) gfx_init_screen4::cy#4 = (byte) gfx_init_screen4::cy#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#0] -- register_copy + // [796] phi (byte*) gfx_init_screen4::ch#3 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#1] -- register_copy jmp __b1 // gfx_init_screen4::@1 __b1: - // [794] phi from gfx_init_screen4::@1 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2] + // [797] phi from gfx_init_screen4::@1 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2] __b2_from___b1: - // [794] phi (byte) gfx_init_screen4::cx#2 = (byte) 0 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#0] -- vbuz1=vbuc1 + // [797] phi (byte) gfx_init_screen4::cx#2 = (byte) 0 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#0] -- vbuz1=vbuc1 lda #0 sta.z cx - // [794] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#3 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#1] -- register_copy + // [797] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#3 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#1] -- register_copy jmp __b2 - // [794] phi from gfx_init_screen4::@2 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2] + // [797] phi from gfx_init_screen4::@2 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2] __b2_from___b2: - // [794] phi (byte) gfx_init_screen4::cx#2 = (byte) gfx_init_screen4::cx#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#0] -- register_copy - // [794] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#1] -- register_copy + // [797] phi (byte) gfx_init_screen4::cx#2 = (byte) gfx_init_screen4::cx#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#0] -- register_copy + // [797] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#1] -- register_copy jmp __b2 // gfx_init_screen4::@2 __b2: - // [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (ch),y - // [796] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 -- pbuz1=_inc_pbuz1 + // [799] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [797] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 -- vbuz1=_inc_vbuz1 + // [800] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 -- vbuz1=_inc_vbuz1 inc.z cx - // [798] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 -- vbuz1_neq_vbuc1_then_la1 + // [801] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z cx bne __b2_from___b2 jmp __b3 // gfx_init_screen4::@3 __b3: - // [799] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 -- vbuz1=_inc_vbuz1 + // [802] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [800] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 -- vbuz1_neq_vbuc1_then_la1 + // [803] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen4::@return __breturn: - // [801] return + // [804] return rts } // gfx_init_screen3 // Initialize VIC screen 3 ( value is %00xx00yy where xx is xpos and yy is ypos gfx_init_screen3: { - .label __0 = $148 - .label __1 = $149 - .label __2 = $14a - .label __3 = $14b + .label __0 = $14e + .label __1 = $14f + .label __2 = $150 + .label __3 = $151 .label ch = $90 .label cx = $8f .label cy = $8e - // [803] phi from gfx_init_screen3 to gfx_init_screen3::@1 [phi:gfx_init_screen3->gfx_init_screen3::@1] + // [806] phi from gfx_init_screen3 to gfx_init_screen3::@1 [phi:gfx_init_screen3->gfx_init_screen3::@1] __b1_from_gfx_init_screen3: - // [803] phi (byte*) gfx_init_screen3::ch#3 = (const byte*) VIC_SCREEN3 [phi:gfx_init_screen3->gfx_init_screen3::@1#0] -- pbuz1=pbuc1 + // [806] phi (byte*) gfx_init_screen3::ch#3 = (const byte*) VIC_SCREEN3 [phi:gfx_init_screen3->gfx_init_screen3::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN3 sta.z ch+1 - // [803] phi (byte) gfx_init_screen3::cy#4 = (byte) 0 [phi:gfx_init_screen3->gfx_init_screen3::@1#1] -- vbuz1=vbuc1 + // [806] phi (byte) gfx_init_screen3::cy#4 = (byte) 0 [phi:gfx_init_screen3->gfx_init_screen3::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [803] phi from gfx_init_screen3::@3 to gfx_init_screen3::@1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1] + // [806] phi from gfx_init_screen3::@3 to gfx_init_screen3::@1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1] __b1_from___b3: - // [803] phi (byte*) gfx_init_screen3::ch#3 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#0] -- register_copy - // [803] phi (byte) gfx_init_screen3::cy#4 = (byte) gfx_init_screen3::cy#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#1] -- register_copy + // [806] phi (byte*) gfx_init_screen3::ch#3 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#0] -- register_copy + // [806] phi (byte) gfx_init_screen3::cy#4 = (byte) gfx_init_screen3::cy#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#1] -- register_copy jmp __b1 // gfx_init_screen3::@1 __b1: - // [804] phi from gfx_init_screen3::@1 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2] + // [807] phi from gfx_init_screen3::@1 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2] __b2_from___b1: - // [804] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#3 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#0] -- register_copy - // [804] phi (byte) gfx_init_screen3::cx#2 = (byte) 0 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#1] -- vbuz1=vbuc1 + // [807] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#3 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#0] -- register_copy + // [807] phi (byte) gfx_init_screen3::cx#2 = (byte) 0 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#1] -- vbuz1=vbuc1 lda #0 sta.z cx jmp __b2 - // [804] phi from gfx_init_screen3::@2 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2] + // [807] phi from gfx_init_screen3::@2 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2] __b2_from___b2: - // [804] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#0] -- register_copy - // [804] phi (byte) gfx_init_screen3::cx#2 = (byte) gfx_init_screen3::cx#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#1] -- register_copy + // [807] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#0] -- register_copy + // [807] phi (byte) gfx_init_screen3::cx#2 = (byte) gfx_init_screen3::cx#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#1] -- register_copy jmp __b2 // gfx_init_screen3::@2 __b2: - // [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 + // [808] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 lda #3 and.z cx sta.z __0 - // [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 -- vbuz1=vbuz2_rol_4 + // [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 -- vbuz1=vbuz2_rol_4 lda.z __0 asl asl asl asl sta.z __1 - // [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 + // [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 -- vbuz1=vbuz2_band_vbuc1 lda #3 and.z cy sta.z __2 - // [808] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 -- vbuz1=vbuz2_bor_vbuz3 + // [811] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 -- vbuz1=vbuz2_bor_vbuz3 lda.z __1 ora.z __2 sta.z __3 - // [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 -- _deref_pbuz1=vbuz2 + // [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 -- _deref_pbuz1=vbuz2 lda.z __3 ldy #0 sta (ch),y - // [810] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 -- pbuz1=_inc_pbuz1 + // [813] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [811] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 -- vbuz1=_inc_vbuz1 + // [814] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 -- vbuz1=_inc_vbuz1 inc.z cx - // [812] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 -- vbuz1_neq_vbuc1_then_la1 + // [815] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z cx bne __b2_from___b2 jmp __b3 // gfx_init_screen3::@3 __b3: - // [813] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 -- vbuz1=_inc_vbuz1 + // [816] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [814] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 -- vbuz1_neq_vbuc1_then_la1 + // [817] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen3::@return __breturn: - // [815] return + // [818] return rts } // gfx_init_screen2 // Initialize VIC screen 2 ( value is %ccccrrrr where cccc is (x+y mod $f) and rrrr is %1111-%cccc) gfx_init_screen2: { - .label __0 = $14c - .label __3 = $14f - .label __4 = $150 - .label col = $14d - .label col2 = $14e + .label __0 = $152 + .label __3 = $155 + .label __4 = $156 + .label col = $153 + .label col2 = $154 .label ch = $94 .label cx = $93 .label cy = $92 - // [817] phi from gfx_init_screen2 to gfx_init_screen2::@1 [phi:gfx_init_screen2->gfx_init_screen2::@1] + // [820] phi from gfx_init_screen2 to gfx_init_screen2::@1 [phi:gfx_init_screen2->gfx_init_screen2::@1] __b1_from_gfx_init_screen2: - // [817] phi (byte*) gfx_init_screen2::ch#3 = (const byte*) VIC_SCREEN2 [phi:gfx_init_screen2->gfx_init_screen2::@1#0] -- pbuz1=pbuc1 + // [820] phi (byte*) gfx_init_screen2::ch#3 = (const byte*) VIC_SCREEN2 [phi:gfx_init_screen2->gfx_init_screen2::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN2 sta.z ch+1 - // [817] phi (byte) gfx_init_screen2::cy#4 = (byte) 0 [phi:gfx_init_screen2->gfx_init_screen2::@1#1] -- vbuz1=vbuc1 + // [820] phi (byte) gfx_init_screen2::cy#4 = (byte) 0 [phi:gfx_init_screen2->gfx_init_screen2::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [817] phi from gfx_init_screen2::@3 to gfx_init_screen2::@1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1] + // [820] phi from gfx_init_screen2::@3 to gfx_init_screen2::@1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1] __b1_from___b3: - // [817] phi (byte*) gfx_init_screen2::ch#3 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#0] -- register_copy - // [817] phi (byte) gfx_init_screen2::cy#4 = (byte) gfx_init_screen2::cy#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#1] -- register_copy + // [820] phi (byte*) gfx_init_screen2::ch#3 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#0] -- register_copy + // [820] phi (byte) gfx_init_screen2::cy#4 = (byte) gfx_init_screen2::cy#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#1] -- register_copy jmp __b1 // gfx_init_screen2::@1 __b1: - // [818] phi from gfx_init_screen2::@1 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2] + // [821] phi from gfx_init_screen2::@1 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2] __b2_from___b1: - // [818] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#3 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#0] -- register_copy - // [818] phi (byte) gfx_init_screen2::cx#2 = (byte) 0 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#1] -- vbuz1=vbuc1 + // [821] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#3 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#0] -- register_copy + // [821] phi (byte) gfx_init_screen2::cx#2 = (byte) 0 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#1] -- vbuz1=vbuc1 lda #0 sta.z cx jmp __b2 - // [818] phi from gfx_init_screen2::@2 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2] + // [821] phi from gfx_init_screen2::@2 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2] __b2_from___b2: - // [818] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#0] -- register_copy - // [818] phi (byte) gfx_init_screen2::cx#2 = (byte) gfx_init_screen2::cx#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#1] -- register_copy + // [821] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#0] -- register_copy + // [821] phi (byte) gfx_init_screen2::cx#2 = (byte) gfx_init_screen2::cx#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#1] -- register_copy jmp __b2 // gfx_init_screen2::@2 __b2: - // [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 -- vbuz1=vbuz2_plus_vbuz3 + // [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 -- vbuz1=vbuz2_plus_vbuz3 lda.z cx clc adc.z cy sta.z __0 - // [820] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [823] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and.z __0 sta.z col - // [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 -- vbuz1=vbuc1_minus_vbuz2 + // [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 -- vbuz1=vbuc1_minus_vbuz2 lda #$f sec sbc.z col sta.z col2 - // [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 -- vbuz1=vbuz2_rol_4 + // [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 -- vbuz1=vbuz2_rol_4 lda.z col asl asl asl asl sta.z __3 - // [823] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 -- vbuz1=vbuz2_bor_vbuz3 + // [826] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 -- vbuz1=vbuz2_bor_vbuz3 lda.z __3 ora.z col2 sta.z __4 - // [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 -- _deref_pbuz1=vbuz2 + // [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 -- _deref_pbuz1=vbuz2 lda.z __4 ldy #0 sta (ch),y - // [825] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 -- pbuz1=_inc_pbuz1 + // [828] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [826] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 -- vbuz1=_inc_vbuz1 + // [829] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 -- vbuz1=_inc_vbuz1 inc.z cx - // [827] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 -- vbuz1_neq_vbuc1_then_la1 + // [830] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z cx bne __b2_from___b2 jmp __b3 // gfx_init_screen2::@3 __b3: - // [828] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 -- vbuz1=_inc_vbuz1 + // [831] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [829] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 -- vbuz1_neq_vbuc1_then_la1 + // [832] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen2::@return __breturn: - // [830] return + // [833] return rts } // gfx_init_screen1 // Initialize VIC screen 1 ( value is %0000cccc where cccc is (x+y mod $f)) gfx_init_screen1: { - .label __0 = $151 - .label __1 = $152 + .label __0 = $157 + .label __1 = $158 .label ch = $98 .label cx = $97 .label cy = $96 - // [832] phi from gfx_init_screen1 to gfx_init_screen1::@1 [phi:gfx_init_screen1->gfx_init_screen1::@1] + // [835] phi from gfx_init_screen1 to gfx_init_screen1::@1 [phi:gfx_init_screen1->gfx_init_screen1::@1] __b1_from_gfx_init_screen1: - // [832] phi (byte*) gfx_init_screen1::ch#3 = (const byte*) VIC_SCREEN1 [phi:gfx_init_screen1->gfx_init_screen1::@1#0] -- pbuz1=pbuc1 + // [835] phi (byte*) gfx_init_screen1::ch#3 = (const byte*) VIC_SCREEN1 [phi:gfx_init_screen1->gfx_init_screen1::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN1 sta.z ch+1 - // [832] phi (byte) gfx_init_screen1::cy#4 = (byte) 0 [phi:gfx_init_screen1->gfx_init_screen1::@1#1] -- vbuz1=vbuc1 + // [835] phi (byte) gfx_init_screen1::cy#4 = (byte) 0 [phi:gfx_init_screen1->gfx_init_screen1::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [832] phi from gfx_init_screen1::@3 to gfx_init_screen1::@1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1] + // [835] phi from gfx_init_screen1::@3 to gfx_init_screen1::@1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1] __b1_from___b3: - // [832] phi (byte*) gfx_init_screen1::ch#3 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#0] -- register_copy - // [832] phi (byte) gfx_init_screen1::cy#4 = (byte) gfx_init_screen1::cy#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#1] -- register_copy + // [835] phi (byte*) gfx_init_screen1::ch#3 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#0] -- register_copy + // [835] phi (byte) gfx_init_screen1::cy#4 = (byte) gfx_init_screen1::cy#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#1] -- register_copy jmp __b1 // gfx_init_screen1::@1 __b1: - // [833] phi from gfx_init_screen1::@1 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2] + // [836] phi from gfx_init_screen1::@1 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2] __b2_from___b1: - // [833] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#3 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#0] -- register_copy - // [833] phi (byte) gfx_init_screen1::cx#2 = (byte) 0 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#1] -- vbuz1=vbuc1 + // [836] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#3 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#0] -- register_copy + // [836] phi (byte) gfx_init_screen1::cx#2 = (byte) 0 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#1] -- vbuz1=vbuc1 lda #0 sta.z cx jmp __b2 - // [833] phi from gfx_init_screen1::@2 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2] + // [836] phi from gfx_init_screen1::@2 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2] __b2_from___b2: - // [833] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#0] -- register_copy - // [833] phi (byte) gfx_init_screen1::cx#2 = (byte) gfx_init_screen1::cx#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#1] -- register_copy + // [836] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#0] -- register_copy + // [836] phi (byte) gfx_init_screen1::cx#2 = (byte) gfx_init_screen1::cx#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#1] -- register_copy jmp __b2 // gfx_init_screen1::@2 __b2: - // [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 -- vbuz1=vbuz2_plus_vbuz3 + // [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 -- vbuz1=vbuz2_plus_vbuz3 lda.z cx clc adc.z cy sta.z __0 - // [835] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [838] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and.z __0 sta.z __1 - // [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 -- _deref_pbuz1=vbuz2 + // [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 -- _deref_pbuz1=vbuz2 lda.z __1 ldy #0 sta (ch),y - // [837] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 -- pbuz1=_inc_pbuz1 + // [840] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [838] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 -- vbuz1=_inc_vbuz1 + // [841] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 -- vbuz1=_inc_vbuz1 inc.z cx - // [839] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 -- vbuz1_neq_vbuc1_then_la1 + // [842] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z cx bne __b2_from___b2 jmp __b3 // gfx_init_screen1::@3 __b3: - // [840] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 -- vbuz1=_inc_vbuz1 + // [843] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [841] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 -- vbuz1_neq_vbuc1_then_la1 + // [844] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen1::@return __breturn: - // [842] return + // [845] return rts } // gfx_init_screen0 // Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) gfx_init_screen0: { - .label __0 = $153 - .label __1 = $154 - .label __2 = $155 - .label __3 = $156 + .label __0 = $159 + .label __1 = $15a + .label __2 = $15b + .label __3 = $15c .label ch = $9c .label cx = $9b .label cy = $9a - // [844] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] + // [847] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] __b1_from_gfx_init_screen0: - // [844] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) VIC_SCREEN0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 + // [847] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) VIC_SCREEN0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN0 sta.z ch+1 - // [844] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 + // [847] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [844] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] + // [847] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] __b1_from___b3: - // [844] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy - // [844] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy + // [847] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy + // [847] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy jmp __b1 // gfx_init_screen0::@1 __b1: - // [845] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] + // [848] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] __b2_from___b1: - // [845] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy - // [845] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuz1=vbuc1 + // [848] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy + // [848] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuz1=vbuc1 lda #0 sta.z cx jmp __b2 - // [845] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] + // [848] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] __b2_from___b2: - // [845] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy - // [845] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy + // [848] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy + // [848] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy jmp __b2 // gfx_init_screen0::@2 __b2: - // [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [849] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and.z cy sta.z __0 - // [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuz2_rol_4 + // [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuz2_rol_4 lda.z __0 asl asl asl asl sta.z __1 - // [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and.z cx sta.z __2 - // [849] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuz1=vbuz2_bor_vbuz3 + // [852] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuz1=vbuz2_bor_vbuz3 lda.z __1 ora.z __2 sta.z __3 - // [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuz2 + // [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuz2 lda.z __3 ldy #0 sta (ch),y - // [851] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 + // [854] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [852] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuz1=_inc_vbuz1 + // [855] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuz1=_inc_vbuz1 inc.z cx - // [853] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuz1_neq_vbuc1_then_la1 + // [856] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z cx bne __b2_from___b2 jmp __b3 // gfx_init_screen0::@3 __b3: - // [854] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 + // [857] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [855] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 + // [858] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen0::@return __breturn: - // [856] return + // [859] return rts } // keyboard_init // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { - // [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR - // [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR jmp __breturn // keyboard_init::@return __breturn: - // [859] return + // [862] return rts } // File Data @@ -19057,7 +19083,7 @@ keyboard_init: { form_line_hi: .fill $19, 0 REGISTER UPLIFT POTENTIAL REGISTERS -Equivalence Class zp[1]:325 [ bitmap_init::$7 ] has ALU potential. +Equivalence Class zp[1]:331 [ bitmap_init::$7 ] has ALU potential. Statement [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] ) always clobbers reg byte a @@ -19149,29 +19175,28 @@ Statement [134] if(*((const byte*) form_dtv_palet)==(byte) 0) goto gfx_mode::@24 Statement [139] if(*((const byte*) RASTER)!=(byte) $ff) goto gfx_mode::@25 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a Statement [149] *((const byte*) DTV_PALETTE + (byte) gfx_mode::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) gfx_mode::i#2) [ keyboard_events_size#24 gfx_mode::i#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::i#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:12 [ gfx_mode::i#2 gfx_mode::i#1 ] -Statement [164] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a +Statement [164] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Removing always clobbered register reg byte a as potential for zp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:265 [ form_field_ptr::x#0 ] -Statement [179] (byte) keyboard_modifiers#3 ← (byte) keyboard_modifiers#18 | (const byte) KEY_MODIFIER_RSHIFT [ keyboard_events_size#100 keyboard_modifiers#3 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#3 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#3 ] ) always clobbers reg byte a -Statement [185] (byte) keyboard_modifiers#4 ← (byte) keyboard_modifiers#19 | (const byte) KEY_MODIFIER_CTRL [ keyboard_events_size#100 keyboard_modifiers#4 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#4 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#4 ] ) always clobbers reg byte a -Statement [191] (byte) keyboard_modifiers#5 ← (byte) keyboard_modifiers#20 | (const byte) KEY_MODIFIER_COMMODORE [ keyboard_events_size#100 keyboard_modifiers#5 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#5 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#5 ] ) always clobbers reg byte a -Statement [195] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [179] (byte) keyboard_modifiers#3 ← (byte) keyboard_modifiers#18 | (const byte) KEY_MODIFIER_RSHIFT [ keyboard_events_size#100 keyboard_modifiers#3 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#3 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#3 ] ) always clobbers reg byte a +Statement [185] (byte) keyboard_modifiers#4 ← (byte) keyboard_modifiers#19 | (const byte) KEY_MODIFIER_CTRL [ keyboard_events_size#100 keyboard_modifiers#4 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#4 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#4 ] ) always clobbers reg byte a +Statement [191] (byte) keyboard_modifiers#5 ← (byte) keyboard_modifiers#20 | (const byte) KEY_MODIFIER_COMMODORE [ keyboard_events_size#100 keyboard_modifiers#5 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#5 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#5 ] ) always clobbers reg byte a +Statement [195] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:241 [ keyboard_event_scan::row_scan#0 ] Removing always clobbered register reg byte a as potential for zp[1]:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Removing always clobbered register reg byte a as potential for zp[1]:17 [ 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 ] -Statement [199] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [201] *((const byte*) keyboard_events + (byte) keyboard_events_size#18) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ) always clobbers reg byte a -Statement [207] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ) always clobbers reg byte a -Statement [208] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [199] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [201] *((const byte*) keyboard_events + (byte) keyboard_events_size#18) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ) always clobbers reg byte a +Statement [207] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ) always clobbers reg byte a +Statement [208] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:19 [ keyboard_event_pressed::keycode#4 ] Removing always clobbered register reg byte a as potential for zp[1]:15 [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] -Statement [214] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#4 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [214] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#4 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] -Statement [215] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#10 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] ) always clobbers reg byte a -Statement [217] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] ) always clobbers reg byte a -Statement [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [215] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#10 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] ) always clobbers reg byte a +Statement [217] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] ) always clobbers reg byte a +Statement [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a Statement [270] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a Statement [271] *((const byte*) DTV_COLOR_BANK_LO) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a Statement [272] *((const byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a @@ -19195,47 +19220,53 @@ Removing always clobbered register reg byte y as potential for zp[1]:33 [ form_m Statement [325] *((byte*) print_str_at::at#2) ← *((byte*) print_str_at::str#2) [ print_str_at::str#2 print_str_at::at#2 ] ( main:2::form_mode:13::render_preset_name:269::print_str_at:319 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#2 print_str_at::at#2 ] main:2::form_mode:13::render_preset_name:303::print_str_at:319 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#2 print_str_at::at#2 ] ) always clobbers reg byte a reg byte y Statement [334] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_render_values::idx#2)) [ form_render_values::idx#2 ] ( main:2::form_mode:13::form_render_values:267 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 ] main:2::form_mode:13::form_render_values:301 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:41 [ form_render_values::idx#2 form_render_values::idx#1 ] -Statement [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [ form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_control:292::form_field_ptr:360 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ) always clobbers reg byte a +Statement [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [ form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_control:292::form_field_ptr:361 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:42 [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] -Statement [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [ apply_preset::preset#15 apply_preset::i#2 ] ( main:2::form_mode:13::apply_preset:299 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 apply_preset::preset#15 apply_preset::i#2 ] ) always clobbers reg byte a +Statement [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 [ form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] main:2::form_mode:13::form_control:292::form_field_ptr:361 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:265 [ form_field_ptr::x#0 ] +Statement [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [ apply_preset::preset#15 apply_preset::i#2 ] ( main:2::form_mode:13::apply_preset:299 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 apply_preset::preset#15 apply_preset::i#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:45 [ apply_preset::i#2 apply_preset::i#1 ] -Statement [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$12 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$12 ] ) always clobbers reg byte a -Statement [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_control::$14 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_control::$14 ] ) always clobbers reg byte a -Statement [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ) always clobbers reg byte a -Statement [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$22 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$22 ] ) always clobbers reg byte a -Statement [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) [ keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp[1]:265 [ form_field_ptr::x#0 ] -Statement [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$13 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$13 ] ) always clobbers reg byte a reg byte y -Statement [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte y -Statement [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::form_mode:13::form_set_screen:265 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_set_screen::y#2 form_set_screen::line#1 ] ) always clobbers reg byte a +Statement [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 [ keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::return#3 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::return#3 ] ) always clobbers reg byte a +Statement [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 [ keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_control::field#0 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_control::field#0 ] ) always clobbers reg byte a +Statement [368] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [369] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$12 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$12 ] ) always clobbers reg byte a reg byte y +Statement [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte y +Statement [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_control::field#0 form_control::$14 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_control::field#0 form_control::$14 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:15 [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] +Statement [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ) always clobbers reg byte y +Statement [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ) always clobbers reg byte a +Statement [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$22 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$22 ] ) always clobbers reg byte a +Statement [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) [ keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y +Statement [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y +Statement [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$13 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$13 ] ) always clobbers reg byte a reg byte y +Statement [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte y +Statement [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::form_mode:13::form_set_screen:265 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_set_screen::y#2 form_set_screen::line#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:49 [ form_set_screen::y#2 form_set_screen::y#1 ] -Statement [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ) always clobbers reg byte a -Statement [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte a reg byte y -Statement [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte y -Removing always clobbered register reg byte y as potential for zp[1]:275 [ print_str_lines::ch#0 ] -Statement [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ) always clobbers reg byte a -Statement [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a -Statement [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a -Statement [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 memset::str#0 ] ( main:2::form_mode:13::print_cls:255 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] main:2::form_mode:13::print_cls:261 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] ) always clobbers reg byte a -Statement [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 [ memset::str#0 memset::end#0 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] ) always clobbers reg byte a -Statement [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 [ memset::end#0 memset::dst#4 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a -Statement [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a -Statement [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ) always clobbers reg byte a +Statement [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ) always clobbers reg byte a +Statement [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte a reg byte y +Statement [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:281 [ print_str_lines::ch#0 ] +Statement [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ) always clobbers reg byte a +Statement [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a +Statement [434] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a +Statement [436] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 memset::str#0 ] ( main:2::form_mode:13::print_cls:255 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] main:2::form_mode:13::print_cls:261 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] ) always clobbers reg byte a +Statement [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 [ memset::str#0 memset::end#0 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] ) always clobbers reg byte a +Statement [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 [ memset::end#0 memset::dst#4 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a +Statement [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a +Statement [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:62 [ gfx_init_plane_fill::fill#6 ] -Statement [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ) always clobbers reg byte a -Statement [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ) always clobbers reg byte a -Statement [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ) always clobbers reg byte a -Statement [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ) always clobbers reg byte a -Statement [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ) always clobbers reg byte a -Statement [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ) always clobbers reg byte a -Statement [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ) always clobbers reg byte a reg byte y +Statement [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ) always clobbers reg byte a +Statement [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ) always clobbers reg byte a +Statement [489] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ) always clobbers reg byte a +Statement [490] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ) always clobbers reg byte a +Statement [491] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ) always clobbers reg byte a +Statement [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ) always clobbers reg byte a +Statement [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:62 [ gfx_init_plane_fill::fill#6 ] Removing always clobbered register reg byte a as potential for zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] Removing always clobbered register reg byte y as potential for zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] @@ -19244,64 +19275,64 @@ Removing always clobbered register reg byte y as potential for zp[1]:66 [ gfx_in Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] Removing always clobbered register reg byte a as potential for zp[1]:93 [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] -Statement [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:469 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ) always clobbers reg byte a +Statement [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:472 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Removing always clobbered register reg byte a as potential for zp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] -Statement [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:469 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ) always clobbers reg byte a reg byte y +Statement [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:472 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Removing always clobbered register reg byte y as potential for zp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] -Statement [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_vertical:467 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ) always clobbers reg byte a reg byte y +Statement [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_vertical:470 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] Removing always clobbered register reg byte y as potential for zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] Removing always clobbered register reg byte a as potential for zp[1]:75 [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] Removing always clobbered register reg byte y as potential for zp[1]:75 [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] -Statement [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y +Statement [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:468 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] Removing always clobbered register reg byte y as potential for zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] Removing always clobbered register reg byte a as potential for zp[1]:79 [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] Removing always clobbered register reg byte y as potential for zp[1]:79 [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] -Statement [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ ] ) always clobbers reg byte a -Statement [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y +Statement [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:468 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y +Statement [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ ] ) always clobbers reg byte a +Statement [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Removing always clobbered register reg byte y as potential for zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Removing always clobbered register reg byte a as potential for zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] Removing always clobbered register reg byte y as potential for zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] Removing always clobbered register reg byte a as potential for zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] Removing always clobbered register reg byte y as potential for zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] -Statement [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y +Statement [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] Removing always clobbered register reg byte y as potential for zp[1]:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] -Statement [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ ] ) always clobbers reg byte a -Statement [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ) always clobbers reg byte a -Statement [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ) always clobbers reg byte a -Statement [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ) always clobbers reg byte a -Statement [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ) always clobbers reg byte y +Statement [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ ] ) always clobbers reg byte a +Statement [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ) always clobbers reg byte a +Statement [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ) always clobbers reg byte a +Statement [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ) always clobbers reg byte a +Statement [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] Removing always clobbered register reg byte y as potential for zp[1]:93 [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] -Statement [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ) always clobbers reg byte a -Statement [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ) always clobbers reg byte a +Statement [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ) always clobbers reg byte a +Statement [619] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:300 [ bitmap_line::x0#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:301 [ bitmap_line::x1#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:302 [ bitmap_line::y0#0 ] -Removing always clobbered register reg byte a as potential for zp[1]:303 [ bitmap_line::y1#0 ] -Statement [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:304 [ bitmap_line::xd#2 ] -Statement [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ) always clobbers reg byte a -Statement [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ) always clobbers reg byte a -Statement [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:307 [ bitmap_line::xd#1 ] -Statement [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ) always clobbers reg byte a -Statement [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:306 [ bitmap_line::x0#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:307 [ bitmap_line::x1#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:308 [ bitmap_line::y0#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:309 [ bitmap_line::y1#0 ] +Statement [621] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:310 [ bitmap_line::xd#2 ] +Statement [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ) always clobbers reg byte a +Statement [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ) always clobbers reg byte a +Statement [652] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:313 [ bitmap_line::xd#1 ] +Statement [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ) always clobbers reg byte a +Statement [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] Removing always clobbered register reg byte a as potential for zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] Removing always clobbered register reg byte a as potential for zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] Removing always clobbered register reg byte a as potential for zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] Removing always clobbered register reg byte a as potential for zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Statement [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ) always clobbers reg byte a -Statement [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ) always clobbers reg byte a -Statement [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) [ bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ) always clobbers reg byte a +Statement [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ) always clobbers reg byte a +Statement [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ) always clobbers reg byte a +Statement [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) [ bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] Removing always clobbered register reg byte a as potential for zp[1]:103 [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] Removing always clobbered register reg byte a as potential for zp[1]:104 [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] @@ -19323,9 +19354,9 @@ Removing always clobbered register reg byte a as potential for zp[1]:119 [ bitma Removing always clobbered register reg byte a as potential for zp[1]:120 [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] Removing always clobbered register reg byte a as potential for zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] Removing always clobbered register reg byte a as potential for zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] -Statement [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) [ bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ) always clobbers reg byte a -Statement [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 [ bitmap_plot::x#4 bitmap_plot::plotter#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] ) always clobbers reg byte a -Statement [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) [ bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a reg byte y +Statement [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) [ bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ) always clobbers reg byte a +Statement [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 [ bitmap_plot::x#4 bitmap_plot::plotter#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] ) always clobbers reg byte a +Statement [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) [ bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] Removing always clobbered register reg byte y as potential for zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] Removing always clobbered register reg byte y as potential for zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] @@ -19351,75 +19382,75 @@ Removing always clobbered register reg byte y as potential for zp[1]:119 [ bitma Removing always clobbered register reg byte y as potential for zp[1]:120 [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] Removing always clobbered register reg byte y as potential for zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] Removing always clobbered register reg byte y as potential for zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] -Statement [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 [ ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] ) always clobbers reg byte y -Statement [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ) always clobbers reg byte a -Statement [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ) always clobbers reg byte a -Statement [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ) always clobbers reg byte a -Statement [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ) always clobbers reg byte a -Statement [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ) always clobbers reg byte a -Statement [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ) always clobbers reg byte a -Statement [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ) always clobbers reg byte a -Statement [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ) always clobbers reg byte a -Statement [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ) always clobbers reg byte a -Statement [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) [ bitmap_clear::bitmap#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::bitmap#0 ] ) always clobbers reg byte a -Statement [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 [ bitmap_clear::bitmap#5 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a -Statement [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y +Statement [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 [ ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] ) always clobbers reg byte y +Statement [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ) always clobbers reg byte a +Statement [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ) always clobbers reg byte a +Statement [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ) always clobbers reg byte a +Statement [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ) always clobbers reg byte a +Statement [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ) always clobbers reg byte a +Statement [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ) always clobbers reg byte a +Statement [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ) always clobbers reg byte a +Statement [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ) always clobbers reg byte a +Statement [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ) always clobbers reg byte a +Statement [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) [ bitmap_clear::bitmap#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_clear:608 [ bitmap_clear::bitmap#0 ] ) always clobbers reg byte a +Statement [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 [ bitmap_clear::bitmap#5 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_clear:608 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a +Statement [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_clear:608 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] Removing always clobbered register reg byte y as potential for zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] Removing always clobbered register reg byte a as potential for zp[1]:126 [ bitmap_clear::x#2 bitmap_clear::x#1 ] Removing always clobbered register reg byte y as potential for zp[1]:126 [ bitmap_clear::x#2 bitmap_clear::x#1 ] -Statement [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a +Statement [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:127 [ bitmap_init::x#2 bitmap_init::x#1 ] Removing always clobbered register reg byte a as potential for zp[1]:128 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] -Statement [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a -Statement [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a +Statement [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:129 [ bitmap_init::y#2 bitmap_init::y#1 ] -Statement [780] *((const byte*) PROCPORT) ← (byte) $32 [ ] ( main:2::gfx_init:10::gfx_init_charset:457 [ ] ) always clobbers reg byte a -Statement [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ( main:2::gfx_init:10::gfx_init_charset:457 [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ) always clobbers reg byte a reg byte y +Statement [783] *((const byte*) PROCPORT) ← (byte) $32 [ ] ( main:2::gfx_init:10::gfx_init_charset:460 [ ] ) always clobbers reg byte a +Statement [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ( main:2::gfx_init:10::gfx_init_charset:460 [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] Removing always clobbered register reg byte y as potential for zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] Removing always clobbered register reg byte a as potential for zp[1]:137 [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] Removing always clobbered register reg byte y as potential for zp[1]:137 [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] -Statement [790] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::gfx_init:10::gfx_init_charset:457 [ ] ) always clobbers reg byte a -Statement [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ( main:2::gfx_init:10::gfx_init_screen4:455 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ) always clobbers reg byte a reg byte y +Statement [793] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::gfx_init:10::gfx_init_charset:460 [ ] ) always clobbers reg byte a +Statement [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ( main:2::gfx_init:10::gfx_init_screen4:458 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] Removing always clobbered register reg byte y as potential for zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:141 [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] Removing always clobbered register reg byte y as potential for zp[1]:141 [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] -Statement [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ) always clobbers reg byte a +Statement [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -Statement [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:329 [ gfx_init_screen3::$1 ] -Statement [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ) always clobbers reg byte y +Statement [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:335 [ gfx_init_screen3::$1 ] +Statement [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] Removing always clobbered register reg byte y as potential for zp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -Statement [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ) always clobbers reg byte a +Statement [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] -Statement [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:333 [ gfx_init_screen2::col#0 ] -Statement [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:334 [ gfx_init_screen2::col2#0 ] -Statement [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ) always clobbers reg byte y +Statement [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:339 [ gfx_init_screen2::col#0 ] +Statement [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:340 [ gfx_init_screen2::col2#0 ] +Statement [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] Removing always clobbered register reg byte y as potential for zp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] -Statement [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ( main:2::gfx_init:10::gfx_init_screen1:449 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ) always clobbers reg byte a +Statement [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ( main:2::gfx_init:10::gfx_init_screen1:452 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:151 [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] -Statement [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen1:449 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ) always clobbers reg byte y +Statement [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen1:452 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] Removing always clobbered register reg byte y as potential for zp[1]:151 [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] -Statement [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a +Statement [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] Removing always clobbered register reg byte a as potential for zp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] -Statement [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:340 [ gfx_init_screen0::$1 ] -Statement [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y +Statement [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:346 [ gfx_init_screen0::$1 ] +Statement [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] Removing always clobbered register reg byte y as potential for zp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] -Statement [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a -Statement [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a +Statement [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a +Statement [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a Statement [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] ) always clobbers reg byte a Statement [7] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] ) always clobbers reg byte a @@ -19495,21 +19526,21 @@ Statement [132] (byte~) gfx_mode::$65 ← (byte~) gfx_mode::$64 | *((const byte* Statement [134] if(*((const byte*) form_dtv_palet)==(byte) 0) goto gfx_mode::@24 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a Statement [139] if(*((const byte*) RASTER)!=(byte) $ff) goto gfx_mode::@25 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a Statement [149] *((const byte*) DTV_PALETTE + (byte) gfx_mode::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) gfx_mode::i#2) [ keyboard_events_size#24 gfx_mode::i#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::i#2 ] ) always clobbers reg byte a -Statement [163] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a -Statement [164] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a -Statement [179] (byte) keyboard_modifiers#3 ← (byte) keyboard_modifiers#18 | (const byte) KEY_MODIFIER_RSHIFT [ keyboard_events_size#100 keyboard_modifiers#3 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#3 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#3 ] ) always clobbers reg byte a -Statement [185] (byte) keyboard_modifiers#4 ← (byte) keyboard_modifiers#19 | (const byte) KEY_MODIFIER_CTRL [ keyboard_events_size#100 keyboard_modifiers#4 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#4 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#4 ] ) always clobbers reg byte a -Statement [191] (byte) keyboard_modifiers#5 ← (byte) keyboard_modifiers#20 | (const byte) KEY_MODIFIER_COMMODORE [ keyboard_events_size#100 keyboard_modifiers#5 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#5 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#5 ] ) always clobbers reg byte a -Statement [195] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ) always clobbers reg byte a -Statement [199] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [201] *((const byte*) keyboard_events + (byte) keyboard_events_size#18) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ) always clobbers reg byte a -Statement [207] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ) always clobbers reg byte a -Statement [208] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ) always clobbers reg byte a -Statement [214] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#4 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a -Statement [215] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#10 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] ) always clobbers reg byte a -Statement [217] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] ) always clobbers reg byte a -Statement [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [163] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a +Statement [164] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a +Statement [179] (byte) keyboard_modifiers#3 ← (byte) keyboard_modifiers#18 | (const byte) KEY_MODIFIER_RSHIFT [ keyboard_events_size#100 keyboard_modifiers#3 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#3 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#3 ] ) always clobbers reg byte a +Statement [185] (byte) keyboard_modifiers#4 ← (byte) keyboard_modifiers#19 | (const byte) KEY_MODIFIER_CTRL [ keyboard_events_size#100 keyboard_modifiers#4 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#4 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#4 ] ) always clobbers reg byte a +Statement [191] (byte) keyboard_modifiers#5 ← (byte) keyboard_modifiers#20 | (const byte) KEY_MODIFIER_COMMODORE [ keyboard_events_size#100 keyboard_modifiers#5 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#5 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#5 ] ) always clobbers reg byte a +Statement [195] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [199] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [201] *((const byte*) keyboard_events + (byte) keyboard_events_size#18) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ) always clobbers reg byte a +Statement [207] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ) always clobbers reg byte a +Statement [208] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [214] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#4 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [215] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#10 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] ) always clobbers reg byte a +Statement [217] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] ) always clobbers reg byte a +Statement [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:372::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_control::field#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a Statement [270] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a Statement [271] *((const byte*) DTV_COLOR_BANK_LO) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a Statement [272] *((const byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a @@ -19529,327 +19560,114 @@ Statement [290] if(*((const byte*) RASTER)!=(byte) $ff) goto form_mode::@4 [ key Statement [318] (byte*) print_str_at::str#1 ← (byte*) render_preset_name::name#13 [ print_str_at::str#1 ] ( main:2::form_mode:13::render_preset_name:269 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#1 ] main:2::form_mode:13::render_preset_name:303 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#1 ] ) always clobbers reg byte a Statement [323] if((byte) 0!=*((byte*) print_str_at::str#2)) goto print_str_at::@2 [ print_str_at::str#2 print_str_at::at#2 ] ( main:2::form_mode:13::render_preset_name:269::print_str_at:319 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#2 print_str_at::at#2 ] main:2::form_mode:13::render_preset_name:303::print_str_at:319 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#2 print_str_at::at#2 ] ) always clobbers reg byte a reg byte y Statement [325] *((byte*) print_str_at::at#2) ← *((byte*) print_str_at::str#2) [ print_str_at::str#2 print_str_at::at#2 ] ( main:2::form_mode:13::render_preset_name:269::print_str_at:319 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#2 print_str_at::at#2 ] main:2::form_mode:13::render_preset_name:303::print_str_at:319 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#2 print_str_at::at#2 ] ) always clobbers reg byte a reg byte y -Statement [334] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_render_values::idx#2)) [ form_render_values::idx#2 ] ( main:2::form_mode:13::form_render_values:267 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 ] main:2::form_mode:13::form_render_values:301 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp[1]:41 [ form_render_values::idx#2 form_render_values::idx#1 ] -Statement [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [ form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_control:292::form_field_ptr:360 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ) always clobbers reg byte a -Statement [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [ apply_preset::preset#15 apply_preset::i#2 ] ( main:2::form_mode:13::apply_preset:299 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 apply_preset::preset#15 apply_preset::i#2 ] ) always clobbers reg byte a -Statement [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$12 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$12 ] ) always clobbers reg byte a reg byte y -Statement [367] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$12 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte y -Statement [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_control::$14 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_control::$14 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp[1]:15 [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] -Statement [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ) always clobbers reg byte y -Statement [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ) always clobbers reg byte a -Statement [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$22 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$22 ] ) always clobbers reg byte a -Statement [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) [ keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y -Statement [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y -Statement [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$13 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$13 ] ) always clobbers reg byte a reg byte y -Statement [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte y -Statement [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::form_mode:13::form_set_screen:265 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_set_screen::y#2 form_set_screen::line#1 ] ) always clobbers reg byte a -Statement [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ) always clobbers reg byte a -Statement [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte a reg byte y -Statement [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte y -Statement [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ) always clobbers reg byte a -Statement [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a -Statement [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a -Statement [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 memset::str#0 ] ( main:2::form_mode:13::print_cls:255 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] main:2::form_mode:13::print_cls:261 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] ) always clobbers reg byte a -Statement [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 [ memset::str#0 memset::end#0 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] ) always clobbers reg byte a -Statement [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 [ memset::end#0 memset::dst#4 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a -Statement [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a -Statement [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ) always clobbers reg byte a -Statement [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ) always clobbers reg byte a -Statement [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ) always clobbers reg byte a -Statement [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ) always clobbers reg byte a -Statement [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ) always clobbers reg byte a -Statement [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ) always clobbers reg byte a -Statement [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ) always clobbers reg byte a -Statement [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ) always clobbers reg byte a reg byte y +Statement [334] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_render_values::idx#2)) [ form_render_values::idx#2 ] ( main:2::form_mode:13::form_render_values:267 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 ] main:2::form_mode:13::form_render_values:301 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 ] ) always clobbers reg byte a +Statement [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [ form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_control:292::form_field_ptr:361 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ) always clobbers reg byte a +Statement [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 [ form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] main:2::form_mode:13::form_control:292::form_field_ptr:361 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_field_ptr::return#0 ] ) always clobbers reg byte a +Statement [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [ apply_preset::preset#15 apply_preset::i#2 ] ( main:2::form_mode:13::apply_preset:299 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 apply_preset::preset#15 apply_preset::i#2 ] ) always clobbers reg byte a +Statement [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 [ keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::return#3 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::return#3 ] ) always clobbers reg byte a +Statement [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 [ keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_control::field#0 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_control::field#0 ] ) always clobbers reg byte a +Statement [368] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [369] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$12 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$12 ] ) always clobbers reg byte a reg byte y +Statement [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte y +Statement [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_control::field#0 form_control::$14 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_control::field#0 form_control::$14 ] ) always clobbers reg byte a reg byte y +Statement [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ) always clobbers reg byte y +Statement [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ) always clobbers reg byte a +Statement [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$22 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$22 ] ) always clobbers reg byte a +Statement [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) [ keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y +Statement [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y +Statement [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 [ keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte a +Statement [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$13 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 form_control::$13 ] ) always clobbers reg byte a reg byte y +Statement [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 [ keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_control::field#0 form_cursor_count#15 ] ) always clobbers reg byte y +Statement [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::form_mode:13::form_set_screen:265 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_set_screen::y#2 form_set_screen::line#1 ] ) always clobbers reg byte a +Statement [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ) always clobbers reg byte a +Statement [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ) always clobbers reg byte a reg byte y +Statement [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte a reg byte y +Statement [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte y +Statement [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ) always clobbers reg byte a +Statement [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a +Statement [434] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:429 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a +Statement [436] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 memset::str#0 ] ( main:2::form_mode:13::print_cls:255 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] main:2::form_mode:13::print_cls:261 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] ) always clobbers reg byte a +Statement [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 [ memset::str#0 memset::end#0 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] ) always clobbers reg byte a +Statement [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 [ memset::end#0 memset::dst#4 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a +Statement [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a +Statement [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:437 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ) always clobbers reg byte a +Statement [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ) always clobbers reg byte a +Statement [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ) always clobbers reg byte a +Statement [489] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ) always clobbers reg byte a +Statement [490] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ) always clobbers reg byte a +Statement [491] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ) always clobbers reg byte a +Statement [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ) always clobbers reg byte a +Statement [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_full:478::gfx_init_plane_fill:481 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_blank:476::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_vertical2:474::gfx_init_plane_fill:512 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ) always clobbers reg byte a reg byte y Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a -Statement [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:469 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ) always clobbers reg byte a -Statement [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:469 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_vertical:467 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ) always clobbers reg byte a reg byte y -Statement [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::$2 ] ) always clobbers reg byte a -Statement [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ ] ) always clobbers reg byte a -Statement [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y -Statement [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y -Statement [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ ] ) always clobbers reg byte a -Statement [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ) always clobbers reg byte a -Statement [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ) always clobbers reg byte a -Statement [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ) always clobbers reg byte a -Statement [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ) always clobbers reg byte y -Statement [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ) always clobbers reg byte a -Statement [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ) always clobbers reg byte a -Statement [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ) always clobbers reg byte a -Statement [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ) always clobbers reg byte a -Statement [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ) always clobbers reg byte a -Statement [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ) always clobbers reg byte a -Statement [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ) always clobbers reg byte a -Statement [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ) always clobbers reg byte a -Statement [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ) always clobbers reg byte a -Statement [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ) always clobbers reg byte a -Statement [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) [ bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ) always clobbers reg byte a -Statement [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) [ bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ) always clobbers reg byte a -Statement [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 [ bitmap_plot::x#4 bitmap_plot::plotter#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] ) always clobbers reg byte a -Statement [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) [ bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a reg byte y -Statement [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 [ ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] ) always clobbers reg byte y -Statement [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ) always clobbers reg byte a -Statement [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ) always clobbers reg byte a -Statement [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ) always clobbers reg byte a -Statement [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ) always clobbers reg byte a -Statement [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ) always clobbers reg byte a -Statement [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ) always clobbers reg byte a -Statement [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ) always clobbers reg byte a -Statement [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ) always clobbers reg byte a -Statement [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ) always clobbers reg byte a -Statement [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) [ bitmap_clear::bitmap#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::bitmap#0 ] ) always clobbers reg byte a -Statement [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 [ bitmap_clear::bitmap#5 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a -Statement [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y -Statement [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 [ bitmap_init::x#2 bitmap_init::bits#3 bitmap_init::$0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 bitmap_init::$0 ] ) always clobbers reg byte a -Statement [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a -Statement [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a -Statement [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ) always clobbers reg byte a -Statement [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [780] *((const byte*) PROCPORT) ← (byte) $32 [ ] ( main:2::gfx_init:10::gfx_init_charset:457 [ ] ) always clobbers reg byte a -Statement [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ( main:2::gfx_init:10::gfx_init_charset:457 [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ) always clobbers reg byte a reg byte y -Statement [790] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::gfx_init:10::gfx_init_charset:457 [ ] ) always clobbers reg byte a -Statement [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ( main:2::gfx_init:10::gfx_init_screen4:455 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ) always clobbers reg byte a reg byte y -Statement [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$0 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$0 ] ) always clobbers reg byte a -Statement [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ) always clobbers reg byte a -Statement [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ) always clobbers reg byte a -Statement [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ) always clobbers reg byte y -Statement [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ) always clobbers reg byte a -Statement [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ) always clobbers reg byte a -Statement [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ) always clobbers reg byte a -Statement [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ) always clobbers reg byte y -Statement [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ( main:2::gfx_init:10::gfx_init_screen1:449 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ) always clobbers reg byte a -Statement [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen1:449 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ) always clobbers reg byte y -Statement [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) always clobbers reg byte a -Statement [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a -Statement [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a -Statement [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y -Statement [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a -Statement [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a -Statement [5] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [6] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [7] *((const byte*) DTV_FEATURE) ← (const byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [16] if(*((const byte*) form_ctrl_line)==(byte) 0) goto gfx_mode::@1 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [19] if(*((const byte*) form_ctrl_borof)==(byte) 0) goto gfx_mode::@2 [ keyboard_events_size#24 gfx_mode::dtv_control#14 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#14 ] ) always clobbers reg byte a -Statement [20] (byte) gfx_mode::dtv_control#2 ← (byte) gfx_mode::dtv_control#14 | (const byte) DTV_BORDER_OFF [ keyboard_events_size#24 gfx_mode::dtv_control#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#2 ] ) always clobbers reg byte a -Statement [22] if(*((const byte*) form_ctrl_hicol)==(byte) 0) goto gfx_mode::@3 [ keyboard_events_size#24 gfx_mode::dtv_control#15 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#15 ] ) always clobbers reg byte a -Statement [23] (byte) gfx_mode::dtv_control#3 ← (byte) gfx_mode::dtv_control#15 | (const byte) DTV_HIGHCOLOR [ keyboard_events_size#24 gfx_mode::dtv_control#3 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#3 ] ) always clobbers reg byte a -Statement [25] if(*((const byte*) form_ctrl_overs)==(byte) 0) goto gfx_mode::@4 [ keyboard_events_size#24 gfx_mode::dtv_control#10 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#10 ] ) always clobbers reg byte a -Statement [26] (byte) gfx_mode::dtv_control#4 ← (byte) gfx_mode::dtv_control#10 | (const byte) DTV_OVERSCAN [ keyboard_events_size#24 gfx_mode::dtv_control#4 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#4 ] ) always clobbers reg byte a -Statement [28] if(*((const byte*) form_ctrl_colof)==(byte) 0) goto gfx_mode::@5 [ keyboard_events_size#24 gfx_mode::dtv_control#11 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#11 ] ) always clobbers reg byte a -Statement [29] (byte) gfx_mode::dtv_control#5 ← (byte) gfx_mode::dtv_control#11 | (const byte) DTV_COLORRAM_OFF [ keyboard_events_size#24 gfx_mode::dtv_control#5 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#5 ] ) always clobbers reg byte a -Statement [31] if(*((const byte*) form_ctrl_chunk)==(byte) 0) goto gfx_mode::@6 [ keyboard_events_size#24 gfx_mode::dtv_control#13 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#13 ] ) always clobbers reg byte a -Statement [32] (byte) gfx_mode::dtv_control#6 ← (byte) gfx_mode::dtv_control#13 | (const byte) DTV_CHUNKY [ keyboard_events_size#24 gfx_mode::dtv_control#6 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::dtv_control#6 ] ) always clobbers reg byte a -Statement [35] if(*((const byte*) form_ctrl_ecm)==(byte) 0) goto gfx_mode::@7 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [38] if(*((const byte*) form_ctrl_bmm)==(byte) 0) goto gfx_mode::@8 [ keyboard_events_size#24 gfx_mode::vic_control#5 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::vic_control#5 ] ) always clobbers reg byte a -Statement [39] (byte) gfx_mode::vic_control#2 ← (byte) gfx_mode::vic_control#5 | (const byte) VIC_BMM [ keyboard_events_size#24 gfx_mode::vic_control#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::vic_control#2 ] ) always clobbers reg byte a -Statement [42] if(*((const byte*) form_ctrl_mcm)==(byte) 0) goto gfx_mode::@9 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [46] (byte~) gfx_mode::$18 ← *((const byte*) form_a_start_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$18 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$18 ] ) always clobbers reg byte a -Statement [47] (byte) gfx_mode::plane_a_offs#0 ← (byte~) gfx_mode::$18 | *((const byte*) form_a_start_lo) [ keyboard_events_size#24 gfx_mode::plane_a_offs#0 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a_offs#0 ] ) always clobbers reg byte a -Statement [50] (dword) get_plane::return#16 ← (dword) get_plane::return#14 [ keyboard_events_size#24 gfx_mode::plane_a_offs#0 get_plane::return#16 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a_offs#0 get_plane::return#16 ] ) always clobbers reg byte a -Statement [51] (dword~) gfx_mode::$20 ← (dword) get_plane::return#16 [ keyboard_events_size#24 gfx_mode::plane_a_offs#0 gfx_mode::$20 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a_offs#0 gfx_mode::$20 ] ) always clobbers reg byte a -Statement [52] (dword) gfx_mode::plane_a#0 ← (dword~) gfx_mode::$20 + (byte) gfx_mode::plane_a_offs#0 [ keyboard_events_size#24 gfx_mode::plane_a#0 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a#0 ] ) always clobbers reg byte a -Statement [53] (word~) gfx_mode::$24 ← < (dword) gfx_mode::plane_a#0 [ keyboard_events_size#24 gfx_mode::plane_a#0 gfx_mode::$24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a#0 gfx_mode::$24 ] ) always clobbers reg byte a -Statement [54] (byte~) gfx_mode::$23 ← < (word~) gfx_mode::$24 [ keyboard_events_size#24 gfx_mode::plane_a#0 gfx_mode::$24 gfx_mode::$23 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a#0 gfx_mode::$24 gfx_mode::$23 ] ) always clobbers reg byte a -Statement [56] (byte~) gfx_mode::$25 ← > (word~) gfx_mode::$24 [ keyboard_events_size#24 gfx_mode::plane_a#0 gfx_mode::$25 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_a#0 gfx_mode::$25 ] ) always clobbers reg byte a -Statement [58] (word~) gfx_mode::$26 ← > (dword) gfx_mode::plane_a#0 [ keyboard_events_size#24 gfx_mode::$26 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$26 ] ) always clobbers reg byte a -Statement [59] (byte~) gfx_mode::$27 ← < (word~) gfx_mode::$26 [ keyboard_events_size#24 gfx_mode::$27 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$27 ] ) always clobbers reg byte a -Statement [61] (byte~) gfx_mode::$28 ← *((const byte*) form_a_step_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$28 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$28 ] ) always clobbers reg byte a -Statement [62] (byte~) gfx_mode::$29 ← (byte~) gfx_mode::$28 | *((const byte*) form_a_step_lo) [ keyboard_events_size#24 gfx_mode::$29 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$29 ] ) always clobbers reg byte a -Statement [64] (byte~) gfx_mode::$30 ← *((const byte*) form_a_mod_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$30 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$30 ] ) always clobbers reg byte a -Statement [65] (byte~) gfx_mode::$31 ← (byte~) gfx_mode::$30 | *((const byte*) form_a_mod_lo) [ keyboard_events_size#24 gfx_mode::$31 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$31 ] ) always clobbers reg byte a -Statement [67] *((const byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [68] (byte~) gfx_mode::$32 ← *((const byte*) form_b_start_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$32 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$32 ] ) always clobbers reg byte a -Statement [69] (byte) gfx_mode::plane_b_offs#0 ← (byte~) gfx_mode::$32 | *((const byte*) form_b_start_lo) [ keyboard_events_size#24 gfx_mode::plane_b_offs#0 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b_offs#0 ] ) always clobbers reg byte a -Statement [72] (dword) get_plane::return#17 ← (dword) get_plane::return#14 [ keyboard_events_size#24 gfx_mode::plane_b_offs#0 get_plane::return#17 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b_offs#0 get_plane::return#17 ] ) always clobbers reg byte a -Statement [73] (dword~) gfx_mode::$34 ← (dword) get_plane::return#17 [ keyboard_events_size#24 gfx_mode::plane_b_offs#0 gfx_mode::$34 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b_offs#0 gfx_mode::$34 ] ) always clobbers reg byte a -Statement [74] (dword) gfx_mode::plane_b#0 ← (dword~) gfx_mode::$34 + (byte) gfx_mode::plane_b_offs#0 [ keyboard_events_size#24 gfx_mode::plane_b#0 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b#0 ] ) always clobbers reg byte a -Statement [75] (word~) gfx_mode::$38 ← < (dword) gfx_mode::plane_b#0 [ keyboard_events_size#24 gfx_mode::plane_b#0 gfx_mode::$38 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b#0 gfx_mode::$38 ] ) always clobbers reg byte a -Statement [76] (byte~) gfx_mode::$37 ← < (word~) gfx_mode::$38 [ keyboard_events_size#24 gfx_mode::plane_b#0 gfx_mode::$38 gfx_mode::$37 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b#0 gfx_mode::$38 gfx_mode::$37 ] ) always clobbers reg byte a -Statement [78] (byte~) gfx_mode::$39 ← > (word~) gfx_mode::$38 [ keyboard_events_size#24 gfx_mode::plane_b#0 gfx_mode::$39 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::plane_b#0 gfx_mode::$39 ] ) always clobbers reg byte a -Statement [80] (word~) gfx_mode::$40 ← > (dword) gfx_mode::plane_b#0 [ keyboard_events_size#24 gfx_mode::$40 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$40 ] ) always clobbers reg byte a -Statement [81] (byte~) gfx_mode::$41 ← < (word~) gfx_mode::$40 [ keyboard_events_size#24 gfx_mode::$41 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$41 ] ) always clobbers reg byte a -Statement [83] (byte~) gfx_mode::$42 ← *((const byte*) form_b_step_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$42 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$42 ] ) always clobbers reg byte a -Statement [84] (byte~) gfx_mode::$43 ← (byte~) gfx_mode::$42 | *((const byte*) form_b_step_lo) [ keyboard_events_size#24 gfx_mode::$43 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$43 ] ) always clobbers reg byte a -Statement [86] (byte~) gfx_mode::$44 ← *((const byte*) form_b_mod_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$44 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$44 ] ) always clobbers reg byte a -Statement [87] (byte~) gfx_mode::$45 ← (byte~) gfx_mode::$44 | *((const byte*) form_b_mod_lo) [ keyboard_events_size#24 gfx_mode::$45 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$45 ] ) always clobbers reg byte a -Statement [89] *((const byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [90] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [91] *((const byte*) CIA2_PORT_A) ← (byte) 3^(byte)(word)(const byte*) VIC_SCREEN0/(word) $4000 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [94] (byte*) get_vic_screen::return#10 ← (byte*) get_vic_screen::return#5 [ keyboard_events_size#24 get_vic_screen::return#10 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 get_vic_screen::return#10 ] ) always clobbers reg byte a -Statement [95] (byte*~) gfx_mode::$47 ← (byte*) get_vic_screen::return#10 [ keyboard_events_size#24 gfx_mode::$47 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$47 ] ) always clobbers reg byte a -Statement [96] (word~) gfx_mode::$48 ← (word)(byte*~) gfx_mode::$47 & (word) $3fff [ keyboard_events_size#24 gfx_mode::$48 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$48 ] ) always clobbers reg byte a -Statement [97] (word~) gfx_mode::$49 ← (word~) gfx_mode::$48 >> (byte) 6 [ keyboard_events_size#24 gfx_mode::$49 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$49 ] ) always clobbers reg byte a -Statement [98] (byte~) gfx_mode::$50 ← (byte)(word~) gfx_mode::$49 [ keyboard_events_size#24 gfx_mode::$50 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$50 ] ) always clobbers reg byte a -Statement [101] (byte*) get_vic_charset::return#4 ← (byte*) get_vic_charset::return#2 [ keyboard_events_size#24 gfx_mode::$50 get_vic_charset::return#4 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$50 get_vic_charset::return#4 ] ) always clobbers reg byte a -Statement [102] (byte*~) gfx_mode::$52 ← (byte*) get_vic_charset::return#4 [ keyboard_events_size#24 gfx_mode::$50 gfx_mode::$52 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$50 gfx_mode::$52 ] ) always clobbers reg byte a -Statement [103] (word~) gfx_mode::$53 ← (word)(byte*~) gfx_mode::$52 & (word) $3fff [ keyboard_events_size#24 gfx_mode::$50 gfx_mode::$53 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$50 gfx_mode::$53 ] ) always clobbers reg byte a -Statement [104] (byte~) gfx_mode::$54 ← > (word~) gfx_mode::$53 [ keyboard_events_size#24 gfx_mode::$50 gfx_mode::$54 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$50 gfx_mode::$54 ] ) always clobbers reg byte a -Statement [105] (byte~) gfx_mode::$55 ← (byte~) gfx_mode::$54 >> (byte) 2 [ keyboard_events_size#24 gfx_mode::$50 gfx_mode::$55 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$50 gfx_mode::$55 ] ) always clobbers reg byte a -Statement [110] (byte*) get_vic_screen::return#11 ← (byte*) get_vic_screen::return#5 [ keyboard_events_size#24 get_vic_screen::return#11 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 get_vic_screen::return#11 ] ) always clobbers reg byte a -Statement [111] (byte*) gfx_mode::vic_colors#0 ← (byte*) get_vic_screen::return#11 [ keyboard_events_size#24 gfx_mode::vic_colors#0 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::vic_colors#0 ] ) always clobbers reg byte a -Statement [114] *((byte*) gfx_mode::col#2) ← *((byte*) gfx_mode::vic_colors#2) [ keyboard_events_size#24 gfx_mode::cy#4 gfx_mode::vic_colors#2 gfx_mode::col#2 gfx_mode::cx#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::cy#4 gfx_mode::vic_colors#2 gfx_mode::col#2 gfx_mode::cx#2 ] ) always clobbers reg byte a reg byte y -Statement [121] *((const byte*) BORDERCOL) ← (byte) 0 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [122] (byte~) gfx_mode::$58 ← *((const byte*) form_vic_bg0_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$58 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$58 ] ) always clobbers reg byte a -Statement [123] (byte~) gfx_mode::$59 ← (byte~) gfx_mode::$58 | *((const byte*) form_vic_bg0_lo) [ keyboard_events_size#24 gfx_mode::$59 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$59 ] ) always clobbers reg byte a -Statement [125] (byte~) gfx_mode::$60 ← *((const byte*) form_vic_bg1_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$60 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$60 ] ) always clobbers reg byte a -Statement [126] (byte~) gfx_mode::$61 ← (byte~) gfx_mode::$60 | *((const byte*) form_vic_bg1_lo) [ keyboard_events_size#24 gfx_mode::$61 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$61 ] ) always clobbers reg byte a -Statement [128] (byte~) gfx_mode::$62 ← *((const byte*) form_vic_bg2_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$62 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$62 ] ) always clobbers reg byte a -Statement [129] (byte~) gfx_mode::$63 ← (byte~) gfx_mode::$62 | *((const byte*) form_vic_bg2_lo) [ keyboard_events_size#24 gfx_mode::$63 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$63 ] ) always clobbers reg byte a -Statement [131] (byte~) gfx_mode::$64 ← *((const byte*) form_vic_bg3_hi) << (byte) 4 [ keyboard_events_size#24 gfx_mode::$64 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$64 ] ) always clobbers reg byte a -Statement [132] (byte~) gfx_mode::$65 ← (byte~) gfx_mode::$64 | *((const byte*) form_vic_bg3_lo) [ keyboard_events_size#24 gfx_mode::$65 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::$65 ] ) always clobbers reg byte a -Statement [134] if(*((const byte*) form_dtv_palet)==(byte) 0) goto gfx_mode::@24 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [139] if(*((const byte*) RASTER)!=(byte) $ff) goto gfx_mode::@25 [ keyboard_events_size#24 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 ] ) always clobbers reg byte a -Statement [149] *((const byte*) DTV_PALETTE + (byte) gfx_mode::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) gfx_mode::i#2) [ keyboard_events_size#24 gfx_mode::i#2 ] ( main:2::gfx_mode:15 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#24 gfx_mode::i#2 ] ) always clobbers reg byte a -Statement [163] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a -Statement [164] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_events_size#106 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a -Statement [179] (byte) keyboard_modifiers#3 ← (byte) keyboard_modifiers#18 | (const byte) KEY_MODIFIER_RSHIFT [ keyboard_events_size#100 keyboard_modifiers#3 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#3 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#3 ] ) always clobbers reg byte a -Statement [185] (byte) keyboard_modifiers#4 ← (byte) keyboard_modifiers#19 | (const byte) KEY_MODIFIER_CTRL [ keyboard_events_size#100 keyboard_modifiers#4 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#4 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#4 ] ) always clobbers reg byte a -Statement [191] (byte) keyboard_modifiers#5 ← (byte) keyboard_modifiers#20 | (const byte) KEY_MODIFIER_COMMODORE [ keyboard_events_size#100 keyboard_modifiers#5 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#5 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#5 ] ) always clobbers reg byte a -Statement [195] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$15 ] ) always clobbers reg byte a -Statement [199] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [201] *((const byte*) keyboard_events + (byte) keyboard_events_size#18) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 ] ) always clobbers reg byte a -Statement [207] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#105 ] ) always clobbers reg byte a -Statement [208] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ( main:2::gfx_mode:15::keyboard_event_scan:141 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#18 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 [ keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::keycode#4 keyboard_event_pressed::$0 ] ) always clobbers reg byte a -Statement [214] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#4 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a -Statement [215] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#10 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:169 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:169 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:175 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:175 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#18 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:181 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:181 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#19 keyboard_event_pressed::return#10 ] main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_event_pressed:187 [ form_cursor_count#16 form_field_idx#18 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_event_pressed:187 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_events_size#100 keyboard_modifiers#20 keyboard_event_pressed::return#10 ] ) always clobbers reg byte a -Statement [217] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 ] ) always clobbers reg byte a -Statement [218] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:2::gfx_mode:15::keyboard_event_scan:141::keyboard_matrix_read:160 [ form_cursor_count#16 form_field_idx#18 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] main:2::form_mode:13::form_control:292::keyboard_event_scan:369::keyboard_matrix_read:160 [ form_mode::preset_current#6 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#106 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [270] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [271] *((const byte*) DTV_COLOR_BANK_LO) ← <(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [272] *((const byte*) DTV_COLOR_BANK_HI) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [273] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [274] *((const byte*) CIA2_PORT_A) ← (byte) 3 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [275] *((const byte*) DTV_CONTROL) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [276] *((const byte*) VIC_CONTROL) ← (const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [277] *((const byte*) VIC_CONTROL2) ← (const byte) VIC_CSEL [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [278] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) FORM_SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) FORM_CHARSET&(word) $3fff/(word) $400 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [279] *((const byte*) DTV_PLANEA_START_LO) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [280] *((const byte*) DTV_PLANEA_START_MI) ← >(const byte*) FORM_SCREEN [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [281] *((const byte*) DTV_PLANEA_START_HI) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [283] *((const byte*) DTV_PALETTE + (byte) form_mode::i#2) ← *((const byte*) DTV_PALETTE_DEFAULT + (byte) form_mode::i#2) [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_mode::i#2 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_mode::i#2 ] ) always clobbers reg byte a -Statement [286] *((const byte*) BGCOL) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [287] *((const byte*) BORDERCOL) ← (byte) 0 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ( main:2::form_mode:13 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 ] ) always clobbers reg byte a -Statement [290] if(*((const byte*) RASTER)!=(byte) $ff) goto form_mode::@4 [ keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_mode::preset_current#6 ] ( main:2::form_mode:13 [ keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_mode::preset_current#6 ] ) always clobbers reg byte a -Statement [318] (byte*) print_str_at::str#1 ← (byte*) render_preset_name::name#13 [ print_str_at::str#1 ] ( main:2::form_mode:13::render_preset_name:269 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#1 ] main:2::form_mode:13::render_preset_name:303 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#1 ] ) always clobbers reg byte a -Statement [323] if((byte) 0!=*((byte*) print_str_at::str#2)) goto print_str_at::@2 [ print_str_at::str#2 print_str_at::at#2 ] ( main:2::form_mode:13::render_preset_name:269::print_str_at:319 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#2 print_str_at::at#2 ] main:2::form_mode:13::render_preset_name:303::print_str_at:319 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#2 print_str_at::at#2 ] ) always clobbers reg byte a reg byte y -Statement [325] *((byte*) print_str_at::at#2) ← *((byte*) print_str_at::str#2) [ print_str_at::str#2 print_str_at::at#2 ] ( main:2::form_mode:13::render_preset_name:269::print_str_at:319 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_at::str#2 print_str_at::at#2 ] main:2::form_mode:13::render_preset_name:303::print_str_at:319 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 print_str_at::str#2 print_str_at::at#2 ] ) always clobbers reg byte a reg byte y -Statement [334] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_render_values::idx#2)) [ form_render_values::idx#2 ] ( main:2::form_mode:13::form_render_values:267 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 ] main:2::form_mode:13::form_render_values:301 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 ] ) always clobbers reg byte a reg byte y -Statement [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) [ form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ( main:2::form_mode:13::form_render_values:267::form_field_ptr:333 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_render_values:301::form_field_ptr:333 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 form_mode::preset_current#1 form_render_values::idx#2 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] main:2::form_mode:13::form_control:292::form_field_ptr:360 [ form_mode::preset_current#6 keyboard_events_size#47 form_cursor_count#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::field_idx#2 ] ) always clobbers reg byte a -Statement [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) [ apply_preset::preset#15 apply_preset::i#2 ] ( main:2::form_mode:13::apply_preset:299 [ form_cursor_count#16 keyboard_events_size#24 form_field_idx#18 apply_preset::preset#15 apply_preset::i#2 ] ) always clobbers reg byte a -Statement [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$12 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$12 ] ) always clobbers reg byte a reg byte y -Statement [367] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$12 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte y -Statement [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_control::$14 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_control::$14 ] ) always clobbers reg byte a reg byte y -Statement [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 [ keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 keyboard_modifiers#21 form_field_idx#28 ] ) always clobbers reg byte y -Statement [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_control::$15 ] ) always clobbers reg byte a -Statement [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$22 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$22 ] ) always clobbers reg byte a -Statement [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) [ keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y -Statement [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a reg byte y -Statement [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 [ keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#24 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte a -Statement [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$13 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 form_control::$13 ] ) always clobbers reg byte a reg byte y -Statement [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 [ keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ( main:2::form_mode:13::form_control:292 [ form_mode::preset_current#6 keyboard_events_size#47 form_field_idx#28 form_field_ptr::line#0 form_field_ptr::x#0 form_cursor_count#15 ] ) always clobbers reg byte y -Statement [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 [ form_set_screen::y#2 form_set_screen::line#1 ] ( main:2::form_mode:13::form_set_screen:265 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 form_set_screen::y#2 form_set_screen::line#1 ] ) always clobbers reg byte a -Statement [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 [ print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#5 print_char_cursor#67 print_set_screen::screen#2 ] ) always clobbers reg byte a -Statement [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 [ print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#3 print_char_cursor#22 print_line_cursor#2 ] ) always clobbers reg byte a reg byte y -Statement [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) [ print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#4 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte a reg byte y -Statement [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 [ print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_line_cursor#2 print_str_lines::str#0 print_char_cursor#20 print_str_lines::ch#0 ] ) always clobbers reg byte y -Statement [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 [ print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ( main:2::form_mode:13::print_str_lines:257 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] main:2::form_mode:13::print_str_lines:263 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_char_cursor#68 print_line_cursor#22 ] ) always clobbers reg byte a -Statement [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a -Statement [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 [ print_line_cursor#22 print_char_cursor#38 ] ( main:2::form_mode:13::print_str_lines:257::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] main:2::form_mode:13::print_str_lines:263::print_ln:426 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_str_lines::str#0 print_line_cursor#22 print_char_cursor#38 ] ) always clobbers reg byte a -Statement [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 [ print_set_screen::screen#2 memset::str#0 ] ( main:2::form_mode:13::print_cls:255 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] main:2::form_mode:13::print_cls:261 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 ] ) always clobbers reg byte a -Statement [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 [ memset::str#0 memset::end#0 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::str#0 memset::end#0 ] ) always clobbers reg byte a -Statement [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 [ memset::end#0 memset::dst#4 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#4 ] ) always clobbers reg byte a -Statement [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a -Statement [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 [ memset::end#0 memset::dst#2 ] ( main:2::form_mode:13::print_cls:255::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] main:2::form_mode:13::print_cls:261::memset:434 [ form_cursor_count#1 keyboard_events_size#27 form_field_idx#1 print_set_screen::screen#2 memset::end#0 memset::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$0 ] ) always clobbers reg byte a -Statement [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$1 ] ) always clobbers reg byte a -Statement [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::plane_addr#3 gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxbCpuBank#0 ] ) always clobbers reg byte a -Statement [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$4 ] ) always clobbers reg byte a -Statement [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::$5 ] ) always clobbers reg byte a -Statement [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#0 ] ) always clobbers reg byte a -Statement [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::gfxb#6 ] ) always clobbers reg byte a -Statement [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_full:475::gfx_init_plane_fill:478 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_blank:473::gfx_init_plane_fill:506 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] main:2::gfx_init:10::gfx_init_plane_vertical2:471::gfx_init_plane_fill:509 [ gfx_init_plane_fill::fill#6 gfx_init_plane_fill::by#4 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::bx#2 ] ) always clobbers reg byte a reg byte y -Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a -Statement [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:469 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ) always clobbers reg byte a -Statement [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:469 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_vertical:467 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ) always clobbers reg byte a reg byte y -Statement [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::$2 ] ) always clobbers reg byte a -Statement [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:465 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y -Statement [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ ] ) always clobbers reg byte a -Statement [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y -Statement [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y -Statement [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:463 [ ] ) always clobbers reg byte a -Statement [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ) always clobbers reg byte a -Statement [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ) always clobbers reg byte a -Statement [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ) always clobbers reg byte a -Statement [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ) always clobbers reg byte y -Statement [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:461 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ) always clobbers reg byte a -Statement [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ) always clobbers reg byte a -Statement [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ) always clobbers reg byte a -Statement [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ) always clobbers reg byte a -Statement [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ) always clobbers reg byte a -Statement [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ) always clobbers reg byte a -Statement [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ) always clobbers reg byte a -Statement [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ) always clobbers reg byte a -Statement [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ) always clobbers reg byte a -Statement [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ) always clobbers reg byte a -Statement [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) [ bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ) always clobbers reg byte a -Statement [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) [ bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ) always clobbers reg byte a -Statement [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 [ bitmap_plot::x#4 bitmap_plot::plotter#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] ) always clobbers reg byte a -Statement [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) [ bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a reg byte y -Statement [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 [ ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:632::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyi:676::bitmap_plot:682 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670::bitmap_plot:704 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662::bitmap_plot:719 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656::bitmap_plot:734 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] ) always clobbers reg byte y -Statement [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ) always clobbers reg byte a -Statement [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ) always clobbers reg byte a -Statement [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:625 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxi:670 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ) always clobbers reg byte a -Statement [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ) always clobbers reg byte a -Statement [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ) always clobbers reg byte a -Statement [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:646 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_xdyd:662 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ) always clobbers reg byte a -Statement [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ) always clobbers reg byte a -Statement [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ) always clobbers reg byte a -Statement [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:640 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_line:613::bitmap_line_ydxd:656 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ) always clobbers reg byte a -Statement [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) [ bitmap_clear::bitmap#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::bitmap#0 ] ) always clobbers reg byte a -Statement [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 [ bitmap_clear::bitmap#5 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a -Statement [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_clear:605 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y -Statement [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 [ bitmap_init::x#2 bitmap_init::bits#3 bitmap_init::$0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 bitmap_init::$0 ] ) always clobbers reg byte a -Statement [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a -Statement [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a -Statement [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ) always clobbers reg byte a -Statement [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:459::bitmap_init:603 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a -Statement [780] *((const byte*) PROCPORT) ← (byte) $32 [ ] ( main:2::gfx_init:10::gfx_init_charset:457 [ ] ) always clobbers reg byte a -Statement [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ( main:2::gfx_init:10::gfx_init_charset:457 [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ) always clobbers reg byte a reg byte y -Statement [790] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::gfx_init:10::gfx_init_charset:457 [ ] ) always clobbers reg byte a -Statement [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ( main:2::gfx_init:10::gfx_init_screen4:455 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ) always clobbers reg byte a reg byte y -Statement [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$0 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$0 ] ) always clobbers reg byte a -Statement [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ) always clobbers reg byte a -Statement [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ) always clobbers reg byte a -Statement [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen3:453 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ) always clobbers reg byte y -Statement [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ) always clobbers reg byte a -Statement [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ) always clobbers reg byte a -Statement [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ) always clobbers reg byte a -Statement [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen2:451 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ) always clobbers reg byte y -Statement [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ( main:2::gfx_init:10::gfx_init_screen1:449 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ) always clobbers reg byte a -Statement [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen1:449 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ) always clobbers reg byte y -Statement [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) always clobbers reg byte a -Statement [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a -Statement [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a -Statement [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen0:447 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y -Statement [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a -Statement [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a +Statement [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:472 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::$2 ] ) always clobbers reg byte a +Statement [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal2:472 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::ax#2 ] ) always clobbers reg byte a reg byte y +Statement [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ( main:2::gfx_init:10::gfx_init_plane_vertical:470 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::bx#2 ] ) always clobbers reg byte a reg byte y +Statement [546] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::$2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:468 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::$2 ] ) always clobbers reg byte a +Statement [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:468 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y +Statement [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ( main:2::gfx_init:10::gfx_init_plane_horisontal:468 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::ax#2 ] ) always clobbers reg byte a reg byte y +Statement [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ ] ) always clobbers reg byte a +Statement [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y +Statement [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y +Statement [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:10::gfx_init_plane_charset8:466 [ ] ) always clobbers reg byte a +Statement [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxbCpuBank#4 ] ) always clobbers reg byte a +Statement [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::$5 ] ) always clobbers reg byte a +Statement [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::c#0 ] ) always clobbers reg byte a +Statement [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::gfxb#4 ] ) always clobbers reg byte y +Statement [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ( main:2::gfx_init:10::gfx_init_plane_8bppchunky:464 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::x#1 ] ) always clobbers reg byte a +Statement [619] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 ] ) always clobbers reg byte a +Statement [621] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#2 ] ) always clobbers reg byte a +Statement [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#2 bitmap_line::yd#1 ] ) always clobbers reg byte a +Statement [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 ] ) always clobbers reg byte a +Statement [652] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#10 ] ) always clobbers reg byte a +Statement [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 [ bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616 [ gfx_init_vic_bitmap::l#2 bitmap_line::x0#0 bitmap_line::x1#0 bitmap_line::y0#0 bitmap_line::y1#0 bitmap_line::xd#1 bitmap_line::yd#11 ] ) always clobbers reg byte a +Statement [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::x#6 bitmap_line_xdyi::y#5 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::e#0 ] ) always clobbers reg byte a +Statement [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::y#3 bitmap_line_xdyi::x#2 bitmap_line_xdyi::e#1 ] ) always clobbers reg byte a +Statement [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#2 bitmap_line_xdyi::y#2 bitmap_line_xdyi::e#2 ] ) always clobbers reg byte a +Statement [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) [ bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::y#4 bitmap_plot::plotter_x#0 ] ) always clobbers reg byte a +Statement [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) [ bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter_x#0 bitmap_plot::plotter_y#0 ] ) always clobbers reg byte a +Statement [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 [ bitmap_plot::x#4 bitmap_plot::plotter#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::x#4 bitmap_plot::plotter#0 ] ) always clobbers reg byte a +Statement [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) [ bitmap_plot::plotter#0 bitmap_plot::$1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 bitmap_plot::plotter#0 bitmap_plot::$1 ] ) always clobbers reg byte a reg byte y +Statement [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 [ ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:635::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyi:679::bitmap_plot:685 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x#3 bitmap_line_xdyi::y#3 bitmap_line_xdyi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673::bitmap_plot:707 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#3 bitmap_line_ydxi::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665::bitmap_plot:722 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#3 bitmap_line_xdyd::y#3 bitmap_line_xdyd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659::bitmap_plot:737 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#2 bitmap_line_ydxd::e#3 ] ) always clobbers reg byte y +Statement [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::x#5 bitmap_line_ydxi::y#6 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::e#0 ] ) always clobbers reg byte a +Statement [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::x#3 bitmap_line_ydxi::y#2 bitmap_line_ydxi::e#1 ] ) always clobbers reg byte a +Statement [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:628 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxi:673 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::yd#5 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y#2 bitmap_line_ydxi::x#2 bitmap_line_ydxi::e#2 ] ) always clobbers reg byte a +Statement [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::x#6 bitmap_line_xdyd::y#5 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::e#0 ] ) always clobbers reg byte a +Statement [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::y#3 bitmap_line_xdyd::x#2 bitmap_line_xdyd::e#1 ] ) always clobbers reg byte a +Statement [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:649 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_xdyd:665 [ gfx_init_vic_bitmap::l#2 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x#2 bitmap_line_xdyd::y#2 bitmap_line_xdyd::e#2 ] ) always clobbers reg byte a +Statement [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::x#5 bitmap_line_ydxd::y#7 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::e#0 ] ) always clobbers reg byte a +Statement [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::x#3 bitmap_line_ydxd::y#3 bitmap_line_ydxd::e#1 ] ) always clobbers reg byte a +Statement [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:643 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_line:616::bitmap_line_ydxd:659 [ gfx_init_vic_bitmap::l#2 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::yd#5 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y#3 bitmap_line_ydxd::x#2 bitmap_line_ydxd::e#2 ] ) always clobbers reg byte a +Statement [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) [ bitmap_clear::bitmap#0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_clear:608 [ bitmap_clear::bitmap#0 ] ) always clobbers reg byte a +Statement [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 [ bitmap_clear::bitmap#5 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_clear:608 [ bitmap_clear::bitmap#5 ] ) always clobbers reg byte a +Statement [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_clear:608 [ bitmap_clear::y#4 bitmap_clear::bitmap#2 bitmap_clear::x#2 ] ) always clobbers reg byte a reg byte y +Statement [760] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 [ bitmap_init::x#2 bitmap_init::bits#3 bitmap_init::$0 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::x#2 bitmap_init::bits#3 bitmap_init::$0 ] ) always clobbers reg byte a +Statement [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a +Statement [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 [ bitmap_init::x#2 bitmap_init::bits#3 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::x#2 bitmap_init::bits#3 ] ) always clobbers reg byte a +Statement [771] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::y#2 bitmap_init::yoffs#2 bitmap_init::$10 ] ) always clobbers reg byte a +Statement [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ( main:2::gfx_init:10::gfx_init_vic_bitmap:462::bitmap_init:606 [ bitmap_init::y#2 bitmap_init::yoffs#1 ] ) always clobbers reg byte a +Statement [783] *((const byte*) PROCPORT) ← (byte) $32 [ ] ( main:2::gfx_init:10::gfx_init_charset:460 [ ] ) always clobbers reg byte a +Statement [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ( main:2::gfx_init:10::gfx_init_charset:460 [ gfx_init_charset::c#4 gfx_init_charset::chargen#2 gfx_init_charset::charset#2 gfx_init_charset::l#2 ] ) always clobbers reg byte a reg byte y +Statement [793] *((const byte*) PROCPORT) ← (byte) $37 [ ] ( main:2::gfx_init:10::gfx_init_charset:460 [ ] ) always clobbers reg byte a +Statement [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ( main:2::gfx_init:10::gfx_init_screen4:458 [ gfx_init_screen4::cy#4 gfx_init_screen4::ch#2 gfx_init_screen4::cx#2 ] ) always clobbers reg byte a reg byte y +Statement [808] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$0 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$0 ] ) always clobbers reg byte a +Statement [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 ] ) always clobbers reg byte a +Statement [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 gfx_init_screen3::$1 gfx_init_screen3::$2 ] ) always clobbers reg byte a +Statement [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen3:456 [ gfx_init_screen3::cy#4 gfx_init_screen3::cx#2 gfx_init_screen3::ch#2 ] ) always clobbers reg byte y +Statement [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::$0 ] ) always clobbers reg byte a +Statement [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col#0 gfx_init_screen2::col2#0 ] ) always clobbers reg byte a +Statement [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 gfx_init_screen2::col2#0 gfx_init_screen2::$3 ] ) always clobbers reg byte a +Statement [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen2:454 [ gfx_init_screen2::cy#4 gfx_init_screen2::cx#2 gfx_init_screen2::ch#2 ] ) always clobbers reg byte y +Statement [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ( main:2::gfx_init:10::gfx_init_screen1:452 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 gfx_init_screen1::$0 ] ) always clobbers reg byte a +Statement [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen1:452 [ gfx_init_screen1::cy#4 gfx_init_screen1::cx#2 gfx_init_screen1::ch#2 ] ) always clobbers reg byte y +Statement [849] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) always clobbers reg byte a +Statement [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) always clobbers reg byte a +Statement [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a +Statement [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:10::gfx_init_screen0:450 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y +Statement [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a +Statement [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 [ ] ( main:2::keyboard_init:8 [ ] ) always clobbers reg byte a Potential registers zp[1]:2 [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] : zp[1]:2 , reg byte x , reg byte y , Potential registers zp[1]:3 [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] : zp[1]:3 , reg byte x , reg byte y , Potential registers zp[1]:4 [ gfx_mode::vic_control2#2 ] : zp[1]:4 , reg byte a , reg byte x , reg byte y , @@ -19879,7 +19697,7 @@ Potential registers zp[1]:34 [ render_preset_name::idx#10 render_preset_name::id Potential registers zp[2]:35 [ render_preset_name::name#13 ] : zp[2]:35 , Potential registers zp[2]:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] : zp[2]:37 , Potential registers zp[2]:39 [ print_str_at::at#2 print_str_at::at#0 ] : zp[2]:39 , -Potential registers zp[1]:41 [ form_render_values::idx#2 form_render_values::idx#1 ] : zp[1]:41 , reg byte x , +Potential registers zp[1]:41 [ form_render_values::idx#2 form_render_values::idx#1 ] : zp[1]:41 , reg byte x , reg byte y , Potential registers zp[1]:42 [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] : zp[1]:42 , reg byte x , reg byte y , Potential registers zp[2]:43 [ apply_preset::preset#15 ] : zp[2]:43 , Potential registers zp[1]:45 [ apply_preset::i#2 apply_preset::i#1 ] : zp[1]:45 , reg byte x , reg byte y , @@ -20046,112 +19864,115 @@ Potential registers zp[1]:260 [ form_mode::$11 ] : zp[1]:260 , reg byte a , reg Potential registers zp[1]:261 [ apply_preset::idx#0 ] : zp[1]:261 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:262 [ form_field_ptr::y#0 ] : zp[1]:262 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:263 [ form_field_ptr::line#0 ] : zp[2]:263 , -Potential registers zp[1]:265 [ form_field_ptr::x#0 ] : zp[1]:265 , reg byte x , -Potential registers zp[1]:266 [ form_control::$12 ] : zp[1]:266 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:267 [ keyboard_event_get::return#4 ] : zp[1]:267 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:268 [ form_control::key_event#0 ] : zp[1]:268 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:269 [ form_control::$14 ] : zp[1]:269 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:270 [ form_control::$15 ] : zp[1]:270 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:271 [ form_control::$22 ] : zp[1]:271 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:272 [ form_control::$13 ] : zp[1]:272 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:273 [ form_set_screen::$0 ] : zp[1]:273 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:274 [ form_set_screen::$1 ] : zp[1]:274 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:275 [ print_str_lines::ch#0 ] : zp[1]:275 , reg byte a , reg byte x , -Potential registers zp[2]:276 [ memset::str#0 ] : zp[2]:276 , -Potential registers zp[2]:278 [ memset::end#0 ] : zp[2]:278 , -Potential registers zp[4]:280 [ gfx_init_plane_fill::$0 ] : zp[4]:280 , -Potential registers zp[2]:284 [ gfx_init_plane_fill::$1 ] : zp[2]:284 , -Potential registers zp[1]:286 [ gfx_init_plane_fill::gfxbCpuBank#0 ] : zp[1]:286 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:287 [ gfx_init_plane_fill::$4 ] : zp[2]:287 , -Potential registers zp[2]:289 [ gfx_init_plane_fill::$5 ] : zp[2]:289 , -Potential registers zp[2]:291 [ gfx_init_plane_fill::gfxb#0 ] : zp[2]:291 , -Potential registers zp[1]:293 [ gfx_init_plane_horisontal2::$2 ] : zp[1]:293 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:294 [ gfx_init_plane_horisontal2::row#0 ] : zp[1]:294 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:295 [ gfx_init_plane_horisontal::$2 ] : zp[1]:295 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:296 [ gfx_init_plane_charset8::$2 ] : zp[1]:296 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:297 [ gfx_init_plane_8bppchunky::$5 ] : zp[2]:297 , -Potential registers zp[1]:299 [ gfx_init_plane_8bppchunky::c#0 ] : zp[1]:299 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:300 [ bitmap_line::x0#0 ] : zp[1]:300 , reg byte x , reg byte y , -Potential registers zp[1]:301 [ bitmap_line::x1#0 ] : zp[1]:301 , reg byte x , reg byte y , -Potential registers zp[1]:302 [ bitmap_line::y0#0 ] : zp[1]:302 , reg byte x , reg byte y , -Potential registers zp[1]:303 [ bitmap_line::y1#0 ] : zp[1]:303 , reg byte x , reg byte y , -Potential registers zp[1]:304 [ bitmap_line::xd#2 ] : zp[1]:304 , reg byte x , reg byte y , -Potential registers zp[1]:305 [ bitmap_line::yd#2 ] : zp[1]:305 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:306 [ bitmap_line::yd#1 ] : zp[1]:306 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:307 [ bitmap_line::xd#1 ] : zp[1]:307 , reg byte x , reg byte y , -Potential registers zp[1]:308 [ bitmap_line::yd#10 ] : zp[1]:308 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:309 [ bitmap_line::yd#11 ] : zp[1]:309 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:310 [ bitmap_line_xdyi::$6 ] : zp[1]:310 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:311 [ bitmap_plot::plotter_x#0 ] : zp[2]:311 , -Potential registers zp[2]:313 [ bitmap_plot::plotter_y#0 ] : zp[2]:313 , -Potential registers zp[2]:315 [ bitmap_plot::plotter#0 ] : zp[2]:315 , -Potential registers zp[1]:317 [ bitmap_plot::$1 ] : zp[1]:317 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:318 [ bitmap_line_ydxi::$6 ] : zp[1]:318 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:319 [ bitmap_line_xdyd::$6 ] : zp[1]:319 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:320 [ bitmap_line_ydxd::$6 ] : zp[1]:320 , reg byte a , reg byte x , reg byte y , -Potential registers zp[2]:321 [ bitmap_clear::bitmap#0 ] : zp[2]:321 , -Potential registers zp[1]:323 [ bitmap_init::$0 ] : zp[1]:323 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:324 [ bitmap_init::$10 ] : zp[1]:324 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:325 [ bitmap_init::$7 ] : zp[1]:325 , reg byte a , reg byte x , reg byte y , reg byte alu , -Potential registers zp[1]:326 [ bitmap_init::$8 ] : zp[1]:326 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:327 [ bitmap_init::$9 ] : zp[1]:327 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:328 [ gfx_init_screen3::$0 ] : zp[1]:328 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:329 [ gfx_init_screen3::$1 ] : zp[1]:329 , reg byte x , reg byte y , -Potential registers zp[1]:330 [ gfx_init_screen3::$2 ] : zp[1]:330 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:331 [ gfx_init_screen3::$3 ] : zp[1]:331 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:332 [ gfx_init_screen2::$0 ] : zp[1]:332 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:333 [ gfx_init_screen2::col#0 ] : zp[1]:333 , reg byte x , reg byte y , -Potential registers zp[1]:334 [ gfx_init_screen2::col2#0 ] : zp[1]:334 , reg byte x , reg byte y , -Potential registers zp[1]:335 [ gfx_init_screen2::$3 ] : zp[1]:335 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:336 [ gfx_init_screen2::$4 ] : zp[1]:336 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:337 [ gfx_init_screen1::$0 ] : zp[1]:337 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:338 [ gfx_init_screen1::$1 ] : zp[1]:338 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:339 [ gfx_init_screen0::$0 ] : zp[1]:339 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:340 [ gfx_init_screen0::$1 ] : zp[1]:340 , reg byte x , reg byte y , -Potential registers zp[1]:341 [ gfx_init_screen0::$2 ] : zp[1]:341 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:342 [ gfx_init_screen0::$3 ] : zp[1]:342 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:265 [ form_field_ptr::x#0 ] : zp[1]:265 , reg byte x , reg byte y , +Potential registers zp[2]:266 [ form_field_ptr::return#0 ] : zp[2]:266 , +Potential registers zp[2]:268 [ form_field_ptr::return#3 ] : zp[2]:268 , +Potential registers zp[2]:270 [ form_control::field#0 ] : zp[2]:270 , +Potential registers zp[1]:272 [ form_control::$12 ] : zp[1]:272 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:273 [ keyboard_event_get::return#4 ] : zp[1]:273 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:274 [ form_control::key_event#0 ] : zp[1]:274 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:275 [ form_control::$14 ] : zp[1]:275 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:276 [ form_control::$15 ] : zp[1]:276 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:277 [ form_control::$22 ] : zp[1]:277 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:278 [ form_control::$13 ] : zp[1]:278 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:279 [ form_set_screen::$0 ] : zp[1]:279 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:280 [ form_set_screen::$1 ] : zp[1]:280 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:281 [ print_str_lines::ch#0 ] : zp[1]:281 , reg byte a , reg byte x , +Potential registers zp[2]:282 [ memset::str#0 ] : zp[2]:282 , +Potential registers zp[2]:284 [ memset::end#0 ] : zp[2]:284 , +Potential registers zp[4]:286 [ gfx_init_plane_fill::$0 ] : zp[4]:286 , +Potential registers zp[2]:290 [ gfx_init_plane_fill::$1 ] : zp[2]:290 , +Potential registers zp[1]:292 [ gfx_init_plane_fill::gfxbCpuBank#0 ] : zp[1]:292 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:293 [ gfx_init_plane_fill::$4 ] : zp[2]:293 , +Potential registers zp[2]:295 [ gfx_init_plane_fill::$5 ] : zp[2]:295 , +Potential registers zp[2]:297 [ gfx_init_plane_fill::gfxb#0 ] : zp[2]:297 , +Potential registers zp[1]:299 [ gfx_init_plane_horisontal2::$2 ] : zp[1]:299 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:300 [ gfx_init_plane_horisontal2::row#0 ] : zp[1]:300 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:301 [ gfx_init_plane_horisontal::$2 ] : zp[1]:301 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:302 [ gfx_init_plane_charset8::$2 ] : zp[1]:302 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:303 [ gfx_init_plane_8bppchunky::$5 ] : zp[2]:303 , +Potential registers zp[1]:305 [ gfx_init_plane_8bppchunky::c#0 ] : zp[1]:305 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:306 [ bitmap_line::x0#0 ] : zp[1]:306 , reg byte x , reg byte y , +Potential registers zp[1]:307 [ bitmap_line::x1#0 ] : zp[1]:307 , reg byte x , reg byte y , +Potential registers zp[1]:308 [ bitmap_line::y0#0 ] : zp[1]:308 , reg byte x , reg byte y , +Potential registers zp[1]:309 [ bitmap_line::y1#0 ] : zp[1]:309 , reg byte x , reg byte y , +Potential registers zp[1]:310 [ bitmap_line::xd#2 ] : zp[1]:310 , reg byte x , reg byte y , +Potential registers zp[1]:311 [ bitmap_line::yd#2 ] : zp[1]:311 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:312 [ bitmap_line::yd#1 ] : zp[1]:312 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:313 [ bitmap_line::xd#1 ] : zp[1]:313 , reg byte x , reg byte y , +Potential registers zp[1]:314 [ bitmap_line::yd#10 ] : zp[1]:314 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:315 [ bitmap_line::yd#11 ] : zp[1]:315 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:316 [ bitmap_line_xdyi::$6 ] : zp[1]:316 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:317 [ bitmap_plot::plotter_x#0 ] : zp[2]:317 , +Potential registers zp[2]:319 [ bitmap_plot::plotter_y#0 ] : zp[2]:319 , +Potential registers zp[2]:321 [ bitmap_plot::plotter#0 ] : zp[2]:321 , +Potential registers zp[1]:323 [ bitmap_plot::$1 ] : zp[1]:323 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:324 [ bitmap_line_ydxi::$6 ] : zp[1]:324 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:325 [ bitmap_line_xdyd::$6 ] : zp[1]:325 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:326 [ bitmap_line_ydxd::$6 ] : zp[1]:326 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:327 [ bitmap_clear::bitmap#0 ] : zp[2]:327 , +Potential registers zp[1]:329 [ bitmap_init::$0 ] : zp[1]:329 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:330 [ bitmap_init::$10 ] : zp[1]:330 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:331 [ bitmap_init::$7 ] : zp[1]:331 , reg byte a , reg byte x , reg byte y , reg byte alu , +Potential registers zp[1]:332 [ bitmap_init::$8 ] : zp[1]:332 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:333 [ bitmap_init::$9 ] : zp[1]:333 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:334 [ gfx_init_screen3::$0 ] : zp[1]:334 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:335 [ gfx_init_screen3::$1 ] : zp[1]:335 , reg byte x , reg byte y , +Potential registers zp[1]:336 [ gfx_init_screen3::$2 ] : zp[1]:336 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:337 [ gfx_init_screen3::$3 ] : zp[1]:337 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:338 [ gfx_init_screen2::$0 ] : zp[1]:338 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:339 [ gfx_init_screen2::col#0 ] : zp[1]:339 , reg byte x , reg byte y , +Potential registers zp[1]:340 [ gfx_init_screen2::col2#0 ] : zp[1]:340 , reg byte x , reg byte y , +Potential registers zp[1]:341 [ gfx_init_screen2::$3 ] : zp[1]:341 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:342 [ gfx_init_screen2::$4 ] : zp[1]:342 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:343 [ gfx_init_screen1::$0 ] : zp[1]:343 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:344 [ gfx_init_screen1::$1 ] : zp[1]:344 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:345 [ gfx_init_screen0::$0 ] : zp[1]:345 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:346 [ gfx_init_screen0::$1 ] : zp[1]:346 , reg byte x , reg byte y , +Potential registers zp[1]:347 [ gfx_init_screen0::$2 ] : zp[1]:347 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:348 [ gfx_init_screen0::$3 ] : zp[1]:348 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES Uplift Scope [keyboard_event_scan] 200,002: zp[1]:250 [ keyboard_event_scan::$15 ] 200,002: zp[1]:251 [ keyboard_event_scan::$16 ] 200,002: zp[1]:252 [ keyboard_event_scan::event_type#0 ] 200,002: zp[1]:253 [ keyboard_event_scan::$23 ] 178,573.21: zp[1]:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] 119,043.1: zp[1]:17 [ 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 ] 21,001.74: zp[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] 12,778.06: zp[1]:241 [ keyboard_event_scan::row_scan#0 ] 4: zp[1]:243 [ keyboard_event_scan::$0 ] 4: zp[1]:245 [ keyboard_event_scan::$3 ] 4: zp[1]:247 [ keyboard_event_scan::$6 ] 4: zp[1]:249 [ keyboard_event_scan::$9 ] -Uplift Scope [] 588,363.98: zp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] 3,703: zp[2]:52 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 ] 2,654.02: zp[2]:54 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] 289.76: zp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] 107.03: zp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] 16.73: zp[1]:15 [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] +Uplift Scope [] 588,355.31: zp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] 3,703: zp[2]:52 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 ] 2,654.02: zp[2]:54 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] 226.56: zp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] 105.45: zp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] 16.73: zp[1]:15 [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] Uplift Scope [keyboard_matrix_read] 20,002: zp[1]:240 [ keyboard_matrix_read::return#2 ] 10,003: zp[1]:239 [ keyboard_matrix_read::rowid#0 ] 3,334.33: zp[1]:258 [ keyboard_matrix_read::return#0 ] -Uplift Scope [gfx_init_plane_charset8] 4,004: zp[1]:89 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] 2,002: zp[1]:296 [ gfx_init_plane_charset8::$2 ] 1,723.94: zp[1]:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] 1,044.93: zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 845.22: zp[2]:85 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] 783: zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] 192.31: zp[2]:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] 165.93: zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 17.79: zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplift Scope [gfx_init_plane_charset8] 4,004: zp[1]:89 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] 2,002: zp[1]:302 [ gfx_init_plane_charset8::$2 ] 1,723.94: zp[1]:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] 1,044.93: zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 845.22: zp[2]:85 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] 783: zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] 192.31: zp[2]:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] 165.93: zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 17.79: zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Uplift Scope [gfx_mode] 2,104.5: zp[2]:8 [ gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] 2,002: zp[1]:10 [ gfx_mode::cx#2 gfx_mode::cx#1 ] 1,663.27: zp[2]:6 [ gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 ] 353.5: zp[1]:11 [ gfx_mode::j#2 gfx_mode::j#1 ] 353.5: zp[1]:12 [ gfx_mode::i#2 gfx_mode::i#1 ] 202: zp[1]:238 [ gfx_mode::keyboard_event#0 ] 180.36: zp[1]:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] 44: zp[1]:2 [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] 12: zp[1]:3 [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] 4: zp[1]:158 [ gfx_mode::$18 ] 4: zp[4]:164 [ gfx_mode::$20 ] 4: zp[1]:174 [ gfx_mode::$23 ] 4: zp[1]:175 [ gfx_mode::$25 ] 4: zp[2]:176 [ gfx_mode::$26 ] 4: zp[1]:178 [ gfx_mode::$27 ] 4: zp[1]:179 [ gfx_mode::$28 ] 4: zp[1]:180 [ gfx_mode::$29 ] 4: zp[1]:181 [ gfx_mode::$30 ] 4: zp[1]:182 [ gfx_mode::$31 ] 4: zp[1]:183 [ gfx_mode::$32 ] 4: zp[4]:189 [ gfx_mode::$34 ] 4: zp[1]:199 [ gfx_mode::$37 ] 4: zp[1]:200 [ gfx_mode::$39 ] 4: zp[2]:201 [ gfx_mode::$40 ] 4: zp[1]:203 [ gfx_mode::$41 ] 4: zp[1]:204 [ gfx_mode::$42 ] 4: zp[1]:205 [ gfx_mode::$43 ] 4: zp[1]:206 [ gfx_mode::$44 ] 4: zp[1]:207 [ gfx_mode::$45 ] 4: zp[2]:212 [ gfx_mode::$48 ] 4: zp[2]:222 [ gfx_mode::$53 ] 4: zp[1]:224 [ gfx_mode::$54 ] 4: zp[1]:225 [ gfx_mode::$55 ] 4: zp[1]:226 [ gfx_mode::$56 ] 4: zp[1]:229 [ gfx_mode::$58 ] 4: zp[1]:230 [ gfx_mode::$59 ] 4: zp[1]:231 [ gfx_mode::$60 ] 4: zp[1]:232 [ gfx_mode::$61 ] 4: zp[1]:233 [ gfx_mode::$62 ] 4: zp[1]:234 [ gfx_mode::$63 ] 4: zp[1]:235 [ gfx_mode::$64 ] 4: zp[1]:236 [ gfx_mode::$65 ] 2: zp[1]:4 [ gfx_mode::vic_control2#2 ] 2: zp[2]:172 [ gfx_mode::$24 ] 2: zp[2]:197 [ gfx_mode::$38 ] 2: zp[2]:210 [ gfx_mode::$47 ] 2: zp[2]:214 [ gfx_mode::$49 ] 2: zp[2]:220 [ gfx_mode::$52 ] 1: zp[4]:168 [ gfx_mode::plane_a#0 ] 1: zp[4]:193 [ gfx_mode::plane_b#0 ] 0.8: zp[1]:159 [ gfx_mode::plane_a_offs#0 ] 0.8: zp[1]:184 [ gfx_mode::plane_b_offs#0 ] 0.5: zp[1]:216 [ gfx_mode::$50 ] Uplift Scope [print_str_at] 3,005.5: zp[2]:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] 2,002: zp[2]:39 [ print_str_at::at#2 print_str_at::at#0 ] Uplift Scope [apply_preset] 3,670.33: zp[1]:45 [ apply_preset::i#2 apply_preset::i#1 ] 200.2: zp[2]:43 [ apply_preset::preset#15 ] 11.18: zp[1]:261 [ apply_preset::idx#0 ] Uplift Scope [form_render_values] 3,003: zp[1]:41 [ form_render_values::idx#2 form_render_values::idx#1 ] Uplift Scope [form_mode] 2,002: zp[1]:260 [ form_mode::$11 ] 442.75: zp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] 353.5: zp[1]:30 [ form_mode::i#2 form_mode::i#1 ] -Uplift Scope [print_str_lines] 1,939.17: zp[2]:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ] 667.33: zp[1]:275 [ print_str_lines::ch#0 ] -Uplift Scope [form_field_ptr] 2,341.67: zp[1]:42 [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] 33.9: zp[1]:265 [ form_field_ptr::x#0 ] 6: zp[1]:262 [ form_field_ptr::y#0 ] 0.06: zp[2]:263 [ form_field_ptr::line#0 ] -Uplift Scope [form_control] 2,002: zp[1]:259 [ form_control::return#0 ] 333.67: zp[1]:46 [ form_control::return#2 ] 4: zp[1]:266 [ form_control::$12 ] 4: zp[1]:269 [ form_control::$14 ] 4: zp[1]:270 [ form_control::$15 ] 4: zp[1]:271 [ form_control::$22 ] 4: zp[1]:272 [ form_control::$13 ] 2.67: zp[1]:268 [ form_control::key_event#0 ] -Uplift Scope [bitmap_plot] 1,012: zp[1]:104 [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] 506.5: zp[1]:103 [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] 4: zp[2]:313 [ bitmap_plot::plotter_y#0 ] 4: zp[1]:317 [ bitmap_plot::$1 ] 2: zp[2]:311 [ bitmap_plot::plotter_x#0 ] 1: zp[2]:315 [ bitmap_plot::plotter#0 ] -Uplift Scope [gfx_init_screen2] 202: zp[1]:332 [ gfx_init_screen2::$0 ] 202: zp[1]:335 [ gfx_init_screen2::$3 ] 202: zp[1]:336 [ gfx_init_screen2::$4 ] 189.38: zp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] 151.5: zp[1]:333 [ gfx_init_screen2::col#0 ] 109.46: zp[2]:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 ] 101: zp[1]:334 [ gfx_init_screen2::col2#0 ] 27.68: zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] -Uplift Scope [gfx_init_plane_8bppchunky] 362.64: zp[1]:93 [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] 297.35: zp[2]:94 [ gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] 202: zp[1]:299 [ gfx_init_plane_8bppchunky::c#0 ] 181.8: zp[2]:91 [ gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 ] 101: zp[2]:297 [ gfx_init_plane_8bppchunky::$5 ] 25.96: zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] -Uplift Scope [bitmap_line_xdyi] 482.47: zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] 265: zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] 202: zp[1]:310 [ bitmap_line_xdyi::$6 ] 118.72: zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] 18.71: zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] 15.64: zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] 10.17: zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Uplift Scope [bitmap_line_xdyd] 482.47: zp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] 265: zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] 202: zp[1]:319 [ bitmap_line_xdyd::$6 ] 118.72: zp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] 18.71: zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] 15.64: zp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] 10.17: zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] -Uplift Scope [bitmap_line_ydxi] 482.47: zp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] 265: zp[1]:108 [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] 202: zp[1]:318 [ bitmap_line_ydxi::$6 ] 118.72: zp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] 18.71: zp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] 15.64: zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] 10.17: zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] -Uplift Scope [bitmap_line_ydxd] 482.47: zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] 265: zp[1]:120 [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] 202: zp[1]:320 [ bitmap_line_ydxd::$6 ] 118.72: zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] 18.71: zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] 15.64: zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] 10.17: zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] -Uplift Scope [gfx_init_screen0] 202: zp[1]:339 [ gfx_init_screen0::$0 ] 202: zp[1]:341 [ gfx_init_screen0::$2 ] 202: zp[1]:342 [ gfx_init_screen0::$3 ] 194.79: zp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] 116.93: zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] 101: zp[1]:340 [ gfx_init_screen0::$1 ] 28.8: zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] -Uplift Scope [gfx_init_screen3] 202: zp[1]:328 [ gfx_init_screen3::$0 ] 202: zp[1]:330 [ gfx_init_screen3::$2 ] 202: zp[1]:331 [ gfx_init_screen3::$3 ] 194.79: zp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] 116.93: zp[2]:144 [ gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] 101: zp[1]:329 [ gfx_init_screen3::$1 ] 28.8: zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] -Uplift Scope [gfx_init_plane_horisontal] 592: zp[2]:77 [ gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 ] 202: zp[1]:295 [ gfx_init_plane_horisontal::$2 ] 176.75: zp[1]:79 [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] 27.68: zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] -Uplift Scope [gfx_init_screen1] 212.1: zp[1]:151 [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] 202: zp[1]:337 [ gfx_init_screen1::$0 ] 202: zp[1]:338 [ gfx_init_screen1::$1 ] 143.1: zp[2]:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] 31.88: zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] -Uplift Scope [form_set_screen] 218.83: zp[1]:49 [ form_set_screen::y#2 form_set_screen::y#1 ] 202: zp[1]:273 [ form_set_screen::$0 ] 202: zp[1]:274 [ form_set_screen::$1 ] 148.13: zp[2]:47 [ form_set_screen::line#2 form_set_screen::line#1 ] -Uplift Scope [gfx_init_plane_horisontal2] 202: zp[1]:293 [ gfx_init_plane_horisontal2::$2 ] 202: zp[1]:294 [ gfx_init_plane_horisontal2::row#0 ] 191.9: zp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] 143.1: zp[2]:69 [ gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] 31.88: zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] +Uplift Scope [print_str_lines] 1,939.17: zp[2]:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ] 667.33: zp[1]:281 [ print_str_lines::ch#0 ] +Uplift Scope [form_field_ptr] 2,341.67: zp[1]:42 [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] 251.25: zp[1]:265 [ form_field_ptr::x#0 ] 6: zp[1]:262 [ form_field_ptr::y#0 ] 4: zp[2]:268 [ form_field_ptr::return#3 ] 1.33: zp[2]:266 [ form_field_ptr::return#0 ] 0.4: zp[2]:263 [ form_field_ptr::line#0 ] +Uplift Scope [form_control] 2,002: zp[1]:259 [ form_control::return#0 ] 333.67: zp[1]:46 [ form_control::return#2 ] 4: zp[1]:272 [ form_control::$12 ] 4: zp[1]:275 [ form_control::$14 ] 4: zp[1]:276 [ form_control::$15 ] 4: zp[1]:277 [ form_control::$22 ] 4: zp[1]:278 [ form_control::$13 ] 2.67: zp[1]:274 [ form_control::key_event#0 ] 0.59: zp[2]:270 [ form_control::field#0 ] +Uplift Scope [bitmap_plot] 1,012: zp[1]:104 [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] 506.5: zp[1]:103 [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] 4: zp[2]:319 [ bitmap_plot::plotter_y#0 ] 4: zp[1]:323 [ bitmap_plot::$1 ] 2: zp[2]:317 [ bitmap_plot::plotter_x#0 ] 1: zp[2]:321 [ bitmap_plot::plotter#0 ] +Uplift Scope [gfx_init_screen2] 202: zp[1]:338 [ gfx_init_screen2::$0 ] 202: zp[1]:341 [ gfx_init_screen2::$3 ] 202: zp[1]:342 [ gfx_init_screen2::$4 ] 189.38: zp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] 151.5: zp[1]:339 [ gfx_init_screen2::col#0 ] 109.46: zp[2]:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 ] 101: zp[1]:340 [ gfx_init_screen2::col2#0 ] 27.68: zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] +Uplift Scope [gfx_init_plane_8bppchunky] 362.64: zp[1]:93 [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] 297.35: zp[2]:94 [ gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] 202: zp[1]:305 [ gfx_init_plane_8bppchunky::c#0 ] 181.8: zp[2]:91 [ gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 ] 101: zp[2]:303 [ gfx_init_plane_8bppchunky::$5 ] 25.96: zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] +Uplift Scope [bitmap_line_xdyi] 482.47: zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] 265: zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] 202: zp[1]:316 [ bitmap_line_xdyi::$6 ] 118.72: zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] 18.71: zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] 15.64: zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] 10.17: zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplift Scope [bitmap_line_xdyd] 482.47: zp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] 265: zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] 202: zp[1]:325 [ bitmap_line_xdyd::$6 ] 118.72: zp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] 18.71: zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] 15.64: zp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] 10.17: zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplift Scope [bitmap_line_ydxi] 482.47: zp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] 265: zp[1]:108 [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] 202: zp[1]:324 [ bitmap_line_ydxi::$6 ] 118.72: zp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] 18.71: zp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] 15.64: zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] 10.17: zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplift Scope [bitmap_line_ydxd] 482.47: zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] 265: zp[1]:120 [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] 202: zp[1]:326 [ bitmap_line_ydxd::$6 ] 118.72: zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] 18.71: zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] 15.64: zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] 10.17: zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] +Uplift Scope [gfx_init_screen0] 202: zp[1]:345 [ gfx_init_screen0::$0 ] 202: zp[1]:347 [ gfx_init_screen0::$2 ] 202: zp[1]:348 [ gfx_init_screen0::$3 ] 194.79: zp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] 116.93: zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] 101: zp[1]:346 [ gfx_init_screen0::$1 ] 28.8: zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplift Scope [gfx_init_screen3] 202: zp[1]:334 [ gfx_init_screen3::$0 ] 202: zp[1]:336 [ gfx_init_screen3::$2 ] 202: zp[1]:337 [ gfx_init_screen3::$3 ] 194.79: zp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] 116.93: zp[2]:144 [ gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] 101: zp[1]:335 [ gfx_init_screen3::$1 ] 28.8: zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] +Uplift Scope [gfx_init_plane_horisontal] 592: zp[2]:77 [ gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 ] 202: zp[1]:301 [ gfx_init_plane_horisontal::$2 ] 176.75: zp[1]:79 [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] 27.68: zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] +Uplift Scope [gfx_init_screen1] 212.1: zp[1]:151 [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] 202: zp[1]:343 [ gfx_init_screen1::$0 ] 202: zp[1]:344 [ gfx_init_screen1::$1 ] 143.1: zp[2]:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] 31.88: zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] +Uplift Scope [form_set_screen] 218.83: zp[1]:49 [ form_set_screen::y#2 form_set_screen::y#1 ] 202: zp[1]:279 [ form_set_screen::$0 ] 202: zp[1]:280 [ form_set_screen::$1 ] 148.13: zp[2]:47 [ form_set_screen::line#2 form_set_screen::line#1 ] +Uplift Scope [gfx_init_plane_horisontal2] 202: zp[1]:299 [ gfx_init_plane_horisontal2::$2 ] 202: zp[1]:300 [ gfx_init_plane_horisontal2::row#0 ] 191.9: zp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] 143.1: zp[2]:69 [ gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] 31.88: zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Uplift Scope [gfx_init_charset] 214.5: zp[2]:135 [ gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 ] 202: zp[1]:137 [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] 169.27: zp[2]:133 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 ] 19.64: zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] -Uplift Scope [gfx_init_plane_fill] 227.6: zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] 218.83: zp[1]:66 [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ] 20.17: zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] 5.61: zp[1]:62 [ gfx_init_plane_fill::fill#6 ] 4: zp[4]:280 [ gfx_init_plane_fill::$0 ] 4: zp[2]:284 [ gfx_init_plane_fill::$1 ] 4: zp[1]:286 [ gfx_init_plane_fill::gfxbCpuBank#0 ] 4: zp[2]:287 [ gfx_init_plane_fill::$4 ] 4: zp[2]:289 [ gfx_init_plane_fill::$5 ] 2: zp[2]:291 [ gfx_init_plane_fill::gfxb#0 ] 0.67: zp[4]:58 [ gfx_init_plane_fill::plane_addr#3 ] -Uplift Scope [bitmap_clear] 227.6: zp[2]:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] 218.83: zp[1]:126 [ bitmap_clear::x#2 bitmap_clear::x#1 ] 20.17: zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] 2: zp[2]:321 [ bitmap_clear::bitmap#0 ] +Uplift Scope [gfx_init_plane_fill] 227.6: zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] 218.83: zp[1]:66 [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ] 20.17: zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] 5.61: zp[1]:62 [ gfx_init_plane_fill::fill#6 ] 4: zp[4]:286 [ gfx_init_plane_fill::$0 ] 4: zp[2]:290 [ gfx_init_plane_fill::$1 ] 4: zp[1]:292 [ gfx_init_plane_fill::gfxbCpuBank#0 ] 4: zp[2]:293 [ gfx_init_plane_fill::$4 ] 4: zp[2]:295 [ gfx_init_plane_fill::$5 ] 2: zp[2]:297 [ gfx_init_plane_fill::gfxb#0 ] 0.67: zp[4]:58 [ gfx_init_plane_fill::plane_addr#3 ] +Uplift Scope [bitmap_clear] 227.6: zp[2]:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] 218.83: zp[1]:126 [ bitmap_clear::x#2 bitmap_clear::x#1 ] 20.17: zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] 2: zp[2]:327 [ bitmap_clear::bitmap#0 ] Uplift Scope [gfx_init_screen4] 221.6: zp[2]:139 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 ] 218.83: zp[1]:141 [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] 20.17: zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] Uplift Scope [gfx_init_plane_vertical] 221.6: zp[2]:73 [ gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 ] 218.83: zp[1]:75 [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] 20.17: zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] -Uplift Scope [memset] 341.33: zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 17.17: zp[2]:278 [ memset::end#0 ] 0.67: zp[2]:276 [ memset::str#0 ] +Uplift Scope [memset] 341.33: zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 17.17: zp[2]:284 [ memset::end#0 ] 0.67: zp[2]:282 [ memset::str#0 ] Uplift Scope [dtvSetCpuBankSegment1] 311: zp[1]:67 [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBankIdx#1 dtvSetCpuBankSegment1::cpuBankIdx#11 ] -Uplift Scope [keyboard_event_get] 202: zp[1]:237 [ keyboard_event_get::return#3 ] 30.25: zp[1]:13 [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] 4: zp[1]:267 [ keyboard_event_get::return#4 ] +Uplift Scope [keyboard_event_get] 202: zp[1]:237 [ keyboard_event_get::return#3 ] 30.25: zp[1]:13 [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] 4: zp[1]:273 [ keyboard_event_get::return#4 ] Uplift Scope [render_preset_name] 217.36: zp[1]:34 [ render_preset_name::idx#10 render_preset_name::idx#0 render_preset_name::idx#1 ] 2: zp[2]:35 [ render_preset_name::name#13 ] -Uplift Scope [bitmap_init] 39.88: zp[2]:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 24.93: zp[1]:128 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 23.83: zp[1]:127 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp[1]:129 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp[1]:323 [ bitmap_init::$0 ] 22: zp[1]:325 [ bitmap_init::$7 ] 22: zp[1]:326 [ bitmap_init::$8 ] 22: zp[1]:327 [ bitmap_init::$9 ] 5.5: zp[1]:324 [ bitmap_init::$10 ] +Uplift Scope [bitmap_init] 39.88: zp[2]:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] 24.93: zp[1]:128 [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] 23.83: zp[1]:127 [ bitmap_init::x#2 bitmap_init::x#1 ] 22: zp[1]:129 [ bitmap_init::y#2 bitmap_init::y#1 ] 22: zp[1]:329 [ bitmap_init::$0 ] 22: zp[1]:331 [ bitmap_init::$7 ] 22: zp[1]:332 [ bitmap_init::$8 ] 22: zp[1]:333 [ bitmap_init::$9 ] 5.5: zp[1]:330 [ bitmap_init::$10 ] Uplift Scope [gfx_init_vic_bitmap] 33: zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] Uplift Scope [keyboard_event_pressed] 4: zp[1]:242 [ keyboard_event_pressed::return#0 ] 4: zp[1]:244 [ keyboard_event_pressed::return#1 ] 4: zp[1]:246 [ keyboard_event_pressed::return#2 ] 4: zp[1]:248 [ keyboard_event_pressed::return#3 ] 4: zp[1]:254 [ keyboard_event_pressed::$0 ] 4: zp[1]:256 [ keyboard_event_pressed::$1 ] 2: zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] 1.67: zp[1]:257 [ keyboard_event_pressed::return#10 ] 1.33: zp[1]:19 [ keyboard_event_pressed::keycode#4 ] Uplift Scope [get_vic_screen] 10.8: zp[1]:20 [ get_vic_screen::idx#2 get_vic_screen::idx#0 get_vic_screen::idx#1 ] 4: zp[2]:208 [ get_vic_screen::return#10 ] 4: zp[2]:227 [ get_vic_screen::return#11 ] 1: zp[2]:21 [ get_vic_screen::return#5 ] Uplift Scope [get_plane] 10.29: zp[1]:25 [ get_plane::idx#10 get_plane::idx#1 get_plane::idx#0 ] 4: zp[4]:160 [ get_plane::return#16 ] 4: zp[4]:185 [ get_plane::return#17 ] 1: zp[4]:26 [ get_plane::return#14 ] -Uplift Scope [bitmap_line] 1.75: zp[1]:303 [ bitmap_line::y1#0 ] 1.67: zp[1]:302 [ bitmap_line::y0#0 ] 1.32: zp[1]:301 [ bitmap_line::x1#0 ] 1.26: zp[1]:300 [ bitmap_line::x0#0 ] 0.89: zp[1]:305 [ bitmap_line::yd#2 ] 0.89: zp[1]:306 [ bitmap_line::yd#1 ] 0.89: zp[1]:308 [ bitmap_line::yd#10 ] 0.89: zp[1]:309 [ bitmap_line::yd#11 ] 0.7: zp[1]:304 [ bitmap_line::xd#2 ] 0.7: zp[1]:307 [ bitmap_line::xd#1 ] +Uplift Scope [bitmap_line] 1.75: zp[1]:309 [ bitmap_line::y1#0 ] 1.67: zp[1]:308 [ bitmap_line::y0#0 ] 1.32: zp[1]:307 [ bitmap_line::x1#0 ] 1.26: zp[1]:306 [ bitmap_line::x0#0 ] 0.89: zp[1]:311 [ bitmap_line::yd#2 ] 0.89: zp[1]:312 [ bitmap_line::yd#1 ] 0.89: zp[1]:314 [ bitmap_line::yd#10 ] 0.89: zp[1]:315 [ bitmap_line::yd#11 ] 0.7: zp[1]:310 [ bitmap_line::xd#2 ] 0.7: zp[1]:313 [ bitmap_line::xd#1 ] Uplift Scope [get_vic_charset] 4: zp[2]:218 [ get_vic_charset::return#4 ] 3: zp[1]:217 [ get_vic_charset::idx#0 ] 0.67: zp[2]:23 [ get_vic_charset::return#2 ] Uplift Scope [RADIX] Uplift Scope [print_ln] @@ -20164,378 +19985,381 @@ Uplift Scope [gfx_init_plane_vertical2] Uplift Scope [gfx_init_plane_blank] Uplift Scope [gfx_init_plane_full] -Uplifting [keyboard_event_scan] best 15480995 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] zp[1]:252 [ keyboard_event_scan::event_type#0 ] zp[1]:253 [ keyboard_event_scan::$23 ] zp[1]:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp[1]:17 [ 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[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp[1]:241 [ keyboard_event_scan::row_scan#0 ] zp[1]:243 [ keyboard_event_scan::$0 ] zp[1]:245 [ keyboard_event_scan::$3 ] zp[1]:247 [ keyboard_event_scan::$6 ] zp[1]:249 [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 15481031 combination reg byte a [ keyboard_event_scan::$15 ] reg byte a [ keyboard_event_scan::$16 ] zp[1]:252 [ keyboard_event_scan::event_type#0 ] zp[1]:253 [ keyboard_event_scan::$23 ] zp[1]:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp[1]:17 [ 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[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp[1]:241 [ keyboard_event_scan::row_scan#0 ] zp[1]:243 [ keyboard_event_scan::$0 ] zp[1]:245 [ keyboard_event_scan::$3 ] zp[1]:247 [ keyboard_event_scan::$6 ] zp[1]:249 [ keyboard_event_scan::$9 ] Limited combination testing to 10 combinations of 5308416 possible. -Uplifting [] best 15480977 combination zp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] zp[2]:52 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 ] zp[2]:54 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] zp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] zp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] reg byte x [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] +Uplifting [] best 15481013 combination zp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] zp[2]:52 [ print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 ] zp[2]:54 [ print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] zp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] zp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] reg byte x [ keyboard_modifiers#21 keyboard_modifiers#20 keyboard_modifiers#19 keyboard_modifiers#18 keyboard_modifiers#3 keyboard_modifiers#4 keyboard_modifiers#5 ] Limited combination testing to 10 combinations of 16 possible. -Uplifting [keyboard_matrix_read] best 15390974 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] zp[1]:258 [ keyboard_matrix_read::return#0 ] +Uplifting [keyboard_matrix_read] best 15391010 combination reg byte a [ keyboard_matrix_read::return#2 ] reg byte x [ keyboard_matrix_read::rowid#0 ] zp[1]:258 [ keyboard_matrix_read::return#0 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [gfx_init_plane_charset8] best 15375974 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$2 ] zp[1]:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp[2]:85 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] zp[2]:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplifting [gfx_init_plane_charset8] best 15376010 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$2 ] zp[1]:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp[2]:85 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] zp[2]:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Limited combination testing to 10 combinations of 1152 possible. -Uplifting [print_str_at] best 15375974 combination zp[2]:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] zp[2]:39 [ print_str_at::at#2 print_str_at::at#0 ] -Uplifting [apply_preset] best 15363641 combination reg byte y [ apply_preset::i#2 apply_preset::i#1 ] zp[2]:43 [ apply_preset::preset#15 ] reg byte a [ apply_preset::idx#0 ] +Uplifting [print_str_at] best 15376010 combination zp[2]:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] zp[2]:39 [ print_str_at::at#2 print_str_at::at#0 ] +Uplifting [apply_preset] best 15363677 combination reg byte y [ apply_preset::i#2 apply_preset::i#1 ] zp[2]:43 [ apply_preset::preset#15 ] reg byte a [ apply_preset::idx#0 ] Limited combination testing to 10 combinations of 12 possible. -Uplifting [form_render_values] best 15348641 combination reg byte x [ form_render_values::idx#2 form_render_values::idx#1 ] -Uplifting [form_mode] best 15341441 combination reg byte a [ form_mode::$11 ] zp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] reg byte x [ form_mode::i#2 form_mode::i#1 ] +Uplifting [form_render_values] best 15348677 combination reg byte x [ form_render_values::idx#2 form_render_values::idx#1 ] +Uplifting [form_mode] best 15341477 combination reg byte a [ form_mode::$11 ] zp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] reg byte x [ form_mode::i#2 form_mode::i#1 ] Limited combination testing to 10 combinations of 24 possible. -Uplifting [print_str_lines] best 15329441 combination zp[2]:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ] reg byte a [ print_str_lines::ch#0 ] -Uplifting [form_field_ptr] best 15326428 combination reg byte x [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] zp[1]:265 [ form_field_ptr::x#0 ] reg byte a [ form_field_ptr::y#0 ] zp[2]:263 [ form_field_ptr::line#0 ] -Limited combination testing to 10 combinations of 24 possible. -Uplifting [form_control] best 15319419 combination reg byte a [ form_control::return#0 ] reg byte x [ form_control::return#2 ] zp[1]:266 [ form_control::$12 ] zp[1]:269 [ form_control::$14 ] zp[1]:270 [ form_control::$15 ] zp[1]:271 [ form_control::$22 ] zp[1]:272 [ form_control::$13 ] zp[1]:268 [ form_control::key_event#0 ] -Limited combination testing to 10 combinations of 65536 possible. -Uplifting [bitmap_plot] best 15317010 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp[2]:313 [ bitmap_plot::plotter_y#0 ] zp[1]:317 [ bitmap_plot::$1 ] zp[2]:311 [ bitmap_plot::plotter_x#0 ] zp[2]:315 [ bitmap_plot::plotter#0 ] +Uplifting [print_str_lines] best 15329477 combination zp[2]:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 ] reg byte a [ print_str_lines::ch#0 ] +Uplifting [form_field_ptr] best 15326468 combination reg byte x [ form_field_ptr::field_idx#2 form_field_ptr::field_idx#1 form_field_ptr::field_idx#0 ] zp[1]:265 [ form_field_ptr::x#0 ] zp[1]:262 [ form_field_ptr::y#0 ] zp[2]:268 [ form_field_ptr::return#3 ] zp[2]:266 [ form_field_ptr::return#0 ] zp[2]:263 [ form_field_ptr::line#0 ] Limited combination testing to 10 combinations of 36 possible. -Uplifting [gfx_init_screen2] best 15315810 combination reg byte a [ gfx_init_screen2::$0 ] reg byte a [ gfx_init_screen2::$3 ] zp[1]:336 [ gfx_init_screen2::$4 ] zp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] zp[1]:333 [ gfx_init_screen2::col#0 ] zp[2]:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 ] zp[1]:334 [ gfx_init_screen2::col2#0 ] zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] +Uplifting [form_control] best 15319459 combination reg byte a [ form_control::return#0 ] reg byte x [ form_control::return#2 ] zp[1]:272 [ form_control::$12 ] zp[1]:275 [ form_control::$14 ] zp[1]:276 [ form_control::$15 ] zp[1]:277 [ form_control::$22 ] zp[1]:278 [ form_control::$13 ] zp[1]:274 [ form_control::key_event#0 ] zp[2]:270 [ form_control::field#0 ] +Limited combination testing to 10 combinations of 65536 possible. +Uplifting [bitmap_plot] best 15317050 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp[2]:319 [ bitmap_plot::plotter_y#0 ] zp[1]:323 [ bitmap_plot::$1 ] zp[2]:317 [ bitmap_plot::plotter_x#0 ] zp[2]:321 [ bitmap_plot::plotter#0 ] +Limited combination testing to 10 combinations of 36 possible. +Uplifting [gfx_init_screen2] best 15315850 combination reg byte a [ gfx_init_screen2::$0 ] reg byte a [ gfx_init_screen2::$3 ] zp[1]:342 [ gfx_init_screen2::$4 ] zp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] zp[1]:339 [ gfx_init_screen2::col#0 ] zp[2]:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 ] zp[1]:340 [ gfx_init_screen2::col2#0 ] zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] Limited combination testing to 10 combinations of 2304 possible. -Uplifting [gfx_init_plane_8bppchunky] best 15314580 combination reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] zp[2]:94 [ gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] reg byte a [ gfx_init_plane_8bppchunky::c#0 ] zp[2]:91 [ gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 ] zp[2]:297 [ gfx_init_plane_8bppchunky::$5 ] zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] +Uplifting [gfx_init_plane_8bppchunky] best 15314620 combination reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] zp[2]:94 [ gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] reg byte a [ gfx_init_plane_8bppchunky::c#0 ] zp[2]:91 [ gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 ] zp[2]:303 [ gfx_init_plane_8bppchunky::$5 ] zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] Limited combination testing to 10 combinations of 16 possible. -Uplifting [bitmap_line_xdyi] best 15313980 combination zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] reg byte x [ bitmap_line_xdyi::$6 ] zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplifting [bitmap_line_xdyi] best 15314020 combination zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] reg byte x [ bitmap_line_xdyi::$6 ] zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [bitmap_line_xdyd] best 15313380 combination zp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] reg byte x [ bitmap_line_xdyd::$6 ] zp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplifting [bitmap_line_xdyd] best 15313420 combination zp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] reg byte x [ bitmap_line_xdyd::$6 ] zp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [bitmap_line_ydxi] best 15312374 combination zp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte a [ bitmap_line_ydxi::$6 ] zp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplifting [bitmap_line_ydxi] best 15312414 combination zp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte a [ bitmap_line_ydxi::$6 ] zp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [bitmap_line_ydxd] best 15311368 combination zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte a [ bitmap_line_ydxd::$6 ] zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] +Uplifting [bitmap_line_ydxd] best 15311408 combination zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte a [ bitmap_line_ydxd::$6 ] zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] Limited combination testing to 10 combinations of 256 possible. -Uplifting [gfx_init_screen0] best 15310168 combination reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] zp[1]:342 [ gfx_init_screen0::$3 ] zp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp[1]:340 [ gfx_init_screen0::$1 ] zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplifting [gfx_init_screen0] best 15310208 combination reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] zp[1]:348 [ gfx_init_screen0::$3 ] zp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp[1]:346 [ gfx_init_screen0::$1 ] zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] Limited combination testing to 10 combinations of 768 possible. -Uplifting [gfx_init_screen3] best 15308968 combination reg byte a [ gfx_init_screen3::$0 ] reg byte a [ gfx_init_screen3::$2 ] zp[1]:331 [ gfx_init_screen3::$3 ] zp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] zp[2]:144 [ gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] zp[1]:329 [ gfx_init_screen3::$1 ] zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] +Uplifting [gfx_init_screen3] best 15309008 combination reg byte a [ gfx_init_screen3::$0 ] reg byte a [ gfx_init_screen3::$2 ] zp[1]:337 [ gfx_init_screen3::$3 ] zp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] zp[2]:144 [ gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] zp[1]:335 [ gfx_init_screen3::$1 ] zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] Limited combination testing to 10 combinations of 768 possible. -Uplifting [gfx_init_plane_horisontal] best 15307468 combination zp[2]:77 [ gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 ] reg byte a [ gfx_init_plane_horisontal::$2 ] reg byte x [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] +Uplifting [gfx_init_plane_horisontal] best 15307508 combination zp[2]:77 [ gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 ] reg byte a [ gfx_init_plane_horisontal::$2 ] reg byte x [ gfx_init_plane_horisontal::ax#2 gfx_init_plane_horisontal::ax#1 ] zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] Limited combination testing to 10 combinations of 16 possible. -Uplifting [gfx_init_screen1] best 15305868 combination reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] reg byte a [ gfx_init_screen1::$0 ] zp[1]:338 [ gfx_init_screen1::$1 ] zp[2]:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] +Uplifting [gfx_init_screen1] best 15305908 combination reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] reg byte a [ gfx_init_screen1::$0 ] zp[1]:344 [ gfx_init_screen1::$1 ] zp[2]:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [form_set_screen] best 15303768 combination reg byte x [ form_set_screen::y#2 form_set_screen::y#1 ] reg byte a [ form_set_screen::$0 ] zp[1]:274 [ form_set_screen::$1 ] zp[2]:47 [ form_set_screen::line#2 form_set_screen::line#1 ] +Uplifting [form_set_screen] best 15303808 combination reg byte x [ form_set_screen::y#2 form_set_screen::y#1 ] reg byte a [ form_set_screen::$0 ] zp[1]:280 [ form_set_screen::$1 ] zp[2]:47 [ form_set_screen::line#2 form_set_screen::line#1 ] Limited combination testing to 10 combinations of 48 possible. -Uplifting [gfx_init_plane_horisontal2] best 15302768 combination reg byte a [ gfx_init_plane_horisontal2::$2 ] reg byte a [ gfx_init_plane_horisontal2::row#0 ] zp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] zp[2]:69 [ gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] +Uplifting [gfx_init_plane_horisontal2] best 15302808 combination reg byte a [ gfx_init_plane_horisontal2::$2 ] reg byte a [ gfx_init_plane_horisontal2::row#0 ] zp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] zp[2]:69 [ gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [gfx_init_charset] best 15301868 combination zp[2]:135 [ gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 ] reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] zp[2]:133 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 ] zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] -Uplifting [gfx_init_plane_fill] best 15300962 combination zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] reg byte x [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ] zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] zp[1]:62 [ gfx_init_plane_fill::fill#6 ] zp[4]:280 [ gfx_init_plane_fill::$0 ] zp[2]:284 [ gfx_init_plane_fill::$1 ] reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ] zp[2]:287 [ gfx_init_plane_fill::$4 ] zp[2]:289 [ gfx_init_plane_fill::$5 ] zp[2]:291 [ gfx_init_plane_fill::gfxb#0 ] zp[4]:58 [ gfx_init_plane_fill::plane_addr#3 ] +Uplifting [gfx_init_charset] best 15301908 combination zp[2]:135 [ gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 ] reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] zp[2]:133 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 ] zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] +Uplifting [gfx_init_plane_fill] best 15301002 combination zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] reg byte x [ gfx_init_plane_fill::bx#2 gfx_init_plane_fill::bx#1 ] zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] zp[1]:62 [ gfx_init_plane_fill::fill#6 ] zp[4]:286 [ gfx_init_plane_fill::$0 ] zp[2]:290 [ gfx_init_plane_fill::$1 ] reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ] zp[2]:293 [ gfx_init_plane_fill::$4 ] zp[2]:295 [ gfx_init_plane_fill::$5 ] zp[2]:297 [ gfx_init_plane_fill::gfxb#0 ] zp[4]:58 [ gfx_init_plane_fill::plane_addr#3 ] Limited combination testing to 10 combinations of 32 possible. -Uplifting [bitmap_clear] best 15300062 combination zp[2]:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp[2]:321 [ bitmap_clear::bitmap#0 ] -Uplifting [gfx_init_screen4] best 15299162 combination zp[2]:139 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 ] reg byte x [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] -Uplifting [gfx_init_plane_vertical] best 15298262 combination zp[2]:73 [ gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 ] reg byte x [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] -Uplifting [memset] best 15298262 combination zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:278 [ memset::end#0 ] zp[2]:276 [ memset::str#0 ] -Uplifting [dtvSetCpuBankSegment1] best 15298123 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBankIdx#1 dtvSetCpuBankSegment1::cpuBankIdx#11 ] -Uplifting [keyboard_event_get] best 15297214 combination reg byte a [ keyboard_event_get::return#3 ] reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] zp[1]:267 [ keyboard_event_get::return#4 ] +Uplifting [bitmap_clear] best 15300102 combination zp[2]:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp[2]:327 [ bitmap_clear::bitmap#0 ] +Uplifting [gfx_init_screen4] best 15299202 combination zp[2]:139 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 ] reg byte x [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] +Uplifting [gfx_init_plane_vertical] best 15298302 combination zp[2]:73 [ gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 ] reg byte x [ gfx_init_plane_vertical::bx#2 gfx_init_plane_vertical::bx#1 ] zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] +Uplifting [memset] best 15298302 combination zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:284 [ memset::end#0 ] zp[2]:282 [ memset::str#0 ] +Uplifting [dtvSetCpuBankSegment1] best 15298163 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#13 dtvSetCpuBankSegment1::cpuBankIdx#1 dtvSetCpuBankSegment1::cpuBankIdx#11 ] +Uplifting [keyboard_event_get] best 15297254 combination reg byte a [ keyboard_event_get::return#3 ] reg byte a [ keyboard_event_get::return#2 keyboard_event_get::return#1 ] zp[1]:273 [ keyboard_event_get::return#4 ] Limited combination testing to 10 combinations of 64 possible. -Uplifting [render_preset_name] best 15296878 combination reg byte a [ render_preset_name::idx#10 render_preset_name::idx#0 render_preset_name::idx#1 ] zp[2]:35 [ render_preset_name::name#13 ] -Uplifting [bitmap_init] best 15296578 combination zp[2]:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] zp[1]:129 [ bitmap_init::y#2 bitmap_init::y#1 ] zp[1]:323 [ bitmap_init::$0 ] zp[1]:325 [ bitmap_init::$7 ] zp[1]:326 [ bitmap_init::$8 ] zp[1]:327 [ bitmap_init::$9 ] zp[1]:324 [ bitmap_init::$10 ] +Uplifting [render_preset_name] best 15296918 combination reg byte a [ render_preset_name::idx#10 render_preset_name::idx#0 render_preset_name::idx#1 ] zp[2]:35 [ render_preset_name::name#13 ] +Uplifting [bitmap_init] best 15296618 combination zp[2]:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] zp[1]:129 [ bitmap_init::y#2 bitmap_init::y#1 ] zp[1]:329 [ bitmap_init::$0 ] zp[1]:331 [ bitmap_init::$7 ] zp[1]:332 [ bitmap_init::$8 ] zp[1]:333 [ bitmap_init::$9 ] zp[1]:330 [ bitmap_init::$10 ] Limited combination testing to 10 combinations of 34560 possible. -Uplifting [gfx_init_vic_bitmap] best 15296578 combination zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] -Uplifting [keyboard_event_pressed] best 15296566 combination reg byte a [ keyboard_event_pressed::return#0 ] reg byte a [ keyboard_event_pressed::return#1 ] zp[1]:246 [ keyboard_event_pressed::return#2 ] zp[1]:248 [ keyboard_event_pressed::return#3 ] zp[1]:254 [ keyboard_event_pressed::$0 ] zp[1]:256 [ keyboard_event_pressed::$1 ] zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] zp[1]:257 [ keyboard_event_pressed::return#10 ] zp[1]:19 [ keyboard_event_pressed::keycode#4 ] +Uplifting [gfx_init_vic_bitmap] best 15296618 combination zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] +Uplifting [keyboard_event_pressed] best 15296606 combination reg byte a [ keyboard_event_pressed::return#0 ] reg byte a [ keyboard_event_pressed::return#1 ] zp[1]:246 [ keyboard_event_pressed::return#2 ] zp[1]:248 [ keyboard_event_pressed::return#3 ] zp[1]:254 [ keyboard_event_pressed::$0 ] zp[1]:256 [ keyboard_event_pressed::$1 ] zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] zp[1]:257 [ keyboard_event_pressed::return#10 ] zp[1]:19 [ keyboard_event_pressed::keycode#4 ] Limited combination testing to 10 combinations of 147456 possible. -Uplifting [get_vic_screen] best 15296545 combination reg byte a [ get_vic_screen::idx#2 get_vic_screen::idx#0 get_vic_screen::idx#1 ] zp[2]:208 [ get_vic_screen::return#10 ] zp[2]:227 [ get_vic_screen::return#11 ] zp[2]:21 [ get_vic_screen::return#5 ] -Uplifting [get_plane] best 15296497 combination reg byte a [ get_plane::idx#10 get_plane::idx#1 get_plane::idx#0 ] zp[4]:160 [ get_plane::return#16 ] zp[4]:185 [ get_plane::return#17 ] zp[4]:26 [ get_plane::return#14 ] -Uplifting [bitmap_line] best 15296451 combination zp[1]:303 [ bitmap_line::y1#0 ] zp[1]:302 [ bitmap_line::y0#0 ] reg byte x [ bitmap_line::x1#0 ] zp[1]:300 [ bitmap_line::x0#0 ] zp[1]:305 [ bitmap_line::yd#2 ] zp[1]:306 [ bitmap_line::yd#1 ] zp[1]:308 [ bitmap_line::yd#10 ] zp[1]:309 [ bitmap_line::yd#11 ] zp[1]:304 [ bitmap_line::xd#2 ] zp[1]:307 [ bitmap_line::xd#1 ] +Uplifting [get_vic_screen] best 15296585 combination reg byte a [ get_vic_screen::idx#2 get_vic_screen::idx#0 get_vic_screen::idx#1 ] zp[2]:208 [ get_vic_screen::return#10 ] zp[2]:227 [ get_vic_screen::return#11 ] zp[2]:21 [ get_vic_screen::return#5 ] +Uplifting [get_plane] best 15296537 combination reg byte a [ get_plane::idx#10 get_plane::idx#1 get_plane::idx#0 ] zp[4]:160 [ get_plane::return#16 ] zp[4]:185 [ get_plane::return#17 ] zp[4]:26 [ get_plane::return#14 ] +Uplifting [bitmap_line] best 15296491 combination zp[1]:309 [ bitmap_line::y1#0 ] zp[1]:308 [ bitmap_line::y0#0 ] reg byte x [ bitmap_line::x1#0 ] zp[1]:306 [ bitmap_line::x0#0 ] zp[1]:311 [ bitmap_line::yd#2 ] zp[1]:312 [ bitmap_line::yd#1 ] zp[1]:314 [ bitmap_line::yd#10 ] zp[1]:315 [ bitmap_line::yd#11 ] zp[1]:310 [ bitmap_line::xd#2 ] zp[1]:313 [ bitmap_line::xd#1 ] Limited combination testing to 10 combinations of 186624 possible. -Uplifting [get_vic_charset] best 15296442 combination zp[2]:218 [ get_vic_charset::return#4 ] reg byte a [ get_vic_charset::idx#0 ] zp[2]:23 [ get_vic_charset::return#2 ] -Uplifting [RADIX] best 15296442 combination -Uplifting [print_ln] best 15296442 combination -Uplifting [print_cls] best 15296442 combination -Uplifting [print_set_screen] best 15296442 combination -Uplifting [keyboard_init] best 15296442 combination -Uplifting [main] best 15296442 combination -Uplifting [gfx_init] best 15296442 combination -Uplifting [gfx_init_plane_vertical2] best 15296442 combination -Uplifting [gfx_init_plane_blank] best 15296442 combination -Uplifting [gfx_init_plane_full] best 15296442 combination +Uplifting [get_vic_charset] best 15296482 combination zp[2]:218 [ get_vic_charset::return#4 ] reg byte a [ get_vic_charset::idx#0 ] zp[2]:23 [ get_vic_charset::return#2 ] +Uplifting [RADIX] best 15296482 combination +Uplifting [print_ln] best 15296482 combination +Uplifting [print_cls] best 15296482 combination +Uplifting [print_set_screen] best 15296482 combination +Uplifting [keyboard_init] best 15296482 combination +Uplifting [main] best 15296482 combination +Uplifting [gfx_init] best 15296482 combination +Uplifting [gfx_init_plane_vertical2] best 15296482 combination +Uplifting [gfx_init_plane_blank] best 15296482 combination +Uplifting [gfx_init_plane_full] best 15296482 combination Attempting to uplift remaining variables inzp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] -Uplifting [] best 15296442 combination zp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] +Uplifting [] best 15296482 combination zp[1]:18 [ keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] Attempting to uplift remaining variables inzp[1]:252 [ keyboard_event_scan::event_type#0 ] -Uplifting [keyboard_event_scan] best 14696442 combination reg byte a [ keyboard_event_scan::event_type#0 ] +Uplifting [keyboard_event_scan] best 14696482 combination reg byte a [ keyboard_event_scan::event_type#0 ] Attempting to uplift remaining variables inzp[1]:253 [ keyboard_event_scan::$23 ] -Uplifting [keyboard_event_scan] best 14096442 combination reg byte a [ keyboard_event_scan::$23 ] +Uplifting [keyboard_event_scan] best 14096482 combination reg byte a [ keyboard_event_scan::$23 ] Attempting to uplift remaining variables inzp[1]:16 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] -Uplifting [keyboard_event_scan] best 12596442 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Uplifting [keyboard_event_scan] best 12596482 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Attempting to uplift remaining variables inzp[1]:17 [ 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 12596442 combination zp[1]:17 [ 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 12596482 combination zp[1]:17 [ 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[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Uplifting [keyboard_event_scan] best 12596442 combination zp[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Uplifting [keyboard_event_scan] best 12596482 combination zp[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Attempting to uplift remaining variables inzp[1]:241 [ keyboard_event_scan::row_scan#0 ] -Uplifting [keyboard_event_scan] best 12596442 combination zp[1]:241 [ keyboard_event_scan::row_scan#0 ] +Uplifting [keyboard_event_scan] best 12596482 combination zp[1]:241 [ keyboard_event_scan::row_scan#0 ] Attempting to uplift remaining variables inzp[1]:258 [ keyboard_matrix_read::return#0 ] -Uplifting [keyboard_matrix_read] best 12566439 combination reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [keyboard_matrix_read] best 12566479 combination reg byte a [ keyboard_matrix_read::return#0 ] Attempting to uplift remaining variables inzp[1]:10 [ gfx_mode::cx#2 gfx_mode::cx#1 ] -Uplifting [gfx_mode] best 12557439 combination reg byte x [ gfx_mode::cx#2 gfx_mode::cx#1 ] +Uplifting [gfx_mode] best 12557479 combination reg byte x [ gfx_mode::cx#2 gfx_mode::cx#1 ] Attempting to uplift remaining variables inzp[1]:88 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] -Uplifting [gfx_init_plane_charset8] best 12548439 combination reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +Uplifting [gfx_init_plane_charset8] best 12548479 combination reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] Attempting to uplift remaining variables inzp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] -Uplifting [gfx_init_plane_charset8] best 12548439 combination zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Uplifting [gfx_init_plane_charset8] best 12548479 combination zp[1]:84 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] Attempting to uplift remaining variables inzp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] -Uplifting [gfx_init_plane_charset8] best 12548439 combination zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Uplifting [gfx_init_plane_charset8] best 12548479 combination zp[1]:87 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] Attempting to uplift remaining variables inzp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] -Uplifting [bitmap_line_xdyi] best 12548439 combination zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] +Uplifting [bitmap_line_xdyi] best 12548479 combination zp[1]:102 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] Attempting to uplift remaining variables inzp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] -Uplifting [bitmap_line_ydxi] best 12548439 combination zp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] +Uplifting [bitmap_line_ydxi] best 12548479 combination zp[1]:110 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] Attempting to uplift remaining variables inzp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] -Uplifting [bitmap_line_xdyd] best 12548439 combination zp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] +Uplifting [bitmap_line_xdyd] best 12548479 combination zp[1]:116 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] Attempting to uplift remaining variables inzp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] -Uplifting [bitmap_line_ydxd] best 12548439 combination zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] +Uplifting [bitmap_line_ydxd] best 12548479 combination zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] Attempting to uplift remaining variables inzp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] -Uplifting [form_mode] best 12548439 combination zp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] +Uplifting [form_mode] best 12548479 combination zp[1]:33 [ form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] Attempting to uplift remaining variables inzp[1]:11 [ gfx_mode::j#2 gfx_mode::j#1 ] -Uplifting [gfx_mode] best 12547239 combination reg byte x [ gfx_mode::j#2 gfx_mode::j#1 ] +Uplifting [gfx_mode] best 12547279 combination reg byte x [ gfx_mode::j#2 gfx_mode::j#1 ] Attempting to uplift remaining variables inzp[1]:12 [ gfx_mode::i#2 gfx_mode::i#1 ] -Uplifting [gfx_mode] best 12546039 combination reg byte x [ gfx_mode::i#2 gfx_mode::i#1 ] -Attempting to uplift remaining variables inzp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] -Uplifting [] best 12546039 combination zp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +Uplifting [gfx_mode] best 12546079 combination reg byte x [ gfx_mode::i#2 gfx_mode::i#1 ] Attempting to uplift remaining variables inzp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] -Uplifting [bitmap_line_xdyi] best 12546039 combination zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] +Uplifting [bitmap_line_xdyi] best 12546079 combination zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] Attempting to uplift remaining variables inzp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] -Uplifting [bitmap_line_xdyd] best 12546039 combination zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] -Attempting to uplift remaining variables inzp[1]:238 [ gfx_mode::keyboard_event#0 ] -Uplifting [gfx_mode] best 12545439 combination reg byte a [ gfx_mode::keyboard_event#0 ] -Attempting to uplift remaining variables inzp[1]:274 [ form_set_screen::$1 ] -Uplifting [form_set_screen] best 12544839 combination reg byte a [ form_set_screen::$1 ] -Attempting to uplift remaining variables inzp[1]:331 [ gfx_init_screen3::$3 ] -Uplifting [gfx_init_screen3] best 12544239 combination reg byte a [ gfx_init_screen3::$3 ] -Attempting to uplift remaining variables inzp[1]:336 [ gfx_init_screen2::$4 ] -Uplifting [gfx_init_screen2] best 12543639 combination reg byte a [ gfx_init_screen2::$4 ] -Attempting to uplift remaining variables inzp[1]:338 [ gfx_init_screen1::$1 ] -Uplifting [gfx_init_screen1] best 12543039 combination reg byte a [ gfx_init_screen1::$1 ] -Attempting to uplift remaining variables inzp[1]:342 [ gfx_init_screen0::$3 ] -Uplifting [gfx_init_screen0] best 12542439 combination reg byte a [ gfx_init_screen0::$3 ] -Attempting to uplift remaining variables inzp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -Uplifting [gfx_init_screen3] best 12541439 combination reg byte x [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -Attempting to uplift remaining variables inzp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] -Uplifting [gfx_init_screen0] best 12540439 combination reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] -Attempting to uplift remaining variables inzp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] -Uplifting [gfx_init_plane_horisontal2] best 12539539 combination reg byte x [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] -Attempting to uplift remaining variables inzp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] -Uplifting [gfx_init_screen2] best 12538539 combination reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] -Attempting to uplift remaining variables inzp[1]:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] -Uplifting [gfx_mode] best 12538539 combination zp[1]:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] -Attempting to uplift remaining variables inzp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] -Uplifting [gfx_init_plane_charset8] best 12538539 combination zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] -Attempting to uplift remaining variables inzp[1]:333 [ gfx_init_screen2::col#0 ] -Uplifting [gfx_init_screen2] best 12538439 combination reg byte y [ gfx_init_screen2::col#0 ] -Attempting to uplift remaining variables inzp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] -Uplifting [bitmap_line_xdyi] best 12538439 combination zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] -Attempting to uplift remaining variables inzp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] -Uplifting [bitmap_line_ydxi] best 12538439 combination zp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] -Attempting to uplift remaining variables inzp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] -Uplifting [bitmap_line_xdyd] best 12538439 combination zp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] -Attempting to uplift remaining variables inzp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] -Uplifting [bitmap_line_ydxd] best 12538439 combination zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] -Attempting to uplift remaining variables inzp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] -Uplifting [] best 12538439 combination zp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] -Attempting to uplift remaining variables inzp[1]:329 [ gfx_init_screen3::$1 ] -Uplifting [gfx_init_screen3] best 12538439 combination zp[1]:329 [ gfx_init_screen3::$1 ] -Attempting to uplift remaining variables inzp[1]:334 [ gfx_init_screen2::col2#0 ] -Uplifting [gfx_init_screen2] best 12538439 combination zp[1]:334 [ gfx_init_screen2::col2#0 ] -Attempting to uplift remaining variables inzp[1]:340 [ gfx_init_screen0::$1 ] -Uplifting [gfx_init_screen0] best 12538439 combination zp[1]:340 [ gfx_init_screen0::$1 ] -Attempting to uplift remaining variables inzp[1]:2 [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] -Uplifting [gfx_mode] best 12538420 combination reg byte x [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] +Uplifting [bitmap_line_xdyd] best 12546079 combination zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] Attempting to uplift remaining variables inzp[1]:265 [ form_field_ptr::x#0 ] -Uplifting [form_field_ptr] best 12538420 combination zp[1]:265 [ form_field_ptr::x#0 ] +Uplifting [form_field_ptr] best 12546079 combination zp[1]:265 [ form_field_ptr::x#0 ] +Attempting to uplift remaining variables inzp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +Uplifting [] best 12546079 combination zp[1]:31 [ form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +Attempting to uplift remaining variables inzp[1]:238 [ gfx_mode::keyboard_event#0 ] +Uplifting [gfx_mode] best 12545479 combination reg byte a [ gfx_mode::keyboard_event#0 ] +Attempting to uplift remaining variables inzp[1]:280 [ form_set_screen::$1 ] +Uplifting [form_set_screen] best 12544879 combination reg byte a [ form_set_screen::$1 ] +Attempting to uplift remaining variables inzp[1]:337 [ gfx_init_screen3::$3 ] +Uplifting [gfx_init_screen3] best 12544279 combination reg byte a [ gfx_init_screen3::$3 ] +Attempting to uplift remaining variables inzp[1]:342 [ gfx_init_screen2::$4 ] +Uplifting [gfx_init_screen2] best 12543679 combination reg byte a [ gfx_init_screen2::$4 ] +Attempting to uplift remaining variables inzp[1]:344 [ gfx_init_screen1::$1 ] +Uplifting [gfx_init_screen1] best 12543079 combination reg byte a [ gfx_init_screen1::$1 ] +Attempting to uplift remaining variables inzp[1]:348 [ gfx_init_screen0::$3 ] +Uplifting [gfx_init_screen0] best 12542479 combination reg byte a [ gfx_init_screen0::$3 ] +Attempting to uplift remaining variables inzp[1]:143 [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] +Uplifting [gfx_init_screen3] best 12541479 combination reg byte x [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] +Attempting to uplift remaining variables inzp[1]:155 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +Uplifting [gfx_init_screen0] best 12540479 combination reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +Attempting to uplift remaining variables inzp[1]:71 [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] +Uplifting [gfx_init_plane_horisontal2] best 12539579 combination reg byte x [ gfx_init_plane_horisontal2::ax#2 gfx_init_plane_horisontal2::ax#1 ] +Attempting to uplift remaining variables inzp[1]:147 [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] +Uplifting [gfx_init_screen2] best 12538579 combination reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] +Attempting to uplift remaining variables inzp[1]:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] +Uplifting [gfx_mode] best 12538579 combination zp[1]:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] +Attempting to uplift remaining variables inzp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Uplifting [gfx_init_plane_charset8] best 12538579 combination zp[1]:83 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Attempting to uplift remaining variables inzp[1]:339 [ gfx_init_screen2::col#0 ] +Uplifting [gfx_init_screen2] best 12538479 combination reg byte y [ gfx_init_screen2::col#0 ] +Attempting to uplift remaining variables inzp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] +Uplifting [bitmap_line_xdyi] best 12538479 combination zp[1]:100 [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] +Attempting to uplift remaining variables inzp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] +Uplifting [bitmap_line_ydxi] best 12538479 combination zp[1]:109 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] +Attempting to uplift remaining variables inzp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] +Uplifting [bitmap_line_xdyd] best 12538479 combination zp[1]:114 [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] +Attempting to uplift remaining variables inzp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] +Uplifting [bitmap_line_ydxd] best 12538479 combination zp[1]:121 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 ] +Attempting to uplift remaining variables inzp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +Uplifting [] best 12538479 combination zp[1]:32 [ form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +Attempting to uplift remaining variables inzp[1]:335 [ gfx_init_screen3::$1 ] +Uplifting [gfx_init_screen3] best 12538479 combination zp[1]:335 [ gfx_init_screen3::$1 ] +Attempting to uplift remaining variables inzp[1]:340 [ gfx_init_screen2::col2#0 ] +Uplifting [gfx_init_screen2] best 12538479 combination zp[1]:340 [ gfx_init_screen2::col2#0 ] +Attempting to uplift remaining variables inzp[1]:346 [ gfx_init_screen0::$1 ] +Uplifting [gfx_init_screen0] best 12538479 combination zp[1]:346 [ gfx_init_screen0::$1 ] +Attempting to uplift remaining variables inzp[1]:2 [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] +Uplifting [gfx_mode] best 12538460 combination reg byte x [ gfx_mode::dtv_control#12 gfx_mode::dtv_control#6 gfx_mode::dtv_control#13 gfx_mode::dtv_control#5 gfx_mode::dtv_control#11 gfx_mode::dtv_control#4 gfx_mode::dtv_control#10 gfx_mode::dtv_control#3 gfx_mode::dtv_control#15 gfx_mode::dtv_control#14 gfx_mode::dtv_control#2 ] Attempting to uplift remaining variables inzp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] -Uplifting [gfx_init_vic_bitmap] best 12538420 combination zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] +Uplifting [gfx_init_vic_bitmap] best 12538460 combination zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 ] Attempting to uplift remaining variables inzp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] -Uplifting [gfx_init_plane_horisontal2] best 12538420 combination zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] +Uplifting [gfx_init_plane_horisontal2] best 12538460 combination zp[1]:68 [ gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 ] Attempting to uplift remaining variables inzp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] -Uplifting [gfx_init_screen1] best 12538420 combination zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] +Uplifting [gfx_init_screen1] best 12538460 combination zp[1]:150 [ gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] Attempting to uplift remaining variables inzp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] -Uplifting [gfx_init_screen3] best 12538420 combination zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] +Uplifting [gfx_init_screen3] best 12538460 combination zp[1]:142 [ gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 ] Attempting to uplift remaining variables inzp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] -Uplifting [gfx_init_screen0] best 12538420 combination zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplifting [gfx_init_screen0] best 12538460 combination zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] Attempting to uplift remaining variables inzp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] -Uplifting [gfx_init_plane_horisontal] best 12538420 combination zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] +Uplifting [gfx_init_plane_horisontal] best 12538460 combination zp[1]:76 [ gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 ] Attempting to uplift remaining variables inzp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] -Uplifting [gfx_init_screen2] best 12538420 combination zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] +Uplifting [gfx_init_screen2] best 12538460 combination zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 ] Attempting to uplift remaining variables inzp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] -Uplifting [gfx_init_plane_8bppchunky] best 12538420 combination zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] +Uplifting [gfx_init_plane_8bppchunky] best 12538460 combination zp[1]:90 [ gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 ] Attempting to uplift remaining variables inzp[1]:129 [ bitmap_init::y#2 bitmap_init::y#1 ] -Uplifting [bitmap_init] best 12538240 combination reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] -Attempting to uplift remaining variables inzp[1]:323 [ bitmap_init::$0 ] -Uplifting [bitmap_init] best 12538200 combination reg byte a [ bitmap_init::$0 ] -Attempting to uplift remaining variables inzp[1]:325 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 12538140 combination reg byte a [ bitmap_init::$7 ] -Attempting to uplift remaining variables inzp[1]:326 [ bitmap_init::$8 ] -Uplifting [bitmap_init] best 12538080 combination reg byte a [ bitmap_init::$8 ] -Attempting to uplift remaining variables inzp[1]:327 [ bitmap_init::$9 ] -Uplifting [bitmap_init] best 12538020 combination reg byte a [ bitmap_init::$9 ] +Uplifting [bitmap_init] best 12538280 combination reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] +Attempting to uplift remaining variables inzp[1]:329 [ bitmap_init::$0 ] +Uplifting [bitmap_init] best 12538240 combination reg byte a [ bitmap_init::$0 ] +Attempting to uplift remaining variables inzp[1]:331 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 12538180 combination reg byte a [ bitmap_init::$7 ] +Attempting to uplift remaining variables inzp[1]:332 [ bitmap_init::$8 ] +Uplifting [bitmap_init] best 12538120 combination reg byte a [ bitmap_init::$8 ] +Attempting to uplift remaining variables inzp[1]:333 [ bitmap_init::$9 ] +Uplifting [bitmap_init] best 12538060 combination reg byte a [ bitmap_init::$9 ] Attempting to uplift remaining variables inzp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] -Uplifting [gfx_init_plane_fill] best 12538020 combination zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] +Uplifting [gfx_init_plane_fill] best 12538060 combination zp[1]:63 [ gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 ] Attempting to uplift remaining variables inzp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] -Uplifting [gfx_init_plane_vertical] best 12538020 combination zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] +Uplifting [gfx_init_plane_vertical] best 12538060 combination zp[1]:72 [ gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 ] Attempting to uplift remaining variables inzp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Uplifting [bitmap_clear] best 12538020 combination zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] +Uplifting [bitmap_clear] best 12538060 combination zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] Attempting to uplift remaining variables inzp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] -Uplifting [gfx_init_screen4] best 12538020 combination zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] +Uplifting [gfx_init_screen4] best 12538060 combination zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 ] Attempting to uplift remaining variables inzp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] -Uplifting [gfx_init_charset] best 12538020 combination zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] +Uplifting [gfx_init_charset] best 12538060 combination zp[1]:132 [ gfx_init_charset::c#4 gfx_init_charset::c#1 ] Attempting to uplift remaining variables inzp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] -Uplifting [bitmap_line_xdyi] best 12538020 combination zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] +Uplifting [bitmap_line_xdyi] best 12538060 combination zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] Attempting to uplift remaining variables inzp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] -Uplifting [bitmap_line_ydxi] best 12538020 combination zp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] +Uplifting [bitmap_line_ydxi] best 12538060 combination zp[1]:106 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] Attempting to uplift remaining variables inzp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] -Uplifting [bitmap_line_xdyd] best 12538020 combination zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] +Uplifting [bitmap_line_xdyd] best 12538060 combination zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] Attempting to uplift remaining variables inzp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] -Uplifting [bitmap_line_ydxd] best 12538020 combination zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] +Uplifting [bitmap_line_ydxd] best 12538060 combination zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 ] Attempting to uplift remaining variables inzp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] -Uplifting [gfx_init_plane_charset8] best 12538020 combination zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplifting [gfx_init_plane_charset8] best 12538060 combination zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] Attempting to uplift remaining variables inzp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] -Uplifting [bitmap_line_xdyi] best 12538020 combination zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] +Uplifting [bitmap_line_xdyi] best 12538060 combination zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] Attempting to uplift remaining variables inzp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] -Uplifting [bitmap_line_ydxi] best 12538020 combination zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] +Uplifting [bitmap_line_ydxi] best 12538060 combination zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] Attempting to uplift remaining variables inzp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] -Uplifting [bitmap_line_xdyd] best 12538020 combination zp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] +Uplifting [bitmap_line_xdyd] best 12538060 combination zp[1]:111 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] Attempting to uplift remaining variables inzp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] -Uplifting [bitmap_line_ydxd] best 12538020 combination zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] +Uplifting [bitmap_line_ydxd] best 12538060 combination zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] Attempting to uplift remaining variables inzp[1]:3 [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] -Uplifting [gfx_mode] best 12538009 combination reg byte x [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] +Uplifting [gfx_mode] best 12538049 combination reg byte x [ gfx_mode::vic_control#4 gfx_mode::vic_control#2 gfx_mode::vic_control#5 ] Attempting to uplift remaining variables inzp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Uplifting [bitmap_line_xdyi] best 12538009 combination zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplifting [bitmap_line_xdyi] best 12538049 combination zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] Attempting to uplift remaining variables inzp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] -Uplifting [bitmap_line_ydxi] best 12538009 combination zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplifting [bitmap_line_ydxi] best 12538049 combination zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] Attempting to uplift remaining variables inzp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] -Uplifting [bitmap_line_xdyd] best 12538009 combination zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplifting [bitmap_line_xdyd] best 12538049 combination zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] Attempting to uplift remaining variables inzp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] -Uplifting [bitmap_line_ydxd] best 12538009 combination zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] +Uplifting [bitmap_line_ydxd] best 12538049 combination zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] +Attempting to uplift remaining variables inzp[1]:262 [ form_field_ptr::y#0 ] +Uplifting [form_field_ptr] best 12538043 combination reg byte y [ form_field_ptr::y#0 ] Attempting to uplift remaining variables inzp[1]:62 [ gfx_init_plane_fill::fill#6 ] -Uplifting [gfx_init_plane_fill] best 12538009 combination zp[1]:62 [ gfx_init_plane_fill::fill#6 ] -Attempting to uplift remaining variables inzp[1]:324 [ bitmap_init::$10 ] -Uplifting [bitmap_init] best 12538009 combination zp[1]:324 [ bitmap_init::$10 ] +Uplifting [gfx_init_plane_fill] best 12538043 combination zp[1]:62 [ gfx_init_plane_fill::fill#6 ] +Attempting to uplift remaining variables inzp[1]:330 [ bitmap_init::$10 ] +Uplifting [bitmap_init] best 12538043 combination zp[1]:330 [ bitmap_init::$10 ] Attempting to uplift remaining variables inzp[1]:158 [ gfx_mode::$18 ] -Uplifting [gfx_mode] best 12538003 combination reg byte a [ gfx_mode::$18 ] +Uplifting [gfx_mode] best 12538037 combination reg byte a [ gfx_mode::$18 ] Attempting to uplift remaining variables inzp[1]:174 [ gfx_mode::$23 ] -Uplifting [gfx_mode] best 12537997 combination reg byte a [ gfx_mode::$23 ] +Uplifting [gfx_mode] best 12538031 combination reg byte a [ gfx_mode::$23 ] Attempting to uplift remaining variables inzp[1]:175 [ gfx_mode::$25 ] -Uplifting [gfx_mode] best 12537991 combination reg byte a [ gfx_mode::$25 ] +Uplifting [gfx_mode] best 12538025 combination reg byte a [ gfx_mode::$25 ] Attempting to uplift remaining variables inzp[1]:178 [ gfx_mode::$27 ] -Uplifting [gfx_mode] best 12537985 combination reg byte a [ gfx_mode::$27 ] +Uplifting [gfx_mode] best 12538019 combination reg byte a [ gfx_mode::$27 ] Attempting to uplift remaining variables inzp[1]:179 [ gfx_mode::$28 ] -Uplifting [gfx_mode] best 12537979 combination reg byte a [ gfx_mode::$28 ] +Uplifting [gfx_mode] best 12538013 combination reg byte a [ gfx_mode::$28 ] Attempting to uplift remaining variables inzp[1]:180 [ gfx_mode::$29 ] -Uplifting [gfx_mode] best 12537973 combination reg byte a [ gfx_mode::$29 ] +Uplifting [gfx_mode] best 12538007 combination reg byte a [ gfx_mode::$29 ] Attempting to uplift remaining variables inzp[1]:181 [ gfx_mode::$30 ] -Uplifting [gfx_mode] best 12537967 combination reg byte a [ gfx_mode::$30 ] +Uplifting [gfx_mode] best 12538001 combination reg byte a [ gfx_mode::$30 ] Attempting to uplift remaining variables inzp[1]:182 [ gfx_mode::$31 ] -Uplifting [gfx_mode] best 12537961 combination reg byte a [ gfx_mode::$31 ] +Uplifting [gfx_mode] best 12537995 combination reg byte a [ gfx_mode::$31 ] Attempting to uplift remaining variables inzp[1]:183 [ gfx_mode::$32 ] -Uplifting [gfx_mode] best 12537955 combination reg byte a [ gfx_mode::$32 ] +Uplifting [gfx_mode] best 12537989 combination reg byte a [ gfx_mode::$32 ] Attempting to uplift remaining variables inzp[1]:199 [ gfx_mode::$37 ] -Uplifting [gfx_mode] best 12537949 combination reg byte a [ gfx_mode::$37 ] +Uplifting [gfx_mode] best 12537983 combination reg byte a [ gfx_mode::$37 ] Attempting to uplift remaining variables inzp[1]:200 [ gfx_mode::$39 ] -Uplifting [gfx_mode] best 12537943 combination reg byte a [ gfx_mode::$39 ] +Uplifting [gfx_mode] best 12537977 combination reg byte a [ gfx_mode::$39 ] Attempting to uplift remaining variables inzp[1]:203 [ gfx_mode::$41 ] -Uplifting [gfx_mode] best 12537937 combination reg byte a [ gfx_mode::$41 ] +Uplifting [gfx_mode] best 12537971 combination reg byte a [ gfx_mode::$41 ] Attempting to uplift remaining variables inzp[1]:204 [ gfx_mode::$42 ] -Uplifting [gfx_mode] best 12537931 combination reg byte a [ gfx_mode::$42 ] +Uplifting [gfx_mode] best 12537965 combination reg byte a [ gfx_mode::$42 ] Attempting to uplift remaining variables inzp[1]:205 [ gfx_mode::$43 ] -Uplifting [gfx_mode] best 12537925 combination reg byte a [ gfx_mode::$43 ] +Uplifting [gfx_mode] best 12537959 combination reg byte a [ gfx_mode::$43 ] Attempting to uplift remaining variables inzp[1]:206 [ gfx_mode::$44 ] -Uplifting [gfx_mode] best 12537919 combination reg byte a [ gfx_mode::$44 ] +Uplifting [gfx_mode] best 12537953 combination reg byte a [ gfx_mode::$44 ] Attempting to uplift remaining variables inzp[1]:207 [ gfx_mode::$45 ] -Uplifting [gfx_mode] best 12537913 combination reg byte a [ gfx_mode::$45 ] +Uplifting [gfx_mode] best 12537947 combination reg byte a [ gfx_mode::$45 ] Attempting to uplift remaining variables inzp[1]:224 [ gfx_mode::$54 ] -Uplifting [gfx_mode] best 12537907 combination reg byte a [ gfx_mode::$54 ] +Uplifting [gfx_mode] best 12537941 combination reg byte a [ gfx_mode::$54 ] Attempting to uplift remaining variables inzp[1]:225 [ gfx_mode::$55 ] -Uplifting [gfx_mode] best 12537901 combination reg byte a [ gfx_mode::$55 ] +Uplifting [gfx_mode] best 12537935 combination reg byte a [ gfx_mode::$55 ] Attempting to uplift remaining variables inzp[1]:226 [ gfx_mode::$56 ] -Uplifting [gfx_mode] best 12537895 combination reg byte a [ gfx_mode::$56 ] +Uplifting [gfx_mode] best 12537929 combination reg byte a [ gfx_mode::$56 ] Attempting to uplift remaining variables inzp[1]:229 [ gfx_mode::$58 ] -Uplifting [gfx_mode] best 12537889 combination reg byte a [ gfx_mode::$58 ] +Uplifting [gfx_mode] best 12537923 combination reg byte a [ gfx_mode::$58 ] Attempting to uplift remaining variables inzp[1]:230 [ gfx_mode::$59 ] -Uplifting [gfx_mode] best 12537883 combination reg byte a [ gfx_mode::$59 ] +Uplifting [gfx_mode] best 12537917 combination reg byte a [ gfx_mode::$59 ] Attempting to uplift remaining variables inzp[1]:231 [ gfx_mode::$60 ] -Uplifting [gfx_mode] best 12537877 combination reg byte a [ gfx_mode::$60 ] +Uplifting [gfx_mode] best 12537911 combination reg byte a [ gfx_mode::$60 ] Attempting to uplift remaining variables inzp[1]:232 [ gfx_mode::$61 ] -Uplifting [gfx_mode] best 12537871 combination reg byte a [ gfx_mode::$61 ] +Uplifting [gfx_mode] best 12537905 combination reg byte a [ gfx_mode::$61 ] Attempting to uplift remaining variables inzp[1]:233 [ gfx_mode::$62 ] -Uplifting [gfx_mode] best 12537865 combination reg byte a [ gfx_mode::$62 ] +Uplifting [gfx_mode] best 12537899 combination reg byte a [ gfx_mode::$62 ] Attempting to uplift remaining variables inzp[1]:234 [ gfx_mode::$63 ] -Uplifting [gfx_mode] best 12537859 combination reg byte a [ gfx_mode::$63 ] +Uplifting [gfx_mode] best 12537893 combination reg byte a [ gfx_mode::$63 ] Attempting to uplift remaining variables inzp[1]:235 [ gfx_mode::$64 ] -Uplifting [gfx_mode] best 12537853 combination reg byte a [ gfx_mode::$64 ] +Uplifting [gfx_mode] best 12537887 combination reg byte a [ gfx_mode::$64 ] Attempting to uplift remaining variables inzp[1]:236 [ gfx_mode::$65 ] -Uplifting [gfx_mode] best 12537847 combination reg byte a [ gfx_mode::$65 ] +Uplifting [gfx_mode] best 12537881 combination reg byte a [ gfx_mode::$65 ] Attempting to uplift remaining variables inzp[1]:243 [ keyboard_event_scan::$0 ] -Uplifting [keyboard_event_scan] best 12537841 combination reg byte a [ keyboard_event_scan::$0 ] +Uplifting [keyboard_event_scan] best 12537875 combination reg byte a [ keyboard_event_scan::$0 ] Attempting to uplift remaining variables inzp[1]:245 [ keyboard_event_scan::$3 ] -Uplifting [keyboard_event_scan] best 12537835 combination reg byte a [ keyboard_event_scan::$3 ] +Uplifting [keyboard_event_scan] best 12537869 combination reg byte a [ keyboard_event_scan::$3 ] Attempting to uplift remaining variables inzp[1]:246 [ keyboard_event_pressed::return#2 ] -Uplifting [keyboard_event_pressed] best 12537829 combination reg byte a [ keyboard_event_pressed::return#2 ] +Uplifting [keyboard_event_pressed] best 12537863 combination reg byte a [ keyboard_event_pressed::return#2 ] Attempting to uplift remaining variables inzp[1]:247 [ keyboard_event_scan::$6 ] -Uplifting [keyboard_event_scan] best 12537823 combination reg byte a [ keyboard_event_scan::$6 ] +Uplifting [keyboard_event_scan] best 12537857 combination reg byte a [ keyboard_event_scan::$6 ] Attempting to uplift remaining variables inzp[1]:248 [ keyboard_event_pressed::return#3 ] -Uplifting [keyboard_event_pressed] best 12537817 combination reg byte a [ keyboard_event_pressed::return#3 ] +Uplifting [keyboard_event_pressed] best 12537851 combination reg byte a [ keyboard_event_pressed::return#3 ] Attempting to uplift remaining variables inzp[1]:249 [ keyboard_event_scan::$9 ] -Uplifting [keyboard_event_scan] best 12537811 combination reg byte a [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 12537845 combination reg byte a [ keyboard_event_scan::$9 ] Attempting to uplift remaining variables inzp[1]:254 [ keyboard_event_pressed::$0 ] -Uplifting [keyboard_event_pressed] best 12537807 combination reg byte a [ keyboard_event_pressed::$0 ] +Uplifting [keyboard_event_pressed] best 12537841 combination reg byte a [ keyboard_event_pressed::$0 ] Attempting to uplift remaining variables inzp[1]:256 [ keyboard_event_pressed::$1 ] -Uplifting [keyboard_event_pressed] best 12537803 combination reg byte a [ keyboard_event_pressed::$1 ] -Attempting to uplift remaining variables inzp[1]:266 [ form_control::$12 ] -Uplifting [form_control] best 12537797 combination reg byte a [ form_control::$12 ] -Attempting to uplift remaining variables inzp[1]:267 [ keyboard_event_get::return#4 ] -Uplifting [keyboard_event_get] best 12537791 combination reg byte a [ keyboard_event_get::return#4 ] -Attempting to uplift remaining variables inzp[1]:269 [ form_control::$14 ] -Uplifting [form_control] best 12537785 combination reg byte a [ form_control::$14 ] -Attempting to uplift remaining variables inzp[1]:270 [ form_control::$15 ] -Uplifting [form_control] best 12537781 combination reg byte a [ form_control::$15 ] -Attempting to uplift remaining variables inzp[1]:271 [ form_control::$22 ] -Uplifting [form_control] best 12537777 combination reg byte a [ form_control::$22 ] -Attempting to uplift remaining variables inzp[1]:272 [ form_control::$13 ] -Uplifting [form_control] best 12537771 combination reg byte a [ form_control::$13 ] -Attempting to uplift remaining variables inzp[1]:317 [ bitmap_plot::$1 ] -Uplifting [bitmap_plot] best 12537765 combination reg byte a [ bitmap_plot::$1 ] -Attempting to uplift remaining variables inzp[1]:268 [ form_control::key_event#0 ] -Uplifting [form_control] best 12537753 combination reg byte a [ form_control::key_event#0 ] +Uplifting [keyboard_event_pressed] best 12537837 combination reg byte a [ keyboard_event_pressed::$1 ] +Attempting to uplift remaining variables inzp[1]:272 [ form_control::$12 ] +Uplifting [form_control] best 12537831 combination reg byte a [ form_control::$12 ] +Attempting to uplift remaining variables inzp[1]:273 [ keyboard_event_get::return#4 ] +Uplifting [keyboard_event_get] best 12537825 combination reg byte a [ keyboard_event_get::return#4 ] +Attempting to uplift remaining variables inzp[1]:275 [ form_control::$14 ] +Uplifting [form_control] best 12537819 combination reg byte a [ form_control::$14 ] +Attempting to uplift remaining variables inzp[1]:276 [ form_control::$15 ] +Uplifting [form_control] best 12537815 combination reg byte a [ form_control::$15 ] +Attempting to uplift remaining variables inzp[1]:277 [ form_control::$22 ] +Uplifting [form_control] best 12537811 combination reg byte a [ form_control::$22 ] +Attempting to uplift remaining variables inzp[1]:278 [ form_control::$13 ] +Uplifting [form_control] best 12537805 combination reg byte a [ form_control::$13 ] +Attempting to uplift remaining variables inzp[1]:323 [ bitmap_plot::$1 ] +Uplifting [bitmap_plot] best 12537799 combination reg byte a [ bitmap_plot::$1 ] +Attempting to uplift remaining variables inzp[1]:274 [ form_control::key_event#0 ] +Uplifting [form_control] best 12537787 combination reg byte a [ form_control::key_event#0 ] Attempting to uplift remaining variables inzp[1]:4 [ gfx_mode::vic_control2#2 ] -Uplifting [gfx_mode] best 12537744 combination reg byte a [ gfx_mode::vic_control2#2 ] +Uplifting [gfx_mode] best 12537778 combination reg byte a [ gfx_mode::vic_control2#2 ] Attempting to uplift remaining variables inzp[1]:255 [ keyboard_event_pressed::row_bits#0 ] -Uplifting [keyboard_event_pressed] best 12537744 combination zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] -Attempting to uplift remaining variables inzp[1]:303 [ bitmap_line::y1#0 ] -Uplifting [bitmap_line] best 12537744 combination zp[1]:303 [ bitmap_line::y1#0 ] -Attempting to uplift remaining variables inzp[1]:302 [ bitmap_line::y0#0 ] -Uplifting [bitmap_line] best 12537744 combination zp[1]:302 [ bitmap_line::y0#0 ] +Uplifting [keyboard_event_pressed] best 12537778 combination zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] +Attempting to uplift remaining variables inzp[1]:309 [ bitmap_line::y1#0 ] +Uplifting [bitmap_line] best 12537778 combination zp[1]:309 [ bitmap_line::y1#0 ] +Attempting to uplift remaining variables inzp[1]:308 [ bitmap_line::y0#0 ] +Uplifting [bitmap_line] best 12537778 combination zp[1]:308 [ bitmap_line::y0#0 ] Attempting to uplift remaining variables inzp[1]:257 [ keyboard_event_pressed::return#10 ] -Uplifting [keyboard_event_pressed] best 12537729 combination reg byte a [ keyboard_event_pressed::return#10 ] +Uplifting [keyboard_event_pressed] best 12537763 combination reg byte a [ keyboard_event_pressed::return#10 ] Attempting to uplift remaining variables inzp[1]:19 [ keyboard_event_pressed::keycode#4 ] -Uplifting [keyboard_event_pressed] best 12537729 combination zp[1]:19 [ keyboard_event_pressed::keycode#4 ] -Attempting to uplift remaining variables inzp[1]:300 [ bitmap_line::x0#0 ] -Uplifting [bitmap_line] best 12537729 combination zp[1]:300 [ bitmap_line::x0#0 ] -Attempting to uplift remaining variables inzp[1]:305 [ bitmap_line::yd#2 ] -Uplifting [bitmap_line] best 12537719 combination reg byte y [ bitmap_line::yd#2 ] -Attempting to uplift remaining variables inzp[1]:306 [ bitmap_line::yd#1 ] -Uplifting [bitmap_line] best 12537709 combination reg byte y [ bitmap_line::yd#1 ] -Attempting to uplift remaining variables inzp[1]:308 [ bitmap_line::yd#10 ] -Uplifting [bitmap_line] best 12537699 combination reg byte y [ bitmap_line::yd#10 ] -Attempting to uplift remaining variables inzp[1]:309 [ bitmap_line::yd#11 ] -Uplifting [bitmap_line] best 12537689 combination reg byte y [ bitmap_line::yd#11 ] +Uplifting [keyboard_event_pressed] best 12537763 combination zp[1]:19 [ keyboard_event_pressed::keycode#4 ] +Attempting to uplift remaining variables inzp[1]:306 [ bitmap_line::x0#0 ] +Uplifting [bitmap_line] best 12537763 combination zp[1]:306 [ bitmap_line::x0#0 ] +Attempting to uplift remaining variables inzp[1]:311 [ bitmap_line::yd#2 ] +Uplifting [bitmap_line] best 12537753 combination reg byte y [ bitmap_line::yd#2 ] +Attempting to uplift remaining variables inzp[1]:312 [ bitmap_line::yd#1 ] +Uplifting [bitmap_line] best 12537743 combination reg byte y [ bitmap_line::yd#1 ] +Attempting to uplift remaining variables inzp[1]:314 [ bitmap_line::yd#10 ] +Uplifting [bitmap_line] best 12537733 combination reg byte y [ bitmap_line::yd#10 ] +Attempting to uplift remaining variables inzp[1]:315 [ bitmap_line::yd#11 ] +Uplifting [bitmap_line] best 12537723 combination reg byte y [ bitmap_line::yd#11 ] Attempting to uplift remaining variables inzp[1]:159 [ gfx_mode::plane_a_offs#0 ] -Uplifting [gfx_mode] best 12537687 combination reg byte x [ gfx_mode::plane_a_offs#0 ] +Uplifting [gfx_mode] best 12537721 combination reg byte x [ gfx_mode::plane_a_offs#0 ] Attempting to uplift remaining variables inzp[1]:184 [ gfx_mode::plane_b_offs#0 ] -Uplifting [gfx_mode] best 12537685 combination reg byte x [ gfx_mode::plane_b_offs#0 ] -Attempting to uplift remaining variables inzp[1]:304 [ bitmap_line::xd#2 ] -Uplifting [bitmap_line] best 12537685 combination zp[1]:304 [ bitmap_line::xd#2 ] -Attempting to uplift remaining variables inzp[1]:307 [ bitmap_line::xd#1 ] -Uplifting [bitmap_line] best 12537685 combination zp[1]:307 [ bitmap_line::xd#1 ] +Uplifting [gfx_mode] best 12537719 combination reg byte x [ gfx_mode::plane_b_offs#0 ] +Attempting to uplift remaining variables inzp[1]:310 [ bitmap_line::xd#2 ] +Uplifting [bitmap_line] best 12537719 combination zp[1]:310 [ bitmap_line::xd#2 ] +Attempting to uplift remaining variables inzp[1]:313 [ bitmap_line::xd#1 ] +Uplifting [bitmap_line] best 12537719 combination zp[1]:313 [ bitmap_line::xd#1 ] Attempting to uplift remaining variables inzp[1]:216 [ gfx_mode::$50 ] -Uplifting [gfx_mode] best 12537685 combination zp[1]:216 [ gfx_mode::$50 ] +Uplifting [gfx_mode] best 12537719 combination zp[1]:216 [ gfx_mode::$50 ] Coalescing zero page register [ zp[2]:6 [ gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 ] ] with [ zp[2]:227 [ get_vic_screen::return#11 ] ] - score: 1 Coalescing zero page register [ zp[2]:21 [ get_vic_screen::return#5 ] ] with [ zp[2]:208 [ get_vic_screen::return#10 ] ] - score: 1 Coalescing zero page register [ zp[2]:23 [ get_vic_charset::return#2 ] ] with [ zp[2]:218 [ get_vic_charset::return#4 ] ] - score: 1 Coalescing zero page register [ zp[4]:26 [ get_plane::return#14 ] ] with [ zp[4]:160 [ get_plane::return#16 ] ] - score: 1 Coalescing zero page register [ zp[4]:26 [ get_plane::return#14 get_plane::return#16 ] ] with [ zp[4]:185 [ get_plane::return#17 ] ] - score: 1 Coalescing zero page register [ zp[2]:35 [ render_preset_name::name#13 ] ] with [ zp[2]:37 [ print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] with [ zp[2]:276 [ memset::str#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] ] with [ zp[2]:291 [ gfx_init_plane_fill::gfxb#0 ] ] - score: 1 -Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] ] with [ zp[1]:304 [ bitmap_line::xd#2 ] ] - score: 1 -Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 ] ] with [ zp[1]:307 [ bitmap_line::xd#1 ] ] - score: 1 -Coalescing zero page register [ zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] ] with [ zp[1]:300 [ bitmap_line::x0#0 ] ] - score: 1 -Coalescing zero page register [ zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] ] with [ zp[1]:302 [ bitmap_line::y0#0 ] ] - score: 1 -Coalescing zero page register [ zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] ] with [ zp[1]:303 [ bitmap_line::y1#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] ] with [ zp[2]:321 [ bitmap_clear::bitmap#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] with [ zp[2]:282 [ memset::str#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 ] ] with [ zp[2]:297 [ gfx_init_plane_fill::gfxb#0 ] ] - score: 1 +Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] ] with [ zp[1]:310 [ bitmap_line::xd#2 ] ] - score: 1 +Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 ] ] with [ zp[1]:313 [ bitmap_line::xd#1 ] ] - score: 1 +Coalescing zero page register [ zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] ] with [ zp[1]:306 [ bitmap_line::x0#0 ] ] - score: 1 +Coalescing zero page register [ zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] ] with [ zp[1]:308 [ bitmap_line::y0#0 ] ] - score: 1 +Coalescing zero page register [ zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] ] with [ zp[1]:309 [ bitmap_line::y1#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] ] with [ zp[2]:327 [ bitmap_clear::bitmap#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:164 [ gfx_mode::$20 ] ] with [ zp[4]:168 [ gfx_mode::plane_a#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:189 [ gfx_mode::$34 ] ] with [ zp[4]:193 [ gfx_mode::plane_b#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:210 [ gfx_mode::$47 ] ] with [ zp[2]:212 [ gfx_mode::$48 ] ] - score: 1 Coalescing zero page register [ zp[2]:220 [ gfx_mode::$52 ] ] with [ zp[2]:222 [ gfx_mode::$53 ] ] - score: 1 -Coalescing zero page register [ zp[2]:287 [ gfx_init_plane_fill::$4 ] ] with [ zp[2]:289 [ gfx_init_plane_fill::$5 ] ] - score: 1 -Coalescing zero page register [ zp[2]:311 [ bitmap_plot::plotter_x#0 ] ] with [ zp[2]:315 [ bitmap_plot::plotter#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:266 [ form_field_ptr::return#0 ] ] with [ zp[2]:268 [ form_field_ptr::return#3 ] ] - score: 1 +Coalescing zero page register [ zp[2]:293 [ gfx_init_plane_fill::$4 ] ] with [ zp[2]:295 [ gfx_init_plane_fill::$5 ] ] - score: 1 +Coalescing zero page register [ zp[2]:317 [ bitmap_plot::plotter_x#0 ] ] with [ zp[2]:321 [ bitmap_plot::plotter#0 ] ] - score: 1 Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 ] ] with [ zp[1]:105 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] ] - score: 2 Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] ] with [ zp[1]:112 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] ] - score: 2 Coalescing zero page register [ zp[1]:98 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] ] with [ zp[1]:117 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] ] - score: 2 @@ -20543,11 +20367,12 @@ Coalescing zero page register [ zp[2]:6 [ gfx_mode::vic_colors#2 gfx_mode::vic_c Coalescing zero page register [ zp[2]:23 [ get_vic_charset::return#2 get_vic_charset::return#4 ] ] with [ zp[2]:220 [ gfx_mode::$52 gfx_mode::$53 ] ] - score: 1 Coalescing zero page register [ zp[4]:26 [ get_plane::return#14 get_plane::return#16 get_plane::return#17 ] ] with [ zp[4]:164 [ gfx_mode::$20 gfx_mode::plane_a#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:26 [ get_plane::return#14 get_plane::return#16 get_plane::return#17 gfx_mode::$20 gfx_mode::plane_a#0 ] ] with [ zp[4]:189 [ gfx_mode::$34 gfx_mode::plane_b#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 ] ] with [ zp[2]:287 [ gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 ] ] - score: 1 +Coalescing zero page register [ zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 ] ] with [ zp[2]:293 [ gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 ] ] - score: 1 Coalescing zero page register [ zp[1]:99 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 ] ] with [ zp[1]:113 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] ] - score: 1 Coalescing zero page register [ zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 ] ] with [ zp[1]:115 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] ] - score: 1 Coalescing zero page register [ zp[1]:101 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] ] with [ zp[1]:119 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 ] ] - score: 1 Coalescing zero page register [ zp[2]:210 [ gfx_mode::$47 gfx_mode::$48 ] ] with [ zp[2]:214 [ gfx_mode::$49 ] ] - score: 1 +Coalescing zero page register [ zp[2]:266 [ form_field_ptr::return#0 form_field_ptr::return#3 ] ] with [ zp[2]:270 [ form_control::field#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:6 [ gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 get_vic_screen::return#11 get_vic_screen::return#5 get_vic_screen::return#10 ] ] with [ zp[2]:210 [ gfx_mode::$47 gfx_mode::$48 gfx_mode::$49 ] ] - score: 1 Coalescing zero page register [ zp[1]:14 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] ] with [ zp[1]:5 [ gfx_mode::cy#4 gfx_mode::cy#1 ] ] Coalescing zero page register [ zp[1]:19 [ keyboard_event_pressed::keycode#4 ] ] with [ zp[1]:17 [ 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 ] ] @@ -20587,12 +20412,13 @@ Coalescing zero page register [ zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_scre Coalescing zero page register [ zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] ] with [ zp[2]:152 [ gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] ] Coalescing zero page register [ zp[1]:241 [ keyboard_event_scan::row_scan#0 ] ] with [ zp[1]:216 [ gfx_mode::$50 ] ] Coalescing zero page register [ zp[2]:263 [ form_field_ptr::line#0 ] ] with [ zp[2]:172 [ gfx_mode::$24 ] ] -Coalescing zero page register [ zp[2]:278 [ memset::end#0 ] ] with [ zp[2]:176 [ gfx_mode::$26 ] ] -Coalescing zero page register [ zp[2]:284 [ gfx_init_plane_fill::$1 ] ] with [ zp[2]:197 [ gfx_mode::$38 ] ] -Coalescing zero page register [ zp[2]:297 [ gfx_init_plane_8bppchunky::$5 ] ] with [ zp[2]:201 [ gfx_mode::$40 ] ] -Coalescing zero page register [ zp[1]:324 [ bitmap_init::$10 ] ] with [ zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] ] -Coalescing zero page register [ zp[1]:329 [ gfx_init_screen3::$1 ] ] with [ zp[1]:265 [ form_field_ptr::x#0 ] ] -Coalescing zero page register [ zp[1]:340 [ gfx_init_screen0::$1 ] ] with [ zp[1]:334 [ gfx_init_screen2::col2#0 ] ] +Coalescing zero page register [ zp[1]:265 [ form_field_ptr::x#0 ] ] with [ zp[1]:255 [ keyboard_event_pressed::row_bits#0 ] ] +Coalescing zero page register [ zp[2]:266 [ form_field_ptr::return#0 form_field_ptr::return#3 form_control::field#0 ] ] with [ zp[2]:176 [ gfx_mode::$26 ] ] +Coalescing zero page register [ zp[2]:284 [ memset::end#0 ] ] with [ zp[2]:197 [ gfx_mode::$38 ] ] +Coalescing zero page register [ zp[2]:290 [ gfx_init_plane_fill::$1 ] ] with [ zp[2]:201 [ gfx_mode::$40 ] ] +Coalescing zero page register [ zp[2]:317 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 ] ] with [ zp[2]:303 [ gfx_init_plane_8bppchunky::$5 ] ] +Coalescing zero page register [ zp[1]:335 [ gfx_init_screen3::$1 ] ] with [ zp[1]:330 [ bitmap_init::$10 ] ] +Coalescing zero page register [ zp[1]:346 [ gfx_init_screen0::$1 ] ] with [ zp[1]:340 [ gfx_init_screen2::col2#0 ] ] Coalescing zero page register [ zp[2]:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 form_set_screen::line#2 form_set_screen::line#1 ] ] with [ zp[2]:35 [ render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 get_vic_screen::return#11 get_vic_screen::return#5 get_vic_screen::return#10 gfx_mode::$47 gfx_mode::$48 gfx_mode::$49 ] ] Coalescing zero page register [ zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 ] ] with [ zp[2]:39 [ print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] ] Coalescing zero page register [ zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 ] ] with [ zp[2]:43 [ apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] ] @@ -20611,9 +20437,9 @@ Coalescing zero page register [ zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_scre Coalescing zero page register [ zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 ] ] with [ zp[1]:122 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] ] Coalescing zero page register [ zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 ] ] with [ zp[2]:148 [ gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] ] Coalescing zero page register [ zp[1]:241 [ keyboard_event_scan::row_scan#0 gfx_mode::$50 ] ] with [ zp[1]:123 [ bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] ] -Coalescing zero page register [ zp[2]:311 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 ] ] with [ zp[2]:263 [ form_field_ptr::line#0 gfx_mode::$24 ] ] -Coalescing zero page register [ zp[2]:313 [ bitmap_plot::plotter_y#0 ] ] with [ zp[2]:278 [ memset::end#0 gfx_mode::$26 ] ] -Coalescing zero page register [ zp[1]:340 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 ] ] with [ zp[1]:324 [ bitmap_init::$10 keyboard_event_pressed::row_bits#0 ] ] +Coalescing zero page register [ zp[2]:317 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 gfx_init_plane_8bppchunky::$5 ] ] with [ zp[2]:263 [ form_field_ptr::line#0 gfx_mode::$24 ] ] +Coalescing zero page register [ zp[2]:319 [ bitmap_plot::plotter_y#0 ] ] with [ zp[2]:266 [ form_field_ptr::return#0 form_field_ptr::return#3 form_control::field#0 gfx_mode::$26 ] ] +Coalescing zero page register [ zp[1]:335 [ gfx_init_screen3::$1 bitmap_init::$10 ] ] with [ zp[1]:265 [ form_field_ptr::x#0 keyboard_event_pressed::row_bits#0 ] ] Coalescing zero page register [ zp[2]:81 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 ] ] with [ zp[2]:50 [ print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 form_set_screen::line#2 form_set_screen::line#1 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 get_vic_screen::return#11 get_vic_screen::return#5 get_vic_screen::return#10 gfx_mode::$47 gfx_mode::$48 gfx_mode::$49 ] ] Coalescing zero page register [ zp[1]:118 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] ] with [ zp[1]:80 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] ] Coalescing zero page register [ zp[2]:133 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] ] with [ zp[2]:56 [ memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] ] @@ -20621,25 +20447,25 @@ Coalescing zero page register [ zp[1]:138 [ gfx_init_screen4::cy#4 gfx_init_scre Coalescing zero page register [ zp[2]:139 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 ] ] with [ zp[2]:64 [ gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] ] Coalescing zero page register [ zp[1]:146 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] ] with [ zp[1]:97 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] ] Coalescing zero page register [ zp[1]:154 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] ] with [ zp[1]:107 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] ] -Coalescing zero page register [ zp[2]:284 [ gfx_init_plane_fill::$1 gfx_mode::$38 ] ] with [ zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] ] -Coalescing zero page register [ zp[1]:340 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 bitmap_init::$10 keyboard_event_pressed::row_bits#0 ] ] with [ zp[1]:241 [ keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] ] +Coalescing zero page register [ zp[2]:284 [ memset::end#0 gfx_mode::$38 ] ] with [ zp[2]:156 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] ] +Coalescing zero page register [ zp[1]:335 [ gfx_init_screen3::$1 bitmap_init::$10 form_field_ptr::x#0 keyboard_event_pressed::row_bits#0 ] ] with [ zp[1]:241 [ keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] ] +Coalescing zero page register [ zp[1]:346 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 ] ] with [ zp[1]:96 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] ] Allocated (was zp[4]:58) zp[4]:2 [ gfx_init_plane_fill::plane_addr#3 get_plane::return#14 get_plane::return#16 get_plane::return#17 gfx_mode::$20 gfx_mode::plane_a#0 gfx_mode::$34 gfx_mode::plane_b#0 ] Allocated (was zp[2]:81) zp[2]:6 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_plane_horisontal::gfxa#3 gfx_init_plane_horisontal::gfxa#6 gfx_init_plane_horisontal::gfxa#7 gfx_init_plane_horisontal::gfxa#1 gfx_init_plane_horisontal::gfxa#2 gfx_init_plane_vertical::gfxb#2 gfx_init_plane_vertical::gfxb#3 gfx_init_plane_vertical::gfxb#1 gfx_init_plane_horisontal2::gfxa#2 gfx_init_plane_horisontal2::gfxa#3 gfx_init_plane_horisontal2::gfxa#1 print_str_lines::str#4 print_str_lines::str#3 print_str_lines::str#5 print_str_lines::str#0 form_set_screen::line#2 form_set_screen::line#1 render_preset_name::name#13 print_str_at::str#2 print_str_at::str#1 print_str_at::str#0 gfx_mode::vic_colors#2 gfx_mode::vic_colors#3 gfx_mode::vic_colors#1 gfx_mode::vic_colors#0 get_vic_screen::return#11 get_vic_screen::return#5 get_vic_screen::return#10 gfx_mode::$47 gfx_mode::$48 gfx_mode::$49 ] -Allocated (was zp[1]:96) zp[1]:8 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] -Allocated (was zp[1]:106) zp[1]:9 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] -Allocated (was zp[1]:118) zp[1]:10 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] -Allocated (was zp[2]:133) zp[2]:11 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] -Allocated (was zp[1]:138) zp[1]:13 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 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 ] -Allocated (was zp[2]:139) zp[2]:14 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] -Allocated (was zp[1]:146) zp[1]:16 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] -Allocated (was zp[1]:154) zp[1]:17 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] -Allocated (was zp[4]:280) zp[4]:18 [ gfx_init_plane_fill::$0 ] -Allocated (was zp[2]:284) zp[2]:22 [ gfx_init_plane_fill::$1 gfx_mode::$38 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] -Allocated (was zp[2]:297) zp[2]:24 [ gfx_init_plane_8bppchunky::$5 gfx_mode::$40 ] -Allocated (was zp[2]:311) zp[2]:26 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 form_field_ptr::line#0 gfx_mode::$24 ] -Allocated (was zp[2]:313) zp[2]:28 [ bitmap_plot::plotter_y#0 memset::end#0 gfx_mode::$26 ] -Allocated (was zp[1]:329) zp[1]:30 [ gfx_init_screen3::$1 form_field_ptr::x#0 ] -Allocated (was zp[1]:340) zp[1]:31 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 bitmap_init::$10 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] +Allocated (was zp[1]:106) zp[1]:8 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +Allocated (was zp[1]:118) zp[1]:9 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] +Allocated (was zp[2]:133) zp[2]:10 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] +Allocated (was zp[1]:138) zp[1]:12 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 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 ] +Allocated (was zp[2]:139) zp[2]:13 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] +Allocated (was zp[1]:146) zp[1]:15 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +Allocated (was zp[1]:154) zp[1]:16 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] +Allocated (was zp[2]:284) zp[2]:17 [ memset::end#0 gfx_mode::$38 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] +Allocated (was zp[4]:286) zp[4]:19 [ gfx_init_plane_fill::$0 ] +Allocated (was zp[2]:290) zp[2]:23 [ gfx_init_plane_fill::$1 gfx_mode::$40 ] +Allocated (was zp[2]:317) zp[2]:25 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 gfx_init_plane_8bppchunky::$5 form_field_ptr::line#0 gfx_mode::$24 ] +Allocated (was zp[2]:319) zp[2]:27 [ bitmap_plot::plotter_y#0 form_field_ptr::return#0 form_field_ptr::return#3 form_control::field#0 gfx_mode::$26 ] +Allocated (was zp[1]:335) zp[1]:29 [ gfx_init_screen3::$1 bitmap_init::$10 form_field_ptr::x#0 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] +Allocated (was zp[1]:346) zp[1]:30 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -20812,15 +20638,15 @@ ASSEMBLER BEFORE OPTIMIZATION .const FORM_CURSOR_BLINK = $28 // Number of form fields .const form_fields_cnt = $24 - .label print_char_cursor = $b - .label print_line_cursor = $e + .label print_char_cursor = $a + .label print_line_cursor = $d // Keyboard event buffer size. The number of events currently in the event buffer - .label keyboard_events_size = 8 + .label keyboard_events_size = $1e // Counts down to blink for form cursor (it is inversed in the lower half) // Always blink cursor in new field - .label form_cursor_count = $10 + .label form_cursor_count = $f // Current selected field in the form - .label form_field_idx = 9 + .label form_field_idx = 8 // @begin __bbegin: // [1] phi from @begin to @1 [phi:@begin->@1] @@ -20859,7 +20685,7 @@ main: { // main::@3 __b3: // [10] call gfx_init - // [446] phi from main::@3 to gfx_init [phi:main::@3->gfx_init] + // [449] phi from main::@3 to gfx_init [phi:main::@3->gfx_init] gfx_init_from___b3: jsr gfx_init // [11] phi from main::@3 to main::@1 [phi:main::@3->main::@1] @@ -20903,22 +20729,22 @@ main: { // Change graphics mode to show the selected graphics mode gfx_mode: { .label __20 = 2 - .label __24 = $1a - .label __26 = $1c + .label __24 = $19 + .label __26 = $1b .label __34 = 2 - .label __38 = $16 - .label __40 = $18 + .label __38 = $11 + .label __40 = $17 .label __47 = 6 .label __48 = 6 .label __49 = 6 - .label __50 = $1f - .label __52 = $e - .label __53 = $e + .label __50 = $1d + .label __52 = $d + .label __53 = $d .label plane_a = 2 .label plane_b = 2 .label vic_colors = 6 - .label col = $b - .label cy = $a + .label col = $a + .label cy = 9 // [16] if(*((const byte*) form_ctrl_line)==(byte) 0) goto gfx_mode::@1 -- _deref_pbuc1_eq_0_then_la1 lda form_ctrl_line cmp #0 @@ -21566,9 +21392,9 @@ keyboard_event_get: { // Handles debounce and only generates events when the status of a key changes. // Also stores current status of modifiers in keyboard_modifiers. keyboard_event_scan: { - .label row_scan = $1f - .label keycode = $d - .label row = $a + .label row_scan = $1d + .label keycode = $c + .label row = 9 // [158] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] __b7_from_keyboard_event_scan: // [158] phi (byte) keyboard_events_size#106 = (byte) keyboard_events_size#97 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy @@ -21841,10 +21667,10 @@ keyboard_event_scan: { // keyboard_event_pressed // Determine if a specific key is currently pressed based on the last keyboard_event_scan() // Returns 0 is not pressed and non-0 if pressed -// keyboard_event_pressed(byte zp($d) keycode) +// keyboard_event_pressed(byte zp($c) keycode) keyboard_event_pressed: { - .label row_bits = $1f - .label keycode = $d + .label row_bits = $1d + .label keycode = $c // [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda.z keycode lsr @@ -21974,7 +21800,7 @@ get_vic_screen: { // Get the VIC charset/bitmap address from the index // get_vic_charset(byte register(A) idx) get_vic_charset: { - .label return = $e + .label return = $d // [229] if((byte) get_vic_charset::idx#0==(byte) 0) goto get_vic_charset::@return -- vbuaa_eq_0_then_la1 cmp #0 beq __breturn_from_get_vic_charset @@ -22290,11 +22116,11 @@ get_plane: { // form_mode // Show the form - and let the user change values form_mode: { - .label preset_current = $11 + .label preset_current = $10 // [253] call print_set_screen - // [444] phi from form_mode to print_set_screen [phi:form_mode->print_set_screen] + // [447] phi from form_mode to print_set_screen [phi:form_mode->print_set_screen] print_set_screen_from_form_mode: - // [444] phi (byte*) print_set_screen::screen#2 = (const byte*) COLS [phi:form_mode->print_set_screen#0] -- pbuz1=pbuc1 + // [447] phi (byte*) print_set_screen::screen#2 = (const byte*) COLS [phi:form_mode->print_set_screen#0] -- pbuz1=pbuc1 lda #COLS @@ -22313,9 +22139,9 @@ form_mode: { // form_mode::@9 __b9: // [257] call print_str_lines - // [412] phi from form_mode::@9 to print_str_lines [phi:form_mode::@9->print_str_lines] + // [415] phi from form_mode::@9 to print_str_lines [phi:form_mode::@9->print_str_lines] print_str_lines_from___b9: - // [412] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_COLS [phi:form_mode::@9->print_str_lines#0] -- pbuz1=pbuc1 + // [415] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_COLS [phi:form_mode::@9->print_str_lines#0] -- pbuz1=pbuc1 lda #FORM_COLS @@ -22327,9 +22153,9 @@ form_mode: { // form_mode::@10 __b10: // [259] call print_set_screen - // [444] phi from form_mode::@10 to print_set_screen [phi:form_mode::@10->print_set_screen] + // [447] phi from form_mode::@10 to print_set_screen [phi:form_mode::@10->print_set_screen] print_set_screen_from___b10: - // [444] phi (byte*) print_set_screen::screen#2 = (const byte*) FORM_SCREEN [phi:form_mode::@10->print_set_screen#0] -- pbuz1=pbuc1 + // [447] phi (byte*) print_set_screen::screen#2 = (const byte*) FORM_SCREEN [phi:form_mode::@10->print_set_screen#0] -- pbuz1=pbuc1 lda #FORM_SCREEN @@ -22348,9 +22174,9 @@ form_mode: { // form_mode::@12 __b12: // [263] call print_str_lines - // [412] phi from form_mode::@12 to print_str_lines [phi:form_mode::@12->print_str_lines] + // [415] phi from form_mode::@12 to print_str_lines [phi:form_mode::@12->print_str_lines] print_str_lines_from___b12: - // [412] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_TEXT [phi:form_mode::@12->print_str_lines#0] -- pbuz1=pbuc1 + // [415] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_TEXT [phi:form_mode::@12->print_str_lines#0] -- pbuz1=pbuc1 lda #FORM_TEXT @@ -22362,7 +22188,7 @@ form_mode: { // form_mode::@13 __b13: // [265] call form_set_screen - // [402] phi from form_mode::@13 to form_set_screen [phi:form_mode::@13->form_set_screen] + // [405] phi from form_mode::@13 to form_set_screen [phi:form_mode::@13->form_set_screen] form_set_screen_from___b13: jsr form_set_screen // [266] phi from form_mode::@13 to form_mode::@14 [phi:form_mode::@13->form_mode::@14] @@ -22740,9 +22566,9 @@ render_preset_name: { } // print_str_at // Print a string at a specific screen position -// print_str_at(byte* zp(6) str, byte* zp($b) at) +// print_str_at(byte* zp(6) str, byte* zp($a) at) print_str_at: { - .label at = $b + .label at = $a .label str = 6 // [322] phi from print_str_at to print_str_at::@1 [phi:print_str_at->print_str_at::@1] __b1_from_print_str_at: @@ -22834,12 +22660,12 @@ form_render_values: { // field_idx is the index of the field to get the screen address for // form_field_ptr(byte register(X) field_idx) form_field_ptr: { - .label line = $1a - .label x = $1e - // [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) -- vbuaa=pbuc1_derefidx_vbuxx - lda form_fields_y,x - // [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa - tay + .label line = $19 + .label x = $1d + .label return = $1b + // [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) -- vbuyy=pbuc1_derefidx_vbuxx + ldy form_fields_y,x + // [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) -- vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy lda form_line_hi,y sta.z line+1 lda form_line_lo,y @@ -22847,10 +22673,18 @@ form_field_ptr: { // [339] (byte) form_field_ptr::x#0 ← *((const byte*) form_fields_x + (byte) form_field_ptr::field_idx#2) -- vbuz1=pbuc1_derefidx_vbuxx lda form_fields_x,x sta.z x + // [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 -- pbuz1=pbuz2_plus_vbuz3 + lda.z x + clc + adc.z line + sta.z return + lda #0 + adc.z line+1 + sta.z return+1 jmp __breturn // form_field_ptr::@return __breturn: - // [340] return + // [341] return rts } // apply_preset @@ -22858,159 +22692,159 @@ form_field_ptr: { // idx is the ID of the preset // apply_preset(byte register(A) idx) apply_preset: { - .label preset = $e - // [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 -- vbuaa_eq_0_then_la1 + .label preset = $d + // [342] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2_from_apply_preset jmp __b3 // apply_preset::@3 __b3: - // [342] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [343] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #1 beq __b2_from___b3 jmp __b4 // apply_preset::@4 __b4: - // [343] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [344] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #2 beq __b2_from___b4 jmp __b5 // apply_preset::@5 __b5: - // [344] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [345] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #3 beq __b2_from___b5 jmp __b6 // apply_preset::@6 __b6: - // [345] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [346] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #4 beq __b2_from___b6 jmp __b7 // apply_preset::@7 __b7: - // [346] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [347] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #5 beq __b2_from___b7 jmp __b8 // apply_preset::@8 __b8: - // [347] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [348] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #6 beq __b2_from___b8 jmp __b9 // apply_preset::@9 __b9: - // [348] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [349] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #7 beq __b2_from___b9 jmp __b10 // apply_preset::@10 __b10: - // [349] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [350] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #8 beq __b2_from___b10 jmp __b11 // apply_preset::@11 __b11: - // [350] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [351] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #9 beq __b2_from___b11 jmp __b12 // apply_preset::@12 __b12: - // [351] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 -- vbuaa_eq_vbuc1_then_la1 + // [352] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 -- vbuaa_eq_vbuc1_then_la1 cmp #$a beq __b1_from___b12 - // [353] phi from apply_preset apply_preset::@12 to apply_preset::@2 [phi:apply_preset/apply_preset::@12->apply_preset::@2] + // [354] phi from apply_preset apply_preset::@12 to apply_preset::@2 [phi:apply_preset/apply_preset::@12->apply_preset::@2] __b2_from_apply_preset: __b2_from___b12: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdchar [phi:apply_preset/apply_preset::@12->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdchar [phi:apply_preset/apply_preset::@12->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_stdchar sta.z preset+1 jmp __b2 - // [352] phi from apply_preset::@12 to apply_preset::@1 [phi:apply_preset::@12->apply_preset::@1] + // [353] phi from apply_preset::@12 to apply_preset::@1 [phi:apply_preset::@12->apply_preset::@1] __b1_from___b12: jmp __b1 // apply_preset::@1 __b1: - // [353] phi from apply_preset::@1 to apply_preset::@2 [phi:apply_preset::@1->apply_preset::@2] + // [354] phi from apply_preset::@1 to apply_preset::@2 [phi:apply_preset::@1->apply_preset::@2] __b2_from___b1: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_8bpppixelcell [phi:apply_preset::@1->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_8bpppixelcell [phi:apply_preset::@1->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_8bpppixelcell sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@10 to apply_preset::@2 [phi:apply_preset::@10->apply_preset::@2] + // [354] phi from apply_preset::@10 to apply_preset::@2 [phi:apply_preset::@10->apply_preset::@2] __b2_from___b10: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred [phi:apply_preset::@10->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred [phi:apply_preset::@10->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_sixsfred sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@11 to apply_preset::@2 [phi:apply_preset::@11->apply_preset::@2] + // [354] phi from apply_preset::@11 to apply_preset::@2 [phi:apply_preset::@11->apply_preset::@2] __b2_from___b11: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred2 [phi:apply_preset::@11->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred2 [phi:apply_preset::@11->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_sixsfred2 sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@3 to apply_preset::@2 [phi:apply_preset::@3->apply_preset::@2] + // [354] phi from apply_preset::@3 to apply_preset::@2 [phi:apply_preset::@3->apply_preset::@2] __b2_from___b3: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_ecmchar [phi:apply_preset::@3->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_ecmchar [phi:apply_preset::@3->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_ecmchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@4 to apply_preset::@2 [phi:apply_preset::@4->apply_preset::@2] + // [354] phi from apply_preset::@4 to apply_preset::@2 [phi:apply_preset::@4->apply_preset::@2] __b2_from___b4: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdbm [phi:apply_preset::@4->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdbm [phi:apply_preset::@4->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_stdbm sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@5 to apply_preset::@2 [phi:apply_preset::@5->apply_preset::@2] + // [354] phi from apply_preset::@5 to apply_preset::@2 [phi:apply_preset::@5->apply_preset::@2] __b2_from___b5: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_mcbm [phi:apply_preset::@5->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_mcbm [phi:apply_preset::@5->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_mcbm sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@6 to apply_preset::@2 [phi:apply_preset::@6->apply_preset::@2] + // [354] phi from apply_preset::@6 to apply_preset::@2 [phi:apply_preset::@6->apply_preset::@2] __b2_from___b6: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_stdchar [phi:apply_preset::@6->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_stdchar [phi:apply_preset::@6->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_hi_stdchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@7 to apply_preset::@2 [phi:apply_preset::@7->apply_preset::@2] + // [354] phi from apply_preset::@7 to apply_preset::@2 [phi:apply_preset::@7->apply_preset::@2] __b2_from___b7: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_ecmchar [phi:apply_preset::@7->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_ecmchar [phi:apply_preset::@7->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_hi_ecmchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@8 to apply_preset::@2 [phi:apply_preset::@8->apply_preset::@2] + // [354] phi from apply_preset::@8 to apply_preset::@2 [phi:apply_preset::@8->apply_preset::@2] __b2_from___b8: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_twoplane [phi:apply_preset::@8->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_twoplane [phi:apply_preset::@8->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_twoplane sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@9 to apply_preset::@2 [phi:apply_preset::@9->apply_preset::@2] + // [354] phi from apply_preset::@9 to apply_preset::@2 [phi:apply_preset::@9->apply_preset::@2] __b2_from___b9: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_chunky [phi:apply_preset::@9->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_chunky [phi:apply_preset::@9->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_chunky @@ -23018,72 +22852,75 @@ apply_preset: { jmp __b2 // apply_preset::@2 __b2: - // [354] phi from apply_preset::@2 to apply_preset::@13 [phi:apply_preset::@2->apply_preset::@13] + // [355] phi from apply_preset::@2 to apply_preset::@13 [phi:apply_preset::@2->apply_preset::@13] __b13_from___b2: - // [354] phi (byte) apply_preset::i#2 = (byte) 0 [phi:apply_preset::@2->apply_preset::@13#0] -- vbuyy=vbuc1 + // [355] phi (byte) apply_preset::i#2 = (byte) 0 [phi:apply_preset::@2->apply_preset::@13#0] -- vbuyy=vbuc1 ldy #0 jmp __b13 // Copy preset values into the fields // apply_preset::@13 __b13: - // [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1 + // [356] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1 cpy #form_fields_cnt bne __b14 jmp __breturn // apply_preset::@return __breturn: - // [356] return + // [357] return rts // apply_preset::@14 __b14: - // [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) -- pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuyy + // [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) -- pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuyy lda (preset),y sta form_fields_val,y - // [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 -- vbuyy=_inc_vbuyy + // [359] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 -- vbuyy=_inc_vbuyy iny - // [354] phi from apply_preset::@14 to apply_preset::@13 [phi:apply_preset::@14->apply_preset::@13] + // [355] phi from apply_preset::@14 to apply_preset::@13 [phi:apply_preset::@14->apply_preset::@13] __b13_from___b14: - // [354] phi (byte) apply_preset::i#2 = (byte) apply_preset::i#1 [phi:apply_preset::@14->apply_preset::@13#0] -- register_copy + // [355] phi (byte) apply_preset::i#2 = (byte) apply_preset::i#1 [phi:apply_preset::@14->apply_preset::@13#0] -- register_copy jmp __b13 } // form_control // Reads keyboard and allows the user to navigate and change the fields of the form // Returns 0 if space is not pressed, non-0 if space is pressed form_control: { - // [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 -- vbuxx=vbuz1 + .label field = $1b + // [360] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 -- vbuxx=vbuz1 ldx.z form_field_idx - // [360] call form_field_ptr + // [361] call form_field_ptr // [336] phi from form_control to form_field_ptr [phi:form_control->form_field_ptr] form_field_ptr_from_form_control: // [336] phi (byte) form_field_ptr::field_idx#2 = (byte) form_field_ptr::field_idx#1 [phi:form_control->form_field_ptr#0] -- register_copy jsr form_field_ptr + // [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 jmp __b18 // form_control::@18 __b18: - // [361] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 -- vbsz1=_dec_vbsz1 + // [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 + // [364] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 -- vbsz1=_dec_vbsz1 dec.z form_cursor_count - // [362] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 -- vbsz1_ge_0_then_la1 + // [365] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 -- vbsz1_ge_0_then_la1 lda.z form_cursor_count cmp #0 bpl __b21_from___b18 - // [364] phi from form_control::@18 to form_control::@1 [phi:form_control::@18->form_control::@1] + // [367] phi from form_control::@18 to form_control::@1 [phi:form_control::@18->form_control::@1] __b1_from___b18: - // [364] phi (signed byte) form_cursor_count#15 = (const signed byte) FORM_CURSOR_BLINK [phi:form_control::@18->form_control::@1#0] -- vbsz1=vbsc1 + // [367] phi (signed byte) form_cursor_count#15 = (const signed byte) FORM_CURSOR_BLINK [phi:form_control::@18->form_control::@1#0] -- vbsz1=vbsc1 lda #FORM_CURSOR_BLINK sta.z form_cursor_count jmp __b1 - // [363] phi from form_control::@18 to form_control::@21 [phi:form_control::@18->form_control::@21] + // [366] phi from form_control::@18 to form_control::@21 [phi:form_control::@18->form_control::@21] __b21_from___b18: jmp __b21 // form_control::@21 __b21: - // [364] phi from form_control::@21 to form_control::@1 [phi:form_control::@21->form_control::@1] + // [367] phi from form_control::@21 to form_control::@1 [phi:form_control::@21->form_control::@1] __b1_from___b21: - // [364] phi (signed byte) form_cursor_count#15 = (signed byte) form_cursor_count#5 [phi:form_control::@21->form_control::@1#0] -- register_copy + // [367] phi (signed byte) form_cursor_count#15 = (signed byte) form_cursor_count#5 [phi:form_control::@21->form_control::@1#0] -- register_copy jmp __b1 // form_control::@1 __b1: - // [365] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 -- vbsz1_lt_vbsc1_then_la1 + // [368] if((signed byte) form_cursor_count#15<(const signed byte) FORM_CURSOR_BLINK/(signed byte) 2) goto form_control::@2 -- vbsz1_lt_vbsc1_then_la1 lda.z form_cursor_count sec sbc #FORM_CURSOR_BLINK/2 @@ -23094,111 +22931,111 @@ form_control: { jmp __b7 // form_control::@7 __b7: - // [366] (byte~) form_control::$12 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f -- vbuaa=pbuz1_derefidx_vbuz2_band_vbuc1 + // [369] (byte~) form_control::$12 ← *((byte*) form_control::field#0) & (byte) $7f -- vbuaa=_deref_pbuz1_band_vbuc1 lda #$7f - ldy.z form_field_ptr.x - and (form_field_ptr.line),y - // [367] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$12 -- pbuz1_derefidx_vbuz2=vbuaa - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [368] phi from form_control::@2 form_control::@7 to form_control::@3 [phi:form_control::@2/form_control::@7->form_control::@3] + ldy #0 + and (field),y + // [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 -- _deref_pbuz1=vbuaa + ldy #0 + sta (field),y + // [371] phi from form_control::@2 form_control::@7 to form_control::@3 [phi:form_control::@2/form_control::@7->form_control::@3] __b3_from___b2: __b3_from___b7: jmp __b3 // form_control::@3 __b3: - // [369] call keyboard_event_scan + // [372] call keyboard_event_scan // [157] phi from form_control::@3 to keyboard_event_scan [phi:form_control::@3->keyboard_event_scan] keyboard_event_scan_from___b3: // [157] phi (byte) keyboard_events_size#97 = (byte) keyboard_events_size#47 [phi:form_control::@3->keyboard_event_scan#0] -- register_copy jsr keyboard_event_scan - // [370] phi from form_control::@3 to form_control::@19 [phi:form_control::@3->form_control::@19] + // [373] phi from form_control::@3 to form_control::@19 [phi:form_control::@3->form_control::@19] __b19_from___b3: jmp __b19 // form_control::@19 __b19: - // [371] call keyboard_event_get + // [374] call keyboard_event_get jsr keyboard_event_get - // [372] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 + // [375] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 jmp __b20 // form_control::@20 __b20: - // [373] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 - // [374] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -- vbuaa_neq_vbuc1_then_la1 + // [376] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 + // [377] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_CRSR_DOWN bne __b4 jmp __b8 // form_control::@8 __b8: - // [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f -- vbuaa=pbuz1_derefidx_vbuz2_band_vbuc1 + // [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f -- vbuaa=_deref_pbuz1_band_vbuc1 lda #$7f - ldy.z form_field_ptr.x - and (form_field_ptr.line),y - // [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 -- pbuz1_derefidx_vbuz2=vbuaa + ldy #0 + and (field),y + // [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 -- _deref_pbuz1=vbuaa // Unblink the cursor - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 + ldy #0 + sta (field),y + // [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 txa and #KEY_MODIFIER_SHIFT - // [378] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 -- vbuaa_eq_0_then_la1 + // [381] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 -- vbuaa_eq_0_then_la1 cmp #0 beq __b13 jmp __b9 // form_control::@9 __b9: - // [379] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 -- vbuz1=_dec_vbuz1 + // [382] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 -- vbuz1=_dec_vbuz1 dec.z form_field_idx - // [380] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -- vbuz1_neq_vbuc1_then_la1 + // [383] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z form_field_idx bne __b22_from___b9 - // [382] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14] + // [385] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14] __b14_from___b9: - // [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1 + // [385] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1 lda #form_fields_cnt-1 sta.z form_field_idx jmp __b14 - // [381] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22] + // [384] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22] __b22_from___b9: jmp __b22 // form_control::@22 __b22: - // [382] phi from form_control::@22 form_control::@23 to form_control::@14 [phi:form_control::@22/form_control::@23->form_control::@14] + // [385] phi from form_control::@22 form_control::@23 to form_control::@14 [phi:form_control::@22/form_control::@23->form_control::@14] __b14_from___b22: __b14_from___b23: - // [382] phi (byte) form_field_idx#31 = (byte) form_field_idx#6 [phi:form_control::@22/form_control::@23->form_control::@14#0] -- register_copy + // [385] phi (byte) form_field_idx#31 = (byte) form_field_idx#6 [phi:form_control::@22/form_control::@23->form_control::@14#0] -- register_copy jmp __b14 // form_control::@14 __b14: - // [383] phi from form_control::@14 to form_control::@return [phi:form_control::@14->form_control::@return] + // [386] phi from form_control::@14 to form_control::@return [phi:form_control::@14->form_control::@return] __breturn_from___b14: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#31 [phi:form_control::@14->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 [phi:form_control::@14->form_control::@return#1] -- vbsz1=vbsc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#31 [phi:form_control::@14->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 [phi:form_control::@14->form_control::@return#1] -- vbsz1=vbsc1 lda #FORM_CURSOR_BLINK/2 sta.z form_cursor_count - // [383] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@14->form_control::@return#2] -- vbuxx=vbuc1 + // [386] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@14->form_control::@return#2] -- vbuxx=vbuc1 ldx #0 jmp __breturn // form_control::@return __breturn: - // [384] return + // [387] return rts // form_control::@13 __b13: - // [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1 + // [388] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1 inc.z form_field_idx - // [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1 + // [389] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1 lda #form_fields_cnt cmp.z form_field_idx bne __b23_from___b13 - // [382] phi from form_control::@13 to form_control::@14 [phi:form_control::@13->form_control::@14] + // [385] phi from form_control::@13 to form_control::@14 [phi:form_control::@13->form_control::@14] __b14_from___b13: - // [382] phi (byte) form_field_idx#31 = (byte) 0 [phi:form_control::@13->form_control::@14#0] -- vbuz1=vbuc1 + // [385] phi (byte) form_field_idx#31 = (byte) 0 [phi:form_control::@13->form_control::@14#0] -- vbuz1=vbuc1 lda #0 sta.z form_field_idx jmp __b14 - // [387] phi from form_control::@13 to form_control::@23 [phi:form_control::@13->form_control::@23] + // [390] phi from form_control::@13 to form_control::@23 [phi:form_control::@13->form_control::@23] __b23_from___b13: jmp __b23 // form_control::@23 @@ -23206,25 +23043,25 @@ form_control: { jmp __b14_from___b23 // form_control::@4 __b4: - // [388] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -- vbuaa_neq_vbuc1_then_la1 + // [391] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_CRSR_RIGHT bne __b5 jmp __b10 // form_control::@10 __b10: - // [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 + // [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 txa and #KEY_MODIFIER_SHIFT - // [390] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 -- vbuaa_eq_0_then_la1 + // [393] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 -- vbuaa_eq_0_then_la1 cmp #0 beq __b15 jmp __b11 // form_control::@11 __b11: - // [391] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 + // [394] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 ldx.z form_field_idx dec form_fields_val,x - // [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 + // [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 lda #$ff ldy.z form_field_idx cmp form_fields_val,y @@ -23232,34 +23069,34 @@ form_control: { jmp __b12 // form_control::@12 __b12: - // [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + // [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 ldy.z form_field_idx lda form_fields_max,y sta form_fields_val,y jmp __b16 // form_control::@16 __b16: - // [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuz3) + // [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- _deref_pbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) // Render field value ldx.z form_field_idx ldy form_fields_val,x lda print_hextab,y - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [383] phi from form_control::@16 form_control::@6 to form_control::@return [phi:form_control::@16/form_control::@6->form_control::@return] + ldy #0 + sta (field),y + // [386] phi from form_control::@16 form_control::@6 to form_control::@return [phi:form_control::@16/form_control::@6->form_control::@return] __breturn_from___b16: __breturn_from___b6: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@16/form_control::@6->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@16/form_control::@6->form_control::@return#1] -- register_copy - // [383] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@16/form_control::@6->form_control::@return#2] -- vbuxx=vbuc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@16/form_control::@6->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@16/form_control::@6->form_control::@return#1] -- register_copy + // [386] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@16/form_control::@6->form_control::@return#2] -- vbuxx=vbuc1 ldx #0 jmp __breturn // form_control::@15 __b15: - // [395] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + // [398] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 ldx.z form_field_idx inc form_fields_val,x - // [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 -- pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 + // [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 -- pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 ldy.z form_field_idx lda form_fields_max,y cmp form_fields_val,y @@ -23267,24 +23104,24 @@ form_control: { jmp __b17 // form_control::@17 __b17: - // [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy.z form_field_idx sta form_fields_val,y jmp __b16 // form_control::@5 __b5: - // [398] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -- vbuaa_neq_vbuc1_then_la1 + // [401] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_SPACE bne __b6_from___b5 - // [383] phi from form_control::@5 to form_control::@return [phi:form_control::@5->form_control::@return] + // [386] phi from form_control::@5 to form_control::@return [phi:form_control::@5->form_control::@return] __breturn_from___b5: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@5->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy - // [383] phi (byte) form_control::return#2 = (byte) $ff [phi:form_control::@5->form_control::@return#2] -- vbuxx=vbuc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@5->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy + // [386] phi (byte) form_control::return#2 = (byte) $ff [phi:form_control::@5->form_control::@return#2] -- vbuxx=vbuc1 ldx #$ff jmp __breturn - // [399] phi from form_control::@5 to form_control::@6 [phi:form_control::@5->form_control::@6] + // [402] phi from form_control::@5 to form_control::@6 [phi:form_control::@5->form_control::@6] __b6_from___b5: jmp __b6 // form_control::@6 @@ -23292,13 +23129,13 @@ form_control: { jmp __breturn_from___b6 // form_control::@2 __b2: - // [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 -- vbuaa=pbuz1_derefidx_vbuz2_bor_vbuc1 + // [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 -- vbuaa=_deref_pbuz1_bor_vbuc1 lda #$80 - ldy.z form_field_ptr.x - ora (form_field_ptr.line),y - // [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 -- pbuz1_derefidx_vbuz2=vbuaa - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y + ldy #0 + ora (field),y + // [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 -- _deref_pbuz1=vbuaa + ldy #0 + sta (field),y jmp __b3_from___b2 } // form_set_screen @@ -23306,32 +23143,32 @@ form_control: { // screen is the start address of the screen to use form_set_screen: { .label line = 6 - // [403] phi from form_set_screen to form_set_screen::@1 [phi:form_set_screen->form_set_screen::@1] + // [406] phi from form_set_screen to form_set_screen::@1 [phi:form_set_screen->form_set_screen::@1] __b1_from_form_set_screen: - // [403] phi (byte) form_set_screen::y#2 = (byte) 0 [phi:form_set_screen->form_set_screen::@1#0] -- vbuxx=vbuc1 + // [406] phi (byte) form_set_screen::y#2 = (byte) 0 [phi:form_set_screen->form_set_screen::@1#0] -- vbuxx=vbuc1 ldx #0 - // [403] phi (byte*) form_set_screen::line#2 = (const byte*) FORM_SCREEN [phi:form_set_screen->form_set_screen::@1#1] -- pbuz1=pbuc1 + // [406] phi (byte*) form_set_screen::line#2 = (const byte*) FORM_SCREEN [phi:form_set_screen->form_set_screen::@1#1] -- pbuz1=pbuc1 lda #FORM_SCREEN sta.z line+1 jmp __b1 - // [403] phi from form_set_screen::@1 to form_set_screen::@1 [phi:form_set_screen::@1->form_set_screen::@1] + // [406] phi from form_set_screen::@1 to form_set_screen::@1 [phi:form_set_screen::@1->form_set_screen::@1] __b1_from___b1: - // [403] phi (byte) form_set_screen::y#2 = (byte) form_set_screen::y#1 [phi:form_set_screen::@1->form_set_screen::@1#0] -- register_copy - // [403] phi (byte*) form_set_screen::line#2 = (byte*) form_set_screen::line#1 [phi:form_set_screen::@1->form_set_screen::@1#1] -- register_copy + // [406] phi (byte) form_set_screen::y#2 = (byte) form_set_screen::y#1 [phi:form_set_screen::@1->form_set_screen::@1#0] -- register_copy + // [406] phi (byte*) form_set_screen::line#2 = (byte*) form_set_screen::line#1 [phi:form_set_screen::@1->form_set_screen::@1#1] -- register_copy jmp __b1 // form_set_screen::@1 __b1: - // [404] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 -- vbuaa=_lo_pbuz1 + // [407] (byte~) form_set_screen::$0 ← < (byte*) form_set_screen::line#2 -- vbuaa=_lo_pbuz1 lda.z line - // [405] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 -- pbuc1_derefidx_vbuxx=vbuaa + // [408] *((const byte*) form_line_lo + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$0 -- pbuc1_derefidx_vbuxx=vbuaa sta form_line_lo,x - // [406] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 -- vbuaa=_hi_pbuz1 + // [409] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 -- vbuaa=_hi_pbuz1 lda.z line+1 - // [407] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 -- pbuc1_derefidx_vbuxx=vbuaa + // [410] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 -- pbuc1_derefidx_vbuxx=vbuaa sta form_line_hi,x - // [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z line @@ -23339,15 +23176,15 @@ form_set_screen: { bcc !+ inc.z line+1 !: - // [409] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 -- vbuxx=_inc_vbuxx + // [412] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 -- vbuxx=_inc_vbuxx inx - // [410] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 -- vbuxx_neq_vbuc1_then_la1 + // [413] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$19 bne __b1_from___b1 jmp __breturn // form_set_screen::@return __breturn: - // [411] return + // [414] return rts } // print_str_lines @@ -23356,21 +23193,21 @@ form_set_screen: { // print_str_lines(byte* zp(6) str) print_str_lines: { .label str = 6 - // [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 -- pbuz1=pbuz2 + // [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 -- pbuz1=pbuz2 lda.z print_set_screen.screen sta.z print_char_cursor lda.z print_set_screen.screen+1 sta.z print_char_cursor+1 - // [414] phi from print_str_lines print_str_lines::@6 to print_str_lines::@1 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1] + // [417] phi from print_str_lines print_str_lines::@6 to print_str_lines::@1 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1] __b1_from_print_str_lines: __b1_from___b6: - // [414] phi (byte*) print_line_cursor#2 = (byte*) print_set_screen::screen#2 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#0] -- register_copy - // [414] phi (byte*) print_char_cursor#22 = (byte*) print_char_cursor#67 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#1] -- register_copy - // [414] phi (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#5 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#2] -- register_copy + // [417] phi (byte*) print_line_cursor#2 = (byte*) print_set_screen::screen#2 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#0] -- register_copy + // [417] phi (byte*) print_char_cursor#22 = (byte*) print_char_cursor#67 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#1] -- register_copy + // [417] phi (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#5 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#2] -- register_copy jmp __b1 // print_str_lines::@1 __b1: - // [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 -- vbuc1_neq__deref_pbuz1_then_la1 + // [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 -- vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda (str),y cmp #0 @@ -23378,61 +23215,61 @@ print_str_lines: { jmp __breturn // print_str_lines::@return __breturn: - // [416] return + // [419] return rts - // [417] phi from print_str_lines::@1 print_str_lines::@3 to print_str_lines::@2 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2] + // [420] phi from print_str_lines::@1 print_str_lines::@3 to print_str_lines::@2 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2] __b2_from___b1: __b2_from___b3: - // [417] phi (byte*) print_char_cursor#20 = (byte*) print_char_cursor#22 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#0] -- register_copy - // [417] phi (byte*) print_str_lines::str#4 = (byte*) print_str_lines::str#3 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#1] -- register_copy + // [420] phi (byte*) print_char_cursor#20 = (byte*) print_char_cursor#22 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#0] -- register_copy + // [420] phi (byte*) print_str_lines::str#4 = (byte*) print_str_lines::str#3 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#1] -- register_copy jmp __b2 // print_str_lines::@2 __b2: - // [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) -- vbuaa=_deref_pbuz1 + // [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) -- vbuaa=_deref_pbuz1 ldy #0 lda (str),y - // [419] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 -- pbuz1=_inc_pbuz1 + // [422] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 -- pbuz1=_inc_pbuz1 inc.z str bne !+ inc.z str+1 !: - // [420] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 -- vbuc1_eq_vbuaa_then_la1 + // [423] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b3_from___b2 jmp __b4 // print_str_lines::@4 __b4: - // [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 -- _deref_pbuz1=vbuaa + // [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 -- _deref_pbuz1=vbuaa ldy #0 sta (print_char_cursor),y - // [422] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 -- pbuz1=_inc_pbuz1 + // [425] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 -- pbuz1=_inc_pbuz1 inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: - // [423] phi from print_str_lines::@2 print_str_lines::@4 to print_str_lines::@3 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3] + // [426] phi from print_str_lines::@2 print_str_lines::@4 to print_str_lines::@3 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3] __b3_from___b2: __b3_from___b4: - // [423] phi (byte*) print_char_cursor#38 = (byte*) print_char_cursor#20 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3#0] -- register_copy + // [426] phi (byte*) print_char_cursor#38 = (byte*) print_char_cursor#20 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3#0] -- register_copy jmp __b3 // print_str_lines::@3 __b3: - // [424] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 -- vbuc1_neq_vbuaa_then_la1 + // [427] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 -- vbuc1_neq_vbuaa_then_la1 cmp #0 bne __b2_from___b3 - // [425] phi from print_str_lines::@3 to print_str_lines::@5 [phi:print_str_lines::@3->print_str_lines::@5] + // [428] phi from print_str_lines::@3 to print_str_lines::@5 [phi:print_str_lines::@3->print_str_lines::@5] __b5_from___b3: jmp __b5 // print_str_lines::@5 __b5: - // [426] call print_ln - // [428] phi from print_str_lines::@5 to print_ln [phi:print_str_lines::@5->print_ln] + // [429] call print_ln + // [431] phi from print_str_lines::@5 to print_ln [phi:print_str_lines::@5->print_ln] print_ln_from___b5: jsr print_ln jmp __b6 // print_str_lines::@6 __b6: - // [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 -- pbuz1=pbuz2 + // [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 -- pbuz1=pbuz2 lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 @@ -23442,14 +23279,14 @@ print_str_lines: { // print_ln // Print a newline print_ln: { - // [429] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + // [432] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] __b1_from_print_ln: __b1_from___b1: - // [429] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#2 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + // [432] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#2 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy jmp __b1 // print_ln::@1 __b1: - // [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z print_line_cursor @@ -23457,7 +23294,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: - // [431] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 + // [434] if((byte*) print_line_cursor#22<(byte*) print_char_cursor#38) goto print_ln::@1 -- pbuz1_lt_pbuz2_then_la1 lda.z print_line_cursor+1 cmp.z print_char_cursor+1 bcc __b1_from___b1 @@ -23469,40 +23306,40 @@ print_ln: { jmp __breturn // print_ln::@return __breturn: - // [432] return + // [435] return rts } // print_cls // Clear the screen. Also resets current line/char cursor. print_cls: { - // [433] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 -- pvoz1=pvoz2 + // [436] (void*) memset::str#0 ← (void*)(byte*) print_set_screen::screen#2 -- pvoz1=pvoz2 lda.z print_set_screen.screen sta.z memset.str lda.z print_set_screen.screen+1 sta.z memset.str+1 - // [434] call memset - // [436] phi from print_cls to memset [phi:print_cls->memset] + // [437] call memset + // [439] phi from print_cls to memset [phi:print_cls->memset] memset_from_print_cls: jsr memset jmp __breturn // print_cls::@return __breturn: - // [435] return + // [438] return rts } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($b) str) +// memset(void* zp($a) str) memset: { .const c = ' ' .const num = $3e8 - .label end = $1c - .label dst = $b - .label str = $b + .label end = $11 + .label dst = $a + .label str = $a jmp __b1 // memset::@1 __b1: - // [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 -- pbuz1=pbuz2_plus_vwuc1 + // [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 -- pbuz1=pbuz2_plus_vwuc1 lda.z str clc adc #num sta.z end+1 - // [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 - // [439] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2] + // [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 + // [442] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2] __b2_from___b1: __b2_from___b3: - // [439] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy + // [442] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy jmp __b2 // memset::@2 __b2: - // [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 + // [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 lda.z dst+1 cmp.z end+1 bne __b3 @@ -23528,15 +23365,15 @@ memset: { jmp __breturn // memset::@return __breturn: - // [441] return + // [444] return rts // memset::@3 __b3: - // [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y - // [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [446] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 @@ -23545,162 +23382,162 @@ memset: { } // print_set_screen // Set the screen to print on. Also resets current line/char cursor. -// print_set_screen(byte* zp($e) screen) +// print_set_screen(byte* zp($d) screen) print_set_screen: { - .label screen = $e + .label screen = $d jmp __breturn // print_set_screen::@return __breturn: - // [445] return + // [448] return rts } // gfx_init // Initialize the different graphics in the memory gfx_init: { - // [447] call gfx_init_screen0 - // [843] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] + // [450] call gfx_init_screen0 + // [846] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] gfx_init_screen0_from_gfx_init: jsr gfx_init_screen0 - // [448] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] + // [451] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] __b1_from_gfx_init: jmp __b1 // gfx_init::@1 __b1: - // [449] call gfx_init_screen1 - // [831] phi from gfx_init::@1 to gfx_init_screen1 [phi:gfx_init::@1->gfx_init_screen1] + // [452] call gfx_init_screen1 + // [834] phi from gfx_init::@1 to gfx_init_screen1 [phi:gfx_init::@1->gfx_init_screen1] gfx_init_screen1_from___b1: jsr gfx_init_screen1 - // [450] phi from gfx_init::@1 to gfx_init::@2 [phi:gfx_init::@1->gfx_init::@2] + // [453] phi from gfx_init::@1 to gfx_init::@2 [phi:gfx_init::@1->gfx_init::@2] __b2_from___b1: jmp __b2 // gfx_init::@2 __b2: - // [451] call gfx_init_screen2 - // [816] phi from gfx_init::@2 to gfx_init_screen2 [phi:gfx_init::@2->gfx_init_screen2] + // [454] call gfx_init_screen2 + // [819] phi from gfx_init::@2 to gfx_init_screen2 [phi:gfx_init::@2->gfx_init_screen2] gfx_init_screen2_from___b2: jsr gfx_init_screen2 - // [452] phi from gfx_init::@2 to gfx_init::@3 [phi:gfx_init::@2->gfx_init::@3] + // [455] phi from gfx_init::@2 to gfx_init::@3 [phi:gfx_init::@2->gfx_init::@3] __b3_from___b2: jmp __b3 // gfx_init::@3 __b3: - // [453] call gfx_init_screen3 - // [802] phi from gfx_init::@3 to gfx_init_screen3 [phi:gfx_init::@3->gfx_init_screen3] + // [456] call gfx_init_screen3 + // [805] phi from gfx_init::@3 to gfx_init_screen3 [phi:gfx_init::@3->gfx_init_screen3] gfx_init_screen3_from___b3: jsr gfx_init_screen3 - // [454] phi from gfx_init::@3 to gfx_init::@4 [phi:gfx_init::@3->gfx_init::@4] + // [457] phi from gfx_init::@3 to gfx_init::@4 [phi:gfx_init::@3->gfx_init::@4] __b4_from___b3: jmp __b4 // gfx_init::@4 __b4: - // [455] call gfx_init_screen4 - // [792] phi from gfx_init::@4 to gfx_init_screen4 [phi:gfx_init::@4->gfx_init_screen4] + // [458] call gfx_init_screen4 + // [795] phi from gfx_init::@4 to gfx_init_screen4 [phi:gfx_init::@4->gfx_init_screen4] gfx_init_screen4_from___b4: jsr gfx_init_screen4 - // [456] phi from gfx_init::@4 to gfx_init::@5 [phi:gfx_init::@4->gfx_init::@5] + // [459] phi from gfx_init::@4 to gfx_init::@5 [phi:gfx_init::@4->gfx_init::@5] __b5_from___b4: jmp __b5 // gfx_init::@5 __b5: - // [457] call gfx_init_charset + // [460] call gfx_init_charset jsr gfx_init_charset - // [458] phi from gfx_init::@5 to gfx_init::@6 [phi:gfx_init::@5->gfx_init::@6] + // [461] phi from gfx_init::@5 to gfx_init::@6 [phi:gfx_init::@5->gfx_init::@6] __b6_from___b5: jmp __b6 // gfx_init::@6 __b6: - // [459] call gfx_init_vic_bitmap - // [602] phi from gfx_init::@6 to gfx_init_vic_bitmap [phi:gfx_init::@6->gfx_init_vic_bitmap] + // [462] call gfx_init_vic_bitmap + // [605] phi from gfx_init::@6 to gfx_init_vic_bitmap [phi:gfx_init::@6->gfx_init_vic_bitmap] gfx_init_vic_bitmap_from___b6: jsr gfx_init_vic_bitmap - // [460] phi from gfx_init::@6 to gfx_init::@7 [phi:gfx_init::@6->gfx_init::@7] + // [463] phi from gfx_init::@6 to gfx_init::@7 [phi:gfx_init::@6->gfx_init::@7] __b7_from___b6: jmp __b7 // gfx_init::@7 __b7: - // [461] call gfx_init_plane_8bppchunky - // [582] phi from gfx_init::@7 to gfx_init_plane_8bppchunky [phi:gfx_init::@7->gfx_init_plane_8bppchunky] + // [464] call gfx_init_plane_8bppchunky + // [585] phi from gfx_init::@7 to gfx_init_plane_8bppchunky [phi:gfx_init::@7->gfx_init_plane_8bppchunky] gfx_init_plane_8bppchunky_from___b7: jsr gfx_init_plane_8bppchunky - // [462] phi from gfx_init::@7 to gfx_init::@8 [phi:gfx_init::@7->gfx_init::@8] + // [465] phi from gfx_init::@7 to gfx_init::@8 [phi:gfx_init::@7->gfx_init::@8] __b8_from___b7: jmp __b8 // gfx_init::@8 __b8: - // [463] call gfx_init_plane_charset8 - // [557] phi from gfx_init::@8 to gfx_init_plane_charset8 [phi:gfx_init::@8->gfx_init_plane_charset8] + // [466] call gfx_init_plane_charset8 + // [560] phi from gfx_init::@8 to gfx_init_plane_charset8 [phi:gfx_init::@8->gfx_init_plane_charset8] gfx_init_plane_charset8_from___b8: jsr gfx_init_plane_charset8 - // [464] phi from gfx_init::@8 to gfx_init::@9 [phi:gfx_init::@8->gfx_init::@9] + // [467] phi from gfx_init::@8 to gfx_init::@9 [phi:gfx_init::@8->gfx_init::@9] __b9_from___b8: jmp __b9 // gfx_init::@9 __b9: - // [465] call gfx_init_plane_horisontal - // [539] phi from gfx_init::@9 to gfx_init_plane_horisontal [phi:gfx_init::@9->gfx_init_plane_horisontal] + // [468] call gfx_init_plane_horisontal + // [542] phi from gfx_init::@9 to gfx_init_plane_horisontal [phi:gfx_init::@9->gfx_init_plane_horisontal] gfx_init_plane_horisontal_from___b9: jsr gfx_init_plane_horisontal - // [466] phi from gfx_init::@9 to gfx_init::@10 [phi:gfx_init::@9->gfx_init::@10] + // [469] phi from gfx_init::@9 to gfx_init::@10 [phi:gfx_init::@9->gfx_init::@10] __b10_from___b9: jmp __b10 // gfx_init::@10 __b10: - // [467] call gfx_init_plane_vertical - // [526] phi from gfx_init::@10 to gfx_init_plane_vertical [phi:gfx_init::@10->gfx_init_plane_vertical] + // [470] call gfx_init_plane_vertical + // [529] phi from gfx_init::@10 to gfx_init_plane_vertical [phi:gfx_init::@10->gfx_init_plane_vertical] gfx_init_plane_vertical_from___b10: jsr gfx_init_plane_vertical - // [468] phi from gfx_init::@10 to gfx_init::@11 [phi:gfx_init::@10->gfx_init::@11] + // [471] phi from gfx_init::@10 to gfx_init::@11 [phi:gfx_init::@10->gfx_init::@11] __b11_from___b10: jmp __b11 // gfx_init::@11 __b11: - // [469] call gfx_init_plane_horisontal2 - // [511] phi from gfx_init::@11 to gfx_init_plane_horisontal2 [phi:gfx_init::@11->gfx_init_plane_horisontal2] + // [472] call gfx_init_plane_horisontal2 + // [514] phi from gfx_init::@11 to gfx_init_plane_horisontal2 [phi:gfx_init::@11->gfx_init_plane_horisontal2] gfx_init_plane_horisontal2_from___b11: jsr gfx_init_plane_horisontal2 - // [470] phi from gfx_init::@11 to gfx_init::@12 [phi:gfx_init::@11->gfx_init::@12] + // [473] phi from gfx_init::@11 to gfx_init::@12 [phi:gfx_init::@11->gfx_init::@12] __b12_from___b11: jmp __b12 // gfx_init::@12 __b12: - // [471] call gfx_init_plane_vertical2 - // [508] phi from gfx_init::@12 to gfx_init_plane_vertical2 [phi:gfx_init::@12->gfx_init_plane_vertical2] + // [474] call gfx_init_plane_vertical2 + // [511] phi from gfx_init::@12 to gfx_init_plane_vertical2 [phi:gfx_init::@12->gfx_init_plane_vertical2] gfx_init_plane_vertical2_from___b12: jsr gfx_init_plane_vertical2 - // [472] phi from gfx_init::@12 to gfx_init::@13 [phi:gfx_init::@12->gfx_init::@13] + // [475] phi from gfx_init::@12 to gfx_init::@13 [phi:gfx_init::@12->gfx_init::@13] __b13_from___b12: jmp __b13 // gfx_init::@13 __b13: - // [473] call gfx_init_plane_blank - // [505] phi from gfx_init::@13 to gfx_init_plane_blank [phi:gfx_init::@13->gfx_init_plane_blank] + // [476] call gfx_init_plane_blank + // [508] phi from gfx_init::@13 to gfx_init_plane_blank [phi:gfx_init::@13->gfx_init_plane_blank] gfx_init_plane_blank_from___b13: jsr gfx_init_plane_blank - // [474] phi from gfx_init::@13 to gfx_init::@14 [phi:gfx_init::@13->gfx_init::@14] + // [477] phi from gfx_init::@13 to gfx_init::@14 [phi:gfx_init::@13->gfx_init::@14] __b14_from___b13: jmp __b14 // gfx_init::@14 __b14: - // [475] call gfx_init_plane_full - // [477] phi from gfx_init::@14 to gfx_init_plane_full [phi:gfx_init::@14->gfx_init_plane_full] + // [478] call gfx_init_plane_full + // [480] phi from gfx_init::@14 to gfx_init_plane_full [phi:gfx_init::@14->gfx_init_plane_full] gfx_init_plane_full_from___b14: jsr gfx_init_plane_full jmp __breturn // gfx_init::@return __breturn: - // [476] return + // [479] return rts } // gfx_init_plane_full // Initialize Plane with all pixels gfx_init_plane_full: { - // [478] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_full to gfx_init_plane_fill [phi:gfx_init_plane_full->gfx_init_plane_fill] + // [481] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_full to gfx_init_plane_fill [phi:gfx_init_plane_full->gfx_init_plane_fill] gfx_init_plane_fill_from_gfx_init_plane_full: - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $ff [phi:gfx_init_plane_full->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $ff [phi:gfx_init_plane_full->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #$ff sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_FULL [phi:gfx_init_plane_full->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_FULL [phi:gfx_init_plane_full->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_FULL @@ -23713,22 +23550,22 @@ gfx_init_plane_full: { jmp __breturn // gfx_init_plane_full::@return __breturn: - // [479] return + // [482] return rts } // gfx_init_plane_fill // Initialize 320*200 1bpp pixel ($2000) plane with identical bytes -// gfx_init_plane_fill(dword zp(2) plane_addr, byte zp(8) fill) +// gfx_init_plane_fill(dword zp(2) plane_addr, byte zp($1e) fill) gfx_init_plane_fill: { - .label __0 = $12 - .label __1 = $16 - .label __4 = $e - .label __5 = $e - .label gfxb = $e - .label by = $10 + .label __0 = $13 + .label __1 = $17 + .label __4 = $d + .label __5 = $d + .label gfxb = $d + .label by = $f .label plane_addr = 2 - .label fill = 8 - // [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 -- vduz1=vduz2_rol_2 + .label fill = $1e + // [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 -- vduz1=vduz2_rol_2 lda.z plane_addr asl sta.z __0 @@ -23745,35 +23582,35 @@ gfx_init_plane_fill: { rol.z __0+1 rol.z __0+2 rol.z __0+3 - // [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 -- vwuz1=_hi_vduz2 + // [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 -- vwuz1=_hi_vduz2 lda.z __0+2 sta.z __1 lda.z __0+3 sta.z __1+1 - // [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 -- vbuaa=_lo_vwuz1 + // [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 -- vbuaa=_lo_vwuz1 lda.z __1 - // [484] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 - // [485] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_fill to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1] + // [487] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 + // [488] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_fill to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_fill: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1#0] -- register_copy + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1#0] -- register_copy jsr dtvSetCpuBankSegment1 jmp __b5 // gfx_init_plane_fill::@5 __b5: - // [486] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 -- vwuz1=_lo_vduz2 + // [489] (word~) gfx_init_plane_fill::$4 ← < (dword) gfx_init_plane_fill::plane_addr#3 -- vwuz1=_lo_vduz2 lda.z plane_addr sta.z __4 lda.z plane_addr+1 sta.z __4+1 - // [487] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff -- vwuz1=vwuz1_band_vwuc1 + // [490] (word~) gfx_init_plane_fill::$5 ← (word~) gfx_init_plane_fill::$4 & (word) $3fff -- vwuz1=vwuz1_band_vwuc1 lda.z __5 and #<$3fff sta.z __5 lda.z __5+1 and #>$3fff sta.z __5+1 - // [488] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 -- vwuz1=vwuc1_plus_vwuz1 + // [491] (word) gfx_init_plane_fill::gfxb#0 ← (word) $4000 + (word~) gfx_init_plane_fill::$5 -- vwuz1=vwuc1_plus_vwuz1 clc lda.z gfxb adc #<$4000 @@ -23781,72 +23618,72 @@ gfx_init_plane_fill: { lda.z gfxb+1 adc #>$4000 sta.z gfxb+1 - // [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 - // [490] phi from gfx_init_plane_fill::@5 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1] + // [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 + // [493] phi from gfx_init_plane_fill::@5 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1] __b1_from___b5: - // [490] phi (byte) gfx_init_plane_fill::by#4 = (byte) 0 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#0] -- vbuz1=vbuc1 + // [493] phi (byte) gfx_init_plane_fill::by#4 = (byte) 0 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#0] -- vbuz1=vbuc1 lda #0 sta.z by - // [490] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#6 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#1] -- register_copy + // [493] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#6 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#1] -- register_copy jmp __b1 - // [490] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1] + // [493] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1] __b1_from___b3: - // [490] phi (byte) gfx_init_plane_fill::by#4 = (byte) gfx_init_plane_fill::by#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#0] -- register_copy - // [490] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#1] -- register_copy + // [493] phi (byte) gfx_init_plane_fill::by#4 = (byte) gfx_init_plane_fill::by#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#0] -- register_copy + // [493] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#1] -- register_copy jmp __b1 // gfx_init_plane_fill::@1 __b1: - // [491] phi from gfx_init_plane_fill::@1 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2] + // [494] phi from gfx_init_plane_fill::@1 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2] __b2_from___b1: - // [491] phi (byte) gfx_init_plane_fill::bx#2 = (byte) 0 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#0] -- vbuxx=vbuc1 + // [494] phi (byte) gfx_init_plane_fill::bx#2 = (byte) 0 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#0] -- vbuxx=vbuc1 ldx #0 - // [491] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#3 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#1] -- register_copy + // [494] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#3 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#1] -- register_copy jmp __b2 - // [491] phi from gfx_init_plane_fill::@2 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2] + // [494] phi from gfx_init_plane_fill::@2 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2] __b2_from___b2: - // [491] phi (byte) gfx_init_plane_fill::bx#2 = (byte) gfx_init_plane_fill::bx#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#0] -- register_copy - // [491] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#1] -- register_copy + // [494] phi (byte) gfx_init_plane_fill::bx#2 = (byte) gfx_init_plane_fill::bx#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#0] -- register_copy + // [494] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#1] -- register_copy jmp __b2 // gfx_init_plane_fill::@2 __b2: - // [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 -- _deref_pbuz1=vbuz2 + // [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 -- _deref_pbuz1=vbuz2 lda.z fill ldy #0 sta (gfxb),y - // [493] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 -- pbuz1=_inc_pbuz1 + // [496] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: - // [494] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 -- vbuxx=_inc_vbuxx + // [497] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 -- vbuxx=_inc_vbuxx inx - // [495] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 -- vbuxx_neq_vbuc1_then_la1 + // [498] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_plane_fill::@3 __b3: - // [496] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 -- vbuz1=_inc_vbuz1 + // [499] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 -- vbuz1=_inc_vbuz1 inc.z by - // [497] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 -- vbuz1_neq_vbuc1_then_la1 + // [500] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z by bne __b1_from___b3 - // [498] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@4 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@4] + // [501] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@4 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@4] __b4_from___b3: jmp __b4 // gfx_init_plane_fill::@4 __b4: - // [499] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_fill::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1] + // [502] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_fill::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_fill::@return __breturn: - // [500] return + // [503] return rts } // dtvSetCpuBankSegment1 @@ -23857,7 +23694,7 @@ gfx_init_plane_fill: { dtvSetCpuBankSegment1: { // Move CPU BANK 1 SEGMENT ($4000-$7fff) .label cpuBank = $ff - // [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa + // [505] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa sta cpuBank // asm { .byte$32,$dd lda$ff .byte$32,$00 } .byte $32, $dd @@ -23866,19 +23703,19 @@ dtvSetCpuBankSegment1: { jmp __breturn // dtvSetCpuBankSegment1::@return __breturn: - // [504] return + // [507] return rts } // gfx_init_plane_blank // Initialize Plane with blank pixels gfx_init_plane_blank: { - // [506] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_blank to gfx_init_plane_fill [phi:gfx_init_plane_blank->gfx_init_plane_fill] + // [509] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_blank to gfx_init_plane_fill [phi:gfx_init_plane_blank->gfx_init_plane_fill] gfx_init_plane_fill_from_gfx_init_plane_blank: - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) 0 [phi:gfx_init_plane_blank->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) 0 [phi:gfx_init_plane_blank->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #0 sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_BLANK [phi:gfx_init_plane_blank->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_BLANK [phi:gfx_init_plane_blank->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_BLANK @@ -23891,19 +23728,19 @@ gfx_init_plane_blank: { jmp __breturn // gfx_init_plane_blank::@return __breturn: - // [507] return + // [510] return rts } // gfx_init_plane_vertical2 // Initialize Plane with Vertical Stripes every 2 pixels gfx_init_plane_vertical2: { - // [509] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_vertical2 to gfx_init_plane_fill [phi:gfx_init_plane_vertical2->gfx_init_plane_fill] + // [512] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_vertical2 to gfx_init_plane_fill [phi:gfx_init_plane_vertical2->gfx_init_plane_fill] gfx_init_plane_fill_from_gfx_init_plane_vertical2: - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $1b [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $1b [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #$1b sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_VERTICAL2 [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_VERTICAL2 [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_VERTICAL2 @@ -23916,7 +23753,7 @@ gfx_init_plane_vertical2: { jmp __breturn // gfx_init_plane_vertical2::@return __breturn: - // [510] return + // [513] return rts } // gfx_init_plane_horisontal2 @@ -23924,88 +23761,88 @@ gfx_init_plane_vertical2: { gfx_init_plane_horisontal2: { .const gfxbCpuBank = PLANE_HORISONTAL2/$4000 .label gfxa = 6 - .label ay = 9 - // [512] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal2 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1] + .label ay = 8 + // [515] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal2 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_horisontal2: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - // [513] phi from gfx_init_plane_horisontal2 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1] + // [516] phi from gfx_init_plane_horisontal2 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1] __b1_from_gfx_init_plane_horisontal2: - // [513] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#0] -- pbuz1=pbuc1 + // [516] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#0] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [513] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#1] -- vbuz1=vbuc1 + // [516] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#1] -- vbuz1=vbuc1 lda #0 sta.z ay jmp __b1 - // [513] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1] + // [516] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1] __b1_from___b3: - // [513] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#0] -- register_copy - // [513] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) gfx_init_plane_horisontal2::ay#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#1] -- register_copy + // [516] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#0] -- register_copy + // [516] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) gfx_init_plane_horisontal2::ay#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#1] -- register_copy jmp __b1 // gfx_init_plane_horisontal2::@1 __b1: - // [514] phi from gfx_init_plane_horisontal2::@1 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2] + // [517] phi from gfx_init_plane_horisontal2::@1 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2] __b2_from___b1: - // [514] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#0] -- vbuxx=vbuc1 + // [517] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#0] -- vbuxx=vbuc1 ldx #0 - // [514] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#3 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#1] -- register_copy + // [517] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#3 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#1] -- register_copy jmp __b2 - // [514] phi from gfx_init_plane_horisontal2::@2 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2] + // [517] phi from gfx_init_plane_horisontal2::@2 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2] __b2_from___b2: - // [514] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) gfx_init_plane_horisontal2::ax#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#0] -- register_copy - // [514] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#1] -- register_copy + // [517] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) gfx_init_plane_horisontal2::ax#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#0] -- register_copy + // [517] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#1] -- register_copy jmp __b2 // gfx_init_plane_horisontal2::@2 __b2: - // [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 -- vbuaa=vbuz1_ror_1 + // [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 -- vbuaa=vbuz1_ror_1 lda.z ay lsr - // [516] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 -- vbuaa=vbuaa_band_vbuc1 + // [519] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 -- vbuaa=vbuaa_band_vbuc1 and #3 - // [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) -- _deref_pbuz1=pbuc1_derefidx_vbuaa + // [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) -- _deref_pbuz1=pbuc1_derefidx_vbuaa tay lda row_bitmask,y ldy #0 sta (gfxa),y - // [518] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 -- pbuz1=_inc_pbuz1 + // [521] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [519] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 -- vbuxx=_inc_vbuxx + // [522] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 -- vbuxx=_inc_vbuxx inx - // [520] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 -- vbuxx_neq_vbuc1_then_la1 + // [523] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_plane_horisontal2::@3 __b3: - // [521] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 -- vbuz1=_inc_vbuz1 + // [524] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 -- vbuz1=_inc_vbuz1 inc.z ay - // [522] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 -- vbuz1_neq_vbuc1_then_la1 + // [525] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z ay bne __b1_from___b3 - // [523] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@4 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@4] + // [526] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@4 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@4] __b4_from___b3: jmp __b4 // gfx_init_plane_horisontal2::@4 __b4: - // [524] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal2::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1] + // [527] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal2::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_horisontal2::@return __breturn: - // [525] return + // [528] return rts row_bitmask: .byte 0, $55, $aa, $ff } @@ -24014,82 +23851,82 @@ gfx_init_plane_horisontal2: { gfx_init_plane_vertical: { .const gfxbCpuBank = PLANE_VERTICAL/$4000 .label gfxb = 6 - .label by = $11 - // [527] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_vertical to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1] + .label by = $10 + // [530] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_vertical to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_vertical: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_vertical::gfxbCpuBank#0 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_vertical::gfxbCpuBank#0 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - // [528] phi from gfx_init_plane_vertical to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1] + // [531] phi from gfx_init_plane_vertical to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1] __b1_from_gfx_init_plane_vertical: - // [528] phi (byte) gfx_init_plane_vertical::by#4 = (byte) 0 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#0] -- vbuz1=vbuc1 + // [531] phi (byte) gfx_init_plane_vertical::by#4 = (byte) 0 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#0] -- vbuz1=vbuc1 lda #0 sta.z by - // [528] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#1] -- pbuz1=pbuc1 + // [531] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#1] -- pbuz1=pbuc1 lda #<$4000+(PLANE_VERTICAL&$3fff) sta.z gfxb lda #>$4000+(PLANE_VERTICAL&$3fff) sta.z gfxb+1 jmp __b1 - // [528] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1] + // [531] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1] __b1_from___b3: - // [528] phi (byte) gfx_init_plane_vertical::by#4 = (byte) gfx_init_plane_vertical::by#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#0] -- register_copy - // [528] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#1] -- register_copy + // [531] phi (byte) gfx_init_plane_vertical::by#4 = (byte) gfx_init_plane_vertical::by#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#0] -- register_copy + // [531] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#1] -- register_copy jmp __b1 // gfx_init_plane_vertical::@1 __b1: - // [529] phi from gfx_init_plane_vertical::@1 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2] + // [532] phi from gfx_init_plane_vertical::@1 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2] __b2_from___b1: - // [529] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) 0 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#0] -- vbuxx=vbuc1 + // [532] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) 0 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#0] -- vbuxx=vbuc1 ldx #0 - // [529] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#3 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#1] -- register_copy + // [532] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#3 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#1] -- register_copy jmp __b2 - // [529] phi from gfx_init_plane_vertical::@2 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2] + // [532] phi from gfx_init_plane_vertical::@2 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2] __b2_from___b2: - // [529] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) gfx_init_plane_vertical::bx#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#0] -- register_copy - // [529] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#1] -- register_copy + // [532] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) gfx_init_plane_vertical::bx#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#0] -- register_copy + // [532] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#1] -- register_copy jmp __b2 // gfx_init_plane_vertical::@2 __b2: - // [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f -- _deref_pbuz1=vbuc1 + // [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f -- _deref_pbuz1=vbuc1 lda #$f ldy #0 sta (gfxb),y - // [531] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 -- pbuz1=_inc_pbuz1 + // [534] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: - // [532] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 -- vbuxx=_inc_vbuxx + // [535] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 -- vbuxx=_inc_vbuxx inx - // [533] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 -- vbuxx_neq_vbuc1_then_la1 + // [536] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_plane_vertical::@3 __b3: - // [534] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 -- vbuz1=_inc_vbuz1 + // [537] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 -- vbuz1=_inc_vbuz1 inc.z by - // [535] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 -- vbuz1_neq_vbuc1_then_la1 + // [538] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z by bne __b1_from___b3 - // [536] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@4 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@4] + // [539] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@4 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@4] __b4_from___b3: jmp __b4 // gfx_init_plane_vertical::@4 __b4: - // [537] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_vertical::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1] + // [540] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_vertical::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_vertical::@return __breturn: - // [538] return + // [541] return rts } // gfx_init_plane_horisontal @@ -24097,106 +23934,106 @@ gfx_init_plane_vertical: { gfx_init_plane_horisontal: { .const gfxbCpuBank = PLANE_HORISONTAL/$4000 .label gfxa = 6 - .label ay = $a - // [540] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1] + .label ay = 9 + // [543] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_horisontal: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - // [541] phi from gfx_init_plane_horisontal to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1] + // [544] phi from gfx_init_plane_horisontal to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1] __b1_from_gfx_init_plane_horisontal: - // [541] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#0] -- pbuz1=pbuc1 + // [544] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#0] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [541] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#1] -- vbuz1=vbuc1 + // [544] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#1] -- vbuz1=vbuc1 lda #0 sta.z ay jmp __b1 - // [541] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1] + // [544] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1] __b1_from___b6: - // [541] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#0] -- register_copy - // [541] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) gfx_init_plane_horisontal::ay#1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#1] -- register_copy + // [544] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#0] -- register_copy + // [544] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) gfx_init_plane_horisontal::ay#1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#1] -- register_copy jmp __b1 // gfx_init_plane_horisontal::@1 __b1: - // [542] phi from gfx_init_plane_horisontal::@1 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2] + // [545] phi from gfx_init_plane_horisontal::@1 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2] __b2_from___b1: - // [542] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#0] -- vbuxx=vbuc1 + // [545] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#0] -- vbuxx=vbuc1 ldx #0 - // [542] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#6 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#1] -- register_copy + // [545] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#6 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#1] -- register_copy jmp __b2 - // [542] phi from gfx_init_plane_horisontal::@4 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2] + // [545] phi from gfx_init_plane_horisontal::@4 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2] __b2_from___b4: - // [542] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) gfx_init_plane_horisontal::ax#1 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#0] -- register_copy - // [542] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#1] -- register_copy + // [545] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) gfx_init_plane_horisontal::ax#1 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#0] -- register_copy + // [545] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#1] -- register_copy jmp __b2 // gfx_init_plane_horisontal::@2 __b2: - // [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 -- vbuaa=vbuz1_band_vbuc1 + // [546] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 -- vbuaa=vbuz1_band_vbuc1 lda #4 and.z ay - // [544] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -- vbuaa_eq_0_then_la1 + // [547] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq __b3 jmp __b5 // gfx_init_plane_horisontal::@5 __b5: - // [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff -- _deref_pbuz1=vbuc1 + // [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff -- _deref_pbuz1=vbuc1 lda #$ff ldy #0 sta (gfxa),y - // [546] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 + // [549] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [547] phi from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 to gfx_init_plane_horisontal::@4 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4] + // [550] phi from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 to gfx_init_plane_horisontal::@4 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4] __b4_from___b3: __b4_from___b5: - // [547] phi (byte*) gfx_init_plane_horisontal::gfxa#7 = (byte*) gfx_init_plane_horisontal::gfxa#1 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4#0] -- register_copy + // [550] phi (byte*) gfx_init_plane_horisontal::gfxa#7 = (byte*) gfx_init_plane_horisontal::gfxa#1 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4#0] -- register_copy jmp __b4 // gfx_init_plane_horisontal::@4 __b4: - // [548] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 -- vbuxx=_inc_vbuxx + // [551] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 -- vbuxx=_inc_vbuxx inx - // [549] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 -- vbuxx_neq_vbuc1_then_la1 + // [552] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b4 jmp __b6 // gfx_init_plane_horisontal::@6 __b6: - // [550] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 -- vbuz1=_inc_vbuz1 + // [553] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 -- vbuz1=_inc_vbuz1 inc.z ay - // [551] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 -- vbuz1_neq_vbuc1_then_la1 + // [554] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z ay bne __b1_from___b6 - // [552] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@7] + // [555] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@7] __b7_from___b6: jmp __b7 // gfx_init_plane_horisontal::@7 __b7: - // [553] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal::@7 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1] + // [556] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal::@7 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b7: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_horisontal::@return __breturn: - // [554] return + // [557] return rts // gfx_init_plane_horisontal::@3 __b3: - // [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (gfxa),y - // [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 + // [559] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 @@ -24208,224 +24045,224 @@ gfx_init_plane_horisontal: { gfx_init_plane_charset8: { // 8bpp cells for Plane B (charset) - ROM charset with 256 colors .const gfxbCpuBank = PLANE_CHARSET8/$4000 - .label bits = 8 + .label bits = $1e .label chargen = 6 - .label gfxa = $b - .label col = $10 - .label cr = $d - .label ch = $a - // [558] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] + .label gfxa = $a + .label col = $f + .label cr = $c + .label ch = 9 + // [561] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_charset8: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 jmp __b9 // gfx_init_plane_charset8::@9 __b9: - // [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2 + // [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_CHARROM sta PROCPORT - // [560] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] + // [563] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] __b1_from___b9: - // [560] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 + // [563] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 lda #0 sta.z ch - // [560] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 + // [563] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 lda #0 sta.z col - // [560] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 + // [563] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [560] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + // [563] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 lda #CHARGEN sta.z chargen+1 jmp __b1 - // [560] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] + // [563] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] __b1_from___b7: - // [560] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy - // [560] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy - // [560] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy - // [560] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy + // [563] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy + // [563] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy + // [563] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy + // [563] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy jmp __b1 // gfx_init_plane_charset8::@1 __b1: - // [561] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] + // [564] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] __b2_from___b1: - // [561] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 + // [564] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 lda #0 sta.z cr - // [561] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy jmp __b2 - // [561] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] + // [564] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] __b2_from___b6: - // [561] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy - // [561] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy jmp __b2 // gfx_init_plane_charset8::@2 __b2: - // [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 + // [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 ldy #0 lda (chargen),y sta.z bits - // [563] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 + // [566] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 inc.z chargen bne !+ inc.z chargen+1 !: - // [564] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] + // [567] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] __b3_from___b2: - // [564] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 + // [567] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 ldx #0 - // [564] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy - // [564] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy + // [567] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy jmp __b3 - // [564] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] + // [567] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] __b3_from___b4: - // [564] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy - // [564] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy + // [567] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy jmp __b3 // gfx_init_plane_charset8::@3 __b3: - // [565] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 + // [568] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 lda #$80 and.z bits - // [566] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1 + // [569] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1 cmp #0 beq __b4_from___b3 jmp __b5 // gfx_init_plane_charset8::@5 __b5: - // [567] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1 + // [570] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1 lda.z col - // [568] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] + // [571] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] __b4_from___b5: - // [568] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy + // [571] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy jmp __b4 - // [568] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] + // [571] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] __b4_from___b3: - // [568] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 + // [571] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 lda #0 jmp __b4 // gfx_init_plane_charset8::@4 __b4: - // [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa + // [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa ldy #0 sta (gfxa),y - // [570] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 + // [573] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [571] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [574] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z bits - // [572] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 + // [575] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 inc.z col - // [573] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx + // [576] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx inx - // [574] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1 + // [577] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b3_from___b4 jmp __b6 // gfx_init_plane_charset8::@6 __b6: - // [575] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 + // [578] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 inc.z cr - // [576] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 + // [579] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z cr bne __b2_from___b6 jmp __b7 // gfx_init_plane_charset8::@7 __b7: - // [577] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 + // [580] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 inc.z ch - // [578] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 + // [581] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 lda.z ch cmp #0 bne __b1_from___b7 jmp __b8 // gfx_init_plane_charset8::@8 __b8: - // [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 + // [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - // [580] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] + // [583] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b8: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_charset8::@return __breturn: - // [581] return + // [584] return rts } // gfx_init_plane_8bppchunky // Initialize 8BPP Chunky Bitmap (contains 8bpp pixels) gfx_init_plane_8bppchunky: { - .label __5 = $18 - .label gfxb = $e - .label x = $b - .label y = $d - // [583] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1] + .label __5 = $19 + .label gfxb = $d + .label x = $a + .label y = $c + // [586] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from_gfx_init_plane_8bppchunky: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #PLANE_8BPP_CHUNKY/$4000 jsr dtvSetCpuBankSegment1 - // [584] phi from gfx_init_plane_8bppchunky to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1] + // [587] phi from gfx_init_plane_8bppchunky to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1] __b1_from_gfx_init_plane_8bppchunky: - // [584] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = ++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#0] -- vbuxx=vbuc1 + // [587] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = ++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#0] -- vbuxx=vbuc1 ldx #PLANE_8BPP_CHUNKY/$4000+1 - // [584] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) 0 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#1] -- vbuz1=vbuc1 + // [587] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) 0 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#1] -- vbuz1=vbuc1 lda #0 sta.z y - // [584] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#2] -- pbuz1=pbuc1 + // [587] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#2] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 jmp __b1 - // [584] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1] + // [587] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1] __b1_from___b5: - // [584] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#0] -- register_copy - // [584] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) gfx_init_plane_8bppchunky::y#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#1] -- register_copy - // [584] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#2] -- register_copy + // [587] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#0] -- register_copy + // [587] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) gfx_init_plane_8bppchunky::y#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#1] -- register_copy + // [587] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#2] -- register_copy jmp __b1 // gfx_init_plane_8bppchunky::@1 __b1: - // [585] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2] + // [588] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2] __b2_from___b1: - // [585] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy - // [585] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1 + // [588] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy + // [588] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1 lda #<0 sta.z x lda #>0 sta.z x+1 - // [585] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy + // [588] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy jmp __b2 - // [585] phi from gfx_init_plane_8bppchunky::@3 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2] + // [588] phi from gfx_init_plane_8bppchunky::@3 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2] __b2_from___b3: - // [585] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#0] -- register_copy - // [585] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) gfx_init_plane_8bppchunky::x#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#1] -- register_copy - // [585] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#2] -- register_copy + // [588] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#0] -- register_copy + // [588] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) gfx_init_plane_8bppchunky::x#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#1] -- register_copy + // [588] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#2] -- register_copy jmp __b2 // gfx_init_plane_8bppchunky::@2 __b2: - // [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -- pbuz1_neq_vwuc1_then_la1 + // [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -- pbuz1_neq_vwuc1_then_la1 lda.z gfxb+1 cmp #>$8000 bne __b3_from___b2 @@ -24435,35 +24272,35 @@ gfx_init_plane_8bppchunky: { jmp __b4 // gfx_init_plane_8bppchunky::@4 __b4: - // [587] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuaa=vbuxx + // [590] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuaa=vbuxx txa - // [588] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1] + // [591] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b4: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1#0] -- register_copy + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1#0] -- register_copy jsr dtvSetCpuBankSegment1 jmp __b7 // gfx_init_plane_8bppchunky::@7 __b7: - // [589] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuxx=_inc_vbuxx + // [592] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuxx=_inc_vbuxx inx - // [590] phi from gfx_init_plane_8bppchunky::@7 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3] + // [593] phi from gfx_init_plane_8bppchunky::@7 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3] __b3_from___b7: - // [590] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#0] -- register_copy - // [590] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#1] -- pbuz1=pbuc1 + // [593] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#0] -- register_copy + // [593] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#1] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 jmp __b3 - // [590] phi from gfx_init_plane_8bppchunky::@2 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3] + // [593] phi from gfx_init_plane_8bppchunky::@2 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3] __b3_from___b2: - // [590] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#0] -- register_copy - // [590] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) gfx_init_plane_8bppchunky::gfxb#3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#1] -- register_copy + // [593] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#0] -- register_copy + // [593] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) gfx_init_plane_8bppchunky::gfxb#3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#1] -- register_copy jmp __b3 // gfx_init_plane_8bppchunky::@3 __b3: - // [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 -- vwuz1=vwuz2_plus_vbuz3 + // [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 -- vwuz1=vwuz2_plus_vbuz3 lda.z y clc adc.z x @@ -24471,22 +24308,22 @@ gfx_init_plane_8bppchunky: { lda #0 adc.z x+1 sta.z __5+1 - // [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 -- vbuaa=_byte_vwuz1 + // [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 -- vbuaa=_byte_vwuz1 lda.z __5 - // [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 -- _deref_pbuz1=vbuaa + // [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 -- _deref_pbuz1=vbuaa ldy #0 sta (gfxb),y - // [594] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 -- pbuz1=_inc_pbuz1 + // [597] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: - // [595] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 -- vwuz1=_inc_vwuz1 + // [598] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 -- vwuz1=_inc_vwuz1 inc.z x bne !+ inc.z x+1 !: - // [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 -- vwuz1_neq_vwuc1_then_la1 + // [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 -- vwuz1_neq_vwuc1_then_la1 lda.z x+1 cmp #>$140 bne __b2_from___b3 @@ -24496,102 +24333,102 @@ gfx_init_plane_8bppchunky: { jmp __b5 // gfx_init_plane_8bppchunky::@5 __b5: - // [597] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 -- vbuz1=_inc_vbuz1 + // [600] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 -- vbuz1=_inc_vbuz1 inc.z y - // [598] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 -- vbuz1_neq_vbuc1_then_la1 + // [601] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z y bne __b1_from___b5 - // [599] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@6 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@6] + // [602] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@6 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@6] __b6_from___b5: jmp __b6 // gfx_init_plane_8bppchunky::@6 __b6: - // [600] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1] + // [603] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1] dtvSetCpuBankSegment1_from___b6: - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 jmp __breturn // gfx_init_plane_8bppchunky::@return __breturn: - // [601] return + // [604] return rts } // gfx_init_vic_bitmap // Initialize VIC bitmap gfx_init_vic_bitmap: { .const lines_cnt = 9 - .label l = 8 - // [603] call bitmap_init - // [755] phi from gfx_init_vic_bitmap to bitmap_init [phi:gfx_init_vic_bitmap->bitmap_init] + .label l = $1e + // [606] call bitmap_init + // [758] phi from gfx_init_vic_bitmap to bitmap_init [phi:gfx_init_vic_bitmap->bitmap_init] bitmap_init_from_gfx_init_vic_bitmap: jsr bitmap_init - // [604] phi from gfx_init_vic_bitmap to gfx_init_vic_bitmap::@3 [phi:gfx_init_vic_bitmap->gfx_init_vic_bitmap::@3] + // [607] phi from gfx_init_vic_bitmap to gfx_init_vic_bitmap::@3 [phi:gfx_init_vic_bitmap->gfx_init_vic_bitmap::@3] __b3_from_gfx_init_vic_bitmap: jmp __b3 // gfx_init_vic_bitmap::@3 __b3: - // [605] call bitmap_clear + // [608] call bitmap_clear jsr bitmap_clear - // [606] phi from gfx_init_vic_bitmap::@3 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1] + // [609] phi from gfx_init_vic_bitmap::@3 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1] __b1_from___b3: - // [606] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) 0 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1#0] -- vbuz1=vbuc1 + // [609] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) 0 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l jmp __b1 // gfx_init_vic_bitmap::@1 __b1: - // [607] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1 + // [610] if((byte) gfx_init_vic_bitmap::l#2<(const byte) gfx_init_vic_bitmap::lines_cnt) goto gfx_init_vic_bitmap::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z l cmp #lines_cnt bcc __b2 jmp __breturn // gfx_init_vic_bitmap::@return __breturn: - // [608] return + // [611] return rts // gfx_init_vic_bitmap::@2 __b2: - // [609] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [612] (byte) bitmap_line::x0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_x,y sta.z bitmap_line.x0 - // [610] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuxx=pbuc1_derefidx_vbuz1 + // [613] (byte) bitmap_line::x1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_x+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuxx=pbuc1_derefidx_vbuz1 ldy.z l ldx lines_x+1,y - // [611] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [614] (byte) bitmap_line::y0#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_y,y sta.z bitmap_line.y0 - // [612] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [615] (byte) bitmap_line::y1#0 ← *((const byte*) gfx_init_vic_bitmap::lines_y+(byte) 1 + (byte) gfx_init_vic_bitmap::l#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z l lda lines_y+1,y sta.z bitmap_line.y1 - // [613] call bitmap_line + // [616] call bitmap_line jsr bitmap_line jmp __b4 // gfx_init_vic_bitmap::@4 __b4: - // [614] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 -- vbuz1=_inc_vbuz1 + // [617] (byte) gfx_init_vic_bitmap::l#1 ← ++ (byte) gfx_init_vic_bitmap::l#2 -- vbuz1=_inc_vbuz1 inc.z l - // [606] phi from gfx_init_vic_bitmap::@4 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1] + // [609] phi from gfx_init_vic_bitmap::@4 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1] __b1_from___b4: - // [606] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) gfx_init_vic_bitmap::l#1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1#0] -- register_copy + // [609] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) gfx_init_vic_bitmap::l#1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1#0] -- register_copy jmp __b1 lines_x: .byte 0, $ff, $ff, 0, 0, $80, $ff, $80, 0, $80 lines_y: .byte 0, 0, $c7, $c7, 0, 0, $64, $c7, $64, 0 } // bitmap_line // Draw a line on the bitmap -// bitmap_line(byte zp(9) x0, byte register(X) x1, byte zp($d) y0, byte zp($11) y1) +// bitmap_line(byte zp(8) x0, byte register(X) x1, byte zp($c) y0, byte zp($10) y1) bitmap_line: { - .label xd = $1f - .label x0 = 9 - .label y0 = $d - .label y1 = $11 - // [615] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -- vbuz1_lt_vbuxx_then_la1 + .label xd = $1d + .label x0 = 8 + .label y0 = $c + .label y1 = $10 + // [618] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -- vbuz1_lt_vbuxx_then_la1 txa cmp.z x0 beq !+ @@ -24600,341 +24437,341 @@ bitmap_line: { jmp __b2 // bitmap_line::@2 __b2: - // [616] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 -- vbuz1=vbuz2_minus_vbuxx + // [619] (byte) bitmap_line::xd#2 ← (byte) bitmap_line::x0#0 - (byte) bitmap_line::x1#0 -- vbuz1=vbuz2_minus_vbuxx txa eor #$ff sec adc.z x0 sta.z xd - // [617] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 -- vbuz1_lt_vbuz2_then_la1 + // [620] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@7 -- vbuz1_lt_vbuz2_then_la1 lda.z y0 cmp.z y1 bcc __b7 jmp __b3 // bitmap_line::@3 __b3: - // [618] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuyy=vbuz1_minus_vbuz2 + // [621] (byte) bitmap_line::yd#2 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuyy=vbuz1_minus_vbuz2 lda.z y0 sec sbc.z y1 tay - // [619] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 -- vbuyy_lt_vbuz1_then_la1 + // [622] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@8 -- vbuyy_lt_vbuz1_then_la1 cpy.z xd bcc __b8 jmp __b4 // bitmap_line::@4 __b4: - // [620] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [623] (byte) bitmap_line_ydxi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxi.y - // [621] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 - // [622] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [624] (byte) bitmap_line_ydxi::x#0 ← (byte) bitmap_line::x1#0 + // [625] (byte) bitmap_line_ydxi::y1#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxi.y1 - // [623] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuyy + // [626] (byte) bitmap_line_ydxi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuyy sty.z bitmap_line_ydxi.yd - // [624] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 - // [625] call bitmap_line_ydxi - // [699] phi from bitmap_line::@4 to bitmap_line_ydxi [phi:bitmap_line::@4->bitmap_line_ydxi] + // [627] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 + // [628] call bitmap_line_ydxi + // [702] phi from bitmap_line::@4 to bitmap_line_ydxi [phi:bitmap_line::@4->bitmap_line_ydxi] bitmap_line_ydxi_from___b4: - // [699] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#0 [phi:bitmap_line::@4->bitmap_line_ydxi#0] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#1] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#0 [phi:bitmap_line::@4->bitmap_line_ydxi#2] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#0 [phi:bitmap_line::@4->bitmap_line_ydxi#3] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#0 [phi:bitmap_line::@4->bitmap_line_ydxi#0] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#1] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#0 [phi:bitmap_line::@4->bitmap_line_ydxi#2] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#0 [phi:bitmap_line::@4->bitmap_line_ydxi#3] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy jsr bitmap_line_ydxi jmp __breturn // bitmap_line::@return __breturn: - // [626] return + // [629] return rts // bitmap_line::@8 __b8: - // [627] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [630] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyi.x - // [628] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [631] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_xdyi.y - // [629] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 - // [630] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 - // [631] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuyy + // [632] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 + // [633] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 + // [634] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuyy sty.z bitmap_line_xdyi.yd - // [632] call bitmap_line_xdyi - // [677] phi from bitmap_line::@8 to bitmap_line_xdyi [phi:bitmap_line::@8->bitmap_line_xdyi] + // [635] call bitmap_line_xdyi + // [680] phi from bitmap_line::@8 to bitmap_line_xdyi [phi:bitmap_line::@8->bitmap_line_xdyi] bitmap_line_xdyi_from___b8: - // [677] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#0 [phi:bitmap_line::@8->bitmap_line_xdyi#0] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#1] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#0 [phi:bitmap_line::@8->bitmap_line_xdyi#2] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#0 [phi:bitmap_line::@8->bitmap_line_xdyi#0] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#1] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#0 [phi:bitmap_line::@8->bitmap_line_xdyi#2] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy jsr bitmap_line_xdyi jmp __breturn // bitmap_line::@7 __b7: - // [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 + // [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 lda.z y1 sec sbc.z y0 tay - // [634] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 -- vbuyy_lt_vbuz1_then_la1 + // [637] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@9 -- vbuyy_lt_vbuz1_then_la1 cpy.z xd bcc __b9 jmp __b10 // bitmap_line::@10 __b10: - // [635] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [638] (byte) bitmap_line_ydxd::y#0 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxd.y - // [636] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 -- vbuxx=vbuz1 + // [639] (byte) bitmap_line_ydxd::x#0 ← (byte) bitmap_line::x0#0 -- vbuxx=vbuz1 ldx.z x0 - // [637] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [640] (byte) bitmap_line_ydxd::y1#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxd.y1 - // [638] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuyy + // [641] (byte) bitmap_line_ydxd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuyy sty.z bitmap_line_ydxd.yd - // [639] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 - // [640] call bitmap_line_ydxd - // [729] phi from bitmap_line::@10 to bitmap_line_ydxd [phi:bitmap_line::@10->bitmap_line_ydxd] + // [642] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 + // [643] call bitmap_line_ydxd + // [732] phi from bitmap_line::@10 to bitmap_line_ydxd [phi:bitmap_line::@10->bitmap_line_ydxd] bitmap_line_ydxd_from___b10: - // [729] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#0 [phi:bitmap_line::@10->bitmap_line_ydxd#0] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#1] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#0 [phi:bitmap_line::@10->bitmap_line_ydxd#2] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#0 [phi:bitmap_line::@10->bitmap_line_ydxd#0] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#1] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#0 [phi:bitmap_line::@10->bitmap_line_ydxd#2] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy jsr bitmap_line_ydxd jmp __breturn // bitmap_line::@9 __b9: - // [641] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [644] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyd.x - // [642] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [645] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_xdyd.y - // [643] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 - // [644] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 - // [645] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuyy + // [646] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 + // [647] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 + // [648] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuyy sty.z bitmap_line_xdyd.yd - // [646] call bitmap_line_xdyd - // [714] phi from bitmap_line::@9 to bitmap_line_xdyd [phi:bitmap_line::@9->bitmap_line_xdyd] + // [649] call bitmap_line_xdyd + // [717] phi from bitmap_line::@9 to bitmap_line_xdyd [phi:bitmap_line::@9->bitmap_line_xdyd] bitmap_line_xdyd_from___b9: - // [714] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#0 [phi:bitmap_line::@9->bitmap_line_xdyd#0] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#1] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#0 [phi:bitmap_line::@9->bitmap_line_xdyd#2] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#0 [phi:bitmap_line::@9->bitmap_line_xdyd#0] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#1] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#0 [phi:bitmap_line::@9->bitmap_line_xdyd#2] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy jsr bitmap_line_xdyd jmp __breturn // bitmap_line::@1 __b1: - // [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuxx_minus_vbuz2 + // [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuxx_minus_vbuz2 txa sec sbc.z x0 sta.z xd - // [648] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 -- vbuz1_lt_vbuz2_then_la1 + // [651] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@11 -- vbuz1_lt_vbuz2_then_la1 lda.z y0 cmp.z y1 bcc __b11 jmp __b5 // bitmap_line::@5 __b5: - // [649] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuyy=vbuz1_minus_vbuz2 + // [652] (byte) bitmap_line::yd#10 ← (byte) bitmap_line::y0#0 - (byte) bitmap_line::y1#0 -- vbuyy=vbuz1_minus_vbuz2 lda.z y0 sec sbc.z y1 tay - // [650] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 -- vbuyy_lt_vbuz1_then_la1 + // [653] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@12 -- vbuyy_lt_vbuz1_then_la1 cpy.z xd bcc __b12 jmp __b6 // bitmap_line::@6 __b6: - // [651] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [654] (byte) bitmap_line_ydxd::y#1 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_ydxd.y - // [652] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 - // [653] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 - // [654] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuyy + // [655] (byte) bitmap_line_ydxd::x#1 ← (byte) bitmap_line::x1#0 + // [656] (byte) bitmap_line_ydxd::y1#1 ← (byte) bitmap_line::y0#0 + // [657] (byte) bitmap_line_ydxd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuyy sty.z bitmap_line_ydxd.yd - // [655] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 - // [656] call bitmap_line_ydxd - // [729] phi from bitmap_line::@6 to bitmap_line_ydxd [phi:bitmap_line::@6->bitmap_line_ydxd] + // [658] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 + // [659] call bitmap_line_ydxd + // [732] phi from bitmap_line::@6 to bitmap_line_ydxd [phi:bitmap_line::@6->bitmap_line_ydxd] bitmap_line_ydxd_from___b6: - // [729] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#1 [phi:bitmap_line::@6->bitmap_line_ydxd#0] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#1] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#1 [phi:bitmap_line::@6->bitmap_line_ydxd#2] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#1 [phi:bitmap_line::@6->bitmap_line_ydxd#0] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#1] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#1 [phi:bitmap_line::@6->bitmap_line_ydxd#2] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy jsr bitmap_line_ydxd jmp __breturn // bitmap_line::@12 __b12: - // [657] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [660] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyd.x - // [658] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 - // [659] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [661] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 + // [662] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyd.x1 - // [660] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 - // [661] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuyy + // [663] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 + // [664] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuyy sty.z bitmap_line_xdyd.yd - // [662] call bitmap_line_xdyd - // [714] phi from bitmap_line::@12 to bitmap_line_xdyd [phi:bitmap_line::@12->bitmap_line_xdyd] + // [665] call bitmap_line_xdyd + // [717] phi from bitmap_line::@12 to bitmap_line_xdyd [phi:bitmap_line::@12->bitmap_line_xdyd] bitmap_line_xdyd_from___b12: - // [714] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#1 [phi:bitmap_line::@12->bitmap_line_xdyd#0] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#1] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#1 [phi:bitmap_line::@12->bitmap_line_xdyd#2] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#1 [phi:bitmap_line::@12->bitmap_line_xdyd#0] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#1] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#1 [phi:bitmap_line::@12->bitmap_line_xdyd#2] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy jsr bitmap_line_xdyd jmp __breturn // bitmap_line::@11 __b11: - // [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 + // [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 lda.z y1 sec sbc.z y0 tay - // [664] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 -- vbuyy_lt_vbuz1_then_la1 + // [667] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@13 -- vbuyy_lt_vbuz1_then_la1 cpy.z xd bcc __b13 jmp __b14 // bitmap_line::@14 __b14: - // [665] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 + // [668] (byte) bitmap_line_ydxi::y#1 ← (byte) bitmap_line::y0#0 -- vbuz1=vbuz2 lda.z y0 sta.z bitmap_line_ydxi.y - // [666] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 -- vbuxx=vbuz1 + // [669] (byte) bitmap_line_ydxi::x#1 ← (byte) bitmap_line::x0#0 -- vbuxx=vbuz1 ldx.z x0 - // [667] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 - // [668] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuyy + // [670] (byte) bitmap_line_ydxi::y1#1 ← (byte) bitmap_line::y1#0 + // [671] (byte) bitmap_line_ydxi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuyy sty.z bitmap_line_ydxi.yd - // [669] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 - // [670] call bitmap_line_ydxi - // [699] phi from bitmap_line::@14 to bitmap_line_ydxi [phi:bitmap_line::@14->bitmap_line_ydxi] + // [672] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 + // [673] call bitmap_line_ydxi + // [702] phi from bitmap_line::@14 to bitmap_line_ydxi [phi:bitmap_line::@14->bitmap_line_ydxi] bitmap_line_ydxi_from___b14: - // [699] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#1 [phi:bitmap_line::@14->bitmap_line_ydxi#0] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#1] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#1 [phi:bitmap_line::@14->bitmap_line_ydxi#2] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#1 [phi:bitmap_line::@14->bitmap_line_ydxi#0] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#1] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#1 [phi:bitmap_line::@14->bitmap_line_ydxi#2] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy jsr bitmap_line_ydxi jmp __breturn // bitmap_line::@13 __b13: - // [671] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [674] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyi.x - // [672] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 - // [673] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [675] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 + // [676] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyi.x1 - // [674] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 - // [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuyy + // [677] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 + // [678] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuyy sty.z bitmap_line_xdyi.yd - // [676] call bitmap_line_xdyi - // [677] phi from bitmap_line::@13 to bitmap_line_xdyi [phi:bitmap_line::@13->bitmap_line_xdyi] + // [679] call bitmap_line_xdyi + // [680] phi from bitmap_line::@13 to bitmap_line_xdyi [phi:bitmap_line::@13->bitmap_line_xdyi] bitmap_line_xdyi_from___b13: - // [677] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#1 [phi:bitmap_line::@13->bitmap_line_xdyi#0] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#1] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#1 [phi:bitmap_line::@13->bitmap_line_xdyi#2] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#1 [phi:bitmap_line::@13->bitmap_line_xdyi#0] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#1] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#1 [phi:bitmap_line::@13->bitmap_line_xdyi#2] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy jsr bitmap_line_xdyi jmp __breturn } // bitmap_line_xdyi -// bitmap_line_xdyi(byte zp($a) x, byte zp($d) y, byte zp(9) x1, byte zp($1f) xd, byte zp($10) yd) +// bitmap_line_xdyi(byte zp(9) x, byte zp($c) y, byte zp(8) x1, byte zp($1d) xd, byte zp($f) yd) bitmap_line_xdyi: { - .label x = $a - .label y = $d - .label x1 = 9 - .label xd = $1f - .label yd = $10 - .label e = $11 - // [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + .label x = 9 + .label y = $c + .label x1 = 8 + .label xd = $1d + .label yd = $f + .label e = $10 + // [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z yd lsr sta.z e - // [679] phi from bitmap_line_xdyi bitmap_line_xdyi::@2 to bitmap_line_xdyi::@1 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1] + // [682] phi from bitmap_line_xdyi bitmap_line_xdyi::@2 to bitmap_line_xdyi::@1 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1] __b1_from_bitmap_line_xdyi: __b1_from___b2: - // [679] phi (byte) bitmap_line_xdyi::e#3 = (byte) bitmap_line_xdyi::e#0 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#0] -- register_copy - // [679] phi (byte) bitmap_line_xdyi::y#3 = (byte) bitmap_line_xdyi::y#5 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#1] -- register_copy - // [679] phi (byte) bitmap_line_xdyi::x#3 = (byte) bitmap_line_xdyi::x#6 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#2] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::e#3 = (byte) bitmap_line_xdyi::e#0 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#0] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::y#3 = (byte) bitmap_line_xdyi::y#5 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#1] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::x#3 = (byte) bitmap_line_xdyi::x#6 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#2] -- register_copy jmp __b1 // bitmap_line_xdyi::@1 __b1: - // [680] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 -- vbuxx=vbuz1 + // [683] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 -- vbuxx=vbuz1 ldx.z x - // [681] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 -- vbuyy=vbuz1 + // [684] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 -- vbuyy=vbuz1 ldy.z y - // [682] call bitmap_plot - // [692] phi from bitmap_line_xdyi::@1 to bitmap_plot [phi:bitmap_line_xdyi::@1->bitmap_plot] + // [685] call bitmap_plot + // [695] phi from bitmap_line_xdyi::@1 to bitmap_plot [phi:bitmap_line_xdyi::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_xdyi::@4 __b4: - // [683] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 -- vbuz1=_inc_vbuz1 + // [686] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 -- vbuz1=_inc_vbuz1 inc.z x - // [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z yd sta.z e - // [685] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -- vbuz1_ge_vbuz2_then_la1 + // [688] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z xd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_xdyi::@3 __b3: - // [686] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 -- vbuz1=_inc_vbuz1 + // [689] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 -- vbuz1=_inc_vbuz1 inc.z y - // [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z xd sta.z e - // [688] phi from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 to bitmap_line_xdyi::@2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2] + // [691] phi from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 to bitmap_line_xdyi::@2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2] __b2_from___b3: __b2_from___b4: - // [688] phi (byte) bitmap_line_xdyi::e#6 = (byte) bitmap_line_xdyi::e#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#0] -- register_copy - // [688] phi (byte) bitmap_line_xdyi::y#6 = (byte) bitmap_line_xdyi::y#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#1] -- register_copy + // [691] phi (byte) bitmap_line_xdyi::e#6 = (byte) bitmap_line_xdyi::e#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#0] -- register_copy + // [691] phi (byte) bitmap_line_xdyi::y#6 = (byte) bitmap_line_xdyi::y#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#1] -- register_copy jmp __b2 // bitmap_line_xdyi::@2 __b2: - // [689] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [692] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z x1 inx - // [690] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -- vbuz1_neq_vbuxx_then_la1 + // [693] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -- vbuz1_neq_vbuxx_then_la1 cpx.z x bne __b1_from___b2 jmp __breturn // bitmap_line_xdyi::@return __breturn: - // [691] return + // [694] return rts } // bitmap_plot // bitmap_plot(byte register(X) x, byte register(Y) y) bitmap_plot: { - .label plotter_x = $1a - .label plotter_y = $1c - .label plotter = $1a - // [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx + .label plotter_x = $19 + .label plotter_y = $1b + .label plotter = $19 + // [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx lda bitmap_plot_xhi,x sta.z plotter_x+1 lda bitmap_plot_xlo,x sta.z plotter_x - // [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) -- vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy + // [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) -- vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy lda bitmap_plot_yhi,y sta.z plotter_y+1 lda bitmap_plot_ylo,y sta.z plotter_y - // [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 -- vwuz1=vwuz1_plus_vwuz2 + // [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 -- vwuz1=vwuz1_plus_vwuz2 lda.z plotter clc adc.z plotter_y @@ -24942,408 +24779,408 @@ bitmap_plot: { lda.z plotter+1 adc.z plotter_y+1 sta.z plotter+1 - // [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx + // [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx lda bitmap_plot_bit,x ldy #0 ora (plotter),y - // [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 -- _deref_pbuz1=vbuaa + // [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 -- _deref_pbuz1=vbuaa ldy #0 sta (plotter),y jmp __breturn // bitmap_plot::@return __breturn: - // [698] return + // [701] return rts } // bitmap_line_ydxi -// bitmap_line_ydxi(byte zp($a) y, byte register(X) x, byte zp($11) y1, byte zp(9) yd, byte zp($1f) xd) +// bitmap_line_ydxi(byte zp(9) y, byte register(X) x, byte zp($10) y1, byte zp(8) yd, byte zp($1d) xd) bitmap_line_ydxi: { - .label y = $a - .label y1 = $11 - .label yd = 9 - .label xd = $1f - .label e = $d - // [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + .label y = 9 + .label y1 = $10 + .label yd = 8 + .label xd = $1d + .label e = $c + // [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z xd lsr sta.z e - // [701] phi from bitmap_line_ydxi bitmap_line_ydxi::@2 to bitmap_line_ydxi::@1 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1] + // [704] phi from bitmap_line_ydxi bitmap_line_ydxi::@2 to bitmap_line_ydxi::@1 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1] __b1_from_bitmap_line_ydxi: __b1_from___b2: - // [701] phi (byte) bitmap_line_ydxi::e#3 = (byte) bitmap_line_ydxi::e#0 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#0] -- register_copy - // [701] phi (byte) bitmap_line_ydxi::y#3 = (byte) bitmap_line_ydxi::y#6 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#1] -- register_copy - // [701] phi (byte) bitmap_line_ydxi::x#3 = (byte) bitmap_line_ydxi::x#5 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#2] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::e#3 = (byte) bitmap_line_ydxi::e#0 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#0] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::y#3 = (byte) bitmap_line_ydxi::y#6 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#1] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::x#3 = (byte) bitmap_line_ydxi::x#5 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#2] -- register_copy jmp __b1 // bitmap_line_ydxi::@1 __b1: - // [702] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 - // [703] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 -- vbuyy=vbuz1 + // [705] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 + // [706] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 -- vbuyy=vbuz1 ldy.z y - // [704] call bitmap_plot - // [692] phi from bitmap_line_ydxi::@1 to bitmap_plot [phi:bitmap_line_ydxi::@1->bitmap_plot] + // [707] call bitmap_plot + // [695] phi from bitmap_line_ydxi::@1 to bitmap_plot [phi:bitmap_line_ydxi::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_ydxi::@4 __b4: - // [705] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 -- vbuz1=_inc_vbuz1 + // [708] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 -- vbuz1=_inc_vbuz1 inc.z y - // [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z xd sta.z e - // [707] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -- vbuz1_ge_vbuz2_then_la1 + // [710] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z yd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_ydxi::@3 __b3: - // [708] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 -- vbuxx=_inc_vbuxx + // [711] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 -- vbuxx=_inc_vbuxx inx - // [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z yd sta.z e - // [710] phi from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 to bitmap_line_ydxi::@2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2] + // [713] phi from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 to bitmap_line_ydxi::@2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2] __b2_from___b3: __b2_from___b4: - // [710] phi (byte) bitmap_line_ydxi::e#6 = (byte) bitmap_line_ydxi::e#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#0] -- register_copy - // [710] phi (byte) bitmap_line_ydxi::x#6 = (byte) bitmap_line_ydxi::x#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#1] -- register_copy + // [713] phi (byte) bitmap_line_ydxi::e#6 = (byte) bitmap_line_ydxi::e#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#0] -- register_copy + // [713] phi (byte) bitmap_line_ydxi::x#6 = (byte) bitmap_line_ydxi::x#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#1] -- register_copy jmp __b2 // bitmap_line_ydxi::@2 __b2: - // [711] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 + // [714] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 lda.z y1 clc adc #1 - // [712] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -- vbuz1_neq_vbuaa_then_la1 + // [715] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -- vbuz1_neq_vbuaa_then_la1 cmp.z y bne __b1_from___b2 jmp __breturn // bitmap_line_ydxi::@return __breturn: - // [713] return + // [716] return rts } // bitmap_line_xdyd -// bitmap_line_xdyd(byte zp($10) x, byte zp($d) y, byte zp(9) x1, byte zp($1f) xd, byte zp($a) yd) +// bitmap_line_xdyd(byte zp($f) x, byte zp($c) y, byte zp(8) x1, byte zp($1d) xd, byte zp(9) yd) bitmap_line_xdyd: { - .label x = $10 - .label y = $d - .label x1 = 9 - .label xd = $1f - .label yd = $a - .label e = $11 - // [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + .label x = $f + .label y = $c + .label x1 = 8 + .label xd = $1d + .label yd = 9 + .label e = $10 + // [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z yd lsr sta.z e - // [716] phi from bitmap_line_xdyd bitmap_line_xdyd::@2 to bitmap_line_xdyd::@1 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1] + // [719] phi from bitmap_line_xdyd bitmap_line_xdyd::@2 to bitmap_line_xdyd::@1 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1] __b1_from_bitmap_line_xdyd: __b1_from___b2: - // [716] phi (byte) bitmap_line_xdyd::e#3 = (byte) bitmap_line_xdyd::e#0 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#0] -- register_copy - // [716] phi (byte) bitmap_line_xdyd::y#3 = (byte) bitmap_line_xdyd::y#5 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#1] -- register_copy - // [716] phi (byte) bitmap_line_xdyd::x#3 = (byte) bitmap_line_xdyd::x#6 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#2] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::e#3 = (byte) bitmap_line_xdyd::e#0 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#0] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::y#3 = (byte) bitmap_line_xdyd::y#5 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#1] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::x#3 = (byte) bitmap_line_xdyd::x#6 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#2] -- register_copy jmp __b1 // bitmap_line_xdyd::@1 __b1: - // [717] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 -- vbuxx=vbuz1 + // [720] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 -- vbuxx=vbuz1 ldx.z x - // [718] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 -- vbuyy=vbuz1 + // [721] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 -- vbuyy=vbuz1 ldy.z y - // [719] call bitmap_plot - // [692] phi from bitmap_line_xdyd::@1 to bitmap_plot [phi:bitmap_line_xdyd::@1->bitmap_plot] + // [722] call bitmap_plot + // [695] phi from bitmap_line_xdyd::@1 to bitmap_plot [phi:bitmap_line_xdyd::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_xdyd::@4 __b4: - // [720] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 -- vbuz1=_inc_vbuz1 + // [723] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 -- vbuz1=_inc_vbuz1 inc.z x - // [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z yd sta.z e - // [722] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -- vbuz1_ge_vbuz2_then_la1 + // [725] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z xd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_xdyd::@3 __b3: - // [723] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 -- vbuz1=_dec_vbuz1 + // [726] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 -- vbuz1=_dec_vbuz1 dec.z y - // [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z xd sta.z e - // [725] phi from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 to bitmap_line_xdyd::@2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2] + // [728] phi from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 to bitmap_line_xdyd::@2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2] __b2_from___b3: __b2_from___b4: - // [725] phi (byte) bitmap_line_xdyd::e#6 = (byte) bitmap_line_xdyd::e#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#0] -- register_copy - // [725] phi (byte) bitmap_line_xdyd::y#6 = (byte) bitmap_line_xdyd::y#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#1] -- register_copy + // [728] phi (byte) bitmap_line_xdyd::e#6 = (byte) bitmap_line_xdyd::e#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#0] -- register_copy + // [728] phi (byte) bitmap_line_xdyd::y#6 = (byte) bitmap_line_xdyd::y#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#1] -- register_copy jmp __b2 // bitmap_line_xdyd::@2 __b2: - // [726] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [729] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z x1 inx - // [727] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -- vbuz1_neq_vbuxx_then_la1 + // [730] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -- vbuz1_neq_vbuxx_then_la1 cpx.z x bne __b1_from___b2 jmp __breturn // bitmap_line_xdyd::@return __breturn: - // [728] return + // [731] return rts } // bitmap_line_ydxd -// bitmap_line_ydxd(byte zp($10) y, byte register(X) x, byte zp($d) y1, byte zp($a) yd, byte zp($1f) xd) +// bitmap_line_ydxd(byte zp($f) y, byte register(X) x, byte zp($c) y1, byte zp(9) yd, byte zp($1d) xd) bitmap_line_ydxd: { - .label y = $10 - .label y1 = $d - .label yd = $a - .label xd = $1f - .label e = $11 - // [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + .label y = $f + .label y1 = $c + .label yd = 9 + .label xd = $1d + .label e = $10 + // [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z xd lsr sta.z e - // [731] phi from bitmap_line_ydxd bitmap_line_ydxd::@2 to bitmap_line_ydxd::@1 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1] + // [734] phi from bitmap_line_ydxd bitmap_line_ydxd::@2 to bitmap_line_ydxd::@1 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1] __b1_from_bitmap_line_ydxd: __b1_from___b2: - // [731] phi (byte) bitmap_line_ydxd::e#3 = (byte) bitmap_line_ydxd::e#0 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#0] -- register_copy - // [731] phi (byte) bitmap_line_ydxd::y#2 = (byte) bitmap_line_ydxd::y#7 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#1] -- register_copy - // [731] phi (byte) bitmap_line_ydxd::x#3 = (byte) bitmap_line_ydxd::x#5 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#2] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::e#3 = (byte) bitmap_line_ydxd::e#0 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#0] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::y#2 = (byte) bitmap_line_ydxd::y#7 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#1] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::x#3 = (byte) bitmap_line_ydxd::x#5 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#2] -- register_copy jmp __b1 // bitmap_line_ydxd::@1 __b1: - // [732] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 - // [733] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 -- vbuyy=vbuz1 + // [735] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 + // [736] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 -- vbuyy=vbuz1 ldy.z y - // [734] call bitmap_plot - // [692] phi from bitmap_line_ydxd::@1 to bitmap_plot [phi:bitmap_line_ydxd::@1->bitmap_plot] + // [737] call bitmap_plot + // [695] phi from bitmap_line_ydxd::@1 to bitmap_plot [phi:bitmap_line_ydxd::@1->bitmap_plot] bitmap_plot_from___b1: - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#1] -- register_copy + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot jmp __b4 // bitmap_line_ydxd::@4 __b4: - // [735] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 -- vbuz1=_inc_vbuz1 + // [738] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 -- vbuz1=_inc_vbuz1 inc.z y - // [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z xd sta.z e - // [737] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -- vbuz1_ge_vbuz2_then_la1 + // [740] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z yd cmp.z e bcs __b2_from___b4 jmp __b3 // bitmap_line_ydxd::@3 __b3: - // [738] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 -- vbuxx=_dec_vbuxx + // [741] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 -- vbuxx=_dec_vbuxx dex - // [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z yd sta.z e - // [740] phi from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 to bitmap_line_ydxd::@2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2] + // [743] phi from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 to bitmap_line_ydxd::@2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2] __b2_from___b3: __b2_from___b4: - // [740] phi (byte) bitmap_line_ydxd::e#6 = (byte) bitmap_line_ydxd::e#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#0] -- register_copy - // [740] phi (byte) bitmap_line_ydxd::x#6 = (byte) bitmap_line_ydxd::x#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#1] -- register_copy + // [743] phi (byte) bitmap_line_ydxd::e#6 = (byte) bitmap_line_ydxd::e#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#0] -- register_copy + // [743] phi (byte) bitmap_line_ydxd::x#6 = (byte) bitmap_line_ydxd::x#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#1] -- register_copy jmp __b2 // bitmap_line_ydxd::@2 __b2: - // [741] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 + // [744] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 lda.z y1 clc adc #1 - // [742] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -- vbuz1_neq_vbuaa_then_la1 + // [745] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -- vbuz1_neq_vbuaa_then_la1 cmp.z y bne __b1_from___b2 jmp __breturn // bitmap_line_ydxd::@return __breturn: - // [743] return + // [746] return rts } // bitmap_clear // Clear all graphics on the bitmap bitmap_clear: { - .label bitmap = $e - .label y = $1f - // [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 + .label bitmap = $d + .label y = $1d + // [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 lda bitmap_plot_xlo sta.z bitmap lda bitmap_plot_xhi sta.z bitmap+1 - // [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 - // [746] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + // [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 + // [749] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] __b1_from_bitmap_clear: - // [746] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 + // [749] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [746] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy + // [749] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy jmp __b1 - // [746] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] + // [749] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] __b1_from___b3: - // [746] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy - // [746] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy + // [749] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy + // [749] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy jmp __b1 // bitmap_clear::@1 __b1: - // [747] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] + // [750] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] __b2_from___b1: - // [747] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuxx=vbuc1 + // [750] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuxx=vbuc1 ldx #0 - // [747] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy + // [750] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy jmp __b2 - // [747] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] + // [750] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] __b2_from___b2: - // [747] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy - // [747] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy + // [750] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy + // [750] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy jmp __b2 // bitmap_clear::@2 __b2: - // [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (bitmap),y - // [749] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 + // [752] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 inc.z bitmap bne !+ inc.z bitmap+1 !: - // [750] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuxx=_inc_vbuxx + // [753] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuxx=_inc_vbuxx inx - // [751] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuxx_neq_vbuc1_then_la1 + // [754] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$c8 bne __b2_from___b2 jmp __b3 // bitmap_clear::@3 __b3: - // [752] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 + // [755] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 inc.z y - // [753] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 + // [756] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z y bne __b1_from___b3 jmp __breturn // bitmap_clear::@return __breturn: - // [754] return + // [757] return rts } // bitmap_init // Initialize the bitmap plotter tables for a specific bitmap bitmap_init: { - .label __10 = $1f - .label yoffs = $b - // [756] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + .label __10 = $1d + .label yoffs = $a + // [759] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] __b1_from_bitmap_init: - // [756] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#0] -- vbuyy=vbuc1 + // [759] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#0] -- vbuyy=vbuc1 ldy #$80 - // [756] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#1] -- vbuxx=vbuc1 + // [759] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#1] -- vbuxx=vbuc1 ldx #0 jmp __b1 - // [756] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [759] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] __b1_from___b2: - // [756] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [756] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [759] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [759] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy jmp __b1 // bitmap_init::@1 __b1: - // [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 -- vbuaa=vbuxx_band_vbuc1 + // [760] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 -- vbuaa=vbuxx_band_vbuc1 txa and #$f8 - // [758] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 -- pbuc1_derefidx_vbuxx=vbuaa + // [761] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_xlo,x - // [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP -- pbuc1_derefidx_vbuxx=vbuc2 + // [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP -- pbuc1_derefidx_vbuxx=vbuc2 lda #>VIC_BITMAP sta bitmap_plot_xhi,x - // [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy + // [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy tya sta bitmap_plot_bit,x - // [761] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuyy=vbuyy_ror_1 + // [764] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuyy=vbuyy_ror_1 tya lsr tay - // [762] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuyy_neq_0_then_la1 + // [765] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuyy_neq_0_then_la1 cpy #0 bne __b6_from___b1 - // [764] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [767] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] __b2_from___b1: - // [764] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuyy=vbuc1 + // [767] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuyy=vbuc1 ldy #$80 jmp __b2 - // [763] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [766] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] __b6_from___b1: jmp __b6 // bitmap_init::@6 __b6: - // [764] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [767] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] __b2_from___b6: - // [764] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [767] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy jmp __b2 // bitmap_init::@2 __b2: - // [765] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [768] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [766] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [769] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne __b1_from___b2 - // [767] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [770] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] __b3_from___b2: - // [767] phi (byte*) bitmap_init::yoffs#2 = (byte*) 0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [770] phi (byte*) bitmap_init::yoffs#2 = (byte*) 0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<0 sta.z yoffs lda #>0 sta.z yoffs+1 - // [767] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [770] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 ldx #0 jmp __b3 - // [767] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [770] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] __b3_from___b4: - // [767] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [767] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [770] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [770] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy jmp __b3 // bitmap_init::@3 __b3: - // [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [771] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __10 - // [769] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 + // [772] (byte~) bitmap_init::$7 ← < (byte*) bitmap_init::yoffs#2 -- vbuaa=_lo_pbuz1 lda.z yoffs - // [770] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 -- vbuaa=vbuz1_bor_vbuaa + // [773] (byte~) bitmap_init::$8 ← (byte~) bitmap_init::$10 | (byte~) bitmap_init::$7 -- vbuaa=vbuz1_bor_vbuaa ora.z __10 - // [771] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 -- pbuc1_derefidx_vbuxx=vbuaa + // [774] *((const byte*) bitmap_plot_ylo + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$8 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x - // [772] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [775] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda.z yoffs+1 - // [773] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 -- pbuc1_derefidx_vbuxx=vbuaa + // [776] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // [774] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [777] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __10 bne __b4_from___b3 jmp __b5 // bitmap_init::@5 __b5: - // [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda.z yoffs adc #<$28*8 @@ -25351,506 +25188,506 @@ bitmap_init: { lda.z yoffs+1 adc #>$28*8 sta.z yoffs+1 - // [776] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [779] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] __b4_from___b3: __b4_from___b5: - // [776] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [779] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy jmp __b4 // bitmap_init::@4 __b4: - // [777] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [780] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [778] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [781] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne __b3_from___b4 jmp __breturn // bitmap_init::@return __breturn: - // [779] return + // [782] return rts } // gfx_init_charset gfx_init_charset: { - .label charset = $e - .label chargen = $b - .label c = $d - // [780] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 + .label charset = $d + .label chargen = $a + .label c = $c + // [783] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 lda #$32 sta PROCPORT - // [781] phi from gfx_init_charset to gfx_init_charset::@1 [phi:gfx_init_charset->gfx_init_charset::@1] + // [784] phi from gfx_init_charset to gfx_init_charset::@1 [phi:gfx_init_charset->gfx_init_charset::@1] __b1_from_gfx_init_charset: - // [781] phi (byte) gfx_init_charset::c#4 = (byte) 0 [phi:gfx_init_charset->gfx_init_charset::@1#0] -- vbuz1=vbuc1 + // [784] phi (byte) gfx_init_charset::c#4 = (byte) 0 [phi:gfx_init_charset->gfx_init_charset::@1#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [781] phi (byte*) gfx_init_charset::charset#3 = (const byte*) VIC_CHARSET_ROM [phi:gfx_init_charset->gfx_init_charset::@1#1] -- pbuz1=pbuc1 + // [784] phi (byte*) gfx_init_charset::charset#3 = (const byte*) VIC_CHARSET_ROM [phi:gfx_init_charset->gfx_init_charset::@1#1] -- pbuz1=pbuc1 lda #VIC_CHARSET_ROM sta.z charset+1 - // [781] phi (byte*) gfx_init_charset::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_charset->gfx_init_charset::@1#2] -- pbuz1=pbuc1 + // [784] phi (byte*) gfx_init_charset::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_charset->gfx_init_charset::@1#2] -- pbuz1=pbuc1 lda #CHARGEN sta.z chargen+1 jmp __b1 - // [781] phi from gfx_init_charset::@3 to gfx_init_charset::@1 [phi:gfx_init_charset::@3->gfx_init_charset::@1] + // [784] phi from gfx_init_charset::@3 to gfx_init_charset::@1 [phi:gfx_init_charset::@3->gfx_init_charset::@1] __b1_from___b3: - // [781] phi (byte) gfx_init_charset::c#4 = (byte) gfx_init_charset::c#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#0] -- register_copy - // [781] phi (byte*) gfx_init_charset::charset#3 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#1] -- register_copy - // [781] phi (byte*) gfx_init_charset::chargen#3 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#2] -- register_copy + // [784] phi (byte) gfx_init_charset::c#4 = (byte) gfx_init_charset::c#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#0] -- register_copy + // [784] phi (byte*) gfx_init_charset::charset#3 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#1] -- register_copy + // [784] phi (byte*) gfx_init_charset::chargen#3 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#2] -- register_copy jmp __b1 // gfx_init_charset::@1 __b1: - // [782] phi from gfx_init_charset::@1 to gfx_init_charset::@2 [phi:gfx_init_charset::@1->gfx_init_charset::@2] + // [785] phi from gfx_init_charset::@1 to gfx_init_charset::@2 [phi:gfx_init_charset::@1->gfx_init_charset::@2] __b2_from___b1: - // [782] phi (byte) gfx_init_charset::l#2 = (byte) 0 [phi:gfx_init_charset::@1->gfx_init_charset::@2#0] -- vbuxx=vbuc1 + // [785] phi (byte) gfx_init_charset::l#2 = (byte) 0 [phi:gfx_init_charset::@1->gfx_init_charset::@2#0] -- vbuxx=vbuc1 ldx #0 - // [782] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#1] -- register_copy - // [782] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#2] -- register_copy + // [785] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#1] -- register_copy + // [785] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#2] -- register_copy jmp __b2 - // [782] phi from gfx_init_charset::@2 to gfx_init_charset::@2 [phi:gfx_init_charset::@2->gfx_init_charset::@2] + // [785] phi from gfx_init_charset::@2 to gfx_init_charset::@2 [phi:gfx_init_charset::@2->gfx_init_charset::@2] __b2_from___b2: - // [782] phi (byte) gfx_init_charset::l#2 = (byte) gfx_init_charset::l#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#0] -- register_copy - // [782] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#1] -- register_copy - // [782] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#2] -- register_copy + // [785] phi (byte) gfx_init_charset::l#2 = (byte) gfx_init_charset::l#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#0] -- register_copy + // [785] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#1] -- register_copy + // [785] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#2] -- register_copy jmp __b2 // gfx_init_charset::@2 __b2: - // [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) -- _deref_pbuz1=_deref_pbuz2 + // [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (chargen),y ldy #0 sta (charset),y - // [784] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 -- pbuz1=_inc_pbuz1 + // [787] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 -- pbuz1=_inc_pbuz1 inc.z charset bne !+ inc.z charset+1 !: - // [785] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 -- pbuz1=_inc_pbuz1 + // [788] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 -- pbuz1=_inc_pbuz1 inc.z chargen bne !+ inc.z chargen+1 !: - // [786] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 -- vbuxx=_inc_vbuxx + // [789] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 -- vbuxx=_inc_vbuxx inx - // [787] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 -- vbuxx_neq_vbuc1_then_la1 + // [790] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b2_from___b2 jmp __b3 // gfx_init_charset::@3 __b3: - // [788] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 -- vbuz1=_inc_vbuz1 + // [791] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 -- vbuz1=_inc_vbuz1 inc.z c - // [789] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 -- vbuz1_neq_0_then_la1 + // [792] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 -- vbuz1_neq_0_then_la1 lda.z c cmp #0 bne __b1_from___b3 jmp __b4 // gfx_init_charset::@4 __b4: - // [790] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 + // [793] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 lda #$37 sta PROCPORT jmp __breturn // gfx_init_charset::@return __breturn: - // [791] return + // [794] return rts } // gfx_init_screen4 // Initialize VIC screen 4 - all chars are 00 gfx_init_screen4: { - .label ch = $e - .label cy = $d - // [793] phi from gfx_init_screen4 to gfx_init_screen4::@1 [phi:gfx_init_screen4->gfx_init_screen4::@1] + .label ch = $d + .label cy = $c + // [796] phi from gfx_init_screen4 to gfx_init_screen4::@1 [phi:gfx_init_screen4->gfx_init_screen4::@1] __b1_from_gfx_init_screen4: - // [793] phi (byte) gfx_init_screen4::cy#4 = (byte) 0 [phi:gfx_init_screen4->gfx_init_screen4::@1#0] -- vbuz1=vbuc1 + // [796] phi (byte) gfx_init_screen4::cy#4 = (byte) 0 [phi:gfx_init_screen4->gfx_init_screen4::@1#0] -- vbuz1=vbuc1 lda #0 sta.z cy - // [793] phi (byte*) gfx_init_screen4::ch#3 = (const byte*) VIC_SCREEN4 [phi:gfx_init_screen4->gfx_init_screen4::@1#1] -- pbuz1=pbuc1 + // [796] phi (byte*) gfx_init_screen4::ch#3 = (const byte*) VIC_SCREEN4 [phi:gfx_init_screen4->gfx_init_screen4::@1#1] -- pbuz1=pbuc1 lda #VIC_SCREEN4 sta.z ch+1 jmp __b1 - // [793] phi from gfx_init_screen4::@3 to gfx_init_screen4::@1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1] + // [796] phi from gfx_init_screen4::@3 to gfx_init_screen4::@1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1] __b1_from___b3: - // [793] phi (byte) gfx_init_screen4::cy#4 = (byte) gfx_init_screen4::cy#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#0] -- register_copy - // [793] phi (byte*) gfx_init_screen4::ch#3 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#1] -- register_copy + // [796] phi (byte) gfx_init_screen4::cy#4 = (byte) gfx_init_screen4::cy#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#0] -- register_copy + // [796] phi (byte*) gfx_init_screen4::ch#3 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#1] -- register_copy jmp __b1 // gfx_init_screen4::@1 __b1: - // [794] phi from gfx_init_screen4::@1 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2] + // [797] phi from gfx_init_screen4::@1 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2] __b2_from___b1: - // [794] phi (byte) gfx_init_screen4::cx#2 = (byte) 0 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#0] -- vbuxx=vbuc1 + // [797] phi (byte) gfx_init_screen4::cx#2 = (byte) 0 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#0] -- vbuxx=vbuc1 ldx #0 - // [794] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#3 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#1] -- register_copy + // [797] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#3 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#1] -- register_copy jmp __b2 - // [794] phi from gfx_init_screen4::@2 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2] + // [797] phi from gfx_init_screen4::@2 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2] __b2_from___b2: - // [794] phi (byte) gfx_init_screen4::cx#2 = (byte) gfx_init_screen4::cx#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#0] -- register_copy - // [794] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#1] -- register_copy + // [797] phi (byte) gfx_init_screen4::cx#2 = (byte) gfx_init_screen4::cx#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#0] -- register_copy + // [797] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#1] -- register_copy jmp __b2 // gfx_init_screen4::@2 __b2: - // [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (ch),y - // [796] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 -- pbuz1=_inc_pbuz1 + // [799] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [797] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 -- vbuxx=_inc_vbuxx + // [800] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 -- vbuxx=_inc_vbuxx inx - // [798] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 -- vbuxx_neq_vbuc1_then_la1 + // [801] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_screen4::@3 __b3: - // [799] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 -- vbuz1=_inc_vbuz1 + // [802] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [800] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 -- vbuz1_neq_vbuc1_then_la1 + // [803] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen4::@return __breturn: - // [801] return + // [804] return rts } // gfx_init_screen3 // Initialize VIC screen 3 ( value is %00xx00yy where xx is xpos and yy is ypos gfx_init_screen3: { - .label __1 = $1e - .label ch = $16 - .label cy = $10 - // [803] phi from gfx_init_screen3 to gfx_init_screen3::@1 [phi:gfx_init_screen3->gfx_init_screen3::@1] + .label __1 = $1d + .label ch = $11 + .label cy = $f + // [806] phi from gfx_init_screen3 to gfx_init_screen3::@1 [phi:gfx_init_screen3->gfx_init_screen3::@1] __b1_from_gfx_init_screen3: - // [803] phi (byte*) gfx_init_screen3::ch#3 = (const byte*) VIC_SCREEN3 [phi:gfx_init_screen3->gfx_init_screen3::@1#0] -- pbuz1=pbuc1 + // [806] phi (byte*) gfx_init_screen3::ch#3 = (const byte*) VIC_SCREEN3 [phi:gfx_init_screen3->gfx_init_screen3::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN3 sta.z ch+1 - // [803] phi (byte) gfx_init_screen3::cy#4 = (byte) 0 [phi:gfx_init_screen3->gfx_init_screen3::@1#1] -- vbuz1=vbuc1 + // [806] phi (byte) gfx_init_screen3::cy#4 = (byte) 0 [phi:gfx_init_screen3->gfx_init_screen3::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [803] phi from gfx_init_screen3::@3 to gfx_init_screen3::@1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1] + // [806] phi from gfx_init_screen3::@3 to gfx_init_screen3::@1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1] __b1_from___b3: - // [803] phi (byte*) gfx_init_screen3::ch#3 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#0] -- register_copy - // [803] phi (byte) gfx_init_screen3::cy#4 = (byte) gfx_init_screen3::cy#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#1] -- register_copy + // [806] phi (byte*) gfx_init_screen3::ch#3 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#0] -- register_copy + // [806] phi (byte) gfx_init_screen3::cy#4 = (byte) gfx_init_screen3::cy#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#1] -- register_copy jmp __b1 // gfx_init_screen3::@1 __b1: - // [804] phi from gfx_init_screen3::@1 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2] + // [807] phi from gfx_init_screen3::@1 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2] __b2_from___b1: - // [804] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#3 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#0] -- register_copy - // [804] phi (byte) gfx_init_screen3::cx#2 = (byte) 0 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#1] -- vbuxx=vbuc1 + // [807] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#3 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#0] -- register_copy + // [807] phi (byte) gfx_init_screen3::cx#2 = (byte) 0 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#1] -- vbuxx=vbuc1 ldx #0 jmp __b2 - // [804] phi from gfx_init_screen3::@2 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2] + // [807] phi from gfx_init_screen3::@2 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2] __b2_from___b2: - // [804] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#0] -- register_copy - // [804] phi (byte) gfx_init_screen3::cx#2 = (byte) gfx_init_screen3::cx#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#1] -- register_copy + // [807] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#0] -- register_copy + // [807] phi (byte) gfx_init_screen3::cx#2 = (byte) gfx_init_screen3::cx#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#1] -- register_copy jmp __b2 // gfx_init_screen3::@2 __b2: - // [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 -- vbuaa=vbuxx_band_vbuc1 + // [808] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 -- vbuaa=vbuxx_band_vbuc1 txa and #3 - // [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 + // [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 asl asl asl asl sta.z __1 - // [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 -- vbuaa=vbuz1_band_vbuc1 + // [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 -- vbuaa=vbuz1_band_vbuc1 lda #3 and.z cy - // [808] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 -- vbuaa=vbuz1_bor_vbuaa + // [811] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 -- vbuaa=vbuz1_bor_vbuaa ora.z __1 - // [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 -- _deref_pbuz1=vbuaa + // [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y - // [810] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 -- pbuz1=_inc_pbuz1 + // [813] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [811] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 -- vbuxx=_inc_vbuxx + // [814] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 -- vbuxx=_inc_vbuxx inx - // [812] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 -- vbuxx_neq_vbuc1_then_la1 + // [815] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_screen3::@3 __b3: - // [813] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 -- vbuz1=_inc_vbuz1 + // [816] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [814] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 -- vbuz1_neq_vbuc1_then_la1 + // [817] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen3::@return __breturn: - // [815] return + // [818] return rts } // gfx_init_screen2 // Initialize VIC screen 2 ( value is %ccccrrrr where cccc is (x+y mod $f) and rrrr is %1111-%cccc) gfx_init_screen2: { - .label col2 = $1f - .label ch = $16 - .label cy = $10 - // [817] phi from gfx_init_screen2 to gfx_init_screen2::@1 [phi:gfx_init_screen2->gfx_init_screen2::@1] + .label col2 = $1e + .label ch = $11 + .label cy = $f + // [820] phi from gfx_init_screen2 to gfx_init_screen2::@1 [phi:gfx_init_screen2->gfx_init_screen2::@1] __b1_from_gfx_init_screen2: - // [817] phi (byte*) gfx_init_screen2::ch#3 = (const byte*) VIC_SCREEN2 [phi:gfx_init_screen2->gfx_init_screen2::@1#0] -- pbuz1=pbuc1 + // [820] phi (byte*) gfx_init_screen2::ch#3 = (const byte*) VIC_SCREEN2 [phi:gfx_init_screen2->gfx_init_screen2::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN2 sta.z ch+1 - // [817] phi (byte) gfx_init_screen2::cy#4 = (byte) 0 [phi:gfx_init_screen2->gfx_init_screen2::@1#1] -- vbuz1=vbuc1 + // [820] phi (byte) gfx_init_screen2::cy#4 = (byte) 0 [phi:gfx_init_screen2->gfx_init_screen2::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [817] phi from gfx_init_screen2::@3 to gfx_init_screen2::@1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1] + // [820] phi from gfx_init_screen2::@3 to gfx_init_screen2::@1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1] __b1_from___b3: - // [817] phi (byte*) gfx_init_screen2::ch#3 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#0] -- register_copy - // [817] phi (byte) gfx_init_screen2::cy#4 = (byte) gfx_init_screen2::cy#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#1] -- register_copy + // [820] phi (byte*) gfx_init_screen2::ch#3 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#0] -- register_copy + // [820] phi (byte) gfx_init_screen2::cy#4 = (byte) gfx_init_screen2::cy#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#1] -- register_copy jmp __b1 // gfx_init_screen2::@1 __b1: - // [818] phi from gfx_init_screen2::@1 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2] + // [821] phi from gfx_init_screen2::@1 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2] __b2_from___b1: - // [818] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#3 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#0] -- register_copy - // [818] phi (byte) gfx_init_screen2::cx#2 = (byte) 0 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#1] -- vbuxx=vbuc1 + // [821] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#3 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#0] -- register_copy + // [821] phi (byte) gfx_init_screen2::cx#2 = (byte) 0 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#1] -- vbuxx=vbuc1 ldx #0 jmp __b2 - // [818] phi from gfx_init_screen2::@2 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2] + // [821] phi from gfx_init_screen2::@2 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2] __b2_from___b2: - // [818] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#0] -- register_copy - // [818] phi (byte) gfx_init_screen2::cx#2 = (byte) gfx_init_screen2::cx#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#1] -- register_copy + // [821] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#0] -- register_copy + // [821] phi (byte) gfx_init_screen2::cx#2 = (byte) gfx_init_screen2::cx#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#1] -- register_copy jmp __b2 // gfx_init_screen2::@2 __b2: - // [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 -- vbuaa=vbuxx_plus_vbuz1 + // [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 -- vbuaa=vbuxx_plus_vbuz1 txa clc adc.z cy - // [820] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f -- vbuyy=vbuaa_band_vbuc1 + // [823] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f -- vbuyy=vbuaa_band_vbuc1 and #$f tay - // [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 -- vbuz1=vbuc1_minus_vbuyy + // [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 -- vbuz1=vbuc1_minus_vbuyy tya eor #$ff clc adc #$f+1 sta.z col2 - // [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 -- vbuaa=vbuyy_rol_4 + // [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 -- vbuaa=vbuyy_rol_4 tya asl asl asl asl - // [823] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 -- vbuaa=vbuaa_bor_vbuz1 + // [826] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 -- vbuaa=vbuaa_bor_vbuz1 ora.z col2 - // [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 -- _deref_pbuz1=vbuaa + // [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y - // [825] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 -- pbuz1=_inc_pbuz1 + // [828] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [826] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 -- vbuxx=_inc_vbuxx + // [829] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 -- vbuxx=_inc_vbuxx inx - // [827] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 -- vbuxx_neq_vbuc1_then_la1 + // [830] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_screen2::@3 __b3: - // [828] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 -- vbuz1=_inc_vbuz1 + // [831] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [829] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 -- vbuz1_neq_vbuc1_then_la1 + // [832] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen2::@return __breturn: - // [830] return + // [833] return rts } // gfx_init_screen1 // Initialize VIC screen 1 ( value is %0000cccc where cccc is (x+y mod $f)) gfx_init_screen1: { - .label ch = $16 - .label cy = $11 - // [832] phi from gfx_init_screen1 to gfx_init_screen1::@1 [phi:gfx_init_screen1->gfx_init_screen1::@1] + .label ch = $11 + .label cy = $10 + // [835] phi from gfx_init_screen1 to gfx_init_screen1::@1 [phi:gfx_init_screen1->gfx_init_screen1::@1] __b1_from_gfx_init_screen1: - // [832] phi (byte*) gfx_init_screen1::ch#3 = (const byte*) VIC_SCREEN1 [phi:gfx_init_screen1->gfx_init_screen1::@1#0] -- pbuz1=pbuc1 + // [835] phi (byte*) gfx_init_screen1::ch#3 = (const byte*) VIC_SCREEN1 [phi:gfx_init_screen1->gfx_init_screen1::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN1 sta.z ch+1 - // [832] phi (byte) gfx_init_screen1::cy#4 = (byte) 0 [phi:gfx_init_screen1->gfx_init_screen1::@1#1] -- vbuz1=vbuc1 + // [835] phi (byte) gfx_init_screen1::cy#4 = (byte) 0 [phi:gfx_init_screen1->gfx_init_screen1::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [832] phi from gfx_init_screen1::@3 to gfx_init_screen1::@1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1] + // [835] phi from gfx_init_screen1::@3 to gfx_init_screen1::@1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1] __b1_from___b3: - // [832] phi (byte*) gfx_init_screen1::ch#3 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#0] -- register_copy - // [832] phi (byte) gfx_init_screen1::cy#4 = (byte) gfx_init_screen1::cy#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#1] -- register_copy + // [835] phi (byte*) gfx_init_screen1::ch#3 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#0] -- register_copy + // [835] phi (byte) gfx_init_screen1::cy#4 = (byte) gfx_init_screen1::cy#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#1] -- register_copy jmp __b1 // gfx_init_screen1::@1 __b1: - // [833] phi from gfx_init_screen1::@1 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2] + // [836] phi from gfx_init_screen1::@1 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2] __b2_from___b1: - // [833] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#3 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#0] -- register_copy - // [833] phi (byte) gfx_init_screen1::cx#2 = (byte) 0 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#1] -- vbuxx=vbuc1 + // [836] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#3 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#0] -- register_copy + // [836] phi (byte) gfx_init_screen1::cx#2 = (byte) 0 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#1] -- vbuxx=vbuc1 ldx #0 jmp __b2 - // [833] phi from gfx_init_screen1::@2 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2] + // [836] phi from gfx_init_screen1::@2 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2] __b2_from___b2: - // [833] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#0] -- register_copy - // [833] phi (byte) gfx_init_screen1::cx#2 = (byte) gfx_init_screen1::cx#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#1] -- register_copy + // [836] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#0] -- register_copy + // [836] phi (byte) gfx_init_screen1::cx#2 = (byte) gfx_init_screen1::cx#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#1] -- register_copy jmp __b2 // gfx_init_screen1::@2 __b2: - // [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 -- vbuaa=vbuxx_plus_vbuz1 + // [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 -- vbuaa=vbuxx_plus_vbuz1 txa clc adc.z cy - // [835] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f -- vbuaa=vbuaa_band_vbuc1 + // [838] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f -- vbuaa=vbuaa_band_vbuc1 and #$f - // [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 -- _deref_pbuz1=vbuaa + // [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y - // [837] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 -- pbuz1=_inc_pbuz1 + // [840] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [838] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 -- vbuxx=_inc_vbuxx + // [841] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 -- vbuxx=_inc_vbuxx inx - // [839] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 -- vbuxx_neq_vbuc1_then_la1 + // [842] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_screen1::@3 __b3: - // [840] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 -- vbuz1=_inc_vbuz1 + // [843] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [841] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 -- vbuz1_neq_vbuc1_then_la1 + // [844] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen1::@return __breturn: - // [842] return + // [845] return rts } // gfx_init_screen0 // Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) gfx_init_screen0: { - .label __1 = $1f - .label ch = $16 - .label cy = $11 - // [844] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] + .label __1 = $1e + .label ch = $11 + .label cy = $10 + // [847] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] __b1_from_gfx_init_screen0: - // [844] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) VIC_SCREEN0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 + // [847] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) VIC_SCREEN0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN0 sta.z ch+1 - // [844] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 + // [847] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy jmp __b1 - // [844] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] + // [847] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] __b1_from___b3: - // [844] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy - // [844] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy + // [847] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy + // [847] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy jmp __b1 // gfx_init_screen0::@1 __b1: - // [845] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] + // [848] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] __b2_from___b1: - // [845] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy - // [845] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 + // [848] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy + // [848] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 ldx #0 jmp __b2 - // [845] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] + // [848] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] __b2_from___b2: - // [845] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy - // [845] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy + // [848] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy + // [848] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy jmp __b2 // gfx_init_screen0::@2 __b2: - // [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 + // [849] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 lda #$f and.z cy - // [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 + // [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 asl asl asl asl sta.z __1 - // [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 + // [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 txa and #$f - // [849] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa + // [852] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa ora.z __1 - // [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa + // [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y - // [851] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 + // [854] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: - // [852] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx + // [855] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx inx - // [853] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1 + // [856] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2_from___b2 jmp __b3 // gfx_init_screen0::@3 __b3: - // [854] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 + // [857] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [855] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 + // [858] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1_from___b3 jmp __breturn // gfx_init_screen0::@return __breturn: - // [856] return + // [859] return rts } // keyboard_init // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { - // [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR - // [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR jmp __breturn // keyboard_init::@return __breturn: - // [859] return + // [862] return rts } // File Data @@ -26226,9 +26063,10 @@ Removing instruction lda.z row_scan Removing instruction lda #3 Removing instruction lda #0 Removing instruction ldy #0 -Removing instruction ldy.z form_field_ptr.x -Removing instruction ldy.z form_field_ptr.x -Removing instruction ldy.z form_field_ptr.x +Removing instruction lda.z x +Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction ldy #0 Replacing instruction ldy #0 with TAY Removing instruction lda #0 Removing instruction lda #>0 @@ -26989,7 +26827,7 @@ Fixing long branch [761] beq b10 to bne Fixing long branch [765] beq b11 to bne Fixing long branch [769] beq b12 to bne Fixing long branch [773] beq b13 to bne -Fixing long branch [1336] bmi __b2 to bpl +Fixing long branch [1343] bmi __b2 to bpl FINAL SYMBOL TABLE (label) @1 @@ -27109,27 +26947,27 @@ FINAL SYMBOL TABLE (byte) apply_preset::idx (byte) apply_preset::idx#0 reg byte a 11.18181818181818 (byte*) apply_preset::preset -(byte*) apply_preset::preset#15 preset zp[2]:14 200.2 +(byte*) apply_preset::preset#15 preset zp[2]:13 200.2 (void()) bitmap_clear() (label) bitmap_clear::@1 (label) bitmap_clear::@2 (label) bitmap_clear::@3 (label) bitmap_clear::@return (byte*) bitmap_clear::bitmap -(word) bitmap_clear::bitmap#0 bitmap zp[2]:14 2.0 -(byte*) bitmap_clear::bitmap#1 bitmap zp[2]:14 42.599999999999994 -(byte*) bitmap_clear::bitmap#2 bitmap zp[2]:14 157.0 -(byte*) bitmap_clear::bitmap#3 bitmap zp[2]:14 24.0 -(byte*) bitmap_clear::bitmap#5 bitmap zp[2]:14 4.0 +(word) bitmap_clear::bitmap#0 bitmap zp[2]:13 2.0 +(byte*) bitmap_clear::bitmap#1 bitmap zp[2]:13 42.599999999999994 +(byte*) bitmap_clear::bitmap#2 bitmap zp[2]:13 157.0 +(byte*) bitmap_clear::bitmap#3 bitmap zp[2]:13 24.0 +(byte*) bitmap_clear::bitmap#5 bitmap zp[2]:13 4.0 (byte) bitmap_clear::x (byte) bitmap_clear::x#1 reg byte x 151.5 (byte) bitmap_clear::x#2 reg byte x 67.33333333333333 (byte) bitmap_clear::y -(byte) bitmap_clear::y#1 y zp[1]:31 16.5 -(byte) bitmap_clear::y#4 y zp[1]:31 3.6666666666666665 +(byte) bitmap_clear::y#1 y zp[1]:29 16.5 +(byte) bitmap_clear::y#4 y zp[1]:29 3.6666666666666665 (void()) bitmap_init((byte*) bitmap_init::bitmap) (byte~) bitmap_init::$0 reg byte a 22.0 -(byte~) bitmap_init::$10 zp[1]:31 5.5 +(byte~) bitmap_init::$10 zp[1]:29 5.5 (byte~) bitmap_init::$7 reg byte a 22.0 (byte~) bitmap_init::$8 reg byte a 22.0 (byte~) bitmap_init::$9 reg byte a 22.0 @@ -27152,9 +26990,9 @@ FINAL SYMBOL TABLE (byte) bitmap_init::y#1 reg byte x 16.5 (byte) bitmap_init::y#2 reg byte x 5.5 (byte*) bitmap_init::yoffs -(byte*) bitmap_init::yoffs#1 yoffs zp[2]:11 22.0 -(byte*) bitmap_init::yoffs#2 yoffs zp[2]:11 6.875 -(byte*) bitmap_init::yoffs#4 yoffs zp[2]:11 11.0 +(byte*) bitmap_init::yoffs#1 yoffs zp[2]:10 22.0 +(byte*) bitmap_init::yoffs#2 yoffs zp[2]:10 6.875 +(byte*) bitmap_init::yoffs#4 yoffs zp[2]:10 11.0 (void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) (label) bitmap_line::@1 (label) bitmap_line::@10 @@ -27172,16 +27010,16 @@ FINAL SYMBOL TABLE (label) bitmap_line::@9 (label) bitmap_line::@return (byte) bitmap_line::x0 -(byte) bitmap_line::x0#0 x0 zp[1]:9 1.260869565217391 +(byte) bitmap_line::x0#0 x0 zp[1]:8 1.260869565217391 (byte) bitmap_line::x1 (byte) bitmap_line::x1#0 reg byte x 1.3181818181818181 (byte) bitmap_line::xd -(byte) bitmap_line::xd#1 xd zp[1]:31 0.7 -(byte) bitmap_line::xd#2 xd zp[1]:31 0.7 +(byte) bitmap_line::xd#1 xd zp[1]:29 0.7 +(byte) bitmap_line::xd#2 xd zp[1]:29 0.7 (byte) bitmap_line::y0 -(byte) bitmap_line::y0#0 y0 zp[1]:13 1.6666666666666674 +(byte) bitmap_line::y0#0 y0 zp[1]:12 1.6666666666666674 (byte) bitmap_line::y1 -(byte) bitmap_line::y1#0 y1 zp[1]:17 1.7500000000000007 +(byte) bitmap_line::y1#0 y1 zp[1]:16 1.7500000000000007 (byte) bitmap_line::yd (byte) bitmap_line::yd#1 reg byte y 0.8888888888888888 (byte) bitmap_line::yd#10 reg byte y 0.8888888888888888 @@ -27195,36 +27033,36 @@ FINAL SYMBOL TABLE (label) bitmap_line_xdyd::@4 (label) bitmap_line_xdyd::@return (byte) bitmap_line_xdyd::e -(byte) bitmap_line_xdyd::e#0 e zp[1]:17 4.0 -(byte) bitmap_line_xdyd::e#1 e zp[1]:17 134.66666666666666 -(byte) bitmap_line_xdyd::e#2 e zp[1]:17 202.0 -(byte) bitmap_line_xdyd::e#3 e zp[1]:17 40.8 -(byte) bitmap_line_xdyd::e#6 e zp[1]:17 101.0 +(byte) bitmap_line_xdyd::e#0 e zp[1]:16 4.0 +(byte) bitmap_line_xdyd::e#1 e zp[1]:16 134.66666666666666 +(byte) bitmap_line_xdyd::e#2 e zp[1]:16 202.0 +(byte) bitmap_line_xdyd::e#3 e zp[1]:16 40.8 +(byte) bitmap_line_xdyd::e#6 e zp[1]:16 101.0 (byte) bitmap_line_xdyd::x -(byte) bitmap_line_xdyd::x#0 x zp[1]:16 0.8 -(byte) bitmap_line_xdyd::x#1 x zp[1]:16 0.8 -(byte) bitmap_line_xdyd::x#2 x zp[1]:16 37.875 -(byte) bitmap_line_xdyd::x#3 x zp[1]:16 76.25 -(byte) bitmap_line_xdyd::x#6 x zp[1]:16 3.0 +(byte) bitmap_line_xdyd::x#0 x zp[1]:15 0.8 +(byte) bitmap_line_xdyd::x#1 x zp[1]:15 0.8 +(byte) bitmap_line_xdyd::x#2 x zp[1]:15 37.875 +(byte) bitmap_line_xdyd::x#3 x zp[1]:15 76.25 +(byte) bitmap_line_xdyd::x#6 x zp[1]:15 3.0 (byte) bitmap_line_xdyd::x1 -(byte) bitmap_line_xdyd::x1#0 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyd::x1#1 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyd::x1#6 x1 zp[1]:9 7.5 +(byte) bitmap_line_xdyd::x1#0 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyd::x1#1 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyd::x1#6 x1 zp[1]:8 7.5 (byte) bitmap_line_xdyd::xd -(byte) bitmap_line_xdyd::xd#0 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyd::xd#1 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyd::xd#5 xd zp[1]:31 14.714285714285715 +(byte) bitmap_line_xdyd::xd#0 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyd::xd#1 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyd::xd#5 xd zp[1]:29 14.714285714285715 (byte) bitmap_line_xdyd::y -(byte) bitmap_line_xdyd::y#0 y zp[1]:13 1.0 -(byte) bitmap_line_xdyd::y#1 y zp[1]:13 1.0 -(byte) bitmap_line_xdyd::y#2 y zp[1]:13 101.0 -(byte) bitmap_line_xdyd::y#3 y zp[1]:13 58.00000000000001 -(byte) bitmap_line_xdyd::y#5 y zp[1]:13 3.0 -(byte) bitmap_line_xdyd::y#6 y zp[1]:13 101.0 +(byte) bitmap_line_xdyd::y#0 y zp[1]:12 1.0 +(byte) bitmap_line_xdyd::y#1 y zp[1]:12 1.0 +(byte) bitmap_line_xdyd::y#2 y zp[1]:12 101.0 +(byte) bitmap_line_xdyd::y#3 y zp[1]:12 58.00000000000001 +(byte) bitmap_line_xdyd::y#5 y zp[1]:12 3.0 +(byte) bitmap_line_xdyd::y#6 y zp[1]:12 101.0 (byte) bitmap_line_xdyd::yd -(byte) bitmap_line_xdyd::yd#0 yd zp[1]:10 4.0 -(byte) bitmap_line_xdyd::yd#1 yd zp[1]:10 4.0 -(byte) bitmap_line_xdyd::yd#2 yd zp[1]:10 7.642857142857143 +(byte) bitmap_line_xdyd::yd#0 yd zp[1]:9 4.0 +(byte) bitmap_line_xdyd::yd#1 yd zp[1]:9 4.0 +(byte) bitmap_line_xdyd::yd#2 yd zp[1]:9 7.642857142857143 (void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) (byte~) bitmap_line_xdyi::$6 reg byte x 202.0 (label) bitmap_line_xdyi::@1 @@ -27233,36 +27071,36 @@ FINAL SYMBOL TABLE (label) bitmap_line_xdyi::@4 (label) bitmap_line_xdyi::@return (byte) bitmap_line_xdyi::e -(byte) bitmap_line_xdyi::e#0 e zp[1]:17 4.0 -(byte) bitmap_line_xdyi::e#1 e zp[1]:17 134.66666666666666 -(byte) bitmap_line_xdyi::e#2 e zp[1]:17 202.0 -(byte) bitmap_line_xdyi::e#3 e zp[1]:17 40.8 -(byte) bitmap_line_xdyi::e#6 e zp[1]:17 101.0 +(byte) bitmap_line_xdyi::e#0 e zp[1]:16 4.0 +(byte) bitmap_line_xdyi::e#1 e zp[1]:16 134.66666666666666 +(byte) bitmap_line_xdyi::e#2 e zp[1]:16 202.0 +(byte) bitmap_line_xdyi::e#3 e zp[1]:16 40.8 +(byte) bitmap_line_xdyi::e#6 e zp[1]:16 101.0 (byte) bitmap_line_xdyi::x -(byte) bitmap_line_xdyi::x#0 x zp[1]:10 0.8 -(byte) bitmap_line_xdyi::x#1 x zp[1]:10 0.8 -(byte) bitmap_line_xdyi::x#2 x zp[1]:10 37.875 -(byte) bitmap_line_xdyi::x#3 x zp[1]:10 76.25 -(byte) bitmap_line_xdyi::x#6 x zp[1]:10 3.0 +(byte) bitmap_line_xdyi::x#0 x zp[1]:9 0.8 +(byte) bitmap_line_xdyi::x#1 x zp[1]:9 0.8 +(byte) bitmap_line_xdyi::x#2 x zp[1]:9 37.875 +(byte) bitmap_line_xdyi::x#3 x zp[1]:9 76.25 +(byte) bitmap_line_xdyi::x#6 x zp[1]:9 3.0 (byte) bitmap_line_xdyi::x1 -(byte) bitmap_line_xdyi::x1#0 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyi::x1#1 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyi::x1#6 x1 zp[1]:9 7.5 +(byte) bitmap_line_xdyi::x1#0 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyi::x1#1 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyi::x1#6 x1 zp[1]:8 7.5 (byte) bitmap_line_xdyi::xd -(byte) bitmap_line_xdyi::xd#0 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyi::xd#1 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyi::xd#5 xd zp[1]:31 14.714285714285715 +(byte) bitmap_line_xdyi::xd#0 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyi::xd#1 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyi::xd#5 xd zp[1]:29 14.714285714285715 (byte) bitmap_line_xdyi::y -(byte) bitmap_line_xdyi::y#0 y zp[1]:13 1.0 -(byte) bitmap_line_xdyi::y#1 y zp[1]:13 1.0 -(byte) bitmap_line_xdyi::y#2 y zp[1]:13 101.0 -(byte) bitmap_line_xdyi::y#3 y zp[1]:13 58.00000000000001 -(byte) bitmap_line_xdyi::y#5 y zp[1]:13 3.0 -(byte) bitmap_line_xdyi::y#6 y zp[1]:13 101.0 +(byte) bitmap_line_xdyi::y#0 y zp[1]:12 1.0 +(byte) bitmap_line_xdyi::y#1 y zp[1]:12 1.0 +(byte) bitmap_line_xdyi::y#2 y zp[1]:12 101.0 +(byte) bitmap_line_xdyi::y#3 y zp[1]:12 58.00000000000001 +(byte) bitmap_line_xdyi::y#5 y zp[1]:12 3.0 +(byte) bitmap_line_xdyi::y#6 y zp[1]:12 101.0 (byte) bitmap_line_xdyi::yd -(byte) bitmap_line_xdyi::yd#0 yd zp[1]:16 4.0 -(byte) bitmap_line_xdyi::yd#1 yd zp[1]:16 4.0 -(byte) bitmap_line_xdyi::yd#2 yd zp[1]:16 7.642857142857143 +(byte) bitmap_line_xdyi::yd#0 yd zp[1]:15 4.0 +(byte) bitmap_line_xdyi::yd#1 yd zp[1]:15 4.0 +(byte) bitmap_line_xdyi::yd#2 yd zp[1]:15 7.642857142857143 (void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) (byte~) bitmap_line_ydxd::$6 reg byte a 202.0 (label) bitmap_line_ydxd::@1 @@ -27271,11 +27109,11 @@ FINAL SYMBOL TABLE (label) bitmap_line_ydxd::@4 (label) bitmap_line_ydxd::@return (byte) bitmap_line_ydxd::e -(byte) bitmap_line_ydxd::e#0 e zp[1]:17 4.0 -(byte) bitmap_line_ydxd::e#1 e zp[1]:17 134.66666666666666 -(byte) bitmap_line_ydxd::e#2 e zp[1]:17 202.0 -(byte) bitmap_line_ydxd::e#3 e zp[1]:17 40.8 -(byte) bitmap_line_ydxd::e#6 e zp[1]:17 101.0 +(byte) bitmap_line_ydxd::e#0 e zp[1]:16 4.0 +(byte) bitmap_line_ydxd::e#1 e zp[1]:16 134.66666666666666 +(byte) bitmap_line_ydxd::e#2 e zp[1]:16 202.0 +(byte) bitmap_line_ydxd::e#3 e zp[1]:16 40.8 +(byte) bitmap_line_ydxd::e#6 e zp[1]:16 101.0 (byte) bitmap_line_ydxd::x (byte) bitmap_line_ydxd::x#0 reg byte x 1.0 (byte) bitmap_line_ydxd::x#1 reg byte x 1.0 @@ -27284,23 +27122,23 @@ FINAL SYMBOL TABLE (byte) bitmap_line_ydxd::x#5 reg byte x 3.0 (byte) bitmap_line_ydxd::x#6 reg byte x 101.0 (byte) bitmap_line_ydxd::xd -(byte) bitmap_line_ydxd::xd#0 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxd::xd#1 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxd::xd#2 xd zp[1]:31 7.642857142857143 +(byte) bitmap_line_ydxd::xd#0 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxd::xd#1 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxd::xd#2 xd zp[1]:29 7.642857142857143 (byte) bitmap_line_ydxd::y -(byte) bitmap_line_ydxd::y#0 y zp[1]:16 0.8 -(byte) bitmap_line_ydxd::y#1 y zp[1]:16 0.8 -(byte) bitmap_line_ydxd::y#2 y zp[1]:16 76.25 -(byte) bitmap_line_ydxd::y#3 y zp[1]:16 37.875 -(byte) bitmap_line_ydxd::y#7 y zp[1]:16 3.0 +(byte) bitmap_line_ydxd::y#0 y zp[1]:15 0.8 +(byte) bitmap_line_ydxd::y#1 y zp[1]:15 0.8 +(byte) bitmap_line_ydxd::y#2 y zp[1]:15 76.25 +(byte) bitmap_line_ydxd::y#3 y zp[1]:15 37.875 +(byte) bitmap_line_ydxd::y#7 y zp[1]:15 3.0 (byte) bitmap_line_ydxd::y1 -(byte) bitmap_line_ydxd::y1#0 y1 zp[1]:13 1.3333333333333333 -(byte) bitmap_line_ydxd::y1#1 y1 zp[1]:13 1.3333333333333333 -(byte) bitmap_line_ydxd::y1#6 y1 zp[1]:13 7.5 +(byte) bitmap_line_ydxd::y1#0 y1 zp[1]:12 1.3333333333333333 +(byte) bitmap_line_ydxd::y1#1 y1 zp[1]:12 1.3333333333333333 +(byte) bitmap_line_ydxd::y1#6 y1 zp[1]:12 7.5 (byte) bitmap_line_ydxd::yd -(byte) bitmap_line_ydxd::yd#0 yd zp[1]:10 2.0 -(byte) bitmap_line_ydxd::yd#1 yd zp[1]:10 2.0 -(byte) bitmap_line_ydxd::yd#5 yd zp[1]:10 14.714285714285715 +(byte) bitmap_line_ydxd::yd#0 yd zp[1]:9 2.0 +(byte) bitmap_line_ydxd::yd#1 yd zp[1]:9 2.0 +(byte) bitmap_line_ydxd::yd#5 yd zp[1]:9 14.714285714285715 (void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) (byte~) bitmap_line_ydxi::$6 reg byte a 202.0 (label) bitmap_line_ydxi::@1 @@ -27309,11 +27147,11 @@ FINAL SYMBOL TABLE (label) bitmap_line_ydxi::@4 (label) bitmap_line_ydxi::@return (byte) bitmap_line_ydxi::e -(byte) bitmap_line_ydxi::e#0 e zp[1]:13 4.0 -(byte) bitmap_line_ydxi::e#1 e zp[1]:13 134.66666666666666 -(byte) bitmap_line_ydxi::e#2 e zp[1]:13 202.0 -(byte) bitmap_line_ydxi::e#3 e zp[1]:13 40.8 -(byte) bitmap_line_ydxi::e#6 e zp[1]:13 101.0 +(byte) bitmap_line_ydxi::e#0 e zp[1]:12 4.0 +(byte) bitmap_line_ydxi::e#1 e zp[1]:12 134.66666666666666 +(byte) bitmap_line_ydxi::e#2 e zp[1]:12 202.0 +(byte) bitmap_line_ydxi::e#3 e zp[1]:12 40.8 +(byte) bitmap_line_ydxi::e#6 e zp[1]:12 101.0 (byte) bitmap_line_ydxi::x (byte) bitmap_line_ydxi::x#0 reg byte x 1.0 (byte) bitmap_line_ydxi::x#1 reg byte x 1.0 @@ -27322,32 +27160,32 @@ FINAL SYMBOL TABLE (byte) bitmap_line_ydxi::x#5 reg byte x 3.0 (byte) bitmap_line_ydxi::x#6 reg byte x 101.0 (byte) bitmap_line_ydxi::xd -(byte) bitmap_line_ydxi::xd#0 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxi::xd#1 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxi::xd#2 xd zp[1]:31 7.642857142857143 +(byte) bitmap_line_ydxi::xd#0 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxi::xd#1 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxi::xd#2 xd zp[1]:29 7.642857142857143 (byte) bitmap_line_ydxi::y -(byte) bitmap_line_ydxi::y#0 y zp[1]:10 0.8 -(byte) bitmap_line_ydxi::y#1 y zp[1]:10 0.8 -(byte) bitmap_line_ydxi::y#2 y zp[1]:10 37.875 -(byte) bitmap_line_ydxi::y#3 y zp[1]:10 76.25 -(byte) bitmap_line_ydxi::y#6 y zp[1]:10 3.0 +(byte) bitmap_line_ydxi::y#0 y zp[1]:9 0.8 +(byte) bitmap_line_ydxi::y#1 y zp[1]:9 0.8 +(byte) bitmap_line_ydxi::y#2 y zp[1]:9 37.875 +(byte) bitmap_line_ydxi::y#3 y zp[1]:9 76.25 +(byte) bitmap_line_ydxi::y#6 y zp[1]:9 3.0 (byte) bitmap_line_ydxi::y1 -(byte) bitmap_line_ydxi::y1#0 y1 zp[1]:17 1.3333333333333333 -(byte) bitmap_line_ydxi::y1#1 y1 zp[1]:17 1.3333333333333333 -(byte) bitmap_line_ydxi::y1#6 y1 zp[1]:17 7.5 +(byte) bitmap_line_ydxi::y1#0 y1 zp[1]:16 1.3333333333333333 +(byte) bitmap_line_ydxi::y1#1 y1 zp[1]:16 1.3333333333333333 +(byte) bitmap_line_ydxi::y1#6 y1 zp[1]:16 7.5 (byte) bitmap_line_ydxi::yd -(byte) bitmap_line_ydxi::yd#0 yd zp[1]:9 2.0 -(byte) bitmap_line_ydxi::yd#1 yd zp[1]:9 2.0 -(byte) bitmap_line_ydxi::yd#5 yd zp[1]:9 14.714285714285715 +(byte) bitmap_line_ydxi::yd#0 yd zp[1]:8 2.0 +(byte) bitmap_line_ydxi::yd#1 yd zp[1]:8 2.0 +(byte) bitmap_line_ydxi::yd#5 yd zp[1]:8 14.714285714285715 (void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) (byte~) bitmap_plot::$1 reg byte a 4.0 (label) bitmap_plot::@return (byte*) bitmap_plot::plotter -(word) bitmap_plot::plotter#0 plotter zp[2]:26 1.0 +(word) bitmap_plot::plotter#0 plotter zp[2]:25 1.0 (word) bitmap_plot::plotter_x -(word) bitmap_plot::plotter_x#0 plotter_x zp[2]:26 2.0 +(word) bitmap_plot::plotter_x#0 plotter_x zp[2]:25 2.0 (word) bitmap_plot::plotter_y -(word) bitmap_plot::plotter_y#0 plotter_y zp[2]:28 4.0 +(word) bitmap_plot::plotter_y#0 plotter_y zp[2]:27 4.0 (byte) bitmap_plot::x (byte) bitmap_plot::x#0 reg byte x 101.0 (byte) bitmap_plot::x#1 reg byte x 101.0 @@ -27417,6 +27255,7 @@ FINAL SYMBOL TABLE (label) form_control::@9 (label) form_control::@return (byte*) form_control::field +(byte*) form_control::field#0 field zp[2]:27 0.5925925925925926 (byte) form_control::key_event (byte) form_control::key_event#0 reg byte a 2.6666666666666665 (byte) form_control::return @@ -27432,19 +27271,19 @@ FINAL SYMBOL TABLE (const byte*) form_ctrl_mcm = (const byte*) form_fields_val+(byte) 2 (const byte*) form_ctrl_overs = (const byte*) form_fields_val+(byte) 9 (signed byte) form_cursor_count -(signed byte) form_cursor_count#1 form_cursor_count zp[1]:16 0.3333333333333333 -(signed byte) form_cursor_count#15 form_cursor_count zp[1]:16 0.4 -(signed byte) form_cursor_count#16 form_cursor_count zp[1]:16 65.82352941176472 -(signed byte) form_cursor_count#21 form_cursor_count zp[1]:16 221.2 -(signed byte) form_cursor_count#5 form_cursor_count zp[1]:16 2.0 +(signed byte) form_cursor_count#1 form_cursor_count zp[1]:15 0.3333333333333333 +(signed byte) form_cursor_count#15 form_cursor_count zp[1]:15 0.4 +(signed byte) form_cursor_count#16 form_cursor_count zp[1]:15 65.82352941176472 +(signed byte) form_cursor_count#21 form_cursor_count zp[1]:15 157.99999999999997 +(signed byte) form_cursor_count#5 form_cursor_count zp[1]:15 2.0 (const byte*) form_dtv_palet = (const byte*) form_fields_val+(byte) $1b (byte) form_field_idx -(byte) form_field_idx#1 form_field_idx zp[1]:9 0.3333333333333333 -(byte) form_field_idx#18 form_field_idx zp[1]:9 65.94117647058826 -(byte) form_field_idx#28 form_field_idx zp[1]:9 30.75675675675673 -(byte) form_field_idx#31 form_field_idx zp[1]:9 6.0 -(byte) form_field_idx#5 form_field_idx zp[1]:9 2.0 -(byte) form_field_idx#6 form_field_idx zp[1]:9 2.0 +(byte) form_field_idx#1 form_field_idx zp[1]:8 0.3333333333333333 +(byte) form_field_idx#18 form_field_idx zp[1]:8 65.94117647058826 +(byte) form_field_idx#28 form_field_idx zp[1]:8 29.17948717948718 +(byte) form_field_idx#31 form_field_idx zp[1]:8 6.0 +(byte) form_field_idx#5 form_field_idx zp[1]:8 2.0 +(byte) form_field_idx#6 form_field_idx zp[1]:8 2.0 (byte*()) form_field_ptr((byte) form_field_ptr::field_idx) (label) form_field_ptr::@return (byte*) form_field_ptr::field @@ -27453,12 +27292,14 @@ FINAL SYMBOL TABLE (byte) form_field_ptr::field_idx#1 reg byte x 4.0 (byte) form_field_ptr::field_idx#2 reg byte x 335.66666666666674 (byte*) form_field_ptr::line -(word) form_field_ptr::line#0 line zp[2]:26 0.06451612903225806 +(word) form_field_ptr::line#0 line zp[2]:25 0.4 (byte*) form_field_ptr::return +(byte*) form_field_ptr::return#0 return zp[2]:27 1.3333333333333333 +(byte*) form_field_ptr::return#3 return zp[2]:27 4.0 (byte) form_field_ptr::x -(byte) form_field_ptr::x#0 x zp[1]:30 33.90000000000003 +(byte) form_field_ptr::x#0 x zp[1]:29 251.25 (byte) form_field_ptr::y -(byte) form_field_ptr::y#0 reg byte a 6.0 +(byte) form_field_ptr::y#0 reg byte y 6.0 (const byte) form_fields_cnt = (byte) $24 (const byte*) form_fields_max[] = { (byte) $a, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) 3, (byte) 1, (byte) 4, (byte) 1, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f } (const byte*) form_fields_val[] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } @@ -27492,9 +27333,9 @@ FINAL SYMBOL TABLE (byte) form_mode::i#1 reg byte x 151.5 (byte) form_mode::i#2 reg byte x 202.0 (byte) form_mode::preset_current -(byte) form_mode::preset_current#0 preset_current zp[1]:17 4.0 -(byte) form_mode::preset_current#1 preset_current zp[1]:17 50.5 -(byte) form_mode::preset_current#6 preset_current zp[1]:17 388.25 +(byte) form_mode::preset_current#0 preset_current zp[1]:16 4.0 +(byte) form_mode::preset_current#1 preset_current zp[1]:16 50.5 +(byte) form_mode::preset_current#6 preset_current zp[1]:16 388.25 (void()) form_render_values() (label) form_render_values::@1 (label) form_render_values::@2 @@ -27558,8 +27399,8 @@ FINAL SYMBOL TABLE (byte) get_vic_charset::idx (byte) get_vic_charset::idx#0 reg byte a 3.0 (byte*) get_vic_charset::return -(byte*) get_vic_charset::return#2 return zp[2]:14 0.6666666666666666 -(byte*) get_vic_charset::return#4 return zp[2]:14 4.0 +(byte*) get_vic_charset::return#2 return zp[2]:13 0.6666666666666666 +(byte*) get_vic_charset::return#4 return zp[2]:13 4.0 (byte*()) get_vic_screen((byte) get_vic_screen::idx) (label) get_vic_screen::@1 (label) get_vic_screen::@2 @@ -27598,21 +27439,21 @@ FINAL SYMBOL TABLE (label) gfx_init_charset::@4 (label) gfx_init_charset::@return (byte) gfx_init_charset::c -(byte) gfx_init_charset::c#1 c zp[1]:13 16.5 -(byte) gfx_init_charset::c#4 c zp[1]:13 3.142857142857143 +(byte) gfx_init_charset::c#1 c zp[1]:12 16.5 +(byte) gfx_init_charset::c#4 c zp[1]:12 3.142857142857143 (byte*) gfx_init_charset::chargen -(byte*) gfx_init_charset::chargen#1 chargen zp[2]:11 42.599999999999994 -(byte*) gfx_init_charset::chargen#2 chargen zp[2]:11 104.66666666666666 -(byte*) gfx_init_charset::chargen#3 chargen zp[2]:11 22.0 +(byte*) gfx_init_charset::chargen#1 chargen zp[2]:10 42.599999999999994 +(byte*) gfx_init_charset::chargen#2 chargen zp[2]:10 104.66666666666666 +(byte*) gfx_init_charset::chargen#3 chargen zp[2]:10 22.0 (byte*) gfx_init_charset::charset -(byte*) gfx_init_charset::charset#1 charset zp[2]:14 35.5 -(byte*) gfx_init_charset::charset#2 charset zp[2]:14 157.0 -(byte*) gfx_init_charset::charset#3 charset zp[2]:14 22.0 +(byte*) gfx_init_charset::charset#1 charset zp[2]:13 35.5 +(byte*) gfx_init_charset::charset#2 charset zp[2]:13 157.0 +(byte*) gfx_init_charset::charset#3 charset zp[2]:13 22.0 (byte) gfx_init_charset::l (byte) gfx_init_charset::l#1 reg byte x 151.5 (byte) gfx_init_charset::l#2 reg byte x 50.5 (void()) gfx_init_plane_8bppchunky() -(word~) gfx_init_plane_8bppchunky::$5 zp[2]:24 101.0 +(word~) gfx_init_plane_8bppchunky::$5 zp[2]:25 101.0 (label) gfx_init_plane_8bppchunky::@1 (label) gfx_init_plane_8bppchunky::@2 (label) gfx_init_plane_8bppchunky::@3 @@ -27624,21 +27465,21 @@ FINAL SYMBOL TABLE (byte) gfx_init_plane_8bppchunky::c (byte) gfx_init_plane_8bppchunky::c#0 reg byte a 202.0 (byte*) gfx_init_plane_8bppchunky::gfxb -(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfxb zp[2]:14 42.599999999999994 -(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfxb zp[2]:14 157.0 -(byte*) gfx_init_plane_8bppchunky::gfxb#4 gfxb zp[2]:14 75.75 -(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfxb zp[2]:14 22.0 +(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfxb zp[2]:13 42.599999999999994 +(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfxb zp[2]:13 157.0 +(byte*) gfx_init_plane_8bppchunky::gfxb#4 gfxb zp[2]:13 75.75 +(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfxb zp[2]:13 22.0 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 reg byte x 202.0 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 reg byte x 103.75 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 reg byte x 22.0 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 reg byte x 34.888888888888886 (word) gfx_init_plane_8bppchunky::x -(word) gfx_init_plane_8bppchunky::x#1 x zp[2]:11 151.5 -(word) gfx_init_plane_8bppchunky::x#2 x zp[2]:11 30.299999999999997 +(word) gfx_init_plane_8bppchunky::x#1 x zp[2]:10 151.5 +(word) gfx_init_plane_8bppchunky::x#2 x zp[2]:10 30.299999999999997 (byte) gfx_init_plane_8bppchunky::y -(byte) gfx_init_plane_8bppchunky::y#1 y zp[1]:13 16.5 -(byte) gfx_init_plane_8bppchunky::y#6 y zp[1]:13 9.461538461538462 +(byte) gfx_init_plane_8bppchunky::y#1 y zp[1]:12 16.5 +(byte) gfx_init_plane_8bppchunky::y#6 y zp[1]:12 9.461538461538462 (void()) gfx_init_plane_blank() (label) gfx_init_plane_blank::@return (void()) gfx_init_plane_charset8() @@ -27654,42 +27495,42 @@ FINAL SYMBOL TABLE (label) gfx_init_plane_charset8::@9 (label) gfx_init_plane_charset8::@return (byte) gfx_init_plane_charset8::bits -(byte) gfx_init_plane_charset8::bits#0 bits zp[1]:8 101.0 -(byte) gfx_init_plane_charset8::bits#1 bits zp[1]:8 500.5 -(byte) gfx_init_plane_charset8::bits#2 bits zp[1]:8 443.42857142857144 +(byte) gfx_init_plane_charset8::bits#0 bits zp[1]:30 101.0 +(byte) gfx_init_plane_charset8::bits#1 bits zp[1]:30 500.5 +(byte) gfx_init_plane_charset8::bits#2 bits zp[1]:30 443.42857142857144 (byte) gfx_init_plane_charset8::c (byte) gfx_init_plane_charset8::c#2 reg byte a 2002.0 (byte) gfx_init_plane_charset8::c#3 reg byte a 2002.0 (byte) gfx_init_plane_charset8::ch -(byte) gfx_init_plane_charset8::ch#1 ch zp[1]:10 16.5 -(byte) gfx_init_plane_charset8::ch#8 ch zp[1]:10 1.2941176470588236 +(byte) gfx_init_plane_charset8::ch#1 ch zp[1]:9 16.5 +(byte) gfx_init_plane_charset8::ch#8 ch zp[1]:9 1.2941176470588236 (byte*) gfx_init_plane_charset8::chargen (byte*) gfx_init_plane_charset8::chargen#1 chargen zp[2]:6 13.3125 (byte*) gfx_init_plane_charset8::chargen#2 chargen zp[2]:6 157.0 (byte*) gfx_init_plane_charset8::chargen#3 chargen zp[2]:6 22.0 (byte) gfx_init_plane_charset8::col -(byte) gfx_init_plane_charset8::col#1 col zp[1]:16 302.0 -(byte) gfx_init_plane_charset8::col#2 col zp[1]:16 388.0 -(byte) gfx_init_plane_charset8::col#5 col zp[1]:16 71.0 -(byte) gfx_init_plane_charset8::col#6 col zp[1]:16 22.0 +(byte) gfx_init_plane_charset8::col#1 col zp[1]:15 302.0 +(byte) gfx_init_plane_charset8::col#2 col zp[1]:15 388.0 +(byte) gfx_init_plane_charset8::col#5 col zp[1]:15 71.0 +(byte) gfx_init_plane_charset8::col#6 col zp[1]:15 22.0 (byte) gfx_init_plane_charset8::cp (byte) gfx_init_plane_charset8::cp#1 reg byte x 1501.5 (byte) gfx_init_plane_charset8::cp#2 reg byte x 222.44444444444446 (byte) gfx_init_plane_charset8::cr -(byte) gfx_init_plane_charset8::cr#1 cr zp[1]:13 151.5 -(byte) gfx_init_plane_charset8::cr#6 cr zp[1]:13 14.428571428571429 +(byte) gfx_init_plane_charset8::cr#1 cr zp[1]:12 151.5 +(byte) gfx_init_plane_charset8::cr#6 cr zp[1]:12 14.428571428571429 (byte*) gfx_init_plane_charset8::gfxa -(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp[2]:11 234.8888888888889 -(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp[2]:11 517.3333333333334 -(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp[2]:11 71.0 -(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp[2]:11 22.0 +(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp[2]:10 234.8888888888889 +(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp[2]:10 517.3333333333334 +(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp[2]:10 71.0 +(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp[2]:10 22.0 (byte) gfx_init_plane_charset8::gfxbCpuBank (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = (byte)(const dword) PLANE_CHARSET8/(word) $4000 (void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) -(dword~) gfx_init_plane_fill::$0 zp[4]:18 4.0 -(word~) gfx_init_plane_fill::$1 zp[2]:22 4.0 -(word~) gfx_init_plane_fill::$4 zp[2]:14 4.0 -(word~) gfx_init_plane_fill::$5 zp[2]:14 4.0 +(dword~) gfx_init_plane_fill::$0 zp[4]:19 4.0 +(word~) gfx_init_plane_fill::$1 zp[2]:23 4.0 +(word~) gfx_init_plane_fill::$4 zp[2]:13 4.0 +(word~) gfx_init_plane_fill::$5 zp[2]:13 4.0 (label) gfx_init_plane_fill::@1 (label) gfx_init_plane_fill::@2 (label) gfx_init_plane_fill::@3 @@ -27700,16 +27541,16 @@ FINAL SYMBOL TABLE (byte) gfx_init_plane_fill::bx#1 reg byte x 151.5 (byte) gfx_init_plane_fill::bx#2 reg byte x 67.33333333333333 (byte) gfx_init_plane_fill::by -(byte) gfx_init_plane_fill::by#1 by zp[1]:16 16.5 -(byte) gfx_init_plane_fill::by#4 by zp[1]:16 3.6666666666666665 +(byte) gfx_init_plane_fill::by#1 by zp[1]:15 16.5 +(byte) gfx_init_plane_fill::by#4 by zp[1]:15 3.6666666666666665 (byte) gfx_init_plane_fill::fill -(byte) gfx_init_plane_fill::fill#6 fill zp[1]:8 5.611111111111111 +(byte) gfx_init_plane_fill::fill#6 fill zp[1]:30 5.611111111111111 (byte*) gfx_init_plane_fill::gfxb -(word) gfx_init_plane_fill::gfxb#0 gfxb zp[2]:14 2.0 -(byte*) gfx_init_plane_fill::gfxb#1 gfxb zp[2]:14 42.599999999999994 -(byte*) gfx_init_plane_fill::gfxb#2 gfxb zp[2]:14 157.0 -(byte*) gfx_init_plane_fill::gfxb#3 gfxb zp[2]:14 24.0 -(byte*) gfx_init_plane_fill::gfxb#6 gfxb zp[2]:14 4.0 +(word) gfx_init_plane_fill::gfxb#0 gfxb zp[2]:13 2.0 +(byte*) gfx_init_plane_fill::gfxb#1 gfxb zp[2]:13 42.599999999999994 +(byte*) gfx_init_plane_fill::gfxb#2 gfxb zp[2]:13 157.0 +(byte*) gfx_init_plane_fill::gfxb#3 gfxb zp[2]:13 24.0 +(byte*) gfx_init_plane_fill::gfxb#6 gfxb zp[2]:13 4.0 (byte) gfx_init_plane_fill::gfxbCpuBank (byte) gfx_init_plane_fill::gfxbCpuBank#0 reg byte a 4.0 (dword) gfx_init_plane_fill::plane_addr @@ -27730,8 +27571,8 @@ FINAL SYMBOL TABLE (byte) gfx_init_plane_horisontal::ax#1 reg byte x 151.5 (byte) gfx_init_plane_horisontal::ax#2 reg byte x 25.25 (byte) gfx_init_plane_horisontal::ay -(byte) gfx_init_plane_horisontal::ay#1 ay zp[1]:10 16.5 -(byte) gfx_init_plane_horisontal::ay#4 ay zp[1]:10 11.181818181818182 +(byte) gfx_init_plane_horisontal::ay#1 ay zp[1]:9 16.5 +(byte) gfx_init_plane_horisontal::ay#4 ay zp[1]:9 11.181818181818182 (byte*) gfx_init_plane_horisontal::gfxa (byte*) gfx_init_plane_horisontal::gfxa#1 gfxa zp[2]:6 202.0 (byte*) gfx_init_plane_horisontal::gfxa#2 gfxa zp[2]:6 202.0 @@ -27751,8 +27592,8 @@ FINAL SYMBOL TABLE (byte) gfx_init_plane_horisontal2::ax#1 reg byte x 151.5 (byte) gfx_init_plane_horisontal2::ax#2 reg byte x 40.4 (byte) gfx_init_plane_horisontal2::ay -(byte) gfx_init_plane_horisontal2::ay#1 ay zp[1]:9 16.5 -(byte) gfx_init_plane_horisontal2::ay#4 ay zp[1]:9 15.375 +(byte) gfx_init_plane_horisontal2::ay#1 ay zp[1]:8 16.5 +(byte) gfx_init_plane_horisontal2::ay#4 ay zp[1]:8 15.375 (byte*) gfx_init_plane_horisontal2::gfxa (byte*) gfx_init_plane_horisontal2::gfxa#1 gfxa zp[2]:6 42.599999999999994 (byte*) gfx_init_plane_horisontal2::gfxa#2 gfxa zp[2]:6 78.5 @@ -27772,8 +27613,8 @@ FINAL SYMBOL TABLE (byte) gfx_init_plane_vertical::bx#1 reg byte x 151.5 (byte) gfx_init_plane_vertical::bx#2 reg byte x 67.33333333333333 (byte) gfx_init_plane_vertical::by -(byte) gfx_init_plane_vertical::by#1 by zp[1]:17 16.5 -(byte) gfx_init_plane_vertical::by#4 by zp[1]:17 3.6666666666666665 +(byte) gfx_init_plane_vertical::by#1 by zp[1]:16 16.5 +(byte) gfx_init_plane_vertical::by#4 by zp[1]:16 3.6666666666666665 (byte*) gfx_init_plane_vertical::gfxb (byte*) gfx_init_plane_vertical::gfxb#1 gfxb zp[2]:6 42.599999999999994 (byte*) gfx_init_plane_vertical::gfxb#2 gfxb zp[2]:6 157.0 @@ -27784,7 +27625,7 @@ FINAL SYMBOL TABLE (label) gfx_init_plane_vertical2::@return (void()) gfx_init_screen0() (byte~) gfx_init_screen0::$0 reg byte a 202.0 -(byte~) gfx_init_screen0::$1 zp[1]:31 101.0 +(byte~) gfx_init_screen0::$1 zp[1]:30 101.0 (byte~) gfx_init_screen0::$2 reg byte a 202.0 (byte~) gfx_init_screen0::$3 reg byte a 202.0 (label) gfx_init_screen0::@1 @@ -27792,15 +27633,15 @@ FINAL SYMBOL TABLE (label) gfx_init_screen0::@3 (label) gfx_init_screen0::@return (byte*) gfx_init_screen0::ch -(byte*) gfx_init_screen0::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen0::ch#2 ch zp[2]:22 52.33333333333333 -(byte*) gfx_init_screen0::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen0::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen0::ch#2 ch zp[2]:17 52.33333333333333 +(byte*) gfx_init_screen0::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen0::cx (byte) gfx_init_screen0::cx#1 reg byte x 151.5 (byte) gfx_init_screen0::cx#2 reg byte x 43.285714285714285 (byte) gfx_init_screen0::cy -(byte) gfx_init_screen0::cy#1 cy zp[1]:17 16.5 -(byte) gfx_init_screen0::cy#4 cy zp[1]:17 12.299999999999999 +(byte) gfx_init_screen0::cy#1 cy zp[1]:16 16.5 +(byte) gfx_init_screen0::cy#4 cy zp[1]:16 12.299999999999999 (void()) gfx_init_screen1() (byte~) gfx_init_screen1::$0 reg byte a 202.0 (byte~) gfx_init_screen1::$1 reg byte a 202.0 @@ -27809,15 +27650,15 @@ FINAL SYMBOL TABLE (label) gfx_init_screen1::@3 (label) gfx_init_screen1::@return (byte*) gfx_init_screen1::ch -(byte*) gfx_init_screen1::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen1::ch#2 ch zp[2]:22 78.5 -(byte*) gfx_init_screen1::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen1::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen1::ch#2 ch zp[2]:17 78.5 +(byte*) gfx_init_screen1::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen1::cx (byte) gfx_init_screen1::cx#1 reg byte x 151.5 (byte) gfx_init_screen1::cx#2 reg byte x 60.599999999999994 (byte) gfx_init_screen1::cy -(byte) gfx_init_screen1::cy#1 cy zp[1]:17 16.5 -(byte) gfx_init_screen1::cy#4 cy zp[1]:17 15.375 +(byte) gfx_init_screen1::cy#1 cy zp[1]:16 16.5 +(byte) gfx_init_screen1::cy#4 cy zp[1]:16 15.375 (void()) gfx_init_screen2() (byte~) gfx_init_screen2::$0 reg byte a 202.0 (byte~) gfx_init_screen2::$3 reg byte a 202.0 @@ -27827,22 +27668,22 @@ FINAL SYMBOL TABLE (label) gfx_init_screen2::@3 (label) gfx_init_screen2::@return (byte*) gfx_init_screen2::ch -(byte*) gfx_init_screen2::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen2::ch#2 ch zp[2]:22 44.85714285714286 -(byte*) gfx_init_screen2::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen2::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen2::ch#2 ch zp[2]:17 44.85714285714286 +(byte*) gfx_init_screen2::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen2::col (byte) gfx_init_screen2::col#0 reg byte y 151.5 (byte) gfx_init_screen2::col2 -(byte) gfx_init_screen2::col2#0 col2 zp[1]:31 101.0 +(byte) gfx_init_screen2::col2#0 col2 zp[1]:30 101.0 (byte) gfx_init_screen2::cx (byte) gfx_init_screen2::cx#1 reg byte x 151.5 (byte) gfx_init_screen2::cx#2 reg byte x 37.875 (byte) gfx_init_screen2::cy -(byte) gfx_init_screen2::cy#1 cy zp[1]:16 16.5 -(byte) gfx_init_screen2::cy#4 cy zp[1]:16 11.181818181818182 +(byte) gfx_init_screen2::cy#1 cy zp[1]:15 16.5 +(byte) gfx_init_screen2::cy#4 cy zp[1]:15 11.181818181818182 (void()) gfx_init_screen3() (byte~) gfx_init_screen3::$0 reg byte a 202.0 -(byte~) gfx_init_screen3::$1 zp[1]:30 101.0 +(byte~) gfx_init_screen3::$1 zp[1]:29 101.0 (byte~) gfx_init_screen3::$2 reg byte a 202.0 (byte~) gfx_init_screen3::$3 reg byte a 202.0 (label) gfx_init_screen3::@1 @@ -27850,30 +27691,30 @@ FINAL SYMBOL TABLE (label) gfx_init_screen3::@3 (label) gfx_init_screen3::@return (byte*) gfx_init_screen3::ch -(byte*) gfx_init_screen3::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen3::ch#2 ch zp[2]:22 52.33333333333333 -(byte*) gfx_init_screen3::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen3::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen3::ch#2 ch zp[2]:17 52.33333333333333 +(byte*) gfx_init_screen3::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen3::cx (byte) gfx_init_screen3::cx#1 reg byte x 151.5 (byte) gfx_init_screen3::cx#2 reg byte x 43.285714285714285 (byte) gfx_init_screen3::cy -(byte) gfx_init_screen3::cy#1 cy zp[1]:16 16.5 -(byte) gfx_init_screen3::cy#4 cy zp[1]:16 12.299999999999999 +(byte) gfx_init_screen3::cy#1 cy zp[1]:15 16.5 +(byte) gfx_init_screen3::cy#4 cy zp[1]:15 12.299999999999999 (void()) gfx_init_screen4() (label) gfx_init_screen4::@1 (label) gfx_init_screen4::@2 (label) gfx_init_screen4::@3 (label) gfx_init_screen4::@return (byte*) gfx_init_screen4::ch -(byte*) gfx_init_screen4::ch#1 ch zp[2]:14 42.599999999999994 -(byte*) gfx_init_screen4::ch#2 ch zp[2]:14 157.0 -(byte*) gfx_init_screen4::ch#3 ch zp[2]:14 22.0 +(byte*) gfx_init_screen4::ch#1 ch zp[2]:13 42.599999999999994 +(byte*) gfx_init_screen4::ch#2 ch zp[2]:13 157.0 +(byte*) gfx_init_screen4::ch#3 ch zp[2]:13 22.0 (byte) gfx_init_screen4::cx (byte) gfx_init_screen4::cx#1 reg byte x 151.5 (byte) gfx_init_screen4::cx#2 reg byte x 67.33333333333333 (byte) gfx_init_screen4::cy -(byte) gfx_init_screen4::cy#1 cy zp[1]:13 16.5 -(byte) gfx_init_screen4::cy#4 cy zp[1]:13 3.6666666666666665 +(byte) gfx_init_screen4::cy#1 cy zp[1]:12 16.5 +(byte) gfx_init_screen4::cy#4 cy zp[1]:12 3.6666666666666665 (void()) gfx_init_vic_bitmap() (label) gfx_init_vic_bitmap::@1 (label) gfx_init_vic_bitmap::@2 @@ -27881,8 +27722,8 @@ FINAL SYMBOL TABLE (label) gfx_init_vic_bitmap::@4 (label) gfx_init_vic_bitmap::@return (byte) gfx_init_vic_bitmap::l -(byte) gfx_init_vic_bitmap::l#1 l zp[1]:8 22.0 -(byte) gfx_init_vic_bitmap::l#2 l zp[1]:8 11.0 +(byte) gfx_init_vic_bitmap::l#1 l zp[1]:30 22.0 +(byte) gfx_init_vic_bitmap::l#2 l zp[1]:30 11.0 (const byte) gfx_init_vic_bitmap::lines_cnt = (byte) 9 (const byte*) gfx_init_vic_bitmap::lines_x[] = { (byte) 0, (byte) $ff, (byte) $ff, (byte) 0, (byte) 0, (byte) $80, (byte) $ff, (byte) $80, (byte) 0, (byte) $80 } (const byte*) gfx_init_vic_bitmap::lines_y[] = { (byte) 0, (byte) 0, (byte) $c7, (byte) $c7, (byte) 0, (byte) 0, (byte) $64, (byte) $c7, (byte) $64, (byte) 0 } @@ -27890,9 +27731,9 @@ FINAL SYMBOL TABLE (byte~) gfx_mode::$18 reg byte a 4.0 (dword~) gfx_mode::$20 zp[4]:2 4.0 (byte~) gfx_mode::$23 reg byte a 4.0 -(word~) gfx_mode::$24 zp[2]:26 2.0 +(word~) gfx_mode::$24 zp[2]:25 2.0 (byte~) gfx_mode::$25 reg byte a 4.0 -(word~) gfx_mode::$26 zp[2]:28 4.0 +(word~) gfx_mode::$26 zp[2]:27 4.0 (byte~) gfx_mode::$27 reg byte a 4.0 (byte~) gfx_mode::$28 reg byte a 4.0 (byte~) gfx_mode::$29 reg byte a 4.0 @@ -27901,9 +27742,9 @@ FINAL SYMBOL TABLE (byte~) gfx_mode::$32 reg byte a 4.0 (dword~) gfx_mode::$34 zp[4]:2 4.0 (byte~) gfx_mode::$37 reg byte a 4.0 -(word~) gfx_mode::$38 zp[2]:22 2.0 +(word~) gfx_mode::$38 zp[2]:17 2.0 (byte~) gfx_mode::$39 reg byte a 4.0 -(word~) gfx_mode::$40 zp[2]:24 4.0 +(word~) gfx_mode::$40 zp[2]:23 4.0 (byte~) gfx_mode::$41 reg byte a 4.0 (byte~) gfx_mode::$42 reg byte a 4.0 (byte~) gfx_mode::$43 reg byte a 4.0 @@ -27912,9 +27753,9 @@ FINAL SYMBOL TABLE (byte*~) gfx_mode::$47 zp[2]:6 2.0 (word~) gfx_mode::$48 zp[2]:6 4.0 (word~) gfx_mode::$49 zp[2]:6 2.0 -(byte~) gfx_mode::$50 zp[1]:31 0.5 -(byte*~) gfx_mode::$52 zp[2]:14 2.0 -(word~) gfx_mode::$53 zp[2]:14 4.0 +(byte~) gfx_mode::$50 zp[1]:29 0.5 +(byte*~) gfx_mode::$52 zp[2]:13 2.0 +(word~) gfx_mode::$53 zp[2]:13 4.0 (byte~) gfx_mode::$54 reg byte a 4.0 (byte~) gfx_mode::$55 reg byte a 4.0 (byte~) gfx_mode::$56 reg byte a 4.0 @@ -27961,15 +27802,15 @@ FINAL SYMBOL TABLE (label) gfx_mode::@9 (label) gfx_mode::@return (byte*) gfx_mode::col -(byte*) gfx_mode::col#1 col zp[2]:11 350.5 -(byte*) gfx_mode::col#2 col zp[2]:11 1552.0 -(byte*) gfx_mode::col#3 col zp[2]:11 202.0 +(byte*) gfx_mode::col#1 col zp[2]:10 350.5 +(byte*) gfx_mode::col#2 col zp[2]:10 1552.0 +(byte*) gfx_mode::col#3 col zp[2]:10 202.0 (byte) gfx_mode::cx (byte) gfx_mode::cx#1 reg byte x 1501.5 (byte) gfx_mode::cx#2 reg byte x 500.5 (byte) gfx_mode::cy -(byte) gfx_mode::cy#1 cy zp[1]:10 151.5 -(byte) gfx_mode::cy#4 cy zp[1]:10 28.857142857142858 +(byte) gfx_mode::cy#1 cy zp[1]:9 151.5 +(byte) gfx_mode::cy#4 cy zp[1]:9 28.857142857142858 (byte) gfx_mode::dtv_control (byte) gfx_mode::dtv_control#10 reg byte x 4.0 (byte) gfx_mode::dtv_control#11 reg byte x 4.0 @@ -28022,7 +27863,7 @@ FINAL SYMBOL TABLE (byte~) keyboard_event_pressed::$1 reg byte a 4.0 (label) keyboard_event_pressed::@return (byte) keyboard_event_pressed::keycode -(byte) keyboard_event_pressed::keycode#4 keycode zp[1]:13 1.3333333333333333 +(byte) keyboard_event_pressed::keycode#4 keycode zp[1]:12 1.3333333333333333 (byte) keyboard_event_pressed::return (byte) keyboard_event_pressed::return#0 reg byte a 4.0 (byte) keyboard_event_pressed::return#1 reg byte a 4.0 @@ -28030,7 +27871,7 @@ FINAL SYMBOL TABLE (byte) keyboard_event_pressed::return#2 reg byte a 4.0 (byte) keyboard_event_pressed::return#3 reg byte a 4.0 (byte) keyboard_event_pressed::row_bits -(byte) keyboard_event_pressed::row_bits#0 row_bits zp[1]:31 2.0 +(byte) keyboard_event_pressed::row_bits#0 row_bits zp[1]:29 2.0 (void()) keyboard_event_scan() (byte~) keyboard_event_scan::$0 reg byte a 4.0 (byte~) keyboard_event_scan::$15 reg byte a 200002.0 @@ -28069,29 +27910,29 @@ FINAL SYMBOL TABLE (byte) keyboard_event_scan::event_type (byte) keyboard_event_scan::event_type#0 reg byte a 200002.0 (byte) keyboard_event_scan::keycode -(byte) keyboard_event_scan::keycode#1 keycode zp[1]:13 20002.0 -(byte) keyboard_event_scan::keycode#10 keycode zp[1]:13 31538.846153846156 -(byte) keyboard_event_scan::keycode#11 keycode zp[1]:13 5000.5 -(byte) keyboard_event_scan::keycode#13 keycode zp[1]:13 10001.0 -(byte) keyboard_event_scan::keycode#14 keycode zp[1]:13 52500.75 +(byte) keyboard_event_scan::keycode#1 keycode zp[1]:12 20002.0 +(byte) keyboard_event_scan::keycode#10 keycode zp[1]:12 31538.846153846156 +(byte) keyboard_event_scan::keycode#11 keycode zp[1]:12 5000.5 +(byte) keyboard_event_scan::keycode#13 keycode zp[1]:12 10001.0 +(byte) keyboard_event_scan::keycode#14 keycode zp[1]:12 52500.75 (byte) keyboard_event_scan::row -(byte) keyboard_event_scan::row#1 row zp[1]:10 15001.5 -(byte) keyboard_event_scan::row#2 row zp[1]:10 6000.24 +(byte) keyboard_event_scan::row#1 row zp[1]:9 15001.5 +(byte) keyboard_event_scan::row#2 row zp[1]:9 6000.24 (byte) keyboard_event_scan::row_scan -(byte) keyboard_event_scan::row_scan#0 row_scan zp[1]:31 12778.055555555557 +(byte) keyboard_event_scan::row_scan#0 row_scan zp[1]:29 12778.055555555557 (const byte*) keyboard_events[(number) 8] = { fill( 8, 0) } (byte) keyboard_events_size -(byte) keyboard_events_size#1 keyboard_events_size zp[1]:8 200002.0 -(byte) keyboard_events_size#100 keyboard_events_size zp[1]:8 882.6176470588235 -(byte) keyboard_events_size#105 keyboard_events_size zp[1]:8 102001.2 -(byte) keyboard_events_size#106 keyboard_events_size zp[1]:8 4286.428571428572 -(byte) keyboard_events_size#18 keyboard_events_size zp[1]:8 81000.90000000001 -(byte) keyboard_events_size#2 keyboard_events_size zp[1]:8 200002.0 -(byte) keyboard_events_size#24 keyboard_events_size zp[1]:8 6.766666666666667 -(byte) keyboard_events_size#27 keyboard_events_size zp[1]:8 0.3333333333333333 -(byte) keyboard_events_size#4 keyboard_events_size zp[1]:8 3.0 -(byte) keyboard_events_size#47 keyboard_events_size zp[1]:8 73.73333333333335 -(byte) keyboard_events_size#97 keyboard_events_size zp[1]:8 105.0 +(byte) keyboard_events_size#1 keyboard_events_size zp[1]:30 200002.0 +(byte) keyboard_events_size#100 keyboard_events_size zp[1]:30 882.6176470588235 +(byte) keyboard_events_size#105 keyboard_events_size zp[1]:30 102001.2 +(byte) keyboard_events_size#106 keyboard_events_size zp[1]:30 4286.428571428572 +(byte) keyboard_events_size#18 keyboard_events_size zp[1]:30 81000.90000000001 +(byte) keyboard_events_size#2 keyboard_events_size zp[1]:30 200002.0 +(byte) keyboard_events_size#24 keyboard_events_size zp[1]:30 6.766666666666667 +(byte) keyboard_events_size#27 keyboard_events_size zp[1]:30 0.3333333333333333 +(byte) keyboard_events_size#4 keyboard_events_size zp[1]:30 3.0 +(byte) keyboard_events_size#47 keyboard_events_size zp[1]:30 65.05882352941177 +(byte) keyboard_events_size#97 keyboard_events_size zp[1]:30 105.0 (void()) keyboard_init() (label) keyboard_init::@return (const byte*) keyboard_matrix_col_bitmask[(number) 8] = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } @@ -28126,16 +27967,16 @@ FINAL SYMBOL TABLE (byte) memset::c (const byte) memset::c#0 c = (byte) ' ' (byte*) memset::dst -(byte*) memset::dst#1 dst zp[2]:11 202.0 -(byte*) memset::dst#2 dst zp[2]:11 135.33333333333331 -(byte*) memset::dst#4 dst zp[2]:11 4.0 +(byte*) memset::dst#1 dst zp[2]:10 202.0 +(byte*) memset::dst#2 dst zp[2]:10 135.33333333333331 +(byte*) memset::dst#4 dst zp[2]:10 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp[2]:28 17.166666666666664 +(byte*) memset::end#0 end zp[2]:17 17.166666666666664 (word) memset::num (const word) memset::num#0 num = (word) $3e8 (void*) memset::return (void*) memset::str -(void*) memset::str#0 str zp[2]:11 0.6666666666666666 +(void*) memset::str#0 str zp[2]:10 0.6666666666666666 (const byte*) preset_8bpppixelcell[] = { (byte) $a, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) $b, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte*) preset_chunky[] = { (byte) 7, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 6, (byte) 0, (byte) 0, (byte) 0, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte*) preset_ecmchar[] = { (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 2, (byte) 0, (byte) 5, (byte) 0, (byte) 6 } @@ -28148,19 +27989,19 @@ FINAL SYMBOL TABLE (const byte*) preset_stdchar[] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte*) preset_twoplane[] = { (byte) 6, (byte) 1, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 7, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 7, (byte) 0, (byte) $d, (byte) 4, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (byte*) print_char_cursor -(byte*) print_char_cursor#1 print_char_cursor zp[2]:11 2002.0 -(byte*) print_char_cursor#20 print_char_cursor zp[2]:11 821.0 -(byte*) print_char_cursor#22 print_char_cursor zp[2]:11 102.0 -(byte*) print_char_cursor#38 print_char_cursor zp[2]:11 572.0 -(byte*) print_char_cursor#67 print_char_cursor zp[2]:11 4.0 -(byte*) print_char_cursor#68 print_char_cursor zp[2]:11 202.0 +(byte*) print_char_cursor#1 print_char_cursor zp[2]:10 2002.0 +(byte*) print_char_cursor#20 print_char_cursor zp[2]:10 821.0 +(byte*) print_char_cursor#22 print_char_cursor zp[2]:10 102.0 +(byte*) print_char_cursor#38 print_char_cursor zp[2]:10 572.0 +(byte*) print_char_cursor#67 print_char_cursor zp[2]:10 4.0 +(byte*) print_char_cursor#68 print_char_cursor zp[2]:10 202.0 (void()) print_cls() (label) print_cls::@return (const byte*) print_hextab[] = (byte*) "0123456789abcdef"z (byte*) print_line_cursor -(byte*) print_line_cursor#2 print_line_cursor zp[2]:14 8.749999999999998 -(byte*) print_line_cursor#21 print_line_cursor zp[2]:14 2004.0 -(byte*) print_line_cursor#22 print_line_cursor zp[2]:14 641.0 +(byte*) print_line_cursor#2 print_line_cursor zp[2]:13 8.749999999999998 +(byte*) print_line_cursor#21 print_line_cursor zp[2]:13 2004.0 +(byte*) print_line_cursor#22 print_line_cursor zp[2]:13 641.0 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -28168,14 +28009,14 @@ FINAL SYMBOL TABLE (void()) print_set_screen((byte*) print_set_screen::screen) (label) print_set_screen::@return (byte*) print_set_screen::screen -(byte*) print_set_screen::screen#2 screen zp[2]:14 0.26666666666666666 +(byte*) print_set_screen::screen#2 screen zp[2]:13 0.26666666666666666 (void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) (label) print_str_at::@1 (label) print_str_at::@2 (label) print_str_at::@return (byte*) print_str_at::at -(byte*) print_str_at::at#0 at zp[2]:11 1001.0 -(byte*) print_str_at::at#2 at zp[2]:11 1001.0 +(byte*) print_str_at::at#0 at zp[2]:10 1001.0 +(byte*) print_str_at::at#2 at zp[2]:10 1001.0 (byte*) print_str_at::str (byte*) print_str_at::str#0 str zp[2]:6 2002.0 (byte*) print_str_at::str#1 str zp[2]:6 2.0 @@ -28255,27 +28096,26 @@ zp[2]:6 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] -zp[1]:8 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] -zp[1]:9 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +zp[1]:8 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] -zp[1]:10 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] +zp[1]:9 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] -zp[2]:11 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] +zp[2]:10 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] -zp[1]:13 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 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[2]:14 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] +zp[1]:12 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 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[2]:13 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] reg byte x [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] reg byte x [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -zp[1]:16 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +zp[1]:15 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] -zp[1]:17 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] +zp[1]:16 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] reg byte a [ gfx_mode::$18 ] reg byte x [ gfx_mode::plane_a_offs#0 ] @@ -28330,7 +28170,7 @@ reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ form_control::return#0 ] reg byte a [ form_mode::$11 ] reg byte a [ apply_preset::idx#0 ] -reg byte a [ form_field_ptr::y#0 ] +reg byte y [ form_field_ptr::y#0 ] reg byte a [ form_control::$12 ] reg byte a [ keyboard_event_get::return#4 ] reg byte a [ form_control::key_event#0 ] @@ -28341,14 +28181,14 @@ reg byte a [ form_control::$13 ] reg byte a [ form_set_screen::$0 ] reg byte a [ form_set_screen::$1 ] reg byte a [ print_str_lines::ch#0 ] -zp[4]:18 [ gfx_init_plane_fill::$0 ] -zp[2]:22 [ gfx_init_plane_fill::$1 gfx_mode::$38 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] +zp[2]:17 [ memset::end#0 gfx_mode::$38 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] +zp[4]:19 [ gfx_init_plane_fill::$0 ] +zp[2]:23 [ gfx_init_plane_fill::$1 gfx_mode::$40 ] reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ] reg byte a [ gfx_init_plane_horisontal2::$2 ] reg byte a [ gfx_init_plane_horisontal2::row#0 ] reg byte a [ gfx_init_plane_horisontal::$2 ] reg byte a [ gfx_init_plane_charset8::$2 ] -zp[2]:24 [ gfx_init_plane_8bppchunky::$5 gfx_mode::$40 ] reg byte a [ gfx_init_plane_8bppchunky::c#0 ] reg byte x [ bitmap_line::x1#0 ] reg byte y [ bitmap_line::yd#2 ] @@ -28356,8 +28196,8 @@ reg byte y [ bitmap_line::yd#1 ] reg byte y [ bitmap_line::yd#10 ] reg byte y [ bitmap_line::yd#11 ] reg byte x [ bitmap_line_xdyi::$6 ] -zp[2]:26 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 form_field_ptr::line#0 gfx_mode::$24 ] -zp[2]:28 [ bitmap_plot::plotter_y#0 memset::end#0 gfx_mode::$26 ] +zp[2]:25 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 gfx_init_plane_8bppchunky::$5 form_field_ptr::line#0 gfx_mode::$24 ] +zp[2]:27 [ bitmap_plot::plotter_y#0 form_field_ptr::return#0 form_field_ptr::return#3 form_control::field#0 gfx_mode::$26 ] reg byte a [ bitmap_plot::$1 ] reg byte a [ bitmap_line_ydxi::$6 ] reg byte x [ bitmap_line_xdyd::$6 ] @@ -28367,7 +28207,7 @@ reg byte a [ bitmap_init::$7 ] reg byte a [ bitmap_init::$8 ] reg byte a [ bitmap_init::$9 ] reg byte a [ gfx_init_screen3::$0 ] -zp[1]:30 [ gfx_init_screen3::$1 form_field_ptr::x#0 ] +zp[1]:29 [ gfx_init_screen3::$1 bitmap_init::$10 form_field_ptr::x#0 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] reg byte a [ gfx_init_screen3::$2 ] reg byte a [ gfx_init_screen3::$3 ] reg byte a [ gfx_init_screen2::$0 ] @@ -28377,13 +28217,13 @@ reg byte a [ gfx_init_screen2::$4 ] reg byte a [ gfx_init_screen1::$0 ] reg byte a [ gfx_init_screen1::$1 ] reg byte a [ gfx_init_screen0::$0 ] -zp[1]:31 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 bitmap_init::$10 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] +zp[1]:30 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] reg byte a [ gfx_init_screen0::$2 ] reg byte a [ gfx_init_screen0::$3 ] FINAL ASSEMBLER -Score: 10133385 +Score: 10133395 // File Comments // Interactive Explorer for C64DTV Screen Modes @@ -28555,15 +28395,15 @@ Score: 10133385 .const FORM_CURSOR_BLINK = $28 // Number of form fields .const form_fields_cnt = $24 - .label print_char_cursor = $b - .label print_line_cursor = $e + .label print_char_cursor = $a + .label print_line_cursor = $d // Keyboard event buffer size. The number of events currently in the event buffer - .label keyboard_events_size = 8 + .label keyboard_events_size = $1e // Counts down to blink for form cursor (it is inversed in the lower half) // Always blink cursor in new field - .label form_cursor_count = $10 + .label form_cursor_count = $f // Current selected field in the form - .label form_field_idx = 9 + .label form_field_idx = 8 // @begin // [1] phi from @begin to @1 [phi:@begin->@1] // @1 @@ -28597,7 +28437,7 @@ main: { // main::@3 // gfx_init() // [10] call gfx_init - // [446] phi from main::@3 to gfx_init [phi:main::@3->gfx_init] + // [449] phi from main::@3 to gfx_init [phi:main::@3->gfx_init] jsr gfx_init // [11] phi from main::@3 to main::@1 [phi:main::@3->main::@1] // [11] phi (byte) form_field_idx#1 = (byte) 0 [phi:main::@3->main::@1#0] -- vbuz1=vbuc1 @@ -28631,22 +28471,22 @@ main: { // Change graphics mode to show the selected graphics mode gfx_mode: { .label __20 = 2 - .label __24 = $1a - .label __26 = $1c + .label __24 = $19 + .label __26 = $1b .label __34 = 2 - .label __38 = $16 - .label __40 = $18 + .label __38 = $11 + .label __40 = $17 .label __47 = 6 .label __48 = 6 .label __49 = 6 - .label __50 = $1f - .label __52 = $e - .label __53 = $e + .label __50 = $1d + .label __52 = $d + .label __53 = $d .label plane_a = 2 .label plane_b = 2 .label vic_colors = 6 - .label col = $b - .label cy = $a + .label col = $a + .label cy = 9 // if(*form_ctrl_line!=0) // [16] if(*((const byte*) form_ctrl_line)==(byte) 0) goto gfx_mode::@1 -- _deref_pbuc1_eq_0_then_la1 lda form_ctrl_line @@ -29304,9 +29144,9 @@ keyboard_event_get: { // Handles debounce and only generates events when the status of a key changes. // Also stores current status of modifiers in keyboard_modifiers. keyboard_event_scan: { - .label row_scan = $1f - .label keycode = $d - .label row = $a + .label row_scan = $1d + .label keycode = $c + .label row = 9 // [158] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] // [158] phi (byte) keyboard_events_size#106 = (byte) keyboard_events_size#97 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy // [158] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 @@ -29550,10 +29390,10 @@ keyboard_event_scan: { // keyboard_event_pressed // Determine if a specific key is currently pressed based on the last keyboard_event_scan() // Returns 0 is not pressed and non-0 if pressed -// keyboard_event_pressed(byte zp($d) keycode) +// keyboard_event_pressed(byte zp($c) keycode) keyboard_event_pressed: { - .label row_bits = $1f - .label keycode = $d + .label row_bits = $1d + .label keycode = $c // keycode>>3 // [212] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#4 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda.z keycode @@ -29678,7 +29518,7 @@ get_vic_screen: { // Get the VIC charset/bitmap address from the index // get_vic_charset(byte register(A) idx) get_vic_charset: { - .label return = $e + .label return = $d // if(idx==0) // [229] if((byte) get_vic_charset::idx#0==(byte) 0) goto get_vic_charset::@return -- vbuaa_eq_0_then_la1 cmp #0 @@ -29987,11 +29827,11 @@ get_plane: { // form_mode // Show the form - and let the user change values form_mode: { - .label preset_current = $11 + .label preset_current = $10 // print_set_screen(COLS) // [253] call print_set_screen - // [444] phi from form_mode to print_set_screen [phi:form_mode->print_set_screen] - // [444] phi (byte*) print_set_screen::screen#2 = (const byte*) COLS [phi:form_mode->print_set_screen#0] -- pbuz1=pbuc1 + // [447] phi from form_mode to print_set_screen [phi:form_mode->print_set_screen] + // [447] phi (byte*) print_set_screen::screen#2 = (const byte*) COLS [phi:form_mode->print_set_screen#0] -- pbuz1=pbuc1 lda #COLS @@ -30006,8 +29846,8 @@ form_mode: { // form_mode::@9 // print_str_lines(FORM_COLS) // [257] call print_str_lines - // [412] phi from form_mode::@9 to print_str_lines [phi:form_mode::@9->print_str_lines] - // [412] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_COLS [phi:form_mode::@9->print_str_lines#0] -- pbuz1=pbuc1 + // [415] phi from form_mode::@9 to print_str_lines [phi:form_mode::@9->print_str_lines] + // [415] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_COLS [phi:form_mode::@9->print_str_lines#0] -- pbuz1=pbuc1 lda #FORM_COLS @@ -30017,8 +29857,8 @@ form_mode: { // form_mode::@10 // print_set_screen(FORM_SCREEN) // [259] call print_set_screen - // [444] phi from form_mode::@10 to print_set_screen [phi:form_mode::@10->print_set_screen] - // [444] phi (byte*) print_set_screen::screen#2 = (const byte*) FORM_SCREEN [phi:form_mode::@10->print_set_screen#0] -- pbuz1=pbuc1 + // [447] phi from form_mode::@10 to print_set_screen [phi:form_mode::@10->print_set_screen] + // [447] phi (byte*) print_set_screen::screen#2 = (const byte*) FORM_SCREEN [phi:form_mode::@10->print_set_screen#0] -- pbuz1=pbuc1 lda #FORM_SCREEN @@ -30033,8 +29873,8 @@ form_mode: { // form_mode::@12 // print_str_lines(FORM_TEXT) // [263] call print_str_lines - // [412] phi from form_mode::@12 to print_str_lines [phi:form_mode::@12->print_str_lines] - // [412] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_TEXT [phi:form_mode::@12->print_str_lines#0] -- pbuz1=pbuc1 + // [415] phi from form_mode::@12 to print_str_lines [phi:form_mode::@12->print_str_lines] + // [415] phi (byte*) print_str_lines::str#5 = (const byte*) FORM_TEXT [phi:form_mode::@12->print_str_lines#0] -- pbuz1=pbuc1 lda #FORM_TEXT @@ -30044,7 +29884,7 @@ form_mode: { // form_mode::@13 // form_set_screen(FORM_SCREEN) // [265] call form_set_screen - // [402] phi from form_mode::@13 to form_set_screen [phi:form_mode::@13->form_set_screen] + // [405] phi from form_mode::@13 to form_set_screen [phi:form_mode::@13->form_set_screen] jsr form_set_screen // [266] phi from form_mode::@13 to form_mode::@14 [phi:form_mode::@13->form_mode::@14] // form_mode::@14 @@ -30396,9 +30236,9 @@ render_preset_name: { } // print_str_at // Print a string at a specific screen position -// print_str_at(byte* zp(6) str, byte* zp($b) at) +// print_str_at(byte* zp(6) str, byte* zp($a) at) print_str_at: { - .label at = $b + .label at = $a .label str = 6 // [322] phi from print_str_at to print_str_at::@1 [phi:print_str_at->print_str_at::@1] // [322] phi (byte*) print_str_at::at#2 = (const byte*) FORM_SCREEN+(byte)(number) $28*(number) 2+(byte) $a [phi:print_str_at->print_str_at::@1#0] -- pbuz1=pbuc1 @@ -30485,14 +30325,14 @@ form_render_values: { // field_idx is the index of the field to get the screen address for // form_field_ptr(byte register(X) field_idx) form_field_ptr: { - .label line = $1a - .label x = $1e + .label line = $19 + .label x = $1d + .label return = $1b // y = form_fields_y[field_idx] - // [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) -- vbuaa=pbuc1_derefidx_vbuxx - lda form_fields_y,x + // [337] (byte) form_field_ptr::y#0 ← *((const byte*) form_fields_y + (byte) form_field_ptr::field_idx#2) -- vbuyy=pbuc1_derefidx_vbuxx + ldy form_fields_y,x // (byte*) { form_line_hi[y], form_line_lo[y] } - // [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) -- vwuz1=pbuc1_derefidx_vbuaa_word_pbuc2_derefidx_vbuaa - tay + // [338] (word) form_field_ptr::line#0 ← *((const byte*) form_line_hi + (byte) form_field_ptr::y#0) w= *((const byte*) form_line_lo + (byte) form_field_ptr::y#0) -- vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy lda form_line_hi,y sta.z line+1 lda form_line_lo,y @@ -30501,9 +30341,17 @@ form_field_ptr: { // [339] (byte) form_field_ptr::x#0 ← *((const byte*) form_fields_x + (byte) form_field_ptr::field_idx#2) -- vbuz1=pbuc1_derefidx_vbuxx lda form_fields_x,x sta.z x + // line+x + // [340] (byte*) form_field_ptr::return#0 ← (byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0 -- pbuz1=pbuz2_plus_vbuz3 + clc + adc.z line + sta.z return + lda #0 + adc.z line+1 + sta.z return+1 // form_field_ptr::@return // } - // [340] return + // [341] return rts } // apply_preset @@ -30511,210 +30359,215 @@ form_field_ptr: { // idx is the ID of the preset // apply_preset(byte register(A) idx) apply_preset: { - .label preset = $e + .label preset = $d // if(idx==0) - // [341] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 -- vbuaa_eq_0_then_la1 + // [342] if((byte) apply_preset::idx#0==(byte) 0) goto apply_preset::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq b1 // apply_preset::@3 // if(idx==1) - // [342] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [343] if((byte) apply_preset::idx#0==(byte) 1) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #1 beq b4 // apply_preset::@4 // if(idx==2) - // [343] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [344] if((byte) apply_preset::idx#0==(byte) 2) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #2 beq b5 // apply_preset::@5 // if(idx==3) - // [344] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [345] if((byte) apply_preset::idx#0==(byte) 3) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #3 beq b6 // apply_preset::@6 // if(idx==4) - // [345] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [346] if((byte) apply_preset::idx#0==(byte) 4) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #4 beq b7 // apply_preset::@7 // if(idx==5) - // [346] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [347] if((byte) apply_preset::idx#0==(byte) 5) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #5 beq b8 // apply_preset::@8 // if(idx==6) - // [347] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [348] if((byte) apply_preset::idx#0==(byte) 6) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #6 beq b9 // apply_preset::@9 // if(idx==7) - // [348] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [349] if((byte) apply_preset::idx#0==(byte) 7) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #7 beq b10 // apply_preset::@10 // if(idx==8) - // [349] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [350] if((byte) apply_preset::idx#0==(byte) 8) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #8 beq b2 // apply_preset::@11 // if(idx==9) - // [350] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 + // [351] if((byte) apply_preset::idx#0==(byte) 9) goto apply_preset::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #9 beq b3 // apply_preset::@12 // if(idx==10) - // [351] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 -- vbuaa_eq_vbuc1_then_la1 + // [352] if((byte) apply_preset::idx#0==(byte) $a) goto apply_preset::@1 -- vbuaa_eq_vbuc1_then_la1 cmp #$a beq __b1 - // [353] phi from apply_preset apply_preset::@12 to apply_preset::@2 [phi:apply_preset/apply_preset::@12->apply_preset::@2] + // [354] phi from apply_preset apply_preset::@12 to apply_preset::@2 [phi:apply_preset/apply_preset::@12->apply_preset::@2] b1: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdchar [phi:apply_preset/apply_preset::@12->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdchar [phi:apply_preset/apply_preset::@12->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_stdchar sta.z preset+1 jmp __b2 - // [352] phi from apply_preset::@12 to apply_preset::@1 [phi:apply_preset::@12->apply_preset::@1] + // [353] phi from apply_preset::@12 to apply_preset::@1 [phi:apply_preset::@12->apply_preset::@1] // apply_preset::@1 __b1: - // [353] phi from apply_preset::@1 to apply_preset::@2 [phi:apply_preset::@1->apply_preset::@2] - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_8bpppixelcell [phi:apply_preset::@1->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi from apply_preset::@1 to apply_preset::@2 [phi:apply_preset::@1->apply_preset::@2] + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_8bpppixelcell [phi:apply_preset::@1->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_8bpppixelcell sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@10 to apply_preset::@2 [phi:apply_preset::@10->apply_preset::@2] + // [354] phi from apply_preset::@10 to apply_preset::@2 [phi:apply_preset::@10->apply_preset::@2] b2: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred [phi:apply_preset::@10->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred [phi:apply_preset::@10->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_sixsfred sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@11 to apply_preset::@2 [phi:apply_preset::@11->apply_preset::@2] + // [354] phi from apply_preset::@11 to apply_preset::@2 [phi:apply_preset::@11->apply_preset::@2] b3: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred2 [phi:apply_preset::@11->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_sixsfred2 [phi:apply_preset::@11->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_sixsfred2 sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@3 to apply_preset::@2 [phi:apply_preset::@3->apply_preset::@2] + // [354] phi from apply_preset::@3 to apply_preset::@2 [phi:apply_preset::@3->apply_preset::@2] b4: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_ecmchar [phi:apply_preset::@3->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_ecmchar [phi:apply_preset::@3->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_ecmchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@4 to apply_preset::@2 [phi:apply_preset::@4->apply_preset::@2] + // [354] phi from apply_preset::@4 to apply_preset::@2 [phi:apply_preset::@4->apply_preset::@2] b5: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdbm [phi:apply_preset::@4->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_stdbm [phi:apply_preset::@4->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_stdbm sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@5 to apply_preset::@2 [phi:apply_preset::@5->apply_preset::@2] + // [354] phi from apply_preset::@5 to apply_preset::@2 [phi:apply_preset::@5->apply_preset::@2] b6: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_mcbm [phi:apply_preset::@5->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_mcbm [phi:apply_preset::@5->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_mcbm sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@6 to apply_preset::@2 [phi:apply_preset::@6->apply_preset::@2] + // [354] phi from apply_preset::@6 to apply_preset::@2 [phi:apply_preset::@6->apply_preset::@2] b7: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_stdchar [phi:apply_preset::@6->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_stdchar [phi:apply_preset::@6->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_hi_stdchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@7 to apply_preset::@2 [phi:apply_preset::@7->apply_preset::@2] + // [354] phi from apply_preset::@7 to apply_preset::@2 [phi:apply_preset::@7->apply_preset::@2] b8: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_ecmchar [phi:apply_preset::@7->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_hi_ecmchar [phi:apply_preset::@7->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_hi_ecmchar sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@8 to apply_preset::@2 [phi:apply_preset::@8->apply_preset::@2] + // [354] phi from apply_preset::@8 to apply_preset::@2 [phi:apply_preset::@8->apply_preset::@2] b9: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_twoplane [phi:apply_preset::@8->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_twoplane [phi:apply_preset::@8->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_twoplane sta.z preset+1 jmp __b2 - // [353] phi from apply_preset::@9 to apply_preset::@2 [phi:apply_preset::@9->apply_preset::@2] + // [354] phi from apply_preset::@9 to apply_preset::@2 [phi:apply_preset::@9->apply_preset::@2] b10: - // [353] phi (byte*) apply_preset::preset#15 = (const byte*) preset_chunky [phi:apply_preset::@9->apply_preset::@2#0] -- pbuz1=pbuc1 + // [354] phi (byte*) apply_preset::preset#15 = (const byte*) preset_chunky [phi:apply_preset::@9->apply_preset::@2#0] -- pbuz1=pbuc1 lda #preset_chunky sta.z preset+1 // apply_preset::@2 __b2: - // [354] phi from apply_preset::@2 to apply_preset::@13 [phi:apply_preset::@2->apply_preset::@13] - // [354] phi (byte) apply_preset::i#2 = (byte) 0 [phi:apply_preset::@2->apply_preset::@13#0] -- vbuyy=vbuc1 + // [355] phi from apply_preset::@2 to apply_preset::@13 [phi:apply_preset::@2->apply_preset::@13] + // [355] phi (byte) apply_preset::i#2 = (byte) 0 [phi:apply_preset::@2->apply_preset::@13#0] -- vbuyy=vbuc1 ldy #0 // Copy preset values into the fields // apply_preset::@13 __b13: // for( byte i=0; i != form_fields_cnt; i++) - // [355] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1 + // [356] if((byte) apply_preset::i#2!=(const byte) form_fields_cnt) goto apply_preset::@14 -- vbuyy_neq_vbuc1_then_la1 cpy #form_fields_cnt bne __b14 // apply_preset::@return // } - // [356] return + // [357] return rts // apply_preset::@14 __b14: // form_fields_val[i] = preset[i] - // [357] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) -- pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuyy + // [358] *((const byte*) form_fields_val + (byte) apply_preset::i#2) ← *((byte*) apply_preset::preset#15 + (byte) apply_preset::i#2) -- pbuc1_derefidx_vbuyy=pbuz1_derefidx_vbuyy lda (preset),y sta form_fields_val,y // for( byte i=0; i != form_fields_cnt; i++) - // [358] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 -- vbuyy=_inc_vbuyy + // [359] (byte) apply_preset::i#1 ← ++ (byte) apply_preset::i#2 -- vbuyy=_inc_vbuyy iny - // [354] phi from apply_preset::@14 to apply_preset::@13 [phi:apply_preset::@14->apply_preset::@13] - // [354] phi (byte) apply_preset::i#2 = (byte) apply_preset::i#1 [phi:apply_preset::@14->apply_preset::@13#0] -- register_copy + // [355] phi from apply_preset::@14 to apply_preset::@13 [phi:apply_preset::@14->apply_preset::@13] + // [355] phi (byte) apply_preset::i#2 = (byte) apply_preset::i#1 [phi:apply_preset::@14->apply_preset::@13#0] -- register_copy jmp __b13 } // form_control // Reads keyboard and allows the user to navigate and change the fields of the form // Returns 0 if space is not pressed, non-0 if space is pressed form_control: { + .label field = $1b // form_field_ptr(form_field_idx) - // [359] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 -- vbuxx=vbuz1 + // [360] (byte) form_field_ptr::field_idx#1 ← (byte) form_field_idx#28 -- vbuxx=vbuz1 ldx.z form_field_idx - // [360] call form_field_ptr + // [361] call form_field_ptr // [336] phi from form_control to form_field_ptr [phi:form_control->form_field_ptr] // [336] phi (byte) form_field_ptr::field_idx#2 = (byte) form_field_ptr::field_idx#1 [phi:form_control->form_field_ptr#0] -- register_copy jsr form_field_ptr + // form_field_ptr(form_field_idx) + // [362] (byte*) form_field_ptr::return#3 ← (byte*) form_field_ptr::return#0 // form_control::@18 + // field = form_field_ptr(form_field_idx) + // [363] (byte*) form_control::field#0 ← (byte*) form_field_ptr::return#3 // if(--form_cursor_count < 0) - // [361] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 -- vbsz1=_dec_vbsz1 + // [364] (signed byte) form_cursor_count#5 ← -- (signed byte) form_cursor_count#21 -- vbsz1=_dec_vbsz1 dec.z form_cursor_count - // [362] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 -- vbsz1_ge_0_then_la1 + // [365] if((signed byte) form_cursor_count#5>=(signed byte) 0) goto form_control::@21 -- vbsz1_ge_0_then_la1 lda.z form_cursor_count cmp #0 bpl __b1 - // [364] phi from form_control::@18 to form_control::@1 [phi:form_control::@18->form_control::@1] - // [364] phi (signed byte) form_cursor_count#15 = (const signed byte) FORM_CURSOR_BLINK [phi:form_control::@18->form_control::@1#0] -- vbsz1=vbsc1 + // [367] phi from form_control::@18 to form_control::@1 [phi:form_control::@18->form_control::@1] + // [367] phi (signed byte) form_cursor_count#15 = (const signed byte) FORM_CURSOR_BLINK [phi:form_control::@18->form_control::@1#0] -- vbsz1=vbsc1 lda #FORM_CURSOR_BLINK sta.z form_cursor_count - // [363] phi from form_control::@18 to form_control::@21 [phi:form_control::@18->form_control::@21] + // [366] phi from form_control::@18 to form_control::@21 [phi:form_control::@18->form_control::@21] // form_control::@21 - // [364] phi from form_control::@21 to form_control::@1 [phi:form_control::@21->form_control::@1] - // [364] phi (signed byte) form_cursor_count#15 = (signed byte) form_cursor_count#5 [phi:form_control::@21->form_control::@1#0] -- register_copy + // [367] phi from form_control::@21 to form_control::@1 [phi:form_control::@21->form_control::@1] + // [367] phi (signed byte) form_cursor_count#15 = (signed byte) form_cursor_count#5 [phi:form_control::@21->form_control::@1#0] -- register_copy // form_control::@1 __b1: // if(form_cursor_countform_control::@3] + // [370] *((byte*) form_control::field#0) ← (byte~) form_control::$12 -- _deref_pbuz1=vbuaa + sta (field),y + // [371] phi from form_control::@2 form_control::@7 to form_control::@3 [phi:form_control::@2/form_control::@7->form_control::@3] // form_control::@3 __b3: // keyboard_event_scan() - // [369] call keyboard_event_scan + // [372] call keyboard_event_scan // [157] phi from form_control::@3 to keyboard_event_scan [phi:form_control::@3->keyboard_event_scan] // [157] phi (byte) keyboard_events_size#97 = (byte) keyboard_events_size#47 [phi:form_control::@3->keyboard_event_scan#0] -- register_copy jsr keyboard_event_scan - // [370] phi from form_control::@3 to form_control::@19 [phi:form_control::@3->form_control::@19] + // [373] phi from form_control::@3 to form_control::@19 [phi:form_control::@3->form_control::@19] // form_control::@19 // keyboard_event_get() - // [371] call keyboard_event_get + // [374] call keyboard_event_get jsr keyboard_event_get - // [372] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 + // [375] (byte) keyboard_event_get::return#4 ← (byte) keyboard_event_get::return#2 // form_control::@20 // key_event = keyboard_event_get() - // [373] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 + // [376] (byte) form_control::key_event#0 ← (byte) keyboard_event_get::return#4 // if(key_event==KEY_CRSR_DOWN) - // [374] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -- vbuaa_neq_vbuc1_then_la1 + // [377] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_DOWN) goto form_control::@4 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_CRSR_DOWN bne __b4 // form_control::@8 // *field & $7f - // [375] (byte~) form_control::$14 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) & (byte) $7f -- vbuaa=pbuz1_derefidx_vbuz2_band_vbuc1 + // [378] (byte~) form_control::$14 ← *((byte*) form_control::field#0) & (byte) $7f -- vbuaa=_deref_pbuz1_band_vbuc1 lda #$7f - ldy.z form_field_ptr.x - and (form_field_ptr.line),y + ldy #0 + and (field),y // *field = *field & $7f - // [376] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$14 -- pbuz1_derefidx_vbuz2=vbuaa + // [379] *((byte*) form_control::field#0) ← (byte~) form_control::$14 -- _deref_pbuz1=vbuaa // Unblink the cursor - sta (form_field_ptr.line),y + sta (field),y // keyboard_modifiers&KEY_MODIFIER_SHIFT - // [377] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 + // [380] (byte~) form_control::$15 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 txa and #KEY_MODIFIER_SHIFT // if((keyboard_modifiers&KEY_MODIFIER_SHIFT)==0) - // [378] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 -- vbuaa_eq_0_then_la1 + // [381] if((byte~) form_control::$15==(byte) 0) goto form_control::@13 -- vbuaa_eq_0_then_la1 cmp #0 beq __b13 // form_control::@9 // if(--form_field_idx==$ff) - // [379] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 -- vbuz1=_dec_vbuz1 + // [382] (byte) form_field_idx#6 ← -- (byte) form_field_idx#28 -- vbuz1=_dec_vbuz1 dec.z form_field_idx - // [380] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -- vbuz1_neq_vbuc1_then_la1 + // [383] if((byte) form_field_idx#6!=(byte) $ff) goto form_control::@22 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z form_field_idx bne __b14 - // [382] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14] - // [382] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1 + // [385] phi from form_control::@9 to form_control::@14 [phi:form_control::@9->form_control::@14] + // [385] phi (byte) form_field_idx#31 = (const byte) form_fields_cnt-(byte) 1 [phi:form_control::@9->form_control::@14#0] -- vbuz1=vbuc1 lda #form_fields_cnt-1 sta.z form_field_idx - // [381] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22] + // [384] phi from form_control::@9 to form_control::@22 [phi:form_control::@9->form_control::@22] // form_control::@22 - // [382] phi from form_control::@22 form_control::@23 to form_control::@14 [phi:form_control::@22/form_control::@23->form_control::@14] - // [382] phi (byte) form_field_idx#31 = (byte) form_field_idx#6 [phi:form_control::@22/form_control::@23->form_control::@14#0] -- register_copy + // [385] phi from form_control::@22 form_control::@23 to form_control::@14 [phi:form_control::@22/form_control::@23->form_control::@14] + // [385] phi (byte) form_field_idx#31 = (byte) form_field_idx#6 [phi:form_control::@22/form_control::@23->form_control::@14#0] -- register_copy // form_control::@14 __b14: - // [383] phi from form_control::@14 to form_control::@return [phi:form_control::@14->form_control::@return] - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#31 [phi:form_control::@14->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 [phi:form_control::@14->form_control::@return#1] -- vbsz1=vbsc1 + // [386] phi from form_control::@14 to form_control::@return [phi:form_control::@14->form_control::@return] + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#31 [phi:form_control::@14->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (const signed byte) FORM_CURSOR_BLINK/(signed byte) 2 [phi:form_control::@14->form_control::@return#1] -- vbsz1=vbsc1 lda #FORM_CURSOR_BLINK/2 sta.z form_cursor_count - // [383] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@14->form_control::@return#2] -- vbuxx=vbuc1 + // [386] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@14->form_control::@return#2] -- vbuxx=vbuc1 ldx #0 // form_control::@return // } - // [384] return + // [387] return rts // form_control::@13 __b13: // if(++form_field_idx==form_fields_cnt) - // [385] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1 + // [388] (byte) form_field_idx#5 ← ++ (byte) form_field_idx#28 -- vbuz1=_inc_vbuz1 inc.z form_field_idx - // [386] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1 + // [389] if((byte) form_field_idx#5!=(const byte) form_fields_cnt) goto form_control::@23 -- vbuz1_neq_vbuc1_then_la1 lda #form_fields_cnt cmp.z form_field_idx bne __b14 - // [382] phi from form_control::@13 to form_control::@14 [phi:form_control::@13->form_control::@14] - // [382] phi (byte) form_field_idx#31 = (byte) 0 [phi:form_control::@13->form_control::@14#0] -- vbuz1=vbuc1 + // [385] phi from form_control::@13 to form_control::@14 [phi:form_control::@13->form_control::@14] + // [385] phi (byte) form_field_idx#31 = (byte) 0 [phi:form_control::@13->form_control::@14#0] -- vbuz1=vbuc1 lda #0 sta.z form_field_idx jmp __b14 - // [387] phi from form_control::@13 to form_control::@23 [phi:form_control::@13->form_control::@23] + // [390] phi from form_control::@13 to form_control::@23 [phi:form_control::@13->form_control::@23] // form_control::@23 // form_control::@4 __b4: // if(key_event==KEY_CRSR_RIGHT) - // [388] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -- vbuaa_neq_vbuc1_then_la1 + // [391] if((byte) form_control::key_event#0!=(const byte) KEY_CRSR_RIGHT) goto form_control::@5 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_CRSR_RIGHT bne __b5 // form_control::@10 // keyboard_modifiers&KEY_MODIFIER_SHIFT - // [389] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 + // [392] (byte~) form_control::$22 ← (byte) keyboard_modifiers#21 & (const byte) KEY_MODIFIER_SHIFT -- vbuaa=vbuxx_band_vbuc1 txa and #KEY_MODIFIER_SHIFT // if((keyboard_modifiers&KEY_MODIFIER_SHIFT)==0) - // [390] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 -- vbuaa_eq_0_then_la1 + // [393] if((byte~) form_control::$22==(byte) 0) goto form_control::@15 -- vbuaa_eq_0_then_la1 cmp #0 beq __b15 // form_control::@11 // if(--form_fields_val[form_field_idx]==$ff) - // [391] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 + // [394] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← -- *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_dec_pbuc1_derefidx_vbuz1 ldx.z form_field_idx dec form_fields_val,x - // [392] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 + // [395] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)!=(byte) $ff) goto form_control::@16 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 lda #$ff ldy.z form_field_idx cmp form_fields_val,y bne __b16 // form_control::@12 // form_fields_val[form_field_idx] = form_fields_max[form_field_idx] - // [393] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 + // [396] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← *((const byte*) form_fields_max + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 lda form_fields_max,y sta form_fields_val,y // form_control::@16 __b16: // *field = print_hextab[form_fields_val[form_field_idx]] - // [394] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- pbuz1_derefidx_vbuz2=pbuc1_derefidx_(pbuc2_derefidx_vbuz3) + // [397] *((byte*) form_control::field#0) ← *((const byte*) print_hextab + *((const byte*) form_fields_val + (byte) form_field_idx#28)) -- _deref_pbuz1=pbuc1_derefidx_(pbuc2_derefidx_vbuz2) // Render field value ldx.z form_field_idx ldy form_fields_val,x lda print_hextab,y - ldy.z form_field_ptr.x - sta (form_field_ptr.line),y - // [383] phi from form_control::@16 form_control::@6 to form_control::@return [phi:form_control::@16/form_control::@6->form_control::@return] + ldy #0 + sta (field),y + // [386] phi from form_control::@16 form_control::@6 to form_control::@return [phi:form_control::@16/form_control::@6->form_control::@return] b1: - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@16/form_control::@6->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@16/form_control::@6->form_control::@return#1] -- register_copy - // [383] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@16/form_control::@6->form_control::@return#2] -- vbuxx=vbuc1 + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@16/form_control::@6->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@16/form_control::@6->form_control::@return#1] -- register_copy + // [386] phi (byte) form_control::return#2 = (byte) 0 [phi:form_control::@16/form_control::@6->form_control::@return#2] -- vbuxx=vbuc1 ldx #0 rts // form_control::@15 __b15: // if(++form_fields_val[form_field_idx]>form_fields_max[form_field_idx]) - // [395] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 + // [398] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← ++ *((const byte*) form_fields_val + (byte) form_field_idx#28) -- pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 ldx.z form_field_idx inc form_fields_val,x - // [396] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 -- pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 + // [399] if(*((const byte*) form_fields_val + (byte) form_field_idx#28)<=*((const byte*) form_fields_max + (byte) form_field_idx#28)) goto form_control::@16 -- pbuc1_derefidx_vbuz1_le_pbuc2_derefidx_vbuz1_then_la1 ldy.z form_field_idx lda form_fields_max,y cmp form_fields_val,y bcs __b16 // form_control::@17 // form_fields_val[form_field_idx] = 0 - // [397] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [400] *((const byte*) form_fields_val + (byte) form_field_idx#28) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 sta form_fields_val,y jmp __b16 // form_control::@5 __b5: // if(key_event==KEY_SPACE) - // [398] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -- vbuaa_neq_vbuc1_then_la1 + // [401] if((byte) form_control::key_event#0!=(const byte) KEY_SPACE) goto form_control::@6 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_SPACE bne b1 - // [383] phi from form_control::@5 to form_control::@return [phi:form_control::@5->form_control::@return] - // [383] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@5->form_control::@return#0] -- register_copy - // [383] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy - // [383] phi (byte) form_control::return#2 = (byte) $ff [phi:form_control::@5->form_control::@return#2] -- vbuxx=vbuc1 + // [386] phi from form_control::@5 to form_control::@return [phi:form_control::@5->form_control::@return] + // [386] phi (byte) form_field_idx#18 = (byte) form_field_idx#28 [phi:form_control::@5->form_control::@return#0] -- register_copy + // [386] phi (signed byte) form_cursor_count#16 = (signed byte) form_cursor_count#15 [phi:form_control::@5->form_control::@return#1] -- register_copy + // [386] phi (byte) form_control::return#2 = (byte) $ff [phi:form_control::@5->form_control::@return#2] -- vbuxx=vbuc1 ldx #$ff rts - // [399] phi from form_control::@5 to form_control::@6 [phi:form_control::@5->form_control::@6] + // [402] phi from form_control::@5 to form_control::@6 [phi:form_control::@5->form_control::@6] // form_control::@6 // form_control::@2 __b2: // *field | $80 - // [400] (byte~) form_control::$13 ← *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) | (byte) $80 -- vbuaa=pbuz1_derefidx_vbuz2_bor_vbuc1 + // [403] (byte~) form_control::$13 ← *((byte*) form_control::field#0) | (byte) $80 -- vbuaa=_deref_pbuz1_bor_vbuc1 lda #$80 - ldy.z form_field_ptr.x - ora (form_field_ptr.line),y + ldy #0 + ora (field),y // *field = *field | $80 - // [401] *((byte*)(word) form_field_ptr::line#0 + (byte) form_field_ptr::x#0) ← (byte~) form_control::$13 -- pbuz1_derefidx_vbuz2=vbuaa - sta (form_field_ptr.line),y + // [404] *((byte*) form_control::field#0) ← (byte~) form_control::$13 -- _deref_pbuz1=vbuaa + sta (field),y jmp __b3 } // form_set_screen @@ -30912,33 +30765,33 @@ form_control: { // screen is the start address of the screen to use form_set_screen: { .label line = 6 - // [403] phi from form_set_screen to form_set_screen::@1 [phi:form_set_screen->form_set_screen::@1] - // [403] phi (byte) form_set_screen::y#2 = (byte) 0 [phi:form_set_screen->form_set_screen::@1#0] -- vbuxx=vbuc1 + // [406] phi from form_set_screen to form_set_screen::@1 [phi:form_set_screen->form_set_screen::@1] + // [406] phi (byte) form_set_screen::y#2 = (byte) 0 [phi:form_set_screen->form_set_screen::@1#0] -- vbuxx=vbuc1 ldx #0 - // [403] phi (byte*) form_set_screen::line#2 = (const byte*) FORM_SCREEN [phi:form_set_screen->form_set_screen::@1#1] -- pbuz1=pbuc1 + // [406] phi (byte*) form_set_screen::line#2 = (const byte*) FORM_SCREEN [phi:form_set_screen->form_set_screen::@1#1] -- pbuz1=pbuc1 lda #FORM_SCREEN sta.z line+1 - // [403] phi from form_set_screen::@1 to form_set_screen::@1 [phi:form_set_screen::@1->form_set_screen::@1] - // [403] phi (byte) form_set_screen::y#2 = (byte) form_set_screen::y#1 [phi:form_set_screen::@1->form_set_screen::@1#0] -- register_copy - // [403] phi (byte*) form_set_screen::line#2 = (byte*) form_set_screen::line#1 [phi:form_set_screen::@1->form_set_screen::@1#1] -- register_copy + // [406] phi from form_set_screen::@1 to form_set_screen::@1 [phi:form_set_screen::@1->form_set_screen::@1] + // [406] phi (byte) form_set_screen::y#2 = (byte) form_set_screen::y#1 [phi:form_set_screen::@1->form_set_screen::@1#0] -- register_copy + // [406] phi (byte*) form_set_screen::line#2 = (byte*) form_set_screen::line#1 [phi:form_set_screen::@1->form_set_screen::@1#1] -- register_copy // form_set_screen::@1 __b1: // line - // [406] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 -- vbuaa=_hi_pbuz1 + // [409] (byte~) form_set_screen::$1 ← > (byte*) form_set_screen::line#2 -- vbuaa=_hi_pbuz1 lda.z line+1 // form_line_hi[y] = >line - // [407] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 -- pbuc1_derefidx_vbuxx=vbuaa + // [410] *((const byte*) form_line_hi + (byte) form_set_screen::y#2) ← (byte~) form_set_screen::$1 -- pbuc1_derefidx_vbuxx=vbuaa sta form_line_hi,x // line = line + 40 - // [408] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [411] (byte*) form_set_screen::line#1 ← (byte*) form_set_screen::line#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z line @@ -30947,14 +30800,14 @@ form_set_screen: { inc.z line+1 !: // for(byte y: 0..24) - // [409] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 -- vbuxx=_inc_vbuxx + // [412] (byte) form_set_screen::y#1 ← ++ (byte) form_set_screen::y#2 -- vbuxx=_inc_vbuxx inx - // [410] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 -- vbuxx_neq_vbuc1_then_la1 + // [413] if((byte) form_set_screen::y#1!=(byte) $19) goto form_set_screen::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #$19 bne __b1 // form_set_screen::@return // } - // [411] return + // [414] return rts } // print_str_lines @@ -30963,72 +30816,72 @@ form_set_screen: { // print_str_lines(byte* zp(6) str) print_str_lines: { .label str = 6 - // [413] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 -- pbuz1=pbuz2 + // [416] (byte*) print_char_cursor#67 ← (byte*) print_set_screen::screen#2 -- pbuz1=pbuz2 lda.z print_set_screen.screen sta.z print_char_cursor lda.z print_set_screen.screen+1 sta.z print_char_cursor+1 - // [414] phi from print_str_lines print_str_lines::@6 to print_str_lines::@1 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1] - // [414] phi (byte*) print_line_cursor#2 = (byte*) print_set_screen::screen#2 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#0] -- register_copy - // [414] phi (byte*) print_char_cursor#22 = (byte*) print_char_cursor#67 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#1] -- register_copy - // [414] phi (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#5 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#2] -- register_copy + // [417] phi from print_str_lines print_str_lines::@6 to print_str_lines::@1 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1] + // [417] phi (byte*) print_line_cursor#2 = (byte*) print_set_screen::screen#2 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#0] -- register_copy + // [417] phi (byte*) print_char_cursor#22 = (byte*) print_char_cursor#67 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#1] -- register_copy + // [417] phi (byte*) print_str_lines::str#3 = (byte*) print_str_lines::str#5 [phi:print_str_lines/print_str_lines::@6->print_str_lines::@1#2] -- register_copy // print_str_lines::@1 __b1: // while(*str) - // [415] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 -- vbuc1_neq__deref_pbuz1_then_la1 + // [418] if((byte) 0!=*((byte*) print_str_lines::str#3)) goto print_str_lines::@2 -- vbuc1_neq__deref_pbuz1_then_la1 ldy #0 lda (str),y cmp #0 bne __b2 // print_str_lines::@return // } - // [416] return + // [419] return rts - // [417] phi from print_str_lines::@1 print_str_lines::@3 to print_str_lines::@2 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2] - // [417] phi (byte*) print_char_cursor#20 = (byte*) print_char_cursor#22 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#0] -- register_copy - // [417] phi (byte*) print_str_lines::str#4 = (byte*) print_str_lines::str#3 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#1] -- register_copy + // [420] phi from print_str_lines::@1 print_str_lines::@3 to print_str_lines::@2 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2] + // [420] phi (byte*) print_char_cursor#20 = (byte*) print_char_cursor#22 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#0] -- register_copy + // [420] phi (byte*) print_str_lines::str#4 = (byte*) print_str_lines::str#3 [phi:print_str_lines::@1/print_str_lines::@3->print_str_lines::@2#1] -- register_copy // print_str_lines::@2 __b2: // ch = *(str++) - // [418] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) -- vbuaa=_deref_pbuz1 + // [421] (byte) print_str_lines::ch#0 ← *((byte*) print_str_lines::str#4) -- vbuaa=_deref_pbuz1 ldy #0 lda (str),y - // [419] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 -- pbuz1=_inc_pbuz1 + // [422] (byte*) print_str_lines::str#0 ← ++ (byte*) print_str_lines::str#4 -- pbuz1=_inc_pbuz1 inc.z str bne !+ inc.z str+1 !: // if(ch) - // [420] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 -- vbuc1_eq_vbuaa_then_la1 + // [423] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@3 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b3 // print_str_lines::@4 // *(print_char_cursor++) = ch - // [421] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 -- _deref_pbuz1=vbuaa + // [424] *((byte*) print_char_cursor#20) ← (byte) print_str_lines::ch#0 -- _deref_pbuz1=vbuaa ldy #0 sta (print_char_cursor),y // *(print_char_cursor++) = ch; - // [422] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 -- pbuz1=_inc_pbuz1 + // [425] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#20 -- pbuz1=_inc_pbuz1 inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: - // [423] phi from print_str_lines::@2 print_str_lines::@4 to print_str_lines::@3 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3] - // [423] phi (byte*) print_char_cursor#38 = (byte*) print_char_cursor#20 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3#0] -- register_copy + // [426] phi from print_str_lines::@2 print_str_lines::@4 to print_str_lines::@3 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3] + // [426] phi (byte*) print_char_cursor#38 = (byte*) print_char_cursor#20 [phi:print_str_lines::@2/print_str_lines::@4->print_str_lines::@3#0] -- register_copy // print_str_lines::@3 __b3: // while (ch) - // [424] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 -- vbuc1_neq_vbuaa_then_la1 + // [427] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@2 -- vbuc1_neq_vbuaa_then_la1 cmp #0 bne __b2 - // [425] phi from print_str_lines::@3 to print_str_lines::@5 [phi:print_str_lines::@3->print_str_lines::@5] + // [428] phi from print_str_lines::@3 to print_str_lines::@5 [phi:print_str_lines::@3->print_str_lines::@5] // print_str_lines::@5 // print_ln() - // [426] call print_ln - // [428] phi from print_str_lines::@5 to print_ln [phi:print_str_lines::@5->print_ln] + // [429] call print_ln + // [431] phi from print_str_lines::@5 to print_ln [phi:print_str_lines::@5->print_ln] jsr print_ln // print_str_lines::@6 - // [427] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 -- pbuz1=pbuz2 + // [430] (byte*) print_char_cursor#68 ← (byte*) print_line_cursor#22 -- pbuz1=pbuz2 lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 @@ -31038,12 +30891,12 @@ print_str_lines: { // print_ln // Print a newline print_ln: { - // [429] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] - // [429] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#2 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy + // [432] phi from print_ln print_ln::@1 to print_ln::@1 [phi:print_ln/print_ln::@1->print_ln::@1] + // [432] phi (byte*) print_line_cursor#21 = (byte*) print_line_cursor#2 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: // print_line_cursor + $28 - // [430] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [433] (byte*) print_line_cursor#22 ← (byte*) print_line_cursor#21 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z print_line_cursor @@ -31052,7 +30905,7 @@ print_ln: { inc.z print_line_cursor+1 !: // while (print_line_cursormemset] + // [437] call memset + // [439] phi from print_cls to memset [phi:print_cls->memset] jsr memset // print_cls::@return // } - // [435] return + // [438] return rts } // memset // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. -// memset(void* zp($b) str) +// memset(void* zp($a) str) memset: { .const c = ' ' .const num = $3e8 - .label end = $1c - .label dst = $b - .label str = $b + .label end = $11 + .label dst = $a + .label str = $a // memset::@1 // end = (char*)str + num - // [437] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 -- pbuz1=pbuz2_plus_vwuc1 + // [440] (byte*) memset::end#0 ← (byte*)(void*) memset::str#0 + (const word) memset::num#0 -- pbuz1=pbuz2_plus_vwuc1 lda.z str clc adc #num sta.z end+1 - // [438] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 - // [439] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2] - // [439] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy + // [441] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#0 + // [442] phi from memset::@1 memset::@3 to memset::@2 [phi:memset::@1/memset::@3->memset::@2] + // [442] phi (byte*) memset::dst#2 = (byte*) memset::dst#4 [phi:memset::@1/memset::@3->memset::@2#0] -- register_copy // memset::@2 __b2: // for(char* dst = str; dst!=end; dst++) - // [440] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 + // [443] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3 -- pbuz1_neq_pbuz2_then_la1 lda.z dst+1 cmp.z end+1 bne __b3 @@ -31117,17 +30970,17 @@ memset: { bne __b3 // memset::@return // } - // [441] return + // [444] return rts // memset::@3 __b3: // *dst = c - // [442] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 + // [445] *((byte*) memset::dst#2) ← (const byte) memset::c#0 -- _deref_pbuz1=vbuc1 lda #c ldy #0 sta (dst),y // for(char* dst = str; dst!=end; dst++) - // [443] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 + // [446] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2 -- pbuz1=_inc_pbuz1 inc.z dst bne !+ inc.z dst+1 @@ -31136,119 +30989,119 @@ memset: { } // print_set_screen // Set the screen to print on. Also resets current line/char cursor. -// print_set_screen(byte* zp($e) screen) +// print_set_screen(byte* zp($d) screen) print_set_screen: { - .label screen = $e + .label screen = $d // print_set_screen::@return // } - // [445] return + // [448] return rts } // gfx_init // Initialize the different graphics in the memory gfx_init: { // gfx_init_screen0() - // [447] call gfx_init_screen0 - // [843] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] + // [450] call gfx_init_screen0 + // [846] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] jsr gfx_init_screen0 - // [448] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] + // [451] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] // gfx_init::@1 // gfx_init_screen1() - // [449] call gfx_init_screen1 - // [831] phi from gfx_init::@1 to gfx_init_screen1 [phi:gfx_init::@1->gfx_init_screen1] + // [452] call gfx_init_screen1 + // [834] phi from gfx_init::@1 to gfx_init_screen1 [phi:gfx_init::@1->gfx_init_screen1] jsr gfx_init_screen1 - // [450] phi from gfx_init::@1 to gfx_init::@2 [phi:gfx_init::@1->gfx_init::@2] + // [453] phi from gfx_init::@1 to gfx_init::@2 [phi:gfx_init::@1->gfx_init::@2] // gfx_init::@2 // gfx_init_screen2() - // [451] call gfx_init_screen2 - // [816] phi from gfx_init::@2 to gfx_init_screen2 [phi:gfx_init::@2->gfx_init_screen2] + // [454] call gfx_init_screen2 + // [819] phi from gfx_init::@2 to gfx_init_screen2 [phi:gfx_init::@2->gfx_init_screen2] jsr gfx_init_screen2 - // [452] phi from gfx_init::@2 to gfx_init::@3 [phi:gfx_init::@2->gfx_init::@3] + // [455] phi from gfx_init::@2 to gfx_init::@3 [phi:gfx_init::@2->gfx_init::@3] // gfx_init::@3 // gfx_init_screen3() - // [453] call gfx_init_screen3 - // [802] phi from gfx_init::@3 to gfx_init_screen3 [phi:gfx_init::@3->gfx_init_screen3] + // [456] call gfx_init_screen3 + // [805] phi from gfx_init::@3 to gfx_init_screen3 [phi:gfx_init::@3->gfx_init_screen3] jsr gfx_init_screen3 - // [454] phi from gfx_init::@3 to gfx_init::@4 [phi:gfx_init::@3->gfx_init::@4] + // [457] phi from gfx_init::@3 to gfx_init::@4 [phi:gfx_init::@3->gfx_init::@4] // gfx_init::@4 // gfx_init_screen4() - // [455] call gfx_init_screen4 - // [792] phi from gfx_init::@4 to gfx_init_screen4 [phi:gfx_init::@4->gfx_init_screen4] + // [458] call gfx_init_screen4 + // [795] phi from gfx_init::@4 to gfx_init_screen4 [phi:gfx_init::@4->gfx_init_screen4] jsr gfx_init_screen4 - // [456] phi from gfx_init::@4 to gfx_init::@5 [phi:gfx_init::@4->gfx_init::@5] + // [459] phi from gfx_init::@4 to gfx_init::@5 [phi:gfx_init::@4->gfx_init::@5] // gfx_init::@5 // gfx_init_charset() - // [457] call gfx_init_charset + // [460] call gfx_init_charset jsr gfx_init_charset - // [458] phi from gfx_init::@5 to gfx_init::@6 [phi:gfx_init::@5->gfx_init::@6] + // [461] phi from gfx_init::@5 to gfx_init::@6 [phi:gfx_init::@5->gfx_init::@6] // gfx_init::@6 // gfx_init_vic_bitmap() - // [459] call gfx_init_vic_bitmap - // [602] phi from gfx_init::@6 to gfx_init_vic_bitmap [phi:gfx_init::@6->gfx_init_vic_bitmap] + // [462] call gfx_init_vic_bitmap + // [605] phi from gfx_init::@6 to gfx_init_vic_bitmap [phi:gfx_init::@6->gfx_init_vic_bitmap] jsr gfx_init_vic_bitmap - // [460] phi from gfx_init::@6 to gfx_init::@7 [phi:gfx_init::@6->gfx_init::@7] + // [463] phi from gfx_init::@6 to gfx_init::@7 [phi:gfx_init::@6->gfx_init::@7] // gfx_init::@7 // gfx_init_plane_8bppchunky() - // [461] call gfx_init_plane_8bppchunky - // [582] phi from gfx_init::@7 to gfx_init_plane_8bppchunky [phi:gfx_init::@7->gfx_init_plane_8bppchunky] + // [464] call gfx_init_plane_8bppchunky + // [585] phi from gfx_init::@7 to gfx_init_plane_8bppchunky [phi:gfx_init::@7->gfx_init_plane_8bppchunky] jsr gfx_init_plane_8bppchunky - // [462] phi from gfx_init::@7 to gfx_init::@8 [phi:gfx_init::@7->gfx_init::@8] + // [465] phi from gfx_init::@7 to gfx_init::@8 [phi:gfx_init::@7->gfx_init::@8] // gfx_init::@8 // gfx_init_plane_charset8() - // [463] call gfx_init_plane_charset8 - // [557] phi from gfx_init::@8 to gfx_init_plane_charset8 [phi:gfx_init::@8->gfx_init_plane_charset8] + // [466] call gfx_init_plane_charset8 + // [560] phi from gfx_init::@8 to gfx_init_plane_charset8 [phi:gfx_init::@8->gfx_init_plane_charset8] jsr gfx_init_plane_charset8 - // [464] phi from gfx_init::@8 to gfx_init::@9 [phi:gfx_init::@8->gfx_init::@9] + // [467] phi from gfx_init::@8 to gfx_init::@9 [phi:gfx_init::@8->gfx_init::@9] // gfx_init::@9 // gfx_init_plane_horisontal() - // [465] call gfx_init_plane_horisontal - // [539] phi from gfx_init::@9 to gfx_init_plane_horisontal [phi:gfx_init::@9->gfx_init_plane_horisontal] + // [468] call gfx_init_plane_horisontal + // [542] phi from gfx_init::@9 to gfx_init_plane_horisontal [phi:gfx_init::@9->gfx_init_plane_horisontal] jsr gfx_init_plane_horisontal - // [466] phi from gfx_init::@9 to gfx_init::@10 [phi:gfx_init::@9->gfx_init::@10] + // [469] phi from gfx_init::@9 to gfx_init::@10 [phi:gfx_init::@9->gfx_init::@10] // gfx_init::@10 // gfx_init_plane_vertical() - // [467] call gfx_init_plane_vertical - // [526] phi from gfx_init::@10 to gfx_init_plane_vertical [phi:gfx_init::@10->gfx_init_plane_vertical] + // [470] call gfx_init_plane_vertical + // [529] phi from gfx_init::@10 to gfx_init_plane_vertical [phi:gfx_init::@10->gfx_init_plane_vertical] jsr gfx_init_plane_vertical - // [468] phi from gfx_init::@10 to gfx_init::@11 [phi:gfx_init::@10->gfx_init::@11] + // [471] phi from gfx_init::@10 to gfx_init::@11 [phi:gfx_init::@10->gfx_init::@11] // gfx_init::@11 // gfx_init_plane_horisontal2() - // [469] call gfx_init_plane_horisontal2 - // [511] phi from gfx_init::@11 to gfx_init_plane_horisontal2 [phi:gfx_init::@11->gfx_init_plane_horisontal2] + // [472] call gfx_init_plane_horisontal2 + // [514] phi from gfx_init::@11 to gfx_init_plane_horisontal2 [phi:gfx_init::@11->gfx_init_plane_horisontal2] jsr gfx_init_plane_horisontal2 - // [470] phi from gfx_init::@11 to gfx_init::@12 [phi:gfx_init::@11->gfx_init::@12] + // [473] phi from gfx_init::@11 to gfx_init::@12 [phi:gfx_init::@11->gfx_init::@12] // gfx_init::@12 // gfx_init_plane_vertical2() - // [471] call gfx_init_plane_vertical2 - // [508] phi from gfx_init::@12 to gfx_init_plane_vertical2 [phi:gfx_init::@12->gfx_init_plane_vertical2] + // [474] call gfx_init_plane_vertical2 + // [511] phi from gfx_init::@12 to gfx_init_plane_vertical2 [phi:gfx_init::@12->gfx_init_plane_vertical2] jsr gfx_init_plane_vertical2 - // [472] phi from gfx_init::@12 to gfx_init::@13 [phi:gfx_init::@12->gfx_init::@13] + // [475] phi from gfx_init::@12 to gfx_init::@13 [phi:gfx_init::@12->gfx_init::@13] // gfx_init::@13 // gfx_init_plane_blank() - // [473] call gfx_init_plane_blank - // [505] phi from gfx_init::@13 to gfx_init_plane_blank [phi:gfx_init::@13->gfx_init_plane_blank] + // [476] call gfx_init_plane_blank + // [508] phi from gfx_init::@13 to gfx_init_plane_blank [phi:gfx_init::@13->gfx_init_plane_blank] jsr gfx_init_plane_blank - // [474] phi from gfx_init::@13 to gfx_init::@14 [phi:gfx_init::@13->gfx_init::@14] + // [477] phi from gfx_init::@13 to gfx_init::@14 [phi:gfx_init::@13->gfx_init::@14] // gfx_init::@14 // gfx_init_plane_full() - // [475] call gfx_init_plane_full - // [477] phi from gfx_init::@14 to gfx_init_plane_full [phi:gfx_init::@14->gfx_init_plane_full] + // [478] call gfx_init_plane_full + // [480] phi from gfx_init::@14 to gfx_init_plane_full [phi:gfx_init::@14->gfx_init_plane_full] jsr gfx_init_plane_full // gfx_init::@return // } - // [476] return + // [479] return rts } // gfx_init_plane_full // Initialize Plane with all pixels gfx_init_plane_full: { // gfx_init_plane_fill(PLANE_FULL, $ff) - // [478] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_full to gfx_init_plane_fill [phi:gfx_init_plane_full->gfx_init_plane_fill] - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $ff [phi:gfx_init_plane_full->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [481] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_full to gfx_init_plane_fill [phi:gfx_init_plane_full->gfx_init_plane_fill] + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $ff [phi:gfx_init_plane_full->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #$ff sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_FULL [phi:gfx_init_plane_full->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_FULL [phi:gfx_init_plane_full->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_FULL @@ -31260,23 +31113,23 @@ gfx_init_plane_full: { jsr gfx_init_plane_fill // gfx_init_plane_full::@return // } - // [479] return + // [482] return rts } // gfx_init_plane_fill // Initialize 320*200 1bpp pixel ($2000) plane with identical bytes -// gfx_init_plane_fill(dword zp(2) plane_addr, byte zp(8) fill) +// gfx_init_plane_fill(dword zp(2) plane_addr, byte zp($1e) fill) gfx_init_plane_fill: { - .label __0 = $12 - .label __1 = $16 - .label __4 = $e - .label __5 = $e - .label gfxb = $e - .label by = $10 + .label __0 = $13 + .label __1 = $17 + .label __4 = $d + .label __5 = $d + .label gfxb = $d + .label by = $f .label plane_addr = 2 - .label fill = 8 + .label fill = $1e // plane_addr*4 - // [481] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 -- vduz1=vduz2_rol_2 + // [484] (dword~) gfx_init_plane_fill::$0 ← (dword) gfx_init_plane_fill::plane_addr#3 << (byte) 2 -- vduz1=vduz2_rol_2 lda.z plane_addr asl sta.z __0 @@ -31294,29 +31147,29 @@ gfx_init_plane_fill: { rol.z __0+2 rol.z __0+3 // >(plane_addr*4) - // [482] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 -- vwuz1=_hi_vduz2 + // [485] (word~) gfx_init_plane_fill::$1 ← > (dword~) gfx_init_plane_fill::$0 -- vwuz1=_hi_vduz2 lda.z __0+2 sta.z __1 lda.z __0+3 sta.z __1+1 // gfxbCpuBank = < >(plane_addr*4) - // [483] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 -- vbuaa=_lo_vwuz1 + // [486] (byte) gfx_init_plane_fill::gfxbCpuBank#0 ← < (word~) gfx_init_plane_fill::$1 -- vbuaa=_lo_vwuz1 lda.z __1 // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [484] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 - // [485] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_fill to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1#0] -- register_copy + // [487] (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 ← (byte) gfx_init_plane_fill::gfxbCpuBank#0 + // [488] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_fill to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#11 [phi:gfx_init_plane_fill->dtvSetCpuBankSegment1#0] -- register_copy jsr dtvSetCpuBankSegment1 // gfx_init_plane_fill::@5 // $3fff sta.z __5+1 // $4000 + ($4000 sta.z gfxb+1 - // [489] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 - // [490] phi from gfx_init_plane_fill::@5 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1] - // [490] phi (byte) gfx_init_plane_fill::by#4 = (byte) 0 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#0] -- vbuz1=vbuc1 + // [492] (byte*) gfx_init_plane_fill::gfxb#6 ← (byte*)(word) gfx_init_plane_fill::gfxb#0 + // [493] phi from gfx_init_plane_fill::@5 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1] + // [493] phi (byte) gfx_init_plane_fill::by#4 = (byte) 0 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#0] -- vbuz1=vbuc1 lda #0 sta.z by - // [490] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#6 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#1] -- register_copy - // [490] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1] - // [490] phi (byte) gfx_init_plane_fill::by#4 = (byte) gfx_init_plane_fill::by#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#0] -- register_copy - // [490] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#1] -- register_copy + // [493] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#6 [phi:gfx_init_plane_fill::@5->gfx_init_plane_fill::@1#1] -- register_copy + // [493] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1] + // [493] phi (byte) gfx_init_plane_fill::by#4 = (byte) gfx_init_plane_fill::by#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#0] -- register_copy + // [493] phi (byte*) gfx_init_plane_fill::gfxb#3 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@1#1] -- register_copy // gfx_init_plane_fill::@1 __b1: - // [491] phi from gfx_init_plane_fill::@1 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2] - // [491] phi (byte) gfx_init_plane_fill::bx#2 = (byte) 0 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#0] -- vbuxx=vbuc1 + // [494] phi from gfx_init_plane_fill::@1 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2] + // [494] phi (byte) gfx_init_plane_fill::bx#2 = (byte) 0 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#0] -- vbuxx=vbuc1 ldx #0 - // [491] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#3 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#1] -- register_copy - // [491] phi from gfx_init_plane_fill::@2 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2] - // [491] phi (byte) gfx_init_plane_fill::bx#2 = (byte) gfx_init_plane_fill::bx#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#0] -- register_copy - // [491] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#1] -- register_copy + // [494] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#3 [phi:gfx_init_plane_fill::@1->gfx_init_plane_fill::@2#1] -- register_copy + // [494] phi from gfx_init_plane_fill::@2 to gfx_init_plane_fill::@2 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2] + // [494] phi (byte) gfx_init_plane_fill::bx#2 = (byte) gfx_init_plane_fill::bx#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#0] -- register_copy + // [494] phi (byte*) gfx_init_plane_fill::gfxb#2 = (byte*) gfx_init_plane_fill::gfxb#1 [phi:gfx_init_plane_fill::@2->gfx_init_plane_fill::@2#1] -- register_copy // gfx_init_plane_fill::@2 __b2: // *gfxb++ = fill - // [492] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 -- _deref_pbuz1=vbuz2 + // [495] *((byte*) gfx_init_plane_fill::gfxb#2) ← (byte) gfx_init_plane_fill::fill#6 -- _deref_pbuz1=vbuz2 lda.z fill ldy #0 sta (gfxb),y // *gfxb++ = fill; - // [493] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 -- pbuz1=_inc_pbuz1 + // [496] (byte*) gfx_init_plane_fill::gfxb#1 ← ++ (byte*) gfx_init_plane_fill::gfxb#2 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: // for ( byte bx : 0..39) - // [494] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 -- vbuxx=_inc_vbuxx + // [497] (byte) gfx_init_plane_fill::bx#1 ← ++ (byte) gfx_init_plane_fill::bx#2 -- vbuxx=_inc_vbuxx inx - // [495] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 -- vbuxx_neq_vbuc1_then_la1 + // [498] if((byte) gfx_init_plane_fill::bx#1!=(byte) $28) goto gfx_init_plane_fill::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_plane_fill::@3 // for(byte by : 0..199) - // [496] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 -- vbuz1=_inc_vbuz1 + // [499] (byte) gfx_init_plane_fill::by#1 ← ++ (byte) gfx_init_plane_fill::by#4 -- vbuz1=_inc_vbuz1 inc.z by - // [497] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 -- vbuz1_neq_vbuc1_then_la1 + // [500] if((byte) gfx_init_plane_fill::by#1!=(byte) $c8) goto gfx_init_plane_fill::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z by bne __b1 - // [498] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@4 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@4] + // [501] phi from gfx_init_plane_fill::@3 to gfx_init_plane_fill::@4 [phi:gfx_init_plane_fill::@3->gfx_init_plane_fill::@4] // gfx_init_plane_fill::@4 // dtvSetCpuBankSegment1((byte)($4000/$4000)) - // [499] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_fill::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [502] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_fill::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_fill::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 // gfx_init_plane_fill::@return // } - // [500] return + // [503] return rts } // dtvSetCpuBankSegment1 @@ -31399,7 +31252,7 @@ dtvSetCpuBankSegment1: { // Move CPU BANK 1 SEGMENT ($4000-$7fff) .label cpuBank = $ff // *cpuBank = cpuBankIdx - // [502] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa + // [505] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 -- _deref_pbuc1=vbuaa sta cpuBank // asm // asm { .byte$32,$dd lda$ff .byte$32,$00 } @@ -31408,19 +31261,19 @@ dtvSetCpuBankSegment1: { .byte $32, $00 // dtvSetCpuBankSegment1::@return // } - // [504] return + // [507] return rts } // gfx_init_plane_blank // Initialize Plane with blank pixels gfx_init_plane_blank: { // gfx_init_plane_fill(PLANE_BLANK, 0) - // [506] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_blank to gfx_init_plane_fill [phi:gfx_init_plane_blank->gfx_init_plane_fill] - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) 0 [phi:gfx_init_plane_blank->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [509] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_blank to gfx_init_plane_fill [phi:gfx_init_plane_blank->gfx_init_plane_fill] + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) 0 [phi:gfx_init_plane_blank->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #0 sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_BLANK [phi:gfx_init_plane_blank->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_BLANK [phi:gfx_init_plane_blank->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_BLANK @@ -31432,19 +31285,19 @@ gfx_init_plane_blank: { jsr gfx_init_plane_fill // gfx_init_plane_blank::@return // } - // [507] return + // [510] return rts } // gfx_init_plane_vertical2 // Initialize Plane with Vertical Stripes every 2 pixels gfx_init_plane_vertical2: { // gfx_init_plane_fill(PLANE_VERTICAL2, %00011011) - // [509] call gfx_init_plane_fill - // [480] phi from gfx_init_plane_vertical2 to gfx_init_plane_fill [phi:gfx_init_plane_vertical2->gfx_init_plane_fill] - // [480] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $1b [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#0] -- vbuz1=vbuc1 + // [512] call gfx_init_plane_fill + // [483] phi from gfx_init_plane_vertical2 to gfx_init_plane_fill [phi:gfx_init_plane_vertical2->gfx_init_plane_fill] + // [483] phi (byte) gfx_init_plane_fill::fill#6 = (byte) $1b [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#0] -- vbuz1=vbuc1 lda #$1b sta.z gfx_init_plane_fill.fill - // [480] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_VERTICAL2 [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#1] -- vduz1=vduc1 + // [483] phi (dword) gfx_init_plane_fill::plane_addr#3 = (const dword) PLANE_VERTICAL2 [phi:gfx_init_plane_vertical2->gfx_init_plane_fill#1] -- vduz1=vduc1 lda #PLANE_VERTICAL2 @@ -31456,7 +31309,7 @@ gfx_init_plane_vertical2: { jsr gfx_init_plane_fill // gfx_init_plane_vertical2::@return // } - // [510] return + // [513] return rts } // gfx_init_plane_horisontal2 @@ -31464,80 +31317,80 @@ gfx_init_plane_vertical2: { gfx_init_plane_horisontal2: { .const gfxbCpuBank = PLANE_HORISONTAL2/$4000 .label gfxa = 6 - .label ay = 9 + .label ay = 8 // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [512] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal2 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [515] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal2 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal2::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal2->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - // [513] phi from gfx_init_plane_horisontal2 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1] - // [513] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#0] -- pbuz1=pbuc1 + // [516] phi from gfx_init_plane_horisontal2 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1] + // [516] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#0] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [513] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#1] -- vbuz1=vbuc1 + // [516] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal2->gfx_init_plane_horisontal2::@1#1] -- vbuz1=vbuc1 lda #0 sta.z ay - // [513] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1] - // [513] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#0] -- register_copy - // [513] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) gfx_init_plane_horisontal2::ay#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#1] -- register_copy + // [516] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1] + // [516] phi (byte*) gfx_init_plane_horisontal2::gfxa#3 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#0] -- register_copy + // [516] phi (byte) gfx_init_plane_horisontal2::ay#4 = (byte) gfx_init_plane_horisontal2::ay#1 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@1#1] -- register_copy // gfx_init_plane_horisontal2::@1 __b1: - // [514] phi from gfx_init_plane_horisontal2::@1 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2] - // [514] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#0] -- vbuxx=vbuc1 + // [517] phi from gfx_init_plane_horisontal2::@1 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2] + // [517] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#0] -- vbuxx=vbuc1 ldx #0 - // [514] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#3 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#1] -- register_copy - // [514] phi from gfx_init_plane_horisontal2::@2 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2] - // [514] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) gfx_init_plane_horisontal2::ax#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#0] -- register_copy - // [514] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#1] -- register_copy + // [517] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#3 [phi:gfx_init_plane_horisontal2::@1->gfx_init_plane_horisontal2::@2#1] -- register_copy + // [517] phi from gfx_init_plane_horisontal2::@2 to gfx_init_plane_horisontal2::@2 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2] + // [517] phi (byte) gfx_init_plane_horisontal2::ax#2 = (byte) gfx_init_plane_horisontal2::ax#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#0] -- register_copy + // [517] phi (byte*) gfx_init_plane_horisontal2::gfxa#2 = (byte*) gfx_init_plane_horisontal2::gfxa#1 [phi:gfx_init_plane_horisontal2::@2->gfx_init_plane_horisontal2::@2#1] -- register_copy // gfx_init_plane_horisontal2::@2 __b2: // ay/2 - // [515] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 -- vbuaa=vbuz1_ror_1 + // [518] (byte~) gfx_init_plane_horisontal2::$2 ← (byte) gfx_init_plane_horisontal2::ay#4 >> (byte) 1 -- vbuaa=vbuz1_ror_1 lda.z ay lsr // row = (ay/2) & 3 - // [516] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 -- vbuaa=vbuaa_band_vbuc1 + // [519] (byte) gfx_init_plane_horisontal2::row#0 ← (byte~) gfx_init_plane_horisontal2::$2 & (byte) 3 -- vbuaa=vbuaa_band_vbuc1 and #3 // *gfxa++ = row_bitmask[row] - // [517] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) -- _deref_pbuz1=pbuc1_derefidx_vbuaa + // [520] *((byte*) gfx_init_plane_horisontal2::gfxa#2) ← *((const byte*) gfx_init_plane_horisontal2::row_bitmask + (byte) gfx_init_plane_horisontal2::row#0) -- _deref_pbuz1=pbuc1_derefidx_vbuaa tay lda row_bitmask,y ldy #0 sta (gfxa),y // *gfxa++ = row_bitmask[row]; - // [518] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 -- pbuz1=_inc_pbuz1 + // [521] (byte*) gfx_init_plane_horisontal2::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal2::gfxa#2 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: // for (byte ax : 0..39) - // [519] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 -- vbuxx=_inc_vbuxx + // [522] (byte) gfx_init_plane_horisontal2::ax#1 ← ++ (byte) gfx_init_plane_horisontal2::ax#2 -- vbuxx=_inc_vbuxx inx - // [520] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 -- vbuxx_neq_vbuc1_then_la1 + // [523] if((byte) gfx_init_plane_horisontal2::ax#1!=(byte) $28) goto gfx_init_plane_horisontal2::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_plane_horisontal2::@3 // for(byte ay : 0..199) - // [521] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 -- vbuz1=_inc_vbuz1 + // [524] (byte) gfx_init_plane_horisontal2::ay#1 ← ++ (byte) gfx_init_plane_horisontal2::ay#4 -- vbuz1=_inc_vbuz1 inc.z ay - // [522] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 -- vbuz1_neq_vbuc1_then_la1 + // [525] if((byte) gfx_init_plane_horisontal2::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal2::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z ay bne __b1 - // [523] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@4 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@4] + // [526] phi from gfx_init_plane_horisontal2::@3 to gfx_init_plane_horisontal2::@4 [phi:gfx_init_plane_horisontal2::@3->gfx_init_plane_horisontal2::@4] // gfx_init_plane_horisontal2::@4 // dtvSetCpuBankSegment1((byte)($4000/$4000)) - // [524] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal2::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [527] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal2::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal2::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 // gfx_init_plane_horisontal2::@return // } - // [525] return + // [528] return rts row_bitmask: .byte 0, $55, $aa, $ff } @@ -31546,72 +31399,72 @@ gfx_init_plane_horisontal2: { gfx_init_plane_vertical: { .const gfxbCpuBank = PLANE_VERTICAL/$4000 .label gfxb = 6 - .label by = $11 + .label by = $10 // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [527] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_vertical to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_vertical::gfxbCpuBank#0 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [530] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_vertical to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_vertical::gfxbCpuBank#0 [phi:gfx_init_plane_vertical->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - // [528] phi from gfx_init_plane_vertical to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1] - // [528] phi (byte) gfx_init_plane_vertical::by#4 = (byte) 0 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#0] -- vbuz1=vbuc1 + // [531] phi from gfx_init_plane_vertical to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1] + // [531] phi (byte) gfx_init_plane_vertical::by#4 = (byte) 0 [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#0] -- vbuz1=vbuc1 lda #0 sta.z by - // [528] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#1] -- pbuz1=pbuc1 + // [531] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*)(word) $4000+(const dword) PLANE_VERTICAL&(word) $3fff [phi:gfx_init_plane_vertical->gfx_init_plane_vertical::@1#1] -- pbuz1=pbuc1 lda #<$4000+(PLANE_VERTICAL&$3fff) sta.z gfxb lda #>$4000+(PLANE_VERTICAL&$3fff) sta.z gfxb+1 - // [528] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1] - // [528] phi (byte) gfx_init_plane_vertical::by#4 = (byte) gfx_init_plane_vertical::by#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#0] -- register_copy - // [528] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#1] -- register_copy + // [531] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1] + // [531] phi (byte) gfx_init_plane_vertical::by#4 = (byte) gfx_init_plane_vertical::by#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#0] -- register_copy + // [531] phi (byte*) gfx_init_plane_vertical::gfxb#3 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@1#1] -- register_copy // gfx_init_plane_vertical::@1 __b1: - // [529] phi from gfx_init_plane_vertical::@1 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2] - // [529] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) 0 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#0] -- vbuxx=vbuc1 + // [532] phi from gfx_init_plane_vertical::@1 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2] + // [532] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) 0 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#0] -- vbuxx=vbuc1 ldx #0 - // [529] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#3 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#1] -- register_copy - // [529] phi from gfx_init_plane_vertical::@2 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2] - // [529] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) gfx_init_plane_vertical::bx#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#0] -- register_copy - // [529] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#1] -- register_copy + // [532] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#3 [phi:gfx_init_plane_vertical::@1->gfx_init_plane_vertical::@2#1] -- register_copy + // [532] phi from gfx_init_plane_vertical::@2 to gfx_init_plane_vertical::@2 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2] + // [532] phi (byte) gfx_init_plane_vertical::bx#2 = (byte) gfx_init_plane_vertical::bx#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#0] -- register_copy + // [532] phi (byte*) gfx_init_plane_vertical::gfxb#2 = (byte*) gfx_init_plane_vertical::gfxb#1 [phi:gfx_init_plane_vertical::@2->gfx_init_plane_vertical::@2#1] -- register_copy // gfx_init_plane_vertical::@2 __b2: // *gfxb++ = %00001111 - // [530] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f -- _deref_pbuz1=vbuc1 + // [533] *((byte*) gfx_init_plane_vertical::gfxb#2) ← (byte) $f -- _deref_pbuz1=vbuc1 lda #$f ldy #0 sta (gfxb),y // *gfxb++ = %00001111; - // [531] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 -- pbuz1=_inc_pbuz1 + // [534] (byte*) gfx_init_plane_vertical::gfxb#1 ← ++ (byte*) gfx_init_plane_vertical::gfxb#2 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: // for ( byte bx : 0..39) - // [532] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 -- vbuxx=_inc_vbuxx + // [535] (byte) gfx_init_plane_vertical::bx#1 ← ++ (byte) gfx_init_plane_vertical::bx#2 -- vbuxx=_inc_vbuxx inx - // [533] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 -- vbuxx_neq_vbuc1_then_la1 + // [536] if((byte) gfx_init_plane_vertical::bx#1!=(byte) $28) goto gfx_init_plane_vertical::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_plane_vertical::@3 // for(byte by : 0..199) - // [534] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 -- vbuz1=_inc_vbuz1 + // [537] (byte) gfx_init_plane_vertical::by#1 ← ++ (byte) gfx_init_plane_vertical::by#4 -- vbuz1=_inc_vbuz1 inc.z by - // [535] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 -- vbuz1_neq_vbuc1_then_la1 + // [538] if((byte) gfx_init_plane_vertical::by#1!=(byte) $c8) goto gfx_init_plane_vertical::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z by bne __b1 - // [536] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@4 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@4] + // [539] phi from gfx_init_plane_vertical::@3 to gfx_init_plane_vertical::@4 [phi:gfx_init_plane_vertical::@3->gfx_init_plane_vertical::@4] // gfx_init_plane_vertical::@4 // dtvSetCpuBankSegment1((byte)($4000/$4000)) - // [537] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_vertical::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [540] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_vertical::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_vertical::@4->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 // gfx_init_plane_vertical::@return // } - // [538] return + // [541] return rts } // gfx_init_plane_horisontal @@ -31619,95 +31472,95 @@ gfx_init_plane_vertical: { gfx_init_plane_horisontal: { .const gfxbCpuBank = PLANE_HORISONTAL/$4000 .label gfxa = 6 - .label ay = $a + .label ay = 9 // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [540] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [543] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_horisontal::gfxbCpuBank#0 [phi:gfx_init_plane_horisontal->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 - // [541] phi from gfx_init_plane_horisontal to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1] - // [541] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#0] -- pbuz1=pbuc1 + // [544] phi from gfx_init_plane_horisontal to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1] + // [544] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#0] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [541] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#1] -- vbuz1=vbuc1 + // [544] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) 0 [phi:gfx_init_plane_horisontal->gfx_init_plane_horisontal::@1#1] -- vbuz1=vbuc1 lda #0 sta.z ay - // [541] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1] - // [541] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#0] -- register_copy - // [541] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) gfx_init_plane_horisontal::ay#1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#1] -- register_copy + // [544] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1] + // [544] phi (byte*) gfx_init_plane_horisontal::gfxa#6 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#0] -- register_copy + // [544] phi (byte) gfx_init_plane_horisontal::ay#4 = (byte) gfx_init_plane_horisontal::ay#1 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@1#1] -- register_copy // gfx_init_plane_horisontal::@1 __b1: - // [542] phi from gfx_init_plane_horisontal::@1 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2] - // [542] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#0] -- vbuxx=vbuc1 + // [545] phi from gfx_init_plane_horisontal::@1 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2] + // [545] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) 0 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#0] -- vbuxx=vbuc1 ldx #0 - // [542] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#6 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#1] -- register_copy - // [542] phi from gfx_init_plane_horisontal::@4 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2] - // [542] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) gfx_init_plane_horisontal::ax#1 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#0] -- register_copy - // [542] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#1] -- register_copy + // [545] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#6 [phi:gfx_init_plane_horisontal::@1->gfx_init_plane_horisontal::@2#1] -- register_copy + // [545] phi from gfx_init_plane_horisontal::@4 to gfx_init_plane_horisontal::@2 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2] + // [545] phi (byte) gfx_init_plane_horisontal::ax#2 = (byte) gfx_init_plane_horisontal::ax#1 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#0] -- register_copy + // [545] phi (byte*) gfx_init_plane_horisontal::gfxa#3 = (byte*) gfx_init_plane_horisontal::gfxa#7 [phi:gfx_init_plane_horisontal::@4->gfx_init_plane_horisontal::@2#1] -- register_copy // gfx_init_plane_horisontal::@2 __b2: // ay&4 - // [543] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 -- vbuaa=vbuz1_band_vbuc1 + // [546] (byte~) gfx_init_plane_horisontal::$2 ← (byte) gfx_init_plane_horisontal::ay#4 & (byte) 4 -- vbuaa=vbuz1_band_vbuc1 lda #4 and.z ay // if((ay&4)==0) - // [544] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -- vbuaa_eq_0_then_la1 + // [547] if((byte~) gfx_init_plane_horisontal::$2==(byte) 0) goto gfx_init_plane_horisontal::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq __b3 // gfx_init_plane_horisontal::@5 // *gfxa++ = %11111111 - // [545] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff -- _deref_pbuz1=vbuc1 + // [548] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) $ff -- _deref_pbuz1=vbuc1 lda #$ff ldy #0 sta (gfxa),y // *gfxa++ = %11111111; - // [546] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 + // [549] (byte*) gfx_init_plane_horisontal::gfxa#2 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: - // [547] phi from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 to gfx_init_plane_horisontal::@4 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4] - // [547] phi (byte*) gfx_init_plane_horisontal::gfxa#7 = (byte*) gfx_init_plane_horisontal::gfxa#1 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4#0] -- register_copy + // [550] phi from gfx_init_plane_horisontal::@3 gfx_init_plane_horisontal::@5 to gfx_init_plane_horisontal::@4 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4] + // [550] phi (byte*) gfx_init_plane_horisontal::gfxa#7 = (byte*) gfx_init_plane_horisontal::gfxa#1 [phi:gfx_init_plane_horisontal::@3/gfx_init_plane_horisontal::@5->gfx_init_plane_horisontal::@4#0] -- register_copy // gfx_init_plane_horisontal::@4 __b4: // for (byte ax : 0..39) - // [548] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 -- vbuxx=_inc_vbuxx + // [551] (byte) gfx_init_plane_horisontal::ax#1 ← ++ (byte) gfx_init_plane_horisontal::ax#2 -- vbuxx=_inc_vbuxx inx - // [549] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 -- vbuxx_neq_vbuc1_then_la1 + // [552] if((byte) gfx_init_plane_horisontal::ax#1!=(byte) $28) goto gfx_init_plane_horisontal::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_plane_horisontal::@6 // for(byte ay : 0..199) - // [550] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 -- vbuz1=_inc_vbuz1 + // [553] (byte) gfx_init_plane_horisontal::ay#1 ← ++ (byte) gfx_init_plane_horisontal::ay#4 -- vbuz1=_inc_vbuz1 inc.z ay - // [551] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 -- vbuz1_neq_vbuc1_then_la1 + // [554] if((byte) gfx_init_plane_horisontal::ay#1!=(byte) $c8) goto gfx_init_plane_horisontal::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z ay bne __b1 - // [552] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@7] + // [555] phi from gfx_init_plane_horisontal::@6 to gfx_init_plane_horisontal::@7 [phi:gfx_init_plane_horisontal::@6->gfx_init_plane_horisontal::@7] // gfx_init_plane_horisontal::@7 // dtvSetCpuBankSegment1((byte)($4000/$4000)) - // [553] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_horisontal::@7 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [556] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_horisontal::@7 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_horisontal::@7->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 // gfx_init_plane_horisontal::@return // } - // [554] return + // [557] return rts // gfx_init_plane_horisontal::@3 __b3: // *gfxa++ = %00000000 - // [555] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [558] *((byte*) gfx_init_plane_horisontal::gfxa#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (gfxa),y // *gfxa++ = %00000000; - // [556] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 + // [559] (byte*) gfx_init_plane_horisontal::gfxa#1 ← ++ (byte*) gfx_init_plane_horisontal::gfxa#3 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 @@ -31719,202 +31572,202 @@ gfx_init_plane_horisontal: { gfx_init_plane_charset8: { // 8bpp cells for Plane B (charset) - ROM charset with 256 colors .const gfxbCpuBank = PLANE_CHARSET8/$4000 - .label bits = 8 + .label bits = $1e .label chargen = 6 - .label gfxa = $b - .label col = $10 - .label cr = $d - .label ch = $a + .label gfxa = $a + .label col = $f + .label cr = $c + .label ch = 9 // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [558] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [561] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #gfxbCpuBank jsr dtvSetCpuBankSegment1 // gfx_init_plane_charset8::@9 // *PROCPORT = PROCPORT_RAM_CHARROM - // [559] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2 + // [562] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_CHARROM sta PROCPORT - // [560] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] - // [560] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 + // [563] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] + // [563] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 lda #0 sta.z ch - // [560] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 + // [563] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 sta.z col - // [560] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 + // [563] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxa lda #>$4000 sta.z gfxa+1 - // [560] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + // [563] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 lda #CHARGEN sta.z chargen+1 - // [560] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] - // [560] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy - // [560] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy - // [560] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy - // [560] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy + // [563] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] + // [563] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy + // [563] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy + // [563] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy + // [563] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy // gfx_init_plane_charset8::@1 __b1: - // [561] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] - // [561] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 + // [564] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] + // [564] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 lda #0 sta.z cr - // [561] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy - // [561] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] - // [561] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy - // [561] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy - // [561] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy + // [564] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] + // [564] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy + // [564] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy + // [564] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy // gfx_init_plane_charset8::@2 __b2: // bits = *chargen++ - // [562] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 + // [565] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2 ldy #0 lda (chargen),y sta.z bits - // [563] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 + // [566] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1 inc.z chargen bne !+ inc.z chargen+1 !: - // [564] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] - // [564] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 + // [567] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] + // [567] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 ldx #0 - // [564] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy - // [564] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy - // [564] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] - // [564] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy - // [564] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy - // [564] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy + // [567] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy + // [567] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] + // [567] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy + // [567] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy + // [567] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy // gfx_init_plane_charset8::@3 __b3: // bits & $80 - // [565] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 + // [568] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 lda #$80 and.z bits // if((bits & $80) != 0) - // [566] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1 + // [569] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1 cmp #0 beq b1 // gfx_init_plane_charset8::@5 - // [567] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1 + // [570] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1 lda.z col - // [568] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] - // [568] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy + // [571] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] + // [571] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy jmp __b4 - // [568] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] + // [571] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] b1: - // [568] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 + // [571] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 lda #0 // gfx_init_plane_charset8::@4 __b4: // *gfxa++ = c - // [569] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa + // [572] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa ldy #0 sta (gfxa),y // *gfxa++ = c; - // [570] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 + // [573] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1 inc.z gfxa bne !+ inc.z gfxa+1 !: // bits = bits*2 - // [571] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 + // [574] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1 asl.z bits // col++; - // [572] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 + // [575] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1 inc.z col // for ( byte cp : 0..7) - // [573] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx + // [576] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx inx - // [574] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1 + // [577] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b3 // gfx_init_plane_charset8::@6 // for ( byte cr : 0..7) - // [575] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 + // [578] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1 inc.z cr - // [576] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 + // [579] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z cr bne __b2 // gfx_init_plane_charset8::@7 // for(byte ch : $00..$ff) - // [577] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 + // [580] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1 inc.z ch - // [578] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 + // [581] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1 lda.z ch cmp #0 bne __b1 // gfx_init_plane_charset8::@8 // *PROCPORT = PROCPORT_RAM_IO - // [579] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 + // [582] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT // dtvSetCpuBankSegment1((byte)($4000/$4000)) - // [580] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [583] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 // gfx_init_plane_charset8::@return // } - // [581] return + // [584] return rts } // gfx_init_plane_8bppchunky // Initialize 8BPP Chunky Bitmap (contains 8bpp pixels) gfx_init_plane_8bppchunky: { - .label __5 = $18 - .label gfxb = $e - .label x = $b - .label y = $d + .label __5 = $19 + .label gfxb = $d + .label x = $a + .label y = $c // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [583] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [586] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #PLANE_8BPP_CHUNKY/$4000 jsr dtvSetCpuBankSegment1 - // [584] phi from gfx_init_plane_8bppchunky to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1] - // [584] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = ++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#0] -- vbuxx=vbuc1 + // [587] phi from gfx_init_plane_8bppchunky to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1] + // [587] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = ++(byte)(const dword) PLANE_8BPP_CHUNKY/(word) $4000 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#0] -- vbuxx=vbuc1 ldx #PLANE_8BPP_CHUNKY/$4000+1 - // [584] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) 0 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#1] -- vbuz1=vbuc1 + // [587] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) 0 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#1] -- vbuz1=vbuc1 lda #0 sta.z y - // [584] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#2] -- pbuz1=pbuc1 + // [587] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky->gfx_init_plane_8bppchunky::@1#2] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 - // [584] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1] - // [584] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#0] -- register_copy - // [584] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) gfx_init_plane_8bppchunky::y#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#1] -- register_copy - // [584] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#2] -- register_copy + // [587] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1] + // [587] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#0] -- register_copy + // [587] phi (byte) gfx_init_plane_8bppchunky::y#6 = (byte) gfx_init_plane_8bppchunky::y#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#1] -- register_copy + // [587] phi (byte*) gfx_init_plane_8bppchunky::gfxb#5 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@1#2] -- register_copy // gfx_init_plane_8bppchunky::@1 __b1: - // [585] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2] - // [585] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy - // [585] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1 + // [588] phi from gfx_init_plane_8bppchunky::@1 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2] + // [588] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#0] -- register_copy + // [588] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) 0 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#1] -- vwuz1=vwuc1 lda #<0 sta.z x sta.z x+1 - // [585] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy - // [585] phi from gfx_init_plane_8bppchunky::@3 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2] - // [585] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#0] -- register_copy - // [585] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) gfx_init_plane_8bppchunky::x#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#1] -- register_copy - // [585] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#2] -- register_copy + // [588] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#5 [phi:gfx_init_plane_8bppchunky::@1->gfx_init_plane_8bppchunky::@2#2] -- register_copy + // [588] phi from gfx_init_plane_8bppchunky::@3 to gfx_init_plane_8bppchunky::@2 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2] + // [588] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#0] -- register_copy + // [588] phi (word) gfx_init_plane_8bppchunky::x#2 = (word) gfx_init_plane_8bppchunky::x#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#1] -- register_copy + // [588] phi (byte*) gfx_init_plane_8bppchunky::gfxb#3 = (byte*) gfx_init_plane_8bppchunky::gfxb#1 [phi:gfx_init_plane_8bppchunky::@3->gfx_init_plane_8bppchunky::@2#2] -- register_copy // gfx_init_plane_8bppchunky::@2 __b2: // if(gfxb==$8000) - // [586] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -- pbuz1_neq_vwuc1_then_la1 + // [589] if((byte*) gfx_init_plane_8bppchunky::gfxb#3!=(word) $8000) goto gfx_init_plane_8bppchunky::@3 -- pbuz1_neq_vwuc1_then_la1 lda.z gfxb+1 cmp #>$8000 bne __b3 @@ -31923,30 +31776,30 @@ gfx_init_plane_8bppchunky: { bne __b3 // gfx_init_plane_8bppchunky::@4 // dtvSetCpuBankSegment1(gfxbCpuBank++) - // [587] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuaa=vbuxx + // [590] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuaa=vbuxx txa - // [588] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1#0] -- register_copy + // [591] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_plane_8bppchunky::@4->dtvSetCpuBankSegment1#0] -- register_copy jsr dtvSetCpuBankSegment1 // gfx_init_plane_8bppchunky::@7 // dtvSetCpuBankSegment1(gfxbCpuBank++); - // [589] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuxx=_inc_vbuxx + // [592] (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 -- vbuxx=_inc_vbuxx inx - // [590] phi from gfx_init_plane_8bppchunky::@7 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3] - // [590] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#0] -- register_copy - // [590] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#1] -- pbuz1=pbuc1 + // [593] phi from gfx_init_plane_8bppchunky::@7 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3] + // [593] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#0] -- register_copy + // [593] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) 16384 [phi:gfx_init_plane_8bppchunky::@7->gfx_init_plane_8bppchunky::@3#1] -- pbuz1=pbuc1 lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 - // [590] phi from gfx_init_plane_8bppchunky::@2 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3] - // [590] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#0] -- register_copy - // [590] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) gfx_init_plane_8bppchunky::gfxb#3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#1] -- register_copy + // [593] phi from gfx_init_plane_8bppchunky::@2 to gfx_init_plane_8bppchunky::@3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3] + // [593] phi (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 = (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#0] -- register_copy + // [593] phi (byte*) gfx_init_plane_8bppchunky::gfxb#4 = (byte*) gfx_init_plane_8bppchunky::gfxb#3 [phi:gfx_init_plane_8bppchunky::@2->gfx_init_plane_8bppchunky::@3#1] -- register_copy // gfx_init_plane_8bppchunky::@3 __b3: // x+y - // [591] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 -- vwuz1=vwuz2_plus_vbuz3 + // [594] (word~) gfx_init_plane_8bppchunky::$5 ← (word) gfx_init_plane_8bppchunky::x#2 + (byte) gfx_init_plane_8bppchunky::y#6 -- vwuz1=vwuz2_plus_vbuz3 lda.z y clc adc.z x @@ -31955,25 +31808,25 @@ gfx_init_plane_8bppchunky: { adc.z x+1 sta.z __5+1 // c = (byte)(x+y) - // [592] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 -- vbuaa=_byte_vwuz1 + // [595] (byte) gfx_init_plane_8bppchunky::c#0 ← (byte)(word~) gfx_init_plane_8bppchunky::$5 -- vbuaa=_byte_vwuz1 lda.z __5 // *gfxb++ = c - // [593] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 -- _deref_pbuz1=vbuaa + // [596] *((byte*) gfx_init_plane_8bppchunky::gfxb#4) ← (byte) gfx_init_plane_8bppchunky::c#0 -- _deref_pbuz1=vbuaa ldy #0 sta (gfxb),y // *gfxb++ = c; - // [594] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 -- pbuz1=_inc_pbuz1 + // [597] (byte*) gfx_init_plane_8bppchunky::gfxb#1 ← ++ (byte*) gfx_init_plane_8bppchunky::gfxb#4 -- pbuz1=_inc_pbuz1 inc.z gfxb bne !+ inc.z gfxb+1 !: // for (word x : 0..319) - // [595] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 -- vwuz1=_inc_vwuz1 + // [598] (word) gfx_init_plane_8bppchunky::x#1 ← ++ (word) gfx_init_plane_8bppchunky::x#2 -- vwuz1=_inc_vwuz1 inc.z x bne !+ inc.z x+1 !: - // [596] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 -- vwuz1_neq_vwuc1_then_la1 + // [599] if((word) gfx_init_plane_8bppchunky::x#1!=(word) $140) goto gfx_init_plane_8bppchunky::@2 -- vwuz1_neq_vwuc1_then_la1 lda.z x+1 cmp #>$140 bne __b2 @@ -31982,91 +31835,91 @@ gfx_init_plane_8bppchunky: { bne __b2 // gfx_init_plane_8bppchunky::@5 // for(byte y : 0..199) - // [597] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 -- vbuz1=_inc_vbuz1 + // [600] (byte) gfx_init_plane_8bppchunky::y#1 ← ++ (byte) gfx_init_plane_8bppchunky::y#6 -- vbuz1=_inc_vbuz1 inc.z y - // [598] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 -- vbuz1_neq_vbuc1_then_la1 + // [601] if((byte) gfx_init_plane_8bppchunky::y#1!=(byte) $c8) goto gfx_init_plane_8bppchunky::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$c8 cmp.z y bne __b1 - // [599] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@6 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@6] + // [602] phi from gfx_init_plane_8bppchunky::@5 to gfx_init_plane_8bppchunky::@6 [phi:gfx_init_plane_8bppchunky::@5->gfx_init_plane_8bppchunky::@6] // gfx_init_plane_8bppchunky::@6 // dtvSetCpuBankSegment1((byte)($4000/$4000)) - // [600] call dtvSetCpuBankSegment1 - // [501] phi from gfx_init_plane_8bppchunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1] - // [501] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + // [603] call dtvSetCpuBankSegment1 + // [504] phi from gfx_init_plane_8bppchunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1] + // [504] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#13 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_8bppchunky::@6->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 lda #$4000/$4000 jsr dtvSetCpuBankSegment1 // gfx_init_plane_8bppchunky::@return // } - // [601] return + // [604] return rts } // gfx_init_vic_bitmap // Initialize VIC bitmap gfx_init_vic_bitmap: { .const lines_cnt = 9 - .label l = 8 + .label l = $1e // bitmap_init(VIC_BITMAP) - // [603] call bitmap_init - // [755] phi from gfx_init_vic_bitmap to bitmap_init [phi:gfx_init_vic_bitmap->bitmap_init] + // [606] call bitmap_init + // [758] phi from gfx_init_vic_bitmap to bitmap_init [phi:gfx_init_vic_bitmap->bitmap_init] jsr bitmap_init - // [604] phi from gfx_init_vic_bitmap to gfx_init_vic_bitmap::@3 [phi:gfx_init_vic_bitmap->gfx_init_vic_bitmap::@3] + // [607] phi from gfx_init_vic_bitmap to gfx_init_vic_bitmap::@3 [phi:gfx_init_vic_bitmap->gfx_init_vic_bitmap::@3] // gfx_init_vic_bitmap::@3 // bitmap_clear() - // [605] call bitmap_clear + // [608] call bitmap_clear jsr bitmap_clear - // [606] phi from gfx_init_vic_bitmap::@3 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1] - // [606] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) 0 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1#0] -- vbuz1=vbuc1 + // [609] phi from gfx_init_vic_bitmap::@3 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1] + // [609] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) 0 [phi:gfx_init_vic_bitmap::@3->gfx_init_vic_bitmap::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l // gfx_init_vic_bitmap::@1 __b1: // for(byte l=0; lgfx_init_vic_bitmap::@1] - // [606] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) gfx_init_vic_bitmap::l#1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1#0] -- register_copy + // [609] phi from gfx_init_vic_bitmap::@4 to gfx_init_vic_bitmap::@1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1] + // [609] phi (byte) gfx_init_vic_bitmap::l#2 = (byte) gfx_init_vic_bitmap::l#1 [phi:gfx_init_vic_bitmap::@4->gfx_init_vic_bitmap::@1#0] -- register_copy jmp __b1 lines_x: .byte 0, $ff, $ff, 0, 0, $80, $ff, $80, 0, $80 lines_y: .byte 0, 0, $c7, $c7, 0, 0, $64, $c7, $64, 0 } // bitmap_line // Draw a line on the bitmap -// bitmap_line(byte zp(9) x0, byte register(X) x1, byte zp($d) y0, byte zp($11) y1) +// bitmap_line(byte zp(8) x0, byte register(X) x1, byte zp($c) y0, byte zp($10) y1) bitmap_line: { - .label xd = $1f - .label x0 = 9 - .label y0 = $d - .label y1 = $11 + .label xd = $1d + .label x0 = 8 + .label y0 = $c + .label y1 = $10 // if(x0bitmap_line_ydxi] - // [699] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#0 [phi:bitmap_line::@4->bitmap_line_ydxi#0] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#1] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#0 [phi:bitmap_line::@4->bitmap_line_ydxi#2] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#0 [phi:bitmap_line::@4->bitmap_line_ydxi#3] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy + // [627] (byte) bitmap_line_ydxi::xd#0 ← (byte) bitmap_line::xd#2 + // [628] call bitmap_line_ydxi + // [702] phi from bitmap_line::@4 to bitmap_line_ydxi [phi:bitmap_line::@4->bitmap_line_ydxi] + // [702] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#0 [phi:bitmap_line::@4->bitmap_line_ydxi#0] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#1] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#0 [phi:bitmap_line::@4->bitmap_line_ydxi#2] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#0 [phi:bitmap_line::@4->bitmap_line_ydxi#3] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#0 [phi:bitmap_line::@4->bitmap_line_ydxi#4] -- register_copy jsr bitmap_line_ydxi // bitmap_line::@return // } - // [626] return + // [629] return rts // bitmap_line::@8 __b8: // bitmap_line_xdyi(x1, y1, x0, xd, yd) - // [627] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [630] (byte) bitmap_line_xdyi::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyi.x - // [628] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [631] (byte) bitmap_line_xdyi::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_xdyi.y - // [629] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 - // [630] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 - // [631] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuyy + // [632] (byte) bitmap_line_xdyi::x1#0 ← (byte) bitmap_line::x0#0 + // [633] (byte) bitmap_line_xdyi::xd#0 ← (byte) bitmap_line::xd#2 + // [634] (byte) bitmap_line_xdyi::yd#0 ← (byte) bitmap_line::yd#2 -- vbuz1=vbuyy sty.z bitmap_line_xdyi.yd - // [632] call bitmap_line_xdyi - // [677] phi from bitmap_line::@8 to bitmap_line_xdyi [phi:bitmap_line::@8->bitmap_line_xdyi] - // [677] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#0 [phi:bitmap_line::@8->bitmap_line_xdyi#0] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#1] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#0 [phi:bitmap_line::@8->bitmap_line_xdyi#2] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy + // [635] call bitmap_line_xdyi + // [680] phi from bitmap_line::@8 to bitmap_line_xdyi [phi:bitmap_line::@8->bitmap_line_xdyi] + // [680] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#0 [phi:bitmap_line::@8->bitmap_line_xdyi#0] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#1] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#0 [phi:bitmap_line::@8->bitmap_line_xdyi#2] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#0 [phi:bitmap_line::@8->bitmap_line_xdyi#3] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#0 [phi:bitmap_line::@8->bitmap_line_xdyi#4] -- register_copy jsr bitmap_line_xdyi rts // bitmap_line::@7 __b7: // yd = y1-y0 - // [633] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 + // [636] (byte) bitmap_line::yd#1 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 lda.z y1 sec sbc.z y0 tay // if(ydbitmap_line_ydxd] - // [729] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#0 [phi:bitmap_line::@10->bitmap_line_ydxd#0] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#1] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#0 [phi:bitmap_line::@10->bitmap_line_ydxd#2] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy + // [642] (byte) bitmap_line_ydxd::xd#0 ← (byte) bitmap_line::xd#2 + // [643] call bitmap_line_ydxd + // [732] phi from bitmap_line::@10 to bitmap_line_ydxd [phi:bitmap_line::@10->bitmap_line_ydxd] + // [732] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#0 [phi:bitmap_line::@10->bitmap_line_ydxd#0] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#1] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#0 [phi:bitmap_line::@10->bitmap_line_ydxd#2] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#0 [phi:bitmap_line::@10->bitmap_line_ydxd#3] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#0 [phi:bitmap_line::@10->bitmap_line_ydxd#4] -- register_copy jsr bitmap_line_ydxd rts // bitmap_line::@9 __b9: // bitmap_line_xdyd(x1, y1, x0, xd, yd) - // [641] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [644] (byte) bitmap_line_xdyd::x#0 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyd.x - // [642] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 + // [645] (byte) bitmap_line_xdyd::y#0 ← (byte) bitmap_line::y1#0 -- vbuz1=vbuz2 lda.z y1 sta.z bitmap_line_xdyd.y - // [643] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 - // [644] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 - // [645] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuyy + // [646] (byte) bitmap_line_xdyd::x1#0 ← (byte) bitmap_line::x0#0 + // [647] (byte) bitmap_line_xdyd::xd#0 ← (byte) bitmap_line::xd#2 + // [648] (byte) bitmap_line_xdyd::yd#0 ← (byte) bitmap_line::yd#1 -- vbuz1=vbuyy sty.z bitmap_line_xdyd.yd - // [646] call bitmap_line_xdyd - // [714] phi from bitmap_line::@9 to bitmap_line_xdyd [phi:bitmap_line::@9->bitmap_line_xdyd] - // [714] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#0 [phi:bitmap_line::@9->bitmap_line_xdyd#0] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#1] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#0 [phi:bitmap_line::@9->bitmap_line_xdyd#2] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy + // [649] call bitmap_line_xdyd + // [717] phi from bitmap_line::@9 to bitmap_line_xdyd [phi:bitmap_line::@9->bitmap_line_xdyd] + // [717] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#0 [phi:bitmap_line::@9->bitmap_line_xdyd#0] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#1] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#0 [phi:bitmap_line::@9->bitmap_line_xdyd#2] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#0 [phi:bitmap_line::@9->bitmap_line_xdyd#3] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#0 [phi:bitmap_line::@9->bitmap_line_xdyd#4] -- register_copy jsr bitmap_line_xdyd rts // bitmap_line::@1 __b1: // xd = x1-x0 - // [647] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuxx_minus_vbuz2 + // [650] (byte) bitmap_line::xd#1 ← (byte) bitmap_line::x1#0 - (byte) bitmap_line::x0#0 -- vbuz1=vbuxx_minus_vbuz2 txa sec sbc.z x0 sta.z xd // if(y0bitmap_line_ydxd] - // [729] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#1 [phi:bitmap_line::@6->bitmap_line_ydxd#0] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#1] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#1 [phi:bitmap_line::@6->bitmap_line_ydxd#2] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy - // [729] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy + // [658] (byte) bitmap_line_ydxd::xd#1 ← (byte) bitmap_line::xd#1 + // [659] call bitmap_line_ydxd + // [732] phi from bitmap_line::@6 to bitmap_line_ydxd [phi:bitmap_line::@6->bitmap_line_ydxd] + // [732] phi (byte) bitmap_line_ydxd::y1#6 = (byte) bitmap_line_ydxd::y1#1 [phi:bitmap_line::@6->bitmap_line_ydxd#0] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::yd#5 = (byte) bitmap_line_ydxd::yd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#1] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::y#7 = (byte) bitmap_line_ydxd::y#1 [phi:bitmap_line::@6->bitmap_line_ydxd#2] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::x#5 = (byte) bitmap_line_ydxd::x#1 [phi:bitmap_line::@6->bitmap_line_ydxd#3] -- register_copy + // [732] phi (byte) bitmap_line_ydxd::xd#2 = (byte) bitmap_line_ydxd::xd#1 [phi:bitmap_line::@6->bitmap_line_ydxd#4] -- register_copy jsr bitmap_line_ydxd rts // bitmap_line::@12 __b12: // bitmap_line_xdyd(x0, y0, x1, xd, yd) - // [657] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [660] (byte) bitmap_line_xdyd::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyd.x - // [658] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 - // [659] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [661] (byte) bitmap_line_xdyd::y#1 ← (byte) bitmap_line::y0#0 + // [662] (byte) bitmap_line_xdyd::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyd.x1 - // [660] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 - // [661] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuyy + // [663] (byte) bitmap_line_xdyd::xd#1 ← (byte) bitmap_line::xd#1 + // [664] (byte) bitmap_line_xdyd::yd#1 ← (byte) bitmap_line::yd#10 -- vbuz1=vbuyy sty.z bitmap_line_xdyd.yd - // [662] call bitmap_line_xdyd - // [714] phi from bitmap_line::@12 to bitmap_line_xdyd [phi:bitmap_line::@12->bitmap_line_xdyd] - // [714] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#1 [phi:bitmap_line::@12->bitmap_line_xdyd#0] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#1] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#1 [phi:bitmap_line::@12->bitmap_line_xdyd#2] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy - // [714] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy + // [665] call bitmap_line_xdyd + // [717] phi from bitmap_line::@12 to bitmap_line_xdyd [phi:bitmap_line::@12->bitmap_line_xdyd] + // [717] phi (byte) bitmap_line_xdyd::x1#6 = (byte) bitmap_line_xdyd::x1#1 [phi:bitmap_line::@12->bitmap_line_xdyd#0] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::xd#5 = (byte) bitmap_line_xdyd::xd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#1] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::y#5 = (byte) bitmap_line_xdyd::y#1 [phi:bitmap_line::@12->bitmap_line_xdyd#2] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::x#6 = (byte) bitmap_line_xdyd::x#1 [phi:bitmap_line::@12->bitmap_line_xdyd#3] -- register_copy + // [717] phi (byte) bitmap_line_xdyd::yd#2 = (byte) bitmap_line_xdyd::yd#1 [phi:bitmap_line::@12->bitmap_line_xdyd#4] -- register_copy jsr bitmap_line_xdyd rts // bitmap_line::@11 __b11: // yd = y1-y0 - // [663] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 + // [666] (byte) bitmap_line::yd#11 ← (byte) bitmap_line::y1#0 - (byte) bitmap_line::y0#0 -- vbuyy=vbuz1_minus_vbuz2 lda.z y1 sec sbc.z y0 tay // if(ydbitmap_line_ydxi] - // [699] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#1 [phi:bitmap_line::@14->bitmap_line_ydxi#0] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#1] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#1 [phi:bitmap_line::@14->bitmap_line_ydxi#2] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy - // [699] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy + // [672] (byte) bitmap_line_ydxi::xd#1 ← (byte) bitmap_line::xd#1 + // [673] call bitmap_line_ydxi + // [702] phi from bitmap_line::@14 to bitmap_line_ydxi [phi:bitmap_line::@14->bitmap_line_ydxi] + // [702] phi (byte) bitmap_line_ydxi::y1#6 = (byte) bitmap_line_ydxi::y1#1 [phi:bitmap_line::@14->bitmap_line_ydxi#0] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::yd#5 = (byte) bitmap_line_ydxi::yd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#1] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::y#6 = (byte) bitmap_line_ydxi::y#1 [phi:bitmap_line::@14->bitmap_line_ydxi#2] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::x#5 = (byte) bitmap_line_ydxi::x#1 [phi:bitmap_line::@14->bitmap_line_ydxi#3] -- register_copy + // [702] phi (byte) bitmap_line_ydxi::xd#2 = (byte) bitmap_line_ydxi::xd#1 [phi:bitmap_line::@14->bitmap_line_ydxi#4] -- register_copy jsr bitmap_line_ydxi rts // bitmap_line::@13 __b13: // bitmap_line_xdyi(x0, y0, x1, xd, yd) - // [671] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 + // [674] (byte) bitmap_line_xdyi::x#1 ← (byte) bitmap_line::x0#0 -- vbuz1=vbuz2 lda.z x0 sta.z bitmap_line_xdyi.x - // [672] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 - // [673] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx + // [675] (byte) bitmap_line_xdyi::y#1 ← (byte) bitmap_line::y0#0 + // [676] (byte) bitmap_line_xdyi::x1#1 ← (byte) bitmap_line::x1#0 -- vbuz1=vbuxx stx.z bitmap_line_xdyi.x1 - // [674] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 - // [675] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuyy + // [677] (byte) bitmap_line_xdyi::xd#1 ← (byte) bitmap_line::xd#1 + // [678] (byte) bitmap_line_xdyi::yd#1 ← (byte) bitmap_line::yd#11 -- vbuz1=vbuyy sty.z bitmap_line_xdyi.yd - // [676] call bitmap_line_xdyi - // [677] phi from bitmap_line::@13 to bitmap_line_xdyi [phi:bitmap_line::@13->bitmap_line_xdyi] - // [677] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#1 [phi:bitmap_line::@13->bitmap_line_xdyi#0] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#1] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#1 [phi:bitmap_line::@13->bitmap_line_xdyi#2] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy - // [677] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy + // [679] call bitmap_line_xdyi + // [680] phi from bitmap_line::@13 to bitmap_line_xdyi [phi:bitmap_line::@13->bitmap_line_xdyi] + // [680] phi (byte) bitmap_line_xdyi::x1#6 = (byte) bitmap_line_xdyi::x1#1 [phi:bitmap_line::@13->bitmap_line_xdyi#0] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::xd#5 = (byte) bitmap_line_xdyi::xd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#1] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::y#5 = (byte) bitmap_line_xdyi::y#1 [phi:bitmap_line::@13->bitmap_line_xdyi#2] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::x#6 = (byte) bitmap_line_xdyi::x#1 [phi:bitmap_line::@13->bitmap_line_xdyi#3] -- register_copy + // [680] phi (byte) bitmap_line_xdyi::yd#2 = (byte) bitmap_line_xdyi::yd#1 [phi:bitmap_line::@13->bitmap_line_xdyi#4] -- register_copy jsr bitmap_line_xdyi rts } // bitmap_line_xdyi -// bitmap_line_xdyi(byte zp($a) x, byte zp($d) y, byte zp(9) x1, byte zp($1f) xd, byte zp($10) yd) +// bitmap_line_xdyi(byte zp(9) x, byte zp($c) y, byte zp(8) x1, byte zp($1d) xd, byte zp($f) yd) bitmap_line_xdyi: { - .label x = $a - .label y = $d - .label x1 = 9 - .label xd = $1f - .label yd = $10 - .label e = $11 + .label x = 9 + .label y = $c + .label x1 = 8 + .label xd = $1d + .label yd = $f + .label e = $10 // e = yd>>1 - // [678] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [681] (byte) bitmap_line_xdyi::e#0 ← (byte) bitmap_line_xdyi::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z yd lsr sta.z e - // [679] phi from bitmap_line_xdyi bitmap_line_xdyi::@2 to bitmap_line_xdyi::@1 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1] - // [679] phi (byte) bitmap_line_xdyi::e#3 = (byte) bitmap_line_xdyi::e#0 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#0] -- register_copy - // [679] phi (byte) bitmap_line_xdyi::y#3 = (byte) bitmap_line_xdyi::y#5 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#1] -- register_copy - // [679] phi (byte) bitmap_line_xdyi::x#3 = (byte) bitmap_line_xdyi::x#6 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#2] -- register_copy + // [682] phi from bitmap_line_xdyi bitmap_line_xdyi::@2 to bitmap_line_xdyi::@1 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1] + // [682] phi (byte) bitmap_line_xdyi::e#3 = (byte) bitmap_line_xdyi::e#0 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#0] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::y#3 = (byte) bitmap_line_xdyi::y#5 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#1] -- register_copy + // [682] phi (byte) bitmap_line_xdyi::x#3 = (byte) bitmap_line_xdyi::x#6 [phi:bitmap_line_xdyi/bitmap_line_xdyi::@2->bitmap_line_xdyi::@1#2] -- register_copy // bitmap_line_xdyi::@1 __b1: // bitmap_plot(x,y) - // [680] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 -- vbuxx=vbuz1 + // [683] (byte) bitmap_plot::x#0 ← (byte) bitmap_line_xdyi::x#3 -- vbuxx=vbuz1 ldx.z x - // [681] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 -- vbuyy=vbuz1 + // [684] (byte) bitmap_plot::y#0 ← (byte) bitmap_line_xdyi::y#3 -- vbuyy=vbuz1 ldy.z y - // [682] call bitmap_plot - // [692] phi from bitmap_line_xdyi::@1 to bitmap_plot [phi:bitmap_line_xdyi::@1->bitmap_plot] - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#1] -- register_copy + // [685] call bitmap_plot + // [695] phi from bitmap_line_xdyi::@1 to bitmap_plot [phi:bitmap_line_xdyi::@1->bitmap_plot] + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#0 [phi:bitmap_line_xdyi::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot // bitmap_line_xdyi::@4 // x++; - // [683] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 -- vbuz1=_inc_vbuz1 + // [686] (byte) bitmap_line_xdyi::x#2 ← ++ (byte) bitmap_line_xdyi::x#3 -- vbuz1=_inc_vbuz1 inc.z x // e = e+yd - // [684] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [687] (byte) bitmap_line_xdyi::e#1 ← (byte) bitmap_line_xdyi::e#3 + (byte) bitmap_line_xdyi::yd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z yd sta.z e // if(xd=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -- vbuz1_ge_vbuz2_then_la1 + // [688] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z xd cmp.z e bcs __b2 // bitmap_line_xdyi::@3 // y++; - // [686] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 -- vbuz1=_inc_vbuz1 + // [689] (byte) bitmap_line_xdyi::y#2 ← ++ (byte) bitmap_line_xdyi::y#3 -- vbuz1=_inc_vbuz1 inc.z y // e = e - xd - // [687] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [690] (byte) bitmap_line_xdyi::e#2 ← (byte) bitmap_line_xdyi::e#1 - (byte) bitmap_line_xdyi::xd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z xd sta.z e - // [688] phi from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 to bitmap_line_xdyi::@2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2] - // [688] phi (byte) bitmap_line_xdyi::e#6 = (byte) bitmap_line_xdyi::e#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#0] -- register_copy - // [688] phi (byte) bitmap_line_xdyi::y#6 = (byte) bitmap_line_xdyi::y#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#1] -- register_copy + // [691] phi from bitmap_line_xdyi::@3 bitmap_line_xdyi::@4 to bitmap_line_xdyi::@2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2] + // [691] phi (byte) bitmap_line_xdyi::e#6 = (byte) bitmap_line_xdyi::e#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#0] -- register_copy + // [691] phi (byte) bitmap_line_xdyi::y#6 = (byte) bitmap_line_xdyi::y#2 [phi:bitmap_line_xdyi::@3/bitmap_line_xdyi::@4->bitmap_line_xdyi::@2#1] -- register_copy // bitmap_line_xdyi::@2 __b2: // x1+1 - // [689] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [692] (byte~) bitmap_line_xdyi::$6 ← (byte) bitmap_line_xdyi::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z x1 inx // while (x!=(x1+1)) - // [690] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -- vbuz1_neq_vbuxx_then_la1 + // [693] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -- vbuz1_neq_vbuxx_then_la1 cpx.z x bne __b1 // bitmap_line_xdyi::@return // } - // [691] return + // [694] return rts } // bitmap_plot // bitmap_plot(byte register(X) x, byte register(Y) y) bitmap_plot: { - .label plotter_x = $1a - .label plotter_y = $1c - .label plotter = $1a + .label plotter_x = $19 + .label plotter_y = $1b + .label plotter = $19 // plotter_x = { bitmap_plot_xhi[x], bitmap_plot_xlo[x] } - // [693] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx + // [696] (word) bitmap_plot::plotter_x#0 ← *((const byte*) bitmap_plot_xhi + (byte) bitmap_plot::x#4) w= *((const byte*) bitmap_plot_xlo + (byte) bitmap_plot::x#4) -- vwuz1=pbuc1_derefidx_vbuxx_word_pbuc2_derefidx_vbuxx lda bitmap_plot_xhi,x sta.z plotter_x+1 lda bitmap_plot_xlo,x sta.z plotter_x // plotter_y = { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } - // [694] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) -- vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy + // [697] (word) bitmap_plot::plotter_y#0 ← *((const byte*) bitmap_plot_yhi + (byte) bitmap_plot::y#4) w= *((const byte*) bitmap_plot_ylo + (byte) bitmap_plot::y#4) -- vwuz1=pbuc1_derefidx_vbuyy_word_pbuc2_derefidx_vbuyy lda bitmap_plot_yhi,y sta.z plotter_y+1 lda bitmap_plot_ylo,y sta.z plotter_y // plotter_x+plotter_y - // [695] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 -- vwuz1=vwuz1_plus_vwuz2 + // [698] (word) bitmap_plot::plotter#0 ← (word) bitmap_plot::plotter_x#0 + (word) bitmap_plot::plotter_y#0 -- vwuz1=vwuz1_plus_vwuz2 lda.z plotter clc adc.z plotter_y @@ -32413,389 +32266,389 @@ bitmap_plot: { adc.z plotter_y+1 sta.z plotter+1 // *plotter | bitmap_plot_bit[x] - // [696] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx + // [699] (byte~) bitmap_plot::$1 ← *((byte*)(word) bitmap_plot::plotter#0) | *((const byte*) bitmap_plot_bit + (byte) bitmap_plot::x#4) -- vbuaa=_deref_pbuz1_bor_pbuc1_derefidx_vbuxx lda bitmap_plot_bit,x ldy #0 ora (plotter),y // *plotter = *plotter | bitmap_plot_bit[x] - // [697] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 -- _deref_pbuz1=vbuaa + // [700] *((byte*)(word) bitmap_plot::plotter#0) ← (byte~) bitmap_plot::$1 -- _deref_pbuz1=vbuaa sta (plotter),y // bitmap_plot::@return // } - // [698] return + // [701] return rts } // bitmap_line_ydxi -// bitmap_line_ydxi(byte zp($a) y, byte register(X) x, byte zp($11) y1, byte zp(9) yd, byte zp($1f) xd) +// bitmap_line_ydxi(byte zp(9) y, byte register(X) x, byte zp($10) y1, byte zp(8) yd, byte zp($1d) xd) bitmap_line_ydxi: { - .label y = $a - .label y1 = $11 - .label yd = 9 - .label xd = $1f - .label e = $d + .label y = 9 + .label y1 = $10 + .label yd = 8 + .label xd = $1d + .label e = $c // e = xd>>1 - // [700] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [703] (byte) bitmap_line_ydxi::e#0 ← (byte) bitmap_line_ydxi::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z xd lsr sta.z e - // [701] phi from bitmap_line_ydxi bitmap_line_ydxi::@2 to bitmap_line_ydxi::@1 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1] - // [701] phi (byte) bitmap_line_ydxi::e#3 = (byte) bitmap_line_ydxi::e#0 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#0] -- register_copy - // [701] phi (byte) bitmap_line_ydxi::y#3 = (byte) bitmap_line_ydxi::y#6 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#1] -- register_copy - // [701] phi (byte) bitmap_line_ydxi::x#3 = (byte) bitmap_line_ydxi::x#5 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#2] -- register_copy + // [704] phi from bitmap_line_ydxi bitmap_line_ydxi::@2 to bitmap_line_ydxi::@1 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1] + // [704] phi (byte) bitmap_line_ydxi::e#3 = (byte) bitmap_line_ydxi::e#0 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#0] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::y#3 = (byte) bitmap_line_ydxi::y#6 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#1] -- register_copy + // [704] phi (byte) bitmap_line_ydxi::x#3 = (byte) bitmap_line_ydxi::x#5 [phi:bitmap_line_ydxi/bitmap_line_ydxi::@2->bitmap_line_ydxi::@1#2] -- register_copy // bitmap_line_ydxi::@1 __b1: // bitmap_plot(x,y) - // [702] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 - // [703] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 -- vbuyy=vbuz1 + // [705] (byte) bitmap_plot::x#2 ← (byte) bitmap_line_ydxi::x#3 + // [706] (byte) bitmap_plot::y#2 ← (byte) bitmap_line_ydxi::y#3 -- vbuyy=vbuz1 ldy.z y - // [704] call bitmap_plot - // [692] phi from bitmap_line_ydxi::@1 to bitmap_plot [phi:bitmap_line_ydxi::@1->bitmap_plot] - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#1] -- register_copy + // [707] call bitmap_plot + // [695] phi from bitmap_line_ydxi::@1 to bitmap_plot [phi:bitmap_line_ydxi::@1->bitmap_plot] + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#2 [phi:bitmap_line_ydxi::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot // bitmap_line_ydxi::@4 // y++; - // [705] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 -- vbuz1=_inc_vbuz1 + // [708] (byte) bitmap_line_ydxi::y#2 ← ++ (byte) bitmap_line_ydxi::y#3 -- vbuz1=_inc_vbuz1 inc.z y // e = e+xd - // [706] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [709] (byte) bitmap_line_ydxi::e#1 ← (byte) bitmap_line_ydxi::e#3 + (byte) bitmap_line_ydxi::xd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z xd sta.z e // if(yd=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -- vbuz1_ge_vbuz2_then_la1 + // [710] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z yd cmp.z e bcs __b2 // bitmap_line_ydxi::@3 // x++; - // [708] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 -- vbuxx=_inc_vbuxx + // [711] (byte) bitmap_line_ydxi::x#2 ← ++ (byte) bitmap_line_ydxi::x#3 -- vbuxx=_inc_vbuxx inx // e = e - yd - // [709] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [712] (byte) bitmap_line_ydxi::e#2 ← (byte) bitmap_line_ydxi::e#1 - (byte) bitmap_line_ydxi::yd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z yd sta.z e - // [710] phi from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 to bitmap_line_ydxi::@2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2] - // [710] phi (byte) bitmap_line_ydxi::e#6 = (byte) bitmap_line_ydxi::e#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#0] -- register_copy - // [710] phi (byte) bitmap_line_ydxi::x#6 = (byte) bitmap_line_ydxi::x#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#1] -- register_copy + // [713] phi from bitmap_line_ydxi::@3 bitmap_line_ydxi::@4 to bitmap_line_ydxi::@2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2] + // [713] phi (byte) bitmap_line_ydxi::e#6 = (byte) bitmap_line_ydxi::e#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#0] -- register_copy + // [713] phi (byte) bitmap_line_ydxi::x#6 = (byte) bitmap_line_ydxi::x#2 [phi:bitmap_line_ydxi::@3/bitmap_line_ydxi::@4->bitmap_line_ydxi::@2#1] -- register_copy // bitmap_line_ydxi::@2 __b2: // y1+1 - // [711] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 + // [714] (byte~) bitmap_line_ydxi::$6 ← (byte) bitmap_line_ydxi::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 lda.z y1 clc adc #1 // while (y!=(y1+1)) - // [712] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -- vbuz1_neq_vbuaa_then_la1 + // [715] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -- vbuz1_neq_vbuaa_then_la1 cmp.z y bne __b1 // bitmap_line_ydxi::@return // } - // [713] return + // [716] return rts } // bitmap_line_xdyd -// bitmap_line_xdyd(byte zp($10) x, byte zp($d) y, byte zp(9) x1, byte zp($1f) xd, byte zp($a) yd) +// bitmap_line_xdyd(byte zp($f) x, byte zp($c) y, byte zp(8) x1, byte zp($1d) xd, byte zp(9) yd) bitmap_line_xdyd: { - .label x = $10 - .label y = $d - .label x1 = 9 - .label xd = $1f - .label yd = $a - .label e = $11 + .label x = $f + .label y = $c + .label x1 = 8 + .label xd = $1d + .label yd = 9 + .label e = $10 // e = yd>>1 - // [715] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [718] (byte) bitmap_line_xdyd::e#0 ← (byte) bitmap_line_xdyd::yd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z yd lsr sta.z e - // [716] phi from bitmap_line_xdyd bitmap_line_xdyd::@2 to bitmap_line_xdyd::@1 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1] - // [716] phi (byte) bitmap_line_xdyd::e#3 = (byte) bitmap_line_xdyd::e#0 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#0] -- register_copy - // [716] phi (byte) bitmap_line_xdyd::y#3 = (byte) bitmap_line_xdyd::y#5 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#1] -- register_copy - // [716] phi (byte) bitmap_line_xdyd::x#3 = (byte) bitmap_line_xdyd::x#6 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#2] -- register_copy + // [719] phi from bitmap_line_xdyd bitmap_line_xdyd::@2 to bitmap_line_xdyd::@1 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1] + // [719] phi (byte) bitmap_line_xdyd::e#3 = (byte) bitmap_line_xdyd::e#0 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#0] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::y#3 = (byte) bitmap_line_xdyd::y#5 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#1] -- register_copy + // [719] phi (byte) bitmap_line_xdyd::x#3 = (byte) bitmap_line_xdyd::x#6 [phi:bitmap_line_xdyd/bitmap_line_xdyd::@2->bitmap_line_xdyd::@1#2] -- register_copy // bitmap_line_xdyd::@1 __b1: // bitmap_plot(x,y) - // [717] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 -- vbuxx=vbuz1 + // [720] (byte) bitmap_plot::x#1 ← (byte) bitmap_line_xdyd::x#3 -- vbuxx=vbuz1 ldx.z x - // [718] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 -- vbuyy=vbuz1 + // [721] (byte) bitmap_plot::y#1 ← (byte) bitmap_line_xdyd::y#3 -- vbuyy=vbuz1 ldy.z y - // [719] call bitmap_plot - // [692] phi from bitmap_line_xdyd::@1 to bitmap_plot [phi:bitmap_line_xdyd::@1->bitmap_plot] - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#1] -- register_copy + // [722] call bitmap_plot + // [695] phi from bitmap_line_xdyd::@1 to bitmap_plot [phi:bitmap_line_xdyd::@1->bitmap_plot] + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#1 [phi:bitmap_line_xdyd::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot // bitmap_line_xdyd::@4 // x++; - // [720] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 -- vbuz1=_inc_vbuz1 + // [723] (byte) bitmap_line_xdyd::x#2 ← ++ (byte) bitmap_line_xdyd::x#3 -- vbuz1=_inc_vbuz1 inc.z x // e = e+yd - // [721] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [724] (byte) bitmap_line_xdyd::e#1 ← (byte) bitmap_line_xdyd::e#3 + (byte) bitmap_line_xdyd::yd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z yd sta.z e // if(xd=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -- vbuz1_ge_vbuz2_then_la1 + // [725] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z xd cmp.z e bcs __b2 // bitmap_line_xdyd::@3 // y--; - // [723] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 -- vbuz1=_dec_vbuz1 + // [726] (byte) bitmap_line_xdyd::y#2 ← -- (byte) bitmap_line_xdyd::y#3 -- vbuz1=_dec_vbuz1 dec.z y // e = e - xd - // [724] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [727] (byte) bitmap_line_xdyd::e#2 ← (byte) bitmap_line_xdyd::e#1 - (byte) bitmap_line_xdyd::xd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z xd sta.z e - // [725] phi from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 to bitmap_line_xdyd::@2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2] - // [725] phi (byte) bitmap_line_xdyd::e#6 = (byte) bitmap_line_xdyd::e#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#0] -- register_copy - // [725] phi (byte) bitmap_line_xdyd::y#6 = (byte) bitmap_line_xdyd::y#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#1] -- register_copy + // [728] phi from bitmap_line_xdyd::@3 bitmap_line_xdyd::@4 to bitmap_line_xdyd::@2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2] + // [728] phi (byte) bitmap_line_xdyd::e#6 = (byte) bitmap_line_xdyd::e#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#0] -- register_copy + // [728] phi (byte) bitmap_line_xdyd::y#6 = (byte) bitmap_line_xdyd::y#2 [phi:bitmap_line_xdyd::@3/bitmap_line_xdyd::@4->bitmap_line_xdyd::@2#1] -- register_copy // bitmap_line_xdyd::@2 __b2: // x1+1 - // [726] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [729] (byte~) bitmap_line_xdyd::$6 ← (byte) bitmap_line_xdyd::x1#6 + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z x1 inx // while (x!=(x1+1)) - // [727] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -- vbuz1_neq_vbuxx_then_la1 + // [730] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -- vbuz1_neq_vbuxx_then_la1 cpx.z x bne __b1 // bitmap_line_xdyd::@return // } - // [728] return + // [731] return rts } // bitmap_line_ydxd -// bitmap_line_ydxd(byte zp($10) y, byte register(X) x, byte zp($d) y1, byte zp($a) yd, byte zp($1f) xd) +// bitmap_line_ydxd(byte zp($f) y, byte register(X) x, byte zp($c) y1, byte zp(9) yd, byte zp($1d) xd) bitmap_line_ydxd: { - .label y = $10 - .label y1 = $d - .label yd = $a - .label xd = $1f - .label e = $11 + .label y = $f + .label y1 = $c + .label yd = 9 + .label xd = $1d + .label e = $10 // e = xd>>1 - // [730] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 + // [733] (byte) bitmap_line_ydxd::e#0 ← (byte) bitmap_line_ydxd::xd#2 >> (byte) 1 -- vbuz1=vbuz2_ror_1 lda.z xd lsr sta.z e - // [731] phi from bitmap_line_ydxd bitmap_line_ydxd::@2 to bitmap_line_ydxd::@1 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1] - // [731] phi (byte) bitmap_line_ydxd::e#3 = (byte) bitmap_line_ydxd::e#0 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#0] -- register_copy - // [731] phi (byte) bitmap_line_ydxd::y#2 = (byte) bitmap_line_ydxd::y#7 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#1] -- register_copy - // [731] phi (byte) bitmap_line_ydxd::x#3 = (byte) bitmap_line_ydxd::x#5 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#2] -- register_copy + // [734] phi from bitmap_line_ydxd bitmap_line_ydxd::@2 to bitmap_line_ydxd::@1 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1] + // [734] phi (byte) bitmap_line_ydxd::e#3 = (byte) bitmap_line_ydxd::e#0 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#0] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::y#2 = (byte) bitmap_line_ydxd::y#7 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#1] -- register_copy + // [734] phi (byte) bitmap_line_ydxd::x#3 = (byte) bitmap_line_ydxd::x#5 [phi:bitmap_line_ydxd/bitmap_line_ydxd::@2->bitmap_line_ydxd::@1#2] -- register_copy // bitmap_line_ydxd::@1 __b1: // bitmap_plot(x,y) - // [732] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 - // [733] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 -- vbuyy=vbuz1 + // [735] (byte) bitmap_plot::x#3 ← (byte) bitmap_line_ydxd::x#3 + // [736] (byte) bitmap_plot::y#3 ← (byte) bitmap_line_ydxd::y#2 -- vbuyy=vbuz1 ldy.z y - // [734] call bitmap_plot - // [692] phi from bitmap_line_ydxd::@1 to bitmap_plot [phi:bitmap_line_ydxd::@1->bitmap_plot] - // [692] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#0] -- register_copy - // [692] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#1] -- register_copy + // [737] call bitmap_plot + // [695] phi from bitmap_line_ydxd::@1 to bitmap_plot [phi:bitmap_line_ydxd::@1->bitmap_plot] + // [695] phi (byte) bitmap_plot::y#4 = (byte) bitmap_plot::y#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#0] -- register_copy + // [695] phi (byte) bitmap_plot::x#4 = (byte) bitmap_plot::x#3 [phi:bitmap_line_ydxd::@1->bitmap_plot#1] -- register_copy jsr bitmap_plot // bitmap_line_ydxd::@4 // y = y++; - // [735] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 -- vbuz1=_inc_vbuz1 + // [738] (byte) bitmap_line_ydxd::y#3 ← ++ (byte) bitmap_line_ydxd::y#2 -- vbuz1=_inc_vbuz1 inc.z y // e = e+xd - // [736] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 -- vbuz1=vbuz1_plus_vbuz2 + // [739] (byte) bitmap_line_ydxd::e#1 ← (byte) bitmap_line_ydxd::e#3 + (byte) bitmap_line_ydxd::xd#2 -- vbuz1=vbuz1_plus_vbuz2 lda.z e clc adc.z xd sta.z e // if(yd=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -- vbuz1_ge_vbuz2_then_la1 + // [740] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -- vbuz1_ge_vbuz2_then_la1 lda.z yd cmp.z e bcs __b2 // bitmap_line_ydxd::@3 // x--; - // [738] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 -- vbuxx=_dec_vbuxx + // [741] (byte) bitmap_line_ydxd::x#2 ← -- (byte) bitmap_line_ydxd::x#3 -- vbuxx=_dec_vbuxx dex // e = e - yd - // [739] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 -- vbuz1=vbuz1_minus_vbuz2 + // [742] (byte) bitmap_line_ydxd::e#2 ← (byte) bitmap_line_ydxd::e#1 - (byte) bitmap_line_ydxd::yd#5 -- vbuz1=vbuz1_minus_vbuz2 lda.z e sec sbc.z yd sta.z e - // [740] phi from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 to bitmap_line_ydxd::@2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2] - // [740] phi (byte) bitmap_line_ydxd::e#6 = (byte) bitmap_line_ydxd::e#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#0] -- register_copy - // [740] phi (byte) bitmap_line_ydxd::x#6 = (byte) bitmap_line_ydxd::x#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#1] -- register_copy + // [743] phi from bitmap_line_ydxd::@3 bitmap_line_ydxd::@4 to bitmap_line_ydxd::@2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2] + // [743] phi (byte) bitmap_line_ydxd::e#6 = (byte) bitmap_line_ydxd::e#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#0] -- register_copy + // [743] phi (byte) bitmap_line_ydxd::x#6 = (byte) bitmap_line_ydxd::x#2 [phi:bitmap_line_ydxd::@3/bitmap_line_ydxd::@4->bitmap_line_ydxd::@2#1] -- register_copy // bitmap_line_ydxd::@2 __b2: // y1+1 - // [741] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 + // [744] (byte~) bitmap_line_ydxd::$6 ← (byte) bitmap_line_ydxd::y1#6 + (byte) 1 -- vbuaa=vbuz1_plus_1 lda.z y1 clc adc #1 // while (y!=(y1+1)) - // [742] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -- vbuz1_neq_vbuaa_then_la1 + // [745] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -- vbuz1_neq_vbuaa_then_la1 cmp.z y bne __b1 // bitmap_line_ydxd::@return // } - // [743] return + // [746] return rts } // bitmap_clear // Clear all graphics on the bitmap bitmap_clear: { - .label bitmap = $e - .label y = $1f + .label bitmap = $d + .label y = $1d // (byte*) { bitmap_plot_xhi[0], bitmap_plot_xlo[0] } - // [744] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 + // [747] (word) bitmap_clear::bitmap#0 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo) -- vwuz1=_deref_pbuc1_word__deref_pbuc2 lda bitmap_plot_xlo sta.z bitmap lda bitmap_plot_xhi sta.z bitmap+1 - // [745] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 - // [746] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] - // [746] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 + // [748] (byte*) bitmap_clear::bitmap#5 ← (byte*)(word) bitmap_clear::bitmap#0 + // [749] phi from bitmap_clear to bitmap_clear::@1 [phi:bitmap_clear->bitmap_clear::@1] + // [749] phi (byte) bitmap_clear::y#4 = (byte) 0 [phi:bitmap_clear->bitmap_clear::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [746] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy - // [746] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] - // [746] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy - // [746] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy + // [749] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#5 [phi:bitmap_clear->bitmap_clear::@1#1] -- register_copy + // [749] phi from bitmap_clear::@3 to bitmap_clear::@1 [phi:bitmap_clear::@3->bitmap_clear::@1] + // [749] phi (byte) bitmap_clear::y#4 = (byte) bitmap_clear::y#1 [phi:bitmap_clear::@3->bitmap_clear::@1#0] -- register_copy + // [749] phi (byte*) bitmap_clear::bitmap#3 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@3->bitmap_clear::@1#1] -- register_copy // bitmap_clear::@1 __b1: - // [747] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] - // [747] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuxx=vbuc1 + // [750] phi from bitmap_clear::@1 to bitmap_clear::@2 [phi:bitmap_clear::@1->bitmap_clear::@2] + // [750] phi (byte) bitmap_clear::x#2 = (byte) 0 [phi:bitmap_clear::@1->bitmap_clear::@2#0] -- vbuxx=vbuc1 ldx #0 - // [747] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy - // [747] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] - // [747] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy - // [747] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy + // [750] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#3 [phi:bitmap_clear::@1->bitmap_clear::@2#1] -- register_copy + // [750] phi from bitmap_clear::@2 to bitmap_clear::@2 [phi:bitmap_clear::@2->bitmap_clear::@2] + // [750] phi (byte) bitmap_clear::x#2 = (byte) bitmap_clear::x#1 [phi:bitmap_clear::@2->bitmap_clear::@2#0] -- register_copy + // [750] phi (byte*) bitmap_clear::bitmap#2 = (byte*) bitmap_clear::bitmap#1 [phi:bitmap_clear::@2->bitmap_clear::@2#1] -- register_copy // bitmap_clear::@2 __b2: // *bitmap++ = 0 - // [748] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [751] *((byte*) bitmap_clear::bitmap#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (bitmap),y // *bitmap++ = 0; - // [749] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 + // [752] (byte*) bitmap_clear::bitmap#1 ← ++ (byte*) bitmap_clear::bitmap#2 -- pbuz1=_inc_pbuz1 inc.z bitmap bne !+ inc.z bitmap+1 !: // for( byte x: 0..199 ) - // [750] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuxx=_inc_vbuxx + // [753] (byte) bitmap_clear::x#1 ← ++ (byte) bitmap_clear::x#2 -- vbuxx=_inc_vbuxx inx - // [751] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuxx_neq_vbuc1_then_la1 + // [754] if((byte) bitmap_clear::x#1!=(byte) $c8) goto bitmap_clear::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$c8 bne __b2 // bitmap_clear::@3 // for( byte y: 0..39 ) - // [752] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 + // [755] (byte) bitmap_clear::y#1 ← ++ (byte) bitmap_clear::y#4 -- vbuz1=_inc_vbuz1 inc.z y - // [753] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 + // [756] if((byte) bitmap_clear::y#1!=(byte) $28) goto bitmap_clear::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z y bne __b1 // bitmap_clear::@return // } - // [754] return + // [757] return rts } // bitmap_init // Initialize the bitmap plotter tables for a specific bitmap bitmap_init: { - .label __10 = $1f - .label yoffs = $b - // [756] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] - // [756] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#0] -- vbuyy=vbuc1 + .label __10 = $1d + .label yoffs = $a + // [759] phi from bitmap_init to bitmap_init::@1 [phi:bitmap_init->bitmap_init::@1] + // [759] phi (byte) bitmap_init::bits#3 = (byte) $80 [phi:bitmap_init->bitmap_init::@1#0] -- vbuyy=vbuc1 ldy #$80 - // [756] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#1] -- vbuxx=vbuc1 + // [759] phi (byte) bitmap_init::x#2 = (byte) 0 [phi:bitmap_init->bitmap_init::@1#1] -- vbuxx=vbuc1 ldx #0 - // [756] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] - // [756] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy - // [756] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy + // [759] phi from bitmap_init::@2 to bitmap_init::@1 [phi:bitmap_init::@2->bitmap_init::@1] + // [759] phi (byte) bitmap_init::bits#3 = (byte) bitmap_init::bits#4 [phi:bitmap_init::@2->bitmap_init::@1#0] -- register_copy + // [759] phi (byte) bitmap_init::x#2 = (byte) bitmap_init::x#1 [phi:bitmap_init::@2->bitmap_init::@1#1] -- register_copy // bitmap_init::@1 __b1: // x&$f8 - // [757] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 -- vbuaa=vbuxx_band_vbuc1 + // [760] (byte~) bitmap_init::$0 ← (byte) bitmap_init::x#2 & (byte) $f8 -- vbuaa=vbuxx_band_vbuc1 txa and #$f8 // bitmap_plot_xlo[x] = x&$f8 - // [758] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 -- pbuc1_derefidx_vbuxx=vbuaa + // [761] *((const byte*) bitmap_plot_xlo + (byte) bitmap_init::x#2) ← (byte~) bitmap_init::$0 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_xlo,x // bitmap_plot_xhi[x] = >bitmap - // [759] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP -- pbuc1_derefidx_vbuxx=vbuc2 + // [762] *((const byte*) bitmap_plot_xhi + (byte) bitmap_init::x#2) ← >(const byte*) VIC_BITMAP -- pbuc1_derefidx_vbuxx=vbuc2 lda #>VIC_BITMAP sta bitmap_plot_xhi,x // bitmap_plot_bit[x] = bits - // [760] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy + // [763] *((const byte*) bitmap_plot_bit + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3 -- pbuc1_derefidx_vbuxx=vbuyy tya sta bitmap_plot_bit,x // bits = bits>>1 - // [761] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuyy=vbuyy_ror_1 + // [764] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1 -- vbuyy=vbuyy_ror_1 tya lsr tay // if(bits==0) - // [762] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuyy_neq_0_then_la1 + // [765] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6 -- vbuyy_neq_0_then_la1 cpy #0 bne __b2 - // [764] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] - // [764] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuyy=vbuc1 + // [767] phi from bitmap_init::@1 to bitmap_init::@2 [phi:bitmap_init::@1->bitmap_init::@2] + // [767] phi (byte) bitmap_init::bits#4 = (byte) $80 [phi:bitmap_init::@1->bitmap_init::@2#0] -- vbuyy=vbuc1 ldy #$80 - // [763] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] + // [766] phi from bitmap_init::@1 to bitmap_init::@6 [phi:bitmap_init::@1->bitmap_init::@6] // bitmap_init::@6 - // [764] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] - // [764] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy + // [767] phi from bitmap_init::@6 to bitmap_init::@2 [phi:bitmap_init::@6->bitmap_init::@2] + // [767] phi (byte) bitmap_init::bits#4 = (byte) bitmap_init::bits#1 [phi:bitmap_init::@6->bitmap_init::@2#0] -- register_copy // bitmap_init::@2 __b2: // for(byte x : 0..255) - // [765] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx + // [768] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2 -- vbuxx=_inc_vbuxx inx - // [766] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 + // [769] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1 -- vbuxx_neq_0_then_la1 cpx #0 bne __b1 - // [767] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] - // [767] phi (byte*) bitmap_init::yoffs#2 = (byte*) 0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 + // [770] phi from bitmap_init::@2 to bitmap_init::@3 [phi:bitmap_init::@2->bitmap_init::@3] + // [770] phi (byte*) bitmap_init::yoffs#2 = (byte*) 0 [phi:bitmap_init::@2->bitmap_init::@3#0] -- pbuz1=pbuc1 lda #<0 sta.z yoffs sta.z yoffs+1 - // [767] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 + // [770] phi (byte) bitmap_init::y#2 = (byte) 0 [phi:bitmap_init::@2->bitmap_init::@3#1] -- vbuxx=vbuc1 tax - // [767] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] - // [767] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy - // [767] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy + // [770] phi from bitmap_init::@4 to bitmap_init::@3 [phi:bitmap_init::@4->bitmap_init::@3] + // [770] phi (byte*) bitmap_init::yoffs#2 = (byte*) bitmap_init::yoffs#4 [phi:bitmap_init::@4->bitmap_init::@3#0] -- register_copy + // [770] phi (byte) bitmap_init::y#2 = (byte) bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 __b3: // y&$7 - // [768] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 + // [771] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __10 // yoffs - // [772] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 + // [775] (byte~) bitmap_init::$9 ← > (byte*) bitmap_init::yoffs#2 -- vbuaa=_hi_pbuz1 lda.z yoffs+1 // bitmap_plot_yhi[y] = >yoffs - // [773] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 -- pbuc1_derefidx_vbuxx=vbuaa + // [776] *((const byte*) bitmap_plot_yhi + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$9 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x // if((y&$7)==7) - // [774] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 + // [777] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __10 bne __b4 // bitmap_init::@5 // yoffs = yoffs + 40*8 - // [775] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 + // [778] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8 -- pbuz1=pbuz1_plus_vwuc1 clc lda.z yoffs adc #<$28*8 @@ -32803,476 +32656,476 @@ bitmap_init: { lda.z yoffs+1 adc #>$28*8 sta.z yoffs+1 - // [776] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] - // [776] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy + // [779] phi from bitmap_init::@3 bitmap_init::@5 to bitmap_init::@4 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4] + // [779] phi (byte*) bitmap_init::yoffs#4 = (byte*) bitmap_init::yoffs#2 [phi:bitmap_init::@3/bitmap_init::@5->bitmap_init::@4#0] -- register_copy // bitmap_init::@4 __b4: // for(byte y : 0..255) - // [777] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx + // [780] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2 -- vbuxx=_inc_vbuxx inx - // [778] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 + // [781] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3 -- vbuxx_neq_0_then_la1 cpx #0 bne __b3 // bitmap_init::@return // } - // [779] return + // [782] return rts } // gfx_init_charset gfx_init_charset: { - .label charset = $e - .label chargen = $b - .label c = $d + .label charset = $d + .label chargen = $a + .label c = $c // *PROCPORT = $32 - // [780] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 + // [783] *((const byte*) PROCPORT) ← (byte) $32 -- _deref_pbuc1=vbuc2 lda #$32 sta PROCPORT - // [781] phi from gfx_init_charset to gfx_init_charset::@1 [phi:gfx_init_charset->gfx_init_charset::@1] - // [781] phi (byte) gfx_init_charset::c#4 = (byte) 0 [phi:gfx_init_charset->gfx_init_charset::@1#0] -- vbuz1=vbuc1 + // [784] phi from gfx_init_charset to gfx_init_charset::@1 [phi:gfx_init_charset->gfx_init_charset::@1] + // [784] phi (byte) gfx_init_charset::c#4 = (byte) 0 [phi:gfx_init_charset->gfx_init_charset::@1#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [781] phi (byte*) gfx_init_charset::charset#3 = (const byte*) VIC_CHARSET_ROM [phi:gfx_init_charset->gfx_init_charset::@1#1] -- pbuz1=pbuc1 + // [784] phi (byte*) gfx_init_charset::charset#3 = (const byte*) VIC_CHARSET_ROM [phi:gfx_init_charset->gfx_init_charset::@1#1] -- pbuz1=pbuc1 lda #VIC_CHARSET_ROM sta.z charset+1 - // [781] phi (byte*) gfx_init_charset::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_charset->gfx_init_charset::@1#2] -- pbuz1=pbuc1 + // [784] phi (byte*) gfx_init_charset::chargen#3 = (const byte*) CHARGEN [phi:gfx_init_charset->gfx_init_charset::@1#2] -- pbuz1=pbuc1 lda #CHARGEN sta.z chargen+1 - // [781] phi from gfx_init_charset::@3 to gfx_init_charset::@1 [phi:gfx_init_charset::@3->gfx_init_charset::@1] - // [781] phi (byte) gfx_init_charset::c#4 = (byte) gfx_init_charset::c#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#0] -- register_copy - // [781] phi (byte*) gfx_init_charset::charset#3 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#1] -- register_copy - // [781] phi (byte*) gfx_init_charset::chargen#3 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#2] -- register_copy + // [784] phi from gfx_init_charset::@3 to gfx_init_charset::@1 [phi:gfx_init_charset::@3->gfx_init_charset::@1] + // [784] phi (byte) gfx_init_charset::c#4 = (byte) gfx_init_charset::c#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#0] -- register_copy + // [784] phi (byte*) gfx_init_charset::charset#3 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#1] -- register_copy + // [784] phi (byte*) gfx_init_charset::chargen#3 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@3->gfx_init_charset::@1#2] -- register_copy // gfx_init_charset::@1 __b1: - // [782] phi from gfx_init_charset::@1 to gfx_init_charset::@2 [phi:gfx_init_charset::@1->gfx_init_charset::@2] - // [782] phi (byte) gfx_init_charset::l#2 = (byte) 0 [phi:gfx_init_charset::@1->gfx_init_charset::@2#0] -- vbuxx=vbuc1 + // [785] phi from gfx_init_charset::@1 to gfx_init_charset::@2 [phi:gfx_init_charset::@1->gfx_init_charset::@2] + // [785] phi (byte) gfx_init_charset::l#2 = (byte) 0 [phi:gfx_init_charset::@1->gfx_init_charset::@2#0] -- vbuxx=vbuc1 ldx #0 - // [782] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#1] -- register_copy - // [782] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#2] -- register_copy - // [782] phi from gfx_init_charset::@2 to gfx_init_charset::@2 [phi:gfx_init_charset::@2->gfx_init_charset::@2] - // [782] phi (byte) gfx_init_charset::l#2 = (byte) gfx_init_charset::l#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#0] -- register_copy - // [782] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#1] -- register_copy - // [782] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#2] -- register_copy + // [785] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#1] -- register_copy + // [785] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#3 [phi:gfx_init_charset::@1->gfx_init_charset::@2#2] -- register_copy + // [785] phi from gfx_init_charset::@2 to gfx_init_charset::@2 [phi:gfx_init_charset::@2->gfx_init_charset::@2] + // [785] phi (byte) gfx_init_charset::l#2 = (byte) gfx_init_charset::l#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#0] -- register_copy + // [785] phi (byte*) gfx_init_charset::charset#2 = (byte*) gfx_init_charset::charset#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#1] -- register_copy + // [785] phi (byte*) gfx_init_charset::chargen#2 = (byte*) gfx_init_charset::chargen#1 [phi:gfx_init_charset::@2->gfx_init_charset::@2#2] -- register_copy // gfx_init_charset::@2 __b2: // *charset++ = *chargen++ - // [783] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) -- _deref_pbuz1=_deref_pbuz2 + // [786] *((byte*) gfx_init_charset::charset#2) ← *((byte*) gfx_init_charset::chargen#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (chargen),y sta (charset),y // *charset++ = *chargen++; - // [784] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 -- pbuz1=_inc_pbuz1 + // [787] (byte*) gfx_init_charset::charset#1 ← ++ (byte*) gfx_init_charset::charset#2 -- pbuz1=_inc_pbuz1 inc.z charset bne !+ inc.z charset+1 !: - // [785] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 -- pbuz1=_inc_pbuz1 + // [788] (byte*) gfx_init_charset::chargen#1 ← ++ (byte*) gfx_init_charset::chargen#2 -- pbuz1=_inc_pbuz1 inc.z chargen bne !+ inc.z chargen+1 !: // for( byte l: 0..7) - // [786] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 -- vbuxx=_inc_vbuxx + // [789] (byte) gfx_init_charset::l#1 ← ++ (byte) gfx_init_charset::l#2 -- vbuxx=_inc_vbuxx inx - // [787] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 -- vbuxx_neq_vbuc1_then_la1 + // [790] if((byte) gfx_init_charset::l#1!=(byte) 8) goto gfx_init_charset::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b2 // gfx_init_charset::@3 // for(byte c: 0..$ff) - // [788] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 -- vbuz1=_inc_vbuz1 + // [791] (byte) gfx_init_charset::c#1 ← ++ (byte) gfx_init_charset::c#4 -- vbuz1=_inc_vbuz1 inc.z c - // [789] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 -- vbuz1_neq_0_then_la1 + // [792] if((byte) gfx_init_charset::c#1!=(byte) 0) goto gfx_init_charset::@1 -- vbuz1_neq_0_then_la1 lda.z c cmp #0 bne __b1 // gfx_init_charset::@4 // *PROCPORT = $37 - // [790] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 + // [793] *((const byte*) PROCPORT) ← (byte) $37 -- _deref_pbuc1=vbuc2 lda #$37 sta PROCPORT // gfx_init_charset::@return // } - // [791] return + // [794] return rts } // gfx_init_screen4 // Initialize VIC screen 4 - all chars are 00 gfx_init_screen4: { - .label ch = $e - .label cy = $d - // [793] phi from gfx_init_screen4 to gfx_init_screen4::@1 [phi:gfx_init_screen4->gfx_init_screen4::@1] - // [793] phi (byte) gfx_init_screen4::cy#4 = (byte) 0 [phi:gfx_init_screen4->gfx_init_screen4::@1#0] -- vbuz1=vbuc1 + .label ch = $d + .label cy = $c + // [796] phi from gfx_init_screen4 to gfx_init_screen4::@1 [phi:gfx_init_screen4->gfx_init_screen4::@1] + // [796] phi (byte) gfx_init_screen4::cy#4 = (byte) 0 [phi:gfx_init_screen4->gfx_init_screen4::@1#0] -- vbuz1=vbuc1 lda #0 sta.z cy - // [793] phi (byte*) gfx_init_screen4::ch#3 = (const byte*) VIC_SCREEN4 [phi:gfx_init_screen4->gfx_init_screen4::@1#1] -- pbuz1=pbuc1 + // [796] phi (byte*) gfx_init_screen4::ch#3 = (const byte*) VIC_SCREEN4 [phi:gfx_init_screen4->gfx_init_screen4::@1#1] -- pbuz1=pbuc1 lda #VIC_SCREEN4 sta.z ch+1 - // [793] phi from gfx_init_screen4::@3 to gfx_init_screen4::@1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1] - // [793] phi (byte) gfx_init_screen4::cy#4 = (byte) gfx_init_screen4::cy#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#0] -- register_copy - // [793] phi (byte*) gfx_init_screen4::ch#3 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#1] -- register_copy + // [796] phi from gfx_init_screen4::@3 to gfx_init_screen4::@1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1] + // [796] phi (byte) gfx_init_screen4::cy#4 = (byte) gfx_init_screen4::cy#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#0] -- register_copy + // [796] phi (byte*) gfx_init_screen4::ch#3 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@3->gfx_init_screen4::@1#1] -- register_copy // gfx_init_screen4::@1 __b1: - // [794] phi from gfx_init_screen4::@1 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2] - // [794] phi (byte) gfx_init_screen4::cx#2 = (byte) 0 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#0] -- vbuxx=vbuc1 + // [797] phi from gfx_init_screen4::@1 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2] + // [797] phi (byte) gfx_init_screen4::cx#2 = (byte) 0 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#0] -- vbuxx=vbuc1 ldx #0 - // [794] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#3 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#1] -- register_copy - // [794] phi from gfx_init_screen4::@2 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2] - // [794] phi (byte) gfx_init_screen4::cx#2 = (byte) gfx_init_screen4::cx#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#0] -- register_copy - // [794] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#1] -- register_copy + // [797] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#3 [phi:gfx_init_screen4::@1->gfx_init_screen4::@2#1] -- register_copy + // [797] phi from gfx_init_screen4::@2 to gfx_init_screen4::@2 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2] + // [797] phi (byte) gfx_init_screen4::cx#2 = (byte) gfx_init_screen4::cx#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#0] -- register_copy + // [797] phi (byte*) gfx_init_screen4::ch#2 = (byte*) gfx_init_screen4::ch#1 [phi:gfx_init_screen4::@2->gfx_init_screen4::@2#1] -- register_copy // gfx_init_screen4::@2 __b2: // *ch++ = 0 - // [795] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [798] *((byte*) gfx_init_screen4::ch#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (ch),y // *ch++ = 0; - // [796] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 -- pbuz1=_inc_pbuz1 + // [799] (byte*) gfx_init_screen4::ch#1 ← ++ (byte*) gfx_init_screen4::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: // for(byte cx: 0..39) - // [797] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 -- vbuxx=_inc_vbuxx + // [800] (byte) gfx_init_screen4::cx#1 ← ++ (byte) gfx_init_screen4::cx#2 -- vbuxx=_inc_vbuxx inx - // [798] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 -- vbuxx_neq_vbuc1_then_la1 + // [801] if((byte) gfx_init_screen4::cx#1!=(byte) $28) goto gfx_init_screen4::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_screen4::@3 // for(byte cy: 0..24 ) - // [799] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 -- vbuz1=_inc_vbuz1 + // [802] (byte) gfx_init_screen4::cy#1 ← ++ (byte) gfx_init_screen4::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [800] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 -- vbuz1_neq_vbuc1_then_la1 + // [803] if((byte) gfx_init_screen4::cy#1!=(byte) $19) goto gfx_init_screen4::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1 // gfx_init_screen4::@return // } - // [801] return + // [804] return rts } // gfx_init_screen3 // Initialize VIC screen 3 ( value is %00xx00yy where xx is xpos and yy is ypos gfx_init_screen3: { - .label __1 = $1e - .label ch = $16 - .label cy = $10 - // [803] phi from gfx_init_screen3 to gfx_init_screen3::@1 [phi:gfx_init_screen3->gfx_init_screen3::@1] - // [803] phi (byte*) gfx_init_screen3::ch#3 = (const byte*) VIC_SCREEN3 [phi:gfx_init_screen3->gfx_init_screen3::@1#0] -- pbuz1=pbuc1 + .label __1 = $1d + .label ch = $11 + .label cy = $f + // [806] phi from gfx_init_screen3 to gfx_init_screen3::@1 [phi:gfx_init_screen3->gfx_init_screen3::@1] + // [806] phi (byte*) gfx_init_screen3::ch#3 = (const byte*) VIC_SCREEN3 [phi:gfx_init_screen3->gfx_init_screen3::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN3 sta.z ch+1 - // [803] phi (byte) gfx_init_screen3::cy#4 = (byte) 0 [phi:gfx_init_screen3->gfx_init_screen3::@1#1] -- vbuz1=vbuc1 + // [806] phi (byte) gfx_init_screen3::cy#4 = (byte) 0 [phi:gfx_init_screen3->gfx_init_screen3::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy - // [803] phi from gfx_init_screen3::@3 to gfx_init_screen3::@1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1] - // [803] phi (byte*) gfx_init_screen3::ch#3 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#0] -- register_copy - // [803] phi (byte) gfx_init_screen3::cy#4 = (byte) gfx_init_screen3::cy#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#1] -- register_copy + // [806] phi from gfx_init_screen3::@3 to gfx_init_screen3::@1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1] + // [806] phi (byte*) gfx_init_screen3::ch#3 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#0] -- register_copy + // [806] phi (byte) gfx_init_screen3::cy#4 = (byte) gfx_init_screen3::cy#1 [phi:gfx_init_screen3::@3->gfx_init_screen3::@1#1] -- register_copy // gfx_init_screen3::@1 __b1: - // [804] phi from gfx_init_screen3::@1 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2] - // [804] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#3 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#0] -- register_copy - // [804] phi (byte) gfx_init_screen3::cx#2 = (byte) 0 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#1] -- vbuxx=vbuc1 + // [807] phi from gfx_init_screen3::@1 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2] + // [807] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#3 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#0] -- register_copy + // [807] phi (byte) gfx_init_screen3::cx#2 = (byte) 0 [phi:gfx_init_screen3::@1->gfx_init_screen3::@2#1] -- vbuxx=vbuc1 ldx #0 - // [804] phi from gfx_init_screen3::@2 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2] - // [804] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#0] -- register_copy - // [804] phi (byte) gfx_init_screen3::cx#2 = (byte) gfx_init_screen3::cx#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#1] -- register_copy + // [807] phi from gfx_init_screen3::@2 to gfx_init_screen3::@2 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2] + // [807] phi (byte*) gfx_init_screen3::ch#2 = (byte*) gfx_init_screen3::ch#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#0] -- register_copy + // [807] phi (byte) gfx_init_screen3::cx#2 = (byte) gfx_init_screen3::cx#1 [phi:gfx_init_screen3::@2->gfx_init_screen3::@2#1] -- register_copy // gfx_init_screen3::@2 __b2: // cx&3 - // [805] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 -- vbuaa=vbuxx_band_vbuc1 + // [808] (byte~) gfx_init_screen3::$0 ← (byte) gfx_init_screen3::cx#2 & (byte) 3 -- vbuaa=vbuxx_band_vbuc1 txa and #3 // (cx&3)*$10 - // [806] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 + // [809] (byte~) gfx_init_screen3::$1 ← (byte~) gfx_init_screen3::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 asl asl asl asl sta.z __1 // cy&3 - // [807] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 -- vbuaa=vbuz1_band_vbuc1 + // [810] (byte~) gfx_init_screen3::$2 ← (byte) gfx_init_screen3::cy#4 & (byte) 3 -- vbuaa=vbuz1_band_vbuc1 lda #3 and.z cy // (cx&3)*$10|(cy&3) - // [808] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 -- vbuaa=vbuz1_bor_vbuaa + // [811] (byte~) gfx_init_screen3::$3 ← (byte~) gfx_init_screen3::$1 | (byte~) gfx_init_screen3::$2 -- vbuaa=vbuz1_bor_vbuaa ora.z __1 // *ch++ = (cx&3)*$10|(cy&3) - // [809] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 -- _deref_pbuz1=vbuaa + // [812] *((byte*) gfx_init_screen3::ch#2) ← (byte~) gfx_init_screen3::$3 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y // *ch++ = (cx&3)*$10|(cy&3); - // [810] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 -- pbuz1=_inc_pbuz1 + // [813] (byte*) gfx_init_screen3::ch#1 ← ++ (byte*) gfx_init_screen3::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: // for(byte cx: 0..39) - // [811] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 -- vbuxx=_inc_vbuxx + // [814] (byte) gfx_init_screen3::cx#1 ← ++ (byte) gfx_init_screen3::cx#2 -- vbuxx=_inc_vbuxx inx - // [812] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 -- vbuxx_neq_vbuc1_then_la1 + // [815] if((byte) gfx_init_screen3::cx#1!=(byte) $28) goto gfx_init_screen3::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_screen3::@3 // for(byte cy: 0..24 ) - // [813] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 -- vbuz1=_inc_vbuz1 + // [816] (byte) gfx_init_screen3::cy#1 ← ++ (byte) gfx_init_screen3::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [814] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 -- vbuz1_neq_vbuc1_then_la1 + // [817] if((byte) gfx_init_screen3::cy#1!=(byte) $19) goto gfx_init_screen3::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1 // gfx_init_screen3::@return // } - // [815] return + // [818] return rts } // gfx_init_screen2 // Initialize VIC screen 2 ( value is %ccccrrrr where cccc is (x+y mod $f) and rrrr is %1111-%cccc) gfx_init_screen2: { - .label col2 = $1f - .label ch = $16 - .label cy = $10 - // [817] phi from gfx_init_screen2 to gfx_init_screen2::@1 [phi:gfx_init_screen2->gfx_init_screen2::@1] - // [817] phi (byte*) gfx_init_screen2::ch#3 = (const byte*) VIC_SCREEN2 [phi:gfx_init_screen2->gfx_init_screen2::@1#0] -- pbuz1=pbuc1 + .label col2 = $1e + .label ch = $11 + .label cy = $f + // [820] phi from gfx_init_screen2 to gfx_init_screen2::@1 [phi:gfx_init_screen2->gfx_init_screen2::@1] + // [820] phi (byte*) gfx_init_screen2::ch#3 = (const byte*) VIC_SCREEN2 [phi:gfx_init_screen2->gfx_init_screen2::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN2 sta.z ch+1 - // [817] phi (byte) gfx_init_screen2::cy#4 = (byte) 0 [phi:gfx_init_screen2->gfx_init_screen2::@1#1] -- vbuz1=vbuc1 + // [820] phi (byte) gfx_init_screen2::cy#4 = (byte) 0 [phi:gfx_init_screen2->gfx_init_screen2::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy - // [817] phi from gfx_init_screen2::@3 to gfx_init_screen2::@1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1] - // [817] phi (byte*) gfx_init_screen2::ch#3 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#0] -- register_copy - // [817] phi (byte) gfx_init_screen2::cy#4 = (byte) gfx_init_screen2::cy#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#1] -- register_copy + // [820] phi from gfx_init_screen2::@3 to gfx_init_screen2::@1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1] + // [820] phi (byte*) gfx_init_screen2::ch#3 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#0] -- register_copy + // [820] phi (byte) gfx_init_screen2::cy#4 = (byte) gfx_init_screen2::cy#1 [phi:gfx_init_screen2::@3->gfx_init_screen2::@1#1] -- register_copy // gfx_init_screen2::@1 __b1: - // [818] phi from gfx_init_screen2::@1 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2] - // [818] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#3 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#0] -- register_copy - // [818] phi (byte) gfx_init_screen2::cx#2 = (byte) 0 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#1] -- vbuxx=vbuc1 + // [821] phi from gfx_init_screen2::@1 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2] + // [821] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#3 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#0] -- register_copy + // [821] phi (byte) gfx_init_screen2::cx#2 = (byte) 0 [phi:gfx_init_screen2::@1->gfx_init_screen2::@2#1] -- vbuxx=vbuc1 ldx #0 - // [818] phi from gfx_init_screen2::@2 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2] - // [818] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#0] -- register_copy - // [818] phi (byte) gfx_init_screen2::cx#2 = (byte) gfx_init_screen2::cx#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#1] -- register_copy + // [821] phi from gfx_init_screen2::@2 to gfx_init_screen2::@2 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2] + // [821] phi (byte*) gfx_init_screen2::ch#2 = (byte*) gfx_init_screen2::ch#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#0] -- register_copy + // [821] phi (byte) gfx_init_screen2::cx#2 = (byte) gfx_init_screen2::cx#1 [phi:gfx_init_screen2::@2->gfx_init_screen2::@2#1] -- register_copy // gfx_init_screen2::@2 __b2: // cx+cy - // [819] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 -- vbuaa=vbuxx_plus_vbuz1 + // [822] (byte~) gfx_init_screen2::$0 ← (byte) gfx_init_screen2::cx#2 + (byte) gfx_init_screen2::cy#4 -- vbuaa=vbuxx_plus_vbuz1 txa clc adc.z cy // col = (cx+cy)&$f - // [820] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f -- vbuyy=vbuaa_band_vbuc1 + // [823] (byte) gfx_init_screen2::col#0 ← (byte~) gfx_init_screen2::$0 & (byte) $f -- vbuyy=vbuaa_band_vbuc1 and #$f tay // col2 = ($f-col) - // [821] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 -- vbuz1=vbuc1_minus_vbuyy + // [824] (byte) gfx_init_screen2::col2#0 ← (byte) $f - (byte) gfx_init_screen2::col#0 -- vbuz1=vbuc1_minus_vbuyy tya eor #$ff clc adc #$f+1 sta.z col2 // col*$10 - // [822] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 -- vbuaa=vbuyy_rol_4 + // [825] (byte~) gfx_init_screen2::$3 ← (byte) gfx_init_screen2::col#0 << (byte) 4 -- vbuaa=vbuyy_rol_4 tya asl asl asl asl // col*$10 | col2 - // [823] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 -- vbuaa=vbuaa_bor_vbuz1 + // [826] (byte~) gfx_init_screen2::$4 ← (byte~) gfx_init_screen2::$3 | (byte) gfx_init_screen2::col2#0 -- vbuaa=vbuaa_bor_vbuz1 ora.z col2 // *ch++ = col*$10 | col2 - // [824] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 -- _deref_pbuz1=vbuaa + // [827] *((byte*) gfx_init_screen2::ch#2) ← (byte~) gfx_init_screen2::$4 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y // *ch++ = col*$10 | col2; - // [825] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 -- pbuz1=_inc_pbuz1 + // [828] (byte*) gfx_init_screen2::ch#1 ← ++ (byte*) gfx_init_screen2::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: // for(byte cx: 0..39) - // [826] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 -- vbuxx=_inc_vbuxx + // [829] (byte) gfx_init_screen2::cx#1 ← ++ (byte) gfx_init_screen2::cx#2 -- vbuxx=_inc_vbuxx inx - // [827] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 -- vbuxx_neq_vbuc1_then_la1 + // [830] if((byte) gfx_init_screen2::cx#1!=(byte) $28) goto gfx_init_screen2::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_screen2::@3 // for(byte cy: 0..24 ) - // [828] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 -- vbuz1=_inc_vbuz1 + // [831] (byte) gfx_init_screen2::cy#1 ← ++ (byte) gfx_init_screen2::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [829] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 -- vbuz1_neq_vbuc1_then_la1 + // [832] if((byte) gfx_init_screen2::cy#1!=(byte) $19) goto gfx_init_screen2::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1 // gfx_init_screen2::@return // } - // [830] return + // [833] return rts } // gfx_init_screen1 // Initialize VIC screen 1 ( value is %0000cccc where cccc is (x+y mod $f)) gfx_init_screen1: { - .label ch = $16 - .label cy = $11 - // [832] phi from gfx_init_screen1 to gfx_init_screen1::@1 [phi:gfx_init_screen1->gfx_init_screen1::@1] - // [832] phi (byte*) gfx_init_screen1::ch#3 = (const byte*) VIC_SCREEN1 [phi:gfx_init_screen1->gfx_init_screen1::@1#0] -- pbuz1=pbuc1 + .label ch = $11 + .label cy = $10 + // [835] phi from gfx_init_screen1 to gfx_init_screen1::@1 [phi:gfx_init_screen1->gfx_init_screen1::@1] + // [835] phi (byte*) gfx_init_screen1::ch#3 = (const byte*) VIC_SCREEN1 [phi:gfx_init_screen1->gfx_init_screen1::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN1 sta.z ch+1 - // [832] phi (byte) gfx_init_screen1::cy#4 = (byte) 0 [phi:gfx_init_screen1->gfx_init_screen1::@1#1] -- vbuz1=vbuc1 + // [835] phi (byte) gfx_init_screen1::cy#4 = (byte) 0 [phi:gfx_init_screen1->gfx_init_screen1::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy - // [832] phi from gfx_init_screen1::@3 to gfx_init_screen1::@1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1] - // [832] phi (byte*) gfx_init_screen1::ch#3 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#0] -- register_copy - // [832] phi (byte) gfx_init_screen1::cy#4 = (byte) gfx_init_screen1::cy#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#1] -- register_copy + // [835] phi from gfx_init_screen1::@3 to gfx_init_screen1::@1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1] + // [835] phi (byte*) gfx_init_screen1::ch#3 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#0] -- register_copy + // [835] phi (byte) gfx_init_screen1::cy#4 = (byte) gfx_init_screen1::cy#1 [phi:gfx_init_screen1::@3->gfx_init_screen1::@1#1] -- register_copy // gfx_init_screen1::@1 __b1: - // [833] phi from gfx_init_screen1::@1 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2] - // [833] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#3 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#0] -- register_copy - // [833] phi (byte) gfx_init_screen1::cx#2 = (byte) 0 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#1] -- vbuxx=vbuc1 + // [836] phi from gfx_init_screen1::@1 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2] + // [836] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#3 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#0] -- register_copy + // [836] phi (byte) gfx_init_screen1::cx#2 = (byte) 0 [phi:gfx_init_screen1::@1->gfx_init_screen1::@2#1] -- vbuxx=vbuc1 ldx #0 - // [833] phi from gfx_init_screen1::@2 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2] - // [833] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#0] -- register_copy - // [833] phi (byte) gfx_init_screen1::cx#2 = (byte) gfx_init_screen1::cx#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#1] -- register_copy + // [836] phi from gfx_init_screen1::@2 to gfx_init_screen1::@2 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2] + // [836] phi (byte*) gfx_init_screen1::ch#2 = (byte*) gfx_init_screen1::ch#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#0] -- register_copy + // [836] phi (byte) gfx_init_screen1::cx#2 = (byte) gfx_init_screen1::cx#1 [phi:gfx_init_screen1::@2->gfx_init_screen1::@2#1] -- register_copy // gfx_init_screen1::@2 __b2: // cx+cy - // [834] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 -- vbuaa=vbuxx_plus_vbuz1 + // [837] (byte~) gfx_init_screen1::$0 ← (byte) gfx_init_screen1::cx#2 + (byte) gfx_init_screen1::cy#4 -- vbuaa=vbuxx_plus_vbuz1 txa clc adc.z cy // (cx+cy)&$f - // [835] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f -- vbuaa=vbuaa_band_vbuc1 + // [838] (byte~) gfx_init_screen1::$1 ← (byte~) gfx_init_screen1::$0 & (byte) $f -- vbuaa=vbuaa_band_vbuc1 and #$f // *ch++ = (cx+cy)&$f - // [836] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 -- _deref_pbuz1=vbuaa + // [839] *((byte*) gfx_init_screen1::ch#2) ← (byte~) gfx_init_screen1::$1 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y // *ch++ = (cx+cy)&$f; - // [837] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 -- pbuz1=_inc_pbuz1 + // [840] (byte*) gfx_init_screen1::ch#1 ← ++ (byte*) gfx_init_screen1::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: // for(byte cx: 0..39) - // [838] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 -- vbuxx=_inc_vbuxx + // [841] (byte) gfx_init_screen1::cx#1 ← ++ (byte) gfx_init_screen1::cx#2 -- vbuxx=_inc_vbuxx inx - // [839] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 -- vbuxx_neq_vbuc1_then_la1 + // [842] if((byte) gfx_init_screen1::cx#1!=(byte) $28) goto gfx_init_screen1::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_screen1::@3 // for(byte cy: 0..24 ) - // [840] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 -- vbuz1=_inc_vbuz1 + // [843] (byte) gfx_init_screen1::cy#1 ← ++ (byte) gfx_init_screen1::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [841] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 -- vbuz1_neq_vbuc1_then_la1 + // [844] if((byte) gfx_init_screen1::cy#1!=(byte) $19) goto gfx_init_screen1::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1 // gfx_init_screen1::@return // } - // [842] return + // [845] return rts } // gfx_init_screen0 // Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) gfx_init_screen0: { - .label __1 = $1f - .label ch = $16 - .label cy = $11 - // [844] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] - // [844] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) VIC_SCREEN0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 + .label __1 = $1e + .label ch = $11 + .label cy = $10 + // [847] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] + // [847] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) VIC_SCREEN0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 lda #VIC_SCREEN0 sta.z ch+1 - // [844] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 + // [847] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 lda #0 sta.z cy - // [844] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] - // [844] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy - // [844] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy + // [847] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] + // [847] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy + // [847] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy // gfx_init_screen0::@1 __b1: - // [845] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] - // [845] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy - // [845] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 + // [848] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] + // [848] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy + // [848] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 ldx #0 - // [845] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] - // [845] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy - // [845] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy + // [848] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] + // [848] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy + // [848] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy // gfx_init_screen0::@2 __b2: // cy&$f - // [846] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 + // [849] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 lda #$f and.z cy // (cy&$f)*$10 - // [847] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 + // [850] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4 asl asl asl asl sta.z __1 // cx&$f - // [848] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 + // [851] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 txa and #$f // (cy&$f)*$10|(cx&$f) - // [849] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa + // [852] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa ora.z __1 // *ch++ = (cy&$f)*$10|(cx&$f) - // [850] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa + // [853] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa ldy #0 sta (ch),y // *ch++ = (cy&$f)*$10|(cx&$f); - // [851] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 + // [854] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1 inc.z ch bne !+ inc.z ch+1 !: // for(byte cx: 0..39) - // [852] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx + // [855] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx inx - // [853] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1 + // [856] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b2 // gfx_init_screen0::@3 // for(byte cy: 0..24 ) - // [854] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 + // [857] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1 inc.z cy - // [855] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 + // [858] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z cy bne __b1 // gfx_init_screen0::@return // } - // [856] return + // [859] return rts } // keyboard_init // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { // *CIA1_PORT_A_DDR = $ff - // [857] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff -- _deref_pbuc1=vbuc2 + // [860] *((const byte*) CIA1_PORT_A_DDR) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR // *CIA1_PORT_B_DDR = $00 - // [858] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [861] *((const byte*) CIA1_PORT_B_DDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR // keyboard_init::@return // } - // [859] return + // [862] return rts } // File Data diff --git a/src/test/ref/c64dtv-gfxexplorer.sym b/src/test/ref/c64dtv-gfxexplorer.sym index 3b9bfd0ce..9f611d47c 100644 --- a/src/test/ref/c64dtv-gfxexplorer.sym +++ b/src/test/ref/c64dtv-gfxexplorer.sym @@ -115,27 +115,27 @@ (byte) apply_preset::idx (byte) apply_preset::idx#0 reg byte a 11.18181818181818 (byte*) apply_preset::preset -(byte*) apply_preset::preset#15 preset zp[2]:14 200.2 +(byte*) apply_preset::preset#15 preset zp[2]:13 200.2 (void()) bitmap_clear() (label) bitmap_clear::@1 (label) bitmap_clear::@2 (label) bitmap_clear::@3 (label) bitmap_clear::@return (byte*) bitmap_clear::bitmap -(word) bitmap_clear::bitmap#0 bitmap zp[2]:14 2.0 -(byte*) bitmap_clear::bitmap#1 bitmap zp[2]:14 42.599999999999994 -(byte*) bitmap_clear::bitmap#2 bitmap zp[2]:14 157.0 -(byte*) bitmap_clear::bitmap#3 bitmap zp[2]:14 24.0 -(byte*) bitmap_clear::bitmap#5 bitmap zp[2]:14 4.0 +(word) bitmap_clear::bitmap#0 bitmap zp[2]:13 2.0 +(byte*) bitmap_clear::bitmap#1 bitmap zp[2]:13 42.599999999999994 +(byte*) bitmap_clear::bitmap#2 bitmap zp[2]:13 157.0 +(byte*) bitmap_clear::bitmap#3 bitmap zp[2]:13 24.0 +(byte*) bitmap_clear::bitmap#5 bitmap zp[2]:13 4.0 (byte) bitmap_clear::x (byte) bitmap_clear::x#1 reg byte x 151.5 (byte) bitmap_clear::x#2 reg byte x 67.33333333333333 (byte) bitmap_clear::y -(byte) bitmap_clear::y#1 y zp[1]:31 16.5 -(byte) bitmap_clear::y#4 y zp[1]:31 3.6666666666666665 +(byte) bitmap_clear::y#1 y zp[1]:29 16.5 +(byte) bitmap_clear::y#4 y zp[1]:29 3.6666666666666665 (void()) bitmap_init((byte*) bitmap_init::bitmap) (byte~) bitmap_init::$0 reg byte a 22.0 -(byte~) bitmap_init::$10 zp[1]:31 5.5 +(byte~) bitmap_init::$10 zp[1]:29 5.5 (byte~) bitmap_init::$7 reg byte a 22.0 (byte~) bitmap_init::$8 reg byte a 22.0 (byte~) bitmap_init::$9 reg byte a 22.0 @@ -158,9 +158,9 @@ (byte) bitmap_init::y#1 reg byte x 16.5 (byte) bitmap_init::y#2 reg byte x 5.5 (byte*) bitmap_init::yoffs -(byte*) bitmap_init::yoffs#1 yoffs zp[2]:11 22.0 -(byte*) bitmap_init::yoffs#2 yoffs zp[2]:11 6.875 -(byte*) bitmap_init::yoffs#4 yoffs zp[2]:11 11.0 +(byte*) bitmap_init::yoffs#1 yoffs zp[2]:10 22.0 +(byte*) bitmap_init::yoffs#2 yoffs zp[2]:10 6.875 +(byte*) bitmap_init::yoffs#4 yoffs zp[2]:10 11.0 (void()) bitmap_line((byte) bitmap_line::x0 , (byte) bitmap_line::x1 , (byte) bitmap_line::y0 , (byte) bitmap_line::y1) (label) bitmap_line::@1 (label) bitmap_line::@10 @@ -178,16 +178,16 @@ (label) bitmap_line::@9 (label) bitmap_line::@return (byte) bitmap_line::x0 -(byte) bitmap_line::x0#0 x0 zp[1]:9 1.260869565217391 +(byte) bitmap_line::x0#0 x0 zp[1]:8 1.260869565217391 (byte) bitmap_line::x1 (byte) bitmap_line::x1#0 reg byte x 1.3181818181818181 (byte) bitmap_line::xd -(byte) bitmap_line::xd#1 xd zp[1]:31 0.7 -(byte) bitmap_line::xd#2 xd zp[1]:31 0.7 +(byte) bitmap_line::xd#1 xd zp[1]:29 0.7 +(byte) bitmap_line::xd#2 xd zp[1]:29 0.7 (byte) bitmap_line::y0 -(byte) bitmap_line::y0#0 y0 zp[1]:13 1.6666666666666674 +(byte) bitmap_line::y0#0 y0 zp[1]:12 1.6666666666666674 (byte) bitmap_line::y1 -(byte) bitmap_line::y1#0 y1 zp[1]:17 1.7500000000000007 +(byte) bitmap_line::y1#0 y1 zp[1]:16 1.7500000000000007 (byte) bitmap_line::yd (byte) bitmap_line::yd#1 reg byte y 0.8888888888888888 (byte) bitmap_line::yd#10 reg byte y 0.8888888888888888 @@ -201,36 +201,36 @@ (label) bitmap_line_xdyd::@4 (label) bitmap_line_xdyd::@return (byte) bitmap_line_xdyd::e -(byte) bitmap_line_xdyd::e#0 e zp[1]:17 4.0 -(byte) bitmap_line_xdyd::e#1 e zp[1]:17 134.66666666666666 -(byte) bitmap_line_xdyd::e#2 e zp[1]:17 202.0 -(byte) bitmap_line_xdyd::e#3 e zp[1]:17 40.8 -(byte) bitmap_line_xdyd::e#6 e zp[1]:17 101.0 +(byte) bitmap_line_xdyd::e#0 e zp[1]:16 4.0 +(byte) bitmap_line_xdyd::e#1 e zp[1]:16 134.66666666666666 +(byte) bitmap_line_xdyd::e#2 e zp[1]:16 202.0 +(byte) bitmap_line_xdyd::e#3 e zp[1]:16 40.8 +(byte) bitmap_line_xdyd::e#6 e zp[1]:16 101.0 (byte) bitmap_line_xdyd::x -(byte) bitmap_line_xdyd::x#0 x zp[1]:16 0.8 -(byte) bitmap_line_xdyd::x#1 x zp[1]:16 0.8 -(byte) bitmap_line_xdyd::x#2 x zp[1]:16 37.875 -(byte) bitmap_line_xdyd::x#3 x zp[1]:16 76.25 -(byte) bitmap_line_xdyd::x#6 x zp[1]:16 3.0 +(byte) bitmap_line_xdyd::x#0 x zp[1]:15 0.8 +(byte) bitmap_line_xdyd::x#1 x zp[1]:15 0.8 +(byte) bitmap_line_xdyd::x#2 x zp[1]:15 37.875 +(byte) bitmap_line_xdyd::x#3 x zp[1]:15 76.25 +(byte) bitmap_line_xdyd::x#6 x zp[1]:15 3.0 (byte) bitmap_line_xdyd::x1 -(byte) bitmap_line_xdyd::x1#0 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyd::x1#1 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyd::x1#6 x1 zp[1]:9 7.5 +(byte) bitmap_line_xdyd::x1#0 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyd::x1#1 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyd::x1#6 x1 zp[1]:8 7.5 (byte) bitmap_line_xdyd::xd -(byte) bitmap_line_xdyd::xd#0 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyd::xd#1 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyd::xd#5 xd zp[1]:31 14.714285714285715 +(byte) bitmap_line_xdyd::xd#0 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyd::xd#1 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyd::xd#5 xd zp[1]:29 14.714285714285715 (byte) bitmap_line_xdyd::y -(byte) bitmap_line_xdyd::y#0 y zp[1]:13 1.0 -(byte) bitmap_line_xdyd::y#1 y zp[1]:13 1.0 -(byte) bitmap_line_xdyd::y#2 y zp[1]:13 101.0 -(byte) bitmap_line_xdyd::y#3 y zp[1]:13 58.00000000000001 -(byte) bitmap_line_xdyd::y#5 y zp[1]:13 3.0 -(byte) bitmap_line_xdyd::y#6 y zp[1]:13 101.0 +(byte) bitmap_line_xdyd::y#0 y zp[1]:12 1.0 +(byte) bitmap_line_xdyd::y#1 y zp[1]:12 1.0 +(byte) bitmap_line_xdyd::y#2 y zp[1]:12 101.0 +(byte) bitmap_line_xdyd::y#3 y zp[1]:12 58.00000000000001 +(byte) bitmap_line_xdyd::y#5 y zp[1]:12 3.0 +(byte) bitmap_line_xdyd::y#6 y zp[1]:12 101.0 (byte) bitmap_line_xdyd::yd -(byte) bitmap_line_xdyd::yd#0 yd zp[1]:10 4.0 -(byte) bitmap_line_xdyd::yd#1 yd zp[1]:10 4.0 -(byte) bitmap_line_xdyd::yd#2 yd zp[1]:10 7.642857142857143 +(byte) bitmap_line_xdyd::yd#0 yd zp[1]:9 4.0 +(byte) bitmap_line_xdyd::yd#1 yd zp[1]:9 4.0 +(byte) bitmap_line_xdyd::yd#2 yd zp[1]:9 7.642857142857143 (void()) bitmap_line_xdyi((byte) bitmap_line_xdyi::x , (byte) bitmap_line_xdyi::y , (byte) bitmap_line_xdyi::x1 , (byte) bitmap_line_xdyi::xd , (byte) bitmap_line_xdyi::yd) (byte~) bitmap_line_xdyi::$6 reg byte x 202.0 (label) bitmap_line_xdyi::@1 @@ -239,36 +239,36 @@ (label) bitmap_line_xdyi::@4 (label) bitmap_line_xdyi::@return (byte) bitmap_line_xdyi::e -(byte) bitmap_line_xdyi::e#0 e zp[1]:17 4.0 -(byte) bitmap_line_xdyi::e#1 e zp[1]:17 134.66666666666666 -(byte) bitmap_line_xdyi::e#2 e zp[1]:17 202.0 -(byte) bitmap_line_xdyi::e#3 e zp[1]:17 40.8 -(byte) bitmap_line_xdyi::e#6 e zp[1]:17 101.0 +(byte) bitmap_line_xdyi::e#0 e zp[1]:16 4.0 +(byte) bitmap_line_xdyi::e#1 e zp[1]:16 134.66666666666666 +(byte) bitmap_line_xdyi::e#2 e zp[1]:16 202.0 +(byte) bitmap_line_xdyi::e#3 e zp[1]:16 40.8 +(byte) bitmap_line_xdyi::e#6 e zp[1]:16 101.0 (byte) bitmap_line_xdyi::x -(byte) bitmap_line_xdyi::x#0 x zp[1]:10 0.8 -(byte) bitmap_line_xdyi::x#1 x zp[1]:10 0.8 -(byte) bitmap_line_xdyi::x#2 x zp[1]:10 37.875 -(byte) bitmap_line_xdyi::x#3 x zp[1]:10 76.25 -(byte) bitmap_line_xdyi::x#6 x zp[1]:10 3.0 +(byte) bitmap_line_xdyi::x#0 x zp[1]:9 0.8 +(byte) bitmap_line_xdyi::x#1 x zp[1]:9 0.8 +(byte) bitmap_line_xdyi::x#2 x zp[1]:9 37.875 +(byte) bitmap_line_xdyi::x#3 x zp[1]:9 76.25 +(byte) bitmap_line_xdyi::x#6 x zp[1]:9 3.0 (byte) bitmap_line_xdyi::x1 -(byte) bitmap_line_xdyi::x1#0 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyi::x1#1 x1 zp[1]:9 1.3333333333333333 -(byte) bitmap_line_xdyi::x1#6 x1 zp[1]:9 7.5 +(byte) bitmap_line_xdyi::x1#0 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyi::x1#1 x1 zp[1]:8 1.3333333333333333 +(byte) bitmap_line_xdyi::x1#6 x1 zp[1]:8 7.5 (byte) bitmap_line_xdyi::xd -(byte) bitmap_line_xdyi::xd#0 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyi::xd#1 xd zp[1]:31 2.0 -(byte) bitmap_line_xdyi::xd#5 xd zp[1]:31 14.714285714285715 +(byte) bitmap_line_xdyi::xd#0 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyi::xd#1 xd zp[1]:29 2.0 +(byte) bitmap_line_xdyi::xd#5 xd zp[1]:29 14.714285714285715 (byte) bitmap_line_xdyi::y -(byte) bitmap_line_xdyi::y#0 y zp[1]:13 1.0 -(byte) bitmap_line_xdyi::y#1 y zp[1]:13 1.0 -(byte) bitmap_line_xdyi::y#2 y zp[1]:13 101.0 -(byte) bitmap_line_xdyi::y#3 y zp[1]:13 58.00000000000001 -(byte) bitmap_line_xdyi::y#5 y zp[1]:13 3.0 -(byte) bitmap_line_xdyi::y#6 y zp[1]:13 101.0 +(byte) bitmap_line_xdyi::y#0 y zp[1]:12 1.0 +(byte) bitmap_line_xdyi::y#1 y zp[1]:12 1.0 +(byte) bitmap_line_xdyi::y#2 y zp[1]:12 101.0 +(byte) bitmap_line_xdyi::y#3 y zp[1]:12 58.00000000000001 +(byte) bitmap_line_xdyi::y#5 y zp[1]:12 3.0 +(byte) bitmap_line_xdyi::y#6 y zp[1]:12 101.0 (byte) bitmap_line_xdyi::yd -(byte) bitmap_line_xdyi::yd#0 yd zp[1]:16 4.0 -(byte) bitmap_line_xdyi::yd#1 yd zp[1]:16 4.0 -(byte) bitmap_line_xdyi::yd#2 yd zp[1]:16 7.642857142857143 +(byte) bitmap_line_xdyi::yd#0 yd zp[1]:15 4.0 +(byte) bitmap_line_xdyi::yd#1 yd zp[1]:15 4.0 +(byte) bitmap_line_xdyi::yd#2 yd zp[1]:15 7.642857142857143 (void()) bitmap_line_ydxd((byte) bitmap_line_ydxd::y , (byte) bitmap_line_ydxd::x , (byte) bitmap_line_ydxd::y1 , (byte) bitmap_line_ydxd::yd , (byte) bitmap_line_ydxd::xd) (byte~) bitmap_line_ydxd::$6 reg byte a 202.0 (label) bitmap_line_ydxd::@1 @@ -277,11 +277,11 @@ (label) bitmap_line_ydxd::@4 (label) bitmap_line_ydxd::@return (byte) bitmap_line_ydxd::e -(byte) bitmap_line_ydxd::e#0 e zp[1]:17 4.0 -(byte) bitmap_line_ydxd::e#1 e zp[1]:17 134.66666666666666 -(byte) bitmap_line_ydxd::e#2 e zp[1]:17 202.0 -(byte) bitmap_line_ydxd::e#3 e zp[1]:17 40.8 -(byte) bitmap_line_ydxd::e#6 e zp[1]:17 101.0 +(byte) bitmap_line_ydxd::e#0 e zp[1]:16 4.0 +(byte) bitmap_line_ydxd::e#1 e zp[1]:16 134.66666666666666 +(byte) bitmap_line_ydxd::e#2 e zp[1]:16 202.0 +(byte) bitmap_line_ydxd::e#3 e zp[1]:16 40.8 +(byte) bitmap_line_ydxd::e#6 e zp[1]:16 101.0 (byte) bitmap_line_ydxd::x (byte) bitmap_line_ydxd::x#0 reg byte x 1.0 (byte) bitmap_line_ydxd::x#1 reg byte x 1.0 @@ -290,23 +290,23 @@ (byte) bitmap_line_ydxd::x#5 reg byte x 3.0 (byte) bitmap_line_ydxd::x#6 reg byte x 101.0 (byte) bitmap_line_ydxd::xd -(byte) bitmap_line_ydxd::xd#0 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxd::xd#1 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxd::xd#2 xd zp[1]:31 7.642857142857143 +(byte) bitmap_line_ydxd::xd#0 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxd::xd#1 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxd::xd#2 xd zp[1]:29 7.642857142857143 (byte) bitmap_line_ydxd::y -(byte) bitmap_line_ydxd::y#0 y zp[1]:16 0.8 -(byte) bitmap_line_ydxd::y#1 y zp[1]:16 0.8 -(byte) bitmap_line_ydxd::y#2 y zp[1]:16 76.25 -(byte) bitmap_line_ydxd::y#3 y zp[1]:16 37.875 -(byte) bitmap_line_ydxd::y#7 y zp[1]:16 3.0 +(byte) bitmap_line_ydxd::y#0 y zp[1]:15 0.8 +(byte) bitmap_line_ydxd::y#1 y zp[1]:15 0.8 +(byte) bitmap_line_ydxd::y#2 y zp[1]:15 76.25 +(byte) bitmap_line_ydxd::y#3 y zp[1]:15 37.875 +(byte) bitmap_line_ydxd::y#7 y zp[1]:15 3.0 (byte) bitmap_line_ydxd::y1 -(byte) bitmap_line_ydxd::y1#0 y1 zp[1]:13 1.3333333333333333 -(byte) bitmap_line_ydxd::y1#1 y1 zp[1]:13 1.3333333333333333 -(byte) bitmap_line_ydxd::y1#6 y1 zp[1]:13 7.5 +(byte) bitmap_line_ydxd::y1#0 y1 zp[1]:12 1.3333333333333333 +(byte) bitmap_line_ydxd::y1#1 y1 zp[1]:12 1.3333333333333333 +(byte) bitmap_line_ydxd::y1#6 y1 zp[1]:12 7.5 (byte) bitmap_line_ydxd::yd -(byte) bitmap_line_ydxd::yd#0 yd zp[1]:10 2.0 -(byte) bitmap_line_ydxd::yd#1 yd zp[1]:10 2.0 -(byte) bitmap_line_ydxd::yd#5 yd zp[1]:10 14.714285714285715 +(byte) bitmap_line_ydxd::yd#0 yd zp[1]:9 2.0 +(byte) bitmap_line_ydxd::yd#1 yd zp[1]:9 2.0 +(byte) bitmap_line_ydxd::yd#5 yd zp[1]:9 14.714285714285715 (void()) bitmap_line_ydxi((byte) bitmap_line_ydxi::y , (byte) bitmap_line_ydxi::x , (byte) bitmap_line_ydxi::y1 , (byte) bitmap_line_ydxi::yd , (byte) bitmap_line_ydxi::xd) (byte~) bitmap_line_ydxi::$6 reg byte a 202.0 (label) bitmap_line_ydxi::@1 @@ -315,11 +315,11 @@ (label) bitmap_line_ydxi::@4 (label) bitmap_line_ydxi::@return (byte) bitmap_line_ydxi::e -(byte) bitmap_line_ydxi::e#0 e zp[1]:13 4.0 -(byte) bitmap_line_ydxi::e#1 e zp[1]:13 134.66666666666666 -(byte) bitmap_line_ydxi::e#2 e zp[1]:13 202.0 -(byte) bitmap_line_ydxi::e#3 e zp[1]:13 40.8 -(byte) bitmap_line_ydxi::e#6 e zp[1]:13 101.0 +(byte) bitmap_line_ydxi::e#0 e zp[1]:12 4.0 +(byte) bitmap_line_ydxi::e#1 e zp[1]:12 134.66666666666666 +(byte) bitmap_line_ydxi::e#2 e zp[1]:12 202.0 +(byte) bitmap_line_ydxi::e#3 e zp[1]:12 40.8 +(byte) bitmap_line_ydxi::e#6 e zp[1]:12 101.0 (byte) bitmap_line_ydxi::x (byte) bitmap_line_ydxi::x#0 reg byte x 1.0 (byte) bitmap_line_ydxi::x#1 reg byte x 1.0 @@ -328,32 +328,32 @@ (byte) bitmap_line_ydxi::x#5 reg byte x 3.0 (byte) bitmap_line_ydxi::x#6 reg byte x 101.0 (byte) bitmap_line_ydxi::xd -(byte) bitmap_line_ydxi::xd#0 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxi::xd#1 xd zp[1]:31 4.0 -(byte) bitmap_line_ydxi::xd#2 xd zp[1]:31 7.642857142857143 +(byte) bitmap_line_ydxi::xd#0 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxi::xd#1 xd zp[1]:29 4.0 +(byte) bitmap_line_ydxi::xd#2 xd zp[1]:29 7.642857142857143 (byte) bitmap_line_ydxi::y -(byte) bitmap_line_ydxi::y#0 y zp[1]:10 0.8 -(byte) bitmap_line_ydxi::y#1 y zp[1]:10 0.8 -(byte) bitmap_line_ydxi::y#2 y zp[1]:10 37.875 -(byte) bitmap_line_ydxi::y#3 y zp[1]:10 76.25 -(byte) bitmap_line_ydxi::y#6 y zp[1]:10 3.0 +(byte) bitmap_line_ydxi::y#0 y zp[1]:9 0.8 +(byte) bitmap_line_ydxi::y#1 y zp[1]:9 0.8 +(byte) bitmap_line_ydxi::y#2 y zp[1]:9 37.875 +(byte) bitmap_line_ydxi::y#3 y zp[1]:9 76.25 +(byte) bitmap_line_ydxi::y#6 y zp[1]:9 3.0 (byte) bitmap_line_ydxi::y1 -(byte) bitmap_line_ydxi::y1#0 y1 zp[1]:17 1.3333333333333333 -(byte) bitmap_line_ydxi::y1#1 y1 zp[1]:17 1.3333333333333333 -(byte) bitmap_line_ydxi::y1#6 y1 zp[1]:17 7.5 +(byte) bitmap_line_ydxi::y1#0 y1 zp[1]:16 1.3333333333333333 +(byte) bitmap_line_ydxi::y1#1 y1 zp[1]:16 1.3333333333333333 +(byte) bitmap_line_ydxi::y1#6 y1 zp[1]:16 7.5 (byte) bitmap_line_ydxi::yd -(byte) bitmap_line_ydxi::yd#0 yd zp[1]:9 2.0 -(byte) bitmap_line_ydxi::yd#1 yd zp[1]:9 2.0 -(byte) bitmap_line_ydxi::yd#5 yd zp[1]:9 14.714285714285715 +(byte) bitmap_line_ydxi::yd#0 yd zp[1]:8 2.0 +(byte) bitmap_line_ydxi::yd#1 yd zp[1]:8 2.0 +(byte) bitmap_line_ydxi::yd#5 yd zp[1]:8 14.714285714285715 (void()) bitmap_plot((byte) bitmap_plot::x , (byte) bitmap_plot::y) (byte~) bitmap_plot::$1 reg byte a 4.0 (label) bitmap_plot::@return (byte*) bitmap_plot::plotter -(word) bitmap_plot::plotter#0 plotter zp[2]:26 1.0 +(word) bitmap_plot::plotter#0 plotter zp[2]:25 1.0 (word) bitmap_plot::plotter_x -(word) bitmap_plot::plotter_x#0 plotter_x zp[2]:26 2.0 +(word) bitmap_plot::plotter_x#0 plotter_x zp[2]:25 2.0 (word) bitmap_plot::plotter_y -(word) bitmap_plot::plotter_y#0 plotter_y zp[2]:28 4.0 +(word) bitmap_plot::plotter_y#0 plotter_y zp[2]:27 4.0 (byte) bitmap_plot::x (byte) bitmap_plot::x#0 reg byte x 101.0 (byte) bitmap_plot::x#1 reg byte x 101.0 @@ -423,6 +423,7 @@ (label) form_control::@9 (label) form_control::@return (byte*) form_control::field +(byte*) form_control::field#0 field zp[2]:27 0.5925925925925926 (byte) form_control::key_event (byte) form_control::key_event#0 reg byte a 2.6666666666666665 (byte) form_control::return @@ -438,19 +439,19 @@ (const byte*) form_ctrl_mcm = (const byte*) form_fields_val+(byte) 2 (const byte*) form_ctrl_overs = (const byte*) form_fields_val+(byte) 9 (signed byte) form_cursor_count -(signed byte) form_cursor_count#1 form_cursor_count zp[1]:16 0.3333333333333333 -(signed byte) form_cursor_count#15 form_cursor_count zp[1]:16 0.4 -(signed byte) form_cursor_count#16 form_cursor_count zp[1]:16 65.82352941176472 -(signed byte) form_cursor_count#21 form_cursor_count zp[1]:16 221.2 -(signed byte) form_cursor_count#5 form_cursor_count zp[1]:16 2.0 +(signed byte) form_cursor_count#1 form_cursor_count zp[1]:15 0.3333333333333333 +(signed byte) form_cursor_count#15 form_cursor_count zp[1]:15 0.4 +(signed byte) form_cursor_count#16 form_cursor_count zp[1]:15 65.82352941176472 +(signed byte) form_cursor_count#21 form_cursor_count zp[1]:15 157.99999999999997 +(signed byte) form_cursor_count#5 form_cursor_count zp[1]:15 2.0 (const byte*) form_dtv_palet = (const byte*) form_fields_val+(byte) $1b (byte) form_field_idx -(byte) form_field_idx#1 form_field_idx zp[1]:9 0.3333333333333333 -(byte) form_field_idx#18 form_field_idx zp[1]:9 65.94117647058826 -(byte) form_field_idx#28 form_field_idx zp[1]:9 30.75675675675673 -(byte) form_field_idx#31 form_field_idx zp[1]:9 6.0 -(byte) form_field_idx#5 form_field_idx zp[1]:9 2.0 -(byte) form_field_idx#6 form_field_idx zp[1]:9 2.0 +(byte) form_field_idx#1 form_field_idx zp[1]:8 0.3333333333333333 +(byte) form_field_idx#18 form_field_idx zp[1]:8 65.94117647058826 +(byte) form_field_idx#28 form_field_idx zp[1]:8 29.17948717948718 +(byte) form_field_idx#31 form_field_idx zp[1]:8 6.0 +(byte) form_field_idx#5 form_field_idx zp[1]:8 2.0 +(byte) form_field_idx#6 form_field_idx zp[1]:8 2.0 (byte*()) form_field_ptr((byte) form_field_ptr::field_idx) (label) form_field_ptr::@return (byte*) form_field_ptr::field @@ -459,12 +460,14 @@ (byte) form_field_ptr::field_idx#1 reg byte x 4.0 (byte) form_field_ptr::field_idx#2 reg byte x 335.66666666666674 (byte*) form_field_ptr::line -(word) form_field_ptr::line#0 line zp[2]:26 0.06451612903225806 +(word) form_field_ptr::line#0 line zp[2]:25 0.4 (byte*) form_field_ptr::return +(byte*) form_field_ptr::return#0 return zp[2]:27 1.3333333333333333 +(byte*) form_field_ptr::return#3 return zp[2]:27 4.0 (byte) form_field_ptr::x -(byte) form_field_ptr::x#0 x zp[1]:30 33.90000000000003 +(byte) form_field_ptr::x#0 x zp[1]:29 251.25 (byte) form_field_ptr::y -(byte) form_field_ptr::y#0 reg byte a 6.0 +(byte) form_field_ptr::y#0 reg byte y 6.0 (const byte) form_fields_cnt = (byte) $24 (const byte*) form_fields_max[] = { (byte) $a, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $d, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) 3, (byte) 1, (byte) 4, (byte) 1, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f, (byte) $f } (const byte*) form_fields_val[] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } @@ -498,9 +501,9 @@ (byte) form_mode::i#1 reg byte x 151.5 (byte) form_mode::i#2 reg byte x 202.0 (byte) form_mode::preset_current -(byte) form_mode::preset_current#0 preset_current zp[1]:17 4.0 -(byte) form_mode::preset_current#1 preset_current zp[1]:17 50.5 -(byte) form_mode::preset_current#6 preset_current zp[1]:17 388.25 +(byte) form_mode::preset_current#0 preset_current zp[1]:16 4.0 +(byte) form_mode::preset_current#1 preset_current zp[1]:16 50.5 +(byte) form_mode::preset_current#6 preset_current zp[1]:16 388.25 (void()) form_render_values() (label) form_render_values::@1 (label) form_render_values::@2 @@ -564,8 +567,8 @@ (byte) get_vic_charset::idx (byte) get_vic_charset::idx#0 reg byte a 3.0 (byte*) get_vic_charset::return -(byte*) get_vic_charset::return#2 return zp[2]:14 0.6666666666666666 -(byte*) get_vic_charset::return#4 return zp[2]:14 4.0 +(byte*) get_vic_charset::return#2 return zp[2]:13 0.6666666666666666 +(byte*) get_vic_charset::return#4 return zp[2]:13 4.0 (byte*()) get_vic_screen((byte) get_vic_screen::idx) (label) get_vic_screen::@1 (label) get_vic_screen::@2 @@ -604,21 +607,21 @@ (label) gfx_init_charset::@4 (label) gfx_init_charset::@return (byte) gfx_init_charset::c -(byte) gfx_init_charset::c#1 c zp[1]:13 16.5 -(byte) gfx_init_charset::c#4 c zp[1]:13 3.142857142857143 +(byte) gfx_init_charset::c#1 c zp[1]:12 16.5 +(byte) gfx_init_charset::c#4 c zp[1]:12 3.142857142857143 (byte*) gfx_init_charset::chargen -(byte*) gfx_init_charset::chargen#1 chargen zp[2]:11 42.599999999999994 -(byte*) gfx_init_charset::chargen#2 chargen zp[2]:11 104.66666666666666 -(byte*) gfx_init_charset::chargen#3 chargen zp[2]:11 22.0 +(byte*) gfx_init_charset::chargen#1 chargen zp[2]:10 42.599999999999994 +(byte*) gfx_init_charset::chargen#2 chargen zp[2]:10 104.66666666666666 +(byte*) gfx_init_charset::chargen#3 chargen zp[2]:10 22.0 (byte*) gfx_init_charset::charset -(byte*) gfx_init_charset::charset#1 charset zp[2]:14 35.5 -(byte*) gfx_init_charset::charset#2 charset zp[2]:14 157.0 -(byte*) gfx_init_charset::charset#3 charset zp[2]:14 22.0 +(byte*) gfx_init_charset::charset#1 charset zp[2]:13 35.5 +(byte*) gfx_init_charset::charset#2 charset zp[2]:13 157.0 +(byte*) gfx_init_charset::charset#3 charset zp[2]:13 22.0 (byte) gfx_init_charset::l (byte) gfx_init_charset::l#1 reg byte x 151.5 (byte) gfx_init_charset::l#2 reg byte x 50.5 (void()) gfx_init_plane_8bppchunky() -(word~) gfx_init_plane_8bppchunky::$5 zp[2]:24 101.0 +(word~) gfx_init_plane_8bppchunky::$5 zp[2]:25 101.0 (label) gfx_init_plane_8bppchunky::@1 (label) gfx_init_plane_8bppchunky::@2 (label) gfx_init_plane_8bppchunky::@3 @@ -630,21 +633,21 @@ (byte) gfx_init_plane_8bppchunky::c (byte) gfx_init_plane_8bppchunky::c#0 reg byte a 202.0 (byte*) gfx_init_plane_8bppchunky::gfxb -(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfxb zp[2]:14 42.599999999999994 -(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfxb zp[2]:14 157.0 -(byte*) gfx_init_plane_8bppchunky::gfxb#4 gfxb zp[2]:14 75.75 -(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfxb zp[2]:14 22.0 +(byte*) gfx_init_plane_8bppchunky::gfxb#1 gfxb zp[2]:13 42.599999999999994 +(byte*) gfx_init_plane_8bppchunky::gfxb#3 gfxb zp[2]:13 157.0 +(byte*) gfx_init_plane_8bppchunky::gfxb#4 gfxb zp[2]:13 75.75 +(byte*) gfx_init_plane_8bppchunky::gfxb#5 gfxb zp[2]:13 22.0 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#2 reg byte x 202.0 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#4 reg byte x 103.75 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#7 reg byte x 22.0 (byte) gfx_init_plane_8bppchunky::gfxbCpuBank#8 reg byte x 34.888888888888886 (word) gfx_init_plane_8bppchunky::x -(word) gfx_init_plane_8bppchunky::x#1 x zp[2]:11 151.5 -(word) gfx_init_plane_8bppchunky::x#2 x zp[2]:11 30.299999999999997 +(word) gfx_init_plane_8bppchunky::x#1 x zp[2]:10 151.5 +(word) gfx_init_plane_8bppchunky::x#2 x zp[2]:10 30.299999999999997 (byte) gfx_init_plane_8bppchunky::y -(byte) gfx_init_plane_8bppchunky::y#1 y zp[1]:13 16.5 -(byte) gfx_init_plane_8bppchunky::y#6 y zp[1]:13 9.461538461538462 +(byte) gfx_init_plane_8bppchunky::y#1 y zp[1]:12 16.5 +(byte) gfx_init_plane_8bppchunky::y#6 y zp[1]:12 9.461538461538462 (void()) gfx_init_plane_blank() (label) gfx_init_plane_blank::@return (void()) gfx_init_plane_charset8() @@ -660,42 +663,42 @@ (label) gfx_init_plane_charset8::@9 (label) gfx_init_plane_charset8::@return (byte) gfx_init_plane_charset8::bits -(byte) gfx_init_plane_charset8::bits#0 bits zp[1]:8 101.0 -(byte) gfx_init_plane_charset8::bits#1 bits zp[1]:8 500.5 -(byte) gfx_init_plane_charset8::bits#2 bits zp[1]:8 443.42857142857144 +(byte) gfx_init_plane_charset8::bits#0 bits zp[1]:30 101.0 +(byte) gfx_init_plane_charset8::bits#1 bits zp[1]:30 500.5 +(byte) gfx_init_plane_charset8::bits#2 bits zp[1]:30 443.42857142857144 (byte) gfx_init_plane_charset8::c (byte) gfx_init_plane_charset8::c#2 reg byte a 2002.0 (byte) gfx_init_plane_charset8::c#3 reg byte a 2002.0 (byte) gfx_init_plane_charset8::ch -(byte) gfx_init_plane_charset8::ch#1 ch zp[1]:10 16.5 -(byte) gfx_init_plane_charset8::ch#8 ch zp[1]:10 1.2941176470588236 +(byte) gfx_init_plane_charset8::ch#1 ch zp[1]:9 16.5 +(byte) gfx_init_plane_charset8::ch#8 ch zp[1]:9 1.2941176470588236 (byte*) gfx_init_plane_charset8::chargen (byte*) gfx_init_plane_charset8::chargen#1 chargen zp[2]:6 13.3125 (byte*) gfx_init_plane_charset8::chargen#2 chargen zp[2]:6 157.0 (byte*) gfx_init_plane_charset8::chargen#3 chargen zp[2]:6 22.0 (byte) gfx_init_plane_charset8::col -(byte) gfx_init_plane_charset8::col#1 col zp[1]:16 302.0 -(byte) gfx_init_plane_charset8::col#2 col zp[1]:16 388.0 -(byte) gfx_init_plane_charset8::col#5 col zp[1]:16 71.0 -(byte) gfx_init_plane_charset8::col#6 col zp[1]:16 22.0 +(byte) gfx_init_plane_charset8::col#1 col zp[1]:15 302.0 +(byte) gfx_init_plane_charset8::col#2 col zp[1]:15 388.0 +(byte) gfx_init_plane_charset8::col#5 col zp[1]:15 71.0 +(byte) gfx_init_plane_charset8::col#6 col zp[1]:15 22.0 (byte) gfx_init_plane_charset8::cp (byte) gfx_init_plane_charset8::cp#1 reg byte x 1501.5 (byte) gfx_init_plane_charset8::cp#2 reg byte x 222.44444444444446 (byte) gfx_init_plane_charset8::cr -(byte) gfx_init_plane_charset8::cr#1 cr zp[1]:13 151.5 -(byte) gfx_init_plane_charset8::cr#6 cr zp[1]:13 14.428571428571429 +(byte) gfx_init_plane_charset8::cr#1 cr zp[1]:12 151.5 +(byte) gfx_init_plane_charset8::cr#6 cr zp[1]:12 14.428571428571429 (byte*) gfx_init_plane_charset8::gfxa -(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp[2]:11 234.8888888888889 -(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp[2]:11 517.3333333333334 -(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp[2]:11 71.0 -(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp[2]:11 22.0 +(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp[2]:10 234.8888888888889 +(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp[2]:10 517.3333333333334 +(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp[2]:10 71.0 +(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp[2]:10 22.0 (byte) gfx_init_plane_charset8::gfxbCpuBank (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = (byte)(const dword) PLANE_CHARSET8/(word) $4000 (void()) gfx_init_plane_fill((dword) gfx_init_plane_fill::plane_addr , (byte) gfx_init_plane_fill::fill) -(dword~) gfx_init_plane_fill::$0 zp[4]:18 4.0 -(word~) gfx_init_plane_fill::$1 zp[2]:22 4.0 -(word~) gfx_init_plane_fill::$4 zp[2]:14 4.0 -(word~) gfx_init_plane_fill::$5 zp[2]:14 4.0 +(dword~) gfx_init_plane_fill::$0 zp[4]:19 4.0 +(word~) gfx_init_plane_fill::$1 zp[2]:23 4.0 +(word~) gfx_init_plane_fill::$4 zp[2]:13 4.0 +(word~) gfx_init_plane_fill::$5 zp[2]:13 4.0 (label) gfx_init_plane_fill::@1 (label) gfx_init_plane_fill::@2 (label) gfx_init_plane_fill::@3 @@ -706,16 +709,16 @@ (byte) gfx_init_plane_fill::bx#1 reg byte x 151.5 (byte) gfx_init_plane_fill::bx#2 reg byte x 67.33333333333333 (byte) gfx_init_plane_fill::by -(byte) gfx_init_plane_fill::by#1 by zp[1]:16 16.5 -(byte) gfx_init_plane_fill::by#4 by zp[1]:16 3.6666666666666665 +(byte) gfx_init_plane_fill::by#1 by zp[1]:15 16.5 +(byte) gfx_init_plane_fill::by#4 by zp[1]:15 3.6666666666666665 (byte) gfx_init_plane_fill::fill -(byte) gfx_init_plane_fill::fill#6 fill zp[1]:8 5.611111111111111 +(byte) gfx_init_plane_fill::fill#6 fill zp[1]:30 5.611111111111111 (byte*) gfx_init_plane_fill::gfxb -(word) gfx_init_plane_fill::gfxb#0 gfxb zp[2]:14 2.0 -(byte*) gfx_init_plane_fill::gfxb#1 gfxb zp[2]:14 42.599999999999994 -(byte*) gfx_init_plane_fill::gfxb#2 gfxb zp[2]:14 157.0 -(byte*) gfx_init_plane_fill::gfxb#3 gfxb zp[2]:14 24.0 -(byte*) gfx_init_plane_fill::gfxb#6 gfxb zp[2]:14 4.0 +(word) gfx_init_plane_fill::gfxb#0 gfxb zp[2]:13 2.0 +(byte*) gfx_init_plane_fill::gfxb#1 gfxb zp[2]:13 42.599999999999994 +(byte*) gfx_init_plane_fill::gfxb#2 gfxb zp[2]:13 157.0 +(byte*) gfx_init_plane_fill::gfxb#3 gfxb zp[2]:13 24.0 +(byte*) gfx_init_plane_fill::gfxb#6 gfxb zp[2]:13 4.0 (byte) gfx_init_plane_fill::gfxbCpuBank (byte) gfx_init_plane_fill::gfxbCpuBank#0 reg byte a 4.0 (dword) gfx_init_plane_fill::plane_addr @@ -736,8 +739,8 @@ (byte) gfx_init_plane_horisontal::ax#1 reg byte x 151.5 (byte) gfx_init_plane_horisontal::ax#2 reg byte x 25.25 (byte) gfx_init_plane_horisontal::ay -(byte) gfx_init_plane_horisontal::ay#1 ay zp[1]:10 16.5 -(byte) gfx_init_plane_horisontal::ay#4 ay zp[1]:10 11.181818181818182 +(byte) gfx_init_plane_horisontal::ay#1 ay zp[1]:9 16.5 +(byte) gfx_init_plane_horisontal::ay#4 ay zp[1]:9 11.181818181818182 (byte*) gfx_init_plane_horisontal::gfxa (byte*) gfx_init_plane_horisontal::gfxa#1 gfxa zp[2]:6 202.0 (byte*) gfx_init_plane_horisontal::gfxa#2 gfxa zp[2]:6 202.0 @@ -757,8 +760,8 @@ (byte) gfx_init_plane_horisontal2::ax#1 reg byte x 151.5 (byte) gfx_init_plane_horisontal2::ax#2 reg byte x 40.4 (byte) gfx_init_plane_horisontal2::ay -(byte) gfx_init_plane_horisontal2::ay#1 ay zp[1]:9 16.5 -(byte) gfx_init_plane_horisontal2::ay#4 ay zp[1]:9 15.375 +(byte) gfx_init_plane_horisontal2::ay#1 ay zp[1]:8 16.5 +(byte) gfx_init_plane_horisontal2::ay#4 ay zp[1]:8 15.375 (byte*) gfx_init_plane_horisontal2::gfxa (byte*) gfx_init_plane_horisontal2::gfxa#1 gfxa zp[2]:6 42.599999999999994 (byte*) gfx_init_plane_horisontal2::gfxa#2 gfxa zp[2]:6 78.5 @@ -778,8 +781,8 @@ (byte) gfx_init_plane_vertical::bx#1 reg byte x 151.5 (byte) gfx_init_plane_vertical::bx#2 reg byte x 67.33333333333333 (byte) gfx_init_plane_vertical::by -(byte) gfx_init_plane_vertical::by#1 by zp[1]:17 16.5 -(byte) gfx_init_plane_vertical::by#4 by zp[1]:17 3.6666666666666665 +(byte) gfx_init_plane_vertical::by#1 by zp[1]:16 16.5 +(byte) gfx_init_plane_vertical::by#4 by zp[1]:16 3.6666666666666665 (byte*) gfx_init_plane_vertical::gfxb (byte*) gfx_init_plane_vertical::gfxb#1 gfxb zp[2]:6 42.599999999999994 (byte*) gfx_init_plane_vertical::gfxb#2 gfxb zp[2]:6 157.0 @@ -790,7 +793,7 @@ (label) gfx_init_plane_vertical2::@return (void()) gfx_init_screen0() (byte~) gfx_init_screen0::$0 reg byte a 202.0 -(byte~) gfx_init_screen0::$1 zp[1]:31 101.0 +(byte~) gfx_init_screen0::$1 zp[1]:30 101.0 (byte~) gfx_init_screen0::$2 reg byte a 202.0 (byte~) gfx_init_screen0::$3 reg byte a 202.0 (label) gfx_init_screen0::@1 @@ -798,15 +801,15 @@ (label) gfx_init_screen0::@3 (label) gfx_init_screen0::@return (byte*) gfx_init_screen0::ch -(byte*) gfx_init_screen0::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen0::ch#2 ch zp[2]:22 52.33333333333333 -(byte*) gfx_init_screen0::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen0::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen0::ch#2 ch zp[2]:17 52.33333333333333 +(byte*) gfx_init_screen0::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen0::cx (byte) gfx_init_screen0::cx#1 reg byte x 151.5 (byte) gfx_init_screen0::cx#2 reg byte x 43.285714285714285 (byte) gfx_init_screen0::cy -(byte) gfx_init_screen0::cy#1 cy zp[1]:17 16.5 -(byte) gfx_init_screen0::cy#4 cy zp[1]:17 12.299999999999999 +(byte) gfx_init_screen0::cy#1 cy zp[1]:16 16.5 +(byte) gfx_init_screen0::cy#4 cy zp[1]:16 12.299999999999999 (void()) gfx_init_screen1() (byte~) gfx_init_screen1::$0 reg byte a 202.0 (byte~) gfx_init_screen1::$1 reg byte a 202.0 @@ -815,15 +818,15 @@ (label) gfx_init_screen1::@3 (label) gfx_init_screen1::@return (byte*) gfx_init_screen1::ch -(byte*) gfx_init_screen1::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen1::ch#2 ch zp[2]:22 78.5 -(byte*) gfx_init_screen1::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen1::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen1::ch#2 ch zp[2]:17 78.5 +(byte*) gfx_init_screen1::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen1::cx (byte) gfx_init_screen1::cx#1 reg byte x 151.5 (byte) gfx_init_screen1::cx#2 reg byte x 60.599999999999994 (byte) gfx_init_screen1::cy -(byte) gfx_init_screen1::cy#1 cy zp[1]:17 16.5 -(byte) gfx_init_screen1::cy#4 cy zp[1]:17 15.375 +(byte) gfx_init_screen1::cy#1 cy zp[1]:16 16.5 +(byte) gfx_init_screen1::cy#4 cy zp[1]:16 15.375 (void()) gfx_init_screen2() (byte~) gfx_init_screen2::$0 reg byte a 202.0 (byte~) gfx_init_screen2::$3 reg byte a 202.0 @@ -833,22 +836,22 @@ (label) gfx_init_screen2::@3 (label) gfx_init_screen2::@return (byte*) gfx_init_screen2::ch -(byte*) gfx_init_screen2::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen2::ch#2 ch zp[2]:22 44.85714285714286 -(byte*) gfx_init_screen2::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen2::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen2::ch#2 ch zp[2]:17 44.85714285714286 +(byte*) gfx_init_screen2::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen2::col (byte) gfx_init_screen2::col#0 reg byte y 151.5 (byte) gfx_init_screen2::col2 -(byte) gfx_init_screen2::col2#0 col2 zp[1]:31 101.0 +(byte) gfx_init_screen2::col2#0 col2 zp[1]:30 101.0 (byte) gfx_init_screen2::cx (byte) gfx_init_screen2::cx#1 reg byte x 151.5 (byte) gfx_init_screen2::cx#2 reg byte x 37.875 (byte) gfx_init_screen2::cy -(byte) gfx_init_screen2::cy#1 cy zp[1]:16 16.5 -(byte) gfx_init_screen2::cy#4 cy zp[1]:16 11.181818181818182 +(byte) gfx_init_screen2::cy#1 cy zp[1]:15 16.5 +(byte) gfx_init_screen2::cy#4 cy zp[1]:15 11.181818181818182 (void()) gfx_init_screen3() (byte~) gfx_init_screen3::$0 reg byte a 202.0 -(byte~) gfx_init_screen3::$1 zp[1]:30 101.0 +(byte~) gfx_init_screen3::$1 zp[1]:29 101.0 (byte~) gfx_init_screen3::$2 reg byte a 202.0 (byte~) gfx_init_screen3::$3 reg byte a 202.0 (label) gfx_init_screen3::@1 @@ -856,30 +859,30 @@ (label) gfx_init_screen3::@3 (label) gfx_init_screen3::@return (byte*) gfx_init_screen3::ch -(byte*) gfx_init_screen3::ch#1 ch zp[2]:22 42.599999999999994 -(byte*) gfx_init_screen3::ch#2 ch zp[2]:22 52.33333333333333 -(byte*) gfx_init_screen3::ch#3 ch zp[2]:22 22.0 +(byte*) gfx_init_screen3::ch#1 ch zp[2]:17 42.599999999999994 +(byte*) gfx_init_screen3::ch#2 ch zp[2]:17 52.33333333333333 +(byte*) gfx_init_screen3::ch#3 ch zp[2]:17 22.0 (byte) gfx_init_screen3::cx (byte) gfx_init_screen3::cx#1 reg byte x 151.5 (byte) gfx_init_screen3::cx#2 reg byte x 43.285714285714285 (byte) gfx_init_screen3::cy -(byte) gfx_init_screen3::cy#1 cy zp[1]:16 16.5 -(byte) gfx_init_screen3::cy#4 cy zp[1]:16 12.299999999999999 +(byte) gfx_init_screen3::cy#1 cy zp[1]:15 16.5 +(byte) gfx_init_screen3::cy#4 cy zp[1]:15 12.299999999999999 (void()) gfx_init_screen4() (label) gfx_init_screen4::@1 (label) gfx_init_screen4::@2 (label) gfx_init_screen4::@3 (label) gfx_init_screen4::@return (byte*) gfx_init_screen4::ch -(byte*) gfx_init_screen4::ch#1 ch zp[2]:14 42.599999999999994 -(byte*) gfx_init_screen4::ch#2 ch zp[2]:14 157.0 -(byte*) gfx_init_screen4::ch#3 ch zp[2]:14 22.0 +(byte*) gfx_init_screen4::ch#1 ch zp[2]:13 42.599999999999994 +(byte*) gfx_init_screen4::ch#2 ch zp[2]:13 157.0 +(byte*) gfx_init_screen4::ch#3 ch zp[2]:13 22.0 (byte) gfx_init_screen4::cx (byte) gfx_init_screen4::cx#1 reg byte x 151.5 (byte) gfx_init_screen4::cx#2 reg byte x 67.33333333333333 (byte) gfx_init_screen4::cy -(byte) gfx_init_screen4::cy#1 cy zp[1]:13 16.5 -(byte) gfx_init_screen4::cy#4 cy zp[1]:13 3.6666666666666665 +(byte) gfx_init_screen4::cy#1 cy zp[1]:12 16.5 +(byte) gfx_init_screen4::cy#4 cy zp[1]:12 3.6666666666666665 (void()) gfx_init_vic_bitmap() (label) gfx_init_vic_bitmap::@1 (label) gfx_init_vic_bitmap::@2 @@ -887,8 +890,8 @@ (label) gfx_init_vic_bitmap::@4 (label) gfx_init_vic_bitmap::@return (byte) gfx_init_vic_bitmap::l -(byte) gfx_init_vic_bitmap::l#1 l zp[1]:8 22.0 -(byte) gfx_init_vic_bitmap::l#2 l zp[1]:8 11.0 +(byte) gfx_init_vic_bitmap::l#1 l zp[1]:30 22.0 +(byte) gfx_init_vic_bitmap::l#2 l zp[1]:30 11.0 (const byte) gfx_init_vic_bitmap::lines_cnt = (byte) 9 (const byte*) gfx_init_vic_bitmap::lines_x[] = { (byte) 0, (byte) $ff, (byte) $ff, (byte) 0, (byte) 0, (byte) $80, (byte) $ff, (byte) $80, (byte) 0, (byte) $80 } (const byte*) gfx_init_vic_bitmap::lines_y[] = { (byte) 0, (byte) 0, (byte) $c7, (byte) $c7, (byte) 0, (byte) 0, (byte) $64, (byte) $c7, (byte) $64, (byte) 0 } @@ -896,9 +899,9 @@ (byte~) gfx_mode::$18 reg byte a 4.0 (dword~) gfx_mode::$20 zp[4]:2 4.0 (byte~) gfx_mode::$23 reg byte a 4.0 -(word~) gfx_mode::$24 zp[2]:26 2.0 +(word~) gfx_mode::$24 zp[2]:25 2.0 (byte~) gfx_mode::$25 reg byte a 4.0 -(word~) gfx_mode::$26 zp[2]:28 4.0 +(word~) gfx_mode::$26 zp[2]:27 4.0 (byte~) gfx_mode::$27 reg byte a 4.0 (byte~) gfx_mode::$28 reg byte a 4.0 (byte~) gfx_mode::$29 reg byte a 4.0 @@ -907,9 +910,9 @@ (byte~) gfx_mode::$32 reg byte a 4.0 (dword~) gfx_mode::$34 zp[4]:2 4.0 (byte~) gfx_mode::$37 reg byte a 4.0 -(word~) gfx_mode::$38 zp[2]:22 2.0 +(word~) gfx_mode::$38 zp[2]:17 2.0 (byte~) gfx_mode::$39 reg byte a 4.0 -(word~) gfx_mode::$40 zp[2]:24 4.0 +(word~) gfx_mode::$40 zp[2]:23 4.0 (byte~) gfx_mode::$41 reg byte a 4.0 (byte~) gfx_mode::$42 reg byte a 4.0 (byte~) gfx_mode::$43 reg byte a 4.0 @@ -918,9 +921,9 @@ (byte*~) gfx_mode::$47 zp[2]:6 2.0 (word~) gfx_mode::$48 zp[2]:6 4.0 (word~) gfx_mode::$49 zp[2]:6 2.0 -(byte~) gfx_mode::$50 zp[1]:31 0.5 -(byte*~) gfx_mode::$52 zp[2]:14 2.0 -(word~) gfx_mode::$53 zp[2]:14 4.0 +(byte~) gfx_mode::$50 zp[1]:29 0.5 +(byte*~) gfx_mode::$52 zp[2]:13 2.0 +(word~) gfx_mode::$53 zp[2]:13 4.0 (byte~) gfx_mode::$54 reg byte a 4.0 (byte~) gfx_mode::$55 reg byte a 4.0 (byte~) gfx_mode::$56 reg byte a 4.0 @@ -967,15 +970,15 @@ (label) gfx_mode::@9 (label) gfx_mode::@return (byte*) gfx_mode::col -(byte*) gfx_mode::col#1 col zp[2]:11 350.5 -(byte*) gfx_mode::col#2 col zp[2]:11 1552.0 -(byte*) gfx_mode::col#3 col zp[2]:11 202.0 +(byte*) gfx_mode::col#1 col zp[2]:10 350.5 +(byte*) gfx_mode::col#2 col zp[2]:10 1552.0 +(byte*) gfx_mode::col#3 col zp[2]:10 202.0 (byte) gfx_mode::cx (byte) gfx_mode::cx#1 reg byte x 1501.5 (byte) gfx_mode::cx#2 reg byte x 500.5 (byte) gfx_mode::cy -(byte) gfx_mode::cy#1 cy zp[1]:10 151.5 -(byte) gfx_mode::cy#4 cy zp[1]:10 28.857142857142858 +(byte) gfx_mode::cy#1 cy zp[1]:9 151.5 +(byte) gfx_mode::cy#4 cy zp[1]:9 28.857142857142858 (byte) gfx_mode::dtv_control (byte) gfx_mode::dtv_control#10 reg byte x 4.0 (byte) gfx_mode::dtv_control#11 reg byte x 4.0 @@ -1028,7 +1031,7 @@ (byte~) keyboard_event_pressed::$1 reg byte a 4.0 (label) keyboard_event_pressed::@return (byte) keyboard_event_pressed::keycode -(byte) keyboard_event_pressed::keycode#4 keycode zp[1]:13 1.3333333333333333 +(byte) keyboard_event_pressed::keycode#4 keycode zp[1]:12 1.3333333333333333 (byte) keyboard_event_pressed::return (byte) keyboard_event_pressed::return#0 reg byte a 4.0 (byte) keyboard_event_pressed::return#1 reg byte a 4.0 @@ -1036,7 +1039,7 @@ (byte) keyboard_event_pressed::return#2 reg byte a 4.0 (byte) keyboard_event_pressed::return#3 reg byte a 4.0 (byte) keyboard_event_pressed::row_bits -(byte) keyboard_event_pressed::row_bits#0 row_bits zp[1]:31 2.0 +(byte) keyboard_event_pressed::row_bits#0 row_bits zp[1]:29 2.0 (void()) keyboard_event_scan() (byte~) keyboard_event_scan::$0 reg byte a 4.0 (byte~) keyboard_event_scan::$15 reg byte a 200002.0 @@ -1075,29 +1078,29 @@ (byte) keyboard_event_scan::event_type (byte) keyboard_event_scan::event_type#0 reg byte a 200002.0 (byte) keyboard_event_scan::keycode -(byte) keyboard_event_scan::keycode#1 keycode zp[1]:13 20002.0 -(byte) keyboard_event_scan::keycode#10 keycode zp[1]:13 31538.846153846156 -(byte) keyboard_event_scan::keycode#11 keycode zp[1]:13 5000.5 -(byte) keyboard_event_scan::keycode#13 keycode zp[1]:13 10001.0 -(byte) keyboard_event_scan::keycode#14 keycode zp[1]:13 52500.75 +(byte) keyboard_event_scan::keycode#1 keycode zp[1]:12 20002.0 +(byte) keyboard_event_scan::keycode#10 keycode zp[1]:12 31538.846153846156 +(byte) keyboard_event_scan::keycode#11 keycode zp[1]:12 5000.5 +(byte) keyboard_event_scan::keycode#13 keycode zp[1]:12 10001.0 +(byte) keyboard_event_scan::keycode#14 keycode zp[1]:12 52500.75 (byte) keyboard_event_scan::row -(byte) keyboard_event_scan::row#1 row zp[1]:10 15001.5 -(byte) keyboard_event_scan::row#2 row zp[1]:10 6000.24 +(byte) keyboard_event_scan::row#1 row zp[1]:9 15001.5 +(byte) keyboard_event_scan::row#2 row zp[1]:9 6000.24 (byte) keyboard_event_scan::row_scan -(byte) keyboard_event_scan::row_scan#0 row_scan zp[1]:31 12778.055555555557 +(byte) keyboard_event_scan::row_scan#0 row_scan zp[1]:29 12778.055555555557 (const byte*) keyboard_events[(number) 8] = { fill( 8, 0) } (byte) keyboard_events_size -(byte) keyboard_events_size#1 keyboard_events_size zp[1]:8 200002.0 -(byte) keyboard_events_size#100 keyboard_events_size zp[1]:8 882.6176470588235 -(byte) keyboard_events_size#105 keyboard_events_size zp[1]:8 102001.2 -(byte) keyboard_events_size#106 keyboard_events_size zp[1]:8 4286.428571428572 -(byte) keyboard_events_size#18 keyboard_events_size zp[1]:8 81000.90000000001 -(byte) keyboard_events_size#2 keyboard_events_size zp[1]:8 200002.0 -(byte) keyboard_events_size#24 keyboard_events_size zp[1]:8 6.766666666666667 -(byte) keyboard_events_size#27 keyboard_events_size zp[1]:8 0.3333333333333333 -(byte) keyboard_events_size#4 keyboard_events_size zp[1]:8 3.0 -(byte) keyboard_events_size#47 keyboard_events_size zp[1]:8 73.73333333333335 -(byte) keyboard_events_size#97 keyboard_events_size zp[1]:8 105.0 +(byte) keyboard_events_size#1 keyboard_events_size zp[1]:30 200002.0 +(byte) keyboard_events_size#100 keyboard_events_size zp[1]:30 882.6176470588235 +(byte) keyboard_events_size#105 keyboard_events_size zp[1]:30 102001.2 +(byte) keyboard_events_size#106 keyboard_events_size zp[1]:30 4286.428571428572 +(byte) keyboard_events_size#18 keyboard_events_size zp[1]:30 81000.90000000001 +(byte) keyboard_events_size#2 keyboard_events_size zp[1]:30 200002.0 +(byte) keyboard_events_size#24 keyboard_events_size zp[1]:30 6.766666666666667 +(byte) keyboard_events_size#27 keyboard_events_size zp[1]:30 0.3333333333333333 +(byte) keyboard_events_size#4 keyboard_events_size zp[1]:30 3.0 +(byte) keyboard_events_size#47 keyboard_events_size zp[1]:30 65.05882352941177 +(byte) keyboard_events_size#97 keyboard_events_size zp[1]:30 105.0 (void()) keyboard_init() (label) keyboard_init::@return (const byte*) keyboard_matrix_col_bitmask[(number) 8] = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 } @@ -1132,16 +1135,16 @@ (byte) memset::c (const byte) memset::c#0 c = (byte) ' ' (byte*) memset::dst -(byte*) memset::dst#1 dst zp[2]:11 202.0 -(byte*) memset::dst#2 dst zp[2]:11 135.33333333333331 -(byte*) memset::dst#4 dst zp[2]:11 4.0 +(byte*) memset::dst#1 dst zp[2]:10 202.0 +(byte*) memset::dst#2 dst zp[2]:10 135.33333333333331 +(byte*) memset::dst#4 dst zp[2]:10 4.0 (byte*) memset::end -(byte*) memset::end#0 end zp[2]:28 17.166666666666664 +(byte*) memset::end#0 end zp[2]:17 17.166666666666664 (word) memset::num (const word) memset::num#0 num = (word) $3e8 (void*) memset::return (void*) memset::str -(void*) memset::str#0 str zp[2]:11 0.6666666666666666 +(void*) memset::str#0 str zp[2]:10 0.6666666666666666 (const byte*) preset_8bpppixelcell[] = { (byte) $a, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) $b, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte*) preset_chunky[] = { (byte) 7, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 6, (byte) 0, (byte) 0, (byte) 0, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte*) preset_ecmchar[] = { (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 2, (byte) 0, (byte) 5, (byte) 0, (byte) 6 } @@ -1154,19 +1157,19 @@ (const byte*) preset_stdchar[] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte*) preset_twoplane[] = { (byte) 6, (byte) 1, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 7, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 8, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 7, (byte) 0, (byte) $d, (byte) 4, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (byte*) print_char_cursor -(byte*) print_char_cursor#1 print_char_cursor zp[2]:11 2002.0 -(byte*) print_char_cursor#20 print_char_cursor zp[2]:11 821.0 -(byte*) print_char_cursor#22 print_char_cursor zp[2]:11 102.0 -(byte*) print_char_cursor#38 print_char_cursor zp[2]:11 572.0 -(byte*) print_char_cursor#67 print_char_cursor zp[2]:11 4.0 -(byte*) print_char_cursor#68 print_char_cursor zp[2]:11 202.0 +(byte*) print_char_cursor#1 print_char_cursor zp[2]:10 2002.0 +(byte*) print_char_cursor#20 print_char_cursor zp[2]:10 821.0 +(byte*) print_char_cursor#22 print_char_cursor zp[2]:10 102.0 +(byte*) print_char_cursor#38 print_char_cursor zp[2]:10 572.0 +(byte*) print_char_cursor#67 print_char_cursor zp[2]:10 4.0 +(byte*) print_char_cursor#68 print_char_cursor zp[2]:10 202.0 (void()) print_cls() (label) print_cls::@return (const byte*) print_hextab[] = (byte*) "0123456789abcdef"z (byte*) print_line_cursor -(byte*) print_line_cursor#2 print_line_cursor zp[2]:14 8.749999999999998 -(byte*) print_line_cursor#21 print_line_cursor zp[2]:14 2004.0 -(byte*) print_line_cursor#22 print_line_cursor zp[2]:14 641.0 +(byte*) print_line_cursor#2 print_line_cursor zp[2]:13 8.749999999999998 +(byte*) print_line_cursor#21 print_line_cursor zp[2]:13 2004.0 +(byte*) print_line_cursor#22 print_line_cursor zp[2]:13 641.0 (void()) print_ln() (label) print_ln::@1 (label) print_ln::@return @@ -1174,14 +1177,14 @@ (void()) print_set_screen((byte*) print_set_screen::screen) (label) print_set_screen::@return (byte*) print_set_screen::screen -(byte*) print_set_screen::screen#2 screen zp[2]:14 0.26666666666666666 +(byte*) print_set_screen::screen#2 screen zp[2]:13 0.26666666666666666 (void()) print_str_at((byte*) print_str_at::str , (byte*) print_str_at::at) (label) print_str_at::@1 (label) print_str_at::@2 (label) print_str_at::@return (byte*) print_str_at::at -(byte*) print_str_at::at#0 at zp[2]:11 1001.0 -(byte*) print_str_at::at#2 at zp[2]:11 1001.0 +(byte*) print_str_at::at#0 at zp[2]:10 1001.0 +(byte*) print_str_at::at#2 at zp[2]:10 1001.0 (byte*) print_str_at::str (byte*) print_str_at::str#0 str zp[2]:6 2002.0 (byte*) print_str_at::str#1 str zp[2]:6 2.0 @@ -1261,27 +1264,26 @@ zp[2]:6 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte x [ gfx_init_plane_8bppchunky::gfxbCpuBank#4 gfx_init_plane_8bppchunky::gfxbCpuBank#7 gfx_init_plane_8bppchunky::gfxbCpuBank#8 gfx_init_plane_8bppchunky::gfxbCpuBank#2 ] -zp[1]:8 [ gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] -zp[1]:9 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] +zp[1]:8 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 bitmap_line::x0#0 bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 gfx_init_plane_horisontal2::ay#4 gfx_init_plane_horisontal2::ay#1 form_field_idx#28 form_field_idx#1 form_field_idx#18 form_field_idx#31 form_field_idx#6 form_field_idx#5 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] -zp[1]:10 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] +zp[1]:9 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#0 bitmap_line_ydxd::yd#1 bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_plane_horisontal::ay#4 gfx_init_plane_horisontal::ay#1 keyboard_event_scan::row#2 keyboard_event_scan::row#1 gfx_mode::cy#4 gfx_mode::cy#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] -zp[2]:11 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] +zp[2]:10 [ gfx_init_charset::chargen#2 gfx_init_charset::chargen#3 gfx_init_charset::chargen#1 bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 gfx_init_plane_8bppchunky::x#2 gfx_init_plane_8bppchunky::x#1 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 memset::dst#2 memset::dst#4 memset::dst#1 memset::str#0 print_char_cursor#20 print_char_cursor#22 print_char_cursor#67 print_char_cursor#68 print_char_cursor#38 print_char_cursor#1 print_str_at::at#2 print_str_at::at#0 gfx_mode::col#2 gfx_mode::col#3 gfx_mode::col#1 ] reg byte x [ gfx_init_charset::l#2 gfx_init_charset::l#1 ] -zp[1]:13 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 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[2]:14 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] +zp[1]:12 [ gfx_init_screen4::cy#4 gfx_init_screen4::cy#1 gfx_init_charset::c#4 gfx_init_charset::c#1 bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 bitmap_line::y0#0 bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#0 bitmap_line_ydxd::y1#1 gfx_init_plane_8bppchunky::y#6 gfx_init_plane_8bppchunky::y#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 keyboard_event_pressed::keycode#4 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[2]:13 [ gfx_init_screen4::ch#2 gfx_init_screen4::ch#3 gfx_init_screen4::ch#1 gfx_init_charset::charset#2 gfx_init_charset::charset#3 gfx_init_charset::charset#1 bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 bitmap_clear::bitmap#0 gfx_init_plane_8bppchunky::gfxb#4 gfx_init_plane_8bppchunky::gfxb#3 gfx_init_plane_8bppchunky::gfxb#5 gfx_init_plane_8bppchunky::gfxb#1 gfx_init_plane_fill::gfxb#2 gfx_init_plane_fill::gfxb#3 gfx_init_plane_fill::gfxb#1 gfx_init_plane_fill::gfxb#6 gfx_init_plane_fill::gfxb#0 gfx_init_plane_fill::$4 gfx_init_plane_fill::$5 print_line_cursor#21 print_line_cursor#2 print_set_screen::screen#2 print_line_cursor#22 apply_preset::preset#15 get_vic_charset::return#2 get_vic_charset::return#4 gfx_mode::$52 gfx_mode::$53 ] reg byte x [ gfx_init_screen4::cx#2 gfx_init_screen4::cx#1 ] reg byte x [ gfx_init_screen3::cx#2 gfx_init_screen3::cx#1 ] -zp[1]:16 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] +zp[1]:15 [ gfx_init_screen2::cy#4 gfx_init_screen2::cy#1 gfx_init_screen3::cy#4 gfx_init_screen3::cy#1 bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#3 bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 gfx_init_plane_fill::by#4 gfx_init_plane_fill::by#1 form_cursor_count#21 form_cursor_count#1 form_cursor_count#16 form_cursor_count#15 form_cursor_count#5 ] reg byte x [ gfx_init_screen2::cx#2 gfx_init_screen2::cx#1 ] reg byte x [ gfx_init_screen1::cx#2 gfx_init_screen1::cx#1 ] -zp[1]:17 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] +zp[1]:16 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_screen1::cy#4 gfx_init_screen1::cy#1 bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 bitmap_line::y1#0 bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 gfx_init_plane_vertical::by#4 gfx_init_plane_vertical::by#1 form_mode::preset_current#6 form_mode::preset_current#0 form_mode::preset_current#1 ] reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] reg byte a [ gfx_mode::$18 ] reg byte x [ gfx_mode::plane_a_offs#0 ] @@ -1336,7 +1338,7 @@ reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ form_control::return#0 ] reg byte a [ form_mode::$11 ] reg byte a [ apply_preset::idx#0 ] -reg byte a [ form_field_ptr::y#0 ] +reg byte y [ form_field_ptr::y#0 ] reg byte a [ form_control::$12 ] reg byte a [ keyboard_event_get::return#4 ] reg byte a [ form_control::key_event#0 ] @@ -1347,14 +1349,14 @@ reg byte a [ form_control::$13 ] reg byte a [ form_set_screen::$0 ] reg byte a [ form_set_screen::$1 ] reg byte a [ print_str_lines::ch#0 ] -zp[4]:18 [ gfx_init_plane_fill::$0 ] -zp[2]:22 [ gfx_init_plane_fill::$1 gfx_mode::$38 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] +zp[2]:17 [ memset::end#0 gfx_mode::$38 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_screen1::ch#2 gfx_init_screen1::ch#3 gfx_init_screen1::ch#1 gfx_init_screen2::ch#2 gfx_init_screen2::ch#3 gfx_init_screen2::ch#1 gfx_init_screen3::ch#2 gfx_init_screen3::ch#3 gfx_init_screen3::ch#1 ] +zp[4]:19 [ gfx_init_plane_fill::$0 ] +zp[2]:23 [ gfx_init_plane_fill::$1 gfx_mode::$40 ] reg byte a [ gfx_init_plane_fill::gfxbCpuBank#0 ] reg byte a [ gfx_init_plane_horisontal2::$2 ] reg byte a [ gfx_init_plane_horisontal2::row#0 ] reg byte a [ gfx_init_plane_horisontal::$2 ] reg byte a [ gfx_init_plane_charset8::$2 ] -zp[2]:24 [ gfx_init_plane_8bppchunky::$5 gfx_mode::$40 ] reg byte a [ gfx_init_plane_8bppchunky::c#0 ] reg byte x [ bitmap_line::x1#0 ] reg byte y [ bitmap_line::yd#2 ] @@ -1362,8 +1364,8 @@ reg byte y [ bitmap_line::yd#1 ] reg byte y [ bitmap_line::yd#10 ] reg byte y [ bitmap_line::yd#11 ] reg byte x [ bitmap_line_xdyi::$6 ] -zp[2]:26 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 form_field_ptr::line#0 gfx_mode::$24 ] -zp[2]:28 [ bitmap_plot::plotter_y#0 memset::end#0 gfx_mode::$26 ] +zp[2]:25 [ bitmap_plot::plotter_x#0 bitmap_plot::plotter#0 gfx_init_plane_8bppchunky::$5 form_field_ptr::line#0 gfx_mode::$24 ] +zp[2]:27 [ bitmap_plot::plotter_y#0 form_field_ptr::return#0 form_field_ptr::return#3 form_control::field#0 gfx_mode::$26 ] reg byte a [ bitmap_plot::$1 ] reg byte a [ bitmap_line_ydxi::$6 ] reg byte x [ bitmap_line_xdyd::$6 ] @@ -1373,7 +1375,7 @@ reg byte a [ bitmap_init::$7 ] reg byte a [ bitmap_init::$8 ] reg byte a [ bitmap_init::$9 ] reg byte a [ gfx_init_screen3::$0 ] -zp[1]:30 [ gfx_init_screen3::$1 form_field_ptr::x#0 ] +zp[1]:29 [ gfx_init_screen3::$1 bitmap_init::$10 form_field_ptr::x#0 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] reg byte a [ gfx_init_screen3::$2 ] reg byte a [ gfx_init_screen3::$3 ] reg byte a [ gfx_init_screen2::$0 ] @@ -1383,6 +1385,6 @@ reg byte a [ gfx_init_screen2::$4 ] reg byte a [ gfx_init_screen1::$0 ] reg byte a [ gfx_init_screen1::$1 ] reg byte a [ gfx_init_screen0::$0 ] -zp[1]:31 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 bitmap_init::$10 keyboard_event_pressed::row_bits#0 keyboard_event_scan::row_scan#0 gfx_mode::$50 bitmap_clear::y#4 bitmap_clear::y#1 bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 bitmap_line::xd#2 bitmap_line::xd#1 bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#0 bitmap_line_ydxd::xd#1 ] +zp[1]:30 [ gfx_init_screen0::$1 gfx_init_screen2::col2#0 gfx_init_vic_bitmap::l#2 gfx_init_vic_bitmap::l#1 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 gfx_init_plane_fill::fill#6 keyboard_events_size#18 keyboard_events_size#106 keyboard_events_size#97 keyboard_events_size#47 keyboard_events_size#27 keyboard_events_size#24 keyboard_events_size#100 keyboard_events_size#4 keyboard_events_size#105 keyboard_events_size#1 keyboard_events_size#2 ] reg byte a [ gfx_init_screen0::$2 ] reg byte a [ gfx_init_screen0::$3 ] diff --git a/src/test/ref/c64dtv-gfxmodes.asm b/src/test/ref/c64dtv-gfxmodes.asm index 2f6c56ac0..37991d9de 100644 --- a/src/test/ref/c64dtv-gfxmodes.asm +++ b/src/test/ref/c64dtv-gfxmodes.asm @@ -113,17 +113,22 @@ .label dtv_control = $d .label print_line_cursor = 9 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal) // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *DTV_FEATURE = DTV_FEATURE_ENABLE // Enable DTV extended modes lda #DTV_FEATURE_ENABLE sta DTV_FEATURE __b1: + // menu() jsr menu jmp __b1 } @@ -131,37 +136,48 @@ menu: { .label SCREEN = $8000 .label CHARSET = $9800 .label c = 4 + // *DTV_GRAPHICS_VIC_BANK = (byte)((dword)CHARSET/$10000) // Charset ROM // DTV Graphics Bank lda #0 sta DTV_GRAPHICS_VIC_BANK + // *DTV_COLOR_BANK_LO = <((word)(DTV_COLOR_BANK_DEFAULT/$400)) // DTV Color Bank lda #((word)(DTV_COLOR_BANK_DEFAULT/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = 0 // DTV Graphics Mode sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - default __b1: + // DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i] lda DTV_PALETTE_DEFAULT,x sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 @@ -171,6 +187,7 @@ menu: { sta.z c+1 // Char Colors __b2: + // for(byte* c=COLS;c!=COLS+1000;c++) lda.z c+1 cmp #>COLS+$3e8 beq !__b3+ @@ -181,103 +198,159 @@ menu: { beq !__b3+ jmp __b3 !__b3: + // *BGCOL = 0 // Screen colors lda #0 sta BGCOL + // *BORDERCOL = 0 sta BORDERCOL + // print_set_screen(SCREEN) jsr print_set_screen + // print_cls() jsr print_cls + // print_str_lines(MENU_TEXT) jsr print_str_lines __b5: + // keyboard_key_pressed(KEY_1) ldy #KEY_1 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_1) + // if(keyboard_key_pressed(KEY_1)!=0) cmp #0 beq __b6 + // mode_stdchar() jsr mode_stdchar + // } rts __b6: + // keyboard_key_pressed(KEY_2) ldy #KEY_2 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_2) + // if(keyboard_key_pressed(KEY_2)!=0) cmp #0 beq __b7 + // mode_ecmchar() jsr mode_ecmchar rts __b7: + // keyboard_key_pressed(KEY_3) ldy #KEY_3 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_3) + // if(keyboard_key_pressed(KEY_3)!=0) cmp #0 beq __b8 + // mode_mcchar() jsr mode_mcchar rts __b8: + // keyboard_key_pressed(KEY_4) ldy #KEY_4 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_4) + // if(keyboard_key_pressed(KEY_4)!=0) cmp #0 beq __b9 + // mode_stdbitmap() jsr mode_stdbitmap rts __b9: + // keyboard_key_pressed(KEY_6) ldy #KEY_6 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_6) + // if(keyboard_key_pressed(KEY_6)!=0) cmp #0 beq __b10 + // mode_hicolstdchar() jsr mode_hicolstdchar rts __b10: + // keyboard_key_pressed(KEY_7) ldy #KEY_7 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_7) + // if(keyboard_key_pressed(KEY_7)!=0) cmp #0 beq __b11 + // mode_hicolecmchar() jsr mode_hicolecmchar rts __b11: + // keyboard_key_pressed(KEY_8) ldy #KEY_8 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_8) + // if(keyboard_key_pressed(KEY_8)!=0) cmp #0 beq __b12 + // mode_hicolmcchar() jsr mode_hicolmcchar rts __b12: + // keyboard_key_pressed(KEY_A) ldy #KEY_A jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_A) + // if(keyboard_key_pressed(KEY_A)!=0) cmp #0 beq __b13 + // mode_sixsfred2() jsr mode_sixsfred2 rts __b13: + // keyboard_key_pressed(KEY_B) ldy #KEY_B jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_B) + // if(keyboard_key_pressed(KEY_B)!=0) cmp #0 beq __b14 + // mode_twoplanebitmap() jsr mode_twoplanebitmap rts __b14: + // keyboard_key_pressed(KEY_C) ldy #KEY_C jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_C) + // if(keyboard_key_pressed(KEY_C)!=0) cmp #0 beq __b15 + // mode_sixsfred() jsr mode_sixsfred rts __b15: + // keyboard_key_pressed(KEY_D) ldy #KEY_D jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_D) + // if(keyboard_key_pressed(KEY_D)!=0) cmp #0 beq __b16 + // mode_8bpppixelcell() jsr mode_8bpppixelcell rts __b16: + // keyboard_key_pressed(KEY_E) ldy #KEY_E jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_E) + // if(keyboard_key_pressed(KEY_E)!=0) cmp #0 bne !__b5+ jmp __b5 !__b5: + // mode_8bppchunkybmm() jsr mode_8bppchunkybmm rts __b3: + // *c=LIGHT_GREEN lda #LIGHT_GREEN ldy #0 sta (c),y + // for(byte* c=COLS;c!=COLS+1000;c++) inc.z c bne !+ inc.z c+1 @@ -297,34 +370,47 @@ mode_8bppchunkybmm: { .label gfxb = $b .label x = 4 .label y = $d + // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY | DTV_COLORRAM_OFF lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_COLORRAM_OFF sta DTV_CONTROL + // *VIC_CONTROL = VIC_ECM | VIC_DEN | VIC_RSEL | 3 // VIC Graphics Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_MCM | VIC_CSEL lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 + // *DTV_PLANEB_START_LO = < < PLANEB // Linear Graphics Plane B Counter lda #0 sta DTV_PLANEB_START_LO + // *DTV_PLANEB_START_MI = > < PLANEB sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = < > PLANEB lda #>$10 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 8 lda #8 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 lda #0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *BORDERCOL = $00 // Border color sta BORDERCOL tax // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // dtvSetCpuBankSegment1(gfxbCpuBank++) lda #PLANEB/$4000 jsr dtvSetCpuBankSegment1 ldx #PLANEB/$4000+1 @@ -339,20 +425,24 @@ mode_8bppchunkybmm: { sta.z x sta.z x+1 __b4: + // if(gfxb==$8000) lda.z gfxb+1 cmp #>$8000 bne __b5 lda.z gfxb cmp #<$8000 bne __b5 + // dtvSetCpuBankSegment1(gfxbCpuBank++) txa jsr dtvSetCpuBankSegment1 + // dtvSetCpuBankSegment1(gfxbCpuBank++); inx lda #<$4000 sta.z gfxb lda #>$4000 sta.z gfxb+1 __b5: + // x+y lda.z y clc adc.z x @@ -360,13 +450,17 @@ mode_8bppchunkybmm: { lda #0 adc.z x+1 sta.z __7+1 + // c = (byte)(x+y) lda.z __7 + // *gfxb++ = c ldy #0 sta (gfxb),y + // *gfxb++ = c; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for (word x : 0..319) inc.z x bne !+ inc.z x+1 @@ -377,15 +471,19 @@ mode_8bppchunkybmm: { lda.z x cmp #<$140 bne __b4 + // for(byte y : 0..199) inc.z y lda #$c8 cmp.z y bne __b3 + // dtvSetCpuBankSegment1((byte)($4000/$4000)) lda #$4000/$4000 jsr dtvSetCpuBankSegment1 + // mode_ctrl() lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_COLORRAM_OFF sta.z dtv_control jsr mode_ctrl + // } rts } // Allow the user to control the DTV graphics using different keys @@ -393,75 +491,112 @@ mode_ctrl: { __b1: // Wait for the raster __b2: + // while(*RASTER!=$ff) lda #$ff cmp RASTER bne __b2 + // keyboard_key_pressed(KEY_SPACE) ldy #KEY_SPACE jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // if(keyboard_key_pressed(KEY_SPACE)!=0) cmp #0 beq __b4 + // } rts __b4: + // ctrl = dtv_control // Read the current control byte ldx.z dtv_control + // keyboard_key_pressed(KEY_L) ldy #KEY_L jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_L) + // if(keyboard_key_pressed(KEY_L)!=0) cmp #0 beq __b5 + // ctrl = ctrl|DTV_LINEAR txa ora #DTV_LINEAR tax __b5: + // keyboard_key_pressed(KEY_H) ldy #KEY_H jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_H) + // if(keyboard_key_pressed(KEY_H)!=0) cmp #0 beq __b6 + // ctrl = ctrl|DTV_HIGHCOLOR txa ora #DTV_HIGHCOLOR tax __b6: + // keyboard_key_pressed(KEY_O) ldy #KEY_O jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_O) + // if(keyboard_key_pressed(KEY_O)!=0) cmp #0 beq __b7 + // ctrl = ctrl|DTV_OVERSCAN txa ora #DTV_OVERSCAN tax __b7: + // keyboard_key_pressed(KEY_B) ldy #KEY_B jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_B) + // if(keyboard_key_pressed(KEY_B)!=0) cmp #0 beq __b8 + // ctrl = ctrl|DTV_BORDER_OFF txa ora #DTV_BORDER_OFF tax __b8: + // keyboard_key_pressed(KEY_U) ldy #KEY_U jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_U) + // if(keyboard_key_pressed(KEY_U)!=0) cmp #0 beq __b9 + // ctrl = ctrl|DTV_CHUNKY txa ora #DTV_CHUNKY tax __b9: + // keyboard_key_pressed(KEY_C) ldy #KEY_C jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_C) + // if(keyboard_key_pressed(KEY_C)!=0) cmp #0 beq __b10 + // ctrl = ctrl|DTV_COLORRAM_OFF txa ora #DTV_COLORRAM_OFF tax __b10: + // keyboard_key_pressed(KEY_0) ldy #KEY_0 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_0) + // if(keyboard_key_pressed(KEY_0)!=0) cmp #0 beq __b11 ldx #0 __b11: + // if(ctrl != dtv_control) cpx.z dtv_control beq __b1 + // dtv_control = ctrl stx.z dtv_control + // *DTV_CONTROL = ctrl stx DTV_CONTROL + // *BORDERCOL = ctrl stx BORDERCOL jmp __b1 } @@ -472,17 +607,22 @@ mode_ctrl: { // keyboard_key_pressed(byte register(Y) key) keyboard_key_pressed: { .label colidx = 6 + // colidx = key&7 tya and #7 sta.z colidx + // rowidx = key>>3 tya lsr lsr lsr + // keyboard_matrix_read(rowidx) tay jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] ldy.z colidx and keyboard_matrix_col_bitmask,y + // } rts } // Read a single row of the keyboard matrix @@ -492,10 +632,13 @@ keyboard_key_pressed: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(Y) rowid) keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask,y sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff) @@ -505,10 +648,13 @@ keyboard_matrix_read: { dtvSetCpuBankSegment1: { // Move CPU BANK 1 SEGMENT ($4000-$7fff) .label cpuBank = $ff + // *cpuBank = cpuBankIdx sta cpuBank + // asm .byte $32, $dd lda.z $ff .byte $32, $00 + // } rts } //8bpp Pixel Cell Mode (BMM/COLDIS = 0, ECM/MCM/HICOL/LINEAR/CHUNK = 1) @@ -536,41 +682,59 @@ mode_8bpppixelcell: { .label col = 7 .label cr = 3 .label ch = 2 + // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY sta DTV_CONTROL + // *VIC_CONTROL = VIC_ECM|VIC_DEN|VIC_RSEL|3 // VIC Graphics Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_MCM|VIC_CSEL lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 + // *DTV_PLANEA_START_LO = PLANEA lda #>PLANEA sta DTV_PLANEA_START_MI + // *DTV_PLANEA_START_HI = 0 lda #0 sta DTV_PLANEA_START_HI + // *DTV_PLANEA_STEP = 1 lda #1 sta DTV_PLANEA_STEP + // *DTV_PLANEA_MODULO_LO = 0 lda #0 sta DTV_PLANEA_MODULO_LO + // *DTV_PLANEA_MODULO_HI = 0 sta DTV_PLANEA_MODULO_HI + // *DTV_PLANEB_START_LO = PLANEB lda #>PLANEB sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = 0 lda #0 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 0 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *BORDERCOL = $00 // Border color sta BORDERCOL tax // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 @@ -583,29 +747,38 @@ mode_8bpppixelcell: { __b2: ldx #0 __b3: + // ay & $f lda #$f and.z ay + // (ay & $f)*$10 asl asl asl asl sta.z __3 + // ax & $f txa and #$f + // (ay & $f)*$10 | (ax & $f) ora.z __3 + // *gfxa++ = (ay & $f)*$10 | (ax & $f) ldy #0 sta (gfxa),y + // *gfxa++ = (ay & $f)*$10 | (ax & $f); inc.z gfxa bne !+ inc.z gfxa+1 !: + // for (byte ax : 0..39) inx cpx #$28 bne __b3 + // for(byte ay : 0..24) inc.z ay lda #$19 cmp.z ay bne __b2 + // *PROCPORT = PROCPORT_RAM_CHARROM // 8bpp cells for Plane B (charset) - ROM charset with 256 colors lda #PROCPORT_RAM_CHARROM sta PROCPORT @@ -624,6 +797,7 @@ mode_8bpppixelcell: { lda #0 sta.z cr __b7: + // bits = *chargen++ ldy #0 lda (chargen),y sta.z bits @@ -633,8 +807,10 @@ mode_8bpppixelcell: { !: ldx #0 __b8: + // bits & $80 lda #$80 and.z bits + // if((bits & $80) != 0) cmp #0 beq b1 lda.z col @@ -642,30 +818,40 @@ mode_8bpppixelcell: { b1: lda #0 __b9: + // *gfxb++ = c ldy #0 sta (gfxb),y + // *gfxb++ = c; inc.z gfxb bne !+ inc.z gfxb+1 !: + // bits = bits*2 asl.z bits + // col++; inc.z col + // for ( byte cp : 0..7) inx cpx #8 bne __b8 + // for ( byte cr : 0..7) inc.z cr lda #8 cmp.z cr bne __b7 + // for(byte ch : $00..$ff) inc.z ch lda.z ch cmp #0 bne __b6 + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // mode_ctrl() lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY sta.z dtv_control jsr mode_ctrl + // } rts } // Sixs Fred Mode - 8bpp Packed Bitmap - Generated from the two DTV linear graphics plane counters @@ -687,49 +873,69 @@ mode_sixsfred: { // Graphics for Plane B - vertical stripes every 2 pixels .label gfxb = $b .label by = 3 + // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR lda #DTV_HIGHCOLOR|DTV_LINEAR sta DTV_CONTROL + // *VIC_CONTROL = VIC_ECM|VIC_BMM|VIC_DEN|VIC_RSEL|3 // VIC Graphics Mode lda #VIC_ECM|VIC_BMM|VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_MCM|VIC_CSEL lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 + // *DTV_PLANEA_START_LO = PLANEA lda #>PLANEA sta DTV_PLANEA_START_MI + // *DTV_PLANEA_START_HI = 0 lda #0 sta DTV_PLANEA_START_HI + // *DTV_PLANEA_STEP = 1 lda #1 sta DTV_PLANEA_STEP + // *DTV_PLANEA_MODULO_LO = 0 lda #0 sta DTV_PLANEA_MODULO_LO + // *DTV_PLANEA_MODULO_HI = 0 sta DTV_PLANEA_MODULO_HI + // *DTV_PLANEB_START_LO = PLANEB lda #>PLANEB sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = 0 lda #0 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 1 lda #1 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 lda #0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *DTV_COLOR_BANK_LO = <(COLORS/$400) // DTV Color Bank lda #(COLORS/$400) lda #0 sta DTV_COLOR_BANK_HI tax // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = $00 // Screen colors lda #0 sta BORDERCOL @@ -742,19 +948,25 @@ mode_sixsfred: { __b3: ldx #0 __b4: + // cx+cy txa clc adc.z cy + // (cx+cy) & $f and #$f + // *col++ = (cx+cy) & $f ldy #0 sta (col),y + // *col++ = (cx+cy) & $f; inc.z col bne !+ inc.z col+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b4 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy @@ -768,20 +980,26 @@ mode_sixsfred: { __b6: ldx #0 __b7: + // ay/2 lda.z ay lsr + // row = (ay/2) & 3 and #3 + // *gfxa++ = row_bitmask[row] tay lda row_bitmask,y ldy #0 sta (gfxa),y + // *gfxa++ = row_bitmask[row]; inc.z gfxa bne !+ inc.z gfxa+1 !: + // for (byte ax : 0..39) inx cpx #$28 bne __b7 + // for(byte ay : 0..199) inc.z ay lda #$c8 cmp.z ay @@ -795,23 +1013,29 @@ mode_sixsfred: { __b9: ldx #0 __b10: + // *gfxb++ = %00011011 lda #$1b ldy #0 sta (gfxb),y + // *gfxb++ = %00011011; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for ( byte bx : 0..39) inx cpx #$28 bne __b10 + // for(byte by : 0..199) inc.z by lda #$c8 cmp.z by bne __b9 + // mode_ctrl() lda #DTV_HIGHCOLOR|DTV_LINEAR sta.z dtv_control jsr mode_ctrl + // } rts row_bitmask: .byte 0, $55, $aa, $ff } @@ -839,54 +1063,76 @@ mode_twoplanebitmap: { // Graphics for Plane B - vertical stripes .label gfxb = 4 .label by = 2 + // *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR lda #DTV_HIGHCOLOR|DTV_LINEAR sta DTV_CONTROL + // *VIC_CONTROL = VIC_ECM|VIC_BMM|VIC_DEN|VIC_RSEL|3 // VIC Graphics Mode lda #VIC_ECM|VIC_BMM|VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *DTV_PLANEA_START_LO = PLANEA lda #>PLANEA sta DTV_PLANEA_START_MI + // *DTV_PLANEA_START_HI = 0 lda #0 sta DTV_PLANEA_START_HI + // *DTV_PLANEA_STEP = 1 lda #1 sta DTV_PLANEA_STEP + // *DTV_PLANEA_MODULO_LO = 0 lda #0 sta DTV_PLANEA_MODULO_LO + // *DTV_PLANEA_MODULO_HI = 0 sta DTV_PLANEA_MODULO_HI + // *DTV_PLANEB_START_LO = PLANEB lda #>PLANEB sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = 0 lda #0 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 1 lda #1 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 lda #0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *DTV_COLOR_BANK_LO = <(COLORS/$400) // DTV Color Bank lda #(COLORS/$400) lda #0 sta DTV_COLOR_BANK_HI tax // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = $00 // Screen colors lda #0 sta BORDERCOL + // *BGCOL1 = $70 lda #$70 sta BGCOL1 + // *BGCOL2 = $d4 // Color for bits 00 lda #$d4 sta BGCOL2 @@ -899,25 +1145,33 @@ mode_twoplanebitmap: { __b3: ldx #0 __b4: + // cy & $f lda #$f and.z cy + // (cy & $f)*$10 asl asl asl asl sta.z __3 + // cx &$f txa and #$f + // (cy & $f)*$10 | (cx &$f) ora.z __3 + // *col++ = (cy & $f)*$10 | (cx &$f) ldy #0 sta (col),y + // *col++ = (cy & $f)*$10 | (cx &$f); inc.z col bne !+ inc.z col+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b4 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy @@ -931,21 +1185,27 @@ mode_twoplanebitmap: { __b6: ldx #0 __b7: + // ay&4 lda #4 and.z ay + // if((ay&4)==0) cmp #0 beq __b8 + // *gfxa++ = %11111111 lda #$ff ldy #0 sta (gfxa),y + // *gfxa++ = %11111111; inc.z gfxa bne !+ inc.z gfxa+1 !: __b9: + // for (byte ax : 0..39) inx cpx #$28 bne __b7 + // for(byte ay : 0..199) inc.z ay lda #$c8 cmp.z ay @@ -959,28 +1219,36 @@ mode_twoplanebitmap: { __b12: ldx #0 __b13: + // *gfxb++ = %00001111 lda #$f ldy #0 sta (gfxb),y + // *gfxb++ = %00001111; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for ( byte bx : 0..39) inx cpx #$28 bne __b13 + // for(byte by : 0..199) inc.z by lda #$c8 cmp.z by bne __b12 + // mode_ctrl() lda #DTV_HIGHCOLOR|DTV_LINEAR sta.z dtv_control jsr mode_ctrl + // } rts __b8: + // *gfxa++ = %00000000 lda #0 tay sta (gfxa),y + // *gfxa++ = %00000000; inc.z gfxa bne !+ inc.z gfxa+1 @@ -1007,49 +1275,69 @@ mode_sixsfred2: { // Graphics for Plane B - vertical stripes every 2 pixels .label gfxb = $b .label by = 6 + // *DTV_CONTROL = DTV_LINEAR lda #DTV_LINEAR sta DTV_CONTROL + // *VIC_CONTROL = VIC_ECM|VIC_BMM|VIC_DEN|VIC_RSEL|3 // VIC Graphics Mode lda #VIC_ECM|VIC_BMM|VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_MCM|VIC_CSEL lda #VIC_MCM|VIC_CSEL sta VIC_CONTROL2 + // *DTV_PLANEA_START_LO = PLANEA lda #>PLANEA sta DTV_PLANEA_START_MI + // *DTV_PLANEA_START_HI = 0 lda #0 sta DTV_PLANEA_START_HI + // *DTV_PLANEA_STEP = 1 lda #1 sta DTV_PLANEA_STEP + // *DTV_PLANEA_MODULO_LO = 0 lda #0 sta DTV_PLANEA_MODULO_LO + // *DTV_PLANEA_MODULO_HI = 0 sta DTV_PLANEA_MODULO_HI + // *DTV_PLANEB_START_LO = PLANEB lda #>PLANEB sta DTV_PLANEB_START_MI + // *DTV_PLANEB_START_HI = 0 lda #0 sta DTV_PLANEB_START_HI + // *DTV_PLANEB_STEP = 1 lda #1 sta DTV_PLANEB_STEP + // *DTV_PLANEB_MODULO_LO = 0 lda #0 sta DTV_PLANEB_MODULO_LO + // *DTV_PLANEB_MODULO_HI = 0 sta DTV_PLANEB_MODULO_HI + // *DTV_COLOR_BANK_LO = <(COLORS/$400) // DTV Color Bank lda #(COLORS/$400) lda #0 sta DTV_COLOR_BANK_HI tax // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = $00 // Screen colors lda #0 sta BORDERCOL @@ -1062,25 +1350,33 @@ mode_sixsfred2: { __b3: ldx #0 __b4: + // cx&3 txa and #3 + // (cx&3)*$10 asl asl asl asl sta.z __3 + // cy&3 lda #3 and.z cy + // (cx&3)*$10|(cy&3) ora.z __3 + // *col++ = (cx&3)*$10|(cy&3) ldy #0 sta (col),y + // *col++ = (cx&3)*$10|(cy&3); inc.z col bne !+ inc.z col+1 !: + // for(byte cx: 0..39) inx cpx #$28 bne __b4 + // for(byte cy: 0..24 ) inc.z cy lda #$19 cmp.z cy @@ -1094,20 +1390,26 @@ mode_sixsfred2: { __b6: ldx #0 __b7: + // ay/2 lda.z ay lsr + // row = (ay/2) & 3 and #3 + // *gfxa++ = row_bitmask[row] tay lda row_bitmask,y ldy #0 sta (gfxa),y + // *gfxa++ = row_bitmask[row]; inc.z gfxa bne !+ inc.z gfxa+1 !: + // for (byte ax : 0..39) inx cpx #$28 bne __b7 + // for(byte ay : 0..199) inc.z ay lda #$c8 cmp.z ay @@ -1121,23 +1423,29 @@ mode_sixsfred2: { __b9: ldx #0 __b10: + // *gfxb++ = %00011011 lda #$1b ldy #0 sta (gfxb),y + // *gfxb++ = %00011011; inc.z gfxb bne !+ inc.z gfxb+1 !: + // for ( byte bx : 0..39) inx cpx #$28 bne __b10 + // for(byte by : 0..199) inc.z by lda #$c8 cmp.z by bne __b9 + // mode_ctrl() lda #DTV_LINEAR sta.z dtv_control jsr mode_ctrl + // } rts row_bitmask: .byte 0, $55, $aa, $ff } @@ -1163,46 +1471,61 @@ mode_hicolmcchar: { .label col = $b .label ch = 4 .label cy = 3 + // *DTV_GRAPHICS_VIC_BANK = (byte)((dword)CHARSET/$10000) // DTV Graphics Bank lda #0 sta DTV_GRAPHICS_VIC_BANK + // *DTV_COLOR_BANK_LO = <((word)(COLORS/$400)) // DTV Color Bank lda #((word)(COLORS/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = DTV_HIGHCOLOR lda #DTV_HIGHCOLOR sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL|VIC_MCM lda #VIC_CSEL|VIC_MCM sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = 0 // Screen colors lda #0 sta BORDERCOL + // *BGCOL1 = $50 lda #$50 sta BGCOL1 + // *BGCOL2 = $54 lda #$54 sta BGCOL2 + // *BGCOL3 = $58 lda #$58 sta BGCOL3 lda #((word)(COLORS/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = DTV_HIGHCOLOR lda #DTV_HIGHCOLOR sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|VIC_ECM|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|VIC_ECM|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = 0 // Screen colors lda #0 sta BORDERCOL + // *BGCOL1 = $50 lda #$50 sta BGCOL1 + // *BGCOL2 = $54 lda #$54 sta BGCOL2 + // *BGCOL3 = $58 lda #$58 sta BGCOL3 + // *BGCOL4 = $5c lda #$5c sta BGCOL4 lda #((word)(COLORS/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = DTV_HIGHCOLOR lda #DTV_HIGHCOLOR sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - Grey Tones __b1: + // DTV_PALETTE[i] = i txa sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BGCOL = 0 // Screen colors lda #0 sta BGCOL + // *BORDERCOL = 0 sta BORDERCOL lda #>1 lda.z yd lsr sta.z e __b1: + // bitmap_plot(x,y) ldx.z x ldy.z y jsr bitmap_plot + // x++; inc.z x + // e = e+yd lda.z e clc adc.z yd sta.z e + // if(xd>1 lda.z xd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(yd>1 lda.z yd lsr sta.z e __b1: + // bitmap_plot(x,y) ldx.z x ldy.z y jsr bitmap_plot + // x++; inc.z x + // e = e+yd lda.z e clc adc.z yd sta.z e + // if(xd>1 lda.z xd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // y = y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(ydbitmap lda #>mode_stdbitmap.BITMAP sta bitmap_plot_xhi,x + // bitmap_plot_bit[x] = bits tya sta bitmap_plot_bit,x + // bits = bits>>1 tya lsr tay + // if(bits==0) cpy #0 bne __b2 ldy #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -1906,16 +2402,24 @@ bitmap_init: { sta.z yoffs+1 tax __b3: + // y&$7 lda #7 sax.z __10 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __10 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -1924,9 +2428,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Multicolor Character Mode (LINEAR/HICOL/CHUNK/COLDIS/BMM/ECM = 0, MCM = 1) @@ -1951,45 +2457,60 @@ mode_mcchar: { .label col = $b .label ch = 4 .label cy = 7 + // *DTV_GRAPHICS_VIC_BANK = (byte)((dword)CHARSET/$10000) // DTV Graphics Bank lda #0 sta DTV_GRAPHICS_VIC_BANK + // *DTV_COLOR_BANK_LO = <((word)(DTV_COLOR_BANK_DEFAULT/$400)) // DTV Color Bank lda #((word)(DTV_COLOR_BANK_DEFAULT/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = 0 sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL|VIC_MCM lda #VIC_CSEL|VIC_MCM sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - default __b1: + // DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i] lda DTV_PALETTE_DEFAULT,x sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = 0 // Screen colors lda #0 sta BORDERCOL + // *BGCOL1 = BLACK lda #BLACK sta BGCOL1 + // *BGCOL2 = GREEN lda #GREEN sta BGCOL2 + // *BGCOL3 = BLUE lda #BLUE sta BGCOL3 lda #((word)(DTV_COLOR_BANK_DEFAULT/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = 0 sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|VIC_ECM|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|VIC_ECM|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - default __b1: + // DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i] lda DTV_PALETTE_DEFAULT,x sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BORDERCOL = 0 // Screen colors lda #0 sta BORDERCOL + // *BGCOL1 = 0 sta BGCOL1 + // *BGCOL2 = 2 lda #2 sta BGCOL2 + // *BGCOL3 = 5 lda #5 sta BGCOL3 + // *BGCOL4 = 6 lda #6 sta BGCOL4 lda #((word)(DTV_COLOR_BANK_DEFAULT/$400)) lda #0 sta DTV_COLOR_BANK_HI + // *DTV_CONTROL = 0 sta DTV_CONTROL + // *CIA2_PORT_A_DDR = %00000011 // VIC Graphics Bank lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = %00000011 ^ (byte)((word)CHARSET/$4000) // Set VIC Bank bits to output - all others to input lda #3^CHARSET/$4000 sta CIA2_PORT_A + // *VIC_CONTROL = VIC_DEN|VIC_RSEL|3 // Set VIC Bank // VIC Graphics Mode lda #VIC_DEN|VIC_RSEL|3 sta VIC_CONTROL + // *VIC_CONTROL2 = VIC_CSEL lda #VIC_CSEL sta VIC_CONTROL2 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)CHARSET&$3fff)/$400)) // VIC Memory Pointers lda #(CHARSET&$3fff)/$400 sta VIC_MEMORY ldx #0 // DTV Palette - default __b1: + // DTV_PALETTE[i] = DTV_PALETTE_DEFAULT[i] lda DTV_PALETTE_DEFAULT,x sta DTV_PALETTE,x + // for(byte i : 0..$f) inx cpx #$10 bne __b1 + // *BGCOL = 0 // Screen colors lda #0 sta BGCOL + // *BORDERCOL = 0 sta BORDERCOL lda #MENU_TEXT sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // ch = *(str++) ldy #0 lda (str),y inc.z str bne !+ inc.z str+1 !: + // if(ch) cmp #0 beq __b3 + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: __b3: + // while (ch) cmp #0 bne __b2 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor @@ -2312,6 +2912,7 @@ print_str_lines: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -2319,6 +2920,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorstr sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 [286] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 [305] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 [309] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 [328] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 [332] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 [352] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 [356] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) menu::$3 [397] if((byte) menu::i#1!=rangelast(0,$f)) goto menu::@1 -Simple Condition (bool~) menu::$4 [402] if((byte*) menu::c#2!=(const byte*) COLS+(word) $3e8) goto menu::@4 -Simple Condition (bool~) menu::$7 [434] if((byte~) menu::$5==(byte) 0) goto menu::@12 -Simple Condition (bool~) menu::$11 [443] if((byte~) menu::$9==(byte) 0) goto menu::@13 -Simple Condition (bool~) menu::$15 [462] if((byte~) menu::$13==(byte) 0) goto menu::@14 -Simple Condition (bool~) menu::$19 [475] if((byte~) menu::$17==(byte) 0) goto menu::@15 -Simple Condition (bool~) menu::$23 [488] if((byte~) menu::$21==(byte) 0) goto menu::@16 -Simple Condition (bool~) menu::$27 [501] if((byte~) menu::$25==(byte) 0) goto menu::@17 -Simple Condition (bool~) menu::$31 [514] if((byte~) menu::$29==(byte) 0) goto menu::@18 -Simple Condition (bool~) menu::$35 [527] if((byte~) menu::$33==(byte) 0) goto menu::@19 -Simple Condition (bool~) menu::$39 [540] if((byte~) menu::$37==(byte) 0) goto menu::@20 -Simple Condition (bool~) menu::$43 [553] if((byte~) menu::$41==(byte) 0) goto menu::@21 -Simple Condition (bool~) menu::$47 [566] if((byte~) menu::$45==(byte) 0) goto menu::@22 -Simple Condition (bool~) menu::$51 [579] if((byte~) menu::$49==(byte) 0) goto menu::@9 -Simple Condition (bool~) mode_ctrl::$0 [595] if(*((const byte*) RASTER)!=(byte) $ff) goto mode_ctrl::@4 -Simple Condition (bool~) mode_ctrl::$3 [604] if((byte~) mode_ctrl::$1==(byte) 0) goto mode_ctrl::@12 -Simple Condition (bool~) mode_ctrl::$6 [614] if((byte~) mode_ctrl::$4==(byte) 0) goto mode_ctrl::@13 -Simple Condition (bool~) mode_ctrl::$10 [626] if((byte~) mode_ctrl::$8==(byte) 0) goto mode_ctrl::@14 -Simple Condition (bool~) mode_ctrl::$14 [638] if((byte~) mode_ctrl::$12==(byte) 0) goto mode_ctrl::@15 -Simple Condition (bool~) mode_ctrl::$18 [650] if((byte~) mode_ctrl::$16==(byte) 0) goto mode_ctrl::@16 -Simple Condition (bool~) mode_ctrl::$22 [662] if((byte~) mode_ctrl::$20==(byte) 0) goto mode_ctrl::@17 -Simple Condition (bool~) mode_ctrl::$26 [674] if((byte~) mode_ctrl::$24==(byte) 0) goto mode_ctrl::@18 -Simple Condition (bool~) mode_ctrl::$30 [686] if((byte~) mode_ctrl::$28==(byte) 0) goto mode_ctrl::@19 -Simple Condition (bool~) mode_ctrl::$32 [693] if((byte) mode_ctrl::ctrl#14==(byte) dtv_control#114) goto mode_ctrl::@1 -Simple Condition (bool~) mode_stdchar::$1 [715] if((byte) mode_stdchar::i#1!=rangelast(0,$f)) goto mode_stdchar::@1 -Simple Condition (bool~) mode_stdchar::$8 [737] if((byte) mode_stdchar::cx#1!=rangelast(0,$27)) goto mode_stdchar::@4 -Simple Condition (bool~) mode_stdchar::$9 [741] if((byte) mode_stdchar::cy#1!=rangelast(0,$18)) goto mode_stdchar::@3 -Simple Condition (bool~) mode_ecmchar::$1 [764] if((byte) mode_ecmchar::i#1!=rangelast(0,$f)) goto mode_ecmchar::@1 -Simple Condition (bool~) mode_ecmchar::$8 [789] if((byte) mode_ecmchar::cx#1!=rangelast(0,$27)) goto mode_ecmchar::@4 -Simple Condition (bool~) mode_ecmchar::$9 [793] if((byte) mode_ecmchar::cy#1!=rangelast(0,$18)) goto mode_ecmchar::@3 -Simple Condition (bool~) mode_mcchar::$1 [816] if((byte) mode_mcchar::i#1!=rangelast(0,$f)) goto mode_mcchar::@1 -Simple Condition (bool~) mode_mcchar::$8 [840] if((byte) mode_mcchar::cx#1!=rangelast(0,$27)) goto mode_mcchar::@4 -Simple Condition (bool~) mode_mcchar::$9 [844] if((byte) mode_mcchar::cy#1!=rangelast(0,$18)) goto mode_mcchar::@3 -Simple Condition (bool~) mode_stdbitmap::$3 [865] if((byte) mode_stdbitmap::i#1!=rangelast(0,$f)) goto mode_stdbitmap::@1 -Simple Condition (bool~) mode_stdbitmap::$9 [885] if((byte) mode_stdbitmap::cx#1!=rangelast(0,$27)) goto mode_stdbitmap::@4 -Simple Condition (bool~) mode_stdbitmap::$10 [889] if((byte) mode_stdbitmap::cy#1!=rangelast(0,$18)) goto mode_stdbitmap::@3 -Simple Condition (bool~) mode_stdbitmap::$11 [899] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8 -Simple Condition (bool~) mode_hicolstdchar::$1 [932] if((byte) mode_hicolstdchar::i#1!=rangelast(0,$f)) goto mode_hicolstdchar::@1 -Simple Condition (bool~) mode_hicolstdchar::$6 [953] if((byte) mode_hicolstdchar::cx#1!=rangelast(0,$27)) goto mode_hicolstdchar::@4 -Simple Condition (bool~) mode_hicolstdchar::$7 [957] if((byte) mode_hicolstdchar::cy#1!=rangelast(0,$18)) goto mode_hicolstdchar::@3 -Simple Condition (bool~) mode_hicolecmchar::$1 [980] if((byte) mode_hicolecmchar::i#1!=rangelast(0,$f)) goto mode_hicolecmchar::@1 -Simple Condition (bool~) mode_hicolecmchar::$6 [1004] if((byte) mode_hicolecmchar::cx#1!=rangelast(0,$27)) goto mode_hicolecmchar::@4 -Simple Condition (bool~) mode_hicolecmchar::$7 [1008] if((byte) mode_hicolecmchar::cy#1!=rangelast(0,$18)) goto mode_hicolecmchar::@3 -Simple Condition (bool~) mode_hicolmcchar::$1 [1031] if((byte) mode_hicolmcchar::i#1!=rangelast(0,$f)) goto mode_hicolmcchar::@1 -Simple Condition (bool~) mode_hicolmcchar::$6 [1054] if((byte) mode_hicolmcchar::cx#1!=rangelast(0,$27)) goto mode_hicolmcchar::@4 -Simple Condition (bool~) mode_hicolmcchar::$7 [1058] if((byte) mode_hicolmcchar::cy#1!=rangelast(0,$18)) goto mode_hicolmcchar::@3 -Simple Condition (bool~) mode_twoplanebitmap::$1 [1089] if((byte) mode_twoplanebitmap::i#1!=rangelast(0,$f)) goto mode_twoplanebitmap::@1 -Simple Condition (bool~) mode_twoplanebitmap::$6 [1107] if((byte) mode_twoplanebitmap::cx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@4 -Simple Condition (bool~) mode_twoplanebitmap::$7 [1111] if((byte) mode_twoplanebitmap::cy#1!=rangelast(0,$18)) goto mode_twoplanebitmap::@3 -Simple Condition (bool~) mode_twoplanebitmap::$9 [1120] if((byte~) mode_twoplanebitmap::$8==(byte) 0) goto mode_twoplanebitmap::@9 -Simple Condition (bool~) mode_twoplanebitmap::$10 [1130] if((byte) mode_twoplanebitmap::ax#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@8 -Simple Condition (bool~) mode_twoplanebitmap::$11 [1134] if((byte) mode_twoplanebitmap::ay#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@7 -Simple Condition (bool~) mode_twoplanebitmap::$12 [1145] if((byte) mode_twoplanebitmap::bx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@16 -Simple Condition (bool~) mode_twoplanebitmap::$13 [1149] if((byte) mode_twoplanebitmap::by#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@15 -Simple Condition (bool~) mode_sixsfred::$1 [1180] if((byte) mode_sixsfred::i#1!=rangelast(0,$f)) goto mode_sixsfred::@1 -Simple Condition (bool~) mode_sixsfred::$4 [1194] if((byte) mode_sixsfred::cx#1!=rangelast(0,$27)) goto mode_sixsfred::@4 -Simple Condition (bool~) mode_sixsfred::$5 [1198] if((byte) mode_sixsfred::cy#1!=rangelast(0,$18)) goto mode_sixsfred::@3 -Simple Condition (bool~) mode_sixsfred::$8 [1212] if((byte) mode_sixsfred::ax#1!=rangelast(0,$27)) goto mode_sixsfred::@8 -Simple Condition (bool~) mode_sixsfred::$9 [1216] if((byte) mode_sixsfred::ay#1!=rangelast(0,$c7)) goto mode_sixsfred::@7 -Simple Condition (bool~) mode_sixsfred::$10 [1227] if((byte) mode_sixsfred::bx#1!=rangelast(0,$27)) goto mode_sixsfred::@12 -Simple Condition (bool~) mode_sixsfred::$11 [1231] if((byte) mode_sixsfred::by#1!=rangelast(0,$c7)) goto mode_sixsfred::@11 -Simple Condition (bool~) mode_sixsfred2::$1 [1262] if((byte) mode_sixsfred2::i#1!=rangelast(0,$f)) goto mode_sixsfred2::@1 -Simple Condition (bool~) mode_sixsfred2::$6 [1278] if((byte) mode_sixsfred2::cx#1!=rangelast(0,$27)) goto mode_sixsfred2::@4 -Simple Condition (bool~) mode_sixsfred2::$7 [1282] if((byte) mode_sixsfred2::cy#1!=rangelast(0,$18)) goto mode_sixsfred2::@3 -Simple Condition (bool~) mode_sixsfred2::$10 [1296] if((byte) mode_sixsfred2::ax#1!=rangelast(0,$27)) goto mode_sixsfred2::@8 -Simple Condition (bool~) mode_sixsfred2::$11 [1300] if((byte) mode_sixsfred2::ay#1!=rangelast(0,$c7)) goto mode_sixsfred2::@7 -Simple Condition (bool~) mode_sixsfred2::$12 [1311] if((byte) mode_sixsfred2::bx#1!=rangelast(0,$27)) goto mode_sixsfred2::@12 -Simple Condition (bool~) mode_sixsfred2::$13 [1315] if((byte) mode_sixsfred2::by#1!=rangelast(0,$c7)) goto mode_sixsfred2::@11 -Simple Condition (bool~) mode_8bpppixelcell::$1 [1345] if((byte) mode_8bpppixelcell::i#1!=rangelast(0,$f)) goto mode_8bpppixelcell::@1 -Simple Condition (bool~) mode_8bpppixelcell::$6 [1360] if((byte) mode_8bpppixelcell::ax#1!=rangelast(0,$27)) goto mode_8bpppixelcell::@4 -Simple Condition (bool~) mode_8bpppixelcell::$7 [1364] if((byte) mode_8bpppixelcell::ay#1!=rangelast(0,$18)) goto mode_8bpppixelcell::@3 -Simple Condition (bool~) mode_8bpppixelcell::$10 [1382] if((byte~) mode_8bpppixelcell::$8==(byte) 0) goto mode_8bpppixelcell::@10 -Simple Condition (bool~) mode_8bpppixelcell::$12 [1391] if((byte) mode_8bpppixelcell::cp#1!=rangelast(0,7)) goto mode_8bpppixelcell::@9 -Simple Condition (bool~) mode_8bpppixelcell::$13 [1397] if((byte) mode_8bpppixelcell::cr#1!=rangelast(0,7)) goto mode_8bpppixelcell::@8 -Simple Condition (bool~) mode_8bpppixelcell::$14 [1401] if((byte) mode_8bpppixelcell::ch#1!=rangelast(0,$ff)) goto mode_8bpppixelcell::@7 -Simple Condition (bool~) mode_8bppchunkybmm::$3 [1426] if((byte) mode_8bppchunkybmm::i#1!=rangelast(0,$f)) goto mode_8bppchunkybmm::@1 -Simple Condition (bool~) mode_8bppchunkybmm::$5 [1440] if((byte*) mode_8bppchunkybmm::gfxb#3!=(word) $8000) goto mode_8bppchunkybmm::@5 -Simple Condition (bool~) mode_8bppchunkybmm::$9 [1449] if((word) mode_8bppchunkybmm::x#1!=rangelast(0,$13f)) goto mode_8bppchunkybmm::@4 -Simple Condition (bool~) mode_8bppchunkybmm::$10 [1459] if((byte) mode_8bppchunkybmm::y#1!=rangelast(0,$c7)) goto mode_8bppchunkybmm::@3 +Simple Condition (bool~) memset::$1 [6] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str_lines::$2 [21] if((byte) 0!=*((byte*) print_str_lines::str#2)) goto print_str_lines::@4 +Simple Condition (bool~) print_str_lines::$0 [26] if((byte) 0==(byte) print_str_lines::ch#0) goto print_str_lines::@5 +Simple Condition (bool~) print_str_lines::$3 [29] if((byte) 0!=(byte) print_str_lines::ch#0) goto print_str_lines::@4 +Simple Condition (bool~) print_ln::$1 [39] if((byte*) print_line_cursor#19<(byte*) print_char_cursor#32) goto print_ln::@1 +Simple Condition (bool~) bitmap_init::$4 [75] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [79] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [92] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$14 [96] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_clear::$1 [109] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [112] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [126] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [129] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 +Simple Condition (bool~) bitmap_line::$2 [132] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line::$8 [135] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 +Simple Condition (bool~) bitmap_line::$4 [138] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 +Simple Condition (bool~) bitmap_line::$18 [165] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 +Simple Condition (bool~) bitmap_line::$14 [168] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 +Simple Condition (bool~) bitmap_line_xdyi::$4 [203] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [207] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [220] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [224] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [237] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [241] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [254] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [258] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) menu::$3 [287] if((byte) menu::i#1!=rangelast(0,$f)) goto menu::@1 +Simple Condition (bool~) menu::$4 [291] if((byte*) menu::c#2!=(const byte*) COLS+(word) $3e8) goto menu::@4 +Simple Condition (bool~) menu::$7 [311] if((byte~) menu::$5==(byte) 0) goto menu::@12 +Simple Condition (bool~) menu::$11 [317] if((byte~) menu::$9==(byte) 0) goto menu::@13 +Simple Condition (bool~) menu::$15 [327] if((byte~) menu::$13==(byte) 0) goto menu::@14 +Simple Condition (bool~) menu::$19 [335] if((byte~) menu::$17==(byte) 0) goto menu::@15 +Simple Condition (bool~) menu::$23 [343] if((byte~) menu::$21==(byte) 0) goto menu::@16 +Simple Condition (bool~) menu::$27 [351] if((byte~) menu::$25==(byte) 0) goto menu::@17 +Simple Condition (bool~) menu::$31 [359] if((byte~) menu::$29==(byte) 0) goto menu::@18 +Simple Condition (bool~) menu::$35 [367] if((byte~) menu::$33==(byte) 0) goto menu::@19 +Simple Condition (bool~) menu::$39 [375] if((byte~) menu::$37==(byte) 0) goto menu::@20 +Simple Condition (bool~) menu::$43 [383] if((byte~) menu::$41==(byte) 0) goto menu::@21 +Simple Condition (bool~) menu::$47 [391] if((byte~) menu::$45==(byte) 0) goto menu::@22 +Simple Condition (bool~) menu::$51 [399] if((byte~) menu::$49==(byte) 0) goto menu::@9 +Simple Condition (bool~) mode_ctrl::$0 [410] if(*((const byte*) RASTER)!=(byte) $ff) goto mode_ctrl::@4 +Simple Condition (bool~) mode_ctrl::$3 [416] if((byte~) mode_ctrl::$1==(byte) 0) goto mode_ctrl::@12 +Simple Condition (bool~) mode_ctrl::$6 [423] if((byte~) mode_ctrl::$4==(byte) 0) goto mode_ctrl::@13 +Simple Condition (bool~) mode_ctrl::$10 [432] if((byte~) mode_ctrl::$8==(byte) 0) goto mode_ctrl::@14 +Simple Condition (bool~) mode_ctrl::$14 [440] if((byte~) mode_ctrl::$12==(byte) 0) goto mode_ctrl::@15 +Simple Condition (bool~) mode_ctrl::$18 [448] if((byte~) mode_ctrl::$16==(byte) 0) goto mode_ctrl::@16 +Simple Condition (bool~) mode_ctrl::$22 [456] if((byte~) mode_ctrl::$20==(byte) 0) goto mode_ctrl::@17 +Simple Condition (bool~) mode_ctrl::$26 [464] if((byte~) mode_ctrl::$24==(byte) 0) goto mode_ctrl::@18 +Simple Condition (bool~) mode_ctrl::$30 [472] if((byte~) mode_ctrl::$28==(byte) 0) goto mode_ctrl::@19 +Simple Condition (bool~) mode_ctrl::$32 [476] if((byte) mode_ctrl::ctrl#14==(byte) dtv_control#114) goto mode_ctrl::@1 +Simple Condition (bool~) mode_stdchar::$1 [496] if((byte) mode_stdchar::i#1!=rangelast(0,$f)) goto mode_stdchar::@1 +Simple Condition (bool~) mode_stdchar::$8 [517] if((byte) mode_stdchar::cx#1!=rangelast(0,$27)) goto mode_stdchar::@4 +Simple Condition (bool~) mode_stdchar::$9 [520] if((byte) mode_stdchar::cy#1!=rangelast(0,$18)) goto mode_stdchar::@3 +Simple Condition (bool~) mode_ecmchar::$1 [539] if((byte) mode_ecmchar::i#1!=rangelast(0,$f)) goto mode_ecmchar::@1 +Simple Condition (bool~) mode_ecmchar::$8 [563] if((byte) mode_ecmchar::cx#1!=rangelast(0,$27)) goto mode_ecmchar::@4 +Simple Condition (bool~) mode_ecmchar::$9 [566] if((byte) mode_ecmchar::cy#1!=rangelast(0,$18)) goto mode_ecmchar::@3 +Simple Condition (bool~) mode_mcchar::$1 [585] if((byte) mode_mcchar::i#1!=rangelast(0,$f)) goto mode_mcchar::@1 +Simple Condition (bool~) mode_mcchar::$8 [608] if((byte) mode_mcchar::cx#1!=rangelast(0,$27)) goto mode_mcchar::@4 +Simple Condition (bool~) mode_mcchar::$9 [611] if((byte) mode_mcchar::cy#1!=rangelast(0,$18)) goto mode_mcchar::@3 +Simple Condition (bool~) mode_stdbitmap::$3 [628] if((byte) mode_stdbitmap::i#1!=rangelast(0,$f)) goto mode_stdbitmap::@1 +Simple Condition (bool~) mode_stdbitmap::$9 [645] if((byte) mode_stdbitmap::cx#1!=rangelast(0,$27)) goto mode_stdbitmap::@4 +Simple Condition (bool~) mode_stdbitmap::$10 [648] if((byte) mode_stdbitmap::cy#1!=rangelast(0,$18)) goto mode_stdbitmap::@3 +Simple Condition (bool~) mode_stdbitmap::$11 [655] if((byte) mode_stdbitmap::l#2<(const byte) mode_stdbitmap::lines_cnt) goto mode_stdbitmap::@8 +Simple Condition (bool~) mode_hicolstdchar::$1 [682] if((byte) mode_hicolstdchar::i#1!=rangelast(0,$f)) goto mode_hicolstdchar::@1 +Simple Condition (bool~) mode_hicolstdchar::$6 [701] if((byte) mode_hicolstdchar::cx#1!=rangelast(0,$27)) goto mode_hicolstdchar::@4 +Simple Condition (bool~) mode_hicolstdchar::$7 [704] if((byte) mode_hicolstdchar::cy#1!=rangelast(0,$18)) goto mode_hicolstdchar::@3 +Simple Condition (bool~) mode_hicolecmchar::$1 [723] if((byte) mode_hicolecmchar::i#1!=rangelast(0,$f)) goto mode_hicolecmchar::@1 +Simple Condition (bool~) mode_hicolecmchar::$6 [745] if((byte) mode_hicolecmchar::cx#1!=rangelast(0,$27)) goto mode_hicolecmchar::@4 +Simple Condition (bool~) mode_hicolecmchar::$7 [748] if((byte) mode_hicolecmchar::cy#1!=rangelast(0,$18)) goto mode_hicolecmchar::@3 +Simple Condition (bool~) mode_hicolmcchar::$1 [767] if((byte) mode_hicolmcchar::i#1!=rangelast(0,$f)) goto mode_hicolmcchar::@1 +Simple Condition (bool~) mode_hicolmcchar::$6 [788] if((byte) mode_hicolmcchar::cx#1!=rangelast(0,$27)) goto mode_hicolmcchar::@4 +Simple Condition (bool~) mode_hicolmcchar::$7 [791] if((byte) mode_hicolmcchar::cy#1!=rangelast(0,$18)) goto mode_hicolmcchar::@3 +Simple Condition (bool~) mode_twoplanebitmap::$1 [818] if((byte) mode_twoplanebitmap::i#1!=rangelast(0,$f)) goto mode_twoplanebitmap::@1 +Simple Condition (bool~) mode_twoplanebitmap::$6 [835] if((byte) mode_twoplanebitmap::cx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@4 +Simple Condition (bool~) mode_twoplanebitmap::$7 [838] if((byte) mode_twoplanebitmap::cy#1!=rangelast(0,$18)) goto mode_twoplanebitmap::@3 +Simple Condition (bool~) mode_twoplanebitmap::$9 [846] if((byte~) mode_twoplanebitmap::$8==(byte) 0) goto mode_twoplanebitmap::@9 +Simple Condition (bool~) mode_twoplanebitmap::$10 [854] if((byte) mode_twoplanebitmap::ax#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@8 +Simple Condition (bool~) mode_twoplanebitmap::$11 [857] if((byte) mode_twoplanebitmap::ay#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@7 +Simple Condition (bool~) mode_twoplanebitmap::$12 [867] if((byte) mode_twoplanebitmap::bx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@16 +Simple Condition (bool~) mode_twoplanebitmap::$13 [870] if((byte) mode_twoplanebitmap::by#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@15 +Simple Condition (bool~) mode_sixsfred::$1 [897] if((byte) mode_sixsfred::i#1!=rangelast(0,$f)) goto mode_sixsfred::@1 +Simple Condition (bool~) mode_sixsfred::$4 [910] if((byte) mode_sixsfred::cx#1!=rangelast(0,$27)) goto mode_sixsfred::@4 +Simple Condition (bool~) mode_sixsfred::$5 [913] if((byte) mode_sixsfred::cy#1!=rangelast(0,$18)) goto mode_sixsfred::@3 +Simple Condition (bool~) mode_sixsfred::$8 [925] if((byte) mode_sixsfred::ax#1!=rangelast(0,$27)) goto mode_sixsfred::@8 +Simple Condition (bool~) mode_sixsfred::$9 [928] if((byte) mode_sixsfred::ay#1!=rangelast(0,$c7)) goto mode_sixsfred::@7 +Simple Condition (bool~) mode_sixsfred::$10 [938] if((byte) mode_sixsfred::bx#1!=rangelast(0,$27)) goto mode_sixsfred::@12 +Simple Condition (bool~) mode_sixsfred::$11 [941] if((byte) mode_sixsfred::by#1!=rangelast(0,$c7)) goto mode_sixsfred::@11 +Simple Condition (bool~) mode_sixsfred2::$1 [968] if((byte) mode_sixsfred2::i#1!=rangelast(0,$f)) goto mode_sixsfred2::@1 +Simple Condition (bool~) mode_sixsfred2::$6 [983] if((byte) mode_sixsfred2::cx#1!=rangelast(0,$27)) goto mode_sixsfred2::@4 +Simple Condition (bool~) mode_sixsfred2::$7 [986] if((byte) mode_sixsfred2::cy#1!=rangelast(0,$18)) goto mode_sixsfred2::@3 +Simple Condition (bool~) mode_sixsfred2::$10 [998] if((byte) mode_sixsfred2::ax#1!=rangelast(0,$27)) goto mode_sixsfred2::@8 +Simple Condition (bool~) mode_sixsfred2::$11 [1001] if((byte) mode_sixsfred2::ay#1!=rangelast(0,$c7)) goto mode_sixsfred2::@7 +Simple Condition (bool~) mode_sixsfred2::$12 [1011] if((byte) mode_sixsfred2::bx#1!=rangelast(0,$27)) goto mode_sixsfred2::@12 +Simple Condition (bool~) mode_sixsfred2::$13 [1014] if((byte) mode_sixsfred2::by#1!=rangelast(0,$c7)) goto mode_sixsfred2::@11 +Simple Condition (bool~) mode_8bpppixelcell::$1 [1040] if((byte) mode_8bpppixelcell::i#1!=rangelast(0,$f)) goto mode_8bpppixelcell::@1 +Simple Condition (bool~) mode_8bpppixelcell::$6 [1054] if((byte) mode_8bpppixelcell::ax#1!=rangelast(0,$27)) goto mode_8bpppixelcell::@4 +Simple Condition (bool~) mode_8bpppixelcell::$7 [1057] if((byte) mode_8bpppixelcell::ay#1!=rangelast(0,$18)) goto mode_8bpppixelcell::@3 +Simple Condition (bool~) mode_8bpppixelcell::$10 [1073] if((byte~) mode_8bpppixelcell::$8==(byte) 0) goto mode_8bpppixelcell::@10 +Simple Condition (bool~) mode_8bpppixelcell::$12 [1081] if((byte) mode_8bpppixelcell::cp#1!=rangelast(0,7)) goto mode_8bpppixelcell::@9 +Simple Condition (bool~) mode_8bpppixelcell::$13 [1084] if((byte) mode_8bpppixelcell::cr#1!=rangelast(0,7)) goto mode_8bpppixelcell::@8 +Simple Condition (bool~) mode_8bpppixelcell::$14 [1087] if((byte) mode_8bpppixelcell::ch#1!=rangelast(0,$ff)) goto mode_8bpppixelcell::@7 +Simple Condition (bool~) mode_8bppchunkybmm::$3 [1108] if((byte) mode_8bppchunkybmm::i#1!=rangelast(0,$f)) goto mode_8bppchunkybmm::@1 +Simple Condition (bool~) mode_8bppchunkybmm::$5 [1119] if((byte*) mode_8bppchunkybmm::gfxb#3!=(word) $8000) goto mode_8bppchunkybmm::@5 +Simple Condition (bool~) mode_8bppchunkybmm::$9 [1127] if((word) mode_8bppchunkybmm::x#1!=rangelast(0,$13f)) goto mode_8bppchunkybmm::@4 +Simple Condition (bool~) mode_8bppchunkybmm::$10 [1134] if((byte) mode_8bppchunkybmm::y#1!=rangelast(0,$c7)) goto mode_8bppchunkybmm::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_screen#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -7365,171 +7365,171 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [7] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [368] if(true) goto main::@2 +if() condition always false - eliminating [6] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [268] if(true) goto main::@2 Removing PHI-reference to removed block (menu::@9) in block menu::@return -if() condition always true - replacing block destination [425] if(true) goto menu::@10 -if() condition always true - replacing block destination [592] if(true) goto mode_ctrl::@4 +if() condition always true - replacing block destination [305] if(true) goto menu::@10 +if() condition always true - replacing block destination [407] if(true) goto mode_ctrl::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [124] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [126] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [143] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [145] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [159] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ -Resolved ranged comparison value [161] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 -Resolved ranged next value [163] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ -Resolved ranged comparison value [165] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 -Resolved ranged next value [395] menu::i#1 ← ++ menu::i#2 to ++ -Resolved ranged comparison value [397] if(menu::i#1!=rangelast(0,$f)) goto menu::@1 to (number) $10 -Resolved ranged next value [713] mode_stdchar::i#1 ← ++ mode_stdchar::i#2 to ++ -Resolved ranged comparison value [715] if(mode_stdchar::i#1!=rangelast(0,$f)) goto mode_stdchar::@1 to (number) $10 -Resolved ranged next value [735] mode_stdchar::cx#1 ← ++ mode_stdchar::cx#2 to ++ -Resolved ranged comparison value [737] if(mode_stdchar::cx#1!=rangelast(0,$27)) goto mode_stdchar::@4 to (number) $28 -Resolved ranged next value [739] mode_stdchar::cy#1 ← ++ mode_stdchar::cy#4 to ++ -Resolved ranged comparison value [741] if(mode_stdchar::cy#1!=rangelast(0,$18)) goto mode_stdchar::@3 to (number) $19 -Resolved ranged next value [762] mode_ecmchar::i#1 ← ++ mode_ecmchar::i#2 to ++ -Resolved ranged comparison value [764] if(mode_ecmchar::i#1!=rangelast(0,$f)) goto mode_ecmchar::@1 to (number) $10 -Resolved ranged next value [787] mode_ecmchar::cx#1 ← ++ mode_ecmchar::cx#2 to ++ -Resolved ranged comparison value [789] if(mode_ecmchar::cx#1!=rangelast(0,$27)) goto mode_ecmchar::@4 to (number) $28 -Resolved ranged next value [791] mode_ecmchar::cy#1 ← ++ mode_ecmchar::cy#4 to ++ -Resolved ranged comparison value [793] if(mode_ecmchar::cy#1!=rangelast(0,$18)) goto mode_ecmchar::@3 to (number) $19 -Resolved ranged next value [814] mode_mcchar::i#1 ← ++ mode_mcchar::i#2 to ++ -Resolved ranged comparison value [816] if(mode_mcchar::i#1!=rangelast(0,$f)) goto mode_mcchar::@1 to (number) $10 -Resolved ranged next value [838] mode_mcchar::cx#1 ← ++ mode_mcchar::cx#2 to ++ -Resolved ranged comparison value [840] if(mode_mcchar::cx#1!=rangelast(0,$27)) goto mode_mcchar::@4 to (number) $28 -Resolved ranged next value [842] mode_mcchar::cy#1 ← ++ mode_mcchar::cy#4 to ++ -Resolved ranged comparison value [844] if(mode_mcchar::cy#1!=rangelast(0,$18)) goto mode_mcchar::@3 to (number) $19 -Resolved ranged next value [863] mode_stdbitmap::i#1 ← ++ mode_stdbitmap::i#2 to ++ -Resolved ranged comparison value [865] if(mode_stdbitmap::i#1!=rangelast(0,$f)) goto mode_stdbitmap::@1 to (number) $10 -Resolved ranged next value [883] mode_stdbitmap::cx#1 ← ++ mode_stdbitmap::cx#2 to ++ -Resolved ranged comparison value [885] if(mode_stdbitmap::cx#1!=rangelast(0,$27)) goto mode_stdbitmap::@4 to (number) $28 -Resolved ranged next value [887] mode_stdbitmap::cy#1 ← ++ mode_stdbitmap::cy#4 to ++ -Resolved ranged comparison value [889] if(mode_stdbitmap::cy#1!=rangelast(0,$18)) goto mode_stdbitmap::@3 to (number) $19 -Resolved ranged next value [930] mode_hicolstdchar::i#1 ← ++ mode_hicolstdchar::i#2 to ++ -Resolved ranged comparison value [932] if(mode_hicolstdchar::i#1!=rangelast(0,$f)) goto mode_hicolstdchar::@1 to (number) $10 -Resolved ranged next value [951] mode_hicolstdchar::cx#1 ← ++ mode_hicolstdchar::cx#2 to ++ -Resolved ranged comparison value [953] if(mode_hicolstdchar::cx#1!=rangelast(0,$27)) goto mode_hicolstdchar::@4 to (number) $28 -Resolved ranged next value [955] mode_hicolstdchar::cy#1 ← ++ mode_hicolstdchar::cy#4 to ++ -Resolved ranged comparison value [957] if(mode_hicolstdchar::cy#1!=rangelast(0,$18)) goto mode_hicolstdchar::@3 to (number) $19 -Resolved ranged next value [978] mode_hicolecmchar::i#1 ← ++ mode_hicolecmchar::i#2 to ++ -Resolved ranged comparison value [980] if(mode_hicolecmchar::i#1!=rangelast(0,$f)) goto mode_hicolecmchar::@1 to (number) $10 -Resolved ranged next value [1002] mode_hicolecmchar::cx#1 ← ++ mode_hicolecmchar::cx#2 to ++ -Resolved ranged comparison value [1004] if(mode_hicolecmchar::cx#1!=rangelast(0,$27)) goto mode_hicolecmchar::@4 to (number) $28 -Resolved ranged next value [1006] mode_hicolecmchar::cy#1 ← ++ mode_hicolecmchar::cy#4 to ++ -Resolved ranged comparison value [1008] if(mode_hicolecmchar::cy#1!=rangelast(0,$18)) goto mode_hicolecmchar::@3 to (number) $19 -Resolved ranged next value [1029] mode_hicolmcchar::i#1 ← ++ mode_hicolmcchar::i#2 to ++ -Resolved ranged comparison value [1031] if(mode_hicolmcchar::i#1!=rangelast(0,$f)) goto mode_hicolmcchar::@1 to (number) $10 -Resolved ranged next value [1052] mode_hicolmcchar::cx#1 ← ++ mode_hicolmcchar::cx#2 to ++ -Resolved ranged comparison value [1054] if(mode_hicolmcchar::cx#1!=rangelast(0,$27)) goto mode_hicolmcchar::@4 to (number) $28 -Resolved ranged next value [1056] mode_hicolmcchar::cy#1 ← ++ mode_hicolmcchar::cy#4 to ++ -Resolved ranged comparison value [1058] if(mode_hicolmcchar::cy#1!=rangelast(0,$18)) goto mode_hicolmcchar::@3 to (number) $19 -Resolved ranged next value [1087] mode_twoplanebitmap::i#1 ← ++ mode_twoplanebitmap::i#2 to ++ -Resolved ranged comparison value [1089] if(mode_twoplanebitmap::i#1!=rangelast(0,$f)) goto mode_twoplanebitmap::@1 to (number) $10 -Resolved ranged next value [1105] mode_twoplanebitmap::cx#1 ← ++ mode_twoplanebitmap::cx#2 to ++ -Resolved ranged comparison value [1107] if(mode_twoplanebitmap::cx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@4 to (number) $28 -Resolved ranged next value [1109] mode_twoplanebitmap::cy#1 ← ++ mode_twoplanebitmap::cy#4 to ++ -Resolved ranged comparison value [1111] if(mode_twoplanebitmap::cy#1!=rangelast(0,$18)) goto mode_twoplanebitmap::@3 to (number) $19 -Resolved ranged next value [1128] mode_twoplanebitmap::ax#1 ← ++ mode_twoplanebitmap::ax#2 to ++ -Resolved ranged comparison value [1130] if(mode_twoplanebitmap::ax#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@8 to (number) $28 -Resolved ranged next value [1132] mode_twoplanebitmap::ay#1 ← ++ mode_twoplanebitmap::ay#5 to ++ -Resolved ranged comparison value [1134] if(mode_twoplanebitmap::ay#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@7 to (number) $c8 -Resolved ranged next value [1143] mode_twoplanebitmap::bx#1 ← ++ mode_twoplanebitmap::bx#2 to ++ -Resolved ranged comparison value [1145] if(mode_twoplanebitmap::bx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@16 to (number) $28 -Resolved ranged next value [1147] mode_twoplanebitmap::by#1 ← ++ mode_twoplanebitmap::by#4 to ++ -Resolved ranged comparison value [1149] if(mode_twoplanebitmap::by#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@15 to (number) $c8 -Resolved ranged next value [1178] mode_sixsfred::i#1 ← ++ mode_sixsfred::i#2 to ++ -Resolved ranged comparison value [1180] if(mode_sixsfred::i#1!=rangelast(0,$f)) goto mode_sixsfred::@1 to (number) $10 -Resolved ranged next value [1192] mode_sixsfred::cx#1 ← ++ mode_sixsfred::cx#2 to ++ -Resolved ranged comparison value [1194] if(mode_sixsfred::cx#1!=rangelast(0,$27)) goto mode_sixsfred::@4 to (number) $28 -Resolved ranged next value [1196] mode_sixsfred::cy#1 ← ++ mode_sixsfred::cy#4 to ++ -Resolved ranged comparison value [1198] if(mode_sixsfred::cy#1!=rangelast(0,$18)) goto mode_sixsfred::@3 to (number) $19 -Resolved ranged next value [1210] mode_sixsfred::ax#1 ← ++ mode_sixsfred::ax#2 to ++ -Resolved ranged comparison value [1212] if(mode_sixsfred::ax#1!=rangelast(0,$27)) goto mode_sixsfred::@8 to (number) $28 -Resolved ranged next value [1214] mode_sixsfred::ay#1 ← ++ mode_sixsfred::ay#4 to ++ -Resolved ranged comparison value [1216] if(mode_sixsfred::ay#1!=rangelast(0,$c7)) goto mode_sixsfred::@7 to (number) $c8 -Resolved ranged next value [1225] mode_sixsfred::bx#1 ← ++ mode_sixsfred::bx#2 to ++ -Resolved ranged comparison value [1227] if(mode_sixsfred::bx#1!=rangelast(0,$27)) goto mode_sixsfred::@12 to (number) $28 -Resolved ranged next value [1229] mode_sixsfred::by#1 ← ++ mode_sixsfred::by#4 to ++ -Resolved ranged comparison value [1231] if(mode_sixsfred::by#1!=rangelast(0,$c7)) goto mode_sixsfred::@11 to (number) $c8 -Resolved ranged next value [1260] mode_sixsfred2::i#1 ← ++ mode_sixsfred2::i#2 to ++ -Resolved ranged comparison value [1262] if(mode_sixsfred2::i#1!=rangelast(0,$f)) goto mode_sixsfred2::@1 to (number) $10 -Resolved ranged next value [1276] mode_sixsfred2::cx#1 ← ++ mode_sixsfred2::cx#2 to ++ -Resolved ranged comparison value [1278] if(mode_sixsfred2::cx#1!=rangelast(0,$27)) goto mode_sixsfred2::@4 to (number) $28 -Resolved ranged next value [1280] mode_sixsfred2::cy#1 ← ++ mode_sixsfred2::cy#4 to ++ -Resolved ranged comparison value [1282] if(mode_sixsfred2::cy#1!=rangelast(0,$18)) goto mode_sixsfred2::@3 to (number) $19 -Resolved ranged next value [1294] mode_sixsfred2::ax#1 ← ++ mode_sixsfred2::ax#2 to ++ -Resolved ranged comparison value [1296] if(mode_sixsfred2::ax#1!=rangelast(0,$27)) goto mode_sixsfred2::@8 to (number) $28 -Resolved ranged next value [1298] mode_sixsfred2::ay#1 ← ++ mode_sixsfred2::ay#4 to ++ -Resolved ranged comparison value [1300] if(mode_sixsfred2::ay#1!=rangelast(0,$c7)) goto mode_sixsfred2::@7 to (number) $c8 -Resolved ranged next value [1309] mode_sixsfred2::bx#1 ← ++ mode_sixsfred2::bx#2 to ++ -Resolved ranged comparison value [1311] if(mode_sixsfred2::bx#1!=rangelast(0,$27)) goto mode_sixsfred2::@12 to (number) $28 -Resolved ranged next value [1313] mode_sixsfred2::by#1 ← ++ mode_sixsfred2::by#4 to ++ -Resolved ranged comparison value [1315] if(mode_sixsfred2::by#1!=rangelast(0,$c7)) goto mode_sixsfred2::@11 to (number) $c8 -Resolved ranged next value [1343] mode_8bpppixelcell::i#1 ← ++ mode_8bpppixelcell::i#2 to ++ -Resolved ranged comparison value [1345] if(mode_8bpppixelcell::i#1!=rangelast(0,$f)) goto mode_8bpppixelcell::@1 to (number) $10 -Resolved ranged next value [1358] mode_8bpppixelcell::ax#1 ← ++ mode_8bpppixelcell::ax#2 to ++ -Resolved ranged comparison value [1360] if(mode_8bpppixelcell::ax#1!=rangelast(0,$27)) goto mode_8bpppixelcell::@4 to (number) $28 -Resolved ranged next value [1362] mode_8bpppixelcell::ay#1 ← ++ mode_8bpppixelcell::ay#4 to ++ -Resolved ranged comparison value [1364] if(mode_8bpppixelcell::ay#1!=rangelast(0,$18)) goto mode_8bpppixelcell::@3 to (number) $19 -Resolved ranged next value [1389] mode_8bpppixelcell::cp#1 ← ++ mode_8bpppixelcell::cp#2 to ++ -Resolved ranged comparison value [1391] if(mode_8bpppixelcell::cp#1!=rangelast(0,7)) goto mode_8bpppixelcell::@9 to (number) 8 -Resolved ranged next value [1395] mode_8bpppixelcell::cr#1 ← ++ mode_8bpppixelcell::cr#6 to ++ -Resolved ranged comparison value [1397] if(mode_8bpppixelcell::cr#1!=rangelast(0,7)) goto mode_8bpppixelcell::@8 to (number) 8 -Resolved ranged next value [1399] mode_8bpppixelcell::ch#1 ← ++ mode_8bpppixelcell::ch#8 to ++ -Resolved ranged comparison value [1401] if(mode_8bpppixelcell::ch#1!=rangelast(0,$ff)) goto mode_8bpppixelcell::@7 to (number) 0 -Resolved ranged next value [1424] mode_8bppchunkybmm::i#1 ← ++ mode_8bppchunkybmm::i#2 to ++ -Resolved ranged comparison value [1426] if(mode_8bppchunkybmm::i#1!=rangelast(0,$f)) goto mode_8bppchunkybmm::@1 to (number) $10 -Resolved ranged next value [1447] mode_8bppchunkybmm::x#1 ← ++ mode_8bppchunkybmm::x#2 to ++ -Resolved ranged comparison value [1449] if(mode_8bppchunkybmm::x#1!=rangelast(0,$13f)) goto mode_8bppchunkybmm::@4 to (number) $140 -Resolved ranged next value [1457] mode_8bppchunkybmm::y#1 ← ++ mode_8bppchunkybmm::y#6 to ++ -Resolved ranged comparison value [1459] if(mode_8bppchunkybmm::y#1!=rangelast(0,$c7)) goto mode_8bppchunkybmm::@3 to (number) $c8 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) menu::CHARSET/(dword) $10000 in [383] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) menu::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [385] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) menu::SCREEN&(word) $3fff/(byte) $40 in [391] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) menu::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) menu::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_stdchar::CHARSET/(dword) $10000 in [700] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_stdchar::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [702] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) mode_stdchar::SCREEN&(word) $3fff/(byte) $40 in [709] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_stdchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_stdchar::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_ecmchar::CHARSET/(dword) $10000 in [749] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_ecmchar::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [751] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) mode_ecmchar::SCREEN&(word) $3fff/(byte) $40 in [758] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_ecmchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_ecmchar::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_mcchar::CHARSET/(dword) $10000 in [801] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_mcchar::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [803] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) mode_mcchar::SCREEN&(word) $3fff/(byte) $40 in [810] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_mcchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_mcchar::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_stdbitmap::BITMAP/(dword) $10000 in [852] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_stdbitmap::BITMAP/(dword) $10000 -Simplifying constant evaluating to zero (word)(const byte*) mode_stdbitmap::SCREEN&(word) $3fff/(byte) $40 in [859] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_stdbitmap::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_stdbitmap::BITMAP&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_hicolstdchar::CHARSET/(dword) $10000 in [917] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_hicolstdchar::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const byte*) mode_hicolstdchar::COLORS/(word) $400 in [919] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const byte*) mode_hicolstdchar::COLORS/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) mode_hicolstdchar::SCREEN&(word) $3fff/(byte) $40 in [926] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_hicolstdchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_hicolstdchar::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_hicolecmchar::CHARSET/(dword) $10000 in [965] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_hicolecmchar::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const byte*) mode_hicolecmchar::COLORS/(word) $400 in [967] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const byte*) mode_hicolecmchar::COLORS/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) mode_hicolecmchar::SCREEN&(word) $3fff/(byte) $40 in [974] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_hicolecmchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_hicolecmchar::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_hicolmcchar::CHARSET/(dword) $10000 in [1016] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_hicolmcchar::CHARSET/(dword) $10000 -Simplifying constant evaluating to zero >(word)(const byte*) mode_hicolmcchar::COLORS/(word) $400 in [1018] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const byte*) mode_hicolmcchar::COLORS/(word) $400 -Simplifying constant evaluating to zero (word)(const byte*) mode_hicolmcchar::SCREEN&(word) $3fff/(byte) $40 in [1025] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_hicolmcchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_hicolmcchar::CHARSET&(word) $3fff/(word) $400 -Simplifying constant evaluating to zero <(const byte*) mode_twoplanebitmap::PLANEA in [1070] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_twoplanebitmap::PLANEA -Simplifying constant evaluating to zero <(const byte*) mode_twoplanebitmap::PLANEB in [1076] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_twoplanebitmap::PLANEB -Simplifying constant evaluating to zero >(const byte*) mode_twoplanebitmap::COLORS/(word) $400 in [1083] *((const byte*) DTV_COLOR_BANK_HI) ← >(const byte*) mode_twoplanebitmap::COLORS/(word) $400 -Simplifying constant evaluating to zero <(const byte*) mode_sixsfred::PLANEA in [1161] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_sixsfred::PLANEA -Simplifying constant evaluating to zero <(const byte*) mode_sixsfred::PLANEB in [1167] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_sixsfred::PLANEB -Simplifying constant evaluating to zero >(const byte*) mode_sixsfred::COLORS/(word) $400 in [1174] *((const byte*) DTV_COLOR_BANK_HI) ← >(const byte*) mode_sixsfred::COLORS/(word) $400 -Simplifying constant evaluating to zero <(const byte*) mode_sixsfred2::PLANEA in [1243] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_sixsfred2::PLANEA -Simplifying constant evaluating to zero <(const byte*) mode_sixsfred2::PLANEB in [1249] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_sixsfred2::PLANEB -Simplifying constant evaluating to zero >(const byte*) mode_sixsfred2::COLORS/(word) $400 in [1256] *((const byte*) DTV_COLOR_BANK_HI) ← >(const byte*) mode_sixsfred2::COLORS/(word) $400 -Simplifying constant evaluating to zero <(const byte*) mode_8bpppixelcell::PLANEA in [1327] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_8bpppixelcell::PLANEA -Simplifying constant evaluating to zero <(const byte*) mode_8bpppixelcell::PLANEB in [1333] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_8bpppixelcell::PLANEB -Simplifying constant evaluating to zero <<(const dword) mode_8bppchunkybmm::PLANEB in [1414] *((const byte*) DTV_PLANEB_START_LO) ← <<(const dword) mode_8bppchunkybmm::PLANEB -Simplifying constant evaluating to zero ><(const dword) mode_8bppchunkybmm::PLANEB in [1415] *((const byte*) DTV_PLANEB_START_MI) ← ><(const dword) mode_8bppchunkybmm::PLANEB +Resolved ranged next value [77] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [79] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [94] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [96] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [107] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ +Resolved ranged comparison value [109] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 +Resolved ranged next value [110] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ +Resolved ranged comparison value [112] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 +Resolved ranged next value [285] menu::i#1 ← ++ menu::i#2 to ++ +Resolved ranged comparison value [287] if(menu::i#1!=rangelast(0,$f)) goto menu::@1 to (number) $10 +Resolved ranged next value [494] mode_stdchar::i#1 ← ++ mode_stdchar::i#2 to ++ +Resolved ranged comparison value [496] if(mode_stdchar::i#1!=rangelast(0,$f)) goto mode_stdchar::@1 to (number) $10 +Resolved ranged next value [515] mode_stdchar::cx#1 ← ++ mode_stdchar::cx#2 to ++ +Resolved ranged comparison value [517] if(mode_stdchar::cx#1!=rangelast(0,$27)) goto mode_stdchar::@4 to (number) $28 +Resolved ranged next value [518] mode_stdchar::cy#1 ← ++ mode_stdchar::cy#4 to ++ +Resolved ranged comparison value [520] if(mode_stdchar::cy#1!=rangelast(0,$18)) goto mode_stdchar::@3 to (number) $19 +Resolved ranged next value [537] mode_ecmchar::i#1 ← ++ mode_ecmchar::i#2 to ++ +Resolved ranged comparison value [539] if(mode_ecmchar::i#1!=rangelast(0,$f)) goto mode_ecmchar::@1 to (number) $10 +Resolved ranged next value [561] mode_ecmchar::cx#1 ← ++ mode_ecmchar::cx#2 to ++ +Resolved ranged comparison value [563] if(mode_ecmchar::cx#1!=rangelast(0,$27)) goto mode_ecmchar::@4 to (number) $28 +Resolved ranged next value [564] mode_ecmchar::cy#1 ← ++ mode_ecmchar::cy#4 to ++ +Resolved ranged comparison value [566] if(mode_ecmchar::cy#1!=rangelast(0,$18)) goto mode_ecmchar::@3 to (number) $19 +Resolved ranged next value [583] mode_mcchar::i#1 ← ++ mode_mcchar::i#2 to ++ +Resolved ranged comparison value [585] if(mode_mcchar::i#1!=rangelast(0,$f)) goto mode_mcchar::@1 to (number) $10 +Resolved ranged next value [606] mode_mcchar::cx#1 ← ++ mode_mcchar::cx#2 to ++ +Resolved ranged comparison value [608] if(mode_mcchar::cx#1!=rangelast(0,$27)) goto mode_mcchar::@4 to (number) $28 +Resolved ranged next value [609] mode_mcchar::cy#1 ← ++ mode_mcchar::cy#4 to ++ +Resolved ranged comparison value [611] if(mode_mcchar::cy#1!=rangelast(0,$18)) goto mode_mcchar::@3 to (number) $19 +Resolved ranged next value [626] mode_stdbitmap::i#1 ← ++ mode_stdbitmap::i#2 to ++ +Resolved ranged comparison value [628] if(mode_stdbitmap::i#1!=rangelast(0,$f)) goto mode_stdbitmap::@1 to (number) $10 +Resolved ranged next value [643] mode_stdbitmap::cx#1 ← ++ mode_stdbitmap::cx#2 to ++ +Resolved ranged comparison value [645] if(mode_stdbitmap::cx#1!=rangelast(0,$27)) goto mode_stdbitmap::@4 to (number) $28 +Resolved ranged next value [646] mode_stdbitmap::cy#1 ← ++ mode_stdbitmap::cy#4 to ++ +Resolved ranged comparison value [648] if(mode_stdbitmap::cy#1!=rangelast(0,$18)) goto mode_stdbitmap::@3 to (number) $19 +Resolved ranged next value [680] mode_hicolstdchar::i#1 ← ++ mode_hicolstdchar::i#2 to ++ +Resolved ranged comparison value [682] if(mode_hicolstdchar::i#1!=rangelast(0,$f)) goto mode_hicolstdchar::@1 to (number) $10 +Resolved ranged next value [699] mode_hicolstdchar::cx#1 ← ++ mode_hicolstdchar::cx#2 to ++ +Resolved ranged comparison value [701] if(mode_hicolstdchar::cx#1!=rangelast(0,$27)) goto mode_hicolstdchar::@4 to (number) $28 +Resolved ranged next value [702] mode_hicolstdchar::cy#1 ← ++ mode_hicolstdchar::cy#4 to ++ +Resolved ranged comparison value [704] if(mode_hicolstdchar::cy#1!=rangelast(0,$18)) goto mode_hicolstdchar::@3 to (number) $19 +Resolved ranged next value [721] mode_hicolecmchar::i#1 ← ++ mode_hicolecmchar::i#2 to ++ +Resolved ranged comparison value [723] if(mode_hicolecmchar::i#1!=rangelast(0,$f)) goto mode_hicolecmchar::@1 to (number) $10 +Resolved ranged next value [743] mode_hicolecmchar::cx#1 ← ++ mode_hicolecmchar::cx#2 to ++ +Resolved ranged comparison value [745] if(mode_hicolecmchar::cx#1!=rangelast(0,$27)) goto mode_hicolecmchar::@4 to (number) $28 +Resolved ranged next value [746] mode_hicolecmchar::cy#1 ← ++ mode_hicolecmchar::cy#4 to ++ +Resolved ranged comparison value [748] if(mode_hicolecmchar::cy#1!=rangelast(0,$18)) goto mode_hicolecmchar::@3 to (number) $19 +Resolved ranged next value [765] mode_hicolmcchar::i#1 ← ++ mode_hicolmcchar::i#2 to ++ +Resolved ranged comparison value [767] if(mode_hicolmcchar::i#1!=rangelast(0,$f)) goto mode_hicolmcchar::@1 to (number) $10 +Resolved ranged next value [786] mode_hicolmcchar::cx#1 ← ++ mode_hicolmcchar::cx#2 to ++ +Resolved ranged comparison value [788] if(mode_hicolmcchar::cx#1!=rangelast(0,$27)) goto mode_hicolmcchar::@4 to (number) $28 +Resolved ranged next value [789] mode_hicolmcchar::cy#1 ← ++ mode_hicolmcchar::cy#4 to ++ +Resolved ranged comparison value [791] if(mode_hicolmcchar::cy#1!=rangelast(0,$18)) goto mode_hicolmcchar::@3 to (number) $19 +Resolved ranged next value [816] mode_twoplanebitmap::i#1 ← ++ mode_twoplanebitmap::i#2 to ++ +Resolved ranged comparison value [818] if(mode_twoplanebitmap::i#1!=rangelast(0,$f)) goto mode_twoplanebitmap::@1 to (number) $10 +Resolved ranged next value [833] mode_twoplanebitmap::cx#1 ← ++ mode_twoplanebitmap::cx#2 to ++ +Resolved ranged comparison value [835] if(mode_twoplanebitmap::cx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@4 to (number) $28 +Resolved ranged next value [836] mode_twoplanebitmap::cy#1 ← ++ mode_twoplanebitmap::cy#4 to ++ +Resolved ranged comparison value [838] if(mode_twoplanebitmap::cy#1!=rangelast(0,$18)) goto mode_twoplanebitmap::@3 to (number) $19 +Resolved ranged next value [852] mode_twoplanebitmap::ax#1 ← ++ mode_twoplanebitmap::ax#2 to ++ +Resolved ranged comparison value [854] if(mode_twoplanebitmap::ax#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@8 to (number) $28 +Resolved ranged next value [855] mode_twoplanebitmap::ay#1 ← ++ mode_twoplanebitmap::ay#5 to ++ +Resolved ranged comparison value [857] if(mode_twoplanebitmap::ay#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@7 to (number) $c8 +Resolved ranged next value [865] mode_twoplanebitmap::bx#1 ← ++ mode_twoplanebitmap::bx#2 to ++ +Resolved ranged comparison value [867] if(mode_twoplanebitmap::bx#1!=rangelast(0,$27)) goto mode_twoplanebitmap::@16 to (number) $28 +Resolved ranged next value [868] mode_twoplanebitmap::by#1 ← ++ mode_twoplanebitmap::by#4 to ++ +Resolved ranged comparison value [870] if(mode_twoplanebitmap::by#1!=rangelast(0,$c7)) goto mode_twoplanebitmap::@15 to (number) $c8 +Resolved ranged next value [895] mode_sixsfred::i#1 ← ++ mode_sixsfred::i#2 to ++ +Resolved ranged comparison value [897] if(mode_sixsfred::i#1!=rangelast(0,$f)) goto mode_sixsfred::@1 to (number) $10 +Resolved ranged next value [908] mode_sixsfred::cx#1 ← ++ mode_sixsfred::cx#2 to ++ +Resolved ranged comparison value [910] if(mode_sixsfred::cx#1!=rangelast(0,$27)) goto mode_sixsfred::@4 to (number) $28 +Resolved ranged next value [911] mode_sixsfred::cy#1 ← ++ mode_sixsfred::cy#4 to ++ +Resolved ranged comparison value [913] if(mode_sixsfred::cy#1!=rangelast(0,$18)) goto mode_sixsfred::@3 to (number) $19 +Resolved ranged next value [923] mode_sixsfred::ax#1 ← ++ mode_sixsfred::ax#2 to ++ +Resolved ranged comparison value [925] if(mode_sixsfred::ax#1!=rangelast(0,$27)) goto mode_sixsfred::@8 to (number) $28 +Resolved ranged next value [926] mode_sixsfred::ay#1 ← ++ mode_sixsfred::ay#4 to ++ +Resolved ranged comparison value [928] if(mode_sixsfred::ay#1!=rangelast(0,$c7)) goto mode_sixsfred::@7 to (number) $c8 +Resolved ranged next value [936] mode_sixsfred::bx#1 ← ++ mode_sixsfred::bx#2 to ++ +Resolved ranged comparison value [938] if(mode_sixsfred::bx#1!=rangelast(0,$27)) goto mode_sixsfred::@12 to (number) $28 +Resolved ranged next value [939] mode_sixsfred::by#1 ← ++ mode_sixsfred::by#4 to ++ +Resolved ranged comparison value [941] if(mode_sixsfred::by#1!=rangelast(0,$c7)) goto mode_sixsfred::@11 to (number) $c8 +Resolved ranged next value [966] mode_sixsfred2::i#1 ← ++ mode_sixsfred2::i#2 to ++ +Resolved ranged comparison value [968] if(mode_sixsfred2::i#1!=rangelast(0,$f)) goto mode_sixsfred2::@1 to (number) $10 +Resolved ranged next value [981] mode_sixsfred2::cx#1 ← ++ mode_sixsfred2::cx#2 to ++ +Resolved ranged comparison value [983] if(mode_sixsfred2::cx#1!=rangelast(0,$27)) goto mode_sixsfred2::@4 to (number) $28 +Resolved ranged next value [984] mode_sixsfred2::cy#1 ← ++ mode_sixsfred2::cy#4 to ++ +Resolved ranged comparison value [986] if(mode_sixsfred2::cy#1!=rangelast(0,$18)) goto mode_sixsfred2::@3 to (number) $19 +Resolved ranged next value [996] mode_sixsfred2::ax#1 ← ++ mode_sixsfred2::ax#2 to ++ +Resolved ranged comparison value [998] if(mode_sixsfred2::ax#1!=rangelast(0,$27)) goto mode_sixsfred2::@8 to (number) $28 +Resolved ranged next value [999] mode_sixsfred2::ay#1 ← ++ mode_sixsfred2::ay#4 to ++ +Resolved ranged comparison value [1001] if(mode_sixsfred2::ay#1!=rangelast(0,$c7)) goto mode_sixsfred2::@7 to (number) $c8 +Resolved ranged next value [1009] mode_sixsfred2::bx#1 ← ++ mode_sixsfred2::bx#2 to ++ +Resolved ranged comparison value [1011] if(mode_sixsfred2::bx#1!=rangelast(0,$27)) goto mode_sixsfred2::@12 to (number) $28 +Resolved ranged next value [1012] mode_sixsfred2::by#1 ← ++ mode_sixsfred2::by#4 to ++ +Resolved ranged comparison value [1014] if(mode_sixsfred2::by#1!=rangelast(0,$c7)) goto mode_sixsfred2::@11 to (number) $c8 +Resolved ranged next value [1038] mode_8bpppixelcell::i#1 ← ++ mode_8bpppixelcell::i#2 to ++ +Resolved ranged comparison value [1040] if(mode_8bpppixelcell::i#1!=rangelast(0,$f)) goto mode_8bpppixelcell::@1 to (number) $10 +Resolved ranged next value [1052] mode_8bpppixelcell::ax#1 ← ++ mode_8bpppixelcell::ax#2 to ++ +Resolved ranged comparison value [1054] if(mode_8bpppixelcell::ax#1!=rangelast(0,$27)) goto mode_8bpppixelcell::@4 to (number) $28 +Resolved ranged next value [1055] mode_8bpppixelcell::ay#1 ← ++ mode_8bpppixelcell::ay#4 to ++ +Resolved ranged comparison value [1057] if(mode_8bpppixelcell::ay#1!=rangelast(0,$18)) goto mode_8bpppixelcell::@3 to (number) $19 +Resolved ranged next value [1079] mode_8bpppixelcell::cp#1 ← ++ mode_8bpppixelcell::cp#2 to ++ +Resolved ranged comparison value [1081] if(mode_8bpppixelcell::cp#1!=rangelast(0,7)) goto mode_8bpppixelcell::@9 to (number) 8 +Resolved ranged next value [1082] mode_8bpppixelcell::cr#1 ← ++ mode_8bpppixelcell::cr#6 to ++ +Resolved ranged comparison value [1084] if(mode_8bpppixelcell::cr#1!=rangelast(0,7)) goto mode_8bpppixelcell::@8 to (number) 8 +Resolved ranged next value [1085] mode_8bpppixelcell::ch#1 ← ++ mode_8bpppixelcell::ch#8 to ++ +Resolved ranged comparison value [1087] if(mode_8bpppixelcell::ch#1!=rangelast(0,$ff)) goto mode_8bpppixelcell::@7 to (number) 0 +Resolved ranged next value [1106] mode_8bppchunkybmm::i#1 ← ++ mode_8bppchunkybmm::i#2 to ++ +Resolved ranged comparison value [1108] if(mode_8bppchunkybmm::i#1!=rangelast(0,$f)) goto mode_8bppchunkybmm::@1 to (number) $10 +Resolved ranged next value [1125] mode_8bppchunkybmm::x#1 ← ++ mode_8bppchunkybmm::x#2 to ++ +Resolved ranged comparison value [1127] if(mode_8bppchunkybmm::x#1!=rangelast(0,$13f)) goto mode_8bppchunkybmm::@4 to (number) $140 +Resolved ranged next value [1132] mode_8bppchunkybmm::y#1 ← ++ mode_8bppchunkybmm::y#6 to ++ +Resolved ranged comparison value [1134] if(mode_8bppchunkybmm::y#1!=rangelast(0,$c7)) goto mode_8bppchunkybmm::@3 to (number) $c8 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) menu::CHARSET/(dword) $10000 in [273] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) menu::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [275] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) menu::SCREEN&(word) $3fff/(byte) $40 in [281] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) menu::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) menu::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_stdchar::CHARSET/(dword) $10000 in [481] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_stdchar::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [483] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) mode_stdchar::SCREEN&(word) $3fff/(byte) $40 in [490] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_stdchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_stdchar::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_ecmchar::CHARSET/(dword) $10000 in [524] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_ecmchar::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [526] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) mode_ecmchar::SCREEN&(word) $3fff/(byte) $40 in [533] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_ecmchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_ecmchar::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_mcchar::CHARSET/(dword) $10000 in [570] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_mcchar::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 in [572] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const dword) DTV_COLOR_BANK_DEFAULT/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) mode_mcchar::SCREEN&(word) $3fff/(byte) $40 in [579] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_mcchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_mcchar::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_stdbitmap::BITMAP/(dword) $10000 in [615] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_stdbitmap::BITMAP/(dword) $10000 +Simplifying constant evaluating to zero (word)(const byte*) mode_stdbitmap::SCREEN&(word) $3fff/(byte) $40 in [622] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_stdbitmap::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_stdbitmap::BITMAP&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_hicolstdchar::CHARSET/(dword) $10000 in [667] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_hicolstdchar::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const byte*) mode_hicolstdchar::COLORS/(word) $400 in [669] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const byte*) mode_hicolstdchar::COLORS/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) mode_hicolstdchar::SCREEN&(word) $3fff/(byte) $40 in [676] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_hicolstdchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_hicolstdchar::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_hicolecmchar::CHARSET/(dword) $10000 in [708] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_hicolecmchar::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const byte*) mode_hicolecmchar::COLORS/(word) $400 in [710] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const byte*) mode_hicolecmchar::COLORS/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) mode_hicolecmchar::SCREEN&(word) $3fff/(byte) $40 in [717] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_hicolecmchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_hicolecmchar::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero (byte)(dword)(const byte*) mode_hicolmcchar::CHARSET/(dword) $10000 in [752] *((const byte*) DTV_GRAPHICS_VIC_BANK) ← (byte)(dword)(const byte*) mode_hicolmcchar::CHARSET/(dword) $10000 +Simplifying constant evaluating to zero >(word)(const byte*) mode_hicolmcchar::COLORS/(word) $400 in [754] *((const byte*) DTV_COLOR_BANK_HI) ← >(word)(const byte*) mode_hicolmcchar::COLORS/(word) $400 +Simplifying constant evaluating to zero (word)(const byte*) mode_hicolmcchar::SCREEN&(word) $3fff/(byte) $40 in [761] *((const byte*) VIC_MEMORY) ← (byte)(word)(const byte*) mode_hicolmcchar::SCREEN&(word) $3fff/(byte) $40|(word)(const byte*) mode_hicolmcchar::CHARSET&(word) $3fff/(word) $400 +Simplifying constant evaluating to zero <(const byte*) mode_twoplanebitmap::PLANEA in [799] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_twoplanebitmap::PLANEA +Simplifying constant evaluating to zero <(const byte*) mode_twoplanebitmap::PLANEB in [805] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_twoplanebitmap::PLANEB +Simplifying constant evaluating to zero >(const byte*) mode_twoplanebitmap::COLORS/(word) $400 in [812] *((const byte*) DTV_COLOR_BANK_HI) ← >(const byte*) mode_twoplanebitmap::COLORS/(word) $400 +Simplifying constant evaluating to zero <(const byte*) mode_sixsfred::PLANEA in [878] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_sixsfred::PLANEA +Simplifying constant evaluating to zero <(const byte*) mode_sixsfred::PLANEB in [884] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_sixsfred::PLANEB +Simplifying constant evaluating to zero >(const byte*) mode_sixsfred::COLORS/(word) $400 in [891] *((const byte*) DTV_COLOR_BANK_HI) ← >(const byte*) mode_sixsfred::COLORS/(word) $400 +Simplifying constant evaluating to zero <(const byte*) mode_sixsfred2::PLANEA in [949] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_sixsfred2::PLANEA +Simplifying constant evaluating to zero <(const byte*) mode_sixsfred2::PLANEB in [955] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_sixsfred2::PLANEB +Simplifying constant evaluating to zero >(const byte*) mode_sixsfred2::COLORS/(word) $400 in [962] *((const byte*) DTV_COLOR_BANK_HI) ← >(const byte*) mode_sixsfred2::COLORS/(word) $400 +Simplifying constant evaluating to zero <(const byte*) mode_8bpppixelcell::PLANEA in [1022] *((const byte*) DTV_PLANEA_START_LO) ← <(const byte*) mode_8bpppixelcell::PLANEA +Simplifying constant evaluating to zero <(const byte*) mode_8bpppixelcell::PLANEB in [1028] *((const byte*) DTV_PLANEB_START_LO) ← <(const byte*) mode_8bpppixelcell::PLANEB +Simplifying constant evaluating to zero <<(const dword) mode_8bppchunkybmm::PLANEB in [1096] *((const byte*) DTV_PLANEB_START_LO) ← <<(const dword) mode_8bppchunkybmm::PLANEB +Simplifying constant evaluating to zero ><(const dword) mode_8bppchunkybmm::PLANEB in [1097] *((const byte*) DTV_PLANEB_START_MI) ← ><(const dword) mode_8bppchunkybmm::PLANEB Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero bitmap_plot_xhi in [150] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero bitmap_plot_xlo in [150] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero (word)menu::CHARSET&$3fff/$400 in [391] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) menu::CHARSET&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_stdchar::CHARSET&$3fff/$400 in [709] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_stdchar::CHARSET&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_ecmchar::CHARSET&$3fff/$400 in [758] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_ecmchar::CHARSET&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_mcchar::CHARSET&$3fff/$400 in [810] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_mcchar::CHARSET&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_stdbitmap::BITMAP&$3fff/$400 in [859] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_stdbitmap::BITMAP&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_hicolstdchar::CHARSET&$3fff/$400 in [926] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_hicolstdchar::CHARSET&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_hicolecmchar::CHARSET&$3fff/$400 in [974] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_hicolecmchar::CHARSET&(word) $3fff/(word) $400 -Simplifying expression containing zero (word)mode_hicolmcchar::CHARSET&$3fff/$400 in [1025] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_hicolmcchar::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero bitmap_plot_xhi in [99] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero bitmap_plot_xlo in [99] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero (word)menu::CHARSET&$3fff/$400 in [281] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) menu::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_stdchar::CHARSET&$3fff/$400 in [490] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_stdchar::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_ecmchar::CHARSET&$3fff/$400 in [533] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_ecmchar::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_mcchar::CHARSET&$3fff/$400 in [579] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_mcchar::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_stdbitmap::BITMAP&$3fff/$400 in [622] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_stdbitmap::BITMAP&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_hicolstdchar::CHARSET&$3fff/$400 in [676] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_hicolstdchar::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_hicolecmchar::CHARSET&$3fff/$400 in [717] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_hicolecmchar::CHARSET&(word) $3fff/(word) $400 +Simplifying expression containing zero (word)mode_hicolmcchar::CHARSET&$3fff/$400 in [761] *((const byte*) VIC_MEMORY) ← (byte)(word) 0|(word)(const byte*) mode_hicolmcchar::CHARSET&(word) $3fff/(word) $400 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable - keeping the phi block (byte*) print_screen#12 Eliminating unused variable - keeping the phi block (byte*) print_line_cursor#10 @@ -7722,7 +7722,7 @@ Alias (byte~) bitmap_init::$10 = (byte~) bitmap_init::$6 Successful SSA optimization Pass2AliasElimination Constant right-side identified [4] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 Constant right-side identified [44] (byte~) bitmap_init::$1 ← > (const byte*) bitmap_init::bitmap#0 -Constant right-side identified [827] (byte) mode_8bppchunkybmm::gfxbCpuBank#1 ← ++ (const byte) mode_8bppchunkybmm::gfxbCpuBank#0 +Constant right-side identified [824] (byte) mode_8bppchunkybmm::gfxbCpuBank#1 ← ++ (const byte) mode_8bppchunkybmm::gfxbCpuBank#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Constant (const byte) bitmap_init::$1 = >bitmap_init::bitmap#0 diff --git a/src/test/ref/call-parameter-autocast.asm b/src/test/ref/call-parameter-autocast.asm index 1fe3eff36..bc4ac0c8a 100644 --- a/src/test/ref/call-parameter-autocast.asm +++ b/src/test/ref/call-parameter-autocast.asm @@ -5,27 +5,32 @@ .label SCREEN = $400 main: { .const w = $1234 + // print(0x1234) lda #<$1234 sta.z print.w lda #>$1234 sta.z print.w+1 ldx #0 jsr print + // print(w) lda #w sta.z print.w+1 jsr print + // print( {0x12,0x34} ) lda #<$12*$100+$34 sta.z print.w lda #>$12*$100+$34 sta.z print.w+1 jsr print + // } rts } // print(word zp(2) w) print: { .label w = 2 + // SCREEN[idx++] = w txa asl tay @@ -33,6 +38,8 @@ print: { sta SCREEN,y lda.z w+1 sta SCREEN+1,y + // SCREEN[idx++] = w; inx + // } rts } diff --git a/src/test/ref/call-parameter-autocast.log b/src/test/ref/call-parameter-autocast.log index c1be05db6..7dbd5b554 100644 --- a/src/test/ref/call-parameter-autocast.log +++ b/src/test/ref/call-parameter-autocast.log @@ -127,7 +127,7 @@ Identical Phi Values (byte) idx#1 (byte) idx#13 Identical Phi Values (byte) idx#10 (byte) idx#13 Identical Phi Values (byte) idx#14 (byte) idx#10 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [9] (word) print::w#2 ← (byte) $12 w= (byte) $34 +Constant right-side identified [7] (word) print::w#2 ← (byte) $12 w= (byte) $34 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) print::w#0 = $1234 Constant (const word) print::w#1 = main::w diff --git a/src/test/ref/callconstparam.asm b/src/test/ref/callconstparam.asm index 5ddfaa9ec..37383dd14 100644 --- a/src/test/ref/callconstparam.asm +++ b/src/test/ref/callconstparam.asm @@ -6,6 +6,7 @@ .pc = $80d "Program" .label screen = 3 main: { + // line(1,2) lda #<$400 sta.z screen lda #>$400 @@ -14,27 +15,34 @@ main: { sta.z line.x1 ldx #1 jsr line + // line(3,5) lda #5 sta.z line.x1 ldx #3 jsr line + // } rts } // line(byte zp(2) x1) line: { .label x1 = 2 __b1: + // for(byte x = x0; x$378 sta.z spritePtr1_return+1 + // *spritePtr(screen) = $22 lda #$22 ldy #0 sta (spritePtr1_return),y + // } rts } screens: .word $400, $1400 diff --git a/src/test/ref/cast-not-needed-3.asm b/src/test/ref/cast-not-needed-3.asm index b1931cd53..c9c3cc30c 100644 --- a/src/test/ref/cast-not-needed-3.asm +++ b/src/test/ref/cast-not-needed-3.asm @@ -6,10 +6,12 @@ main: { .label DSP = $400 .label spritePtr1___0 = 2 .label getScreen1_return = 2 + // return screens[id]; lda screens sta.z getScreen1_return lda screens+1 sta.z getScreen1_return+1 + // screen+$378 clc lda.z spritePtr1___0 adc #<$378 @@ -17,9 +19,12 @@ main: { lda.z spritePtr1___0+1 adc #>$378 sta.z spritePtr1___0+1 + // (byte)*(screen+$378) ldy #0 lda (spritePtr1___0),y + // DSP[0] = spritePtr(getScreen(0)) sta DSP + // } rts } screens: .word $400, $1400 diff --git a/src/test/ref/cast-not-needed-3.log b/src/test/ref/cast-not-needed-3.log index cba704caa..32f7f74db 100644 --- a/src/test/ref/cast-not-needed-3.log +++ b/src/test/ref/cast-not-needed-3.log @@ -117,7 +117,7 @@ Alias (byte) main::spritePtr1_return#0 = (byte~) main::spritePtr1_$1 (byte) main Successful SSA optimization Pass2AliasElimination Constant (const byte) main::getScreen1_id#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::DSP in [17] *((const byte*) main::DSP + (byte) 0) ← (byte) main::spritePtr1_return#0 +Simplifying expression containing zero main::DSP in [5] *((const byte*) main::DSP + (byte) 0) ← (byte) main::spritePtr1_return#0 Successful SSA optimization PassNSimplifyExpressionWithZero Constant right-side identified [0] (byte~) main::getScreen1_$0 ← (const byte) main::getScreen1_id#0 * (const byte) SIZEOF_POINTER Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/cast-not-needed.asm b/src/test/ref/cast-not-needed.asm index 171d7ec07..8b15c7fb7 100644 --- a/src/test/ref/cast-not-needed.asm +++ b/src/test/ref/cast-not-needed.asm @@ -6,7 +6,9 @@ .label SCREEN = $4400 main: { .label sprite_ptr = SCREEN+$378 + // sprite_ptr[0] = (byte)(sprite/$40) lda #$ff&sprite/$40 sta sprite_ptr + // } rts } diff --git a/src/test/ref/cast-not-needed.log b/src/test/ref/cast-not-needed.log index f3d4c8eb2..9e16a1c1b 100644 --- a/src/test/ref/cast-not-needed.log +++ b/src/test/ref/cast-not-needed.log @@ -57,14 +57,14 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte*) main::sprite_ptr#0 = (byte*~) main::$0 Successful SSA optimization Pass2AliasElimination Constant right-side identified [0] (byte*) main::sprite_ptr#0 ← (const byte*) SCREEN + (word) $378 -Constant right-side identified [2] (byte*~) main::$1 ← (const byte*) sprite / (byte) $40 +Constant right-side identified [1] (byte*~) main::$1 ← (const byte*) sprite / (byte) $40 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::sprite_ptr#0 = SCREEN+$378 Constant (const byte*) main::$1 = sprite/$40 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::$2 = (byte)main::$1 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::sprite_ptr#0 in [4] *((const byte*) main::sprite_ptr#0 + (byte) 0) ← (const byte) main::$2 +Simplifying expression containing zero main::sprite_ptr#0 in [3] *((const byte*) main::sprite_ptr#0 + (byte) 0) ← (const byte) main::$2 Successful SSA optimization PassNSimplifyExpressionWithZero Constant inlined main::$1 = (const byte*) sprite/(byte) $40 Constant inlined main::$2 = (byte)(const byte*) sprite/(byte) $40 diff --git a/src/test/ref/cast-precedence-problem.asm b/src/test/ref/cast-precedence-problem.asm index 4dfc4b802..f91aadb14 100644 --- a/src/test/ref/cast-precedence-problem.asm +++ b/src/test/ref/cast-precedence-problem.asm @@ -11,17 +11,23 @@ main: { .const sumb = min+max .const midw = (sumw>>1)+1 .const midb = (sumb>>1)+1 + // SCREEN[0] = midw lda #midw sta SCREEN + // SCREEN[1] = midb lda #midb sta SCREEN+1 + // if(SCREEN[0]==SCREEN[1]) lda SCREEN cmp SCREEN+1 beq __b1 + // *BGCOL = 2 lda #2 sta BGCOL + // } rts __b1: + // *BGCOL = 5 lda #5 sta BGCOL rts diff --git a/src/test/ref/cast-precedence-problem.log b/src/test/ref/cast-precedence-problem.log index 099c32e53..8f145bb0f 100644 --- a/src/test/ref/cast-precedence-problem.log +++ b/src/test/ref/cast-precedence-problem.log @@ -121,16 +121,16 @@ Alias (byte) main::midw#0 = (byte~) main::$3 Alias (byte) main::sumb#0 = (byte~) main::$4 Alias (byte) main::midb#0 = (byte~) main::$6 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$7 [14] if(*((const byte*) main::SCREEN + (byte) 0)==*((const byte*) main::SCREEN + (byte) 1)) goto main::@1 +Simple Condition (bool~) main::$7 [10] if(*((const byte*) main::SCREEN + (byte) 0)==*((const byte*) main::SCREEN + (byte) 1)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (word) main::sumw#0 ← (const byte) main::min + (const byte) main::max -Constant right-side identified [7] (byte) main::sumb#0 ← (const byte) main::min + (const byte) main::max +Constant right-side identified [5] (byte) main::sumb#0 ← (const byte) main::min + (const byte) main::max Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::sumw#0 = main::min+main::max Constant (const byte) main::sumb#0 = main::min+main::max Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::SCREEN in [6] *((const byte*) main::SCREEN + (byte) 0) ← (byte) main::midw#0 -Simplifying expression containing zero main::SCREEN in [14] if(*((const byte*) main::SCREEN + (byte) 0)==*((const byte*) main::SCREEN + (byte) 1)) goto main::@1 +Simplifying expression containing zero main::SCREEN in [4] *((const byte*) main::SCREEN + (byte) 0) ← (byte) main::midw#0 +Simplifying expression containing zero main::SCREEN in [10] if(*((const byte*) main::SCREEN + (byte) 0)==*((const byte*) main::SCREEN + (byte) 1)) goto main::@1 Successful SSA optimization PassNSimplifyExpressionWithZero Constant right-side identified [0] (word~) main::$1 ← (const word) main::sumw#0 >> (byte) 1 Constant right-side identified [4] (byte~) main::$5 ← (const byte) main::sumb#0 >> (byte) 1 diff --git a/src/test/ref/casting.asm b/src/test/ref/casting.asm index ed30f3678..92b33f0bd 100644 --- a/src/test/ref/casting.asm +++ b/src/test/ref/casting.asm @@ -8,20 +8,27 @@ main: { ldx #0 __b1: + // b2 = 200-b txa eor #$ff clc adc #$c8+1 + // SCREEN[b] = b2 sta SCREEN,x + // sb = - (signed byte)b txa eor #$ff clc adc #1 + // SCREEN2[b] = (byte)sb sta SCREEN2,x + // for( byte b: 0..100) inx cpx #$65 bne __b1 + // w() jsr w + // } rts } w: { @@ -30,15 +37,20 @@ w: { .const b = w1-w2 ldy #0 __b1: + // b2 = 1400-1350+i tya tax axs #-[$578-$546] + // SCREEN3[i] = b lda #b sta SCREEN3,y + // SCREEN4[i] = b2 txa sta SCREEN4,y + // for(byte i : 0..10) iny cpy #$b bne __b1 + // } rts } diff --git a/src/test/ref/casting.log b/src/test/ref/casting.log index aff603c5a..88730d676 100644 --- a/src/test/ref/casting.log +++ b/src/test/ref/casting.log @@ -189,13 +189,13 @@ Identical Phi Values (byte*) SCREEN4#2 (byte*) SCREEN4#3 Identical Phi Values (byte*) SCREEN3#1 (byte*) SCREEN3#2 Identical Phi Values (byte*) SCREEN4#1 (byte*) SCREEN4#2 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$5 [19] if((byte) main::b#1!=rangelast(0,$64)) goto main::@1 -Simple Condition (bool~) w::$3 [35] if((byte) w::i#1!=rangelast(0,$a)) goto w::@1 +Simple Condition (bool~) main::$5 [14] if((byte) main::b#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) w::$3 [27] if((byte) w::i#1!=rangelast(0,$a)) goto w::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte*) SCREEN2#0 ← (const byte*) SCREEN + (byte)(number) $28*(number) 3 -Constant right-side identified [2] (byte*) SCREEN3#0 ← (const byte*) SCREEN + (byte)(number) $28*(number) 6 -Constant right-side identified [4] (byte*) SCREEN4#0 ← (const byte*) SCREEN + (word)(number) $28*(number) 9 -Constant right-side identified [26] (word~) w::$0 ← (const word) w::w1 - (const word) w::w2 +Constant right-side identified [1] (byte*) SCREEN3#0 ← (const byte*) SCREEN + (byte)(number) $28*(number) 6 +Constant right-side identified [2] (byte*) SCREEN4#0 ← (const byte*) SCREEN + (word)(number) $28*(number) 9 +Constant right-side identified [20] (word~) w::$0 ← (const word) w::w1 - (const word) w::w2 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) SCREEN2#0 = SCREEN+(byte)$28*3 Constant (const byte*) SCREEN3#0 = SCREEN+(byte)$28*6 @@ -206,10 +206,10 @@ Constant (const word) w::$0 = w::w1-w::w2 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) w::b#0 = (byte)w::$0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [17] main::b#1 ← ++ main::b#2 to ++ -Resolved ranged comparison value [19] if(main::b#1!=rangelast(0,$64)) goto main::@1 to (number) $65 -Resolved ranged next value [33] w::i#1 ← ++ w::i#2 to ++ -Resolved ranged comparison value [35] if(w::i#1!=rangelast(0,$a)) goto w::@1 to (number) $b +Resolved ranged next value [12] main::b#1 ← ++ main::b#2 to ++ +Resolved ranged comparison value [14] if(main::b#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [25] w::i#1 ← ++ w::i#2 to ++ +Resolved ranged comparison value [27] if(w::i#1!=rangelast(0,$a)) goto w::@1 to (number) $b Adding number conversion cast (unumber) $65 in if((byte) main::b#1!=(number) $65) goto main::@1 Adding number conversion cast (unumber) $b in if((byte) w::i#1!=(number) $b) goto w::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/chargen.asm b/src/test/ref/chargen.asm index 2d1cc8129..ad14adcb0 100644 --- a/src/test/ref/chargen.asm +++ b/src/test/ref/chargen.asm @@ -9,7 +9,9 @@ main: { .label bits = 3 .label sc = 4 .label y = 2 + // asm sei + // *PROCPORT = $32 lda #$32 sta PROCPORT lda #CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 + // print_dword_at(cyclecount, SCREEN) jsr print_dword_at jmp __b1 } @@ -43,6 +48,7 @@ main: { // print_dword_at(dword zp(9) dw) print_dword_at: { .label dw = 9 + // print_word_at(>dw, at) lda.z dw+2 sta.z print_word_at.w lda.z dw+3 @@ -52,6 +58,7 @@ print_dword_at: { lda #>SCREEN sta.z print_word_at.at+1 jsr print_word_at + // print_word_at(SCREEN+4 sta.z print_word_at.at+1 jsr print_word_at + // } rts } // Print a word as HEX at a specific position @@ -68,9 +76,11 @@ print_dword_at: { print_word_at: { .label w = 2 .label at = 4 + // print_byte_at(>w, at) lda.z w+1 sta.z print_byte_at.b jsr print_byte_at + // print_byte_at(>4 lda.z b lsr lsr lsr lsr + // print_char_at(print_hextab[b>>4], at) tay ldx print_hextab,y lda.z at @@ -100,9 +113,11 @@ print_byte_at: { lda.z at+1 sta.z print_char_at.at+1 jsr print_char_at + // b&$f lda #$f and.z b tay + // print_char_at(print_hextab[b&$f], at+1) lda.z at clc adc #1 @@ -112,21 +127,25 @@ print_byte_at: { sta.z print_char_at.at+1 ldx print_hextab,y jsr print_char_at + // } rts } // Print a single char // print_char_at(byte register(X) ch, byte* zp(7) at) print_char_at: { .label at = 7 + // *(at) = ch txa ldy #0 sta (at),y + // } rts } // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = 9 + // 0xffffffff - *CIA2_TIMER_AB lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -140,16 +159,20 @@ clock: { lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 + // } rts } // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2_TIMER_A_CONTROL + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_AB = 0xffffffff lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -158,10 +181,13 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/cia-timer-cyclecount.log b/src/test/ref/cia-timer-cyclecount.log index 557a486e2..a08d2d784 100644 --- a/src/test/ref/cia-timer-cyclecount.log +++ b/src/test/ref/cia-timer-cyclecount.log @@ -365,16 +365,16 @@ Constant (const byte*) print_dword_at::at#0 = SCREEN Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [50] if(true) goto main::@2 +if() condition always true - replacing block destination [37] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [5] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [6] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [2] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [3] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [6] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [8] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [9] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [3] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [5] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [6] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [9] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [6] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP Eliminating unused constant (const byte) CIA_TIMER_CONTROL_CONTINUOUS diff --git a/src/test/ref/cia-timer-simple.asm b/src/test/ref/cia-timer-simple.asm index d83d0edf0..df12de49a 100644 --- a/src/test/ref/cia-timer-simple.asm +++ b/src/test/ref/cia-timer-simple.asm @@ -14,9 +14,12 @@ .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 .label SCREEN = $400 main: { + // clock_start() jsr clock_start __b1: + // clock() jsr clock + // print_dword_at(clock(), SCREEN) jsr print_dword_at jmp __b1 } @@ -24,6 +27,7 @@ main: { // print_dword_at(dword zp(9) dw) print_dword_at: { .label dw = 9 + // print_word_at(>dw, at) lda.z dw+2 sta.z print_word_at.w lda.z dw+3 @@ -33,6 +37,7 @@ print_dword_at: { lda #>SCREEN sta.z print_word_at.at+1 jsr print_word_at + // print_word_at(SCREEN+4 sta.z print_word_at.at+1 jsr print_word_at + // } rts } // Print a word as HEX at a specific position @@ -49,9 +55,11 @@ print_dword_at: { print_word_at: { .label w = 2 .label at = 4 + // print_byte_at(>w, at) lda.z w+1 sta.z print_byte_at.b jsr print_byte_at + // print_byte_at(>4 lda.z b lsr lsr lsr lsr + // print_char_at(print_hextab[b>>4], at) tay ldx print_hextab,y lda.z at @@ -81,9 +92,11 @@ print_byte_at: { lda.z at+1 sta.z print_char_at.at+1 jsr print_char_at + // b&$f lda #$f and.z b tay + // print_char_at(print_hextab[b&$f], at+1) lda.z at clc adc #1 @@ -93,21 +106,25 @@ print_byte_at: { sta.z print_char_at.at+1 ldx print_hextab,y jsr print_char_at + // } rts } // Print a single char // print_char_at(byte register(X) ch, byte* zp(7) at) print_char_at: { .label at = 7 + // *(at) = ch txa ldy #0 sta (at),y + // } rts } // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = 9 + // 0xffffffff - *CIA2_TIMER_AB lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -121,16 +138,20 @@ clock: { lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 + // } rts } // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2_TIMER_A_CONTROL + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_AB = 0xffffffff lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -139,10 +160,13 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/cia-timer-simple.log b/src/test/ref/cia-timer-simple.log index 75cbc35f5..ee9671a1f 100644 --- a/src/test/ref/cia-timer-simple.log +++ b/src/test/ref/cia-timer-simple.log @@ -358,16 +358,16 @@ Constant (const byte*) print_dword_at::at#0 = SCREEN Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [51] if(true) goto main::@2 +if() condition always true - replacing block destination [38] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [5] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [6] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [2] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [3] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [6] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [8] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [9] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [3] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [5] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [6] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [9] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [6] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP Eliminating unused constant (const byte) CIA_TIMER_CONTROL_CONTINUOUS diff --git a/src/test/ref/clobber-a-problem.asm b/src/test/ref/clobber-a-problem.asm index 8ca9cad34..579560da2 100644 --- a/src/test/ref/clobber-a-problem.asm +++ b/src/test/ref/clobber-a-problem.asm @@ -8,35 +8,47 @@ .const BLACK = 0 .label irq_raster_next = 2 __b1: + // irq_raster_next = 0 lda #0 sta.z irq_raster_next jsr main rts main: { + // *KERNEL_IRQ = &irq lda #irq sta KERNEL_IRQ+1 + // } rts } irq: { sta rega+1 stx regx+1 + // *BORDERCOL = DARK_GREY lda #DARK_GREY sta BORDERCOL + // irq_raster_next += 21 lax.z irq_raster_next axs #-[$15] stx.z irq_raster_next + // raster_next = irq_raster_next // Setup next interrupt + // raster_next&7 txa and #7 + // if((raster_next&7)==0) cmp #0 bne __b1 + // raster_next -=1 dex __b1: + // *RASTER = raster_next stx RASTER + // *BORDERCOL = BLACK lda #BLACK sta BORDERCOL + // } rega: lda #00 regx: diff --git a/src/test/ref/clobber-a-problem.log b/src/test/ref/clobber-a-problem.log index f4e1068a1..0679d54d6 100644 --- a/src/test/ref/clobber-a-problem.log +++ b/src/test/ref/clobber-a-problem.log @@ -99,7 +99,7 @@ Inversing boolean not [8] (bool~) irq::$2 ← (byte~) irq::$0 != (byte) 0 from [ Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) irq::raster_next#0 = (byte) irq::raster_next#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) irq::$2 [9] if((byte~) irq::$0!=(byte) 0) goto irq::@1 +Simple Condition (bool~) irq::$2 [8] if((byte~) irq::$0!=(byte) 0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Added new block during phi lifting irq::@3(between irq and irq::@1) Adding NOP phi() at start of @begin diff --git a/src/test/ref/coalesce-assignment.asm b/src/test/ref/coalesce-assignment.asm index 77939f1cf..37bb9dd39 100644 --- a/src/test/ref/coalesce-assignment.asm +++ b/src/test/ref/coalesce-assignment.asm @@ -12,23 +12,31 @@ main: { __b1: ldy #0 __b2: + // e = b+c tya clc adc.z a sta.z e + // f = d+a tya clc adc.z a + // g = e+f clc adc.z e + // SCREEN[idx++] = g sta SCREEN,x + // SCREEN[idx++] = g; inx + // for( byte b: 0..5) iny cpy #6 bne __b2 + // for( byte a: 0..5) inc.z a lda #6 cmp.z a bne __b1 + // } rts } diff --git a/src/test/ref/coalesce-assignment.log b/src/test/ref/coalesce-assignment.log index 6551d62dc..48570c183 100644 --- a/src/test/ref/coalesce-assignment.log +++ b/src/test/ref/coalesce-assignment.log @@ -103,17 +103,17 @@ Alias (byte) main::idx#1 = (byte) main::idx#4 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::a#2 (byte) main::a#4 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$3 [17] if((byte) main::b#1!=rangelast(0,5)) goto main::@2 -Simple Condition (bool~) main::$4 [21] if((byte) main::a#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) main::$3 [12] if((byte) main::b#1!=rangelast(0,5)) goto main::@2 +Simple Condition (bool~) main::$4 [15] if((byte) main::a#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::idx#0 = 0 Constant (const byte) main::a#0 = 0 Constant (const byte) main::b#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [15] main::b#1 ← ++ main::d#0 to ++ -Resolved ranged comparison value [17] if(main::b#1!=rangelast(0,5)) goto main::@2 to (number) 6 -Resolved ranged next value [19] main::a#1 ← ++ main::a#4 to ++ -Resolved ranged comparison value [21] if(main::a#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [10] main::b#1 ← ++ main::d#0 to ++ +Resolved ranged comparison value [12] if(main::b#1!=rangelast(0,5)) goto main::@2 to (number) 6 +Resolved ranged next value [13] main::a#1 ← ++ main::a#4 to ++ +Resolved ranged comparison value [15] if(main::a#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::b#1!=(number) 6) goto main::@2 Adding number conversion cast (unumber) 6 in if((byte) main::a#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/code-after-return-1.asm b/src/test/ref/code-after-return-1.asm index 82304c240..d5bd6173a 100644 --- a/src/test/ref/code-after-return-1.asm +++ b/src/test/ref/code-after-return-1.asm @@ -5,7 +5,9 @@ .label SCREEN = $400 .const b = 0 main: { + // SCREEN[0] = b lda #b sta SCREEN + // } rts } diff --git a/src/test/ref/code-after-return.asm b/src/test/ref/code-after-return.asm index 6eb7497d7..05f103314 100644 --- a/src/test/ref/code-after-return.asm +++ b/src/test/ref/code-after-return.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // SCREEN[0] = 'a' lda #'a' sta SCREEN + // } rts } diff --git a/src/test/ref/comma-decl-for.asm b/src/test/ref/comma-decl-for.asm index b201a53d2..3fe9a9a8b 100644 --- a/src/test/ref/comma-decl-for.asm +++ b/src/test/ref/comma-decl-for.asm @@ -7,11 +7,15 @@ main: { lda #'g' ldx #0 __b1: + // for(byte i, j='g'; i<10; i++, j++) cpx #$a bcc __b2 + // } rts __b2: + // SCREEN[i] = j sta SCREEN,x + // for(byte i, j='g'; i<10; i++, j++) inx clc adc #1 diff --git a/src/test/ref/comma-decl.asm b/src/test/ref/comma-decl.asm index e4ea3dce6..43d517b53 100644 --- a/src/test/ref/comma-decl.asm +++ b/src/test/ref/comma-decl.asm @@ -7,11 +7,15 @@ main: { .const b = 'c' .const c = b+1 .const d = c+1 + // SCREEN[0] = b lda #b sta SCREEN + // SCREEN[1] = c lda #c sta SCREEN+1 + // SCREEN[2] = d lda #d sta SCREEN+2 + // } rts } diff --git a/src/test/ref/comma-decl.log b/src/test/ref/comma-decl.log index 1839cfbf9..a4295e7fa 100644 --- a/src/test/ref/comma-decl.log +++ b/src/test/ref/comma-decl.log @@ -70,7 +70,7 @@ Constant right-side identified [0] (byte) main::c#0 ← (const byte) main::b + ( Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::c#0 = main::b+1 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::SCREEN in [4] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::b +Simplifying expression containing zero main::SCREEN in [2] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::b Successful SSA optimization PassNSimplifyExpressionWithZero Constant right-side identified [0] (byte) main::d#0 ← (const byte) main::c#0 + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/comma-expr-1.asm b/src/test/ref/comma-expr-1.asm index c228fe5aa..9fdcae319 100644 --- a/src/test/ref/comma-expr-1.asm +++ b/src/test/ref/comma-expr-1.asm @@ -6,7 +6,9 @@ main: { .label SCREEN = $400 .const b = 3 .const c = b+1 + // SCREEN[1,0] = c lda #c sta SCREEN + // } rts } diff --git a/src/test/ref/comma-expr-1.log b/src/test/ref/comma-expr-1.log index d8dfe9973..8fa2fd2e0 100644 --- a/src/test/ref/comma-expr-1.log +++ b/src/test/ref/comma-expr-1.log @@ -51,7 +51,7 @@ Constant right-side identified [0] (byte) main::c#0 ← (const byte) main::b + ( Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::c#0 = main::b+1 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::SCREEN in [2] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::c#0 +Simplifying expression containing zero main::SCREEN in [1] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::c#0 Successful SSA optimization PassNSimplifyExpressionWithZero Adding NOP phi() at start of @begin Adding NOP phi() at start of @1 diff --git a/src/test/ref/comma-expr-2.asm b/src/test/ref/comma-expr-2.asm index 411365373..3c6c78f06 100644 --- a/src/test/ref/comma-expr-2.asm +++ b/src/test/ref/comma-expr-2.asm @@ -5,7 +5,9 @@ main: { .label SCREEN = $400 .const c = 1+3 + // SCREEN[1,0] = c lda #c sta SCREEN + // } rts } diff --git a/src/test/ref/comma-expr-for.asm b/src/test/ref/comma-expr-for.asm index 5266cad72..7f1448de0 100644 --- a/src/test/ref/comma-expr-for.asm +++ b/src/test/ref/comma-expr-for.asm @@ -7,11 +7,15 @@ main: { lda #'g' ldx #0 __b1: + // for( byte i=0; j<10, i<10; i++, j++) cpx #$a bcc __b2 + // } rts __b2: + // SCREEN[i] = j sta SCREEN,x + // for( byte i=0; j<10, i<10; i++, j++) inx clc adc #1 diff --git a/src/test/ref/comparison-rewriting-pointer.asm b/src/test/ref/comparison-rewriting-pointer.asm index 4ca4d9aee..c8436fe58 100644 --- a/src/test/ref/comparison-rewriting-pointer.asm +++ b/src/test/ref/comparison-rewriting-pointer.asm @@ -12,6 +12,7 @@ main: { lda #>screen sta.z sc+1 __b1: + // for(byte* sc =screen;sc<=screen+999;sc++) lda.z sc+1 cmp #>screen+$3e7 bne !+ @@ -25,6 +26,7 @@ main: { lda #>cols+$3e7 sta.z cc+1 __b3: + // for(byte* cc =cols+999;cc>cols-1;cc--) lda #>cols-1 cmp.z cc+1 bcc __b4 @@ -33,11 +35,14 @@ main: { cmp.z cc bcc __b4 !: + // } rts __b4: + // *cc=2 lda #2 ldy #0 sta (cc),y + // for(byte* cc =cols+999;cc>cols-1;cc--) lda.z cc bne !+ dec.z cc+1 @@ -45,9 +50,11 @@ main: { dec.z cc jmp __b3 __b2: + // *sc='a' lda #'a' ldy #0 sta (sc),y + // for(byte* sc =screen;sc<=screen+999;sc++) inc.z sc bne !+ inc.z sc+1 diff --git a/src/test/ref/comparison-rewriting-pointer.log b/src/test/ref/comparison-rewriting-pointer.log index 3c571cb9e..dff2b13be 100644 --- a/src/test/ref/comparison-rewriting-pointer.log +++ b/src/test/ref/comparison-rewriting-pointer.log @@ -97,7 +97,7 @@ Alias (byte*) main::sc#2 = (byte*) main::sc#3 Alias (byte*) main::cc#2 = (byte*) main::cc#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [3] if((byte*) main::sc#2<=(const byte*) main::screen+(word) $3e7) goto main::@2 -Simple Condition (bool~) main::$1 [10] if((byte*) main::cc#2>(const byte*) main::cols-(byte) 1) goto main::@8 +Simple Condition (bool~) main::$1 [9] if((byte*) main::cc#2>(const byte*) main::cols-(byte) 1) goto main::@8 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::sc#0 = main::screen Constant (const byte*) main::cc#0 = main::cols+$3e7 diff --git a/src/test/ref/comparison-rewriting.asm b/src/test/ref/comparison-rewriting.asm index 0d41b73d3..b38aaf8ae 100644 --- a/src/test/ref/comparison-rewriting.asm +++ b/src/test/ref/comparison-rewriting.asm @@ -11,9 +11,11 @@ main: { lda #>SCREEN sta.z sc+1 __b1: + // *sc=' ' lda #' ' ldy #0 sta (sc),y + // for(byte* sc : SCREEN..SCREEN+1000) inc.z sc bne !+ inc.z sc+1 @@ -26,6 +28,7 @@ main: { bne __b1 ldx #0 __b2: + // for( byte i=0; header[i]!=0; i++) lda header,x cmp #0 bne __b3 @@ -35,10 +38,13 @@ main: { sta.z screen+1 ldx #0 __b4: + // for(byte i=0;i<=9;i++) cpx #9+1 bcc __b5 + // } rts __b5: + // screen +=40 lda #$28 clc adc.z screen @@ -46,46 +52,61 @@ main: { bcc !+ inc.z screen+1 !: + // '0'+i txa clc adc #'0' + // screen[0] = '0'+i ldy #0 sta (screen),y + // if(i<5) cpx #5 bcs __b6 + // screen[2] = '+' lda #'+' ldy #2 sta (screen),y __b6: + // if(i<=5) cpx #5+1 bcs __b7 + // screen[5] = '+' lda #'+' ldy #5 sta (screen),y __b7: + // if(i==5) cpx #5 bne __b8 + // screen[8] = '+' lda #'+' ldy #8 sta (screen),y __b8: + // if(i>=5) cpx #5 bcc __b9 + // screen[11] = '+' lda #'+' ldy #$b sta (screen),y __b9: + // if(i>5) cpx #5+1 bcc __b10 + // screen[14] = '+' lda #'+' ldy #$e sta (screen),y __b10: + // for(byte i=0;i<=9;i++) inx jmp __b4 __b3: + // SCREEN[i] = header[i] lda header,x sta SCREEN,x + // for( byte i=0; header[i]!=0; i++) inx jmp __b2 header: .text " < <= == >= >" diff --git a/src/test/ref/comparison-rewriting.log b/src/test/ref/comparison-rewriting.log index 2fad46276..9cbe3e9aa 100644 --- a/src/test/ref/comparison-rewriting.log +++ b/src/test/ref/comparison-rewriting.log @@ -275,12 +275,12 @@ Alias (byte*) main::screen#1 = (byte*) main::screen#4 (byte*) main::screen#10 (b Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [5] if((byte*) main::sc#1!=rangelast(main::SCREEN,main::SCREEN+$3e8)) goto main::@1 Simple Condition (bool~) main::$1 [9] if(*((const byte*) main::header + (byte) main::i#2)!=(byte) 0) goto main::@4 -Simple Condition (bool~) main::$2 [17] if((byte) main::i1#10<=(byte) 9) goto main::@10 -Simple Condition (bool~) main::$5 [24] if((byte) main::i1#10>=(byte) 5) goto main::@12 -Simple Condition (bool~) main::$7 [28] if((byte) main::i1#10>(byte) 5) goto main::@13 -Simple Condition (bool~) main::$9 [34] if((byte) main::i1#10!=(byte) 5) goto main::@14 -Simple Condition (bool~) main::$11 [40] if((byte) main::i1#10<(byte) 5) goto main::@15 -Simple Condition (bool~) main::$13 [46] if((byte) main::i1#10<=(byte) 5) goto main::@16 +Simple Condition (bool~) main::$2 [16] if((byte) main::i1#10<=(byte) 9) goto main::@10 +Simple Condition (bool~) main::$5 [21] if((byte) main::i1#10>=(byte) 5) goto main::@12 +Simple Condition (bool~) main::$7 [23] if((byte) main::i1#10>(byte) 5) goto main::@13 +Simple Condition (bool~) main::$9 [26] if((byte) main::i1#10!=(byte) 5) goto main::@14 +Simple Condition (bool~) main::$11 [29] if((byte) main::i1#10<(byte) 5) goto main::@15 +Simple Condition (bool~) main::$13 [32] if((byte) main::i1#10<=(byte) 5) goto main::@16 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::sc#0 = main::SCREEN Constant (const byte) main::i#0 = 0 @@ -289,10 +289,10 @@ Constant (const byte) main::i1#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [3] main::sc#1 ← ++ main::sc#2 to ++ Resolved ranged comparison value [5] if(main::sc#1!=rangelast(main::SCREEN,main::SCREEN+$3e8)) goto main::@1 to (byte*)(const byte*) main::SCREEN+(word) $3e8+(number) 1 -Rewriting conditional comparison [17] if((byte) main::i1#10<=(byte) 9) goto main::@10 -Rewriting conditional comparison [28] if((byte) main::i1#10>(byte) 5) goto main::@13 -Rewriting conditional comparison [46] if((byte) main::i1#10<=(byte) 5) goto main::@16 -Simplifying expression containing zero main::screen#1 in [21] *((byte*) main::screen#1 + (byte) 0) ← (byte~) main::$3 +Rewriting conditional comparison [16] if((byte) main::i1#10<=(byte) 9) goto main::@10 +Rewriting conditional comparison [23] if((byte) main::i1#10>(byte) 5) goto main::@13 +Rewriting conditional comparison [32] if((byte) main::i1#10<=(byte) 5) goto main::@16 +Simplifying expression containing zero main::screen#1 in [19] *((byte*) main::screen#1 + (byte) 0) ← (byte~) main::$3 Successful SSA optimization PassNSimplifyExpressionWithZero Adding number conversion cast (unumber) 1 in if((byte*) main::sc#1!=(byte*)(const byte*) main::SCREEN+(word) $3e8+(number) 1) goto main::@1 Adding number conversion cast (unumber) 9+1 in if((byte) main::i1#10<(byte) 9+(number) 1) goto main::@10 diff --git a/src/test/ref/complex-conditional-problem.asm b/src/test/ref/complex-conditional-problem.asm index f2212d5dc..cd8cc6d12 100644 --- a/src/test/ref/complex-conditional-problem.asm +++ b/src/test/ref/complex-conditional-problem.asm @@ -6,7 +6,9 @@ .label SCREEN = $400 main: { __b1: + // key = *RASTER lda RASTER + // if (key > $20 || key < $40) cmp #$20+1 bcs b1 cmp #$40 @@ -14,6 +16,7 @@ main: { b1: lda #0 __b2: + // *SCREEN = key sta SCREEN jmp __b1 } diff --git a/src/test/ref/complex/ataritempest/ataritempest.asm b/src/test/ref/complex/ataritempest/ataritempest.asm index 4988a262d..7e840032c 100644 --- a/src/test/ref/complex/ataritempest/ataritempest.asm +++ b/src/test/ref/complex/ataritempest/ataritempest.asm @@ -12,14 +12,18 @@ init: .label BGCOL = $c01a .segment Code main: { + // (*BGCOL)++; inc BGCOL + // } rts } nmiHandler: { sta rega+1 stx regx+1 sty regy+1 + // (*BGCOL)++; inc BGCOL + // } rega: lda #00 regx: @@ -31,11 +35,14 @@ nmiHandler: { entryPoint: { ldx #0 __b1: + // SCREEN[i] = MESSAGE[i] lda MESSAGE,x sta SCREEN,x + // for( char i:0..49) inx cpx #$32 bne __b1 + // } rts } .segment RomData diff --git a/src/test/ref/complex/clearscreen/clearscreen.asm b/src/test/ref/complex/clearscreen/clearscreen.asm index a1208f9eb..cba76b7b9 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.asm +++ b/src/test/ref/complex/clearscreen/clearscreen.asm @@ -81,16 +81,19 @@ .label SCREEN_COPY = 7 .label SCREEN_DIST = 9 __b1: + // malloc(1000) lda #HEAP_TOP sta.z heap_head+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_COPY lda.z malloc.mem+1 sta.z SCREEN_COPY+1 jsr malloc + // malloc(1000) jsr main rts main: { @@ -98,11 +101,13 @@ main: { .label src = $1c .label i = 2 .label center_y = $b + // init_angle_screen(SCREEN_DIST) lda.z SCREEN_DIST sta.z init_angle_screen.screen lda.z SCREEN_DIST+1 sta.z init_angle_screen.screen+1 jsr init_angle_screen + // dst=SCREEN_COPY lda.z SCREEN_COPY sta.z dst lda.z SCREEN_COPY+1 @@ -113,6 +118,7 @@ main: { sta.z src+1 // Copy screen to screen copy __b1: + // for( byte* src=SCREEN, dst=SCREEN_COPY; src!=SCREEN+1000; src++, dst++) lda.z src+1 cmp #>SCREEN+$3e8 bne __b2 @@ -123,6 +129,7 @@ main: { sta.z i // Init processing array __b3: + // PROCESSING[i] = { 0, 0, 0, 0, 0, 0, 0, STATUS_FREE, 0} lda.z i asl clc @@ -140,34 +147,45 @@ main: { iny cpy #SIZEOF_STRUCT_PROCESSINGSPRITE bne !- + // for( byte i: 0..NUM_PROCESSING-1 ) inc.z i lda #NUM_PROCESSING-1+1 cmp.z i bne __b3 + // initSprites() jsr initSprites + // setupRasterIrq(RASTER_IRQ_TOP, &irqTop) jsr setupRasterIrq b1: // Main loop + // getCharToProcess() jsr getCharToProcess ldy.z getCharToProcess.return_x lda.z getCharToProcess.return_y + // center = getCharToProcess() sta.z center_y txa + // if(center.dist==NOT_FOUND) cmp #NOT_FOUND bne __b6 + // (*(SCREEN+999)) = '.' lda #'.' sta SCREEN+$3e7 __b8: + // (*(COLS+999))++; inc COLS+$3e7 jmp __b8 __b6: + // startProcessing(center) sty.z startProcessing.center_x jsr startProcessing jmp b1 __b2: + // *dst = *src ldy #0 lda (src),y sta (dst),y + // for( byte* src=SCREEN, dst=SCREEN_COPY; src!=SCREEN+1000; src++, dst++) inc.z src bne !+ inc.z src+1 @@ -215,6 +233,7 @@ startProcessing: { lda #0 sta.z i __b2: + // PROCESSING[i].status==STATUS_FREE lda.z i asl clc @@ -223,6 +242,7 @@ startProcessing: { clc adc.z i asl + // if(PROCESSING[i].status==STATUS_FREE) tay lda #STATUS_FREE cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y @@ -230,15 +250,18 @@ startProcessing: { jmp __b3 !__b3: __b4: + // while (freeIdx==0xff) lda #$ff cmp.z freeIdx bne !__b8+ jmp __b8 !__b8: + // (word)center.y lda.z center_y sta.z __0 lda #0 sta.z __0+1 + // (word)center.y*40 lda.z __0 asl sta.z __34 @@ -260,6 +283,7 @@ startProcessing: { rol.z __1+1 asl.z __1 rol.z __1+1 + // offset = (word)center.y*40+center.x lda.z center_x clc adc.z offset @@ -267,6 +291,7 @@ startProcessing: { bcc !+ inc.z offset+1 !: + // colPtr = COLS+offset lda.z offset clc adc #COLS sta.z colPtr+1 + // spriteCol = *colPtr ldy #0 lda (colPtr),y sta.z spriteCol + // screenPtr = SCREEN+offset clc lda.z screenPtr adc #SCREEN sta.z screenPtr+1 + // (word)spriteIdx lda.z freeIdx sta.z __5 tya sta.z __5+1 + // (word)spriteIdx*64 asl.z __6 rol.z __6+1 asl.z __6 @@ -300,6 +329,7 @@ startProcessing: { rol.z __6+1 asl.z __6 rol.z __6+1 + // spriteData = SPRITE_DATA+(word)spriteIdx*64 clc lda.z spriteData adc #SPRITE_DATA sta.z spriteData+1 + // ch = (*screenPtr) lda (screenPtr),y + // (word)ch sta.z __8 tya sta.z __8+1 + // (word)ch*8 asl.z __9 rol.z __9+1 asl.z __9 rol.z __9+1 asl.z __9 rol.z __9+1 + // chargenData = CHARGEN+(word)ch*8 clc lda.z chargenData adc #CHARGEN sta.z chargenData+1 + // asm sei + // *PROCPORT = PROCPORT_RAM_CHARROM lda #PROCPORT_RAM_CHARROM sta PROCPORT ldx #0 __b6: + // *spriteData = *chargenData ldy #0 lda (chargenData),y sta (spriteData),y + // spriteData += 3 lda #3 clc adc.z spriteData @@ -339,26 +377,33 @@ startProcessing: { bcc !+ inc.z spriteData+1 !: + // chargenData++; inc.z chargenData bne !+ inc.z chargenData+1 !: + // for( byte i: 0..7) inx cpx #8 bne __b6 + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // asm cli + // (word)center.x lda.z center_x sta.z __11 lda #0 sta.z __11+1 + // (word)center.x*8 asl.z __12 rol.z __12+1 asl.z __12 rol.z __12+1 asl.z __12 rol.z __12+1 + // BORDER_XPOS_LEFT + (word)center.x*8 lda #BORDER_XPOS_LEFT clc adc.z __13 @@ -366,6 +411,7 @@ startProcessing: { bcc !+ inc.z __13+1 !: + // spriteX = (BORDER_XPOS_LEFT + (word)center.x*8) << 4 asl.z spriteX rol.z spriteX+1 asl.z spriteX @@ -374,16 +420,19 @@ startProcessing: { rol.z spriteX+1 asl.z spriteX rol.z spriteX+1 + // (word)center.y lda.z center_y sta.z __15 lda #0 sta.z __15+1 + // (word)center.y*8 asl.z __16 rol.z __16+1 asl.z __16 rol.z __16+1 asl.z __16 rol.z __16+1 + // BORDER_YPOS_TOP + (word)center.y*8 lda #BORDER_YPOS_TOP clc adc.z __17 @@ -391,6 +440,7 @@ startProcessing: { bcc !+ inc.z __17+1 !: + // spriteY = (BORDER_YPOS_TOP + (word)center.y*8) << 4 asl.z spriteY rol.z spriteY+1 asl.z spriteY @@ -399,16 +449,20 @@ startProcessing: { rol.z spriteY+1 asl.z spriteY rol.z spriteY+1 + // spritePtr = (byte)(SPRITE_DATA/64)+spriteIdx lax.z freeIdx axs #-[SPRITE_DATA/$40] stx.z spritePtr + // spriteIdx*8 lda.z freeIdx asl asl asl + // (word)(spriteIdx*8) sta.z __21 lda #0 sta.z __21+1 + // PROCESSING[spriteIdx] = { spriteX, spriteY, (word)(spriteIdx*8), 60, spriteIdx, spritePtr, spriteCol, STATUS_NEW, screenPtr } lda.z freeIdx asl clc @@ -446,11 +500,13 @@ startProcessing: { sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x lda.z screenPtr+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x + // } rts __b8: ldx.z freeIdx jmp __b1 __b3: + // for( byte i: 0..NUM_PROCESSING-1 ) inc.z i lda #NUM_PROCESSING-1+1 cmp.z i @@ -476,10 +532,12 @@ getCharToProcess: { .label closest_y = $b .label __12 = $1a .label __13 = $18 + // screen_line = SCREEN_COPY lda.z SCREEN_COPY sta.z screen_line lda.z SCREEN_COPY+1 sta.z screen_line+1 + // dist_line = SCREEN_DIST lda.z SCREEN_DIST sta.z dist_line lda.z SCREEN_DIST+1 @@ -493,22 +551,27 @@ getCharToProcess: { __b1: ldy #0 __b2: + // if(screen_line[x]!=' ') lda #' ' cmp (screen_line),y bne !__b11+ jmp __b11 !__b11: + // dist = dist_line[x] lda (dist_line),y tax + // if(distirqRoutine sta HARDWARE_IRQ+1 + // asm cli + // } rts } // Initialize sprites @@ -617,6 +698,7 @@ initSprites: { sta.z sp+1 // Clear sprite data __b1: + // for( byte* sp = SPRITE_DATA; spSPRITE_DATA+NUM_PROCESSING*$40 bcc __b2 @@ -628,20 +710,28 @@ initSprites: { ldx #0 // Initialize sprite registers __b3: + // SPRITES_COLS[i] = LIGHT_BLUE lda #LIGHT_BLUE sta SPRITES_COLS,x + // for( byte i: 0..7) inx cpx #8 bne __b3 + // *SPRITES_MC = 0 lda #0 sta SPRITES_MC + // *SPRITES_EXPAND_X = 0 sta SPRITES_EXPAND_X + // *SPRITES_EXPAND_Y = 0 sta SPRITES_EXPAND_Y + // } rts __b2: + // *sp = 0 lda #0 tay sta (sp),y + // for( byte* sp = SPRITE_DATA; sp$28*$c sta.z screen_topline+1 + // screen_bottomline = screen+40*12 clc lda.z screen_bottomline adc #<$28*$c @@ -685,9 +777,11 @@ init_angle_screen: { lda #0 sta.z x __b2: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b3 + // screen_topline -= 40 lda.z screen_topline sec sbc #<$28 @@ -695,6 +789,7 @@ init_angle_screen: { lda.z screen_topline+1 sbc #>$28 sta.z screen_topline+1 + // screen_bottomline += 40 lda #$28 clc adc.z screen_bottomline @@ -702,25 +797,35 @@ init_angle_screen: { bcc !+ inc.z screen_bottomline+1 !: + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b3: + // x*2 lda.z x asl + // 39-x*2 eor #$ff clc adc #$27+1 + // (word){ 39-x*2, 0 } ldy #0 sta.z xw+1 sty.z xw + // y*2 lda.z y asl + // (word){ y*2, 0 } sta.z yw+1 sty.z yw + // atan2_16(xw, yw) jsr atan2_16 + // angle_w = atan2_16(xw, yw) + // angle_w+0x0080 lda #$80 clc adc.z __11 @@ -728,23 +833,32 @@ init_angle_screen: { bcc !+ inc.z __11+1 !: + // ang_w = >(angle_w+0x0080) lda.z __11+1 sta.z ang_w + // screen_bottomline[xb] = ang_w ldy.z xb sta (screen_bottomline),y + // -ang_w eor #$ff clc adc #1 + // screen_topline[xb] = -ang_w sta (screen_topline),y + // 0x80+ang_w lda #$80 clc adc.z ang_w + // screen_topline[x] = 0x80+ang_w ldy.z x sta (screen_topline),y + // 0x80-ang_w lda #$80 sec sbc.z ang_w + // screen_bottomline[x] = 0x80-ang_w sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b2 @@ -764,6 +878,7 @@ atan2_16: { .label return = $10 .label x = $1a .label y = $1c + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -776,6 +891,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -793,15 +909,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -810,8 +930,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -820,6 +942,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -833,21 +956,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -855,6 +984,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -862,6 +992,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -873,6 +1004,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -880,6 +1012,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -887,6 +1020,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -894,6 +1028,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -906,6 +1041,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -914,6 +1050,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -922,6 +1059,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -942,6 +1080,7 @@ atan2_16: { // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. malloc: { .label mem = 9 + // mem = heap_head-size lda.z heap_head sec sbc #<$3e8 @@ -949,10 +1088,12 @@ malloc: { lda.z heap_head+1 sbc #>$3e8 sta.z mem+1 + // heap_head = mem lda.z mem sta.z heap_head lda.z mem+1 sta.z heap_head+1 + // } rts } // Raster Interrupt at the bottom of the screen @@ -960,17 +1101,22 @@ irqBottom: { sta rega+1 stx regx+1 sty regy+1 + // processChars() jsr processChars + // *RASTER = RASTER_IRQ_TOP // Trigger IRQ at the top of the screen lda #RASTER_IRQ_TOP sta RASTER + // *HARDWARE_IRQ = &irqTop lda #irqTop sta HARDWARE_IRQ+1 + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 regx: @@ -993,6 +1139,7 @@ processChars: { sta.z numActive sta.z i __b1: + // PROCESSING+i lda.z i asl clc @@ -1001,12 +1148,14 @@ processChars: { clc adc.z i asl + // processing = PROCESSING+i clc adc #PROCESSING adc #0 sta.z processing+1 + // bitmask = 1<id ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID lda (processing),y tay @@ -1019,15 +1168,18 @@ processChars: { bne !- !e: sta.z bitmask + // if(processing->status!=STATUS_FREE) lda #STATUS_FREE ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS cmp (processing),y bne !__b2+ jmp __b2 !__b2: + // if(processing->status==STATUS_NEW) lda (processing),y cmp #STATUS_NEW bne __b3 + // *(processing->screenPtr) = ' ' // Clear the char on the screen ldx #' ' ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR @@ -1038,10 +1190,12 @@ processChars: { sta !+ +2 !: stx $ffff + // *SPRITES_ENABLE |= bitmask // Enable the sprite lda SPRITES_ENABLE ora.z bitmask sta SPRITES_ENABLE + // SPRITES_COLS[processing->id] = processing->col // Set the sprite color ldy #OFFSET_STRUCT_PROCESSINGSPRITE_COL lda (processing),y @@ -1051,6 +1205,7 @@ processChars: { tay pla sta SPRITES_COLS,y + // *(SCREEN+SPRITE_PTRS+processing->id) = processing->ptr // Set sprite pointer ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR lda (processing),y @@ -1060,11 +1215,13 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y + // processing->status = STATUS_PROCESSING // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y __b3: + // xpos = processing->x >> 4 ldy #0 lda (processing),y sta.z xpos @@ -1079,22 +1236,30 @@ processChars: { ror.z xpos lsr.z xpos+1 ror.z xpos + // >xpos lda.z xpos+1 + // if(>xpos) // Set sprite position cmp #0 beq !__b4+ jmp __b4 !__b4: + // 0xff ^ bitmask lda #$ff eor.z bitmask + // *SPRITES_XMSB &= 0xff ^ bitmask and SPRITES_XMSB sta SPRITES_XMSB __b5: + // i*2 lda.z i asl tax + // (byte)xpos lda.z xpos + // SPRITES_XPOS[i*2] = (byte)xpos sta SPRITES_XPOS,x + // processing->y>>4 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta.z __13 @@ -1109,9 +1274,12 @@ processChars: { ror.z __13 lsr.z __13+1 ror.z __13 + // ypos = (byte)(processing->y>>4) lda.z __13 sta.z ypos + // SPRITES_YPOS[i*2] = ypos sta SPRITES_YPOS,x + // if(processing->x < XPOS_LEFTMOST || processing->x > XPOS_RIGHTMOST || processing->y < YPOS_TOPMOST|| processing->y > YPOS_BOTTOMMOST ) // Move sprite ldy #1 lda (processing),y @@ -1169,15 +1337,19 @@ processChars: { cmp (processing),y bcc __b6 !: + // xpos/8 lsr.z __23+1 ror.z __23 lsr.z __23+1 ror.z __23 lsr.z __23+1 ror.z __23 + // (byte)(xpos/8) lda.z __23 + // xchar = (byte)(xpos/8) - BORDER_XPOS_LEFT/8 sec sbc #BORDER_XPOS_LEFT/8 + // processing->vx += VXSIN[xchar] asl ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX tax @@ -1189,6 +1361,7 @@ processChars: { lda (processing),y adc VXSIN+1,x sta (processing),y + // processing->x += processing->vx ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VX sty.z $ff clc @@ -1202,12 +1375,15 @@ processChars: { ldy #1 adc (processing),y sta (processing),y + // (byte)(ypos/8) lda.z ypos lsr lsr lsr + // ychar = (byte)(ypos/8) - BORDER_YPOS_TOP/8 sec sbc #BORDER_YPOS_TOP/8 + // processing->vy += VYSIN[ychar] asl ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY tax @@ -1219,6 +1395,7 @@ processChars: { lda (processing),y adc VYSIN+1,x sta (processing),y + // processing->y += processing->vy ldy #OFFSET_STRUCT_PROCESSINGSPRITE_VY clc lda (processing),y @@ -1231,27 +1408,34 @@ processChars: { adc (processing),y sta (processing),y __b7: + // numActive++; inc.z numActive __b2: + // for( byte i: 0..NUM_PROCESSING-1 ) inc.z i lda #NUM_PROCESSING-1+1 cmp.z i beq !__b1+ jmp __b1 !__b1: + // } rts __b6: + // processing->status = STATUS_FREE // Set status to FREE lda #STATUS_FREE ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y + // 0xff ^ bitmask lda #$ff eor.z bitmask + // *SPRITES_ENABLE &= 0xff ^ bitmask // Disable the sprite and SPRITES_ENABLE sta SPRITES_ENABLE jmp __b7 __b4: + // *SPRITES_XMSB |= bitmask lda SPRITES_XMSB ora.z bitmask sta SPRITES_XMSB @@ -1262,16 +1446,20 @@ irqTop: { sta rega+1 stx regx+1 sty regy+1 + // *RASTER = RASTER_IRQ_MIDDLE // Trigger IRQ at the middle of the screen lda #RASTER_IRQ_MIDDLE sta RASTER + // *HARDWARE_IRQ = &irqBottom lda #irqBottom sta HARDWARE_IRQ+1 + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 regx: diff --git a/src/test/ref/complex/clearscreen/clearscreen.log b/src/test/ref/complex/clearscreen/clearscreen.log index a3e1c09f6..7ff1eafc2 100644 --- a/src/test/ref/complex/clearscreen/clearscreen.log +++ b/src/test/ref/complex/clearscreen/clearscreen.log @@ -2718,49 +2718,49 @@ Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing:: Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [343] (byte~) processChars::$15 ← (byte) processChars::i#10 * (byte) 2 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) atan2_16::$0 [12] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [21] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [34] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [43] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [46] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [54] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [57] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [74] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [78] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$3 [113] if((byte*) main::src#2!=(const byte*) SCREEN+(word) $3e8) goto main::@2 -Simple Condition (bool~) main::$4 [125] if((byte) main::i#1!=rangelast(0,NUM_PROCESSING-1)) goto main::@7 -Simple Condition (bool~) main::$7 [147] if((byte) main::center_dist#0!=(const byte) NOT_FOUND) goto main::@10 -Simple Condition (bool~) getCharToProcess::$3 [171] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5 -Simple Condition (bool~) getCharToProcess::$6 [175] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 -Simple Condition (bool~) getCharToProcess::$5 [180] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 -Simple Condition (bool~) getCharToProcess::$7 [190] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 -Simple Condition (bool~) getCharToProcess::$1 [194] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND) goto getCharToProcess::@1 -Simple Condition (bool~) startProcessing::$23 [220] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 -Simple Condition (bool~) startProcessing::$24 [224] if((byte) startProcessing::i#1!=rangelast(0,NUM_PROCESSING-1)) goto startProcessing::@2 -Simple Condition (bool~) startProcessing::$25 [229] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 -Simple Condition (bool~) startProcessing::$26 [259] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 -Simple Condition (bool~) processChars::$4 [300] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 -Simple Condition (bool~) processChars::$30 [304] if((byte) processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 -Simple Condition (bool~) processChars::$6 [309] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 -Simple Condition (bool~) processChars::$61 [316] if((byte) 0!=(byte~) processChars::$9) goto processChars::@5 -Simple Condition (bool~) init_angle_screen::$2 [407] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [444] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 -Simple Condition (bool~) initSprites::$0 [449] if((byte*) initSprites::sp#2<(const byte*) SPRITE_DATA+(const byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2 -Simple Condition (bool~) initSprites::$1 [458] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 -Simple Condition (bool~) setupRasterIrq::$0 [469] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 -Simple Condition (bool~) irqTop::$1 [490] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 -Simple Condition (bool~) irqTop::$2 [497] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 -Simple Condition (bool~) irqBottom::$3 [510] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 +Simple Condition (bool~) atan2_16::$0 [8] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [12] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [19] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [23] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [26] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [31] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [34] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [48] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [51] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$3 [75] if((byte*) main::src#2!=(const byte*) SCREEN+(word) $3e8) goto main::@2 +Simple Condition (bool~) main::$4 [85] if((byte) main::i#1!=rangelast(0,NUM_PROCESSING-1)) goto main::@7 +Simple Condition (bool~) main::$7 [99] if((byte) main::center_dist#0!=(const byte) NOT_FOUND) goto main::@10 +Simple Condition (bool~) getCharToProcess::$3 [120] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5 +Simple Condition (bool~) getCharToProcess::$6 [124] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 +Simple Condition (bool~) getCharToProcess::$5 [127] if((byte) getCharToProcess::dist#0>=(byte) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 +Simple Condition (bool~) getCharToProcess::$7 [132] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 +Simple Condition (bool~) getCharToProcess::$1 [134] if((byte) getCharToProcess::return_dist#1==(const byte) NOT_FOUND) goto getCharToProcess::@1 +Simple Condition (bool~) startProcessing::$23 [150] if(*((byte*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE) goto startProcessing::@3 +Simple Condition (bool~) startProcessing::$24 [153] if((byte) startProcessing::i#1!=rangelast(0,NUM_PROCESSING-1)) goto startProcessing::@2 +Simple Condition (bool~) startProcessing::$25 [156] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 +Simple Condition (bool~) startProcessing::$26 [179] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 +Simple Condition (bool~) processChars::$4 [213] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 +Simple Condition (bool~) processChars::$30 [217] if((byte) processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 +Simple Condition (bool~) processChars::$6 [220] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 +Simple Condition (bool~) processChars::$61 [225] if((byte) 0!=(byte~) processChars::$9) goto processChars::@5 +Simple Condition (bool~) init_angle_screen::$2 [302] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [330] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) initSprites::$0 [335] if((byte*) initSprites::sp#2<(const byte*) SPRITE_DATA+(const byte) NUM_PROCESSING*(byte) $40) goto initSprites::@2 +Simple Condition (bool~) initSprites::$1 [343] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 +Simple Condition (bool~) setupRasterIrq::$0 [354] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +Simple Condition (bool~) irqTop::$1 [372] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 +Simple Condition (bool~) irqTop::$2 [379] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 +Simple Condition (bool~) irqBottom::$3 [392] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s [355] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21 -Rewriting || if()-condition to two if()s [352] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19 -Rewriting || if()-condition to two if()s [349] (bool~) processChars::$18 ← (bool~) processChars::$16 || (bool~) processChars::$17 -Rewriting ! if()-condition to reversed if() [390] (bool~) processChars::$0 ← ! (const bool) DEBUG -Rewriting ! if()-condition to reversed if() [481] (bool~) irqTop::$0 ← ! (const bool) DEBUG -Rewriting ! if()-condition to reversed if() [501] (bool~) irqBottom::$0 ← ! (const bool) DEBUG -Rewriting ! if()-condition to reversed if() [504] (bool~) irqBottom::$2 ← ! (const bool) DEBUG +Rewriting || if()-condition to two if()s [259] (bool~) processChars::$22 ← (bool~) processChars::$20 || (bool~) processChars::$21 +Rewriting || if()-condition to two if()s [256] (bool~) processChars::$20 ← (bool~) processChars::$18 || (bool~) processChars::$19 +Rewriting || if()-condition to two if()s [253] (bool~) processChars::$18 ← (bool~) processChars::$16 || (bool~) processChars::$17 +Rewriting ! if()-condition to reversed if() [288] (bool~) processChars::$0 ← ! (const bool) DEBUG +Rewriting ! if()-condition to reversed if() [363] (bool~) irqTop::$0 ← ! (const bool) DEBUG +Rewriting ! if()-condition to reversed if() [383] (bool~) irqBottom::$0 ← ! (const bool) DEBUG +Rewriting ! if()-condition to reversed if() [386] (bool~) irqBottom::$2 ← ! (const bool) DEBUG Successful SSA optimization Pass2ConditionalAndOrRewriting -Negating conditional jump and destination [74] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [48] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const word) atan2_16::angle#0 = 0 Constant (const byte) atan2_16::i#0 = 0 @@ -2789,79 +2789,79 @@ Constant (const byte) irqTop::i#0 = 0 Constant (const byte) irqTop::i1#0 = 0 Constant (const byte) irqBottom::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [154] if(true) goto main::@9 -if() condition always true - replacing block destination [157] if(true) goto main::@15 -if() condition always false - eliminating [391] if((const bool) DEBUG) goto processChars::@16 -if() condition always true - replacing block destination [469] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 -if() condition always false - eliminating [482] if((const bool) DEBUG) goto irqTop::@2 -if() condition always false - eliminating [502] if((const bool) DEBUG) goto irqBottom::@3 -if() condition always false - eliminating [505] if((const bool) DEBUG) goto irqBottom::@4 +if() condition always true - replacing block destination [104] if(true) goto main::@9 +if() condition always true - replacing block destination [107] if(true) goto main::@15 +if() condition always false - eliminating [289] if((const bool) DEBUG) goto processChars::@16 +if() condition always true - replacing block destination [354] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +if() condition always false - eliminating [364] if((const bool) DEBUG) goto irqTop::@2 +if() condition always false - eliminating [384] if((const bool) DEBUG) goto irqBottom::@3 +if() condition always false - eliminating [387] if((const bool) DEBUG) goto irqBottom::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [72] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [74] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [123] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [125] if(main::i#1!=rangelast(0,NUM_PROCESSING-1)) goto main::@7 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 -Resolved ranged next value [173] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++ -Resolved ranged comparison value [175] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28 -Resolved ranged next value [188] getCharToProcess::y#1 ← ++ getCharToProcess::y#7 to ++ -Resolved ranged comparison value [190] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19 -Resolved ranged next value [222] startProcessing::i#1 ← ++ startProcessing::i#2 to ++ -Resolved ranged comparison value [224] if(startProcessing::i#1!=rangelast(0,NUM_PROCESSING-1)) goto startProcessing::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 -Resolved ranged next value [257] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++ -Resolved ranged comparison value [259] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8 -Resolved ranged next value [302] processChars::i#1 ← ++ processChars::i#10 to ++ -Resolved ranged comparison value [304] if(processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 -Resolved ranged next value [442] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [444] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Resolved ranged next value [456] initSprites::i#1 ← ++ initSprites::i#2 to ++ -Resolved ranged comparison value [458] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 to (number) 8 -Resolved ranged next value [488] irqTop::i#1 ← ++ irqTop::i#2 to ++ -Resolved ranged comparison value [490] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5 -Resolved ranged next value [495] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ -Resolved ranged comparison value [497] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8 -Resolved ranged next value [508] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ -Resolved ranged comparison value [510] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5 -Rewriting conditional comparison [407] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Converting *(pointer+n) to pointer[n] [205] *((byte*~) getCharToProcess::$11) ← (byte) ' ' -- *(getCharToProcess::$10 + getCharToProcess::return_x#1) -Converting *(pointer+n) to pointer[n] [295] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*~) processChars::$35) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [300] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [309] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [312] (word) processChars::xpos#0 ← *((word*~) processChars::$38) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [319] *(*((byte**~) processChars::$39)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) -Converting *(pointer+n) to pointer[n] [323] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*~) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) -Converting *(pointer+n) to pointer[n] [323] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [325] (byte*~) processChars::$7 ← (const byte*) SCREEN+(const word) SPRITE_PTRS + *((byte*~) processChars::$42) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [327] *((byte*~) processChars::$7) ← *((byte*~) processChars::$43) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -Converting *(pointer+n) to pointer[n] [327] *((byte*~) processChars::$7) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(SCREEN+SPRITE_PTRS + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) -Converting *(pointer+n) to pointer[n] [329] *((byte*~) processChars::$44) ← (const byte) STATUS_PROCESSING -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [340] (word~) processChars::$13 ← *((word*~) processChars::$45) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [346] (bool~) processChars::$16 ← *((word*~) processChars::$46) < (const word) XPOS_LEFTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [348] (bool~) processChars::$17 ← *((word*~) processChars::$47) > (const word) XPOS_RIGHTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [351] (bool~) processChars::$19 ← *((word*~) processChars::$48) < (const word) YPOS_TOPMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [354] (bool~) processChars::$21 ← *((word*~) processChars::$49) > (const word) YPOS_BOTTOMMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [359] *((byte*~) processChars::$50) ← (const byte) STATUS_FREE -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [370] *((word*~) processChars::$52) ← *((word*~) processChars::$51) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [370] *((word*~) processChars::$52) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [374] *((word*~) processChars::$55) ← *((word*~) processChars::$53) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [374] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Converting *(pointer+n) to pointer[n] [374] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [382] *((word*~) processChars::$57) ← *((word*~) processChars::$56) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [382] *((word*~) processChars::$57) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [386] *((word*~) processChars::$60) ← *((word*~) processChars::$58) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [386] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) -Converting *(pointer+n) to pointer[n] [386] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Resolved ranged next value [46] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [48] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [83] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [85] if(main::i#1!=rangelast(0,NUM_PROCESSING-1)) goto main::@7 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 +Resolved ranged next value [122] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++ +Resolved ranged comparison value [124] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28 +Resolved ranged next value [130] getCharToProcess::y#1 ← ++ getCharToProcess::y#7 to ++ +Resolved ranged comparison value [132] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19 +Resolved ranged next value [151] startProcessing::i#1 ← ++ startProcessing::i#2 to ++ +Resolved ranged comparison value [153] if(startProcessing::i#1!=rangelast(0,NUM_PROCESSING-1)) goto startProcessing::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 +Resolved ranged next value [177] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++ +Resolved ranged comparison value [179] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8 +Resolved ranged next value [215] processChars::i#1 ← ++ processChars::i#10 to ++ +Resolved ranged comparison value [217] if(processChars::i#1!=rangelast(0,NUM_PROCESSING-1)) goto processChars::@2 to (const byte) NUM_PROCESSING-(byte) 1+(number) 1 +Resolved ranged next value [328] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [330] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [341] initSprites::i#1 ← ++ initSprites::i#2 to ++ +Resolved ranged comparison value [343] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@7 to (number) 8 +Resolved ranged next value [370] irqTop::i#1 ← ++ irqTop::i#2 to ++ +Resolved ranged comparison value [372] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@3 to (number) 5 +Resolved ranged next value [377] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ +Resolved ranged comparison value [379] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@5 to (number) 8 +Resolved ranged next value [390] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ +Resolved ranged comparison value [392] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@5 to (number) 5 +Rewriting conditional comparison [302] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Converting *(pointer+n) to pointer[n] [140] *((byte*~) getCharToProcess::$11) ← (byte) ' ' -- *(getCharToProcess::$10 + getCharToProcess::return_x#1) +Converting *(pointer+n) to pointer[n] [210] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*~) processChars::$35) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [213] if(*((byte*~) processChars::$36)==(const byte) STATUS_FREE) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [220] if(*((byte*~) processChars::$37)!=(const byte) STATUS_NEW) goto processChars::@4 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [222] (word) processChars::xpos#0 ← *((word*~) processChars::$38) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [227] *(*((byte**~) processChars::$39)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) +Converting *(pointer+n) to pointer[n] [231] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*~) processChars::$40) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_COL) +Converting *(pointer+n) to pointer[n] [231] *((const byte*) SPRITES_COLS + *((byte*~) processChars::$41)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_COL) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [233] (byte*~) processChars::$7 ← (const byte*) SCREEN+(const word) SPRITE_PTRS + *((byte*~) processChars::$42) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [235] *((byte*~) processChars::$7) ← *((byte*~) processChars::$43) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) +Converting *(pointer+n) to pointer[n] [235] *((byte*~) processChars::$7) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(SCREEN+SPRITE_PTRS + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) +Converting *(pointer+n) to pointer[n] [237] *((byte*~) processChars::$44) ← (const byte) STATUS_PROCESSING -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [245] (word~) processChars::$13 ← *((word*~) processChars::$45) >> (byte) 4 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [250] (bool~) processChars::$16 ← *((word*~) processChars::$46) < (const word) XPOS_LEFTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [252] (bool~) processChars::$17 ← *((word*~) processChars::$47) > (const word) XPOS_RIGHTMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [255] (bool~) processChars::$19 ← *((word*~) processChars::$48) < (const word) YPOS_TOPMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [258] (bool~) processChars::$21 ← *((word*~) processChars::$49) > (const word) YPOS_BOTTOMMOST -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [262] *((byte*~) processChars::$50) ← (const byte) STATUS_FREE -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [271] *((word*~) processChars::$52) ← *((word*~) processChars::$51) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [271] *((word*~) processChars::$52) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN + (byte~) processChars::$33) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [275] *((word*~) processChars::$55) ← *((word*~) processChars::$53) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [275] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*~) processChars::$54) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Converting *(pointer+n) to pointer[n] [275] *((word*~) processChars::$55) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [282] *((word*~) processChars::$57) ← *((word*~) processChars::$56) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [282] *((word*~) processChars::$57) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN + (byte~) processChars::$34) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [286] *((word*~) processChars::$60) ← *((word*~) processChars::$58) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [286] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*~) processChars::$59) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_VY) +Converting *(pointer+n) to pointer[n] [286] *((word*~) processChars::$60) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (word*)PROCESSING in [278] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 -Simplifying expression containing zero (word*)processChars::processing#0 in [311] (word*~) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [312] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4 -Simplifying expression containing zero (word*)processChars::processing#0 in [345] (word*~) processChars::$46 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [346] (bool~) processChars::$16 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (const word) XPOS_LEFTMOST -Simplifying expression containing zero (word*)processChars::processing#0 in [347] (word*~) processChars::$47 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [348] (bool~) processChars::$17 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (const word) XPOS_RIGHTMOST -Simplifying expression containing zero (word*)processChars::processing#0 in [371] (word*~) processChars::$53 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [373] (word*~) processChars::$55 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [374] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) -Simplifying expression containing zero (word*)processChars::processing#0 in [374] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Simplifying expression containing zero (word*)PROCESSING in [194] *((word*)(const struct ProcessingSprite*) PROCESSING+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0 +Simplifying expression containing zero (word*)processChars::processing#0 in [221] (word*~) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [222] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) >> (byte) 4 +Simplifying expression containing zero (word*)processChars::processing#0 in [249] (word*~) processChars::$46 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [250] (bool~) processChars::$16 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) < (const word) XPOS_LEFTMOST +Simplifying expression containing zero (word*)processChars::processing#0 in [251] (word*~) processChars::$47 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [252] (bool~) processChars::$17 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) > (const word) XPOS_RIGHTMOST +Simplifying expression containing zero (word*)processChars::processing#0 in [272] (word*~) processChars::$53 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [274] (word*~) processChars::$55 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [275] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) +Simplifying expression containing zero (word*)processChars::processing#0 in [275] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) startProcessing::center_dist#0 and assignment [76] (byte) startProcessing::center_dist#0 ← (byte) main::center_dist#0 Eliminating unused variable (struct ProcessingChar) getCharToProcess::return#0 and assignment [96] (struct ProcessingChar) getCharToProcess::return#0 ← struct-unwound {(byte) getCharToProcess::return_x#1, (byte) getCharToProcess::return_y#1, (byte) getCharToProcess::return_dist#1} @@ -2969,12 +2969,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) processChars::$15 = (byte~) processChars::$11 Alias (byte~) processChars::$27 = (byte~) processChars::$26 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) processChars::$16 [183] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST) goto processChars::@7 -Simple Condition (bool~) processChars::$21 [267] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST) goto processChars::@7 -Simple Condition (bool~) processChars::$19 [268] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST) goto processChars::@7 -Simple Condition (bool~) processChars::$17 [269] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST) goto processChars::@7 +Simple Condition (bool~) processChars::$16 [182] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST) goto processChars::@7 +Simple Condition (bool~) processChars::$21 [265] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST) goto processChars::@7 +Simple Condition (bool~) processChars::$19 [266] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST) goto processChars::@7 +Simple Condition (bool~) processChars::$17 [267] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST) goto processChars::@7 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [251] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0 +Constant right-side identified [249] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) setupRasterIrq::$1 = SCREEN @@ -21,6 +23,7 @@ main: { lda #>MEDUSA_SCREEN sta.z memcpy.source+1 jsr memcpy + // memcpy(COLS, MEDUSA_COLORS, 1000) lda #COLS @@ -31,6 +34,7 @@ main: { sta.z memcpy.source+1 jsr memcpy __b1: + // (*(SCREEN+999)) ^= 0x0e lda #$e eor SCREEN+$3e7 sta SCREEN+$3e7 @@ -45,6 +49,7 @@ memcpy: { .label src = 2 .label source = 2 .label destination = 4 + // src_end = (char*)source+num lda.z source clc adc #<$3e8 @@ -53,17 +58,21 @@ memcpy: { adc #>$3e8 sta.z src_end+1 __b1: + // while(src!=src_end) lda.z src+1 cmp.z src_end+1 bne __b2 lda.z src cmp.z src_end bne __b2 + // } rts __b2: + // *dst++ = *src++ ldy #0 lda (src),y sta (dst),y + // *dst++ = *src++; inc.z dst bne !+ inc.z dst+1 diff --git a/src/test/ref/complex/medusa/medusa.log b/src/test/ref/complex/medusa/medusa.log index 3eeb0d7d7..fc978c85c 100644 --- a/src/test/ref/complex/medusa/medusa.log +++ b/src/test/ref/complex/medusa/medusa.log @@ -196,10 +196,10 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) memcpy::src_end#1 (byte*) memcpy::src_end#0 Identical Phi Values (void*) memcpy::destination#3 (void*) memcpy::destination#2 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memcpy::$2 [8] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 +Simple Condition (bool~) memcpy::$2 [7] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [19] (void*) memcpy::destination#0 ← (void*)(const byte*) SCREEN -Constant right-side identified [30] (byte*~) main::$2 ← (const byte*) SCREEN + (word) $3e7 +Constant right-side identified [13] (void*) memcpy::destination#0 ← (void*)(const byte*) SCREEN +Constant right-side identified [24] (byte*~) main::$2 ← (const byte*) SCREEN + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const void*) memcpy::destination#0 = (void*)SCREEN Constant (const void*) memcpy::source#0 = (void*)MEDUSA_SCREEN @@ -209,7 +209,7 @@ Constant (const void*) memcpy::source#1 = (void*)MEDUSA_COLORS Constant (const word) memcpy::num#1 = $3e8 Constant (const byte*) main::$2 = SCREEN+$3e7 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [29] if(true) goto main::@2 +if() condition always true - replacing block destination [23] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs Eliminating unused variable (void*) memcpy::return#2 and assignment [13] (void*) memcpy::return#2 ← (void*) memcpy::destination#2 Eliminating unused variable (void*) memcpy::return#3 and assignment [15] (void*) memcpy::return#3 ← (void*) memcpy::destination#2 diff --git a/src/test/ref/complex/prebob/grid-bobs.asm b/src/test/ref/complex/prebob/grid-bobs.asm index b4efe263d..96c57cef0 100644 --- a/src/test/ref/complex/prebob/grid-bobs.asm +++ b/src/test/ref/complex/prebob/grid-bobs.asm @@ -60,15 +60,22 @@ main: { // Origin point .label origX = $15 .label rowOffsetY = $17 + // mulf_init() jsr mulf_init + // prepareBobs() jsr prepareBobs + // renderBobInit() jsr renderBobInit + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(BOB_SCREEN, BOB_CHARSET) lda #toD0181_return sta D018 + // memset(BOB_SCREEN, 0x00, 1000) jsr memset lda #<$100 sta.z rowOffsetY @@ -80,11 +87,14 @@ main: { sta.z origX+1 // Render Grid of BOBs __b2: + // while (*RASTER<$f8) lda RASTER cmp #$f8 bcc __b2 + // *BORDERCOL = 0xf lda #$f sta BORDERCOL + // renderBobCleanup() jsr renderBobCleanup lda.z origX sta.z x @@ -111,14 +121,17 @@ main: { sta.z y_1+1 ldx #0 __b5: + // *BORDERCOL = 1 //kickasm {{ .break }} lda #1 sta BORDERCOL + // renderBob(>x, >y) lda.z x_1+1 sta.z renderBob.xpos lda.z y_1+1 sta.z renderBob.ypos jsr renderBob + // x += rowOffsetX clc lda.z x_1 adc #rowOffsetX sta.z x_1+1 + // y += rowOffsetY lda.z y_1 clc adc.z rowOffsetY @@ -133,11 +147,14 @@ main: { lda.z y_1+1 adc.z rowOffsetY+1 sta.z y_1+1 + // *BORDERCOL = 2 lda #2 sta BORDERCOL + // for(char row: 0..4) inx cpx #5 bne __b5 + // rowX += colOffsetX clc lda.z rowX adc #colOffsetX sta.z rowX+1 + // rowY += colOffsetY clc lda.z rowY adc #colOffsetY sta.z rowY+1 + // for(char col: 0..4) inc.z col lda #5 cmp.z col bne __b4 + // origX += 0x0100 clc lda.z origX adc #<$100 @@ -163,6 +183,7 @@ main: { lda.z origX+1 adc #>$100 sta.z origX+1 + // rowOffsetY += 0x0080 clc lda.z rowOffsetY adc #<$80 @@ -170,23 +191,34 @@ main: { lda.z rowOffsetY+1 adc #>$80 sta.z rowOffsetY+1 + // *BORDERCOL = 0 lda #0 sta BORDERCOL + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // if(keyboard_key_pressed(KEY_SPACE)) cmp #0 bne __b8 jmp __b2 // Wait for space release __b8: + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // while(keyboard_key_pressed(KEY_SPACE)) cmp #0 bne __b8 + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank2_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(BASIC_SCREEN, BASIC_CHARSET) lda #toD0182_return sta D018 + // } rts } // Determines whether a specific key is currently pressed by accessing the matrix directly @@ -196,8 +228,11 @@ main: { keyboard_key_pressed: { .const colidx = KEY_SPACE&7 .label rowidx = KEY_SPACE>>3 + // keyboard_matrix_read(rowidx) jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask+colidx + // } rts } // Read a single row of the keyboard matrix @@ -206,10 +241,13 @@ keyboard_key_pressed: { // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Render a single BOB at a given x/y-position @@ -225,20 +263,24 @@ renderBob: { .label y_offset = $10 .label screen = $10 .label bob_table_idx = $12 + // x_char_offset = xpos/BOB_SHIFTS_X lda.z xpos lsr lsr sta.z x_char_offset + // y_char_offset = ypos/BOB_SHIFTS_Y lda.z ypos lsr lsr lsr + // y_offset = MUL40[y_char_offset] asl tay lda MUL40,y sta.z y_offset lda MUL40+1,y sta.z y_offset+1 + // BOB_SCREEN+y_offset clc lda.z __2 adc #BOB_SCREEN sta.z __2+1 + // screen = BOB_SCREEN+y_offset+x_char_offset lda.z x_char_offset clc adc.z screen @@ -253,22 +296,28 @@ renderBob: { bcc !+ inc.z screen+1 !: + // ypos&7 lda #7 and.z ypos + // (ypos&7)*BOB_SHIFTS_X asl asl sta.z __5 + // xpos&3 lda #3 and.z xpos + // bob_table_idx = (ypos&7)*BOB_SHIFTS_X+(xpos&3) clc adc.z bob_table_idx sta.z bob_table_idx + // *renderBobCleanupNext++ = screen ldy #0 lda.z screen sta (renderBobCleanupNext),y iny lda.z screen+1 sta (renderBobCleanupNext),y + // *renderBobCleanupNext++ = screen; lda #SIZEOF_POINTER clc adc.z renderBobCleanupNext @@ -276,42 +325,52 @@ renderBob: { bcc !+ inc.z renderBobCleanupNext+1 !: + // screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES,y ldy #0 sta (screen),y + // screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,y ldy #$28 sta (screen),y + // screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,y ldy #$50 sta (screen),y + // screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,y ldy #1 sta (screen),y + // screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,y ldy #$29 sta (screen),y + // screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,y ldy #$51 sta (screen),y + // screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,y ldy #2 sta (screen),y + // screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,y ldy #$2a sta (screen),y + // screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx] ldy.z bob_table_idx lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,y ldy #$52 sta (screen),y + // } rts } // Clean Up the rendered BOB's @@ -319,6 +378,7 @@ renderBobCleanup: { .label screen = $13 ldx #0 __b1: + // screen = RENDERBOB_CLEANUP[i] txa asl tay @@ -326,28 +386,39 @@ renderBobCleanup: { sta.z screen lda RENDERBOB_CLEANUP+1,y sta.z screen+1 + // screen[0] = 0 lda #0 tay sta (screen),y + // screen[40] = 0 ldy #$28 sta (screen),y + // screen[80] = 0 ldy #$50 sta (screen),y + // screen[1] = 0 ldy #1 sta (screen),y + // screen[41] = 0 ldy #$29 sta (screen),y + // screen[81] = 0 ldy #$51 sta (screen),y + // screen[2] = 0 ldy #2 sta (screen),y + // screen[42] = 0 ldy #$2a sta (screen),y + // screen[82] = 0 ldy #$52 sta (screen),y + // for(char i: 0..NUM_BOBS-1) inx cpx #NUM_BOBS-1+1 bne __b1 + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -362,17 +433,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #BOB_SCREEN sta RENDERBOB_CLEANUP+1,y + // for(char i: 0..NUM_BOBS-1) inx cpx #NUM_BOBS-1+1 bne __b2 + // } rts } // Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES @@ -446,7 +528,9 @@ prepareBobs: { .label cell = $12 .label bob_table_idx = $c .label shift_x = $d + // progress_init(BASIC_SCREEN) jsr progress_init + // charsetFindOrAddGlyph(PROTO_BOB+48, BOB_CHARSET) lda #PROTO_BOB+$30 @@ -464,21 +548,27 @@ prepareBobs: { lda #0 sta.z shift_y __b1: + // for(char shift_y=0;shift_y>1 lda PROTO_BOB,x lsr + // carry | PROTO_BOB[j]>>1 sty.z $ff ora.z $ff + // PROTO_BOB[j] = carry | PROTO_BOB[j]>>1 // Shift value and add old carry sta PROTO_BOB,x + // if(j>=48) // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) cpx #$30 bcs __b5 + // j+=24 txa axs #-[$18] __b6: + // for(char i=0;i<3*3*8;i++) inc.z i ldy.z carry jmp __b1 __b5: + // j-=47 txa axs #$2f jmp __b6 @@ -658,25 +788,35 @@ protoBobShiftRight: { protoBobShiftDown: { ldx #$17 __b1: + // for(char i=23;i>0;i--) cpx #0 bne __b2 + // PROTO_BOB[0] = 0 lda #0 sta PROTO_BOB + // PROTO_BOB[24] = 0 sta PROTO_BOB+$18 + // PROTO_BOB[48] = 0 sta PROTO_BOB+$30 + // } rts __b2: + // PROTO_BOB[i] = (PROTO_BOB+23)[i] lda PROTO_BOB+$17,x sta PROTO_BOB,x + // (PROTO_BOB+24)[i] = (PROTO_BOB+47)[i] lda PROTO_BOB+$2f,x sta PROTO_BOB+$18,x + // (PROTO_BOB+48)[i] = 0x00 lda #0 sta PROTO_BOB+$30,x + // for(char i=23;i>0;i--) dex jmp __b1 } // Initialize the PETSCII progress bar progress_init: { + // } rts } // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) @@ -707,6 +847,7 @@ mulf_init: { lda #>mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -725,63 +866,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -789,6 +951,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 diff --git a/src/test/ref/complex/prebob/grid-bobs.log b/src/test/ref/complex/prebob/grid-bobs.log index b69b247f4..c4ab483ff 100644 --- a/src/test/ref/complex/prebob/grid-bobs.log +++ b/src/test/ref/complex/prebob/grid-bobs.log @@ -3000,35 +3000,35 @@ Identical Phi Values (byte*) progress_cursor#1 (byte*) progress_cursor#50 Identical Phi Values (byte) progress_idx#1 (byte) progress_idx#50 Identical Phi Values (byte) bob_charset_next_id#1 (byte) bob_charset_next_id#58 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) mulf_init::$0 [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [56] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [75] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [84] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) main::$8 [148] if(*((const byte*) RASTER)<(byte) $f8) goto main::@4 -Simple Condition (bool~) main::$13 [175] if((byte) main::row#1!=rangelast(0,4)) goto main::@7 -Simple Condition (bool~) main::$14 [181] if((byte) main::col#1!=rangelast(0,4)) goto main::@6 -Simple Condition (bool~) main::$16 [193] if((byte) 0==(byte~) main::$15) goto main::@1 -Simple Condition (bool~) main::$18 [201] if((byte) 0!=(byte~) main::$17) goto main::@17 -Simple Condition (bool~) renderBobInit::$2 [252] if((byte) renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 -Simple Condition (bool~) renderBobInit::$3 [259] if((byte) renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 -Simple Condition (bool~) renderBobCleanup::$0 [305] if((byte) renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 -Simple Condition (bool~) prepareBobs::$2 [327] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 -Simple Condition (bool~) prepareBobs::$3 [332] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@5 -Simple Condition (bool~) prepareBobs::$5 [344] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@8 -Simple Condition (bool~) protoBobShiftRight::$0 [378] if((byte) protoBobShiftRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto protoBobShiftRight::@2 -Simple Condition (bool~) protoBobShiftRight::$8 [382] if((byte) 0!=(byte~) protoBobShiftRight::$1) goto protoBobShiftRight::@4 -Simple Condition (bool~) protoBobShiftRight::$7 [394] if((byte) protoBobShiftRight::j#3>=(byte) $30) goto protoBobShiftRight::@7 -Simple Condition (bool~) protoBobShiftDown::$0 [405] if((byte) protoBobShiftDown::i#2>(byte) 0) goto protoBobShiftDown::@2 -Simple Condition (bool~) charsetFindOrAddGlyph::$0 [422] if((byte) charsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto charsetFindOrAddGlyph::@2 -Simple Condition (bool~) charsetFindOrAddGlyph::$1 [430] if((byte) charsetFindOrAddGlyph::i#2<(byte) 8) goto charsetFindOrAddGlyph::@5 -Simple Condition (bool~) charsetFindOrAddGlyph::$3 [434] if(*((byte*) charsetFindOrAddGlyph::glyph_cursor#11 + (byte) charsetFindOrAddGlyph::i#2)==*((byte*) charsetFindOrAddGlyph::glyph#10 + (byte) charsetFindOrAddGlyph::i#2)) goto charsetFindOrAddGlyph::@7 -Simple Condition (bool~) charsetFindOrAddGlyph::$4 [442] if((byte) 0==(byte) charsetFindOrAddGlyph::found#2) goto charsetFindOrAddGlyph::@16 -Simple Condition (bool~) charsetFindOrAddGlyph::$5 [454] if((byte) charsetFindOrAddGlyph::i1#2<(byte) 8) goto charsetFindOrAddGlyph::@21 -Simple Condition (bool~) progress_inc::$1 [475] if((byte) progress_idx#8!=(byte) 8) goto progress_inc::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) mulf_init::$0 [33] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [37] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [54] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [60] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) main::$8 [102] if(*((const byte*) RASTER)<(byte) $f8) goto main::@4 +Simple Condition (bool~) main::$13 [121] if((byte) main::row#1!=rangelast(0,4)) goto main::@7 +Simple Condition (bool~) main::$14 [126] if((byte) main::col#1!=rangelast(0,4)) goto main::@6 +Simple Condition (bool~) main::$16 [135] if((byte) 0==(byte~) main::$15) goto main::@1 +Simple Condition (bool~) main::$18 [142] if((byte) 0!=(byte~) main::$17) goto main::@17 +Simple Condition (bool~) renderBobInit::$2 [172] if((byte) renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 +Simple Condition (bool~) renderBobInit::$3 [179] if((byte) renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 +Simple Condition (bool~) renderBobCleanup::$0 [219] if((byte) renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 +Simple Condition (bool~) prepareBobs::$2 [236] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 +Simple Condition (bool~) prepareBobs::$3 [240] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@5 +Simple Condition (bool~) prepareBobs::$5 [248] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@8 +Simple Condition (bool~) protoBobShiftRight::$0 [271] if((byte) protoBobShiftRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto protoBobShiftRight::@2 +Simple Condition (bool~) protoBobShiftRight::$8 [274] if((byte) 0!=(byte~) protoBobShiftRight::$1) goto protoBobShiftRight::@4 +Simple Condition (bool~) protoBobShiftRight::$7 [282] if((byte) protoBobShiftRight::j#3>=(byte) $30) goto protoBobShiftRight::@7 +Simple Condition (bool~) protoBobShiftDown::$0 [291] if((byte) protoBobShiftDown::i#2>(byte) 0) goto protoBobShiftDown::@2 +Simple Condition (bool~) charsetFindOrAddGlyph::$0 [305] if((byte) charsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto charsetFindOrAddGlyph::@2 +Simple Condition (bool~) charsetFindOrAddGlyph::$1 [311] if((byte) charsetFindOrAddGlyph::i#2<(byte) 8) goto charsetFindOrAddGlyph::@5 +Simple Condition (bool~) charsetFindOrAddGlyph::$3 [313] if(*((byte*) charsetFindOrAddGlyph::glyph_cursor#11 + (byte) charsetFindOrAddGlyph::i#2)==*((byte*) charsetFindOrAddGlyph::glyph#10 + (byte) charsetFindOrAddGlyph::i#2)) goto charsetFindOrAddGlyph::@7 +Simple Condition (bool~) charsetFindOrAddGlyph::$4 [318] if((byte) 0==(byte) charsetFindOrAddGlyph::found#2) goto charsetFindOrAddGlyph::@16 +Simple Condition (bool~) charsetFindOrAddGlyph::$5 [325] if((byte) charsetFindOrAddGlyph::i1#2<(byte) 8) goto charsetFindOrAddGlyph::@21 +Simple Condition (bool~) progress_inc::$1 [338] if((byte) progress_idx#8!=(byte) 8) goto progress_inc::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [193] if((byte) 0!=(byte~) main::$15) goto main::@17 +Negating conditional jump and destination [135] if((byte) 0!=(byte~) main::$15) goto main::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const word) mulf_init::sqr#0 = 0 Constant (const byte) mulf_init::x_2#0 = 0 @@ -3099,26 +3099,26 @@ Constant (const word) main::toD0182_$0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0 Constant (const byte*) progress_cursor#16 = progress_init::line#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Removing PHI-reference to removed block (main::@1) in block main::@17 -if() condition always true - replacing block destination [145] if(true) goto main::@4 +if() condition always true - replacing block destination [99] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [173] main::row#1 ← ++ main::row#2 to ++ -Resolved ranged comparison value [175] if(main::row#1!=rangelast(0,4)) goto main::@7 to (number) 5 -Resolved ranged next value [179] main::col#1 ← ++ main::col#5 to ++ -Resolved ranged comparison value [181] if(main::col#1!=rangelast(0,4)) goto main::@6 to (number) 5 -Resolved ranged next value [250] renderBobInit::y#1 ← ++ renderBobInit::y#2 to ++ -Resolved ranged comparison value [252] if(renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 to (number) $20 -Resolved ranged next value [257] renderBobInit::i#1 ← ++ renderBobInit::i#2 to ++ -Resolved ranged comparison value [259] if(renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 to (const byte) NUM_BOBS-(byte) 1+(number) 1 -Resolved ranged next value [303] renderBobCleanup::i#1 ← ++ renderBobCleanup::i#2 to ++ -Resolved ranged comparison value [305] if(renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 to (const byte) NUM_BOBS-(byte) 1+(number) 1 -Simplifying constant evaluating to zero (byte) 0*(const byte) BOB_SUBTABLE_SIZE in [278] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Resolved ranged next value [119] main::row#1 ← ++ main::row#2 to ++ +Resolved ranged comparison value [121] if(main::row#1!=rangelast(0,4)) goto main::@7 to (number) 5 +Resolved ranged next value [124] main::col#1 ← ++ main::col#5 to ++ +Resolved ranged comparison value [126] if(main::col#1!=rangelast(0,4)) goto main::@6 to (number) 5 +Resolved ranged next value [170] renderBobInit::y#1 ← ++ renderBobInit::y#2 to ++ +Resolved ranged comparison value [172] if(renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 to (number) $20 +Resolved ranged next value [177] renderBobInit::i#1 ← ++ renderBobInit::i#2 to ++ +Resolved ranged comparison value [179] if(renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 to (const byte) NUM_BOBS-(byte) 1+(number) 1 +Resolved ranged next value [217] renderBobCleanup::i#1 ← ++ renderBobCleanup::i#2 to ++ +Resolved ranged comparison value [219] if(renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 to (const byte) NUM_BOBS-(byte) 1+(number) 1 +Simplifying constant evaluating to zero (byte) 0*(const byte) BOB_SUBTABLE_SIZE in [194] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero BOB_TABLES in [278] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0 + (byte) renderBob::bob_table_idx#0) -Simplifying expression containing zero renderBob::screen#0 in [278] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) -Simplifying expression containing zero renderBobCleanup::screen#0 in [294] *((byte*) renderBobCleanup::screen#0 + (byte) 0) ← (byte) 0 -Simplifying expression containing zero PROTO_BOB in [411] *((const byte*) PROTO_BOB + (byte) 0) ← (byte) 0 +Simplifying expression containing zero BOB_TABLES in [194] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0 + (byte) renderBob::bob_table_idx#0) +Simplifying expression containing zero renderBob::screen#0 in [194] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) +Simplifying expression containing zero renderBobCleanup::screen#0 in [208] *((byte*) renderBobCleanup::screen#0 + (byte) 0) ← (byte) 0 +Simplifying expression containing zero PROTO_BOB in [296] *((const byte*) PROTO_BOB + (byte) 0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable - keeping the phi block (byte**) renderBobCleanupNext#24 Eliminating unused variable - keeping the phi block (byte**) renderBobCleanupNext#11 @@ -3156,9 +3156,9 @@ Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memse Constant right-side identified [49] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 Constant right-side identified [53] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff Constant right-side identified [56] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 -Constant right-side identified [94] (byte~) main::vicSelectGfxBank2_toDd001_$1 ← > (const word) main::vicSelectGfxBank2_toDd001_$0 -Constant right-side identified [98] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff -Constant right-side identified [101] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 +Constant right-side identified [93] (byte~) main::vicSelectGfxBank2_toDd001_$1 ← > (const word) main::vicSelectGfxBank2_toDd001_$0 +Constant right-side identified [97] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff +Constant right-side identified [100] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Constant (const byte) main::vicSelectGfxBank1_toDd001_$1 = >main::vicSelectGfxBank1_toDd001_$0 diff --git a/src/test/ref/complex/prebob/vogel-bobs.asm b/src/test/ref/complex/prebob/vogel-bobs.asm index e7670a499..af6965d7e 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.asm +++ b/src/test/ref/complex/prebob/vogel-bobs.asm @@ -56,24 +56,34 @@ main: { .label i = 5 // Render Rotated BOBs .label angle = 2 + // mulf_init() jsr mulf_init + // prepareBobs() jsr prepareBobs + // renderBobInit() jsr renderBobInit + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(BOB_SCREEN, BOB_CHARSET) lda #toD0181_return sta D018 + // memset(BOB_SCREEN, 0x00, 1000) jsr memset lda #0 sta.z angle __b2: + // while (*RASTER<$f8) lda RASTER cmp #$f8 bcc __b2 + // *BORDERCOL = 0xf lda #$f sta BORDERCOL + // renderBobCleanup() jsr renderBobCleanup lda.z angle sta.z a @@ -86,13 +96,17 @@ main: { lda #$1e sta.z r __b4: + // *BORDERCOL = 1 //kickasm {{ .break }} lda #1 sta BORDERCOL + // mulf8s(r, COS[a]) lda.z r ldy.z a ldx COS,y jsr mulf8s + // mulf8s(r, COS[a]) + // x = mulf8s(r, COS[a]) + 75*0x100 lda.z __10 clc adc #<$4b*$100 @@ -100,12 +114,16 @@ main: { lda.z __10+1 adc #>$4b*$100 sta.z x+1 + // mulf8s(r, SIN[a]) lda.z r ldy.z a ldx SIN,y jsr mulf8s + // mulf8s(r, SIN[a]) + // mulf8s(r, SIN[a])*2 asl.z __13 rol.z __13+1 + // y = mulf8s(r, SIN[a])*2 + 90*0x100 clc lda.z y adc #<$5a*$100 @@ -113,43 +131,60 @@ main: { lda.z y+1 adc #>$5a*$100 sta.z y+1 + // *BORDERCOL = 2 lda #2 sta BORDERCOL + // a += 98 lax.z a axs #-[$62] stx.z a + // r += 3 lax.z r axs #-[3] stx.z r + // renderBob(>x, >y) lda.z x+1 sta.z renderBob.xpos lda.z y+1 tax jsr renderBob + // for(char i: 0..NUM_BOBS-1) inc.z i lda #NUM_BOBS-1+1 cmp.z i bne __b4 + // angle += 3 lax.z angle axs #-[3] stx.z angle + // *BORDERCOL = 0 lda #0 sta BORDERCOL + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // if(keyboard_key_pressed(KEY_SPACE)) cmp #0 bne __b6 jmp __b2 // Wait for space release __b6: + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // while(keyboard_key_pressed(KEY_SPACE)) cmp #0 bne __b6 + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank2_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(SCREEN_BASIC, CHARSET_BASIC) lda #toD0182_return sta D018 + // } rts } // Determines whether a specific key is currently pressed by accessing the matrix directly @@ -159,8 +194,11 @@ main: { keyboard_key_pressed: { .const colidx = KEY_SPACE&7 .label rowidx = KEY_SPACE>>3 + // keyboard_matrix_read(rowidx) jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask+colidx + // } rts } // Read a single row of the keyboard matrix @@ -169,10 +207,13 @@ keyboard_key_pressed: { // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Render a single BOB at a given x/y-position @@ -186,20 +227,24 @@ renderBob: { .label x_char_offset = $a .label y_offset = $b .label screen = $b + // x_char_offset = xpos/BOB_SHIFTS_X lda.z xpos lsr lsr sta.z x_char_offset + // y_char_offset = ypos/BOB_SHIFTS_Y txa lsr lsr lsr + // y_offset = MUL40[y_char_offset] asl tay lda MUL40,y sta.z y_offset lda MUL40+1,y sta.z y_offset+1 + // BOB_SCREEN+y_offset clc lda.z __2 adc #BOB_SCREEN sta.z __2+1 + // screen = BOB_SCREEN+y_offset+x_char_offset lda.z x_char_offset clc adc.z screen @@ -214,22 +260,28 @@ renderBob: { bcc !+ inc.z screen+1 !: + // ypos&7 txa and #7 + // (ypos&7)*BOB_SHIFTS_X asl asl sta.z __5 + // xpos&3 lda #3 and.z xpos + // bob_table_idx = (ypos&7)*BOB_SHIFTS_X+(xpos&3) clc adc.z __5 tax + // *renderBobCleanupNext++ = screen ldy #0 lda.z screen sta (renderBobCleanupNext),y iny lda.z screen+1 sta (renderBobCleanupNext),y + // *renderBobCleanupNext++ = screen; lda #SIZEOF_POINTER clc adc.z renderBobCleanupNext @@ -237,42 +289,55 @@ renderBob: { bcc !+ inc.z renderBobCleanupNext+1 !: + // screen[0] = (BOB_TABLES+0*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES,x ldy #0 sta (screen),y + // screen[40] = (BOB_TABLES+1*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+1*BOB_SUBTABLE_SIZE,x ldy #$28 sta (screen),y + // screen[80] = (BOB_TABLES+2*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+2*BOB_SUBTABLE_SIZE,x ldy #$50 sta (screen),y + // screen[1] = (BOB_TABLES+3*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+3*BOB_SUBTABLE_SIZE,x ldy #1 sta (screen),y + // screen[41] = (BOB_TABLES+4*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+4*BOB_SUBTABLE_SIZE,x ldy #$29 sta (screen),y + // screen[81] = (BOB_TABLES+5*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+5*BOB_SUBTABLE_SIZE,x ldy #$51 sta (screen),y + // screen[2] = (BOB_TABLES+6*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+6*BOB_SUBTABLE_SIZE,x ldy #2 sta (screen),y + // screen[42] = (BOB_TABLES+7*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+7*BOB_SUBTABLE_SIZE,x ldy #$2a sta (screen),y + // screen[82] = (BOB_TABLES+8*BOB_SUBTABLE_SIZE)[bob_table_idx] lda BOB_TABLES+8*BOB_SUBTABLE_SIZE,x ldy #$52 sta (screen),y + // } rts } // Fast multiply two signed bytes to a word result // mulf8s(signed byte register(A) a, signed byte register(X) b) mulf8s: { .label return = $b + // mulf8u_prepare((byte)a) jsr mulf8u_prepare + // mulf8s_prepared(b) stx.z mulf8s_prepared.b jsr mulf8s_prepared + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -282,24 +347,33 @@ mulf8s_prepared: { .label memA = $fd .label m = $b .label b = $e + // mulf8u_prepared((byte) b) lda.z b jsr mulf8u_prepared + // m = mulf8u_prepared((byte) b) + // if(*memA<0) lda memA cmp #0 bpl __b1 + // >m lda.z m+1 + // >m = (>m)-(byte)b sec sbc.z b sta.z m+1 __b1: + // if(b<0) lda.z b cmp #0 bpl __b2 + // >m lda.z m+1 + // >m = (>m)-(byte)*memA sec sbc memA sta.z m+1 __b2: + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -309,7 +383,9 @@ mulf8u_prepared: { .label resL = $fe .label memB = $ff .label return = $b + // *memB = b sta memB + // asm tax sec sm1: @@ -322,22 +398,27 @@ mulf8u_prepared: { sm4: sbc mulf_sqr2_hi,x sta memB + // return { *memB, *resL }; lda resL sta.z return lda memB sta.z return+1 + // } rts } // Prepare for fast multiply with an unsigned byte to a word result // mulf8u_prepare(byte register(A) a) mulf8u_prepare: { .label memA = $fd + // *memA = a sta memA + // asm sta mulf8u_prepared.sm1+1 sta mulf8u_prepared.sm3+1 eor #$ff sta mulf8u_prepared.sm2+1 sta mulf8u_prepared.sm4+1 + // } rts } // Clean Up the rendered BOB's @@ -345,6 +426,7 @@ renderBobCleanup: { .label screen = $f ldx #0 __b1: + // screen = RENDERBOB_CLEANUP[i] txa asl tay @@ -352,28 +434,39 @@ renderBobCleanup: { sta.z screen lda RENDERBOB_CLEANUP+1,y sta.z screen+1 + // screen[0] = 0 lda #0 tay sta (screen),y + // screen[40] = 0 ldy #$28 sta (screen),y + // screen[80] = 0 ldy #$50 sta (screen),y + // screen[1] = 0 ldy #1 sta (screen),y + // screen[41] = 0 ldy #$29 sta (screen),y + // screen[81] = 0 ldy #$51 sta (screen),y + // screen[2] = 0 ldy #2 sta (screen),y + // screen[42] = 0 ldy #$2a sta (screen),y + // screen[82] = 0 ldy #$52 sta (screen),y + // for(char i: 0..NUM_BOBS-1) inx cpx #NUM_BOBS-1+1 bne __b1 + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -388,17 +481,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #BOB_SCREEN sta RENDERBOB_CLEANUP+1,y + // for(char i: 0..NUM_BOBS-1) inx cpx #NUM_BOBS-1+1 bne __b2 + // } rts } // Creates the pre-shifted bobs into BOB_CHARSET and populates the BOB_TABLES @@ -472,7 +576,9 @@ prepareBobs: { .label cell = $a .label bob_table_idx = 4 .label shift_x = 5 + // progress_init(SCREEN_BASIC) jsr progress_init + // bobCharsetFindOrAddGlyph(PROTO_BOB+48) lda #PROTO_BOB+$30 @@ -490,21 +596,27 @@ prepareBobs: { lda #0 sta.z shift_y __b1: + // for(char shift_y=0;shift_y>1 lda PROTO_BOB,x lsr + // carry | PROTO_BOB[j]>>1 sty.z $ff ora.z $ff + // PROTO_BOB[j] = carry | PROTO_BOB[j]>>1 // Shift value and add old carry sta PROTO_BOB,x + // if(j>=48) // Increment j to iterate over the PROTO_BOB left-to-right, top-to-bottom (0, 24, 48, 1, 25, 49, ...) cpx #$30 bcs __b5 + // j+=24 txa axs #-[$18] __b6: + // for(char i=0;i<3*3*8;i++) inc.z i ldy.z carry jmp __b1 __b5: + // j-=47 txa axs #$2f jmp __b6 @@ -685,25 +837,35 @@ shiftProtoBobRight: { shiftProtoBobDown: { ldx #$17 __b1: + // for(char i=23;i>0;i--) cpx #0 bne __b2 + // PROTO_BOB[0] = 0 lda #0 sta PROTO_BOB + // PROTO_BOB[24] = 0 sta PROTO_BOB+$18 + // PROTO_BOB[48] = 0 sta PROTO_BOB+$30 + // } rts __b2: + // PROTO_BOB[i] = (PROTO_BOB+23)[i] lda PROTO_BOB+$17,x sta PROTO_BOB,x + // (PROTO_BOB+24)[i] = (PROTO_BOB+47)[i] lda PROTO_BOB+$2f,x sta PROTO_BOB+$18,x + // (PROTO_BOB+48)[i] = 0x00 lda #0 sta PROTO_BOB+$30,x + // for(char i=23;i>0;i--) dex jmp __b1 } // Initialize the PETSCII progress bar progress_init: { + // } rts } // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) @@ -734,6 +896,7 @@ mulf_init: { lda #>mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -752,63 +915,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -816,6 +1000,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 diff --git a/src/test/ref/complex/prebob/vogel-bobs.log b/src/test/ref/complex/prebob/vogel-bobs.log index 833c1bd6b..7f68cba4f 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.log +++ b/src/test/ref/complex/prebob/vogel-bobs.log @@ -3212,36 +3212,36 @@ Identical Phi Values (byte) bob_charset_next_id#15 (byte) bob_charset_next_id#23 Identical Phi Values (byte*) bobCharsetFindOrAddGlyph::bob_glyph#6 (byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 Identical Phi Values (byte) bobCharsetFindOrAddGlyph::return#3 (byte) bobCharsetFindOrAddGlyph::glyph_id#11 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) mulf_init::$0 [50] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [56] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [75] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [84] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf8s_prepared::$3 [114] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$5 [118] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) main::$8 [209] if(*((const byte*) RASTER)<(byte) $f8) goto main::@4 -Simple Condition (bool~) main::$18 [249] if((byte) main::i#1!=rangelast(0,NUM_BOBS-1)) goto main::@6 -Simple Condition (bool~) main::$20 [260] if((byte) 0==(byte~) main::$19) goto main::@1 -Simple Condition (bool~) main::$22 [268] if((byte) 0!=(byte~) main::$21) goto main::@15 -Simple Condition (bool~) renderBobInit::$2 [319] if((byte) renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 -Simple Condition (bool~) renderBobInit::$3 [326] if((byte) renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 -Simple Condition (bool~) renderBobCleanup::$0 [372] if((byte) renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 -Simple Condition (bool~) prepareBobs::$2 [393] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 -Simple Condition (bool~) prepareBobs::$3 [398] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@5 -Simple Condition (bool~) prepareBobs::$5 [410] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@8 -Simple Condition (bool~) shiftProtoBobRight::$0 [443] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 -Simple Condition (bool~) shiftProtoBobRight::$8 [447] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@4 -Simple Condition (bool~) shiftProtoBobRight::$7 [459] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@7 -Simple Condition (bool~) shiftProtoBobDown::$0 [470] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 -Simple Condition (bool~) bobCharsetFindOrAddGlyph::$0 [487] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 -Simple Condition (bool~) bobCharsetFindOrAddGlyph::$1 [495] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@5 -Simple Condition (bool~) bobCharsetFindOrAddGlyph::$3 [499] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@7 -Simple Condition (bool~) bobCharsetFindOrAddGlyph::$4 [507] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@16 -Simple Condition (bool~) bobCharsetFindOrAddGlyph::$5 [519] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@21 -Simple Condition (bool~) progress_inc::$1 [540] if((byte) progress_idx#8!=(byte) 8) goto progress_inc::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) mulf_init::$0 [33] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [37] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [54] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [60] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf8s_prepared::$3 [82] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$5 [85] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) main::$8 [139] if(*((const byte*) RASTER)<(byte) $f8) goto main::@4 +Simple Condition (bool~) main::$18 [169] if((byte) main::i#1!=rangelast(0,NUM_BOBS-1)) goto main::@6 +Simple Condition (bool~) main::$20 [177] if((byte) 0==(byte~) main::$19) goto main::@1 +Simple Condition (bool~) main::$22 [184] if((byte) 0!=(byte~) main::$21) goto main::@15 +Simple Condition (bool~) renderBobInit::$2 [214] if((byte) renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 +Simple Condition (bool~) renderBobInit::$3 [221] if((byte) renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 +Simple Condition (bool~) renderBobCleanup::$0 [261] if((byte) renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 +Simple Condition (bool~) prepareBobs::$2 [277] if((byte) prepareBobs::shift_y#2<(const byte) BOB_SHIFTS_Y) goto prepareBobs::@2 +Simple Condition (bool~) prepareBobs::$3 [281] if((byte) prepareBobs::shift_x#2<(const byte) BOB_SHIFTS_X) goto prepareBobs::@5 +Simple Condition (bool~) prepareBobs::$5 [289] if((byte) prepareBobs::cell#2<(byte) 9) goto prepareBobs::@8 +Simple Condition (bool~) shiftProtoBobRight::$0 [311] if((byte) shiftProtoBobRight::i#2<(byte)(number) 3*(number) 3*(number) 8) goto shiftProtoBobRight::@2 +Simple Condition (bool~) shiftProtoBobRight::$8 [314] if((byte) 0!=(byte~) shiftProtoBobRight::$1) goto shiftProtoBobRight::@4 +Simple Condition (bool~) shiftProtoBobRight::$7 [322] if((byte) shiftProtoBobRight::j#3>=(byte) $30) goto shiftProtoBobRight::@7 +Simple Condition (bool~) shiftProtoBobDown::$0 [331] if((byte) shiftProtoBobDown::i#2>(byte) 0) goto shiftProtoBobDown::@2 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$0 [346] if((byte) bobCharsetFindOrAddGlyph::glyph_id#11!=(byte) bob_charset_next_id#23) goto bobCharsetFindOrAddGlyph::@2 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$1 [352] if((byte) bobCharsetFindOrAddGlyph::i#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@5 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$3 [354] if(*((byte*) bobCharsetFindOrAddGlyph::glyph_cursor#11 + (byte) bobCharsetFindOrAddGlyph::i#2)==*((byte*) bobCharsetFindOrAddGlyph::bob_glyph#10 + (byte) bobCharsetFindOrAddGlyph::i#2)) goto bobCharsetFindOrAddGlyph::@7 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$4 [359] if((byte) 0==(byte) bobCharsetFindOrAddGlyph::found#2) goto bobCharsetFindOrAddGlyph::@16 +Simple Condition (bool~) bobCharsetFindOrAddGlyph::$5 [366] if((byte) bobCharsetFindOrAddGlyph::i1#2<(byte) 8) goto bobCharsetFindOrAddGlyph::@21 +Simple Condition (bool~) progress_inc::$1 [379] if((byte) progress_idx#8!=(byte) 8) goto progress_inc::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [260] if((byte) 0!=(byte~) main::$19) goto main::@15 +Negating conditional jump and destination [177] if((byte) 0!=(byte~) main::$19) goto main::@15 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const word) mulf_init::sqr#0 = 0 Constant (const byte) mulf_init::x_2#0 = 0 @@ -3309,24 +3309,24 @@ Constant (const word) main::toD0182_$0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0 Constant (const byte*) progress_cursor#16 = progress_init::line#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Removing PHI-reference to removed block (main::@1) in block main::@15 -if() condition always true - replacing block destination [206] if(true) goto main::@4 +if() condition always true - replacing block destination [136] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [247] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [249] if(main::i#1!=rangelast(0,NUM_BOBS-1)) goto main::@6 to (const byte) NUM_BOBS-(byte) 1+(number) 1 -Resolved ranged next value [317] renderBobInit::y#1 ← ++ renderBobInit::y#2 to ++ -Resolved ranged comparison value [319] if(renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 to (number) $20 -Resolved ranged next value [324] renderBobInit::i#1 ← ++ renderBobInit::i#2 to ++ -Resolved ranged comparison value [326] if(renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 to (const byte) NUM_BOBS-(byte) 1+(number) 1 -Resolved ranged next value [370] renderBobCleanup::i#1 ← ++ renderBobCleanup::i#2 to ++ -Resolved ranged comparison value [372] if(renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 to (const byte) NUM_BOBS-(byte) 1+(number) 1 -Simplifying constant evaluating to zero (byte) 0*(const byte) BOB_SUBTABLE_SIZE in [345] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) +Resolved ranged next value [167] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [169] if(main::i#1!=rangelast(0,NUM_BOBS-1)) goto main::@6 to (const byte) NUM_BOBS-(byte) 1+(number) 1 +Resolved ranged next value [212] renderBobInit::y#1 ← ++ renderBobInit::y#2 to ++ +Resolved ranged comparison value [214] if(renderBobInit::y#1!=rangelast(0,$1f)) goto renderBobInit::@1 to (number) $20 +Resolved ranged next value [219] renderBobInit::i#1 ← ++ renderBobInit::i#2 to ++ +Resolved ranged comparison value [221] if(renderBobInit::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobInit::@3 to (const byte) NUM_BOBS-(byte) 1+(number) 1 +Resolved ranged next value [259] renderBobCleanup::i#1 ← ++ renderBobCleanup::i#2 to ++ +Resolved ranged comparison value [261] if(renderBobCleanup::i#1!=rangelast(0,NUM_BOBS-1)) goto renderBobCleanup::@1 to (const byte) NUM_BOBS-(byte) 1+(number) 1 +Simplifying constant evaluating to zero (byte) 0*(const byte) BOB_SUBTABLE_SIZE in [236] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0*(const byte) BOB_SUBTABLE_SIZE + (byte) renderBob::bob_table_idx#0) Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero BOB_TABLES in [345] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0 + (byte) renderBob::bob_table_idx#0) -Simplifying expression containing zero renderBob::screen#0 in [345] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) -Simplifying expression containing zero renderBobCleanup::screen#0 in [361] *((byte*) renderBobCleanup::screen#0 + (byte) 0) ← (byte) 0 -Simplifying expression containing zero PROTO_BOB in [476] *((const byte*) PROTO_BOB + (byte) 0) ← (byte) 0 +Simplifying expression containing zero BOB_TABLES in [236] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES+(byte) 0 + (byte) renderBob::bob_table_idx#0) +Simplifying expression containing zero renderBob::screen#0 in [236] *((byte*) renderBob::screen#0 + (byte) 0) ← *((const byte*) BOB_TABLES + (byte) renderBob::bob_table_idx#0) +Simplifying expression containing zero renderBobCleanup::screen#0 in [250] *((byte*) renderBobCleanup::screen#0 + (byte) 0) ← (byte) 0 +Simplifying expression containing zero PROTO_BOB in [336] *((const byte*) PROTO_BOB + (byte) 0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable - keeping the phi block (byte**) renderBobCleanupNext#24 Eliminating unused variable - keeping the phi block (byte**) renderBobCleanupNext#11 @@ -3363,9 +3363,9 @@ Constant right-side identified [0] (byte*) memset::end#0 ← (const byte*) memse Constant right-side identified [82] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 Constant right-side identified [86] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff Constant right-side identified [89] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 -Constant right-side identified [134] (byte~) main::vicSelectGfxBank2_toDd001_$1 ← > (const word) main::vicSelectGfxBank2_toDd001_$0 -Constant right-side identified [138] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff -Constant right-side identified [141] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 +Constant right-side identified [133] (byte~) main::vicSelectGfxBank2_toDd001_$1 ← > (const word) main::vicSelectGfxBank2_toDd001_$0 +Constant right-side identified [137] (word~) main::toD0182_$1 ← (const word) main::toD0182_$0 & (word) $3fff +Constant right-side identified [140] (byte~) main::toD0182_$5 ← > (const word) main::toD0182_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 Constant (const byte) main::vicSelectGfxBank1_toDd001_$1 = >main::vicSelectGfxBank1_toDd001_$0 diff --git a/src/test/ref/complex/prebob/vogel-sprites.asm b/src/test/ref/complex/prebob/vogel-sprites.asm index 46415ac1c..a905a827a 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.asm +++ b/src/test/ref/complex/prebob/vogel-sprites.asm @@ -40,20 +40,30 @@ // Prepare for showing the sprites .label plex_show_idx = 4 main: { + // asm sei + // init() jsr init + // loop() jsr loop + // exit() jsr exit + // asm cli + // } rts } // Exit the program exit: { b1: // Wait for space release + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // while(keyboard_key_pressed(KEY_SPACE)) cmp #0 bne b1 + // } rts } // Determines whether a specific key is currently pressed by accessing the matrix directly @@ -63,8 +73,11 @@ exit: { keyboard_key_pressed: { .const colidx = KEY_SPACE&7 .label rowidx = KEY_SPACE>>3 + // keyboard_matrix_read(rowidx) jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask+colidx + // } rts } // Read a single row of the keyboard matrix @@ -73,10 +86,13 @@ keyboard_key_pressed: { // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // The main loop @@ -97,9 +113,11 @@ loop: { lda #0 sta.z angle __b2: + // while (*RASTER<0xd8) lda RASTER cmp #$d8 bcc __b2 + // *BORDERCOL = 0xf lda #$f sta BORDERCOL lda.z angle @@ -109,15 +127,20 @@ loop: { lda #$1e sta.z r __b4: + // *BORDERCOL = 6 //kickasm {{ .break }} lda #6 sta BORDERCOL + // mulf8s(r, COS[a]) lda.z r ldy.z a ldx COS,y jsr mulf8s + // mulf8s(r, COS[a]) + // mulf8s(r, COS[a])*2 asl.z __2 rol.z __2+1 + // x = mulf8s(r, COS[a])*2 + 125*0x100 clc lda.z x adc #<$7d*$100 @@ -125,18 +148,24 @@ loop: { lda.z x+1 adc #>$7d*$100 sta.z x+1 + // >x tax + // PLEX_XPOS[i] = >x lda.z i asl tay txa sta PLEX_XPOS,y + // mulf8s(r, SIN[a]) lda.z r ldy.z a ldx SIN,y jsr mulf8s + // mulf8s(r, SIN[a]) + // mulf8s(r, SIN[a])*2 asl.z __6 rol.z __6+1 + // y = mulf8s(r, SIN[a])*2 + 125*0x100 clc lda.z y adc #<$7d*$100 @@ -144,30 +173,41 @@ loop: { lda.z y+1 adc #>$7d*$100 sta.z y+1 + // >y + // PLEX_YPOS[i] = >y ldy.z i sta PLEX_YPOS,y + // a += 98 lax.z a axs #-[$62] stx.z a + // r += 3 lax.z r axs #-[3] stx.z r + // for(char i: 0..NUM_BOBS-1) inc.z i lda #NUM_BOBS-1+1 cmp.z i bne __b4 + // *BORDERCOL = 3 lda #3 sta BORDERCOL + // plexSort() jsr plexSort + // angle += 3 lax.z angle axs #-[3] stx.z angle + // *BORDERCOL = BLACK lda #BLACK sta BORDERCOL // Sort the sprites by y-position __b6: + // *D011&VIC_RST8 lda #VIC_RST8 and D011 + // while((*D011&VIC_RST8)!=0) cmp #0 bne __b6 lda #0 @@ -180,76 +220,107 @@ loop: { sta.z plex_free_next // Show the sprites __b7: + // *BORDERCOL = BLACK lda #BLACK sta BORDERCOL + // return PLEX_FREE_YPOS[plex_free_next]; ldy.z plex_free_next lda PLEX_FREE_YPOS,y sta.z plexFreeNextYpos1_return __b8: + // while(*RASTERPLEX_XPOS[xpos_idx] lda PLEX_XPOS+1,x + // if(>PLEX_XPOS[xpos_idx]!=0) cmp #0 bne __b1 + // $ff^plex_sprite_msb lda #$ff eor.z plex_sprite_msb + // *SPRITES_XMSB &= ($ff^plex_sprite_msb) and SPRITES_XMSB sta SPRITES_XMSB __b2: + // plex_sprite_idx+1 ldx.z plex_sprite_idx inx + // plex_sprite_idx = (plex_sprite_idx+1)&7 lda #7 sax.z plex_sprite_idx + // plex_show_idx++; inc.z plex_show_idx + // plex_sprite_msb *=2 asl.z plex_sprite_msb + // if(plex_sprite_msb==0) lda.z plex_sprite_msb cmp #0 bne __b5 @@ -257,8 +328,10 @@ plexShowSprite: { sta.z plex_sprite_msb rts __b5: + // } rts __b1: + // *SPRITES_XMSB |= plex_sprite_msb lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -280,20 +353,26 @@ plexSort: { lda #0 sta.z m __b1: + // nxt_idx = PLEX_SORTED_IDX[m+1] ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx + // nxt_y = PLEX_YPOS[nxt_idx] tay lda PLEX_YPOS,y sta.z nxt_y + // if(nxt_ym lda.z m+1 + // >m = (>m)-(byte)b sec sbc.z b sta.z m+1 __b1: + // if(b<0) lda.z b cmp #0 bpl __b2 + // >m lda.z m+1 + // >m = (>m)-(byte)*memA sec sbc memA sta.z m+1 __b2: + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -361,7 +458,9 @@ mulf8u_prepared: { .label resL = $fe .label memB = $ff .label return = 7 + // *memB = b sta memB + // asm tax sec sm1: @@ -374,73 +473,94 @@ mulf8u_prepared: { sm4: sbc mulf_sqr2_hi,x sta memB + // return { *memB, *resL }; lda resL sta.z return lda memB sta.z return+1 + // } rts } // Prepare for fast multiply with an unsigned byte to a word result // mulf8u_prepare(byte register(A) a) mulf8u_prepare: { .label memA = $fd + // *memA = a sta memA + // asm sta mulf8u_prepared.sm1+1 sta mulf8u_prepared.sm3+1 eor #$ff sta mulf8u_prepared.sm2+1 sta mulf8u_prepared.sm4+1 + // } rts } // Initialize the program init: { .label i = 6 + // *D011 = VIC_DEN | VIC_RSEL | 3 lda #VIC_DEN|VIC_RSEL|3 sta D011 + // plexInit(SCREEN) jsr plexInit lda #0 sta.z i // Set the sprite pointers & initial positions __b1: + // PLEX_PTR[i] = (char)(SPRITE/0x40) lda #$ff&SPRITE/$40 ldy.z i sta PLEX_PTR,y + // i*5 tya asl asl clc adc.z i + // 24+i*5 tax axs #-[$18] + // PLEX_XPOS[i] = 24+i*5 tya asl tay txa sta PLEX_XPOS,y + // i*8 lda.z i asl asl asl + // 50+i*8 clc adc #$32 + // PLEX_YPOS[i] = 50+i*8 ldy.z i sta PLEX_YPOS,y + // for(char i: 0..PLEX_COUNT-1) inc.z i lda #PLEX_COUNT-1+1 cmp.z i bne __b1 + // *SPRITES_ENABLE = 0xff // Enable & initialize sprites lda #$ff sta SPRITES_ENABLE ldx #0 __b3: + // SPRITES_COLS[i] = GREEN lda #GREEN sta SPRITES_COLS,x + // for(char i: 0..7) inx cpx #8 bne __b3 + // mulf_init() jsr mulf_init + // memset(SCREEN, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -455,17 +575,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -518,63 +643,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -582,6 +728,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 @@ -592,11 +739,14 @@ mulf_init: { plexInit: { ldx #0 __b1: + // PLEX_SORTED_IDX[i] = i txa sta PLEX_SORTED_IDX,x + // for(byte i: 0..PLEX_COUNT-1) inx cpx #PLEX_COUNT-1+1 bne __b1 + // } rts } // The x-positions of the multiplexer sprites ($000-$1ff) diff --git a/src/test/ref/complex/prebob/vogel-sprites.log b/src/test/ref/complex/prebob/vogel-sprites.log index 6312d6e36..fa2ba0988 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.log +++ b/src/test/ref/complex/prebob/vogel-sprites.log @@ -2363,33 +2363,33 @@ Identical Phi Values (byte*) PLEX_SCREEN_PTR#47 (byte*) PLEX_SCREEN_PTR#1 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [80] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) plexInit::$1 [15] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 -Simple Condition (bool~) plexSort::$3 [26] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -Simple Condition (bool~) plexSort::$8 [30] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 -Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [53] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 -Simple Condition (bool~) plexShowSprite::$4 [83] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -Simple Condition (bool~) plexShowSprite::$8 [97] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return -Simple Condition (bool~) mulf_init::$0 [115] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [121] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [140] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [149] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf8s_prepared::$3 [179] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$5 [183] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) memset::$1 [222] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [232] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) init::$7 [301] if((byte) init::i#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 -Simple Condition (bool~) init::$8 [309] if((byte) init::i1#1!=rangelast(0,7)) goto init::@3 -Simple Condition (bool~) exit::$1 [328] if((byte) 0!=(byte~) exit::$0) goto exit::@1 -Simple Condition (bool~) loop::$0 [336] if(*((const byte*) RASTER)<(byte) $d8) goto loop::@4 -Simple Condition (bool~) loop::$9 [371] if((byte) loop::i#1!=rangelast(0,NUM_BOBS-1)) goto loop::@6 -Simple Condition (bool~) loop::$12 [385] if((byte~) loop::$11!=(byte) 0) goto loop::@8 -Simple Condition (bool~) loop::$14 [399] if(*((const byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@15 -Simple Condition (bool~) loop::$17 [410] if((byte) loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 -Simple Condition (bool~) loop::$19 [420] if((byte) 0==(byte~) loop::$18) goto loop::@1 +Simple Condition (bool~) plexInit::$1 [11] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 +Simple Condition (bool~) plexSort::$3 [19] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 +Simple Condition (bool~) plexSort::$8 [23] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 +Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [42] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 +Simple Condition (bool~) plexShowSprite::$4 [61] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 +Simple Condition (bool~) plexShowSprite::$8 [70] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return +Simple Condition (bool~) mulf_init::$0 [82] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [86] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [103] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [109] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf8s_prepared::$3 [131] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$5 [134] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) memset::$1 [156] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [163] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) init::$7 [206] if((byte) init::i#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 +Simple Condition (bool~) init::$8 [213] if((byte) init::i1#1!=rangelast(0,7)) goto init::@3 +Simple Condition (bool~) exit::$1 [226] if((byte) 0!=(byte~) exit::$0) goto exit::@1 +Simple Condition (bool~) loop::$0 [234] if(*((const byte*) RASTER)<(byte) $d8) goto loop::@4 +Simple Condition (bool~) loop::$9 [263] if((byte) loop::i#1!=rangelast(0,NUM_BOBS-1)) goto loop::@6 +Simple Condition (bool~) loop::$12 [272] if((byte~) loop::$11!=(byte) 0) goto loop::@8 +Simple Condition (bool~) loop::$14 [279] if(*((const byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@15 +Simple Condition (bool~) loop::$17 [285] if((byte) loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 +Simple Condition (bool~) loop::$19 [292] if((byte) 0==(byte~) loop::$18) goto loop::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s [39] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 +Rewriting && if()-condition to two if()s [30] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting -Negating conditional jump and destination [420] if((byte) 0!=(byte~) loop::$18) goto loop::@return +Negating conditional jump and destination [292] if((byte) 0!=(byte~) loop::$18) goto loop::@return Constant (const byte*) PLEX_SCREEN_PTR#0 = (byte*)$400+$3f8 Constant (const byte) plex_show_idx#0 = 0 Constant (const byte) plex_sprite_idx#0 = 0 @@ -2430,27 +2430,27 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [222] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [156] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Removing PHI-reference to removed block (loop::@1) in block loop::@return Removing PHI-reference to removed block (loop::@1) in block loop::@return Removing PHI-reference to removed block (loop::@1) in block loop::@return Removing PHI-reference to removed block (loop::@1) in block loop::@return -if() condition always true - replacing block destination [333] if(true) goto loop::@4 +if() condition always true - replacing block destination [231] if(true) goto loop::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [13] plexInit::i#1 ← ++ plexInit::i#2 to ++ -Resolved ranged comparison value [15] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [28] plexSort::m#1 ← ++ plexSort::m#2 to ++ -Resolved ranged comparison value [30] if(plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 to (const byte) PLEX_COUNT-(byte) 2+(number) 1 -Resolved ranged next value [51] plexSort::plexFreePrepare1_s#1 ← ++ plexSort::plexFreePrepare1_s#2 to ++ -Resolved ranged comparison value [53] if(plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 to (number) 8 -Resolved ranged next value [299] init::i#1 ← ++ init::i#2 to ++ -Resolved ranged comparison value [301] if(init::i#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [307] init::i1#1 ← ++ init::i1#2 to ++ -Resolved ranged comparison value [309] if(init::i1#1!=rangelast(0,7)) goto init::@3 to (number) 8 -Resolved ranged next value [369] loop::i#1 ← ++ loop::i#2 to ++ -Resolved ranged comparison value [371] if(loop::i#1!=rangelast(0,NUM_BOBS-1)) goto loop::@6 to (const byte) NUM_BOBS-(byte) 1+(number) 1 -Resolved ranged next value [408] loop::i1#1 ← ++ loop::i1#5 to ++ -Resolved ranged comparison value [410] if(loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [9] plexInit::i#1 ← ++ plexInit::i#2 to ++ +Resolved ranged comparison value [11] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [21] plexSort::m#1 ← ++ plexSort::m#2 to ++ +Resolved ranged comparison value [23] if(plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 to (const byte) PLEX_COUNT-(byte) 2+(number) 1 +Resolved ranged next value [40] plexSort::plexFreePrepare1_s#1 ← ++ plexSort::plexFreePrepare1_s#2 to ++ +Resolved ranged comparison value [42] if(plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 to (number) 8 +Resolved ranged next value [204] init::i#1 ← ++ init::i#2 to ++ +Resolved ranged comparison value [206] if(init::i#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [211] init::i1#1 ← ++ init::i1#2 to ++ +Resolved ranged comparison value [213] if(init::i1#1!=rangelast(0,7)) goto init::@3 to (number) 8 +Resolved ranged next value [261] loop::i#1 ← ++ loop::i#2 to ++ +Resolved ranged comparison value [263] if(loop::i#1!=rangelast(0,NUM_BOBS-1)) goto loop::@6 to (const byte) NUM_BOBS-(byte) 1+(number) 1 +Resolved ranged next value [283] loop::i1#1 ← ++ loop::i1#5 to ++ +Resolved ranged comparison value [285] if(loop::i1#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@14 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 Eliminating unused variable - keeping the phi block (byte) plex_show_idx#31 Eliminating unused variable - keeping the phi block (byte) plex_sprite_idx#31 Eliminating unused variable - keeping the phi block (byte) plex_sprite_msb#29 @@ -2504,12 +2504,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) plexShowSprite::$11 = (byte~) plexShowSprite::$10 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) plexSort::$5 [19] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 -Simple Condition (bool~) plexSort::$6 [212] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +Simple Condition (bool~) plexSort::$6 [210] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [19] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant right-side identified [0] (byte*) PLEX_SCREEN_PTR#1 ← (const byte*) plexInit::screen#0 + (word) $3f8 -Constant right-side identified [112] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 +Constant right-side identified [111] (byte*) memset::end#0 ← (const byte*) memset::$2 + (const word) memset::num#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PLEX_SCREEN_PTR#1 = plexInit::screen#0+$3f8 Constant (const byte*) memset::end#0 = memset::$2+memset::num#0 @@ -2596,8 +2596,8 @@ Alias (byte~) init::$3 = (byte~) init::$11 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) keyboard_key_pressed::key#2 (const byte) KEY_SPACE Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [113] (byte) keyboard_key_pressed::colidx#0 ← (const byte) KEY_SPACE & (byte) 7 -Constant right-side identified [114] (byte) keyboard_key_pressed::rowidx#0 ← (const byte) KEY_SPACE >> (byte) 3 +Constant right-side identified [111] (byte) keyboard_key_pressed::colidx#0 ← (const byte) KEY_SPACE & (byte) 7 +Constant right-side identified [112] (byte) keyboard_key_pressed::rowidx#0 ← (const byte) KEY_SPACE >> (byte) 3 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) keyboard_key_pressed::colidx#0 = KEY_SPACE&7 Constant (const byte) keyboard_key_pressed::rowidx#0 = KEY_SPACE>>3 diff --git a/src/test/ref/complex/splines/truetype-splines.asm b/src/test/ref/complex/splines/truetype-splines.asm index e51981d3e..ef032af10 100644 --- a/src/test/ref/complex/splines/truetype-splines.asm +++ b/src/test/ref/complex/splines/truetype-splines.asm @@ -27,34 +27,47 @@ main: { .const vicSelectGfxBank1_toDd001_return = 3^(>BITMAP_SCREEN)/$40 .const toD0181_return = (>(BITMAP_SCREEN&$3fff)*4)|(>BITMAP_GRAPHICS)/4&$f .label angle = $12 + // mulf_init() jsr mulf_init + // bitmap_init(BITMAP_GRAPHICS, BITMAP_SCREEN) jsr bitmap_init + // bitmap_clear(BLACK, WHITE) jsr bitmap_clear + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(BITMAP_SCREEN, BITMAP_GRAPHICS) lda #toD0181_return sta D018 + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 lda #0 sta.z angle __b2: + // bitmap_clear(BLACK, WHITE) jsr bitmap_clear + // show_letter(angle) jsr show_letter ldx #0 __b3: + // while(*RASTER!=0xfe) lda #$fe cmp RASTER bne __b3 __b4: + // while(*RASTER!=0xff) lda #$ff cmp RASTER bne __b4 + // for ( byte w: 0..60) inx cpx #$3d bne __b3 + // angle += 9 lax.z angle axs #-[9] stx.z angle @@ -85,6 +98,7 @@ show_letter: { sta.z current_x+1 sta.z i __b1: + // to = letter_c[i].to lda.z i asl asl @@ -100,6 +114,7 @@ show_letter: { sta.z to_y lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x sta.z to_y+1 + // to = { to.x - 50, to.y - 150} lda.z to_x sec sbc #$32 @@ -114,8 +129,12 @@ show_letter: { lda.z to_y+1 sbc #>$96 sta.z to_y+1 + // rotate(to, angle) ldy.z angle jsr rotate + // rotate(to, angle) + // to = rotate(to, angle) + // to.x + 100 lda.z to_x_1 clc adc #<$64 @@ -123,6 +142,7 @@ show_letter: { lda.z to_x_1+1 adc #>$64 sta.z current_x_1+1 + // to.y + 100 lda.z to_y_1 clc adc #<$64 @@ -130,6 +150,7 @@ show_letter: { lda.z to_y_1+1 adc #>$64 sta.z current_y_1+1 + // via = letter_c[i].via lda.z i asl asl @@ -145,6 +166,7 @@ show_letter: { sta.z via_y lda letter_c+OFFSET_STRUCT_SEGMENT_VIA+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x sta.z via_y+1 + // via = { via.x - 50, via.y - 150} lda.z via_x sec sbc #$32 @@ -159,8 +181,12 @@ show_letter: { lda.z via_y+1 sbc #>$96 sta.z via_y+1 + // rotate(via, angle) ldy.z angle jsr rotate + // rotate(via, angle) + // via = rotate(via, angle) + // via.x + 100 lda.z segment_via_x clc adc #<$64 @@ -168,6 +194,7 @@ show_letter: { lda.z segment_via_x+1 adc #>$64 sta.z segment_via_x+1 + // via.y + 100 lda.z segment_via_y clc adc #<$64 @@ -175,6 +202,7 @@ show_letter: { lda.z segment_via_y+1 adc #>$64 sta.z segment_via_y+1 + // segment = { letter_c[i].type, to, via} lda.z i asl asl @@ -183,10 +211,13 @@ show_letter: { adc.z i tay lda letter_c,y + // if(segment.type==MOVE_TO) cmp #MOVE_TO beq __b3 + // if(segment.type==SPLINE_TO) cmp #SPLINE_TO beq __b2 + // bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)segment.to.x, (unsigned int)segment.to.y) lda.z current_x_1 sta.z bitmap_line.x2 lda.z current_x_1+1 @@ -197,10 +228,12 @@ show_letter: { sta.z bitmap_line.y2+1 jsr bitmap_line __b3: + // for( byte i: 0..21) inc.z i lda #$16 cmp.z i bne __b9 + // } rts __b9: lda.z current_x_1 @@ -213,7 +246,9 @@ show_letter: { sta.z current_y+1 jmp __b1 __b2: + // spline_8segB(current, segment.via, segment.to) jsr spline_8segB + // bitmap_plot_spline_8seg() jsr bitmap_plot_spline_8seg jmp __b3 } @@ -222,6 +257,7 @@ bitmap_plot_spline_8seg: { .label current_x = $c .label current_y = $e .label n = $24 + // current = SPLINE_8SEG[0] lda SPLINE_8SEG sta.z current_x lda SPLINE_8SEG+1 @@ -233,6 +269,8 @@ bitmap_plot_spline_8seg: { lda #1 sta.z n __b1: + // bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)SPLINE_8SEG[n].x, (unsigned int)SPLINE_8SEG[n].y) + // (unsigned int)SPLINE_8SEG[n].x lda.z n asl asl @@ -245,7 +283,9 @@ bitmap_plot_spline_8seg: { sta.z bitmap_line.y2 lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x sta.z bitmap_line.y2+1 + // bitmap_line((unsigned int)current.x, (unsigned int)current.y, (unsigned int)SPLINE_8SEG[n].x, (unsigned int)SPLINE_8SEG[n].y) jsr bitmap_line + // current = SPLINE_8SEG[n] lda.z n asl asl @@ -258,10 +298,12 @@ bitmap_plot_spline_8seg: { sta.z current_y lda SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x sta.z current_y+1 + // for(char n:1..8) inc.z n lda #9 cmp.z n bne __b1 + // } rts } // Draw a line on the bitmap using bresenhams algorithm @@ -279,6 +321,7 @@ bitmap_line: { .label y1 = $e .label x2 = $20 .label y2 = $22 + // abs_u16(x2-x1) lda.z x2 sec sbc.z x @@ -287,10 +330,13 @@ bitmap_line: { sbc.z x+1 sta.z abs_u16.w+1 jsr abs_u16 + // abs_u16(x2-x1) + // dx = abs_u16(x2-x1) lda.z abs_u16.return sta.z dx lda.z abs_u16.return+1 sta.z dx+1 + // abs_u16(y2-y1) lda.z y2 sec sbc.z y @@ -299,6 +345,9 @@ bitmap_line: { sbc.z y+1 sta.z abs_u16.w+1 jsr abs_u16 + // abs_u16(y2-y1) + // dy = abs_u16(y2-y1) + // if(dx==0 && dy==0) lda.z dx bne __b1 lda.z dx+1 @@ -311,6 +360,7 @@ bitmap_line: { !__b4: !: __b1: + // sgn_u16(x2-x1) lda.z x2 sec sbc.z x @@ -319,10 +369,13 @@ bitmap_line: { sbc.z x+1 sta.z sgn_u16.w+1 jsr sgn_u16 + // sgn_u16(x2-x1) + // sx = sgn_u16(x2-x1) lda.z sgn_u16.return sta.z sx lda.z sgn_u16.return+1 sta.z sx+1 + // sgn_u16(y2-y1) lda.z y2 sec sbc.z y @@ -331,6 +384,9 @@ bitmap_line: { sbc.z y+1 sta.z sgn_u16.w+1 jsr sgn_u16 + // sgn_u16(y2-y1) + // sy = sgn_u16(y2-y1) + // if(dx > dy) lda.z dy+1 cmp.z dx+1 bcc __b2 @@ -339,6 +395,7 @@ bitmap_line: { cmp.z dx bcc __b2 !: + // e = dx/2 lda.z dx+1 lsr sta.z e+1 @@ -346,9 +403,11 @@ bitmap_line: { ror sta.z e __b6: + // bitmap_plot(x,(byte)y) lda.z y tax jsr bitmap_plot + // y += sy lda.z y clc adc.z sy @@ -356,6 +415,7 @@ bitmap_line: { lda.z y+1 adc.z sy+1 sta.z y+1 + // e += dx lda.z e clc adc.z dx @@ -363,6 +423,7 @@ bitmap_line: { lda.z e+1 adc.z dx+1 sta.z e+1 + // if(dy$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -479,12 +557,15 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // w lda.z w+1 + // >w&0x80 and #$80 + // if(>w&0x80) cmp #0 bne __b1 lda #<1 @@ -506,6 +590,7 @@ sgn_u16: { lda #<-1 sta.z return sta.z return+1 + // } rts } // Get the absolute value of a 16-bit unsigned number treated as a signed number. @@ -513,12 +598,16 @@ sgn_u16: { abs_u16: { .label w = 6 .label return = 6 + // >w lda.z w+1 + // >w&0x80 and #$80 + // if(>w&0x80) cmp #0 bne __b1 rts __b1: + // return -w; sec lda #0 sbc.z return @@ -526,6 +615,7 @@ abs_u16: { lda #0 sbc.z return+1 sta.z return+1 + // } rts } // Generate a 8-segment quadratic spline using 16-bit fixed point 1/64-format math (6 decimal bits). @@ -567,12 +657,14 @@ spline_8segB: { .label p1_y = $22 .label p2_x = $14 .label p2_y = $16 + // p1.x*2 lda.z p1_x asl sta.z __0 lda.z p1_x+1 rol sta.z __0+1 + // p2.x - p1.x*2 lda.z p2_x sec sbc.z __1 @@ -580,6 +672,7 @@ spline_8segB: { lda.z p2_x+1 sbc.z __1+1 sta.z __1+1 + // a = { p2.x - p1.x*2 + p0.x, p2.y - p1.y*2 + p0.y} lda.z a_x clc adc.z p0_x @@ -587,12 +680,14 @@ spline_8segB: { lda.z a_x+1 adc.z p0_x+1 sta.z a_x+1 + // p1.y*2 lda.z p1_y asl sta.z __3 lda.z p1_y+1 rol sta.z __3+1 + // p2.y - p1.y*2 lda.z p2_y sec sbc.z __4 @@ -600,6 +695,7 @@ spline_8segB: { lda.z p2_y+1 sbc.z __4+1 sta.z __4+1 + // a = { p2.x - p1.x*2 + p0.x, p2.y - p1.y*2 + p0.y} lda.z a_y clc adc.z p0_y @@ -607,6 +703,7 @@ spline_8segB: { lda.z a_y+1 adc.z p0_y+1 sta.z a_y+1 + // p1.x - p0.x lda.z __6 sec sbc.z p0_x @@ -614,8 +711,10 @@ spline_8segB: { lda.z __6+1 sbc.z p0_x+1 sta.z __6+1 + // b = { (p1.x - p0.x)*2, (p1.y - p0.y)*2 } asl.z b_x rol.z b_x+1 + // p1.y - p0.y lda.z __8 sec sbc.z p0_y @@ -623,14 +722,17 @@ spline_8segB: { lda.z __8+1 sbc.z p0_y+1 sta.z __8+1 + // b = { (p1.x - p0.x)*2, (p1.y - p0.y)*2 } asl.z b_y rol.z b_y+1 + // b.x*8 asl.z __10 rol.z __10+1 asl.z __10 rol.z __10+1 asl.z __10 rol.z __10+1 + // i = { a.x + b.x*8, a.y + b.y*8} lda.z i_x clc adc.z a_x @@ -638,12 +740,14 @@ spline_8segB: { lda.z i_x+1 adc.z a_x+1 sta.z i_x+1 + // b.y*8 asl.z __12 rol.z __12+1 asl.z __12 rol.z __12+1 asl.z __12 rol.z __12+1 + // i = { a.x + b.x*8, a.y + b.y*8} lda.z i_y clc adc.z a_y @@ -651,10 +755,12 @@ spline_8segB: { lda.z i_y+1 adc.z a_y+1 sta.z i_y+1 + // j = { a.x*2, a.y*2 } asl.z j_x rol.z j_x+1 asl.z j_y rol.z j_y+1 + // p = { p0.x*0x40, p0.y*0x40 } lda.z p_x+1 sta.z $ff lda.z p_x @@ -681,6 +787,7 @@ spline_8segB: { ror.z p_y tay __b1: + // p.x+0x20 lda.z p_x clc adc #<$20 @@ -688,6 +795,7 @@ spline_8segB: { lda.z p_x+1 adc #>$20 sta.z __22+1 + // (p.x+0x20)/0x40 lda.z __23 sta.z $ff lda.z __23+1 @@ -704,6 +812,7 @@ spline_8segB: { rol.z $ff rol.z __23 rol.z __23+1 + // p.y+0x20 lda.z p_y clc adc #<$20 @@ -711,6 +820,7 @@ spline_8segB: { lda.z p_y+1 adc #>$20 sta.z __24+1 + // (p.y+0x20)/0x40 lda.z __25 sta.z $ff lda.z __25+1 @@ -727,6 +837,7 @@ spline_8segB: { rol.z $ff rol.z __25 rol.z __25+1 + // SPLINE_8SEG[n] = { (p.x+0x20)/0x40, (p.y+0x20)/0x40 } tya asl asl @@ -739,6 +850,7 @@ spline_8segB: { sta SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y,x lda.z __25+1 sta SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,x + // p = { p.x+i.x, p.y+i.y } lda.z p_x clc adc.z i_x @@ -753,6 +865,7 @@ spline_8segB: { lda.z p_y+1 adc.z i_y+1 sta.z p_y+1 + // i = { i.x+j.x, i.y+j.y } lda.z i_x clc adc.z j_x @@ -767,11 +880,13 @@ spline_8segB: { lda.z i_y+1 adc.z j_y+1 sta.z i_y+1 + // for( char n: 0..7) iny cpy #8 beq !__b1+ jmp __b1 !__b1: + // p.x+0x20 lda.z __18 clc adc #<$20 @@ -779,6 +894,7 @@ spline_8segB: { lda.z __18+1 adc #>$20 sta.z __18+1 + // (p.x+0x20)/0x40 lda.z __19 sta.z $ff lda.z __19+1 @@ -795,6 +911,7 @@ spline_8segB: { rol.z $ff rol.z __19 rol.z __19+1 + // p.y+0x20 lda.z __20 clc adc #<$20 @@ -802,6 +919,7 @@ spline_8segB: { lda.z __20+1 adc #>$20 sta.z __20+1 + // (p.y+0x20)/0x40 lda.z __21 sta.z $ff lda.z __21+1 @@ -818,6 +936,7 @@ spline_8segB: { rol.z $ff rol.z __21 rol.z __21+1 + // SPLINE_8SEG[8] = { (p.x+0x20)/0x40, (p.y+0x20)/0x40 } lda.z __19 sta SPLINE_8SEG+8*SIZEOF_STRUCT_SPLINEVECTOR16 lda.z __19+1 @@ -826,6 +945,7 @@ spline_8segB: { sta SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+8*SIZEOF_STRUCT_SPLINEVECTOR16 lda.z __21+1 sta SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y+8*SIZEOF_STRUCT_SPLINEVECTOR16+1 + // } rts } // 2D-rotate a vector by an angle @@ -849,6 +969,7 @@ rotate: { .label xr = $18 .label yr = $1a .label sin_a = 6 + // cos_a = (signed int) COS[angle] lda COS,y sta.z cos_a ora #$7f @@ -856,28 +977,37 @@ rotate: { lda #0 !: sta.z cos_a+1 + // mulf16s(cos_a, vector.x) lda.z vector_x sta.z mulf16s.b lda.z vector_x+1 sta.z mulf16s.b+1 jsr mulf16s + // mulf16s(cos_a, vector.x) + // (signed int )mulf16s(cos_a, vector.x) lda.z __1 sta.z __2 lda.z __1+1 sta.z __2+1 + // xr = (signed int )mulf16s(cos_a, vector.x)*2 asl.z xr rol.z xr+1 + // mulf16s(cos_a, vector.y) lda.z vector_y sta.z mulf16s.b lda.z vector_y+1 sta.z mulf16s.b+1 jsr mulf16s + // mulf16s(cos_a, vector.y) + // (signed int )mulf16s(cos_a, vector.y) lda.z __4 sta.z __5 lda.z __4+1 sta.z __5+1 + // yr = (signed int )mulf16s(cos_a, vector.y)*2 asl.z yr rol.z yr+1 + // sin_a = (signed int) SIN[angle] lda SIN,y sta.z sin_a ora #$7f @@ -885,17 +1015,22 @@ rotate: { lda #0 !: sta.z sin_a+1 + // mulf16s(sin_a, vector.y) lda.z vector_y sta.z mulf16s.b lda.z vector_y+1 sta.z mulf16s.b+1 jsr mulf16s + // mulf16s(sin_a, vector.y) + // (signed int)mulf16s(sin_a, vector.y) lda.z __8 sta.z __9 lda.z __8+1 sta.z __9+1 + // (signed int)mulf16s(sin_a, vector.y)*2 asl.z __10 rol.z __10+1 + // xr -= (signed int)mulf16s(sin_a, vector.y)*2 // signed fixed[0.7] lda.z xr sec @@ -904,17 +1039,22 @@ rotate: { lda.z xr+1 sbc.z __10+1 sta.z xr+1 + // mulf16s(sin_a, vector.x) lda.z vector_x sta.z mulf16s.b lda.z vector_x+1 sta.z mulf16s.b+1 jsr mulf16s + // mulf16s(sin_a, vector.x) + // (signed int)mulf16s(sin_a, vector.x) lda.z __11 sta.z __12 lda.z __11+1 sta.z __12+1 + // (signed int)mulf16s(sin_a, vector.x)*2 asl.z __13 rol.z __13+1 + // yr += (signed int)mulf16s(sin_a, vector.x)*2 // signed fixed[8.8] lda.z yr clc @@ -923,20 +1063,25 @@ rotate: { lda.z yr+1 adc.z __13+1 sta.z yr+1 + // >xr lda.z xr+1 + // (signed int)(signed char)>xr sta.z return_x ora #$7f bmi !+ lda #0 !: sta.z return_x+1 + // >yr lda.z yr+1 + // (signed int)(signed char)>yr sta.z return_y ora #$7f bmi !+ lda #0 !: sta.z return_y+1 + // } rts } // Fast multiply two signed words to a signed double word result @@ -951,6 +1096,7 @@ mulf16s: { .label return = 8 .label a = 6 .label b = $10 + // mulf16u((word)a, (word)b) lda.z a sta.z mulf16u.a lda.z a+1 @@ -960,12 +1106,16 @@ mulf16s: { lda.z b+1 sta.z mulf16u.b+1 jsr mulf16u + // m = mulf16u((word)a, (word)b) + // if(a<0) lda.z a+1 bpl __b1 + // >m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc.z b @@ -978,12 +1128,15 @@ mulf16s: { lda.z __16+1 sta.z m+3 __b1: + // if(b<0) lda.z b+1 bpl __b2 + // >m lda.z m+2 sta.z __13 lda.z m+3 sta.z __13+1 + // >m = (>m)-(word)a lda.z __17 sec sbc.z a @@ -996,6 +1149,8 @@ mulf16s: { lda.z __17+1 sta.z m+3 __b2: + // (signed dword)m + // } rts } // Fast multiply two unsigned words to a double word result @@ -1008,14 +1163,17 @@ mulf16u: { .label return = 8 .label a = $1e .label b = $20 + // *memA = a lda.z a sta memA lda.z a+1 sta memA+1 + // *memB = b lda.z b sta memB lda.z b+1 sta memB+1 + // asm lda memA sta sm1a+1 sta sm3a+1 @@ -1108,6 +1266,7 @@ mulf16u: { bcc !+ inc memR+3 !: + // return *memR; lda memR sta.z return lda memR+1 @@ -1116,6 +1275,7 @@ mulf16u: { sta.z return+2 lda memR+3 sta.z return+3 + // } rts } // Clear all graphics on the bitmap @@ -1123,6 +1283,7 @@ mulf16u: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE<<4 + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -1152,11 +1315,13 @@ memset: { .label dst = $e .label num = $c .label str = $e + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -1165,6 +1330,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -1172,11 +1338,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -1190,12 +1359,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -1205,16 +1378,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -1223,9 +1404,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) @@ -1256,6 +1439,7 @@ mulf_init: { lda #>mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -1274,63 +1458,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -1338,6 +1543,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 diff --git a/src/test/ref/complex/splines/truetype-splines.log b/src/test/ref/complex/splines/truetype-splines.log index 183c74481..568090a6a 100644 --- a/src/test/ref/complex/splines/truetype-splines.log +++ b/src/test/ref/complex/splines/truetype-splines.log @@ -3541,39 +3541,39 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [107] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Identified duplicate assignment right side [535] (byte~) bitmap_plot_spline_8seg::$8 ← (byte) bitmap_plot_spline_8seg::n#2 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) spline_8segB::$30 [48] if((byte) spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 -Simple Condition (bool~) memset::$1 [61] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [71] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [90] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [94] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [110] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [114] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_line::$12 [185] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 -Simple Condition (bool~) bitmap_line::$21 [208] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 -Simple Condition (bool~) bitmap_line::$22 [211] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@7 -Simple Condition (bool~) bitmap_line::$27 [230] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 -Simple Condition (bool~) bitmap_line::$28 [233] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@12 -Simple Condition (bool~) abs_u16::$3 [241] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 -Simple Condition (bool~) sgn_u16::$2 [254] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 -Simple Condition (bool~) mulf_init::$0 [267] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [273] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [292] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [301] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf16s::$4 [329] if((signed word) mulf16s::a#4>=(signed byte) 0) goto mulf16s::@1 -Simple Condition (bool~) mulf16s::$6 [333] if((signed word) mulf16s::b#4>=(signed byte) 0) goto mulf16s::@2 -Simple Condition (bool~) main::$7 [414] if(*((const byte*) RASTER)!=(byte) $fe) goto main::@5 -Simple Condition (bool~) main::$8 [417] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@7 -Simple Condition (bool~) main::$9 [421] if((byte) main::w#1!=rangelast(0,$3c)) goto main::@5 -Simple Condition (bool~) show_letter::$10 [488] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@2 -Simple Condition (bool~) show_letter::$11 [494] if((byte) show_letter::segment_type#0==(const byte) SPLINE_TO) goto show_letter::@3 -Simple Condition (bool~) show_letter::$19 [524] if((byte) show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 -Simple Condition (bool~) bitmap_plot_spline_8seg::$5 [548] if((byte) bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 +Simple Condition (bool~) spline_8segB::$30 [34] if((byte) spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 +Simple Condition (bool~) memset::$1 [45] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [52] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [67] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [71] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [83] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [87] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_line::$12 [135] if((word) bitmap_line::dx#0>(word) bitmap_line::dy#0) goto bitmap_line::@2 +Simple Condition (bool~) bitmap_line::$21 [149] if((word) bitmap_line::dy#0>=(word) bitmap_line::e#1) goto bitmap_line::@8 +Simple Condition (bool~) bitmap_line::$22 [152] if((word) bitmap_line::y#1!=(word) bitmap_line::y2#11) goto bitmap_line::@7 +Simple Condition (bool~) bitmap_line::$27 [166] if((word) bitmap_line::dx#0>=(word) bitmap_line::e1#1) goto bitmap_line::@13 +Simple Condition (bool~) bitmap_line::$28 [169] if((word) bitmap_line::x#15!=(word) bitmap_line::x2#10) goto bitmap_line::@12 +Simple Condition (bool~) abs_u16::$3 [176] if((byte) 0!=(byte~) abs_u16::$1) goto abs_u16::@1 +Simple Condition (bool~) sgn_u16::$2 [184] if((byte) 0!=(byte~) sgn_u16::$1) goto sgn_u16::@1 +Simple Condition (bool~) mulf_init::$0 [196] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [200] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [217] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [223] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf16s::$4 [243] if((signed word) mulf16s::a#4>=(signed byte) 0) goto mulf16s::@1 +Simple Condition (bool~) mulf16s::$6 [246] if((signed word) mulf16s::b#4>=(signed byte) 0) goto mulf16s::@2 +Simple Condition (bool~) main::$7 [298] if(*((const byte*) RASTER)!=(byte) $fe) goto main::@5 +Simple Condition (bool~) main::$8 [301] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@7 +Simple Condition (bool~) main::$9 [304] if((byte) main::w#1!=rangelast(0,$3c)) goto main::@5 +Simple Condition (bool~) show_letter::$10 [348] if((byte) show_letter::segment_type#0==(const byte) MOVE_TO) goto show_letter::@2 +Simple Condition (bool~) show_letter::$11 [350] if((byte) show_letter::segment_type#0==(const byte) SPLINE_TO) goto show_letter::@3 +Simple Condition (bool~) show_letter::$19 [366] if((byte) show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 +Simple Condition (bool~) bitmap_plot_spline_8seg::$5 [385] if((byte) bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [167] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 -Rewriting && if()-condition to two if()s [166] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 +Rewriting ! if()-condition to reversed if() [124] (bool~) bitmap_line::$7 ← ! (bool~) bitmap_line::$6 +Rewriting && if()-condition to two if()s [123] (bool~) bitmap_line::$6 ← (bool~) bitmap_line::$4 && (bool~) bitmap_line::$5 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [54] (byte~) spline_8segB::$32 ← (byte) 8 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 -Constant right-side identified [526] (byte~) bitmap_plot_spline_8seg::$6 ← (byte) 0 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 +Constant right-side identified [39] (byte~) spline_8segB::$32 ← (byte) 8 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 +Constant right-side identified [368] (byte~) bitmap_plot_spline_8seg::$6 ← (byte) 0 * (const byte) SIZEOF_STRUCT_SPLINEVECTOR16 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) spline_8segB::n#0 = 0 Constant (const byte) spline_8segB::$32 = 8*SIZEOF_STRUCT_SPLINEVECTOR16 @@ -3624,33 +3624,33 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [402] if(true) goto main::@2 -if() condition always true - replacing block destination [425] if(true) goto main::@14 +if() condition always true - replacing block destination [289] if(true) goto main::@2 +if() condition always true - replacing block destination [307] if(true) goto main::@14 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [46] spline_8segB::n#1 ← ++ spline_8segB::n#2 to ++ -Resolved ranged comparison value [48] if(spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 to (number) 8 -Resolved ranged next value [92] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [94] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [112] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [114] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [419] main::w#1 ← ++ main::w#4 to ++ -Resolved ranged comparison value [421] if(main::w#1!=rangelast(0,$3c)) goto main::@5 to (number) $3d -Resolved ranged next value [522] show_letter::i#1 ← ++ show_letter::i#10 to ++ -Resolved ranged comparison value [524] if(show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 to (number) $16 -Resolved ranged next value [546] bitmap_plot_spline_8seg::n#1 ← ++ bitmap_plot_spline_8seg::n#2 to ++ -Resolved ranged comparison value [548] if(bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 to (number) 9 +Resolved ranged next value [32] spline_8segB::n#1 ← ++ spline_8segB::n#2 to ++ +Resolved ranged comparison value [34] if(spline_8segB::n#1!=rangelast(0,7)) goto spline_8segB::@1 to (number) 8 +Resolved ranged next value [69] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [71] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [85] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [87] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [302] main::w#1 ← ++ main::w#4 to ++ +Resolved ranged comparison value [304] if(main::w#1!=rangelast(0,$3c)) goto main::@5 to (number) $3d +Resolved ranged next value [364] show_letter::i#1 ← ++ show_letter::i#10 to ++ +Resolved ranged comparison value [366] if(show_letter::i#1!=rangelast(0,$15)) goto show_letter::@1 to (number) $16 +Resolved ranged next value [383] bitmap_plot_spline_8seg::n#1 ← ++ bitmap_plot_spline_8seg::n#2 to ++ +Resolved ranged comparison value [385] if(bitmap_plot_spline_8seg::n#1!=rangelast(1,8)) goto bitmap_plot_spline_8seg::@1 to (number) 9 Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_STRUCT_SPLINEVECTOR16 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [36] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$23 -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [55] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) spline_8segB::$32) ← (signed word~) spline_8segB::$19 -Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_TO in [438] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$20) -Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_VIA in [460] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$21) -Simplifying expression containing zero (byte*)letter_c in [482] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TYPE + (byte~) show_letter::$22) -Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X in [527] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) bitmap_plot_spline_8seg::$6) -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [527] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X) -Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y in [528] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (const byte) bitmap_plot_spline_8seg::$6) -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [534] (word) bitmap_line::x2#1 ← (word)*((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$7) -Simplifying expression containing zero (signed word*)SPLINE_8SEG in [544] (signed word) bitmap_plot_spline_8seg::current_x#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$9) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [26] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) spline_8segB::$31) ← (signed word~) spline_8segB::$23 +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [40] *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) spline_8segB::$32) ← (signed word~) spline_8segB::$19 +Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_TO in [316] (signed word) show_letter::to_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TO+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$20) +Simplifying expression containing zero (signed word*)(struct SplineVector16*)letter_c+OFFSET_STRUCT_SEGMENT_VIA in [331] (signed word) show_letter::via_x#0 ← *((signed word*)(struct SplineVector16*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_VIA+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) show_letter::$21) +Simplifying expression containing zero (byte*)letter_c in [346] (byte) show_letter::segment_type#0 ← *((byte*)(const struct Segment*) letter_c+(const byte) OFFSET_STRUCT_SEGMENT_TYPE + (byte~) show_letter::$22) +Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_X in [369] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (const byte) bitmap_plot_spline_8seg::$6) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [369] (signed word) bitmap_plot_spline_8seg::current_x#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X) +Simplifying expression containing zero (signed word*)SPLINE_8SEG+OFFSET_STRUCT_SPLINEVECTOR16_Y in [370] (signed word) bitmap_plot_spline_8seg::current_y#0 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_Y + (const byte) bitmap_plot_spline_8seg::$6) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [376] (word) bitmap_line::x2#1 ← (word)*((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$7) +Simplifying expression containing zero (signed word*)SPLINE_8SEG in [381] (signed word) bitmap_plot_spline_8seg::current_x#1 ← *((signed word*)(const struct SplineVector16*) SPLINE_8SEG+(const byte) OFFSET_STRUCT_SPLINEVECTOR16_X + (byte~) bitmap_plot_spline_8seg::$9) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [75] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [77] (void*) memset::return#3 ← (void*) memset::str#3 @@ -3692,14 +3692,14 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Alias (byte~) bitmap_plot_spline_8seg::$8 = (byte~) bitmap_plot_spline_8seg::$7 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) bitmap_line::$4 [96] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 -Simple Condition (bool~) bitmap_line::$5 [338] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 +Simple Condition (bool~) bitmap_line::$4 [95] if((word) bitmap_line::dx#0==(byte) 0) goto bitmap_line::@24 +Simple Condition (bool~) bitmap_line::$5 [336] if((word) bitmap_line::dy#0==(byte) 0) goto bitmap_line::@4 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [96] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 +Negating conditional jump and destination [95] if((word) bitmap_line::dx#0!=(byte) 0) goto bitmap_line::@1 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [207] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 -Constant right-side identified [211] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [214] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [206] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 +Constant right-side identified [210] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [213] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::vicSelectGfxBank1_toDd001_$1 = >main::vicSelectGfxBank1_toDd001_$0 Constant (const word) main::toD0181_$1 = main::toD0181_$0&$3fff diff --git a/src/test/ref/complex/tetris/test-sprites.asm b/src/test/ref/complex/tetris/test-sprites.asm index a3eed5cc9..ff285e9c1 100644 --- a/src/test/ref/complex/tetris/test-sprites.asm +++ b/src/test/ref/complex/tetris/test-sprites.asm @@ -64,21 +64,28 @@ .label irq_cnt = 8 .label sin_idx = 3 __b1: + // render_screen_showing = 0 // The screen currently being showed to the user. 0x00 for screen 1 / 0x20 for screen 2. lda #0 sta.z render_screen_showing + // kickasm + // irq_raster_next = IRQ_RASTER_FIRST // The raster line of the next IRQ lda #IRQ_RASTER_FIRST sta.z irq_raster_next + // irq_sprite_ypos = SPRITES_FIRST_YPOS + 21 // Y-pos of the sprites on the next IRQ lda #SPRITES_FIRST_YPOS+$15 sta.z irq_sprite_ypos + // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES) + 3 // Index of the sprites to show on the next IRQ lda #toSpritePtr1_return+3 sta.z irq_sprite_ptr + // irq_cnt = 0 // Counting the 10 IRQs lda #0 sta.z irq_cnt + // kickasm jsr main rts main: { @@ -87,13 +94,18 @@ main: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .label xpos = 3 .label ypos = 2 + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(PLAYFIELD_SCREEN_1, PLAYFIELD_CHARSET) lda #toD0181_return sta D018 + // sprites_init() jsr sprites_init + // *SPRITES_ENABLE = 0xff lda #$ff sta SPRITES_ENABLE lda #$32 @@ -102,30 +114,42 @@ main: { sta.z xpos ldy #4 __b1: + // s2 = s*2 tya asl tax + // SPRITES_XPOS[s2] = xpos lda.z xpos sta SPRITES_XPOS,x + // SPRITES_YPOS[s2] = ypos lda.z ypos sta SPRITES_YPOS,x + // s-3 tya sec sbc #3 + // SPRITES_COLS[s] = s-3 sta SPRITES_COLS,y + // PLAYFIELD_SPRITE_PTRS_1[s] = toSpritePtr(SIN_SPRITE) lda #toSpritePtr2_return sta PLAYFIELD_SPRITE_PTRS_1,y + // xpos += 24 lax.z xpos axs #-[$18] stx.z xpos + // ypos += 24 lax.z ypos axs #-[$18] stx.z ypos + // for(char s:4..7) iny cpy #8 bne __b1 + // sprites_irq_init() jsr sprites_irq_init + // loop() jsr loop + // } rts } loop: { @@ -133,85 +157,114 @@ loop: { lda #0 sta.z sin_idx __b2: + // while (*RASTER!=0xff) lda #$ff cmp RASTER bne __b2 + // idx = sin_idx ldx.z sin_idx lda #4 sta.z s __b4: + // s*2 lda.z s asl + // SPRITES_YPOS[s*2] = SIN[idx] tay lda SIN,x sta SPRITES_YPOS,y + // idx += 10 txa axs #-[$a] + // for(char s:4..7) inc.z s lda #8 cmp.z s bne __b4 + // sin_idx++; inc.z sin_idx jmp __b2 } // Setup the IRQ sprites_irq_init: { + // asm sei + // *IRQ_STATUS = IRQ_RASTER // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS + // asm lda CIA1_INTERRUPT + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=0x7f // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = IRQ_RASTER_FIRST lda #IRQ_RASTER_FIRST sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &sprites_irq // Set the IRQ routine lda #sprites_irq sta HARDWARE_IRQ+1 + // asm cli + // } rts } // Setup the sprites sprites_init: { .label xpos = 3 + // *SPRITES_ENABLE = %00001111 lda #$f sta SPRITES_ENABLE + // *SPRITES_MC = 0 lda #0 sta SPRITES_MC + // *SPRITES_EXPAND_Y = *SPRITES_MC = 0 sta SPRITES_EXPAND_Y + // *SPRITES_EXPAND_X = *SPRITES_EXPAND_Y = *SPRITES_MC = 0 sta SPRITES_EXPAND_X lda #$18+$f*8 sta.z xpos ldy #0 __b1: + // s2 = s*2 tya asl tax + // SPRITES_XPOS[s2] = xpos lda.z xpos sta SPRITES_XPOS,x + // SPRITES_COLS[s] = BLACK lda #BLACK sta SPRITES_COLS,y + // xpos = xpos+24 lax.z xpos axs #-[$18] stx.z xpos + // for(char s:0..3) iny cpy #4 bne __b1 + // } rts } // Raster Interrupt Routine - sets up the sprites covering the playfield @@ -222,92 +275,131 @@ sprites_irq: { .label raster_sprite_gfx_modify = 9 sta rega+1 stx regx+1 + // asm //(*BGCOL)++; // Clear decimal flag (because it is used by the score algorithm) cld + // ypos = irq_sprite_ypos // Place the sprites lda.z irq_sprite_ypos + // SPRITES_YPOS[0] = ypos sta SPRITES_YPOS + // SPRITES_YPOS[2] = ypos sta SPRITES_YPOS+2 + // SPRITES_YPOS[4] = ypos sta SPRITES_YPOS+4 + // SPRITES_YPOS[6] = ypos sta SPRITES_YPOS+6 + // irq_raster_next+1 ldx.z irq_raster_next inx + // raster_sprite_gfx_modify = irq_raster_next+1 // Wait for the y-position before changing sprite pointers stx.z raster_sprite_gfx_modify __b8: + // while(*RASTER0>>$10 sta.z score_bcd+3 -// Original Color Data + // kickasm + // irq_raster_next = IRQ_RASTER_FIRST // The raster line of the next IRQ lda #IRQ_RASTER_FIRST sta.z irq_raster_next + // irq_sprite_ypos = SPRITES_FIRST_YPOS + 21 // Y-pos of the sprites on the next IRQ lda #SPRITES_FIRST_YPOS+$15 sta.z irq_sprite_ypos + // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES) + 3 // Index of the sprites to show on the next IRQ lda #toSpritePtr1_return+3 sta.z irq_sprite_ptr + // irq_cnt = 0 // Counting the 10 IRQs lda #0 sta.z irq_cnt jsr main rts main: { + // sid_rnd_init() jsr sid_rnd_init + // asm sei + // render_init() jsr render_init + // sprites_init() jsr sprites_init + // sprites_irq_init() jsr sprites_irq_init + // play_init() jsr play_init + // play_spawn_current() lda #0 sta.z game_over sta.z next_piece_idx jsr play_spawn_current + // play_spawn_current() jsr play_spawn_current + // render_playfield() ldx #$20 jsr render_playfield ldx.z current_ypos @@ -217,10 +228,12 @@ main: { sta.z current_piece_gfx_1+1 lda.z current_piece_char sta.z current_piece_char_1 + // render_moving() lda #$20 sta.z render_screen_render_1 jsr render_moving ldx.z play_spawn_current.piece_idx + // render_next() lda #$20 jsr render_next ldy.z play_spawn_current.__7 @@ -247,25 +260,36 @@ main: { __b1: // Wait for a frame to pass __b2: + // while(*RASTER!=0xff) lda #$ff cmp RASTER bne __b2 + // render_show() jsr render_show + // keyboard_event_scan() jsr keyboard_event_scan + // keyboard_event_get() jsr keyboard_event_get + // key_event = keyboard_event_get() + // if(game_over==0) lda.z game_over cmp #0 beq __b4 __b5: + // (*BORDERCOL)++; inc BORDERCOL jmp __b5 __b4: + // play_movement(key_event) stx.z play_movement.key_event jsr play_movement lda.z play_movement.return + // render = play_movement(key_event) + // if(render!=0) cmp #0 beq __b1 ldx.z render_screen_render + // render_playfield() jsr render_playfield ldx.z current_ypos lda.z render_screen_render @@ -278,22 +302,29 @@ main: { sta.z current_piece_gfx_1+1 lda.z current_piece_char sta.z current_piece_char_1 + // render_moving() jsr render_moving lda.z render_screen_render ldx.z next_piece_idx + // render_next() jsr render_next + // render_score() jsr render_score + // render_screen_swap() jsr render_screen_swap jmp __b1 } // Swap rendering to the other screen (used for double buffering) render_screen_swap: { + // render_screen_render ^= 0x20 lda #$20 eor.z render_screen_render sta.z render_screen_render + // render_screen_show ^= 0x20 lda #$20 eor.z render_screen_show sta.z render_screen_show + // } rts } // Show the current score @@ -303,6 +334,7 @@ render_score: { .const lines_offset = $28*1+$16 .const level_offset = $28*$13+$1f .label screen = $23 + // if(render_screen_render==0) lda.z render_screen_render cmp #0 beq __b1 @@ -317,6 +349,7 @@ render_score: { lda #>PLAYFIELD_SCREEN_1 sta.z screen+1 __b2: + // render_bcd( screen, score_offset, score_bytes[2], 0) ldx score_bytes+2 ldy #0 lda #score_offset sta.z render_bcd.offset+1 jsr render_bcd + // render_bcd( screen, score_offset+2, score_bytes[1], 0) ldx score_bytes+1 ldy #0 lda #score_offset+2 sta.z render_bcd.offset+1 jsr render_bcd + // render_bcd( screen, score_offset+4, score_bytes[0], 0) ldx.z score_bytes ldy #0 lda #score_offset+4 sta.z render_bcd.offset+1 jsr render_bcd + // render_bcd( screen, lines_offset, >lines_bcd, 1) lda.z lines_bcd+1 tax ldy #1 @@ -346,6 +382,7 @@ render_score: { lda #>lines_offset sta.z render_bcd.offset+1 jsr render_bcd + // render_bcd( screen, lines_offset+1, lines_offset+1 sta.z render_bcd.offset+1 jsr render_bcd + // render_bcd( screen, level_offset, level_bcd, 0) ldx.z level_bcd ldy #0 lda #level_offset sta.z render_bcd.offset+1 jsr render_bcd + // } rts } // Render BCD digits on a screen. @@ -374,6 +413,7 @@ render_bcd: { .label screen = $23 .label screen_pos = $21 .label offset = $21 + // screen_pos = screen+offset lda.z screen_pos clc adc.z screen @@ -381,28 +421,37 @@ render_bcd: { lda.z screen_pos+1 adc.z screen+1 sta.z screen_pos+1 + // if(only_low==0) cpy #0 bne __b1 + // bcd >> 4 txa lsr lsr lsr lsr + // ZERO_CHAR + (bcd >> 4) clc adc #ZERO_CHAR + // *screen_pos++ = ZERO_CHAR + (bcd >> 4) ldy #0 sta (screen_pos),y + // *screen_pos++ = ZERO_CHAR + (bcd >> 4); inc.z screen_pos bne !+ inc.z screen_pos+1 !: __b1: + // bcd & 0x0f txa and #$f + // ZERO_CHAR + (bcd & 0x0f) clc adc #ZERO_CHAR + // *screen_pos++ = ZERO_CHAR + (bcd & 0x0f) ldy #0 sta (screen_pos),y + // } rts } // Render the next tetromino in the "next" area @@ -413,6 +462,7 @@ render_next: { .label next_piece_gfx = $23 .label screen_next_area = $21 .label l = 8 + // if(render_screen_render==0) cmp #0 beq __b1 lda #PLAYFIELD_SCREEN_1+next_area_offset sta.z screen_next_area+1 __b2: + // next_piece_gfx = PIECES[next_piece_idx] txa asl tay + // next_piece_char = PIECES_NEXT_CHARS[next_piece_idx] lda PIECES_NEXT_CHARS,x sta.z next_piece_char lda PIECES,y @@ -440,25 +492,31 @@ render_next: { __b3: ldx #0 __b4: + // cell = *next_piece_gfx++ ldy #0 lda (next_piece_gfx),y inc.z next_piece_gfx bne !+ inc.z next_piece_gfx+1 !: + // if(cell!=0) cmp #0 bne __b5 + // *screen_next_area = 0 lda #0 tay sta (screen_next_area),y __b6: + // screen_next_area++; inc.z screen_next_area bne !+ inc.z screen_next_area+1 !: + // for(char c:0..3) inx cpx #4 bne __b4 + // screen_next_area += 36 lda #$24 clc adc.z screen_next_area @@ -466,12 +524,15 @@ render_next: { bcc !+ inc.z screen_next_area+1 !: + // for(char l:0..3) inc.z l lda #4 cmp.z l bne __b3 + // } rts __b5: + // *screen_next_area = next_piece_char lda.z next_piece_char ldy #0 sta (screen_next_area),y @@ -485,48 +546,62 @@ render_moving: { .label xpos = $20 .label i = $1f .label l = $d + // ypos = current_ypos stx.z ypos lda #0 sta.z l sta.z i __b1: + // if(ypos>1) lda.z ypos cmp #1+1 bcs __b2 + // i += 4 lax.z i axs #-[4] stx.z i __b3: + // ypos++; inc.z ypos + // for(char l:0..3) inc.z l lda #4 cmp.z l bne __b1 + // } rts __b2: + // render_screen_render+ypos lda.z render_screen_render_1 clc adc.z ypos + // screen_line = screen_lines_1[render_screen_render+ypos] asl tay lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 + // xpos = current_xpos lda.z current_xpos_1 sta.z xpos ldx #0 __b4: + // current_cell = current_piece_gfx[i++] ldy.z i lda (current_piece_gfx_1),y inc.z i + // if(current_cell!=0) cmp #0 beq __b5 + // screen_line[xpos] = current_piece_char lda.z current_piece_char_1 ldy.z xpos sta (screen_line),y __b5: + // xpos++; inc.z xpos + // for(char c:0..3) inx cpx #4 bne __b4 @@ -544,9 +619,11 @@ render_playfield: { lda #2 sta.z l __b1: + // render_screen_render+l txa clc adc.z l + // screen_line = screen_lines_1[render_screen_render+l] asl tay lda screen_lines_1,y @@ -556,23 +633,28 @@ render_playfield: { lda #0 sta.z c __b2: + // *(screen_line++) = playfield[i++] ldy.z i lda playfield,y ldy #0 sta (screen_line),y + // *(screen_line++) = playfield[i++]; inc.z screen_line bne !+ inc.z screen_line+1 !: inc.z i + // for(char c:0..PLAYFIELD_COLS-1) inc.z c lda #PLAYFIELD_COLS-1+1 cmp.z c bne __b2 + // for(char l:2..PLAYFIELD_LINES-1) inc.z l lda #PLAYFIELD_LINES-1+1 cmp.z l bne __b1 + // } rts } // Perform any movement of the current piece @@ -583,22 +665,30 @@ play_movement: { .label render = $d .label return = $d .label key_event = $1f + // play_move_down(key_event) lda.z key_event jsr play_move_down txa + // render += play_move_down(key_event) sta.z render + // if(game_over!=0) lda.z game_over cmp #0 beq __b1 + // } rts __b1: + // play_move_leftright(key_event) lda.z key_event jsr play_move_leftright + // render += play_move_leftright(key_event) clc adc.z render sta.z render + // play_move_rotate(key_event) lda.z key_event jsr play_move_rotate + // render += play_move_rotate(key_event) clc adc.z return sta.z return @@ -610,19 +700,25 @@ play_movement: { play_move_rotate: { // Handle keyboard events .label orientation = $1f + // if(key_event==KEY_Z) cmp #KEY_Z beq __b1 + // if(key_event==KEY_X) cmp #KEY_X beq __b2 b1: lda #0 + // } rts __b2: + // current_orientation+0x10 lax.z current_orientation axs #-[$10] + // orientation = (current_orientation+0x10)&0x3f lda #$3f sax.z orientation __b3: + // play_collision(current_xpos, current_ypos, orientation) lda.z current_xpos sta.z play_collision.xpos lda.z current_ypos @@ -632,11 +728,16 @@ play_move_rotate: { sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 + // play_collision(current_xpos, current_ypos, orientation) jsr play_collision + // play_collision(current_xpos, current_ypos, orientation) + // if(play_collision(current_xpos, current_ypos, orientation) == COLLISION_NONE) cmp #COLLISION_NONE bne b1 + // current_orientation = orientation lda.z orientation sta.z current_orientation + // current_piece_gfx = current_piece + current_orientation clc adc.z current_piece sta.z current_piece_gfx @@ -646,8 +747,10 @@ play_move_rotate: { lda #1 rts __b1: + // current_orientation-0x10 lax.z current_orientation axs #$10 + // orientation = (current_orientation-0x10)&0x3f lda #$3f sax.z orientation jmp __b3 @@ -665,6 +768,7 @@ play_collision: { .label xp = $b .label l = 9 .label i_1 = $a + // piece_gfx = current_piece + orientation txa clc adc.z piece_gfx @@ -676,6 +780,7 @@ play_collision: { sta.z l sta.z i_1 __b1: + // playfield_line = playfield_lines[yp] lda.z yp asl tay @@ -687,6 +792,7 @@ play_collision: { sta.z xp ldx #0 __b2: + // if(piece_gfx[i++]!=0) ldy.z i_1 iny sty.z i @@ -694,37 +800,47 @@ play_collision: { lda (piece_gfx),y cmp #0 beq __b3 + // if(yp>=PLAYFIELD_LINES) lda.z yp cmp #PLAYFIELD_LINES bcc __b4 lda #COLLISION_BOTTOM rts __b4: + // xp&0x80 lda #$80 and.z xp + // if((xp&0x80)!=0) cmp #0 beq __b5 lda #COLLISION_LEFT rts __b5: + // if(xp>=PLAYFIELD_COLS) lda.z xp cmp #PLAYFIELD_COLS bcc __b6 lda #COLLISION_RIGHT rts __b6: + // if(playfield_line[xp]!=0) ldy.z xp lda (playfield_line),y cmp #0 beq __b3 lda #COLLISION_PLAYFIELD + // } rts __b3: + // xp++; inc.z xp + // for(char c:0..3) inx cpx #4 bne __b10 + // yp++; inc.z yp + // for(char l:0..3) inc.z l lda #4 cmp.z l @@ -744,11 +860,14 @@ play_collision: { // Return non-zero if a render is needed // play_move_leftright(byte register(A) key_event) play_move_leftright: { + // if(key_event==KEY_COMMA) // Handle keyboard events cmp #KEY_COMMA beq __b1 + // if(key_event==KEY_DOT) cmp #KEY_DOT bne b2 + // play_collision(current_xpos+1,current_ypos,current_orientation) ldy.z current_xpos iny sty.z play_collision.xpos @@ -759,17 +878,23 @@ play_move_leftright: { sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 + // play_collision(current_xpos+1,current_ypos,current_orientation) jsr play_collision + // play_collision(current_xpos+1,current_ypos,current_orientation) + // if(play_collision(current_xpos+1,current_ypos,current_orientation)==COLLISION_NONE) cmp #COLLISION_NONE bne b2 + // current_xpos++; inc.z current_xpos b1: lda #1 rts b2: lda #0 + // } rts __b1: + // play_collision(current_xpos-1,current_ypos,current_orientation) ldx.z current_xpos dex stx.z play_collision.xpos @@ -780,9 +905,13 @@ play_move_leftright: { sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 + // play_collision(current_xpos-1,current_ypos,current_orientation) jsr play_collision + // play_collision(current_xpos-1,current_ypos,current_orientation) + // if(play_collision(current_xpos-1,current_ypos,current_orientation)==COLLISION_NONE) cmp #COLLISION_NONE bne b2 + // current_xpos--; dec.z current_xpos jmp b1 } @@ -790,7 +919,9 @@ play_move_leftright: { // Return non-zero if a render is needed // play_move_down(byte register(A) key_event) play_move_down: { + // ++current_movedown_counter; inc.z current_movedown_counter + // if(key_event==KEY_SPACE) cmp #KEY_SPACE bne b1 ldx #1 @@ -798,23 +929,32 @@ play_move_down: { b1: ldx #0 __b1: + // keyboard_event_pressed(KEY_SPACE) lda #KEY_SPACE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed + // keyboard_event_pressed(KEY_SPACE) + // if(keyboard_event_pressed(KEY_SPACE)!=0) cmp #0 beq __b2 + // if(current_movedown_counter>=current_movedown_fast) lda.z current_movedown_counter cmp #current_movedown_fast bcc __b2 + // movedown++; inx __b2: + // if(current_movedown_counter>=current_movedown_slow) lda.z current_movedown_counter cmp.z current_movedown_slow bcc __b3 + // movedown++; inx __b3: + // if(movedown!=0) cpx #0 beq b2 + // play_collision(current_xpos,current_ypos+1,current_orientation) ldy.z current_ypos iny sty.z play_collision.ypos @@ -825,14 +965,23 @@ play_move_down: { sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 + // play_collision(current_xpos,current_ypos+1,current_orientation) jsr play_collision + // play_collision(current_xpos,current_ypos+1,current_orientation) + // if(play_collision(current_xpos,current_ypos+1,current_orientation)==COLLISION_NONE) cmp #COLLISION_NONE beq __b10 + // play_lock_current() jsr play_lock_current + // play_remove_lines() jsr play_remove_lines + // play_remove_lines() lda.z play_remove_lines.removed + // removed = play_remove_lines() + // play_update_score(removed) tax jsr play_update_score + // play_spawn_current() jsr play_spawn_current ldy.z play_spawn_current.__7 lda PIECES,y @@ -852,8 +1001,10 @@ play_move_down: { rts b2: ldx #0 + // } rts __b10: + // current_ypos++; inc.z current_ypos jmp __b11 } @@ -864,17 +1015,23 @@ play_spawn_current: { // Spawn a new next piece // Pick a random piece (0-6) .label piece_idx = 5 + // current_piece_idx = next_piece_idx // Move next piece into current ldx.z next_piece_idx + // current_piece = PIECES[current_piece_idx] txa asl sta.z __7 + // current_piece_char = PIECES_CHARS[current_piece_idx] lda PIECES_CHARS,x sta.z current_piece_char + // current_xpos = PIECES_START_X[current_piece_idx] lda PIECES_START_X,x sta.z current_xpos + // current_ypos = PIECES_START_Y[current_piece_idx] lda PIECES_START_Y,x sta.z current_ypos + // play_collision(current_xpos,current_ypos,current_orientation) lda.z current_xpos sta.z play_collision.xpos lda.z current_ypos @@ -884,8 +1041,11 @@ play_spawn_current: { sta.z current_piece_1 lda PIECES+1,y sta.z current_piece_1+1 + // play_collision(current_xpos,current_ypos,current_orientation) ldx #0 jsr play_collision + // play_collision(current_xpos,current_ypos,current_orientation) + // if(play_collision(current_xpos,current_ypos,current_orientation)==COLLISION_PLAYFIELD) cmp #COLLISION_PLAYFIELD bne __b1 lda #1 @@ -894,12 +1054,16 @@ play_spawn_current: { lda #7 sta.z piece_idx __b2: + // while(piece_idx==7) lda #7 cmp.z piece_idx beq sid_rnd1 + // } rts sid_rnd1: + // return *SID_VOICE3_OSC; lda SID_VOICE3_OSC + // piece_idx = sid_rnd()&7 and #7 sta.z piece_idx jmp __b2 @@ -909,11 +1073,15 @@ play_spawn_current: { play_update_score: { .label lines_before = $25 .label add_bcd = $26 + // if(removed!=0) cpx #0 beq __breturn + // 29) // Update speed of moving tetrominos down lda.z level cmp #$1d+1 bcs b1 + // current_movedown_slow = MOVEDOWN_SLOW_SPEEDS[level] tay lda MOVEDOWN_SLOW_SPEEDS,y sta.z current_movedown_slow @@ -971,20 +1151,26 @@ play_increase_level: { lda #1 sta.z current_movedown_slow __b1: + // level_bcd++; inc.z level_bcd + // level_bcd&0xf lda #$f and.z level_bcd + // if((level_bcd&0xf)==0xa) cmp #$a bne __b2 + // level_bcd += 6 // If level low nybble hits 0xa change to 0x10 lax.z level_bcd axs #-[6] stx.z level_bcd __b2: + // asm // Increase the score values gained sed ldx #0 __b5: + // score_add_bcd[b] += SCORE_BASE_BCD[b] txa asl asl @@ -1002,10 +1188,13 @@ play_increase_level: { lda score_add_bcd+3,y adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y + // for(char b: 0..4) inx cpx #5 bne __b5 + // asm cld + // } rts } // Look through the playfield for lines - and remove any lines found @@ -1030,40 +1219,53 @@ play_remove_lines: { lda #0 sta.z x __b2: + // c = playfield[r--] lda playfield,y sta.z c dey + // if(c==0) cmp #0 bne __b3 lda #0 sta.z full __b3: + // playfield[w--] = c lda.z c sta playfield,x + // playfield[w--] = c; dex + // for(char x:0..PLAYFIELD_COLS-1) inc.z x lda #PLAYFIELD_COLS-1+1 cmp.z x bne __b2 + // if(full==1) lda #1 cmp.z full bne __b6 + // w = w + PLAYFIELD_COLS txa axs #-[PLAYFIELD_COLS] + // removed++; inc.z removed __b6: + // for(char y:0..PLAYFIELD_LINES-1) inc.z y lda #PLAYFIELD_LINES-1+1 cmp.z y bne __b1 b1: // Write zeros in the rest of the lines + // while(w!=0xff) cpx #$ff bne __b8 + // } rts __b8: + // playfield[w--] = 0 lda #0 sta playfield,x + // playfield[w--] = 0; dex jmp b1 } @@ -1075,10 +1277,12 @@ play_lock_current: { .label i = $2e .label l = $b .label i_1 = $c + // yp = current_ypos lda #0 sta.z l sta.z i_1 __b1: + // playfield_line = playfield_lines[yp] lda.z yp asl tay @@ -1086,10 +1290,12 @@ play_lock_current: { sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 + // xp = current_xpos lda.z current_xpos sta.z xp ldx #0 __b2: + // if(current_piece_gfx[i++]!=0) ldy.z i_1 iny sty.z i @@ -1097,19 +1303,25 @@ play_lock_current: { lda (current_piece_gfx),y cmp #0 beq __b3 + // playfield_line[xp] = current_piece_char lda.z current_piece_char ldy.z xp sta (playfield_line),y __b3: + // xp++; inc.z xp + // for(char c:0..3) inx cpx #4 bne __b7 + // yp++; inc.z yp + // for(char l:0..3) inc.z l lda #4 cmp.z l bne __b6 + // } rts __b6: lda.z i @@ -1126,33 +1338,41 @@ play_lock_current: { keyboard_event_pressed: { .label row_bits = $2d .label keycode = $d + // keycode>>3 lda.z keycode lsr lsr lsr + // row_bits = keyboard_scan_values[keycode>>3] tay lda keyboard_scan_values,y sta.z row_bits + // keycode&7 lda #7 and.z keycode + // row_bits & keyboard_matrix_col_bitmask[keycode&7] tay lda keyboard_matrix_col_bitmask,y and.z row_bits + // } rts } // Get the next event from the keyboard event buffer. // Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process. // The buffer is filled by keyboard_event_scan() keyboard_event_get: { + // if(keyboard_events_size==0) lda.z keyboard_events_size cmp #0 beq b1 + // return keyboard_events[--keyboard_events_size]; dec.z keyboard_events_size ldy.z keyboard_events_size ldx keyboard_events,y rts b1: ldx #$ff + // } rts } // Scans the entire matrix to determine which keys have been pressed/depressed. @@ -1167,75 +1387,107 @@ keyboard_event_scan: { sta.z keycode sta.z row __b7: + // keyboard_matrix_read(row) ldx.z row jsr keyboard_matrix_read + // row_scan = keyboard_matrix_read(row) sta.z row_scan + // if(row_scan!=keyboard_scan_values[row]) ldy.z row cmp keyboard_scan_values,y bne b2 + // keycode = keycode + 8 lax.z keycode axs #-[8] stx.z keycode __b8: + // for(byte row : 0..7) inc.z row lda #8 cmp.z row bne __b7 + // keyboard_event_pressed(KEY_LSHIFT) lda #KEY_LSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed + // keyboard_event_pressed(KEY_LSHIFT) + // if(keyboard_event_pressed(KEY_LSHIFT)!= 0) cmp #0 + // keyboard_event_pressed(KEY_RSHIFT) lda #KEY_RSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed + // keyboard_event_pressed(KEY_RSHIFT) + // if(keyboard_event_pressed(KEY_RSHIFT)!= 0) cmp #0 + // keyboard_event_pressed(KEY_CTRL) lda #KEY_CTRL sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed + // keyboard_event_pressed(KEY_CTRL) + // if(keyboard_event_pressed(KEY_CTRL)!= 0) cmp #0 + // keyboard_event_pressed(KEY_COMMODORE) lda #KEY_COMMODORE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed + // keyboard_event_pressed(KEY_COMMODORE) + // if(keyboard_event_pressed(KEY_COMMODORE)!= 0) cmp #0 + // } rts // Something has changed on the keyboard row - check each column b2: ldx #0 __b9: + // row_scan^keyboard_scan_values[row] lda.z row_scan ldy.z row eor keyboard_scan_values,y + // (row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col] and keyboard_matrix_col_bitmask,x + // if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) cmp #0 beq __b10 + // if(keyboard_events_size!=8) lda #8 cmp.z keyboard_events_size beq __b10 + // event_type = row_scan&keyboard_matrix_col_bitmask[col] lda keyboard_matrix_col_bitmask,x and.z row_scan + // if(event_type==0) cmp #0 beq __b11 + // keyboard_events[keyboard_events_size++] = keycode // Key pressed lda.z keycode ldy.z keyboard_events_size sta keyboard_events,y + // keyboard_events[keyboard_events_size++] = keycode; inc.z keyboard_events_size __b10: + // keycode++; inc.z keycode + // for(byte col : 0..7) inx cpx #8 bne __b9 + // keyboard_scan_values[row] = row_scan // Store the current keyboard status for the row to debounce lda.z row_scan ldy.z row sta keyboard_scan_values,y jmp __b8 __b11: + // keycode|$40 lda #$40 ora.z keycode + // keyboard_events[keyboard_events_size++] = keycode|$40 // Key released ldy.z keyboard_events_size sta keyboard_events,y + // keyboard_events[keyboard_events_size++] = keycode|$40; inc.z keyboard_events_size jmp __b10 } @@ -1246,29 +1498,38 @@ keyboard_event_scan: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Update 0xD018 to show the current screen (used for double buffering) render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f + // if(render_screen_show==0) lda.z render_screen_show cmp #0 beq toD0181 lda #toD0182_return __b1: + // *D018 = d018val sta D018 + // *BGCOL2 = PIECES_COLORS_1[level] ldy.z level lda PIECES_COLORS_1,y sta BGCOL2 + // *BGCOL3 = PIECES_COLORS_2[level] lda PIECES_COLORS_2,y sta BGCOL3 + // render_screen_showing = render_screen_show lda.z render_screen_show sta.z render_screen_showing + // } rts toD0181: lda #toD0181_return @@ -1287,6 +1548,7 @@ play_init: { sta.z pli+1 ldy #0 __b1: + // playfield_lines[j] = pli tya asl tax @@ -1294,8 +1556,10 @@ play_init: { sta playfield_lines,x lda.z pli+1 sta playfield_lines+1,x + // playfield_lines_idx[j] = idx lda.z idx sta playfield_lines_idx,y + // pli += PLAYFIELD_COLS lda #PLAYFIELD_COLS clc adc.z pli @@ -1303,20 +1567,25 @@ play_init: { bcc !+ inc.z pli+1 !: + // idx += PLAYFIELD_COLS lax.z idx axs #-[PLAYFIELD_COLS] stx.z idx + // for(char j:0..PLAYFIELD_LINES-1) iny cpy #PLAYFIELD_LINES-1+1 bne __b1 + // playfield_lines_idx[PLAYFIELD_LINES] = PLAYFIELD_COLS*PLAYFIELD_LINES lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES + // current_movedown_slow = MOVEDOWN_SLOW_SPEEDS[level] // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta.z current_movedown_slow ldx #0 // Set the initial score add values __b3: + // score_add_bcd[b] = SCORE_BASE_BCD[b] txa asl asl @@ -1329,69 +1598,93 @@ play_init: { sta score_add_bcd+2,y lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y + // for(char b: 0..4) inx cpx #5 bne __b3 + // } rts } // Setup the IRQ sprites_irq_init: { + // asm sei + // *IRQ_STATUS = IRQ_RASTER // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS + // asm lda CIA1_INTERRUPT + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=0x7f // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = IRQ_RASTER_FIRST lda #IRQ_RASTER_FIRST sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &sprites_irq // Set the IRQ routine lda #sprites_irq sta HARDWARE_IRQ+1 + // asm cli + // } rts } // Setup the sprites sprites_init: { .label xpos = $10 + // *SPRITES_ENABLE = %00001111 lda #$f sta SPRITES_ENABLE + // *SPRITES_MC = 0 lda #0 sta SPRITES_MC + // *SPRITES_EXPAND_Y = *SPRITES_MC = 0 sta SPRITES_EXPAND_Y + // *SPRITES_EXPAND_X = *SPRITES_EXPAND_Y = *SPRITES_MC = 0 sta SPRITES_EXPAND_X lda #$18+$f*8 sta.z xpos ldy #0 __b1: + // s2 = s*2 tya asl tax + // SPRITES_XPOS[s2] = xpos lda.z xpos sta SPRITES_XPOS,x + // SPRITES_COLS[s] = BLACK lda #BLACK sta SPRITES_COLS,y + // xpos = xpos+24 lax.z xpos axs #-[$18] stx.z xpos + // for(char s:0..3) iny cpy #4 bne __b1 + // } rts } // Initialize rendering @@ -1400,27 +1693,37 @@ render_init: { // Initialize the screen line pointers; .label li_1 = $11 .label li_2 = $2b + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D011 = VIC_ECM | VIC_DEN | VIC_RSEL | 3 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 + // *BORDERCOL = BLACK lda #BLACK sta BORDERCOL + // *BGCOL1 = BLACK sta BGCOL1 + // *BGCOL2 = PIECES_COLORS_1[0] lda PIECES_COLORS_1 sta BGCOL2 + // *BGCOL3 = PIECES_COLORS_2[0] lda PIECES_COLORS_2 sta BGCOL3 + // *BGCOL4 = GREY lda #GREY sta BGCOL4 + // render_screen_original(PLAYFIELD_SCREEN_1) lda #PLAYFIELD_SCREEN_1 sta.z render_screen_original.screen+1 jsr render_screen_original + // render_screen_original(PLAYFIELD_SCREEN_2) lda #PLAYFIELD_SCREEN_2 @@ -1436,6 +1739,7 @@ render_init: { sta.z li_1+1 ldy #0 __b1: + // screen_lines_1[i] = li_1 tya asl tax @@ -1443,10 +1747,12 @@ render_init: { sta screen_lines_1,x lda.z li_1+1 sta screen_lines_1+1,x + // screen_lines_2[i] = li_2 lda.z li_2 sta screen_lines_2,x lda.z li_2+1 sta screen_lines_2+1,x + // li_1 += 40 lda #$28 clc adc.z li_1 @@ -1454,6 +1760,7 @@ render_init: { bcc !+ inc.z li_1+1 !: + // li_2 += 40 lda #$28 clc adc.z li_2 @@ -1461,9 +1768,11 @@ render_init: { bcc !+ inc.z li_2+1 !: + // for(char i:0..PLAYFIELD_LINES-1) iny cpy #PLAYFIELD_LINES-1+1 bne __b1 + // } rts } // Copy the original screen data to the passed screen @@ -1493,27 +1802,34 @@ render_screen_original: { __b1: ldx #0 __b2: + // *screen++ = SPACE lda #SPACE ldy #0 sta (screen),y + // *screen++ = SPACE; inc.z screen bne !+ inc.z screen+1 !: + // *cols++ = BLACK lda #BLACK ldy #0 sta (cols),y + // *cols++ = BLACK; inc.z cols bne !+ inc.z cols+1 !: + // while(++x!=4) inx cpx #4 bne __b2 __b3: + // *screen++ = *oscr++ ldy #0 lda (oscr),y sta (screen),y + // *screen++ = *oscr++; inc.z screen bne !+ inc.z screen+1 @@ -1522,9 +1838,11 @@ render_screen_original: { bne !+ inc.z oscr+1 !: + // *cols++ = *ocols++ ldy #0 lda (ocols),y sta (cols),y + // *cols++ = *ocols++; inc.z cols bne !+ inc.z cols+1 @@ -1533,41 +1851,52 @@ render_screen_original: { bne !+ inc.z ocols+1 !: + // while(++x!=36) inx cpx #$24 bne __b3 __b4: + // *screen++ = SPACE lda #SPACE ldy #0 sta (screen),y + // *screen++ = SPACE; inc.z screen bne !+ inc.z screen+1 !: + // *cols++ = BLACK lda #BLACK ldy #0 sta (cols),y + // *cols++ = BLACK; inc.z cols bne !+ inc.z cols+1 !: + // while(++x!=40) inx cpx #$28 bne __b4 + // for(char y:0..24) inc.z y lda #$19 cmp.z y bne __b1 + // } rts } // Initialize SID voice 3 for random number generation sid_rnd_init: { + // *SID_VOICE3_FREQ = 0xffff lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 + // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL + // } rts } // Raster Interrupt Routine - sets up the sprites covering the playfield @@ -1578,92 +1907,131 @@ sprites_irq: { .label raster_sprite_gfx_modify = $2f sta rega+1 stx regx+1 + // asm //(*BGCOL)++; // Clear decimal flag (because it is used by the score algorithm) cld + // ypos = irq_sprite_ypos // Place the sprites lda.z irq_sprite_ypos + // SPRITES_YPOS[0] = ypos sta SPRITES_YPOS + // SPRITES_YPOS[2] = ypos sta SPRITES_YPOS+2 + // SPRITES_YPOS[4] = ypos sta SPRITES_YPOS+4 + // SPRITES_YPOS[6] = ypos sta SPRITES_YPOS+6 + // irq_raster_next+1 ldx.z irq_raster_next inx + // raster_sprite_gfx_modify = irq_raster_next+1 // Wait for the y-position before changing sprite pointers stx.z raster_sprite_gfx_modify __b8: + // while(*RASTER (word) lines_bcd#15 - [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 - [89] call render_bcd + [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 + [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 + [87] call render_bcd to:render_score::@6 render_score::@6: scope:[render_score] from render_score::@5 - [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 - [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 - [92] call render_bcd + [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 + [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 + [90] call render_bcd to:render_score::@7 render_score::@7: scope:[render_score] from render_score::@6 - [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 - [94] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 - [95] call render_bcd + [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 + [92] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 + [93] call render_bcd to:render_score::@return render_score::@return: scope:[render_score] from render_score::@7 - [96] return + [94] return to:@return (void()) render_bcd((byte*) render_bcd::screen , (word) render_bcd::offset , (byte) render_bcd::bcd , (byte) render_bcd::only_low) render_bcd: scope:[render_bcd] from render_score::@2 render_score::@3 render_score::@4 render_score::@5 render_score::@6 render_score::@7 - [97] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@3/(byte) render_bcd::bcd#1 render_score::@4/(byte) render_bcd::bcd#2 render_score::@5/(byte) render_bcd::bcd#3 render_score::@6/(byte) render_bcd::bcd#4 render_score::@7/(byte) render_bcd::bcd#5 ) - [97] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) 0 render_score::@3/(byte) 0 render_score::@4/(byte) 0 render_score::@5/(byte) 1 render_score::@6/(byte) 0 render_score::@7/(byte) 0 ) - [97] (word) render_bcd::offset#6 ← phi( render_score::@2/(const word) render_score::score_offset render_score::@3/(const word) render_score::score_offset+(byte) 2 render_score::@4/(const word) render_score::score_offset+(byte) 4 render_score::@5/(const word) render_score::lines_offset render_score::@6/(const word) render_score::lines_offset+(byte) 1 render_score::@7/(const word) render_score::level_offset ) - [97] (byte*) render_bcd::screen#6 ← phi( render_score::@2/(byte*) render_bcd::screen#0 render_score::@3/(byte*) render_bcd::screen#1 render_score::@4/(byte*) render_bcd::screen#2 render_score::@5/(byte*) render_bcd::screen#3 render_score::@6/(byte*) render_bcd::screen#4 render_score::@7/(byte*) render_bcd::screen#5 ) - [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 - [99] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 + [95] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@3/(byte) render_bcd::bcd#1 render_score::@4/(byte) render_bcd::bcd#2 render_score::@5/(byte) render_bcd::bcd#3 render_score::@6/(byte) render_bcd::bcd#4 render_score::@7/(byte) render_bcd::bcd#5 ) + [95] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) 0 render_score::@3/(byte) 0 render_score::@4/(byte) 0 render_score::@5/(byte) 1 render_score::@6/(byte) 0 render_score::@7/(byte) 0 ) + [95] (word) render_bcd::offset#6 ← phi( render_score::@2/(const word) render_score::score_offset render_score::@3/(const word) render_score::score_offset+(byte) 2 render_score::@4/(const word) render_score::score_offset+(byte) 4 render_score::@5/(const word) render_score::lines_offset render_score::@6/(const word) render_score::lines_offset+(byte) 1 render_score::@7/(const word) render_score::level_offset ) + [95] (byte*) render_bcd::screen#6 ← phi( render_score::@2/(byte*) render_bcd::screen#0 render_score::@3/(byte*) render_bcd::screen#1 render_score::@4/(byte*) render_bcd::screen#2 render_score::@5/(byte*) render_bcd::screen#3 render_score::@6/(byte*) render_bcd::screen#4 render_score::@7/(byte*) render_bcd::screen#5 ) + [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 + [97] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 to:render_bcd::@2 render_bcd::@2: scope:[render_bcd] from render_bcd - [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 - [101] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 - [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 - [103] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 + [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 + [99] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 + [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 + [101] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 to:render_bcd::@1 render_bcd::@1: scope:[render_bcd] from render_bcd render_bcd::@2 - [104] (byte*) render_bcd::screen_pos#3 ← phi( render_bcd/(byte*) render_bcd::screen_pos#0 render_bcd::@2/(byte*) render_bcd::screen_pos#2 ) - [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f - [106] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 - [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 + [102] (byte*) render_bcd::screen_pos#3 ← phi( render_bcd/(byte*) render_bcd::screen_pos#0 render_bcd::@2/(byte*) render_bcd::screen_pos#2 ) + [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f + [104] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 + [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 to:render_bcd::@return render_bcd::@return: scope:[render_bcd] from render_bcd::@1 - [108] return + [106] return to:@return (void()) render_next() render_next: scope:[render_next] from main::@16 main::@23 - [109] (byte) next_piece_idx#12 ← phi( main::@16/(byte) next_piece_idx#76 main::@23/(byte) next_piece_idx#77 ) - [109] (byte) render_screen_render#15 ← phi( main::@16/(byte) $20 main::@23/(byte) render_screen_render#65 ) - [110] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 + [107] (byte) next_piece_idx#12 ← phi( main::@16/(byte) next_piece_idx#76 main::@23/(byte) next_piece_idx#77 ) + [107] (byte) render_screen_render#15 ← phi( main::@16/(byte) $20 main::@23/(byte) render_screen_render#65 ) + [108] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 to:render_next::@2 render_next::@1: scope:[render_next] from render_next - [111] phi() + [109] phi() to:render_next::@2 render_next::@2: scope:[render_next] from render_next render_next::@1 - [112] (byte*) render_next::screen_next_area#11 ← phi( render_next::@1/(const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset render_next/(const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset ) - [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 - [114] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) - [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) + [110] (byte*) render_next::screen_next_area#11 ← phi( render_next::@1/(const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset render_next/(const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset ) + [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 + [112] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) + [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) to:render_next::@3 render_next::@3: scope:[render_next] from render_next::@2 render_next::@8 - [116] (byte) render_next::l#7 ← phi( render_next::@8/(byte) render_next::l#1 render_next::@2/(byte) 0 ) - [116] (byte*) render_next::screen_next_area#10 ← phi( render_next::@8/(byte*) render_next::screen_next_area#4 render_next::@2/(byte*) render_next::screen_next_area#11 ) - [116] (byte*) render_next::next_piece_gfx#3 ← phi( render_next::@8/(byte*) render_next::next_piece_gfx#1 render_next::@2/(byte*) render_next::next_piece_gfx#9 ) + [114] (byte) render_next::l#7 ← phi( render_next::@8/(byte) render_next::l#1 render_next::@2/(byte) 0 ) + [114] (byte*) render_next::screen_next_area#10 ← phi( render_next::@8/(byte*) render_next::screen_next_area#4 render_next::@2/(byte*) render_next::screen_next_area#11 ) + [114] (byte*) render_next::next_piece_gfx#3 ← phi( render_next::@8/(byte*) render_next::next_piece_gfx#1 render_next::@2/(byte*) render_next::next_piece_gfx#9 ) to:render_next::@4 render_next::@4: scope:[render_next] from render_next::@3 render_next::@6 - [117] (byte) render_next::c#2 ← phi( render_next::@3/(byte) 0 render_next::@6/(byte) render_next::c#1 ) - [117] (byte*) render_next::screen_next_area#5 ← phi( render_next::@3/(byte*) render_next::screen_next_area#10 render_next::@6/(byte*) render_next::screen_next_area#3 ) - [117] (byte*) render_next::next_piece_gfx#2 ← phi( render_next::@3/(byte*) render_next::next_piece_gfx#3 render_next::@6/(byte*) render_next::next_piece_gfx#1 ) - [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) - [119] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 - [120] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 + [115] (byte) render_next::c#2 ← phi( render_next::@3/(byte) 0 render_next::@6/(byte) render_next::c#1 ) + [115] (byte*) render_next::screen_next_area#5 ← phi( render_next::@3/(byte*) render_next::screen_next_area#10 render_next::@6/(byte*) render_next::screen_next_area#3 ) + [115] (byte*) render_next::next_piece_gfx#2 ← phi( render_next::@3/(byte*) render_next::next_piece_gfx#3 render_next::@6/(byte*) render_next::next_piece_gfx#1 ) + [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) + [117] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 + [118] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 to:render_next::@7 render_next::@7: scope:[render_next] from render_next::@4 - [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 + [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 to:render_next::@6 render_next::@6: scope:[render_next] from render_next::@5 render_next::@7 - [122] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 - [123] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 - [124] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 + [120] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 + [121] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 + [122] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 to:render_next::@8 render_next::@8: scope:[render_next] from render_next::@6 - [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 - [126] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 - [127] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 + [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 + [124] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 + [125] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 to:render_next::@return render_next::@return: scope:[render_next] from render_next::@8 - [128] return + [126] return to:@return render_next::@5: scope:[render_next] from render_next::@4 - [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 + [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 to:render_next::@6 (void()) render_moving() render_moving: scope:[render_moving] from main::@15 main::@22 - [130] (byte) current_piece_char#68 ← phi( main::@15/(byte) current_piece_char#99 main::@22/(byte) current_piece_char#100 ) - [130] (byte*) current_piece_gfx#64 ← phi( main::@15/(byte*) current_piece_gfx#111 main::@22/(byte*) current_piece_gfx#112 ) - [130] (byte) current_xpos#59 ← phi( main::@15/(byte) current_xpos#118 main::@22/(byte) current_xpos#119 ) - [130] (byte) render_screen_render#33 ← phi( main::@15/(byte) $20 main::@22/(byte) render_screen_render#64 ) - [130] (byte) current_ypos#13 ← phi( main::@15/(byte) current_ypos#97 main::@22/(byte) current_ypos#98 ) - [131] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 + [128] (byte) current_piece_char#68 ← phi( main::@15/(byte) current_piece_char#99 main::@22/(byte) current_piece_char#100 ) + [128] (byte*) current_piece_gfx#64 ← phi( main::@15/(byte*) current_piece_gfx#111 main::@22/(byte*) current_piece_gfx#112 ) + [128] (byte) current_xpos#59 ← phi( main::@15/(byte) current_xpos#118 main::@22/(byte) current_xpos#119 ) + [128] (byte) render_screen_render#33 ← phi( main::@15/(byte) $20 main::@22/(byte) render_screen_render#64 ) + [128] (byte) current_ypos#13 ← phi( main::@15/(byte) current_ypos#97 main::@22/(byte) current_ypos#98 ) + [129] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 to:render_moving::@1 render_moving::@1: scope:[render_moving] from render_moving render_moving::@3 - [132] (byte) render_moving::l#4 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::l#1 ) - [132] (byte) render_moving::i#3 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::i#8 ) - [132] (byte) render_moving::ypos#2 ← phi( render_moving/(byte) render_moving::ypos#0 render_moving::@3/(byte) render_moving::ypos#1 ) - [133] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 + [130] (byte) render_moving::l#4 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::l#1 ) + [130] (byte) render_moving::i#3 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::i#8 ) + [130] (byte) render_moving::ypos#2 ← phi( render_moving/(byte) render_moving::ypos#0 render_moving::@3/(byte) render_moving::ypos#1 ) + [131] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 to:render_moving::@7 render_moving::@7: scope:[render_moving] from render_moving::@1 - [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 + [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 to:render_moving::@3 render_moving::@3: scope:[render_moving] from render_moving::@5 render_moving::@7 - [135] (byte) render_moving::i#8 ← phi( render_moving::@5/(byte) render_moving::i#2 render_moving::@7/(byte) render_moving::i#1 ) - [136] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 - [137] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 - [138] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 + [133] (byte) render_moving::i#8 ← phi( render_moving::@5/(byte) render_moving::i#2 render_moving::@7/(byte) render_moving::i#1 ) + [134] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 + [135] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 + [136] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 to:render_moving::@return render_moving::@return: scope:[render_moving] from render_moving::@3 - [139] return + [137] return to:@return render_moving::@2: scope:[render_moving] from render_moving::@1 - [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 - [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 - [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) - [143] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 + [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 + [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 + [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) + [141] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 to:render_moving::@4 render_moving::@4: scope:[render_moving] from render_moving::@2 render_moving::@5 - [144] (byte) render_moving::c#2 ← phi( render_moving::@2/(byte) 0 render_moving::@5/(byte) render_moving::c#1 ) - [144] (byte) render_moving::xpos#2 ← phi( render_moving::@2/(byte) render_moving::xpos#0 render_moving::@5/(byte) render_moving::xpos#1 ) - [144] (byte) render_moving::i#4 ← phi( render_moving::@2/(byte) render_moving::i#3 render_moving::@5/(byte) render_moving::i#2 ) - [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) - [146] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 - [147] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 + [142] (byte) render_moving::c#2 ← phi( render_moving::@2/(byte) 0 render_moving::@5/(byte) render_moving::c#1 ) + [142] (byte) render_moving::xpos#2 ← phi( render_moving::@2/(byte) render_moving::xpos#0 render_moving::@5/(byte) render_moving::xpos#1 ) + [142] (byte) render_moving::i#4 ← phi( render_moving::@2/(byte) render_moving::i#3 render_moving::@5/(byte) render_moving::i#2 ) + [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) + [144] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 + [145] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 to:render_moving::@6 render_moving::@6: scope:[render_moving] from render_moving::@4 - [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 + [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 to:render_moving::@5 render_moving::@5: scope:[render_moving] from render_moving::@4 render_moving::@6 - [149] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 - [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 - [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 + [147] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 + [148] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 + [149] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 to:render_moving::@3 (void()) render_playfield() render_playfield: scope:[render_playfield] from main::@14 main::@7 - [152] (byte) render_screen_render#22 ← phi( main::@7/(byte) render_screen_render#63 main::@14/(byte) $20 ) + [150] (byte) render_screen_render#22 ← phi( main::@7/(byte) render_screen_render#63 main::@14/(byte) $20 ) to:render_playfield::@1 render_playfield::@1: scope:[render_playfield] from render_playfield render_playfield::@3 - [153] (byte) render_playfield::i#3 ← phi( render_playfield/(const byte) PLAYFIELD_COLS*(byte) 2 render_playfield::@3/(byte) render_playfield::i#1 ) - [153] (byte) render_playfield::l#2 ← phi( render_playfield/(byte) 2 render_playfield::@3/(byte) render_playfield::l#1 ) - [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 - [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 - [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) + [151] (byte) render_playfield::i#3 ← phi( render_playfield/(const byte) PLAYFIELD_COLS*(byte) 2 render_playfield::@3/(byte) render_playfield::i#1 ) + [151] (byte) render_playfield::l#2 ← phi( render_playfield/(byte) 2 render_playfield::@3/(byte) render_playfield::l#1 ) + [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 + [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 + [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) to:render_playfield::@2 render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render_playfield::@2 - [157] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte) 0 render_playfield::@2/(byte) render_playfield::c#1 ) - [157] (byte*) render_playfield::screen_line#2 ← phi( render_playfield::@1/(byte*) render_playfield::screen_line#0 render_playfield::@2/(byte*) render_playfield::screen_line#1 ) - [157] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) - [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) - [159] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 - [160] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 - [161] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 - [162] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 + [155] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte) 0 render_playfield::@2/(byte) render_playfield::c#1 ) + [155] (byte*) render_playfield::screen_line#2 ← phi( render_playfield::@1/(byte*) render_playfield::screen_line#0 render_playfield::@2/(byte*) render_playfield::screen_line#1 ) + [155] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) + [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) + [157] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 + [158] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 + [159] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 + [160] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 to:render_playfield::@3 render_playfield::@3: scope:[render_playfield] from render_playfield::@2 - [163] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 - [164] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 + [161] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 + [162] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 to:render_playfield::@return render_playfield::@return: scope:[render_playfield] from render_playfield::@3 - [165] return + [163] return to:@return (byte()) play_movement((byte) play_movement::key_event) play_movement: scope:[play_movement] from main::@4 - [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 - [167] call play_move_down - [168] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 + [164] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 + [165] call play_move_down + [166] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 to:play_movement::@2 play_movement::@2: scope:[play_movement] from play_movement - [169] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 - [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 + [167] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 + [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 to:play_movement::@return play_movement::@return: scope:[play_movement] from play_movement::@2 play_movement::@4 - [171] (byte) current_xpos#19 ← phi( play_movement::@2/(byte) current_xpos#22 play_movement::@4/(byte) current_xpos#26 ) - [171] (byte*) current_piece_gfx#18 ← phi( play_movement::@2/(byte*) current_piece_gfx#20 play_movement::@4/(byte*) current_piece_gfx#21 ) - [171] (byte) current_orientation#17 ← phi( play_movement::@2/(byte) current_orientation#20 play_movement::@4/(byte) current_orientation#25 ) - [171] (byte) play_movement::return#2 ← phi( play_movement::@2/(byte) play_movement::render#1 play_movement::@4/(byte) play_movement::return#0 ) - [172] return + [169] (byte) current_xpos#19 ← phi( play_movement::@2/(byte) current_xpos#22 play_movement::@4/(byte) current_xpos#26 ) + [169] (byte*) current_piece_gfx#18 ← phi( play_movement::@2/(byte*) current_piece_gfx#20 play_movement::@4/(byte*) current_piece_gfx#21 ) + [169] (byte) current_orientation#17 ← phi( play_movement::@2/(byte) current_orientation#20 play_movement::@4/(byte) current_orientation#25 ) + [169] (byte) play_movement::return#2 ← phi( play_movement::@2/(byte) play_movement::render#1 play_movement::@4/(byte) play_movement::return#0 ) + [170] return to:@return play_movement::@1: scope:[play_movement] from play_movement::@2 - [173] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 - [174] call play_move_leftright - [175] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 + [171] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 + [172] call play_move_leftright + [173] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 to:play_movement::@3 play_movement::@3: scope:[play_movement] from play_movement::@1 - [176] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 - [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 - [178] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 - [179] call play_move_rotate - [180] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 + [174] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 + [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 + [176] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 + [177] call play_move_rotate + [178] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 to:play_movement::@4 play_movement::@4: scope:[play_movement] from play_movement::@3 - [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 - [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 + [179] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 + [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 to:play_movement::@return (byte()) play_move_rotate((byte) play_move_rotate::key_event) play_move_rotate: scope:[play_move_rotate] from play_movement::@3 - [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 + [181] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 to:play_move_rotate::@4 play_move_rotate::@4: scope:[play_move_rotate] from play_move_rotate - [184] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 + [182] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 to:play_move_rotate::@return play_move_rotate::@return: scope:[play_move_rotate] from play_move_rotate::@4 play_move_rotate::@5 play_move_rotate::@6 - [185] (byte*) current_piece_gfx#21 ← phi( play_move_rotate::@5/(byte*) current_piece_gfx#7 play_move_rotate::@6/(byte*) current_piece_gfx#20 play_move_rotate::@4/(byte*) current_piece_gfx#20 ) - [185] (byte) current_orientation#25 ← phi( play_move_rotate::@5/(byte) current_orientation#7 play_move_rotate::@6/(byte) current_orientation#20 play_move_rotate::@4/(byte) current_orientation#20 ) - [185] (byte) play_move_rotate::return#2 ← phi( play_move_rotate::@5/(byte) 1 play_move_rotate::@6/(byte) 0 play_move_rotate::@4/(byte) 0 ) - [186] return + [183] (byte*) current_piece_gfx#21 ← phi( play_move_rotate::@5/(byte*) current_piece_gfx#7 play_move_rotate::@6/(byte*) current_piece_gfx#20 play_move_rotate::@4/(byte*) current_piece_gfx#20 ) + [183] (byte) current_orientation#25 ← phi( play_move_rotate::@5/(byte) current_orientation#7 play_move_rotate::@6/(byte) current_orientation#20 play_move_rotate::@4/(byte) current_orientation#20 ) + [183] (byte) play_move_rotate::return#2 ← phi( play_move_rotate::@5/(byte) 1 play_move_rotate::@6/(byte) 0 play_move_rotate::@4/(byte) 0 ) + [184] return to:@return play_move_rotate::@2: scope:[play_move_rotate] from play_move_rotate::@4 - [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 - [188] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f + [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 + [186] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f to:play_move_rotate::@3 play_move_rotate::@3: scope:[play_move_rotate] from play_move_rotate::@1 play_move_rotate::@2 - [189] (byte) play_move_rotate::orientation#3 ← phi( play_move_rotate::@1/(byte) play_move_rotate::orientation#1 play_move_rotate::@2/(byte) play_move_rotate::orientation#2 ) - [190] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 - [191] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 - [192] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 - [193] (byte*) current_piece#98 ← (byte*) current_piece#15 - [194] call play_collision - [195] (byte) play_collision::return#14 ← (byte) play_collision::return#15 + [187] (byte) play_move_rotate::orientation#3 ← phi( play_move_rotate::@1/(byte) play_move_rotate::orientation#1 play_move_rotate::@2/(byte) play_move_rotate::orientation#2 ) + [188] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 + [189] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 + [190] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 + [191] (byte*) current_piece#98 ← (byte*) current_piece#15 + [192] call play_collision + [193] (byte) play_collision::return#14 ← (byte) play_collision::return#15 to:play_move_rotate::@6 play_move_rotate::@6: scope:[play_move_rotate] from play_move_rotate::@3 - [196] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 - [197] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return + [194] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 + [195] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return to:play_move_rotate::@5 play_move_rotate::@5: scope:[play_move_rotate] from play_move_rotate::@6 - [198] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 - [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 + [196] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 + [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 to:play_move_rotate::@return play_move_rotate::@1: scope:[play_move_rotate] from play_move_rotate - [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 - [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f + [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 + [199] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f to:play_move_rotate::@3 (byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation) play_collision: scope:[play_collision] from play_move_down::@8 play_move_leftright::@1 play_move_leftright::@3 play_move_rotate::@3 play_spawn_current - [202] (byte) play_collision::xpos#6 ← phi( play_move_down::@8/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@3/(byte) play_collision::xpos#2 play_move_rotate::@3/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) - [202] (byte) play_collision::yp#0 ← phi( play_move_down::@8/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@3/(byte) play_collision::ypos#2 play_move_rotate::@3/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) - [202] (byte) play_collision::orientation#5 ← phi( play_move_down::@8/(byte) play_collision::orientation#0 play_move_leftright::@1/(byte) play_collision::orientation#1 play_move_leftright::@3/(byte) play_collision::orientation#2 play_move_rotate::@3/(byte) play_collision::orientation#3 play_spawn_current/(byte) 0 ) - [202] (byte*) current_piece#17 ← phi( play_move_down::@8/(byte*) current_piece#95 play_move_leftright::@1/(byte*) current_piece#96 play_move_leftright::@3/(byte*) current_piece#97 play_move_rotate::@3/(byte*) current_piece#98 play_spawn_current/(byte*) current_piece#99 ) - [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 + [200] (byte) play_collision::xpos#6 ← phi( play_move_down::@8/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@3/(byte) play_collision::xpos#2 play_move_rotate::@3/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) + [200] (byte) play_collision::yp#0 ← phi( play_move_down::@8/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@3/(byte) play_collision::ypos#2 play_move_rotate::@3/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) + [200] (byte) play_collision::orientation#5 ← phi( play_move_down::@8/(byte) play_collision::orientation#0 play_move_leftright::@1/(byte) play_collision::orientation#1 play_move_leftright::@3/(byte) play_collision::orientation#2 play_move_rotate::@3/(byte) play_collision::orientation#3 play_spawn_current/(byte) 0 ) + [200] (byte*) current_piece#17 ← phi( play_move_down::@8/(byte*) current_piece#95 play_move_leftright::@1/(byte*) current_piece#96 play_move_leftright::@3/(byte*) current_piece#97 play_move_rotate::@3/(byte*) current_piece#98 play_spawn_current/(byte*) current_piece#99 ) + [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 to:play_collision::@1 play_collision::@1: scope:[play_collision] from play_collision play_collision::@9 - [204] (byte) play_collision::l#6 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::l#1 ) - [204] (byte) play_collision::i#3 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::i#10 ) - [204] (byte) play_collision::yp#2 ← phi( play_collision/(byte) play_collision::yp#0 play_collision::@9/(byte) play_collision::yp#1 ) - [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 - [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) - [207] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 + [202] (byte) play_collision::l#6 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::l#1 ) + [202] (byte) play_collision::i#3 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::i#10 ) + [202] (byte) play_collision::yp#2 ← phi( play_collision/(byte) play_collision::yp#0 play_collision::@9/(byte) play_collision::yp#1 ) + [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 + [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) + [205] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 to:play_collision::@2 play_collision::@2: scope:[play_collision] from play_collision::@1 play_collision::@10 - [208] (byte) play_collision::c#2 ← phi( play_collision::@1/(byte) 0 play_collision::@10/(byte) play_collision::c#1 ) - [208] (byte) play_collision::xp#2 ← phi( play_collision::@1/(byte) play_collision::xp#8 play_collision::@10/(byte) play_collision::xp#1 ) - [208] (byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@10/(byte) play_collision::i#12 ) - [209] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 - [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 + [206] (byte) play_collision::c#2 ← phi( play_collision::@1/(byte) 0 play_collision::@10/(byte) play_collision::c#1 ) + [206] (byte) play_collision::xp#2 ← phi( play_collision::@1/(byte) play_collision::xp#8 play_collision::@10/(byte) play_collision::xp#1 ) + [206] (byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@10/(byte) play_collision::i#12 ) + [207] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 + [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 to:play_collision::@7 play_collision::@7: scope:[play_collision] from play_collision::@2 - [211] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 + [209] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 to:play_collision::@return play_collision::@4: scope:[play_collision] from play_collision::@7 - [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 - [213] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 + [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 + [211] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 to:play_collision::@return play_collision::@5: scope:[play_collision] from play_collision::@4 - [214] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 + [212] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 to:play_collision::@return play_collision::@6: scope:[play_collision] from play_collision::@5 - [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 + [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 to:play_collision::@return play_collision::@return: scope:[play_collision] from play_collision::@4 play_collision::@5 play_collision::@6 play_collision::@7 play_collision::@8 - [216] (byte) play_collision::return#15 ← phi( play_collision::@5/(const byte) COLLISION_RIGHT play_collision::@6/(const byte) COLLISION_PLAYFIELD play_collision::@7/(const byte) COLLISION_BOTTOM play_collision::@8/(const byte) COLLISION_NONE play_collision::@4/(const byte) COLLISION_LEFT ) - [217] return + [214] (byte) play_collision::return#15 ← phi( play_collision::@5/(const byte) COLLISION_RIGHT play_collision::@6/(const byte) COLLISION_PLAYFIELD play_collision::@7/(const byte) COLLISION_BOTTOM play_collision::@8/(const byte) COLLISION_NONE play_collision::@4/(const byte) COLLISION_LEFT ) + [215] return to:@return play_collision::@3: scope:[play_collision] from play_collision::@2 play_collision::@6 - [218] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 - [219] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 - [220] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 + [216] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 + [217] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 + [218] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 to:play_collision::@8 play_collision::@8: scope:[play_collision] from play_collision::@3 - [221] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 - [222] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 - [223] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 + [219] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 + [220] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 + [221] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 to:play_collision::@return play_collision::@9: scope:[play_collision] from play_collision::@8 - [224] (byte) play_collision::i#10 ← (byte) play_collision::i#1 + [222] (byte) play_collision::i#10 ← (byte) play_collision::i#1 to:play_collision::@1 play_collision::@10: scope:[play_collision] from play_collision::@3 - [225] (byte) play_collision::i#12 ← (byte) play_collision::i#1 + [223] (byte) play_collision::i#12 ← (byte) play_collision::i#1 to:play_collision::@2 (byte()) play_move_leftright((byte) play_move_leftright::key_event) play_move_leftright: scope:[play_move_leftright] from play_movement::@1 - [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 + [224] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 to:play_move_leftright::@2 play_move_leftright::@2: scope:[play_move_leftright] from play_move_leftright - [227] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return + [225] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return to:play_move_leftright::@3 play_move_leftright::@3: scope:[play_move_leftright] from play_move_leftright::@2 - [228] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 - [229] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 - [230] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 - [231] (byte*) current_piece#97 ← (byte*) current_piece#15 - [232] call play_collision - [233] (byte) play_collision::return#13 ← (byte) play_collision::return#15 + [226] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 + [227] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 + [228] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 + [229] (byte*) current_piece#97 ← (byte*) current_piece#15 + [230] call play_collision + [231] (byte) play_collision::return#13 ← (byte) play_collision::return#15 to:play_move_leftright::@7 play_move_leftright::@7: scope:[play_move_leftright] from play_move_leftright::@3 - [234] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 - [235] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return + [232] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 + [233] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return to:play_move_leftright::@4 play_move_leftright::@4: scope:[play_move_leftright] from play_move_leftright::@7 - [236] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 + [234] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 to:play_move_leftright::@return play_move_leftright::@return: scope:[play_move_leftright] from play_move_leftright::@2 play_move_leftright::@4 play_move_leftright::@5 play_move_leftright::@6 play_move_leftright::@7 - [237] (byte) current_xpos#26 ← phi( play_move_leftright::@6/(byte) current_xpos#22 play_move_leftright::@4/(byte) current_xpos#6 play_move_leftright::@5/(byte) current_xpos#8 play_move_leftright::@7/(byte) current_xpos#22 play_move_leftright::@2/(byte) current_xpos#22 ) - [237] (byte) play_move_leftright::return#2 ← phi( play_move_leftright::@6/(byte) 0 play_move_leftright::@4/(byte) 1 play_move_leftright::@5/(byte) 1 play_move_leftright::@7/(byte) 0 play_move_leftright::@2/(byte) 0 ) - [238] return + [235] (byte) current_xpos#26 ← phi( play_move_leftright::@6/(byte) current_xpos#22 play_move_leftright::@4/(byte) current_xpos#6 play_move_leftright::@5/(byte) current_xpos#8 play_move_leftright::@7/(byte) current_xpos#22 play_move_leftright::@2/(byte) current_xpos#22 ) + [235] (byte) play_move_leftright::return#2 ← phi( play_move_leftright::@6/(byte) 0 play_move_leftright::@4/(byte) 1 play_move_leftright::@5/(byte) 1 play_move_leftright::@7/(byte) 0 play_move_leftright::@2/(byte) 0 ) + [236] return to:@return play_move_leftright::@1: scope:[play_move_leftright] from play_move_leftright - [239] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 - [240] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 - [241] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 - [242] (byte*) current_piece#96 ← (byte*) current_piece#15 - [243] call play_collision - [244] (byte) play_collision::return#1 ← (byte) play_collision::return#15 + [237] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 + [238] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 + [239] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 + [240] (byte*) current_piece#96 ← (byte*) current_piece#15 + [241] call play_collision + [242] (byte) play_collision::return#1 ← (byte) play_collision::return#15 to:play_move_leftright::@6 play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright::@1 - [245] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 - [246] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return + [243] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 + [244] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return to:play_move_leftright::@5 play_move_leftright::@5: scope:[play_move_leftright] from play_move_leftright::@6 - [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 + [245] (byte) current_xpos#8 ← -- (byte) current_xpos#22 to:play_move_leftright::@return (byte()) play_move_down((byte) play_move_down::key_event) play_move_down: scope:[play_move_down] from play_movement - [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 - [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 + [246] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 + [247] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 to:play_move_down::@4 play_move_down::@4: scope:[play_move_down] from play_move_down - [250] phi() + [248] phi() to:play_move_down::@1 play_move_down::@1: scope:[play_move_down] from play_move_down play_move_down::@4 - [251] (byte) play_move_down::movedown#10 ← phi( play_move_down/(byte) 0 play_move_down::@4/(byte) 1 ) - [252] call keyboard_event_pressed - [253] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + [249] (byte) play_move_down::movedown#10 ← phi( play_move_down/(byte) 0 play_move_down::@4/(byte) 1 ) + [250] call keyboard_event_pressed + [251] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 to:play_move_down::@12 play_move_down::@12: scope:[play_move_down] from play_move_down::@1 - [254] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 - [255] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 + [252] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 + [253] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 to:play_move_down::@5 play_move_down::@5: scope:[play_move_down] from play_move_down::@12 - [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 + [254] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 to:play_move_down::@6 play_move_down::@6: scope:[play_move_down] from play_move_down::@5 - [257] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 + [255] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 to:play_move_down::@2 play_move_down::@2: scope:[play_move_down] from play_move_down::@12 play_move_down::@5 play_move_down::@6 - [258] (byte) play_move_down::movedown#7 ← phi( play_move_down::@12/(byte) play_move_down::movedown#10 play_move_down::@5/(byte) play_move_down::movedown#10 play_move_down::@6/(byte) play_move_down::movedown#2 ) - [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 + [256] (byte) play_move_down::movedown#7 ← phi( play_move_down::@12/(byte) play_move_down::movedown#10 play_move_down::@5/(byte) play_move_down::movedown#10 play_move_down::@6/(byte) play_move_down::movedown#2 ) + [257] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 to:play_move_down::@7 play_move_down::@7: scope:[play_move_down] from play_move_down::@2 - [260] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 + [258] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 to:play_move_down::@3 play_move_down::@3: scope:[play_move_down] from play_move_down::@2 play_move_down::@7 - [261] (byte) play_move_down::movedown#6 ← phi( play_move_down::@2/(byte) play_move_down::movedown#7 play_move_down::@7/(byte) play_move_down::movedown#3 ) - [262] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return + [259] (byte) play_move_down::movedown#6 ← phi( play_move_down::@2/(byte) play_move_down::movedown#7 play_move_down::@7/(byte) play_move_down::movedown#3 ) + [260] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return to:play_move_down::@8 play_move_down::@8: scope:[play_move_down] from play_move_down::@3 - [263] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 - [264] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 - [265] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 - [266] (byte*) current_piece#95 ← (byte*) current_piece#10 - [267] call play_collision - [268] (byte) play_collision::return#0 ← (byte) play_collision::return#15 + [261] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 + [262] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 + [263] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 + [264] (byte*) current_piece#95 ← (byte*) current_piece#10 + [265] call play_collision + [266] (byte) play_collision::return#0 ← (byte) play_collision::return#15 to:play_move_down::@13 play_move_down::@13: scope:[play_move_down] from play_move_down::@8 - [269] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 - [270] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 + [267] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 + [268] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 to:play_move_down::@9 play_move_down::@9: scope:[play_move_down] from play_move_down::@13 - [271] phi() - [272] call play_lock_current + [269] phi() + [270] call play_lock_current to:play_move_down::@14 play_move_down::@14: scope:[play_move_down] from play_move_down::@9 - [273] phi() - [274] call play_remove_lines - [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 + [271] phi() + [272] call play_remove_lines + [273] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 to:play_move_down::@15 play_move_down::@15: scope:[play_move_down] from play_move_down::@14 - [276] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 - [277] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 - [278] call play_update_score + [274] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 + [275] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 + [276] call play_update_score to:play_move_down::@16 play_move_down::@16: scope:[play_move_down] from play_move_down::@15 - [279] phi() - [280] call play_spawn_current + [277] phi() + [278] call play_spawn_current to:play_move_down::@17 play_move_down::@17: scope:[play_move_down] from play_move_down::@16 - [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) - [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) to:play_move_down::@11 play_move_down::@11: scope:[play_move_down] from play_move_down::@10 play_move_down::@17 - [283] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#2 ) - [283] (byte) game_over#27 ← phi( play_move_down::@10/(byte) game_over#10 play_move_down::@17/(byte) game_over#52 ) - [283] (byte) current_xpos#43 ← phi( play_move_down::@10/(byte) current_xpos#14 play_move_down::@17/(byte) current_xpos#100 ) - [283] (byte*) current_piece_gfx#35 ← phi( play_move_down::@10/(byte*) current_piece_gfx#13 play_move_down::@17/(byte*) current_piece_gfx#116 ) - [283] (byte) current_orientation#37 ← phi( play_move_down::@10/(byte) current_orientation#13 play_move_down::@17/(byte) 0 ) - [283] (byte) current_piece_char#29 ← phi( play_move_down::@10/(byte) current_piece_char#10 play_move_down::@17/(byte) current_piece_char#5 ) - [283] (byte*) current_piece#28 ← phi( play_move_down::@10/(byte*) current_piece#10 play_move_down::@17/(byte*) current_piece#92 ) - [283] (byte) level_bcd#31 ← phi( play_move_down::@10/(byte) level_bcd#11 play_move_down::@17/(byte) level_bcd#19 ) - [283] (byte) current_movedown_slow#37 ← phi( play_move_down::@10/(byte) current_movedown_slow#14 play_move_down::@17/(byte) current_movedown_slow#23 ) - [283] (byte) level#33 ← phi( play_move_down::@10/(byte) level#10 play_move_down::@17/(byte) level#19 ) - [283] (word) lines_bcd#26 ← phi( play_move_down::@10/(word) lines_bcd#19 play_move_down::@17/(word) lines_bcd#17 ) - [283] (byte) current_ypos#38 ← phi( play_move_down::@10/(byte) current_ypos#3 play_move_down::@17/(byte) current_ypos#6 ) + [281] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#2 ) + [281] (byte) game_over#27 ← phi( play_move_down::@10/(byte) game_over#10 play_move_down::@17/(byte) game_over#52 ) + [281] (byte) current_xpos#43 ← phi( play_move_down::@10/(byte) current_xpos#14 play_move_down::@17/(byte) current_xpos#100 ) + [281] (byte*) current_piece_gfx#35 ← phi( play_move_down::@10/(byte*) current_piece_gfx#13 play_move_down::@17/(byte*) current_piece_gfx#116 ) + [281] (byte) current_orientation#37 ← phi( play_move_down::@10/(byte) current_orientation#13 play_move_down::@17/(byte) 0 ) + [281] (byte) current_piece_char#29 ← phi( play_move_down::@10/(byte) current_piece_char#10 play_move_down::@17/(byte) current_piece_char#5 ) + [281] (byte*) current_piece#28 ← phi( play_move_down::@10/(byte*) current_piece#10 play_move_down::@17/(byte*) current_piece#92 ) + [281] (byte) level_bcd#31 ← phi( play_move_down::@10/(byte) level_bcd#11 play_move_down::@17/(byte) level_bcd#19 ) + [281] (byte) current_movedown_slow#37 ← phi( play_move_down::@10/(byte) current_movedown_slow#14 play_move_down::@17/(byte) current_movedown_slow#23 ) + [281] (byte) level#33 ← phi( play_move_down::@10/(byte) level#10 play_move_down::@17/(byte) level#19 ) + [281] (word) lines_bcd#26 ← phi( play_move_down::@10/(word) lines_bcd#19 play_move_down::@17/(word) lines_bcd#17 ) + [281] (byte) current_ypos#38 ← phi( play_move_down::@10/(byte) current_ypos#3 play_move_down::@17/(byte) current_ypos#6 ) to:play_move_down::@return play_move_down::@return: scope:[play_move_down] from play_move_down::@11 play_move_down::@3 - [284] (byte) next_piece_idx#16 ← phi( play_move_down::@11/(byte) next_piece_idx#30 play_move_down::@3/(byte) next_piece_idx#10 ) - [284] (byte) game_over#15 ← phi( play_move_down::@11/(byte) game_over#27 play_move_down::@3/(byte) game_over#10 ) - [284] (byte) current_xpos#22 ← phi( play_move_down::@11/(byte) current_xpos#43 play_move_down::@3/(byte) current_xpos#14 ) - [284] (byte*) current_piece_gfx#20 ← phi( play_move_down::@11/(byte*) current_piece_gfx#35 play_move_down::@3/(byte*) current_piece_gfx#13 ) - [284] (byte) current_orientation#20 ← phi( play_move_down::@11/(byte) current_orientation#37 play_move_down::@3/(byte) current_orientation#13 ) - [284] (byte) current_piece_char#16 ← phi( play_move_down::@11/(byte) current_piece_char#29 play_move_down::@3/(byte) current_piece_char#10 ) - [284] (byte*) current_piece#15 ← phi( play_move_down::@11/(byte*) current_piece#28 play_move_down::@3/(byte*) current_piece#10 ) - [284] (byte) level_bcd#17 ← phi( play_move_down::@11/(byte) level_bcd#31 play_move_down::@3/(byte) level_bcd#11 ) - [284] (byte) current_movedown_slow#21 ← phi( play_move_down::@11/(byte) current_movedown_slow#37 play_move_down::@3/(byte) current_movedown_slow#14 ) - [284] (byte) level#17 ← phi( play_move_down::@11/(byte) level#33 play_move_down::@3/(byte) level#10 ) - [284] (word) lines_bcd#15 ← phi( play_move_down::@11/(word) lines_bcd#26 play_move_down::@3/(word) lines_bcd#19 ) - [284] (byte) current_ypos#19 ← phi( play_move_down::@11/(byte) current_ypos#38 play_move_down::@3/(byte) current_ypos#11 ) - [284] (byte) current_movedown_counter#14 ← phi( play_move_down::@11/(byte) 0 play_move_down::@3/(byte) current_movedown_counter#12 ) - [284] (byte) play_move_down::return#3 ← phi( play_move_down::@11/(byte) 1 play_move_down::@3/(byte) 0 ) - [285] return + [282] (byte) next_piece_idx#16 ← phi( play_move_down::@11/(byte) next_piece_idx#30 play_move_down::@3/(byte) next_piece_idx#10 ) + [282] (byte) game_over#15 ← phi( play_move_down::@11/(byte) game_over#27 play_move_down::@3/(byte) game_over#10 ) + [282] (byte) current_xpos#22 ← phi( play_move_down::@11/(byte) current_xpos#43 play_move_down::@3/(byte) current_xpos#14 ) + [282] (byte*) current_piece_gfx#20 ← phi( play_move_down::@11/(byte*) current_piece_gfx#35 play_move_down::@3/(byte*) current_piece_gfx#13 ) + [282] (byte) current_orientation#20 ← phi( play_move_down::@11/(byte) current_orientation#37 play_move_down::@3/(byte) current_orientation#13 ) + [282] (byte) current_piece_char#16 ← phi( play_move_down::@11/(byte) current_piece_char#29 play_move_down::@3/(byte) current_piece_char#10 ) + [282] (byte*) current_piece#15 ← phi( play_move_down::@11/(byte*) current_piece#28 play_move_down::@3/(byte*) current_piece#10 ) + [282] (byte) level_bcd#17 ← phi( play_move_down::@11/(byte) level_bcd#31 play_move_down::@3/(byte) level_bcd#11 ) + [282] (byte) current_movedown_slow#21 ← phi( play_move_down::@11/(byte) current_movedown_slow#37 play_move_down::@3/(byte) current_movedown_slow#14 ) + [282] (byte) level#17 ← phi( play_move_down::@11/(byte) level#33 play_move_down::@3/(byte) level#10 ) + [282] (word) lines_bcd#15 ← phi( play_move_down::@11/(word) lines_bcd#26 play_move_down::@3/(word) lines_bcd#19 ) + [282] (byte) current_ypos#19 ← phi( play_move_down::@11/(byte) current_ypos#38 play_move_down::@3/(byte) current_ypos#11 ) + [282] (byte) current_movedown_counter#14 ← phi( play_move_down::@11/(byte) 0 play_move_down::@3/(byte) current_movedown_counter#12 ) + [282] (byte) play_move_down::return#3 ← phi( play_move_down::@11/(byte) 1 play_move_down::@3/(byte) 0 ) + [283] return to:@return play_move_down::@10: scope:[play_move_down] from play_move_down::@13 - [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 + [284] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 to:play_move_down::@11 (void()) play_spawn_current() play_spawn_current: scope:[play_spawn_current] from main::@12 main::@13 play_move_down::@16 - [287] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) - [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) - [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 - [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 - [290] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) - [291] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) - [292] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) - [293] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 - [294] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 - [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) - [296] call play_collision - [297] (byte) play_collision::return#10 ← (byte) play_collision::return#15 + [285] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) + [285] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) + [286] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 + [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 + [288] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) + [289] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) + [290] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) + [291] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 + [292] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 + [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [294] call play_collision + [295] (byte) play_collision::return#10 ← (byte) play_collision::return#15 to:play_spawn_current::@4 play_spawn_current::@4: scope:[play_spawn_current] from play_spawn_current - [298] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 - [299] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 + [296] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 + [297] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 to:play_spawn_current::@1 play_spawn_current::@5: scope:[play_spawn_current] from play_spawn_current::@4 - [300] phi() + [298] phi() to:play_spawn_current::@1 play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current::@4 play_spawn_current::@5 - [301] (byte) game_over#52 ← phi( play_spawn_current::@5/(byte) game_over#65 play_spawn_current::@4/(byte) 1 ) + [299] (byte) game_over#52 ← phi( play_spawn_current::@5/(byte) game_over#65 play_spawn_current::@4/(byte) 1 ) to:play_spawn_current::@2 play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@3 - [302] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(byte) 7 play_spawn_current::@3/(byte) play_spawn_current::piece_idx#1 ) - [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 + [300] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(byte) 7 play_spawn_current::@3/(byte) play_spawn_current::piece_idx#1 ) + [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 to:play_spawn_current::@return play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@2 - [304] return + [302] return to:@return play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@2 - [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) + [303] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) to:play_spawn_current::@3 play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 - [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 + [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 to:play_spawn_current::@2 (void()) play_update_score((byte) play_update_score::removed) play_update_score: scope:[play_update_score] from play_move_down::@15 - [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return + [305] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return to:play_update_score::@1 play_update_score::@1: scope:[play_update_score] from play_update_score - [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 - [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 - [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 - [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) + [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 + [307] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 + [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 + [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) asm { sed } - [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 - [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 + [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 + [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 asm { cld } - [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 - [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 - [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return + [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 + [315] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 + [316] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return to:play_update_score::@2 play_update_score::@2: scope:[play_update_score] from play_update_score::@1 - [319] phi() - [320] call play_increase_level + [317] phi() + [318] call play_increase_level to:play_update_score::@return play_update_score::@return: scope:[play_update_score] from play_update_score play_update_score::@1 play_update_score::@2 - [321] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) - [321] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#65 ) - [321] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) - [321] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) - [322] return + [319] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) + [319] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#65 ) + [319] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) + [319] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) + [320] return to:@return (void()) play_increase_level() play_increase_level: scope:[play_increase_level] from play_update_score::@2 - [323] (byte) level#21 ← ++ (byte) level#10 - [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 + [321] (byte) level#21 ← ++ (byte) level#10 + [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 to:play_increase_level::@3 play_increase_level::@3: scope:[play_increase_level] from play_increase_level - [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) + [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) to:play_increase_level::@1 play_increase_level::@1: scope:[play_increase_level] from play_increase_level play_increase_level::@3 - [326] (byte) current_movedown_slow#65 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) - [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 - [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f - [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 + [324] (byte) current_movedown_slow#65 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) + [325] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 + [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f + [327] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 to:play_increase_level::@4 play_increase_level::@4: scope:[play_increase_level] from play_increase_level::@1 - [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 + [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 to:play_increase_level::@2 play_increase_level::@2: scope:[play_increase_level] from play_increase_level::@1 play_increase_level::@4 - [331] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) + [329] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) asm { sed } to:play_increase_level::@5 play_increase_level::@5: scope:[play_increase_level] from play_increase_level::@2 play_increase_level::@5 - [333] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) - [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 - [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) - [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 - [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 + [331] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) + [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 + [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) + [334] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 + [335] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 to:play_increase_level::@6 play_increase_level::@6: scope:[play_increase_level] from play_increase_level::@5 asm { cld } to:play_increase_level::@return play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@6 - [339] return + [337] return to:@return (byte()) play_remove_lines() play_remove_lines: scope:[play_remove_lines] from play_move_down::@14 - [340] phi() + [338] phi() to:play_remove_lines::@1 play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@6 - [341] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) - [341] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) - [341] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [341] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) + [339] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) + [339] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) + [339] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [339] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) to:play_remove_lines::@2 play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3 - [342] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) - [342] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) - [342] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) - [342] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) - [343] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) - [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 - [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 + [340] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) + [340] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) + [340] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) + [340] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) + [341] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) + [342] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 + [343] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 to:play_remove_lines::@3 play_remove_lines::@9: scope:[play_remove_lines] from play_remove_lines::@2 - [346] phi() + [344] phi() to:play_remove_lines::@3 play_remove_lines::@3: scope:[play_remove_lines] from play_remove_lines::@2 play_remove_lines::@9 - [347] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) - [348] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 - [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 - [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 - [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 + [345] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) + [346] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 + [347] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 + [348] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 + [349] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 to:play_remove_lines::@4 play_remove_lines::@4: scope:[play_remove_lines] from play_remove_lines::@3 - [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 + [350] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 to:play_remove_lines::@5 play_remove_lines::@5: scope:[play_remove_lines] from play_remove_lines::@4 - [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS - [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 + [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS + [352] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 to:play_remove_lines::@6 play_remove_lines::@6: scope:[play_remove_lines] from play_remove_lines::@4 play_remove_lines::@5 - [355] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) - [355] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) - [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 - [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 + [353] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) + [353] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) + [354] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 + [355] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 to:play_remove_lines::@7 play_remove_lines::@7: scope:[play_remove_lines] from play_remove_lines::@6 play_remove_lines::@8 - [358] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 + [356] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [357] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 to:play_remove_lines::@return play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@7 - [360] return + [358] return to:@return play_remove_lines::@8: scope:[play_remove_lines] from play_remove_lines::@7 - [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 - [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 + [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 + [360] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 to:play_remove_lines::@7 (void()) play_lock_current() play_lock_current: scope:[play_lock_current] from play_move_down::@9 - [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + [361] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 to:play_lock_current::@1 play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@6 - [364] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) - [364] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::i#7 ) - [364] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) - [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 - [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) - [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 + [362] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) + [362] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::i#7 ) + [362] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) + [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 + [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) + [365] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 to:play_lock_current::@2 play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@7 - [368] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) - [368] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) - [368] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte) play_lock_current::i#9 ) - [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 - [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 + [366] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) + [366] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) + [366] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte) play_lock_current::i#9 ) + [367] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 + [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 to:play_lock_current::@4 play_lock_current::@4: scope:[play_lock_current] from play_lock_current::@2 - [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 + [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 to:play_lock_current::@3 play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4 - [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 - [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 - [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 + [370] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 + [371] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 + [372] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 to:play_lock_current::@5 play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3 - [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 - [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 - [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 + [373] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 + [374] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 + [375] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 to:play_lock_current::@return play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5 - [378] return + [376] return to:@return play_lock_current::@6: scope:[play_lock_current] from play_lock_current::@5 - [379] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 + [377] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 to:play_lock_current::@1 play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@3 - [380] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 + [378] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 to:play_lock_current::@2 (byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 play_move_down::@1 - [381] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT keyboard_event_scan::@2/(const byte) KEY_CTRL keyboard_event_scan::@17/(const byte) KEY_LSHIFT keyboard_event_scan::@3/(const byte) KEY_COMMODORE play_move_down::@1/(const byte) KEY_SPACE ) - [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 - [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) - [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 - [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) + [379] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT keyboard_event_scan::@2/(const byte) KEY_CTRL keyboard_event_scan::@17/(const byte) KEY_LSHIFT keyboard_event_scan::@3/(const byte) KEY_COMMODORE play_move_down::@1/(const byte) KEY_SPACE ) + [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 + [381] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) + [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 + [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) to:keyboard_event_pressed::@return keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed - [386] return + [384] return to:@return (byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from main::@19 - [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return + [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get - [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 - [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) + [386] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) to:keyboard_event_get::@return keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@1 - [390] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) - [390] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) - [391] return + [388] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) + [388] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) + [389] return to:@return (void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from main::@18 - [392] phi() + [390] phi() to:keyboard_event_scan::@7 keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8 - [393] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) - [393] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) - [393] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) - [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 - [395] call keyboard_matrix_read - [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + [391] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) + [391] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) + [391] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) + [392] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [393] call keyboard_matrix_read + [394] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 to:keyboard_event_scan::@19 keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@7 - [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 - [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 + [395] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 to:keyboard_event_scan::@16 keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@19 - [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 + [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 to:keyboard_event_scan::@8 keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@16 - [400] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) - [400] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) - [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 - [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 + [398] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) + [398] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) + [399] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 to:keyboard_event_scan::@17 keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@8 - [403] phi() - [404] call keyboard_event_pressed - [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + [401] phi() + [402] call keyboard_event_pressed + [403] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@20 keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@17 - [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 - [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 + [404] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + [405] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 to:keyboard_event_scan::@18 keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@20 - [408] phi() + [406] phi() to:keyboard_event_scan::@1 keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@20 - [409] phi() - [410] call keyboard_event_pressed - [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + [407] phi() + [408] call keyboard_event_pressed + [409] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@21 keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@1 - [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 - [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 + [410] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + [411] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 to:keyboard_event_scan::@4 keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@21 - [414] phi() + [412] phi() to:keyboard_event_scan::@2 keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@4 - [415] phi() - [416] call keyboard_event_pressed - [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + [413] phi() + [414] call keyboard_event_pressed + [415] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@22 keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@2 - [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 - [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 + [416] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + [417] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 to:keyboard_event_scan::@5 keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@22 - [420] phi() + [418] phi() to:keyboard_event_scan::@3 keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@5 - [421] phi() - [422] call keyboard_event_pressed - [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + [419] phi() + [420] call keyboard_event_pressed + [421] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@23 keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@3 - [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 - [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return + [422] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + [423] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return to:keyboard_event_scan::@6 keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@23 - [426] phi() + [424] phi() to:keyboard_event_scan::@return keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@6 - [427] return + [425] return to:@return keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@19 - [428] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) - [428] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) - [428] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) - [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) - [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) - [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 + [426] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) + [426] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) + [426] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) + [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) + [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) + [429] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 to:keyboard_event_scan::@12 keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@9 - [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 + [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 to:keyboard_event_scan::@13 keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@12 - [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) - [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 + [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) + [432] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 to:keyboard_event_scan::@14 keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 - [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [434] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 - [437] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) - [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 - [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 - [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 + [435] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) + [436] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 + [437] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [438] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 to:keyboard_event_scan::@15 keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@10 - [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 to:keyboard_event_scan::@8 keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 - [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 - [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 + [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 + [442] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 (byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 - [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) - [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) + [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) + [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) to:keyboard_matrix_read::@return keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read - [447] return + [445] return to:@return (void()) render_show() render_show: scope:[render_show] from main::@3 - [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 + [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 to:render_show::toD0182 render_show::toD0182: scope:[render_show] from render_show - [449] phi() + [447] phi() to:render_show::@1 render_show::@1: scope:[render_show] from render_show::toD0181 render_show::toD0182 - [450] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) - [451] *((const byte*) D018) ← (byte) render_show::d018val#3 - [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) - [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) - [454] (byte) render_screen_showing ← (byte) render_screen_show#16 + [448] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) + [449] *((const byte*) D018) ← (byte) render_show::d018val#3 + [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) + [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) + [452] (byte) render_screen_showing ← (byte) render_screen_show#16 to:render_show::@return render_show::@return: scope:[render_show] from render_show::@1 - [455] return + [453] return to:@return render_show::toD0181: scope:[render_show] from render_show - [456] phi() + [454] phi() to:render_show::@1 (void()) play_init() play_init: scope:[play_init] from main::@11 - [457] phi() + [455] phi() to:play_init::@1 play_init::@1: scope:[play_init] from play_init play_init::@1 - [458] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) - [458] (byte*) play_init::pli#2 ← phi( play_init/(const byte*) playfield play_init::@1/(byte*) play_init::pli#1 ) - [458] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) - [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 - [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 - [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 - [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS - [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS - [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 - [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 + [456] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) + [456] (byte*) play_init::pli#2 ← phi( play_init/(const byte*) playfield play_init::@1/(byte*) play_init::pli#1 ) + [456] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) + [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 + [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 + [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 + [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS + [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS + [462] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 + [463] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 to:play_init::@2 play_init::@2: scope:[play_init] from play_init::@1 - [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES - [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) + [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES + [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) to:play_init::@3 play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 - [468] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) - [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 - [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) - [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 - [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 + [466] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) + [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 + [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) + [469] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 + [470] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 to:play_init::@return play_init::@return: scope:[play_init] from play_init::@3 - [473] return + [471] return to:@return (void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@10 asm { sei } - [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER + [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER asm { ldaCIA1_INTERRUPT } - [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK - [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO - [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR - [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f - [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST - [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER - [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() + [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK + [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO + [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR + [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f + [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST + [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER + [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() asm { cli } to:sprites_irq_init::@return sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init - [485] return + [483] return to:@return (void()) sprites_init() sprites_init: scope:[sprites_init] from main::@9 - [486] *((const byte*) SPRITES_ENABLE) ← (byte) $f - [487] *((const byte*) SPRITES_MC) ← (byte) 0 - [488] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) - [489] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) + [484] *((const byte*) SPRITES_ENABLE) ← (byte) $f + [485] *((const byte*) SPRITES_MC) ← (byte) 0 + [486] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) + [487] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) to:sprites_init::@1 sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 - [490] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) - [490] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) - [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 - [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK - [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 - [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 - [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 + [488] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) + [488] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) + [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 + [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 + [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK + [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 + [493] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 + [494] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 to:sprites_init::@return sprites_init::@return: scope:[sprites_init] from sprites_init::@1 - [497] return + [495] return to:@return (void()) render_init() render_init: scope:[render_init] from main::@8 - [498] phi() + [496] phi() to:render_init::vicSelectGfxBank1 render_init::vicSelectGfxBank1: scope:[render_init] from render_init - [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 + [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 to:render_init::vicSelectGfxBank1_toDd001 render_init::vicSelectGfxBank1_toDd001: scope:[render_init] from render_init::vicSelectGfxBank1 - [500] phi() + [498] phi() to:render_init::vicSelectGfxBank1_@1 render_init::vicSelectGfxBank1_@1: scope:[render_init] from render_init::vicSelectGfxBank1_toDd001 - [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 + [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 to:render_init::@2 render_init::@2: scope:[render_init] from render_init::vicSelectGfxBank1_@1 - [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 - [503] *((const byte*) BORDERCOL) ← (const byte) BLACK - [504] *((const byte*) BGCOL1) ← (const byte) BLACK - [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) - [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) - [507] *((const byte*) BGCOL4) ← (const byte) GREY - [508] call render_screen_original + [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 + [501] *((const byte*) BORDERCOL) ← (const byte) BLACK + [502] *((const byte*) BGCOL1) ← (const byte) BLACK + [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) + [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) + [505] *((const byte*) BGCOL4) ← (const byte) GREY + [506] call render_screen_original to:render_init::@3 render_init::@3: scope:[render_init] from render_init::@2 - [509] phi() - [510] call render_screen_original + [507] phi() + [508] call render_screen_original to:render_init::@1 render_init::@1: scope:[render_init] from render_init::@1 render_init::@3 - [511] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) - [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 - [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 - [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 - [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 - [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 - [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 - [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 + [509] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 ) + [509] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 ) + [509] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) + [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 + [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 + [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 + [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 + [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 + [515] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 + [516] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 to:render_init::@return render_init::@return: scope:[render_init] from render_init::@1 - [519] return + [517] return to:@return (void()) render_screen_original((byte*) render_screen_original::screen) render_screen_original: scope:[render_screen_original] from render_init::@2 render_init::@3 - [520] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2 ) + [518] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2 ) to:render_screen_original::@1 render_screen_original::@1: scope:[render_screen_original] from render_screen_original render_screen_original::@5 - [521] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) - [521] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) - [521] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) - [521] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS render_screen_original::@5/(byte*) render_screen_original::cols#3 ) - [521] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) + [519] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) + [519] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) + [519] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) + [519] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS render_screen_original::@5/(byte*) render_screen_original::cols#3 ) + [519] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) to:render_screen_original::@2 render_screen_original::@2: scope:[render_screen_original] from render_screen_original::@1 render_screen_original::@2 - [522] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) - [522] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) - [522] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) - [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE - [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 - [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK - [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 - [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 - [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 + [520] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) + [520] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) + [520] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) + [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE + [522] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 + [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK + [524] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 + [525] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 + [526] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 to:render_screen_original::@3 render_screen_original::@3: scope:[render_screen_original] from render_screen_original::@2 render_screen_original::@3 - [529] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) - [529] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) - [529] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) - [529] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) - [529] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) - [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) - [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 - [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 - [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) - [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 - [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 - [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 - [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 + [527] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) + [527] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) + [527] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) + [527] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) + [527] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) + [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) + [529] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 + [530] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 + [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) + [532] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 + [533] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 + [534] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 + [535] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 to:render_screen_original::@4 render_screen_original::@4: scope:[render_screen_original] from render_screen_original::@3 render_screen_original::@4 - [538] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) - [538] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) - [538] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) - [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE - [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 - [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK - [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 - [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 - [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 + [536] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) + [536] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) + [536] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) + [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE + [538] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 + [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK + [540] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 + [541] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 + [542] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 to:render_screen_original::@5 render_screen_original::@5: scope:[render_screen_original] from render_screen_original::@4 - [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 - [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 + [543] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 + [544] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 to:render_screen_original::@return render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@5 - [547] return + [545] return to:@return (void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main - [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff - [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE + [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff + [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE to:sid_rnd_init::@return sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init - [550] return + [548] return to:@return interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from asm { cld } - [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos - [553] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 - [554] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 - [555] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 - [556] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 - [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 - [558] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 + [550] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos + [551] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 + [552] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 + [553] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 + [554] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 + [555] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 + [556] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 to:sprites_irq::@8 sprites_irq::@8: scope:[sprites_irq] from sprites_irq sprites_irq::@8 - [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 + [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 to:sprites_irq::@9 sprites_irq::@9: scope:[sprites_irq] from sprites_irq::@8 - [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr - [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 + [558] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr + [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 to:sprites_irq::@10 sprites_irq::@10: scope:[sprites_irq] from sprites_irq::@9 - [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 - [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 - [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 - [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 - [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 - [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 + [560] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 + [561] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 + [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 + [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 + [564] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 + [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 to:sprites_irq::@2 sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@10 - [568] (byte) irq_cnt ← ++ (byte) irq_cnt - [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 + [566] (byte) irq_cnt ← ++ (byte) irq_cnt + [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 to:sprites_irq::@6 sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@2 - [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 + [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 to:sprites_irq::@7 sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@6 - [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 - [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 - [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 + [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 + [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 + [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 to:sprites_irq::@5 sprites_irq::@5: scope:[sprites_irq] from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 - [574] *((const byte*) RASTER) ← (byte) irq_raster_next - [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER + [572] *((const byte*) RASTER) ← (byte) irq_raster_next + [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER to:sprites_irq::@return sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@5 - [576] return + [574] return to:@return sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@6 - [577] (byte) irq_cnt ← (byte) 0 - [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST - [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 - [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 + [575] (byte) irq_cnt ← (byte) 0 + [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST + [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 + [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 to:sprites_irq::@5 sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2 - [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 - [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS + [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 + [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS to:sprites_irq::toSpritePtr2 sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3 - [583] phi() + [581] phi() to:sprites_irq::@11 sprites_irq::@11: scope:[sprites_irq] from sprites_irq::toSpritePtr2 - [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 + [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 to:sprites_irq::@5 sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@9 - [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 - [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 - [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 - [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 - [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 - [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 + [583] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 + [584] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 + [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 + [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 + [587] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 + [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 to:sprites_irq::@2 diff --git a/src/test/ref/complex/tetris/tetris.log b/src/test/ref/complex/tetris/tetris.log index 2ff39ae0d..fc2b4b517 100644 --- a/src/test/ref/complex/tetris/tetris.log +++ b/src/test/ref/complex/tetris/tetris.log @@ -453,17 +453,6 @@ sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init (byte) game_over#0 ← (byte) 0 kickasm(location (const byte*) PLAYFIELD_CHARSET) {{ .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" - }} - kickasm(location (const byte*) PLAYFIELD_SCREEN_ORIGINAL) {{ // Load chars for the screen - .var screen = LoadBinary("playfield-screen.iscr") - // Load extended colors for the screen - .var extended = LoadBinary("playfield-extended.col") - // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 - // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) - // <<6 to move extended colors to the upper 2 bits - .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) - }} - kickasm(location (const byte*) PLAYFIELD_COLORS_ORIGINAL) {{ .import binary "playfield-screen.col" }} to:@22 @@ -3454,13 +3443,22 @@ SYMBOL TABLE SSA (const byte*) PIECE_Z[(number) $40] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte) PINK = (byte) $a (const byte*) PLAYFIELD_CHARSET = (byte*)(number) $2800 -(const byte*) PLAYFIELD_COLORS_ORIGINAL = (byte*)(number) $1c00 +(const byte*) PLAYFIELD_COLORS_ORIGINAL[] = kickasm {{ .import binary "playfield-screen.col" + }} (const byte) PLAYFIELD_COLS = (byte) $a (const byte) PLAYFIELD_LINES = (byte) $16 (const byte*) PLAYFIELD_SCREEN_1 = (byte*)(number) $400 (const byte*) PLAYFIELD_SCREEN_2 = (byte*)(number) $2c00 -(const byte*) PLAYFIELD_SCREEN_ORIGINAL = (byte*)(number) $3000 -(const byte*) PLAYFIELD_SPRITES = (byte*)(number) $2000 +(const byte*) PLAYFIELD_SCREEN_ORIGINAL[] = kickasm {{ // Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + }} +(const byte*) PLAYFIELD_SPRITES = (byte*)(number) $3000 (const byte*) PLAYFIELD_SPRITE_PTRS_1 = (const byte*) PLAYFIELD_SCREEN_1+(const word) SPRITE_PTRS (const byte*) PLAYFIELD_SPRITE_PTRS_2 = (const byte*) PLAYFIELD_SCREEN_2+(const word) SPRITE_PTRS (const byte*) PROCPORT = (byte*)(number) 1 @@ -6515,8 +6513,6 @@ Simplifying constant pointer cast (byte*) 54299 Simplifying constant pointer cast (byte*) 1024 Simplifying constant pointer cast (byte*) 11264 Simplifying constant pointer cast (byte*) 12288 -Simplifying constant pointer cast (byte*) 7168 -Simplifying constant pointer cast (byte*) 8192 Simplifying constant pointer cast (byte*) 10240 Simplifying constant integer cast $13 Simplifying constant integer cast 1 @@ -6870,31 +6866,31 @@ Inversing boolean not [68] (bool~) keyboard_event_scan::$2 ← (byte~) keyboard_ Inversing boolean not [77] (bool~) keyboard_event_scan::$5 ← (byte~) keyboard_event_scan::$3 == (byte) 0 from [76] (bool~) keyboard_event_scan::$4 ← (byte~) keyboard_event_scan::$3 != (byte) 0 Inversing boolean not [89] (bool~) keyboard_event_scan::$8 ← (byte~) keyboard_event_scan::$6 == (byte) 0 from [88] (bool~) keyboard_event_scan::$7 ← (byte~) keyboard_event_scan::$6 != (byte) 0 Inversing boolean not [101] (bool~) keyboard_event_scan::$11 ← (byte~) keyboard_event_scan::$9 == (byte) 0 from [100] (bool~) keyboard_event_scan::$10 ← (byte~) keyboard_event_scan::$9 != (byte) 0 -Inversing boolean not [306] (bool~) render_bcd::$2 ← (byte) render_bcd::only_low#6 != (byte) 0 from [305] (bool~) render_bcd::$1 ← (byte) render_bcd::only_low#6 == (byte) 0 -Inversing boolean not [401] (bool~) render_moving::$3 ← (byte) render_moving::current_cell#0 == (byte) 0 from [400] (bool~) render_moving::$2 ← (byte) render_moving::current_cell#0 != (byte) 0 -Inversing boolean not [604] (bool~) play_movement::$2 ← (byte) game_over#1 == (byte) 0 from [603] (bool~) play_movement::$1 ← (byte) game_over#1 != (byte) 0 -Inversing boolean not [645] (bool~) play_move_down::$1 ← (byte) play_move_down::key_event#1 != (const byte) KEY_SPACE from [644] (bool~) play_move_down::$0 ← (byte) play_move_down::key_event#1 == (const byte) KEY_SPACE -Inversing boolean not [654] (bool~) play_move_down::$4 ← (byte~) play_move_down::$2 == (byte) 0 from [653] (bool~) play_move_down::$3 ← (byte~) play_move_down::$2 != (byte) 0 -Inversing boolean not [660] (bool~) play_move_down::$6 ← (byte) current_movedown_counter#12 < (byte) current_movedown_slow#19 from [659] (bool~) play_move_down::$5 ← (byte) current_movedown_counter#12 >= (byte) current_movedown_slow#19 -Inversing boolean not [664] (bool~) play_move_down::$10 ← (byte) current_movedown_counter#13 < (const byte) current_movedown_fast from [663] (bool~) play_move_down::$9 ← (byte) current_movedown_counter#13 >= (const byte) current_movedown_fast -Inversing boolean not [670] (bool~) play_move_down::$8 ← (byte) play_move_down::movedown#6 == (byte) 0 from [669] (bool~) play_move_down::$7 ← (byte) play_move_down::movedown#6 != (byte) 0 -Inversing boolean not [746] (bool~) play_move_leftright::$10 ← (byte~) play_move_leftright::$8 != (const byte) COLLISION_NONE from [745] (bool~) play_move_leftright::$9 ← (byte~) play_move_leftright::$8 == (const byte) COLLISION_NONE -Inversing boolean not [750] (bool~) play_move_leftright::$2 ← (byte) play_move_leftright::key_event#2 != (const byte) KEY_DOT from [749] (bool~) play_move_leftright::$1 ← (byte) play_move_leftright::key_event#2 == (const byte) KEY_DOT -Inversing boolean not [762] (bool~) play_move_leftright::$6 ← (byte~) play_move_leftright::$4 != (const byte) COLLISION_NONE from [761] (bool~) play_move_leftright::$5 ← (byte~) play_move_leftright::$4 == (const byte) COLLISION_NONE -Inversing boolean not [807] (bool~) play_move_rotate::$4 ← (byte~) play_move_rotate::$2 != (const byte) COLLISION_NONE from [806] (bool~) play_move_rotate::$3 ← (byte~) play_move_rotate::$2 == (const byte) COLLISION_NONE -Inversing boolean not [829] (bool~) play_collision::$2 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) == (byte) 0 from [828] (bool~) play_collision::$1 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (byte) 0 -Inversing boolean not [839] (bool~) play_collision::$4 ← (byte) play_collision::yp#3 < (const byte) PLAYFIELD_LINES from [838] (bool~) play_collision::$3 ← (byte) play_collision::yp#3 >= (const byte) PLAYFIELD_LINES -Inversing boolean not [844] (bool~) play_collision::$7 ← (byte~) play_collision::$5 == (byte) 0 from [843] (bool~) play_collision::$6 ← (byte~) play_collision::$5 != (byte) 0 -Inversing boolean not [852] (bool~) play_collision::$9 ← (byte) play_collision::xp#4 < (const byte) PLAYFIELD_COLS from [851] (bool~) play_collision::$8 ← (byte) play_collision::xp#4 >= (const byte) PLAYFIELD_COLS -Inversing boolean not [857] (bool~) play_collision::$11 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) == (byte) 0 from [856] (bool~) play_collision::$10 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) != (byte) 0 -Inversing boolean not [878] (bool~) play_lock_current::$1 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) == (byte) 0 from [877] (bool~) play_lock_current::$0 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) != (byte) 0 -Inversing boolean not [912] (bool~) play_spawn_current::$3 ← (byte~) play_spawn_current::$1 != (const byte) COLLISION_PLAYFIELD from [911] (bool~) play_spawn_current::$2 ← (byte~) play_spawn_current::$1 == (const byte) COLLISION_PLAYFIELD -Inversing boolean not [952] (bool~) play_remove_lines::$1 ← (byte) play_remove_lines::c#0 != (byte) 0 from [951] (bool~) play_remove_lines::$0 ← (byte) play_remove_lines::c#0 == (byte) 0 -Inversing boolean not [964] (bool~) play_remove_lines::$4 ← (byte) play_remove_lines::full#2 != (byte) 1 from [963] (bool~) play_remove_lines::$3 ← (byte) play_remove_lines::full#2 == (byte) 1 -Inversing boolean not [987] (bool~) play_update_score::$1 ← (byte) play_update_score::removed#1 == (byte) 0 from [986] (bool~) play_update_score::$0 ← (byte) play_update_score::removed#1 != (byte) 0 -Inversing boolean not [1003] (bool~) play_update_score::$7 ← (byte) play_update_score::lines_before#0 == (byte) play_update_score::lines_after#0 from [1002] (bool~) play_update_score::$6 ← (byte) play_update_score::lines_before#0 != (byte) play_update_score::lines_after#0 -Inversing boolean not [1029] (bool~) play_increase_level::$3 ← (byte~) play_increase_level::$1 != (byte) $a from [1028] (bool~) play_increase_level::$2 ← (byte~) play_increase_level::$1 == (byte) $a -Inversing boolean not [1137] (bool~) main::$18 ← (byte) main::render#2 == (byte) 0 from [1136] (bool~) main::$17 ← (byte) main::render#2 != (byte) 0 +Inversing boolean not [304] (bool~) render_bcd::$2 ← (byte) render_bcd::only_low#6 != (byte) 0 from [303] (bool~) render_bcd::$1 ← (byte) render_bcd::only_low#6 == (byte) 0 +Inversing boolean not [399] (bool~) render_moving::$3 ← (byte) render_moving::current_cell#0 == (byte) 0 from [398] (bool~) render_moving::$2 ← (byte) render_moving::current_cell#0 != (byte) 0 +Inversing boolean not [602] (bool~) play_movement::$2 ← (byte) game_over#1 == (byte) 0 from [601] (bool~) play_movement::$1 ← (byte) game_over#1 != (byte) 0 +Inversing boolean not [643] (bool~) play_move_down::$1 ← (byte) play_move_down::key_event#1 != (const byte) KEY_SPACE from [642] (bool~) play_move_down::$0 ← (byte) play_move_down::key_event#1 == (const byte) KEY_SPACE +Inversing boolean not [652] (bool~) play_move_down::$4 ← (byte~) play_move_down::$2 == (byte) 0 from [651] (bool~) play_move_down::$3 ← (byte~) play_move_down::$2 != (byte) 0 +Inversing boolean not [658] (bool~) play_move_down::$6 ← (byte) current_movedown_counter#12 < (byte) current_movedown_slow#19 from [657] (bool~) play_move_down::$5 ← (byte) current_movedown_counter#12 >= (byte) current_movedown_slow#19 +Inversing boolean not [662] (bool~) play_move_down::$10 ← (byte) current_movedown_counter#13 < (const byte) current_movedown_fast from [661] (bool~) play_move_down::$9 ← (byte) current_movedown_counter#13 >= (const byte) current_movedown_fast +Inversing boolean not [668] (bool~) play_move_down::$8 ← (byte) play_move_down::movedown#6 == (byte) 0 from [667] (bool~) play_move_down::$7 ← (byte) play_move_down::movedown#6 != (byte) 0 +Inversing boolean not [744] (bool~) play_move_leftright::$10 ← (byte~) play_move_leftright::$8 != (const byte) COLLISION_NONE from [743] (bool~) play_move_leftright::$9 ← (byte~) play_move_leftright::$8 == (const byte) COLLISION_NONE +Inversing boolean not [748] (bool~) play_move_leftright::$2 ← (byte) play_move_leftright::key_event#2 != (const byte) KEY_DOT from [747] (bool~) play_move_leftright::$1 ← (byte) play_move_leftright::key_event#2 == (const byte) KEY_DOT +Inversing boolean not [760] (bool~) play_move_leftright::$6 ← (byte~) play_move_leftright::$4 != (const byte) COLLISION_NONE from [759] (bool~) play_move_leftright::$5 ← (byte~) play_move_leftright::$4 == (const byte) COLLISION_NONE +Inversing boolean not [805] (bool~) play_move_rotate::$4 ← (byte~) play_move_rotate::$2 != (const byte) COLLISION_NONE from [804] (bool~) play_move_rotate::$3 ← (byte~) play_move_rotate::$2 == (const byte) COLLISION_NONE +Inversing boolean not [827] (bool~) play_collision::$2 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) == (byte) 0 from [826] (bool~) play_collision::$1 ← *((byte*) play_collision::piece_gfx#1 + (byte) play_collision::i#2) != (byte) 0 +Inversing boolean not [837] (bool~) play_collision::$4 ← (byte) play_collision::yp#3 < (const byte) PLAYFIELD_LINES from [836] (bool~) play_collision::$3 ← (byte) play_collision::yp#3 >= (const byte) PLAYFIELD_LINES +Inversing boolean not [842] (bool~) play_collision::$7 ← (byte~) play_collision::$5 == (byte) 0 from [841] (bool~) play_collision::$6 ← (byte~) play_collision::$5 != (byte) 0 +Inversing boolean not [850] (bool~) play_collision::$9 ← (byte) play_collision::xp#4 < (const byte) PLAYFIELD_COLS from [849] (bool~) play_collision::$8 ← (byte) play_collision::xp#4 >= (const byte) PLAYFIELD_COLS +Inversing boolean not [855] (bool~) play_collision::$11 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) == (byte) 0 from [854] (bool~) play_collision::$10 ← *((byte*) play_collision::playfield_line#1 + (byte) play_collision::xp#5) != (byte) 0 +Inversing boolean not [876] (bool~) play_lock_current::$1 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) == (byte) 0 from [875] (bool~) play_lock_current::$0 ← *((byte*) current_piece_gfx#22 + (byte) play_lock_current::i#2) != (byte) 0 +Inversing boolean not [910] (bool~) play_spawn_current::$3 ← (byte~) play_spawn_current::$1 != (const byte) COLLISION_PLAYFIELD from [909] (bool~) play_spawn_current::$2 ← (byte~) play_spawn_current::$1 == (const byte) COLLISION_PLAYFIELD +Inversing boolean not [950] (bool~) play_remove_lines::$1 ← (byte) play_remove_lines::c#0 != (byte) 0 from [949] (bool~) play_remove_lines::$0 ← (byte) play_remove_lines::c#0 == (byte) 0 +Inversing boolean not [962] (bool~) play_remove_lines::$4 ← (byte) play_remove_lines::full#2 != (byte) 1 from [961] (bool~) play_remove_lines::$3 ← (byte) play_remove_lines::full#2 == (byte) 1 +Inversing boolean not [985] (bool~) play_update_score::$1 ← (byte) play_update_score::removed#1 == (byte) 0 from [984] (bool~) play_update_score::$0 ← (byte) play_update_score::removed#1 != (byte) 0 +Inversing boolean not [1001] (bool~) play_update_score::$7 ← (byte) play_update_score::lines_before#0 == (byte) play_update_score::lines_after#0 from [1000] (bool~) play_update_score::$6 ← (byte) play_update_score::lines_before#0 != (byte) play_update_score::lines_after#0 +Inversing boolean not [1027] (bool~) play_increase_level::$3 ← (byte~) play_increase_level::$1 != (byte) $a from [1026] (bool~) play_increase_level::$2 ← (byte~) play_increase_level::$1 == (byte) $a +Inversing boolean not [1135] (bool~) main::$18 ← (byte) main::render#2 == (byte) 0 from [1134] (bool~) main::$17 ← (byte) main::render#2 != (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification Alias candidate removed (volatile)(byte) render_screen_show#11 = (byte) render_screen_showing Alias candidate removed (volatile)(byte) sprites_irq::toSpritePtr2_return#0 = (byte) irq_sprite_ptr (byte~) $1 (byte~) sprites_irq::toSpritePtr2_$2 (byte) sprites_irq::toSpritePtr2_return#2 (byte) sprites_irq::toSpritePtr2_return#1 (byte) sprites_irq::toSpritePtr2_return#3 (byte~) sprites_irq::$5 @@ -7776,89 +7772,89 @@ Identical Phi Values (byte) current_xpos#16 (byte) current_xpos#59 Identical Phi Values (byte*) current_piece_gfx#29 (byte*) current_piece_gfx#64 Identical Phi Values (byte) current_piece_char#37 (byte) current_piece_char#68 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [184] (byte~) render_init::$5 ← (byte) render_init::i#2 * (const byte) SIZEOF_POINTER +Identified duplicate assignment right side [182] (byte~) render_init::$5 ← (byte) render_init::i#2 * (const byte) SIZEOF_POINTER Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) keyboard_event_scan::$13 [21] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -Simple Condition (bool~) keyboard_event_scan::$25 [30] if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 -Simple Condition (bool~) keyboard_event_scan::$18 [36] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@12 -Simple Condition (bool~) keyboard_event_scan::$24 [41] if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 -Simple Condition (bool~) keyboard_event_scan::$20 [45] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@12 -Simple Condition (bool~) keyboard_event_scan::$22 [50] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@14 -Simple Condition (bool~) keyboard_event_scan::$2 [69] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -Simple Condition (bool~) keyboard_event_scan::$5 [78] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -Simple Condition (bool~) keyboard_event_scan::$8 [90] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -Simple Condition (bool~) keyboard_event_scan::$11 [102] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -Simple Condition (bool~) keyboard_event_get::$0 [124] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@1 -Simple Condition (bool~) render_init::$3 [190] if((byte) render_init::i#1!=rangelast(0,PLAYFIELD_LINES-1)) goto render_init::@1 -Simple Condition (bool~) render_show::$0 [200] if((byte) render_screen_show#16==(byte) 0) goto render_show::@1 -Simple Condition (bool~) render_score::$0 [255] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -Simple Condition (bool~) render_bcd::$2 [307] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -Simple Condition (bool~) render_screen_original::$0 [333] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -Simple Condition (bool~) render_screen_original::$1 [343] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@4 -Simple Condition (bool~) render_screen_original::$2 [351] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@6 -Simple Condition (bool~) render_screen_original::$3 [355] if((byte) render_screen_original::y#1!=rangelast(0,$18)) goto render_screen_original::@1 -Simple Condition (bool~) render_playfield::$1 [371] if((byte) render_playfield::c#1!=rangelast(0,PLAYFIELD_COLS-1)) goto render_playfield::@2 -Simple Condition (bool~) render_playfield::$2 [375] if((byte) render_playfield::l#1!=rangelast(2,PLAYFIELD_LINES-1)) goto render_playfield::@1 -Simple Condition (bool~) render_moving::$0 [383] if((byte) render_moving::ypos#2>(byte) 1) goto render_moving::@2 -Simple Condition (bool~) render_moving::$5 [396] if((byte) render_moving::l#1!=rangelast(0,3)) goto render_moving::@1 -Simple Condition (bool~) render_moving::$3 [402] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -Simple Condition (bool~) render_moving::$4 [407] if((byte) render_moving::c#1!=rangelast(0,3)) goto render_moving::@4 -Simple Condition (bool~) render_next::$0 [414] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -Simple Condition (bool~) render_next::$3 [432] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@7 -Simple Condition (bool~) render_next::$4 [441] if((byte) render_next::c#1!=rangelast(0,3)) goto render_next::@6 -Simple Condition (bool~) render_next::$5 [446] if((byte) render_next::l#1!=rangelast(0,3)) goto render_next::@5 -Simple Condition (bool~) sprites_init::$2 [465] if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 -Simple Condition (bool~) sprites_irq::$4 [504] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@11 -Simple Condition (bool~) sprites_irq::$1 [507] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 -Simple Condition (bool~) sprites_irq::$2 [524] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 -Simple Condition (bool~) sprites_irq::$3 [539] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 -Simple Condition (bool~) play_init::$0 [568] if((byte) play_init::j#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_init::@1 -Simple Condition (bool~) play_init::$1 [578] if((byte) play_init::b#1!=rangelast(0,4)) goto play_init::@3 -Simple Condition (bool~) play_movement::$2 [605] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -Simple Condition (bool~) play_move_down::$1 [646] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -Simple Condition (bool~) play_move_down::$4 [655] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -Simple Condition (bool~) play_move_down::$6 [661] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -Simple Condition (bool~) play_move_down::$10 [665] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -Simple Condition (bool~) play_move_down::$8 [671] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@4 -Simple Condition (bool~) play_move_down::$13 [686] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@14 -Simple Condition (bool~) play_move_leftright::$0 [735] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -Simple Condition (bool~) play_move_leftright::$10 [747] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@3 -Simple Condition (bool~) play_move_leftright::$2 [751] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@3 -Simple Condition (bool~) play_move_leftright::$6 [763] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@3 -Simple Condition (bool~) play_move_rotate::$0 [779] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -Simple Condition (bool~) play_move_rotate::$1 [786] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -Simple Condition (bool~) play_move_rotate::$4 [808] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@5 -Simple Condition (bool~) play_collision::$2 [831] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -Simple Condition (bool~) play_collision::$12 [836] if((byte) play_collision::c#1!=rangelast(0,3)) goto play_collision::@2 -Simple Condition (bool~) play_collision::$4 [840] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -Simple Condition (bool~) play_collision::$7 [845] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -Simple Condition (bool~) play_collision::$9 [853] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -Simple Condition (bool~) play_collision::$11 [858] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -Simple Condition (bool~) play_collision::$13 [865] if((byte) play_collision::l#1!=rangelast(0,3)) goto play_collision::@1 -Simple Condition (bool~) play_lock_current::$1 [880] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -Simple Condition (bool~) play_lock_current::$2 [885] if((byte) play_lock_current::c#1!=rangelast(0,3)) goto play_lock_current::@2 -Simple Condition (bool~) play_lock_current::$3 [892] if((byte) play_lock_current::l#1!=rangelast(0,3)) goto play_lock_current::@1 -Simple Condition (bool~) play_spawn_current::$3 [913] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@1 -Simple Condition (bool~) play_spawn_current::$4 [920] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -Simple Condition (bool~) play_remove_lines::$1 [953] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@3 -Simple Condition (bool~) play_remove_lines::$2 [959] if((byte) play_remove_lines::x#1!=rangelast(0,PLAYFIELD_COLS-1)) goto play_remove_lines::@2 -Simple Condition (bool~) play_remove_lines::$4 [965] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@7 -Simple Condition (bool~) play_remove_lines::$6 [969] if((byte) play_remove_lines::y#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_remove_lines::@1 -Simple Condition (bool~) play_remove_lines::$7 [976] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@10 -Simple Condition (bool~) play_update_score::$1 [988] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -Simple Condition (bool~) play_update_score::$7 [1004] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -Simple Condition (bool~) play_increase_level::$0 [1020] if((byte) level#21>(byte) $1d) goto play_increase_level::@1 -Simple Condition (bool~) play_increase_level::$3 [1030] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@3 -Simple Condition (bool~) play_increase_level::$4 [1041] if((byte) play_increase_level::b#1!=rangelast(0,4)) goto play_increase_level::@7 -Simple Condition (bool~) main::$10 [1094] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) main::$14 [1110] if((byte) game_over#10==(byte) 0) goto main::@11 -Simple Condition (bool~) main::$18 [1138] if((byte) main::render#2==(byte) 0) goto main::@1 +Simple Condition (bool~) keyboard_event_scan::$13 [15] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 +Simple Condition (bool~) keyboard_event_scan::$25 [21] if((byte) keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 +Simple Condition (bool~) keyboard_event_scan::$18 [26] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_scan::$24 [31] if((byte) keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 +Simple Condition (bool~) keyboard_event_scan::$20 [33] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@12 +Simple Condition (bool~) keyboard_event_scan::$22 [36] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@14 +Simple Condition (bool~) keyboard_event_scan::$2 [49] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 +Simple Condition (bool~) keyboard_event_scan::$5 [56] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 +Simple Condition (bool~) keyboard_event_scan::$8 [64] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 +Simple Condition (bool~) keyboard_event_scan::$11 [72] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return +Simple Condition (bool~) keyboard_event_get::$0 [85] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@1 +Simple Condition (bool~) render_init::$3 [136] if((byte) render_init::i#1!=rangelast(0,PLAYFIELD_LINES-1)) goto render_init::@1 +Simple Condition (bool~) render_show::$0 [143] if((byte) render_screen_show#16==(byte) 0) goto render_show::@1 +Simple Condition (bool~) render_score::$0 [179] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 +Simple Condition (bool~) render_bcd::$2 [217] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 +Simple Condition (bool~) render_screen_original::$0 [242] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 +Simple Condition (bool~) render_screen_original::$1 [252] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@4 +Simple Condition (bool~) render_screen_original::$2 [260] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@6 +Simple Condition (bool~) render_screen_original::$3 [263] if((byte) render_screen_original::y#1!=rangelast(0,$18)) goto render_screen_original::@1 +Simple Condition (bool~) render_playfield::$1 [279] if((byte) render_playfield::c#1!=rangelast(0,PLAYFIELD_COLS-1)) goto render_playfield::@2 +Simple Condition (bool~) render_playfield::$2 [282] if((byte) render_playfield::l#1!=rangelast(2,PLAYFIELD_LINES-1)) goto render_playfield::@1 +Simple Condition (bool~) render_moving::$0 [290] if((byte) render_moving::ypos#2>(byte) 1) goto render_moving::@2 +Simple Condition (bool~) render_moving::$5 [301] if((byte) render_moving::l#1!=rangelast(0,3)) goto render_moving::@1 +Simple Condition (bool~) render_moving::$3 [306] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 +Simple Condition (bool~) render_moving::$4 [310] if((byte) render_moving::c#1!=rangelast(0,3)) goto render_moving::@4 +Simple Condition (bool~) render_next::$0 [316] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 +Simple Condition (bool~) render_next::$3 [330] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@7 +Simple Condition (bool~) render_next::$4 [336] if((byte) render_next::c#1!=rangelast(0,3)) goto render_next::@6 +Simple Condition (bool~) render_next::$5 [340] if((byte) render_next::l#1!=rangelast(0,3)) goto render_next::@5 +Simple Condition (bool~) sprites_init::$2 [356] if((byte) sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 +Simple Condition (bool~) sprites_irq::$4 [388] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@11 +Simple Condition (bool~) sprites_irq::$1 [391] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 +Simple Condition (bool~) sprites_irq::$2 [406] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 +Simple Condition (bool~) sprites_irq::$3 [420] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 +Simple Condition (bool~) play_init::$0 [448] if((byte) play_init::j#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_init::@1 +Simple Condition (bool~) play_init::$1 [457] if((byte) play_init::b#1!=rangelast(0,4)) goto play_init::@3 +Simple Condition (bool~) play_movement::$2 [468] if((byte) game_over#15==(byte) 0) goto play_movement::@1 +Simple Condition (bool~) play_move_down::$1 [487] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 +Simple Condition (bool~) play_move_down::$4 [494] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 +Simple Condition (bool~) play_move_down::$6 [498] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 +Simple Condition (bool~) play_move_down::$10 [500] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 +Simple Condition (bool~) play_move_down::$8 [504] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@4 +Simple Condition (bool~) play_move_down::$13 [514] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@14 +Simple Condition (bool~) play_move_leftright::$0 [532] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 +Simple Condition (bool~) play_move_leftright::$10 [540] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@3 +Simple Condition (bool~) play_move_leftright::$2 [542] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@3 +Simple Condition (bool~) play_move_leftright::$6 [550] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@3 +Simple Condition (bool~) play_move_rotate::$0 [561] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 +Simple Condition (bool~) play_move_rotate::$1 [565] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 +Simple Condition (bool~) play_move_rotate::$4 [579] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@5 +Simple Condition (bool~) play_collision::$2 [595] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 +Simple Condition (bool~) play_collision::$12 [599] if((byte) play_collision::c#1!=rangelast(0,3)) goto play_collision::@2 +Simple Condition (bool~) play_collision::$4 [601] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 +Simple Condition (bool~) play_collision::$7 [604] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 +Simple Condition (bool~) play_collision::$9 [609] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 +Simple Condition (bool~) play_collision::$11 [612] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 +Simple Condition (bool~) play_collision::$13 [618] if((byte) play_collision::l#1!=rangelast(0,3)) goto play_collision::@1 +Simple Condition (bool~) play_lock_current::$1 [632] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 +Simple Condition (bool~) play_lock_current::$2 [636] if((byte) play_lock_current::c#1!=rangelast(0,3)) goto play_lock_current::@2 +Simple Condition (bool~) play_lock_current::$3 [641] if((byte) play_lock_current::l#1!=rangelast(0,3)) goto play_lock_current::@1 +Simple Condition (bool~) play_spawn_current::$3 [659] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@1 +Simple Condition (bool~) play_spawn_current::$4 [665] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 +Simple Condition (bool~) play_remove_lines::$1 [681] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@3 +Simple Condition (bool~) play_remove_lines::$2 [687] if((byte) play_remove_lines::x#1!=rangelast(0,PLAYFIELD_COLS-1)) goto play_remove_lines::@2 +Simple Condition (bool~) play_remove_lines::$4 [690] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@7 +Simple Condition (bool~) play_remove_lines::$6 [694] if((byte) play_remove_lines::y#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_remove_lines::@1 +Simple Condition (bool~) play_remove_lines::$7 [699] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@10 +Simple Condition (bool~) play_update_score::$1 [705] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return +Simple Condition (bool~) play_update_score::$7 [717] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return +Simple Condition (bool~) play_increase_level::$0 [725] if((byte) level#21>(byte) $1d) goto play_increase_level::@1 +Simple Condition (bool~) play_increase_level::$3 [732] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@3 +Simple Condition (bool~) play_increase_level::$4 [742] if((byte) play_increase_level::b#1!=rangelast(0,4)) goto play_increase_level::@7 +Simple Condition (bool~) main::$10 [765] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) main::$14 [775] if((byte) game_over#10==(byte) 0) goto main::@11 +Simple Condition (bool~) main::$18 [786] if((byte) main::render#2==(byte) 0) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [267] (word) render_bcd::offset#1 ← (const word) render_score::score_offset + (byte) 2 -Constant right-side identified [274] (word) render_bcd::offset#2 ← (const word) render_score::score_offset + (byte) 4 -Constant right-side identified [288] (word) render_bcd::offset#4 ← (const word) render_score::lines_offset + (byte) 1 -Constant right-side identified [416] (byte*) render_next::screen_next_area#1 ← (const byte*) PLAYFIELD_SCREEN_1 + (const word) render_next::next_area_offset -Constant right-side identified [419] (byte*) render_next::screen_next_area#2 ← (const byte*) PLAYFIELD_SCREEN_2 + (const word) render_next::next_area_offset +Constant right-side identified [188] (word) render_bcd::offset#1 ← (const word) render_score::score_offset + (byte) 2 +Constant right-side identified [193] (word) render_bcd::offset#2 ← (const word) render_score::score_offset + (byte) 4 +Constant right-side identified [203] (word) render_bcd::offset#4 ← (const word) render_score::lines_offset + (byte) 1 +Constant right-side identified [317] (byte*) render_next::screen_next_area#1 ← (const byte*) PLAYFIELD_SCREEN_1 + (const word) render_next::next_area_offset +Constant right-side identified [318] (byte*) render_next::screen_next_area#2 ← (const byte*) PLAYFIELD_SCREEN_2 + (const word) render_next::next_area_offset Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) keyboard_events_size#0 = 0 Constant (const byte) keyboard_modifiers#0 = 0 @@ -7985,7 +7981,7 @@ Constant (const word) toSpritePtr1_$0 = (word)toSpritePtr1_sprite#0 Constant (const word) sprites_irq::toSpritePtr2_$0 = (word)sprites_irq::toSpritePtr2_sprite#0 Constant (const byte) play_collision::orientation#4 = current_orientation#68 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [1091] if(true) goto main::@4 +if() condition always true - replacing block destination [762] if(true) goto main::@4 Removing PHI-reference to removed block (main::@12) in block main::@19 Removing PHI-reference to removed block (main::@12) in block main::@19 Removing PHI-reference to removed block (main::@12) in block main::@19 @@ -8000,62 +7996,62 @@ Removing PHI-reference to removed block (main::@12) in block main::@19 Removing PHI-reference to removed block (main::@12) in block main::@19 Removing PHI-reference to removed block (main::@12) in block main::@19 Removing PHI-reference to removed block (main::@12) in block main::@19 -if() condition always true - replacing block destination [1132] if(true) goto main::@13 +if() condition always true - replacing block destination [782] if(true) goto main::@13 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [28] keyboard_event_scan::row#1 ← ++ keyboard_event_scan::row#2 to ++ -Resolved ranged comparison value [30] if(keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 to (number) 8 -Resolved ranged next value [39] keyboard_event_scan::col#1 ← ++ keyboard_event_scan::col#2 to ++ -Resolved ranged comparison value [41] if(keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 to (number) 8 -Resolved ranged next value [188] render_init::i#1 ← ++ render_init::i#2 to ++ -Resolved ranged comparison value [190] if(render_init::i#1!=rangelast(0,PLAYFIELD_LINES-1)) goto render_init::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 -Resolved ranged next value [353] render_screen_original::y#1 ← ++ render_screen_original::y#6 to ++ -Resolved ranged comparison value [355] if(render_screen_original::y#1!=rangelast(0,$18)) goto render_screen_original::@1 to (number) $19 -Resolved ranged next value [369] render_playfield::c#1 ← ++ render_playfield::c#2 to ++ -Resolved ranged comparison value [371] if(render_playfield::c#1!=rangelast(0,PLAYFIELD_COLS-1)) goto render_playfield::@2 to (const byte) PLAYFIELD_COLS-(byte) 1+(number) 1 -Resolved ranged next value [373] render_playfield::l#1 ← ++ render_playfield::l#2 to ++ -Resolved ranged comparison value [375] if(render_playfield::l#1!=rangelast(2,PLAYFIELD_LINES-1)) goto render_playfield::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 -Resolved ranged next value [394] render_moving::l#1 ← ++ render_moving::l#4 to ++ -Resolved ranged comparison value [396] if(render_moving::l#1!=rangelast(0,3)) goto render_moving::@1 to (number) 4 -Resolved ranged next value [405] render_moving::c#1 ← ++ render_moving::c#2 to ++ -Resolved ranged comparison value [407] if(render_moving::c#1!=rangelast(0,3)) goto render_moving::@4 to (number) 4 -Resolved ranged next value [439] render_next::c#1 ← ++ render_next::c#2 to ++ -Resolved ranged comparison value [441] if(render_next::c#1!=rangelast(0,3)) goto render_next::@6 to (number) 4 -Resolved ranged next value [444] render_next::l#1 ← ++ render_next::l#7 to ++ -Resolved ranged comparison value [446] if(render_next::l#1!=rangelast(0,3)) goto render_next::@5 to (number) 4 -Resolved ranged next value [463] sprites_init::s#1 ← ++ sprites_init::s#2 to ++ -Resolved ranged comparison value [465] if(sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 to (number) 4 -Resolved ranged next value [566] play_init::j#1 ← ++ play_init::j#2 to ++ -Resolved ranged comparison value [568] if(play_init::j#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_init::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 -Resolved ranged next value [576] play_init::b#1 ← ++ play_init::b#2 to ++ -Resolved ranged comparison value [578] if(play_init::b#1!=rangelast(0,4)) goto play_init::@3 to (number) 5 -Resolved ranged next value [834] play_collision::c#1 ← ++ play_collision::c#2 to ++ -Resolved ranged comparison value [836] if(play_collision::c#1!=rangelast(0,3)) goto play_collision::@2 to (number) 4 -Resolved ranged next value [863] play_collision::l#1 ← ++ play_collision::l#6 to ++ -Resolved ranged comparison value [865] if(play_collision::l#1!=rangelast(0,3)) goto play_collision::@1 to (number) 4 -Resolved ranged next value [883] play_lock_current::c#1 ← ++ play_lock_current::c#2 to ++ -Resolved ranged comparison value [885] if(play_lock_current::c#1!=rangelast(0,3)) goto play_lock_current::@2 to (number) 4 -Resolved ranged next value [890] play_lock_current::l#1 ← ++ play_lock_current::l#6 to ++ -Resolved ranged comparison value [892] if(play_lock_current::l#1!=rangelast(0,3)) goto play_lock_current::@1 to (number) 4 -Resolved ranged next value [957] play_remove_lines::x#1 ← ++ play_remove_lines::x#2 to ++ -Resolved ranged comparison value [959] if(play_remove_lines::x#1!=rangelast(0,PLAYFIELD_COLS-1)) goto play_remove_lines::@2 to (const byte) PLAYFIELD_COLS-(byte) 1+(number) 1 -Resolved ranged next value [967] play_remove_lines::y#1 ← ++ play_remove_lines::y#8 to ++ -Resolved ranged comparison value [969] if(play_remove_lines::y#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_remove_lines::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 -Resolved ranged next value [1039] play_increase_level::b#1 ← ++ play_increase_level::b#2 to ++ -Resolved ranged comparison value [1041] if(play_increase_level::b#1!=rangelast(0,4)) goto play_increase_level::@7 to (number) 5 -Rewriting conditional comparison [383] if((byte) render_moving::ypos#2>(byte) 1) goto render_moving::@2 -Rewriting conditional comparison [1020] if((byte) level#21>(byte) $1d) goto play_increase_level::@1 -Simplifying expression containing zero KEY_MODIFIER_LSHIFT in [80] (byte) keyboard_modifiers#2 ← (const byte) keyboard_modifiers#1 | (const byte) KEY_MODIFIER_LSHIFT -Simplifying expression containing zero PIECES_COLORS_1 in [171] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) 0) -Simplifying expression containing zero PIECES_COLORS_2 in [172] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) 0) -Simplifying expression containing zero render_score::score_bytes in [277] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes + (byte) 0) -Simplifying expression containing zero SPRITES_YPOS in [497] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte) sprites_irq::ypos#0 -Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_1 in [509] *((const byte*) PLAYFIELD_SPRITE_PTRS_1 + (byte) 0) ← (byte) sprites_irq::ptr#0 -Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_2 in [516] *((const byte*) PLAYFIELD_SPRITE_PTRS_2 + (byte) 0) ← (byte) sprites_irq::ptr#0 -Simplifying expression containing zero MOVEDOWN_SLOW_SPEEDS in [571] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (const byte) level#0) -Simplifying expression containing zero play_movement::$0 in [602] (byte) play_movement::render#1 ← (const byte) play_movement::render#0 + (byte~) play_movement::$0 -Simplifying expression containing zero current_piece#5 in [900] (byte*) current_piece_gfx#74 ← (byte*) current_piece#5 + (const byte) current_orientation#68 +Resolved ranged next value [19] keyboard_event_scan::row#1 ← ++ keyboard_event_scan::row#2 to ++ +Resolved ranged comparison value [21] if(keyboard_event_scan::row#1!=rangelast(0,7)) goto keyboard_event_scan::@8 to (number) 8 +Resolved ranged next value [29] keyboard_event_scan::col#1 ← ++ keyboard_event_scan::col#2 to ++ +Resolved ranged comparison value [31] if(keyboard_event_scan::col#1!=rangelast(0,7)) goto keyboard_event_scan::@11 to (number) 8 +Resolved ranged next value [134] render_init::i#1 ← ++ render_init::i#2 to ++ +Resolved ranged comparison value [136] if(render_init::i#1!=rangelast(0,PLAYFIELD_LINES-1)) goto render_init::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 +Resolved ranged next value [261] render_screen_original::y#1 ← ++ render_screen_original::y#6 to ++ +Resolved ranged comparison value [263] if(render_screen_original::y#1!=rangelast(0,$18)) goto render_screen_original::@1 to (number) $19 +Resolved ranged next value [277] render_playfield::c#1 ← ++ render_playfield::c#2 to ++ +Resolved ranged comparison value [279] if(render_playfield::c#1!=rangelast(0,PLAYFIELD_COLS-1)) goto render_playfield::@2 to (const byte) PLAYFIELD_COLS-(byte) 1+(number) 1 +Resolved ranged next value [280] render_playfield::l#1 ← ++ render_playfield::l#2 to ++ +Resolved ranged comparison value [282] if(render_playfield::l#1!=rangelast(2,PLAYFIELD_LINES-1)) goto render_playfield::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 +Resolved ranged next value [299] render_moving::l#1 ← ++ render_moving::l#4 to ++ +Resolved ranged comparison value [301] if(render_moving::l#1!=rangelast(0,3)) goto render_moving::@1 to (number) 4 +Resolved ranged next value [308] render_moving::c#1 ← ++ render_moving::c#2 to ++ +Resolved ranged comparison value [310] if(render_moving::c#1!=rangelast(0,3)) goto render_moving::@4 to (number) 4 +Resolved ranged next value [334] render_next::c#1 ← ++ render_next::c#2 to ++ +Resolved ranged comparison value [336] if(render_next::c#1!=rangelast(0,3)) goto render_next::@6 to (number) 4 +Resolved ranged next value [338] render_next::l#1 ← ++ render_next::l#7 to ++ +Resolved ranged comparison value [340] if(render_next::l#1!=rangelast(0,3)) goto render_next::@5 to (number) 4 +Resolved ranged next value [354] sprites_init::s#1 ← ++ sprites_init::s#2 to ++ +Resolved ranged comparison value [356] if(sprites_init::s#1!=rangelast(0,3)) goto sprites_init::@1 to (number) 4 +Resolved ranged next value [446] play_init::j#1 ← ++ play_init::j#2 to ++ +Resolved ranged comparison value [448] if(play_init::j#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_init::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 +Resolved ranged next value [455] play_init::b#1 ← ++ play_init::b#2 to ++ +Resolved ranged comparison value [457] if(play_init::b#1!=rangelast(0,4)) goto play_init::@3 to (number) 5 +Resolved ranged next value [597] play_collision::c#1 ← ++ play_collision::c#2 to ++ +Resolved ranged comparison value [599] if(play_collision::c#1!=rangelast(0,3)) goto play_collision::@2 to (number) 4 +Resolved ranged next value [616] play_collision::l#1 ← ++ play_collision::l#6 to ++ +Resolved ranged comparison value [618] if(play_collision::l#1!=rangelast(0,3)) goto play_collision::@1 to (number) 4 +Resolved ranged next value [634] play_lock_current::c#1 ← ++ play_lock_current::c#2 to ++ +Resolved ranged comparison value [636] if(play_lock_current::c#1!=rangelast(0,3)) goto play_lock_current::@2 to (number) 4 +Resolved ranged next value [639] play_lock_current::l#1 ← ++ play_lock_current::l#6 to ++ +Resolved ranged comparison value [641] if(play_lock_current::l#1!=rangelast(0,3)) goto play_lock_current::@1 to (number) 4 +Resolved ranged next value [685] play_remove_lines::x#1 ← ++ play_remove_lines::x#2 to ++ +Resolved ranged comparison value [687] if(play_remove_lines::x#1!=rangelast(0,PLAYFIELD_COLS-1)) goto play_remove_lines::@2 to (const byte) PLAYFIELD_COLS-(byte) 1+(number) 1 +Resolved ranged next value [692] play_remove_lines::y#1 ← ++ play_remove_lines::y#8 to ++ +Resolved ranged comparison value [694] if(play_remove_lines::y#1!=rangelast(0,PLAYFIELD_LINES-1)) goto play_remove_lines::@1 to (const byte) PLAYFIELD_LINES-(byte) 1+(number) 1 +Resolved ranged next value [740] play_increase_level::b#1 ← ++ play_increase_level::b#2 to ++ +Resolved ranged comparison value [742] if(play_increase_level::b#1!=rangelast(0,4)) goto play_increase_level::@7 to (number) 5 +Rewriting conditional comparison [290] if((byte) render_moving::ypos#2>(byte) 1) goto render_moving::@2 +Rewriting conditional comparison [725] if((byte) level#21>(byte) $1d) goto play_increase_level::@1 +Simplifying expression containing zero KEY_MODIFIER_LSHIFT in [57] (byte) keyboard_modifiers#2 ← (const byte) keyboard_modifiers#1 | (const byte) KEY_MODIFIER_LSHIFT +Simplifying expression containing zero PIECES_COLORS_1 in [117] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) 0) +Simplifying expression containing zero PIECES_COLORS_2 in [118] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) 0) +Simplifying expression containing zero render_score::score_bytes in [195] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes + (byte) 0) +Simplifying expression containing zero SPRITES_YPOS in [381] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte) sprites_irq::ypos#0 +Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_1 in [392] *((const byte*) PLAYFIELD_SPRITE_PTRS_1 + (byte) 0) ← (byte) sprites_irq::ptr#0 +Simplifying expression containing zero PLAYFIELD_SPRITE_PTRS_2 in [398] *((const byte*) PLAYFIELD_SPRITE_PTRS_2 + (byte) 0) ← (byte) sprites_irq::ptr#0 +Simplifying expression containing zero MOVEDOWN_SLOW_SPEEDS in [450] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (const byte) level#0) +Simplifying expression containing zero play_movement::$0 in [466] (byte) play_movement::render#1 ← (const byte) play_movement::render#0 + (byte~) play_movement::$0 +Simplifying expression containing zero current_piece#5 in [649] (byte*) current_piece_gfx#74 ← (byte*) current_piece#5 + (const byte) current_orientation#68 Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (byte*) render_bcd::screen_pos#1 and assignment [149] (byte*) render_bcd::screen_pos#1 ← ++ (byte*) render_bcd::screen_pos#3 +Eliminating unused variable (byte*) render_bcd::screen_pos#1 and assignment [147] (byte*) render_bcd::screen_pos#1 ← ++ (byte*) render_bcd::screen_pos#3 Eliminating unused variable - keeping the phi block (byte) keyboard_modifiers#16 Eliminating unused constant (const byte) render_show::d018val#0 Eliminating unused constant (const byte*) render_score::screen#0 @@ -8211,14 +8207,14 @@ Identical Phi Values (word) lines_bcd#40 (word) lines_bcd#15 Identical Phi Values (byte) level#102 (byte) level#17 Identical Phi Values (byte) level_bcd#50 (byte) level_bcd#17 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [71] (byte~) render_init::vicSelectGfxBank1_toDd001_$1 ← > (const word) render_init::vicSelectGfxBank1_toDd001_$0 -Constant right-side identified [94] (word~) render_show::toD0181_$1 ← (const word) render_show::toD0181_$0 & (word) $3fff -Constant right-side identified [97] (byte~) render_show::toD0181_$5 ← > (const word) render_show::toD0181_$4 -Constant right-side identified [101] (word~) render_show::toD0182_$1 ← (const word) render_show::toD0182_$0 & (word) $3fff -Constant right-side identified [104] (byte~) render_show::toD0182_$5 ← > (const word) render_show::toD0182_$4 -Constant right-side identified [249] (word~) toSpritePtr1_$1 ← (const word) toSpritePtr1_$0 / (byte) $40 -Constant right-side identified [293] (word~) sprites_irq::toSpritePtr2_$1 ← (const word) sprites_irq::toSpritePtr2_$0 / (byte) $40 -Constant right-side identified [351] (byte) play_move_down::movedown#1 ← ++ (const byte) play_move_down::movedown#0 +Constant right-side identified [65] (byte~) render_init::vicSelectGfxBank1_toDd001_$1 ← > (const word) render_init::vicSelectGfxBank1_toDd001_$0 +Constant right-side identified [87] (word~) render_show::toD0181_$1 ← (const word) render_show::toD0181_$0 & (word) $3fff +Constant right-side identified [90] (byte~) render_show::toD0181_$5 ← > (const word) render_show::toD0181_$4 +Constant right-side identified [94] (word~) render_show::toD0182_$1 ← (const word) render_show::toD0182_$0 & (word) $3fff +Constant right-side identified [97] (byte~) render_show::toD0182_$5 ← > (const word) render_show::toD0182_$4 +Constant right-side identified [242] (word~) toSpritePtr1_$1 ← (const word) toSpritePtr1_$0 / (byte) $40 +Constant right-side identified [286] (word~) sprites_irq::toSpritePtr2_$1 ← (const word) sprites_irq::toSpritePtr2_$0 / (byte) $40 +Constant right-side identified [343] (byte) play_move_down::movedown#1 ← ++ (const byte) play_move_down::movedown#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) render_init::vicSelectGfxBank1_toDd001_$1 = >render_init::vicSelectGfxBank1_toDd001_$0 Constant (const word) render_show::toD0181_$1 = render_show::toD0181_$0&$3fff @@ -8240,12 +8236,12 @@ Constant (const byte) sprites_irq::$5 = sprites_irq::toSpritePtr2_return#1 Successful SSA optimization Pass2ConstantIdentification Alias candidate removed (volatile)(byte) irq_sprite_ptr = (byte~) $1 Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify = (byte~) sprites_irq::$0 -Constant right-side identified [67] (byte~) render_init::vicSelectGfxBank1_toDd001_$2 ← (const byte) render_init::vicSelectGfxBank1_toDd001_$1 / (byte) $40 -Constant right-side identified [88] (word~) render_show::toD0181_$2 ← (const word) render_show::toD0181_$1 * (byte) 4 -Constant right-side identified [90] (byte~) render_show::toD0181_$6 ← (const byte) render_show::toD0181_$5 / (byte) 4 -Constant right-side identified [93] (word~) render_show::toD0182_$2 ← (const word) render_show::toD0182_$1 * (byte) 4 -Constant right-side identified [95] (byte~) render_show::toD0182_$6 ← (const byte) render_show::toD0182_$5 / (byte) 4 -Constant right-side identified [239] (byte~) $1 ← (const byte) toSpritePtr1_return#0 + (byte) 3 +Constant right-side identified [65] (byte~) render_init::vicSelectGfxBank1_toDd001_$2 ← (const byte) render_init::vicSelectGfxBank1_toDd001_$1 / (byte) $40 +Constant right-side identified [86] (word~) render_show::toD0181_$2 ← (const word) render_show::toD0181_$1 * (byte) 4 +Constant right-side identified [88] (byte~) render_show::toD0181_$6 ← (const byte) render_show::toD0181_$5 / (byte) 4 +Constant right-side identified [91] (word~) render_show::toD0182_$2 ← (const word) render_show::toD0182_$1 * (byte) 4 +Constant right-side identified [93] (byte~) render_show::toD0182_$6 ← (const byte) render_show::toD0182_$5 / (byte) 4 +Constant right-side identified [237] (byte~) $1 ← (const byte) toSpritePtr1_return#0 + (byte) 3 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) render_init::vicSelectGfxBank1_toDd001_$2 = render_init::vicSelectGfxBank1_toDd001_$1/$40 Constant (const word) render_show::toD0181_$2 = render_show::toD0181_$1*4 @@ -8256,7 +8252,7 @@ Constant (const byte) $1 = toSpritePtr1_return#0+3 Successful SSA optimization Pass2ConstantIdentification Simplifying constant evaluating to zero (const byte) render_init::vicSelectGfxBank1_toDd001_$1/(byte) $40 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero 3 in [68] (byte) render_init::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) render_init::vicSelectGfxBank1_toDd001_$2 +Simplifying expression containing zero 3 in [66] (byte) render_init::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) render_init::vicSelectGfxBank1_toDd001_$2 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) render_init::vicSelectGfxBank1_toDd001_$1 Eliminating unused constant (const byte) render_init::vicSelectGfxBank1_toDd001_$2 @@ -8266,10 +8262,10 @@ Successful SSA optimization PassNEliminateUnusedVars Eliminating unused constant (const byte*) render_init::vicSelectGfxBank1_gfx#0 Successful SSA optimization PassNEliminateUnusedVars Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify = (byte~) sprites_irq::$0 -Constant right-side identified [87] (byte~) render_show::toD0181_$3 ← > (const word) render_show::toD0181_$2 -Constant right-side identified [88] (byte~) render_show::toD0181_$7 ← (const byte) render_show::toD0181_$6 & (byte) $f -Constant right-side identified [90] (byte~) render_show::toD0182_$3 ← > (const word) render_show::toD0182_$2 -Constant right-side identified [91] (byte~) render_show::toD0182_$7 ← (const byte) render_show::toD0182_$6 & (byte) $f +Constant right-side identified [85] (byte~) render_show::toD0181_$3 ← > (const word) render_show::toD0181_$2 +Constant right-side identified [86] (byte~) render_show::toD0181_$7 ← (const byte) render_show::toD0181_$6 & (byte) $f +Constant right-side identified [88] (byte~) render_show::toD0182_$3 ← > (const word) render_show::toD0182_$2 +Constant right-side identified [89] (byte~) render_show::toD0182_$7 ← (const byte) render_show::toD0182_$6 & (byte) $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 = 3 Constant (const byte) render_show::toD0181_$3 = >render_show::toD0181_$2 @@ -8278,28 +8274,28 @@ Constant (const byte) render_show::toD0182_$3 = >render_show::toD0182_$2 Constant (const byte) render_show::toD0182_$7 = render_show::toD0182_$6&$f Successful SSA optimization Pass2ConstantIdentification Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify = (byte~) sprites_irq::$0 -Constant right-side identified [86] (byte) render_show::toD0181_return#0 ← (const byte) render_show::toD0181_$3 | (const byte) render_show::toD0181_$7 -Constant right-side identified [87] (byte) render_show::toD0182_return#0 ← (const byte) render_show::toD0182_$3 | (const byte) render_show::toD0182_$7 +Constant right-side identified [84] (byte) render_show::toD0181_return#0 ← (const byte) render_show::toD0181_$3 | (const byte) render_show::toD0181_$7 +Constant right-side identified [85] (byte) render_show::toD0182_return#0 ← (const byte) render_show::toD0182_$3 | (const byte) render_show::toD0182_$7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) render_show::toD0181_return#0 = render_show::toD0181_$3|render_show::toD0181_$7 Constant (const byte) render_show::toD0182_return#0 = render_show::toD0182_$3|render_show::toD0182_$7 Successful SSA optimization Pass2ConstantIdentification Alias candidate removed (volatile)(byte) sprites_irq::raster_sprite_gfx_modify = (byte~) sprites_irq::$0 -Inlining Noop Cast [196] (byte*) render_next::next_piece_gfx#0 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) keeping *(PIECES + render_next::$6) -Inlining Noop Cast [423] (byte*) current_piece_gfx#74 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) keeping *(PIECES + play_spawn_current::$7) +Inlining Noop Cast [194] (byte*) render_next::next_piece_gfx#0 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) keeping *(PIECES + render_next::$6) +Inlining Noop Cast [421] (byte*) current_piece_gfx#74 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) keeping *(PIECES + play_spawn_current::$7) Successful SSA optimization Pass2NopCastInlining -Rewriting multiplication to use shift [77] (byte~) render_init::$5 ← (byte) render_init::i#2 * (const byte) SIZEOF_POINTER -Rewriting multiplication to use shift [159] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 * (const byte) SIZEOF_POINTER -Rewriting multiplication to use shift [175] (byte~) render_moving::$6 ← (byte~) render_moving::$1 * (const byte) SIZEOF_POINTER -Rewriting multiplication to use shift [195] (byte~) render_next::$6 ← (byte) next_piece_idx#12 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [218] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 * (byte) 2 -Rewriting multiplication to use shift [281] (byte~) play_init::$2 ← (byte) play_init::j#2 * (const byte) SIZEOF_POINTER -Rewriting multiplication to use shift [291] (byte~) play_init::$3 ← (byte) play_init::b#2 * (const byte) SIZEOF_DWORD -Rewriting multiplication to use shift [386] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 * (const byte) SIZEOF_POINTER -Rewriting multiplication to use shift [406] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 * (const byte) SIZEOF_POINTER -Rewriting multiplication to use shift [422] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 * (const byte) SIZEOF_WORD -Rewriting multiplication to use shift [464] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 * (const byte) SIZEOF_DWORD -Rewriting multiplication to use shift [487] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 * (const byte) SIZEOF_DWORD +Rewriting multiplication to use shift [75] (byte~) render_init::$5 ← (byte) render_init::i#2 * (const byte) SIZEOF_POINTER +Rewriting multiplication to use shift [157] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 * (const byte) SIZEOF_POINTER +Rewriting multiplication to use shift [173] (byte~) render_moving::$6 ← (byte~) render_moving::$1 * (const byte) SIZEOF_POINTER +Rewriting multiplication to use shift [193] (byte~) render_next::$6 ← (byte) next_piece_idx#12 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [216] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 * (byte) 2 +Rewriting multiplication to use shift [279] (byte~) play_init::$2 ← (byte) play_init::j#2 * (const byte) SIZEOF_POINTER +Rewriting multiplication to use shift [289] (byte~) play_init::$3 ← (byte) play_init::b#2 * (const byte) SIZEOF_DWORD +Rewriting multiplication to use shift [384] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 * (const byte) SIZEOF_POINTER +Rewriting multiplication to use shift [404] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 * (const byte) SIZEOF_POINTER +Rewriting multiplication to use shift [420] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 * (const byte) SIZEOF_WORD +Rewriting multiplication to use shift [462] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 * (const byte) SIZEOF_DWORD +Rewriting multiplication to use shift [485] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 * (const byte) SIZEOF_DWORD Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings (const byte) keyboard_event_scan::keycode#0 Inlining constant with var siblings (const byte) keyboard_event_scan::row#0 @@ -8646,312 +8642,312 @@ Adding NOP phi() at start of render_init::@2 Adding NOP phi() at start of sprites_irq::toSpritePtr2 Adding NOP phi() at start of sprites_irq::toSpritePtr2_@return CALL GRAPH -Calls in [] to main:16 -Calls in [main] to sid_rnd_init:20 render_init:22 sprites_init:24 sprites_irq_init:26 play_init:28 play_spawn_current:30 play_spawn_current:33 render_playfield:35 render_moving:40 render_next:42 render_show:54 keyboard_event_scan:56 keyboard_event_get:58 play_movement:65 render_playfield:70 render_moving:76 render_next:79 render_score:81 render_screen_swap:83 -Calls in [render_score] to render_bcd:126 render_bcd:131 render_bcd:136 render_bcd:141 render_bcd:146 render_bcd:151 -Calls in [play_movement] to play_move_down:255 play_move_leftright:266 play_move_rotate:271 -Calls in [play_move_rotate] to play_collision:296 -Calls in [play_move_leftright] to play_collision:353 play_collision:369 -Calls in [play_move_down] to keyboard_event_pressed:379 play_collision:399 play_lock_current:404 play_remove_lines:406 play_update_score:410 play_spawn_current:413 -Calls in [play_spawn_current] to play_collision:480 -Calls in [play_update_score] to play_increase_level:508 -Calls in [keyboard_event_scan] to keyboard_matrix_read:628 keyboard_event_pressed:639 keyboard_event_pressed:645 keyboard_event_pressed:651 keyboard_event_pressed:657 -Calls in [render_init] to render_screen_original:770 render_screen_original:772 +Calls in [] to main:14 +Calls in [main] to sid_rnd_init:18 render_init:20 sprites_init:22 sprites_irq_init:24 play_init:26 play_spawn_current:28 play_spawn_current:31 render_playfield:33 render_moving:38 render_next:40 render_show:52 keyboard_event_scan:54 keyboard_event_get:56 play_movement:63 render_playfield:68 render_moving:74 render_next:77 render_score:79 render_screen_swap:81 +Calls in [render_score] to render_bcd:124 render_bcd:129 render_bcd:134 render_bcd:139 render_bcd:144 render_bcd:149 +Calls in [play_movement] to play_move_down:253 play_move_leftright:264 play_move_rotate:269 +Calls in [play_move_rotate] to play_collision:294 +Calls in [play_move_leftright] to play_collision:351 play_collision:367 +Calls in [play_move_down] to keyboard_event_pressed:377 play_collision:397 play_lock_current:402 play_remove_lines:404 play_update_score:408 play_spawn_current:411 +Calls in [play_spawn_current] to play_collision:478 +Calls in [play_update_score] to play_increase_level:506 +Calls in [keyboard_event_scan] to keyboard_matrix_read:626 keyboard_event_pressed:637 keyboard_event_pressed:643 keyboard_event_pressed:649 keyboard_event_pressed:655 +Calls in [render_init] to render_screen_original:768 render_screen_original:770 Created 167 initial phi equivalence classes -Coalesced [31] next_piece_idx#82 ← next_piece_idx#18 -Coalesced [32] game_over#89 ← game_over#52 -Not coalescing [36] current_ypos#97 ← current_ypos#6 -Not coalescing [37] current_xpos#118 ← current_xpos#100 -Not coalescing [39] current_piece_char#99 ← current_piece_char#5 -Not coalescing [41] next_piece_idx#76 ← next_piece_idx#18 -Coalesced [43] current_movedown_slow#96 ← current_movedown_slow#1 -Coalesced [45] current_piece_char#106 ← current_piece_char#5 -Coalesced [47] current_xpos#130 ← current_xpos#100 -Coalesced [48] current_ypos#104 ← current_ypos#6 -Coalesced [49] game_over#93 ← game_over#52 -Coalesced [50] next_piece_idx#85 ← next_piece_idx#18 -Not coalescing [69] render_screen_render#63 ← render_screen_render#18 -Not coalescing [71] current_ypos#98 ← current_ypos#19 -Not coalescing [72] render_screen_render#64 ← render_screen_render#18 -Not coalescing [73] current_xpos#119 ← current_xpos#19 -Not coalescing [74] current_piece_gfx#112 ← current_piece_gfx#18 -Not coalescing [75] current_piece_char#100 ← current_piece_char#16 -Not coalescing [77] render_screen_render#65 ← render_screen_render#18 -Not coalescing [78] next_piece_idx#77 ← next_piece_idx#16 -Coalesced [84] render_screen_show#60 ← render_screen_show#13 -Coalesced [85] render_screen_render#67 ← render_screen_render#11 -Coalesced [86] current_movedown_slow#97 ← current_movedown_slow#21 -Coalesced [87] current_piece#102 ← current_piece#15 -Coalesced [88] current_piece_char#107 ← current_piece_char#16 -Coalesced [89] current_orientation#104 ← current_orientation#17 -Coalesced [90] current_piece_gfx#124 ← current_piece_gfx#18 -Coalesced [91] current_xpos#131 ← current_xpos#19 -Coalesced [92] current_ypos#105 ← current_ypos#19 -Coalesced [93] game_over#94 ← game_over#15 -Coalesced [94] next_piece_idx#86 ← next_piece_idx#16 -Coalesced [95] keyboard_events_size#91 ← keyboard_events_size#16 -Coalesced [96] current_movedown_counter#60 ← current_movedown_counter#14 -Coalesced [97] lines_bcd#95 ← lines_bcd#15 -Coalesced [98] level#111 ← level#17 -Coalesced [99] level_bcd#110 ← level_bcd#17 -Coalesced (already) [100] render_screen_show#59 ← render_screen_show#16 -Coalesced (already) [101] render_screen_render#66 ← render_screen_render#18 -Coalesced (already) [102] current_movedown_slow#95 ← current_movedown_slow#21 -Coalesced (already) [103] current_piece#100 ← current_piece#15 -Coalesced (already) [104] current_piece_char#105 ← current_piece_char#16 -Coalesced (already) [105] current_orientation#103 ← current_orientation#17 -Coalesced (already) [106] current_piece_gfx#122 ← current_piece_gfx#18 -Coalesced (already) [107] current_xpos#129 ← current_xpos#19 -Coalesced (already) [108] current_ypos#103 ← current_ypos#19 -Coalesced (already) [109] game_over#92 ← game_over#15 -Coalesced (already) [110] next_piece_idx#84 ← next_piece_idx#16 -Coalesced (already) [111] keyboard_events_size#90 ← keyboard_events_size#16 -Coalesced (already) [112] current_movedown_counter#59 ← current_movedown_counter#14 -Coalesced (already) [113] lines_bcd#94 ← lines_bcd#15 -Coalesced (already) [114] level#110 ← level#17 -Coalesced (already) [115] level_bcd#109 ← level_bcd#17 -Coalesced [124] render_bcd::screen#7 ← render_bcd::screen#0 -Coalesced [125] render_bcd::bcd#9 ← render_bcd::bcd#0 -Coalesced [129] render_bcd::screen#8 ← render_bcd::screen#1 -Coalesced [130] render_bcd::bcd#10 ← render_bcd::bcd#1 -Coalesced [134] render_bcd::screen#9 ← render_bcd::screen#2 -Coalesced [135] render_bcd::bcd#11 ← render_bcd::bcd#2 -Coalesced [139] render_bcd::screen#10 ← render_bcd::screen#3 -Coalesced [140] render_bcd::bcd#12 ← render_bcd::bcd#3 -Coalesced [144] render_bcd::screen#11 ← render_bcd::screen#4 -Coalesced [145] render_bcd::bcd#13 ← render_bcd::bcd#4 -Coalesced [149] render_bcd::screen#12 ← render_bcd::screen#5 -Coalesced [150] render_bcd::bcd#14 ← render_bcd::bcd#5 -Coalesced [162] render_bcd::screen_pos#6 ← render_bcd::screen_pos#2 -Coalesced [168] render_bcd::screen_pos#5 ← render_bcd::screen_pos#0 -Coalesced [176] render_next::screen_next_area#13 ← render_next::screen_next_area#11 -Coalesced [178] render_next::next_piece_gfx#10 ← render_next::next_piece_gfx#3 -Coalesced [179] render_next::screen_next_area#14 ← render_next::screen_next_area#10 -Coalesced [192] render_next::next_piece_gfx#8 ← render_next::next_piece_gfx#1 -Coalesced [193] render_next::screen_next_area#12 ← render_next::screen_next_area#4 -Coalesced [194] render_next::l#8 ← render_next::l#1 -Coalesced (already) [195] render_next::next_piece_gfx#11 ← render_next::next_piece_gfx#1 -Coalesced [196] render_next::screen_next_area#15 ← render_next::screen_next_area#3 -Coalesced [197] render_next::c#6 ← render_next::c#1 -Coalesced [202] render_moving::ypos#9 ← render_moving::ypos#0 -Coalesced [206] render_moving::i#12 ← render_moving::i#1 -Coalesced [212] render_moving::ypos#10 ← render_moving::ypos#1 -Coalesced [213] render_moving::i#10 ← render_moving::i#8 -Coalesced [214] render_moving::l#9 ← render_moving::l#1 -Coalesced [219] render_moving::i#13 ← render_moving::i#3 -Coalesced [220] render_moving::xpos#5 ← render_moving::xpos#0 -Coalesced [229] render_moving::i#11 ← render_moving::i#2 -Coalesced (already) [230] render_moving::i#14 ← render_moving::i#2 -Coalesced [231] render_moving::xpos#6 ← render_moving::xpos#1 -Coalesced [232] render_moving::c#5 ← render_moving::c#1 -Coalesced [238] render_playfield::i#6 ← render_playfield::i#3 -Coalesced [239] render_playfield::screen_line#3 ← render_playfield::screen_line#0 -Coalesced [249] render_playfield::l#5 ← render_playfield::l#1 -Coalesced [250] render_playfield::i#5 ← render_playfield::i#1 -Coalesced (already) [251] render_playfield::i#7 ← render_playfield::i#1 -Coalesced [252] render_playfield::screen_line#4 ← render_playfield::screen_line#1 -Coalesced [253] render_playfield::c#3 ← render_playfield::c#1 -Coalesced [259] play_movement::return#6 ← play_movement::render#1 -Coalesced [260] current_orientation#95 ← current_orientation#20 -Coalesced [261] current_piece_gfx#113 ← current_piece_gfx#20 -Coalesced [262] current_xpos#120 ← current_xpos#22 -Coalesced [275] play_movement::return#7 ← play_movement::return#0 -Coalesced [276] current_orientation#96 ← current_orientation#25 -Coalesced [277] current_piece_gfx#114 ← current_piece_gfx#21 -Coalesced [278] current_xpos#121 ← current_xpos#26 -Coalesced (already) [281] current_orientation#102 ← current_orientation#20 -Coalesced (already) [282] current_piece_gfx#121 ← current_piece_gfx#20 -Coalesced [287] play_move_rotate::orientation#7 ← play_move_rotate::orientation#2 -Not coalescing [292] current_piece#98 ← current_piece#15 -Coalesced [293] play_collision::orientation#9 ← play_collision::orientation#3 -Coalesced [294] play_collision::yp#13 ← play_collision::ypos#3 -Coalesced [295] play_collision::xpos#17 ← play_collision::xpos#3 -Coalesced [302] current_orientation#100 ← current_orientation#7 -Coalesced [303] current_piece_gfx#119 ← current_piece_gfx#7 -Coalesced (already) [304] current_orientation#101 ← current_orientation#20 -Coalesced (already) [305] current_piece_gfx#120 ← current_piece_gfx#20 -Coalesced [308] play_move_rotate::orientation#6 ← play_move_rotate::orientation#1 -Coalesced [311] play_collision::yp#15 ← play_collision::yp#0 -Coalesced [315] play_collision::i#11 ← play_collision::i#3 -Not coalescing [316] play_collision::xp#8 ← play_collision::xpos#6 -Coalesced [338] play_collision::yp#16 ← play_collision::yp#1 -Not coalescing [339] play_collision::i#10 ← play_collision::i#1 -Coalesced [340] play_collision::l#10 ← play_collision::l#1 -Not coalescing [341] play_collision::i#12 ← play_collision::i#1 -Coalesced [342] play_collision::xp#9 ← play_collision::xp#1 -Coalesced [343] play_collision::c#8 ← play_collision::c#1 -Not coalescing [349] current_piece#97 ← current_piece#15 -Coalesced [350] play_collision::orientation#8 ← play_collision::orientation#2 -Coalesced [351] play_collision::yp#12 ← play_collision::ypos#2 -Coalesced [352] play_collision::xpos#16 ← play_collision::xpos#2 -Coalesced [358] current_xpos#127 ← current_xpos#6 -Coalesced (already) [361] current_xpos#126 ← current_xpos#22 -Not coalescing [365] current_piece#96 ← current_piece#15 -Coalesced [366] play_collision::orientation#7 ← play_collision::orientation#1 -Coalesced [367] play_collision::yp#11 ← play_collision::ypos#1 -Coalesced [368] play_collision::xpos#15 ← play_collision::xpos#1 -Coalesced [374] current_xpos#128 ← current_xpos#8 -Coalesced [385] play_move_down::movedown#14 ← play_move_down::movedown#2 -Coalesced [389] play_move_down::movedown#16 ← play_move_down::movedown#3 -Not coalescing [395] current_piece#95 ← current_piece#10 -Coalesced [396] play_collision::orientation#6 ← play_collision::orientation#0 -Coalesced [397] play_collision::yp#10 ← play_collision::ypos#0 -Coalesced [398] play_collision::xpos#14 ← play_collision::xpos#0 -Coalesced (already) [411] next_piece_idx#83 ← next_piece_idx#10 -Coalesced (already) [412] game_over#90 ← game_over#10 -Coalesced [414] current_ypos#100 ← current_ypos#6 -Coalesced [415] lines_bcd#88 ← lines_bcd#17 -Coalesced [416] level#104 ← level#19 -Coalesced [417] current_movedown_slow#88 ← current_movedown_slow#23 -Coalesced [418] level_bcd#101 ← level_bcd#19 -Coalesced [420] current_piece_char#102 ← current_piece_char#5 -Coalesced [422] current_xpos#123 ← current_xpos#100 -Coalesced [423] game_over#86 ← game_over#52 -Coalesced [424] next_piece_idx#79 ← next_piece_idx#18 -Coalesced (already) [426] current_ypos#101 ← current_ypos#38 -Coalesced [427] lines_bcd#89 ← lines_bcd#26 -Coalesced [428] level#105 ← level#33 -Coalesced [429] current_movedown_slow#89 ← current_movedown_slow#37 -Coalesced [430] level_bcd#102 ← level_bcd#31 -Coalesced [431] current_piece#93 ← current_piece#28 -Coalesced (already) [432] current_piece_char#103 ← current_piece_char#29 -Coalesced [433] current_orientation#98 ← current_orientation#37 -Coalesced [434] current_piece_gfx#117 ← current_piece_gfx#35 -Coalesced (already) [435] current_xpos#124 ← current_xpos#43 -Coalesced (already) [436] game_over#87 ← game_over#27 -Coalesced (already) [437] next_piece_idx#80 ← next_piece_idx#30 -Coalesced [441] current_ypos#99 ← current_ypos#3 -Coalesced (already) [442] lines_bcd#87 ← lines_bcd#19 -Coalesced (already) [443] level#103 ← level#10 -Coalesced (already) [444] current_movedown_slow#87 ← current_movedown_slow#14 -Coalesced (already) [445] level_bcd#100 ← level_bcd#11 -Coalesced (already) [446] current_piece#91 ← current_piece#10 -Coalesced (already) [447] current_piece_char#101 ← current_piece_char#10 -Coalesced (already) [448] current_orientation#97 ← current_orientation#13 -Coalesced (already) [449] current_piece_gfx#115 ← current_piece_gfx#13 -Coalesced (already) [450] current_xpos#122 ← current_xpos#14 -Coalesced (already) [451] game_over#85 ← game_over#10 -Coalesced (already) [452] next_piece_idx#78 ← next_piece_idx#10 -Coalesced [453] current_movedown_counter#58 ← current_movedown_counter#12 -Coalesced (already) [454] current_ypos#102 ← current_ypos#11 -Coalesced (already) [455] lines_bcd#90 ← lines_bcd#19 -Coalesced (already) [456] level#106 ← level#10 -Coalesced (already) [457] current_movedown_slow#90 ← current_movedown_slow#14 -Coalesced (already) [458] level_bcd#103 ← level_bcd#11 -Coalesced (already) [459] current_piece#94 ← current_piece#10 -Coalesced (already) [460] current_piece_char#104 ← current_piece_char#10 -Coalesced (already) [461] current_orientation#99 ← current_orientation#13 -Coalesced (already) [462] current_piece_gfx#118 ← current_piece_gfx#13 -Coalesced (already) [463] current_xpos#125 ← current_xpos#14 -Coalesced (already) [464] game_over#88 ← game_over#10 -Coalesced (already) [465] next_piece_idx#81 ← next_piece_idx#10 -Coalesced [466] play_move_down::movedown#15 ← play_move_down::movedown#7 -Coalesced [467] play_move_down::movedown#13 ← play_move_down::movedown#10 -Coalesced (already) [468] play_move_down::movedown#12 ← play_move_down::movedown#10 -Coalesced [478] play_collision::yp#14 ← play_collision::ypos#4 -Coalesced [479] play_collision::xpos#18 ← play_collision::xpos#4 -Coalesced [488] next_piece_idx#18 ← play_spawn_current::piece_idx#2 -Coalesced [493] play_spawn_current::piece_idx#4 ← play_spawn_current::piece_idx#1 -Coalesced (already) [494] game_over#91 ← game_over#65 -Coalesced [509] lines_bcd#93 ← lines_bcd#29 -Coalesced [510] level#109 ← level#21 -Coalesced [511] current_movedown_slow#93 ← current_movedown_slow#65 -Coalesced [512] level_bcd#106 ← level_bcd#62 -Coalesced (already) [515] lines_bcd#92 ← lines_bcd#29 -Coalesced (already) [516] level#108 ← level#10 -Coalesced (already) [517] current_movedown_slow#92 ← current_movedown_slow#14 -Coalesced (already) [518] level_bcd#105 ← level_bcd#11 -Coalesced (already) [519] lines_bcd#91 ← lines_bcd#19 -Coalesced (already) [520] level#107 ← level#10 -Coalesced (already) [521] current_movedown_slow#91 ← current_movedown_slow#14 -Coalesced (already) [522] level_bcd#104 ← level_bcd#11 -Coalesced [526] current_movedown_slow#94 ← current_movedown_slow#10 -Coalesced [532] level_bcd#108 ← level_bcd#8 -Coalesced [542] play_increase_level::b#3 ← play_increase_level::b#1 -Coalesced [543] level_bcd#107 ← level_bcd#21 -Coalesced [547] play_remove_lines::r#10 ← play_remove_lines::r#3 -Coalesced [548] play_remove_lines::w#14 ← play_remove_lines::w#12 -Coalesced [562] play_remove_lines::w#17 ← play_remove_lines::w#2 -Coalesced [563] play_remove_lines::removed#14 ← play_remove_lines::removed#1 -Coalesced [567] play_remove_lines::w#19 ← play_remove_lines::w#11 -Coalesced [574] play_remove_lines::w#18 ← play_remove_lines::w#3 -Coalesced [575] play_remove_lines::r#9 ← play_remove_lines::r#1 -Coalesced [576] play_remove_lines::w#13 ← play_remove_lines::w#11 -Coalesced [577] play_remove_lines::y#9 ← play_remove_lines::y#1 -Coalesced [578] play_remove_lines::removed#12 ← play_remove_lines::removed#8 -Coalesced [579] play_remove_lines::w#16 ← play_remove_lines::w#1 -Coalesced (already) [580] play_remove_lines::removed#13 ← play_remove_lines::removed#11 -Coalesced (already) [581] play_remove_lines::r#11 ← play_remove_lines::r#1 -Coalesced (already) [582] play_remove_lines::w#15 ← play_remove_lines::w#1 -Coalesced [583] play_remove_lines::x#5 ← play_remove_lines::x#1 -Coalesced [584] play_remove_lines::full#5 ← play_remove_lines::full#2 -Coalesced (already) [585] play_remove_lines::full#6 ← play_remove_lines::full#4 -Coalesced [587] play_lock_current::yp#7 ← play_lock_current::yp#0 -Coalesced [592] play_lock_current::i#8 ← play_lock_current::i#3 -Coalesced [593] play_lock_current::xp#5 ← play_lock_current::xp#0 -Coalesced [605] play_lock_current::yp#8 ← play_lock_current::yp#1 -Not coalescing [606] play_lock_current::i#7 ← play_lock_current::i#1 -Coalesced [607] play_lock_current::l#7 ← play_lock_current::l#1 -Not coalescing [608] play_lock_current::i#9 ← play_lock_current::i#1 -Coalesced [609] play_lock_current::xp#6 ← play_lock_current::xp#1 -Coalesced [610] play_lock_current::c#5 ← play_lock_current::c#1 -Coalesced [620] keyboard_event_get::return#6 ← keyboard_event_get::return#1 -Coalesced [621] keyboard_events_size#89 ← keyboard_events_size#4 -Coalesced [624] keyboard_events_size#88 ← keyboard_events_size#13 -Coalesced [625] keyboard_events_size#78 ← keyboard_events_size#19 -Coalesced [633] keyboard_event_scan::keycode#17 ← keyboard_event_scan::keycode#1 -Coalesced (already) [634] keyboard_events_size#81 ← keyboard_events_size#30 -Coalesced [663] keyboard_event_scan::row#14 ← keyboard_event_scan::row#1 -Coalesced [664] keyboard_event_scan::keycode#15 ← keyboard_event_scan::keycode#13 -Coalesced (already) [665] keyboard_events_size#79 ← keyboard_events_size#13 -Coalesced [666] keyboard_event_scan::keycode#19 ← keyboard_event_scan::keycode#11 -Coalesced [667] keyboard_events_size#83 ← keyboard_events_size#30 -Coalesced [677] keyboard_events_size#87 ← keyboard_events_size#2 -Coalesced [683] keyboard_event_scan::keycode#16 ← keyboard_event_scan::keycode#14 -Coalesced [684] keyboard_events_size#80 ← keyboard_events_size#29 -Coalesced [685] keyboard_event_scan::col#8 ← keyboard_event_scan::col#1 -Coalesced (already) [686] keyboard_event_scan::keycode#18 ← keyboard_event_scan::keycode#14 -Coalesced (already) [687] keyboard_events_size#82 ← keyboard_events_size#29 -Coalesced [691] keyboard_events_size#85 ← keyboard_events_size#1 -Coalesced (already) [692] keyboard_events_size#86 ← keyboard_events_size#10 -Coalesced (already) [693] keyboard_events_size#84 ← keyboard_events_size#10 -Coalesced [729] play_init::b#3 ← play_init::b#1 -Coalesced [730] play_init::j#3 ← play_init::j#1 -Coalesced [731] play_init::pli#3 ← play_init::pli#1 -Coalesced [732] play_init::idx#3 ← play_init::idx#1 -Coalesced [757] sprites_init::s#3 ← sprites_init::s#1 -Coalesced [758] sprites_init::xpos#3 ← sprites_init::xpos#1 -Coalesced [784] render_init::i#3 ← render_init::i#1 -Coalesced [785] render_init::li_1#3 ← render_init::li_1#1 -Coalesced [786] render_init::li_2#3 ← render_init::li_2#1 -Coalesced [788] render_screen_original::screen#11 ← render_screen_original::screen#9 -Coalesced [790] render_screen_original::screen#13 ← render_screen_original::screen#8 -Coalesced [791] render_screen_original::cols#10 ← render_screen_original::cols#7 -Coalesced [799] render_screen_original::oscr#8 ← render_screen_original::oscr#4 -Coalesced [800] render_screen_original::screen#15 ← render_screen_original::screen#2 -Coalesced [801] render_screen_original::ocols#8 ← render_screen_original::ocols#4 -Coalesced [802] render_screen_original::cols#12 ← render_screen_original::cols#1 -Coalesced [803] render_screen_original::x#8 ← render_screen_original::x#1 -Coalesced [813] render_screen_original::screen#17 ← render_screen_original::screen#3 -Coalesced [814] render_screen_original::cols#14 ← render_screen_original::cols#2 -Coalesced [815] render_screen_original::x#10 ← render_screen_original::x#2 -Coalesced [826] render_screen_original::screen#12 ← render_screen_original::screen#10 -Coalesced [827] render_screen_original::cols#9 ← render_screen_original::cols#3 -Coalesced [828] render_screen_original::oscr#7 ← render_screen_original::oscr#1 -Coalesced [829] render_screen_original::ocols#7 ← render_screen_original::ocols#1 -Coalesced [830] render_screen_original::y#7 ← render_screen_original::y#1 -Coalesced [831] render_screen_original::screen#18 ← render_screen_original::screen#10 -Coalesced [832] render_screen_original::cols#15 ← render_screen_original::cols#3 -Coalesced [833] render_screen_original::x#11 ← render_screen_original::x#3 -Coalesced (already) [834] render_screen_original::oscr#9 ← render_screen_original::oscr#1 -Coalesced [835] render_screen_original::screen#16 ← render_screen_original::screen#3 -Coalesced (already) [836] render_screen_original::ocols#9 ← render_screen_original::ocols#1 -Coalesced [837] render_screen_original::cols#13 ← render_screen_original::cols#2 -Coalesced [838] render_screen_original::x#9 ← render_screen_original::x#2 -Coalesced (already) [839] render_screen_original::screen#14 ← render_screen_original::screen#2 -Coalesced (already) [840] render_screen_original::cols#11 ← render_screen_original::cols#1 -Coalesced [841] render_screen_original::x#7 ← render_screen_original::x#1 +Coalesced [29] next_piece_idx#82 ← next_piece_idx#18 +Coalesced [30] game_over#89 ← game_over#52 +Not coalescing [34] current_ypos#97 ← current_ypos#6 +Not coalescing [35] current_xpos#118 ← current_xpos#100 +Not coalescing [37] current_piece_char#99 ← current_piece_char#5 +Not coalescing [39] next_piece_idx#76 ← next_piece_idx#18 +Coalesced [41] current_movedown_slow#96 ← current_movedown_slow#1 +Coalesced [43] current_piece_char#106 ← current_piece_char#5 +Coalesced [45] current_xpos#130 ← current_xpos#100 +Coalesced [46] current_ypos#104 ← current_ypos#6 +Coalesced [47] game_over#93 ← game_over#52 +Coalesced [48] next_piece_idx#85 ← next_piece_idx#18 +Not coalescing [67] render_screen_render#63 ← render_screen_render#18 +Not coalescing [69] current_ypos#98 ← current_ypos#19 +Not coalescing [70] render_screen_render#64 ← render_screen_render#18 +Not coalescing [71] current_xpos#119 ← current_xpos#19 +Not coalescing [72] current_piece_gfx#112 ← current_piece_gfx#18 +Not coalescing [73] current_piece_char#100 ← current_piece_char#16 +Not coalescing [75] render_screen_render#65 ← render_screen_render#18 +Not coalescing [76] next_piece_idx#77 ← next_piece_idx#16 +Coalesced [82] render_screen_show#60 ← render_screen_show#13 +Coalesced [83] render_screen_render#67 ← render_screen_render#11 +Coalesced [84] current_movedown_slow#97 ← current_movedown_slow#21 +Coalesced [85] current_piece#102 ← current_piece#15 +Coalesced [86] current_piece_char#107 ← current_piece_char#16 +Coalesced [87] current_orientation#104 ← current_orientation#17 +Coalesced [88] current_piece_gfx#124 ← current_piece_gfx#18 +Coalesced [89] current_xpos#131 ← current_xpos#19 +Coalesced [90] current_ypos#105 ← current_ypos#19 +Coalesced [91] game_over#94 ← game_over#15 +Coalesced [92] next_piece_idx#86 ← next_piece_idx#16 +Coalesced [93] keyboard_events_size#91 ← keyboard_events_size#16 +Coalesced [94] current_movedown_counter#60 ← current_movedown_counter#14 +Coalesced [95] lines_bcd#95 ← lines_bcd#15 +Coalesced [96] level#111 ← level#17 +Coalesced [97] level_bcd#110 ← level_bcd#17 +Coalesced (already) [98] render_screen_show#59 ← render_screen_show#16 +Coalesced (already) [99] render_screen_render#66 ← render_screen_render#18 +Coalesced (already) [100] current_movedown_slow#95 ← current_movedown_slow#21 +Coalesced (already) [101] current_piece#100 ← current_piece#15 +Coalesced (already) [102] current_piece_char#105 ← current_piece_char#16 +Coalesced (already) [103] current_orientation#103 ← current_orientation#17 +Coalesced (already) [104] current_piece_gfx#122 ← current_piece_gfx#18 +Coalesced (already) [105] current_xpos#129 ← current_xpos#19 +Coalesced (already) [106] current_ypos#103 ← current_ypos#19 +Coalesced (already) [107] game_over#92 ← game_over#15 +Coalesced (already) [108] next_piece_idx#84 ← next_piece_idx#16 +Coalesced (already) [109] keyboard_events_size#90 ← keyboard_events_size#16 +Coalesced (already) [110] current_movedown_counter#59 ← current_movedown_counter#14 +Coalesced (already) [111] lines_bcd#94 ← lines_bcd#15 +Coalesced (already) [112] level#110 ← level#17 +Coalesced (already) [113] level_bcd#109 ← level_bcd#17 +Coalesced [122] render_bcd::screen#7 ← render_bcd::screen#0 +Coalesced [123] render_bcd::bcd#9 ← render_bcd::bcd#0 +Coalesced [127] render_bcd::screen#8 ← render_bcd::screen#1 +Coalesced [128] render_bcd::bcd#10 ← render_bcd::bcd#1 +Coalesced [132] render_bcd::screen#9 ← render_bcd::screen#2 +Coalesced [133] render_bcd::bcd#11 ← render_bcd::bcd#2 +Coalesced [137] render_bcd::screen#10 ← render_bcd::screen#3 +Coalesced [138] render_bcd::bcd#12 ← render_bcd::bcd#3 +Coalesced [142] render_bcd::screen#11 ← render_bcd::screen#4 +Coalesced [143] render_bcd::bcd#13 ← render_bcd::bcd#4 +Coalesced [147] render_bcd::screen#12 ← render_bcd::screen#5 +Coalesced [148] render_bcd::bcd#14 ← render_bcd::bcd#5 +Coalesced [160] render_bcd::screen_pos#6 ← render_bcd::screen_pos#2 +Coalesced [166] render_bcd::screen_pos#5 ← render_bcd::screen_pos#0 +Coalesced [174] render_next::screen_next_area#13 ← render_next::screen_next_area#11 +Coalesced [176] render_next::next_piece_gfx#10 ← render_next::next_piece_gfx#3 +Coalesced [177] render_next::screen_next_area#14 ← render_next::screen_next_area#10 +Coalesced [190] render_next::next_piece_gfx#8 ← render_next::next_piece_gfx#1 +Coalesced [191] render_next::screen_next_area#12 ← render_next::screen_next_area#4 +Coalesced [192] render_next::l#8 ← render_next::l#1 +Coalesced (already) [193] render_next::next_piece_gfx#11 ← render_next::next_piece_gfx#1 +Coalesced [194] render_next::screen_next_area#15 ← render_next::screen_next_area#3 +Coalesced [195] render_next::c#6 ← render_next::c#1 +Coalesced [200] render_moving::ypos#9 ← render_moving::ypos#0 +Coalesced [204] render_moving::i#12 ← render_moving::i#1 +Coalesced [210] render_moving::ypos#10 ← render_moving::ypos#1 +Coalesced [211] render_moving::i#10 ← render_moving::i#8 +Coalesced [212] render_moving::l#9 ← render_moving::l#1 +Coalesced [217] render_moving::i#13 ← render_moving::i#3 +Coalesced [218] render_moving::xpos#5 ← render_moving::xpos#0 +Coalesced [227] render_moving::i#11 ← render_moving::i#2 +Coalesced (already) [228] render_moving::i#14 ← render_moving::i#2 +Coalesced [229] render_moving::xpos#6 ← render_moving::xpos#1 +Coalesced [230] render_moving::c#5 ← render_moving::c#1 +Coalesced [236] render_playfield::i#6 ← render_playfield::i#3 +Coalesced [237] render_playfield::screen_line#3 ← render_playfield::screen_line#0 +Coalesced [247] render_playfield::l#5 ← render_playfield::l#1 +Coalesced [248] render_playfield::i#5 ← render_playfield::i#1 +Coalesced (already) [249] render_playfield::i#7 ← render_playfield::i#1 +Coalesced [250] render_playfield::screen_line#4 ← render_playfield::screen_line#1 +Coalesced [251] render_playfield::c#3 ← render_playfield::c#1 +Coalesced [257] play_movement::return#6 ← play_movement::render#1 +Coalesced [258] current_orientation#95 ← current_orientation#20 +Coalesced [259] current_piece_gfx#113 ← current_piece_gfx#20 +Coalesced [260] current_xpos#120 ← current_xpos#22 +Coalesced [273] play_movement::return#7 ← play_movement::return#0 +Coalesced [274] current_orientation#96 ← current_orientation#25 +Coalesced [275] current_piece_gfx#114 ← current_piece_gfx#21 +Coalesced [276] current_xpos#121 ← current_xpos#26 +Coalesced (already) [279] current_orientation#102 ← current_orientation#20 +Coalesced (already) [280] current_piece_gfx#121 ← current_piece_gfx#20 +Coalesced [285] play_move_rotate::orientation#7 ← play_move_rotate::orientation#2 +Not coalescing [290] current_piece#98 ← current_piece#15 +Coalesced [291] play_collision::orientation#9 ← play_collision::orientation#3 +Coalesced [292] play_collision::yp#13 ← play_collision::ypos#3 +Coalesced [293] play_collision::xpos#17 ← play_collision::xpos#3 +Coalesced [300] current_orientation#100 ← current_orientation#7 +Coalesced [301] current_piece_gfx#119 ← current_piece_gfx#7 +Coalesced (already) [302] current_orientation#101 ← current_orientation#20 +Coalesced (already) [303] current_piece_gfx#120 ← current_piece_gfx#20 +Coalesced [306] play_move_rotate::orientation#6 ← play_move_rotate::orientation#1 +Coalesced [309] play_collision::yp#15 ← play_collision::yp#0 +Coalesced [313] play_collision::i#11 ← play_collision::i#3 +Not coalescing [314] play_collision::xp#8 ← play_collision::xpos#6 +Coalesced [336] play_collision::yp#16 ← play_collision::yp#1 +Not coalescing [337] play_collision::i#10 ← play_collision::i#1 +Coalesced [338] play_collision::l#10 ← play_collision::l#1 +Not coalescing [339] play_collision::i#12 ← play_collision::i#1 +Coalesced [340] play_collision::xp#9 ← play_collision::xp#1 +Coalesced [341] play_collision::c#8 ← play_collision::c#1 +Not coalescing [347] current_piece#97 ← current_piece#15 +Coalesced [348] play_collision::orientation#8 ← play_collision::orientation#2 +Coalesced [349] play_collision::yp#12 ← play_collision::ypos#2 +Coalesced [350] play_collision::xpos#16 ← play_collision::xpos#2 +Coalesced [356] current_xpos#127 ← current_xpos#6 +Coalesced (already) [359] current_xpos#126 ← current_xpos#22 +Not coalescing [363] current_piece#96 ← current_piece#15 +Coalesced [364] play_collision::orientation#7 ← play_collision::orientation#1 +Coalesced [365] play_collision::yp#11 ← play_collision::ypos#1 +Coalesced [366] play_collision::xpos#15 ← play_collision::xpos#1 +Coalesced [372] current_xpos#128 ← current_xpos#8 +Coalesced [383] play_move_down::movedown#14 ← play_move_down::movedown#2 +Coalesced [387] play_move_down::movedown#16 ← play_move_down::movedown#3 +Not coalescing [393] current_piece#95 ← current_piece#10 +Coalesced [394] play_collision::orientation#6 ← play_collision::orientation#0 +Coalesced [395] play_collision::yp#10 ← play_collision::ypos#0 +Coalesced [396] play_collision::xpos#14 ← play_collision::xpos#0 +Coalesced (already) [409] next_piece_idx#83 ← next_piece_idx#10 +Coalesced (already) [410] game_over#90 ← game_over#10 +Coalesced [412] current_ypos#100 ← current_ypos#6 +Coalesced [413] lines_bcd#88 ← lines_bcd#17 +Coalesced [414] level#104 ← level#19 +Coalesced [415] current_movedown_slow#88 ← current_movedown_slow#23 +Coalesced [416] level_bcd#101 ← level_bcd#19 +Coalesced [418] current_piece_char#102 ← current_piece_char#5 +Coalesced [420] current_xpos#123 ← current_xpos#100 +Coalesced [421] game_over#86 ← game_over#52 +Coalesced [422] next_piece_idx#79 ← next_piece_idx#18 +Coalesced (already) [424] current_ypos#101 ← current_ypos#38 +Coalesced [425] lines_bcd#89 ← lines_bcd#26 +Coalesced [426] level#105 ← level#33 +Coalesced [427] current_movedown_slow#89 ← current_movedown_slow#37 +Coalesced [428] level_bcd#102 ← level_bcd#31 +Coalesced [429] current_piece#93 ← current_piece#28 +Coalesced (already) [430] current_piece_char#103 ← current_piece_char#29 +Coalesced [431] current_orientation#98 ← current_orientation#37 +Coalesced [432] current_piece_gfx#117 ← current_piece_gfx#35 +Coalesced (already) [433] current_xpos#124 ← current_xpos#43 +Coalesced (already) [434] game_over#87 ← game_over#27 +Coalesced (already) [435] next_piece_idx#80 ← next_piece_idx#30 +Coalesced [439] current_ypos#99 ← current_ypos#3 +Coalesced (already) [440] lines_bcd#87 ← lines_bcd#19 +Coalesced (already) [441] level#103 ← level#10 +Coalesced (already) [442] current_movedown_slow#87 ← current_movedown_slow#14 +Coalesced (already) [443] level_bcd#100 ← level_bcd#11 +Coalesced (already) [444] current_piece#91 ← current_piece#10 +Coalesced (already) [445] current_piece_char#101 ← current_piece_char#10 +Coalesced (already) [446] current_orientation#97 ← current_orientation#13 +Coalesced (already) [447] current_piece_gfx#115 ← current_piece_gfx#13 +Coalesced (already) [448] current_xpos#122 ← current_xpos#14 +Coalesced (already) [449] game_over#85 ← game_over#10 +Coalesced (already) [450] next_piece_idx#78 ← next_piece_idx#10 +Coalesced [451] current_movedown_counter#58 ← current_movedown_counter#12 +Coalesced (already) [452] current_ypos#102 ← current_ypos#11 +Coalesced (already) [453] lines_bcd#90 ← lines_bcd#19 +Coalesced (already) [454] level#106 ← level#10 +Coalesced (already) [455] current_movedown_slow#90 ← current_movedown_slow#14 +Coalesced (already) [456] level_bcd#103 ← level_bcd#11 +Coalesced (already) [457] current_piece#94 ← current_piece#10 +Coalesced (already) [458] current_piece_char#104 ← current_piece_char#10 +Coalesced (already) [459] current_orientation#99 ← current_orientation#13 +Coalesced (already) [460] current_piece_gfx#118 ← current_piece_gfx#13 +Coalesced (already) [461] current_xpos#125 ← current_xpos#14 +Coalesced (already) [462] game_over#88 ← game_over#10 +Coalesced (already) [463] next_piece_idx#81 ← next_piece_idx#10 +Coalesced [464] play_move_down::movedown#15 ← play_move_down::movedown#7 +Coalesced [465] play_move_down::movedown#13 ← play_move_down::movedown#10 +Coalesced (already) [466] play_move_down::movedown#12 ← play_move_down::movedown#10 +Coalesced [476] play_collision::yp#14 ← play_collision::ypos#4 +Coalesced [477] play_collision::xpos#18 ← play_collision::xpos#4 +Coalesced [486] next_piece_idx#18 ← play_spawn_current::piece_idx#2 +Coalesced [491] play_spawn_current::piece_idx#4 ← play_spawn_current::piece_idx#1 +Coalesced (already) [492] game_over#91 ← game_over#65 +Coalesced [507] lines_bcd#93 ← lines_bcd#29 +Coalesced [508] level#109 ← level#21 +Coalesced [509] current_movedown_slow#93 ← current_movedown_slow#65 +Coalesced [510] level_bcd#106 ← level_bcd#62 +Coalesced (already) [513] lines_bcd#92 ← lines_bcd#29 +Coalesced (already) [514] level#108 ← level#10 +Coalesced (already) [515] current_movedown_slow#92 ← current_movedown_slow#14 +Coalesced (already) [516] level_bcd#105 ← level_bcd#11 +Coalesced (already) [517] lines_bcd#91 ← lines_bcd#19 +Coalesced (already) [518] level#107 ← level#10 +Coalesced (already) [519] current_movedown_slow#91 ← current_movedown_slow#14 +Coalesced (already) [520] level_bcd#104 ← level_bcd#11 +Coalesced [524] current_movedown_slow#94 ← current_movedown_slow#10 +Coalesced [530] level_bcd#108 ← level_bcd#8 +Coalesced [540] play_increase_level::b#3 ← play_increase_level::b#1 +Coalesced [541] level_bcd#107 ← level_bcd#21 +Coalesced [545] play_remove_lines::r#10 ← play_remove_lines::r#3 +Coalesced [546] play_remove_lines::w#14 ← play_remove_lines::w#12 +Coalesced [560] play_remove_lines::w#17 ← play_remove_lines::w#2 +Coalesced [561] play_remove_lines::removed#14 ← play_remove_lines::removed#1 +Coalesced [565] play_remove_lines::w#19 ← play_remove_lines::w#11 +Coalesced [572] play_remove_lines::w#18 ← play_remove_lines::w#3 +Coalesced [573] play_remove_lines::r#9 ← play_remove_lines::r#1 +Coalesced [574] play_remove_lines::w#13 ← play_remove_lines::w#11 +Coalesced [575] play_remove_lines::y#9 ← play_remove_lines::y#1 +Coalesced [576] play_remove_lines::removed#12 ← play_remove_lines::removed#8 +Coalesced [577] play_remove_lines::w#16 ← play_remove_lines::w#1 +Coalesced (already) [578] play_remove_lines::removed#13 ← play_remove_lines::removed#11 +Coalesced (already) [579] play_remove_lines::r#11 ← play_remove_lines::r#1 +Coalesced (already) [580] play_remove_lines::w#15 ← play_remove_lines::w#1 +Coalesced [581] play_remove_lines::x#5 ← play_remove_lines::x#1 +Coalesced [582] play_remove_lines::full#5 ← play_remove_lines::full#2 +Coalesced (already) [583] play_remove_lines::full#6 ← play_remove_lines::full#4 +Coalesced [585] play_lock_current::yp#7 ← play_lock_current::yp#0 +Coalesced [590] play_lock_current::i#8 ← play_lock_current::i#3 +Coalesced [591] play_lock_current::xp#5 ← play_lock_current::xp#0 +Coalesced [603] play_lock_current::yp#8 ← play_lock_current::yp#1 +Not coalescing [604] play_lock_current::i#7 ← play_lock_current::i#1 +Coalesced [605] play_lock_current::l#7 ← play_lock_current::l#1 +Not coalescing [606] play_lock_current::i#9 ← play_lock_current::i#1 +Coalesced [607] play_lock_current::xp#6 ← play_lock_current::xp#1 +Coalesced [608] play_lock_current::c#5 ← play_lock_current::c#1 +Coalesced [618] keyboard_event_get::return#6 ← keyboard_event_get::return#1 +Coalesced [619] keyboard_events_size#89 ← keyboard_events_size#4 +Coalesced [622] keyboard_events_size#88 ← keyboard_events_size#13 +Coalesced [623] keyboard_events_size#78 ← keyboard_events_size#19 +Coalesced [631] keyboard_event_scan::keycode#17 ← keyboard_event_scan::keycode#1 +Coalesced (already) [632] keyboard_events_size#81 ← keyboard_events_size#30 +Coalesced [661] keyboard_event_scan::row#14 ← keyboard_event_scan::row#1 +Coalesced [662] keyboard_event_scan::keycode#15 ← keyboard_event_scan::keycode#13 +Coalesced (already) [663] keyboard_events_size#79 ← keyboard_events_size#13 +Coalesced [664] keyboard_event_scan::keycode#19 ← keyboard_event_scan::keycode#11 +Coalesced [665] keyboard_events_size#83 ← keyboard_events_size#30 +Coalesced [675] keyboard_events_size#87 ← keyboard_events_size#2 +Coalesced [681] keyboard_event_scan::keycode#16 ← keyboard_event_scan::keycode#14 +Coalesced [682] keyboard_events_size#80 ← keyboard_events_size#29 +Coalesced [683] keyboard_event_scan::col#8 ← keyboard_event_scan::col#1 +Coalesced (already) [684] keyboard_event_scan::keycode#18 ← keyboard_event_scan::keycode#14 +Coalesced (already) [685] keyboard_events_size#82 ← keyboard_events_size#29 +Coalesced [689] keyboard_events_size#85 ← keyboard_events_size#1 +Coalesced (already) [690] keyboard_events_size#86 ← keyboard_events_size#10 +Coalesced (already) [691] keyboard_events_size#84 ← keyboard_events_size#10 +Coalesced [727] play_init::b#3 ← play_init::b#1 +Coalesced [728] play_init::j#3 ← play_init::j#1 +Coalesced [729] play_init::pli#3 ← play_init::pli#1 +Coalesced [730] play_init::idx#3 ← play_init::idx#1 +Coalesced [755] sprites_init::s#3 ← sprites_init::s#1 +Coalesced [756] sprites_init::xpos#3 ← sprites_init::xpos#1 +Coalesced [782] render_init::i#3 ← render_init::i#1 +Coalesced [783] render_init::li_1#3 ← render_init::li_1#1 +Coalesced [784] render_init::li_2#3 ← render_init::li_2#1 +Coalesced [786] render_screen_original::screen#11 ← render_screen_original::screen#9 +Coalesced [788] render_screen_original::screen#13 ← render_screen_original::screen#8 +Coalesced [789] render_screen_original::cols#10 ← render_screen_original::cols#7 +Coalesced [797] render_screen_original::oscr#8 ← render_screen_original::oscr#4 +Coalesced [798] render_screen_original::screen#15 ← render_screen_original::screen#2 +Coalesced [799] render_screen_original::ocols#8 ← render_screen_original::ocols#4 +Coalesced [800] render_screen_original::cols#12 ← render_screen_original::cols#1 +Coalesced [801] render_screen_original::x#8 ← render_screen_original::x#1 +Coalesced [811] render_screen_original::screen#17 ← render_screen_original::screen#3 +Coalesced [812] render_screen_original::cols#14 ← render_screen_original::cols#2 +Coalesced [813] render_screen_original::x#10 ← render_screen_original::x#2 +Coalesced [824] render_screen_original::screen#12 ← render_screen_original::screen#10 +Coalesced [825] render_screen_original::cols#9 ← render_screen_original::cols#3 +Coalesced [826] render_screen_original::oscr#7 ← render_screen_original::oscr#1 +Coalesced [827] render_screen_original::ocols#7 ← render_screen_original::ocols#1 +Coalesced [828] render_screen_original::y#7 ← render_screen_original::y#1 +Coalesced [829] render_screen_original::screen#18 ← render_screen_original::screen#10 +Coalesced [830] render_screen_original::cols#15 ← render_screen_original::cols#3 +Coalesced [831] render_screen_original::x#11 ← render_screen_original::x#3 +Coalesced (already) [832] render_screen_original::oscr#9 ← render_screen_original::oscr#1 +Coalesced [833] render_screen_original::screen#16 ← render_screen_original::screen#3 +Coalesced (already) [834] render_screen_original::ocols#9 ← render_screen_original::ocols#1 +Coalesced [835] render_screen_original::cols#13 ← render_screen_original::cols#2 +Coalesced [836] render_screen_original::x#9 ← render_screen_original::x#2 +Coalesced (already) [837] render_screen_original::screen#14 ← render_screen_original::screen#2 +Coalesced (already) [838] render_screen_original::cols#11 ← render_screen_original::cols#1 +Coalesced [839] render_screen_original::x#7 ← render_screen_original::x#1 Coalesced down to 93 phi equivalence classes Culled Empty Block (label) @8 Culled Empty Block (label) toSpritePtr1_@return @@ -9203,17 +9199,6 @@ FINAL CONTROL FLOW GRAPH [2] (dword) score_bcd ← (dword) 0 kickasm(location (const byte*) PLAYFIELD_CHARSET) {{ .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" - }} - kickasm(location (const byte*) PLAYFIELD_SCREEN_ORIGINAL) {{ // Load chars for the screen - .var screen = LoadBinary("playfield-screen.iscr") - // Load extended colors for the screen - .var extended = LoadBinary("playfield-extended.col") - // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 - // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) - // <<6 to move extended colors to the upper 2 bits - .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) - }} - kickasm(location (const byte*) PLAYFIELD_COLORS_ORIGINAL) {{ .import binary "playfield-screen.col" }} to:@2 @2: scope:[] from @1 @@ -9234,1238 +9219,1238 @@ FINAL CONTROL FLOW GRAPH }} to:@3 @3: scope:[] from @2 - [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST - [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 + [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST + [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 to:toSpritePtr1 toSpritePtr1: scope:[] from @3 - [9] phi() + [7] phi() to:@5 @5: scope:[] from toSpritePtr1 - [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 - [11] (byte) irq_cnt ← (byte) 0 + [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 + [9] (byte) irq_cnt ← (byte) 0 to:@4 @4: scope:[] from @5 - [12] phi() - [13] call main + [10] phi() + [11] call main to:@end @end: scope:[] from @4 - [14] phi() + [12] phi() (void()) main() main: scope:[main] from @4 - [15] phi() - [16] call sid_rnd_init + [13] phi() + [14] call sid_rnd_init to:main::@8 main::@8: scope:[main] from main asm { sei } - [18] call render_init + [16] call render_init to:main::@9 main::@9: scope:[main] from main::@8 - [19] phi() - [20] call sprites_init + [17] phi() + [18] call sprites_init to:main::@10 main::@10: scope:[main] from main::@9 - [21] phi() - [22] call sprites_irq_init + [19] phi() + [20] call sprites_irq_init to:main::@11 main::@11: scope:[main] from main::@10 - [23] phi() - [24] call play_init + [21] phi() + [22] call play_init to:main::@12 main::@12: scope:[main] from main::@11 - [25] phi() - [26] call play_spawn_current + [23] phi() + [24] call play_spawn_current to:main::@13 main::@13: scope:[main] from main::@12 - [27] phi() - [28] call play_spawn_current + [25] phi() + [26] call play_spawn_current to:main::@14 main::@14: scope:[main] from main::@13 - [29] phi() - [30] call render_playfield + [27] phi() + [28] call render_playfield to:main::@15 main::@15: scope:[main] from main::@14 - [31] (byte) current_ypos#97 ← (byte) current_ypos#6 - [32] (byte) current_xpos#118 ← (byte) current_xpos#100 - [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) - [34] (byte) current_piece_char#99 ← (byte) current_piece_char#5 - [35] call render_moving + [29] (byte) current_ypos#97 ← (byte) current_ypos#6 + [30] (byte) current_xpos#118 ← (byte) current_xpos#100 + [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [32] (byte) current_piece_char#99 ← (byte) current_piece_char#5 + [33] call render_moving to:main::@16 main::@16: scope:[main] from main::@15 - [36] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 - [37] call render_next + [34] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 + [35] call render_next to:main::@17 main::@17: scope:[main] from main::@16 - [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) - [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) to:main::@1 main::@1: scope:[main] from main::@17 main::@25 main::@6 - [40] (byte) level_bcd#11 ← phi( main::@6/(byte) level_bcd#17 main::@17/(byte) 0 main::@25/(byte) level_bcd#17 ) - [40] (byte) level#10 ← phi( main::@6/(byte) level#17 main::@17/(byte) 0 main::@25/(byte) level#17 ) - [40] (word) lines_bcd#19 ← phi( main::@6/(word) lines_bcd#15 main::@17/(word) 0 main::@25/(word) lines_bcd#15 ) - [40] (byte) current_movedown_counter#16 ← phi( main::@6/(byte) current_movedown_counter#14 main::@17/(byte) 0 main::@25/(byte) current_movedown_counter#14 ) - [40] (byte) keyboard_events_size#19 ← phi( main::@6/(byte) keyboard_events_size#16 main::@17/(byte) 0 main::@25/(byte) keyboard_events_size#16 ) - [40] (byte) next_piece_idx#10 ← phi( main::@6/(byte) next_piece_idx#16 main::@17/(byte) play_spawn_current::piece_idx#2 main::@25/(byte) next_piece_idx#16 ) - [40] (byte) game_over#10 ← phi( main::@6/(byte) game_over#15 main::@17/(byte) game_over#52 main::@25/(byte) game_over#15 ) - [40] (byte) current_ypos#11 ← phi( main::@6/(byte) current_ypos#19 main::@17/(byte) current_ypos#6 main::@25/(byte) current_ypos#19 ) - [40] (byte) current_xpos#14 ← phi( main::@6/(byte) current_xpos#19 main::@17/(byte) current_xpos#100 main::@25/(byte) current_xpos#19 ) - [40] (byte*) current_piece_gfx#13 ← phi( main::@6/(byte*) current_piece_gfx#18 main::@17/(byte*) current_piece_gfx#123 main::@25/(byte*) current_piece_gfx#18 ) - [40] (byte) current_orientation#13 ← phi( main::@6/(byte) current_orientation#17 main::@17/(byte) 0 main::@25/(byte) current_orientation#17 ) - [40] (byte) current_piece_char#10 ← phi( main::@6/(byte) current_piece_char#16 main::@17/(byte) current_piece_char#5 main::@25/(byte) current_piece_char#16 ) - [40] (byte*) current_piece#10 ← phi( main::@6/(byte*) current_piece#15 main::@17/(byte*) current_piece#101 main::@25/(byte*) current_piece#15 ) - [40] (byte) current_movedown_slow#14 ← phi( main::@6/(byte) current_movedown_slow#21 main::@17/(byte) current_movedown_slow#1 main::@25/(byte) current_movedown_slow#21 ) - [40] (byte) render_screen_render#18 ← phi( main::@6/(byte) render_screen_render#18 main::@17/(byte) $20 main::@25/(byte) render_screen_render#11 ) - [40] (byte) render_screen_show#16 ← phi( main::@6/(byte) render_screen_show#16 main::@17/(byte) 0 main::@25/(byte) render_screen_show#13 ) + [38] (byte) level_bcd#11 ← phi( main::@6/(byte) level_bcd#17 main::@17/(byte) 0 main::@25/(byte) level_bcd#17 ) + [38] (byte) level#10 ← phi( main::@6/(byte) level#17 main::@17/(byte) 0 main::@25/(byte) level#17 ) + [38] (word) lines_bcd#19 ← phi( main::@6/(word) lines_bcd#15 main::@17/(word) 0 main::@25/(word) lines_bcd#15 ) + [38] (byte) current_movedown_counter#16 ← phi( main::@6/(byte) current_movedown_counter#14 main::@17/(byte) 0 main::@25/(byte) current_movedown_counter#14 ) + [38] (byte) keyboard_events_size#19 ← phi( main::@6/(byte) keyboard_events_size#16 main::@17/(byte) 0 main::@25/(byte) keyboard_events_size#16 ) + [38] (byte) next_piece_idx#10 ← phi( main::@6/(byte) next_piece_idx#16 main::@17/(byte) play_spawn_current::piece_idx#2 main::@25/(byte) next_piece_idx#16 ) + [38] (byte) game_over#10 ← phi( main::@6/(byte) game_over#15 main::@17/(byte) game_over#52 main::@25/(byte) game_over#15 ) + [38] (byte) current_ypos#11 ← phi( main::@6/(byte) current_ypos#19 main::@17/(byte) current_ypos#6 main::@25/(byte) current_ypos#19 ) + [38] (byte) current_xpos#14 ← phi( main::@6/(byte) current_xpos#19 main::@17/(byte) current_xpos#100 main::@25/(byte) current_xpos#19 ) + [38] (byte*) current_piece_gfx#13 ← phi( main::@6/(byte*) current_piece_gfx#18 main::@17/(byte*) current_piece_gfx#123 main::@25/(byte*) current_piece_gfx#18 ) + [38] (byte) current_orientation#13 ← phi( main::@6/(byte) current_orientation#17 main::@17/(byte) 0 main::@25/(byte) current_orientation#17 ) + [38] (byte) current_piece_char#10 ← phi( main::@6/(byte) current_piece_char#16 main::@17/(byte) current_piece_char#5 main::@25/(byte) current_piece_char#16 ) + [38] (byte*) current_piece#10 ← phi( main::@6/(byte*) current_piece#15 main::@17/(byte*) current_piece#101 main::@25/(byte*) current_piece#15 ) + [38] (byte) current_movedown_slow#14 ← phi( main::@6/(byte) current_movedown_slow#21 main::@17/(byte) current_movedown_slow#1 main::@25/(byte) current_movedown_slow#21 ) + [38] (byte) render_screen_render#18 ← phi( main::@6/(byte) render_screen_render#18 main::@17/(byte) $20 main::@25/(byte) render_screen_render#11 ) + [38] (byte) render_screen_show#16 ← phi( main::@6/(byte) render_screen_show#16 main::@17/(byte) 0 main::@25/(byte) render_screen_show#13 ) to:main::@2 main::@2: scope:[main] from main::@1 main::@2 - [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 + [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 to:main::@3 main::@3: scope:[main] from main::@2 - [42] phi() - [43] call render_show + [40] phi() + [41] call render_show to:main::@18 main::@18: scope:[main] from main::@3 - [44] phi() - [45] call keyboard_event_scan + [42] phi() + [43] call keyboard_event_scan to:main::@19 main::@19: scope:[main] from main::@18 - [46] phi() - [47] call keyboard_event_get - [48] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + [44] phi() + [45] call keyboard_event_get + [46] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 to:main::@20 main::@20: scope:[main] from main::@19 - [49] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 - [50] if((byte) game_over#10==(byte) 0) goto main::@4 + [47] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 + [48] if((byte) game_over#10==(byte) 0) goto main::@4 to:main::@5 main::@5: scope:[main] from main::@20 main::@5 - [51] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) + [49] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) to:main::@5 main::@4: scope:[main] from main::@20 - [52] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 - [53] call play_movement - [54] (byte) play_movement::return#3 ← (byte) play_movement::return#2 + [50] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 + [51] call play_movement + [52] (byte) play_movement::return#3 ← (byte) play_movement::return#2 to:main::@21 main::@21: scope:[main] from main::@4 - [55] (byte) main::render#1 ← (byte) play_movement::return#3 + [53] (byte) main::render#1 ← (byte) play_movement::return#3 to:main::@6 main::@6: scope:[main] from main::@21 - [56] if((byte) main::render#1==(byte) 0) goto main::@1 + [54] if((byte) main::render#1==(byte) 0) goto main::@1 to:main::@7 main::@7: scope:[main] from main::@6 - [57] (byte) render_screen_render#63 ← (byte) render_screen_render#18 - [58] call render_playfield + [55] (byte) render_screen_render#63 ← (byte) render_screen_render#18 + [56] call render_playfield to:main::@22 main::@22: scope:[main] from main::@7 - [59] (byte) current_ypos#98 ← (byte) current_ypos#19 - [60] (byte) render_screen_render#64 ← (byte) render_screen_render#18 - [61] (byte) current_xpos#119 ← (byte) current_xpos#19 - [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 - [63] (byte) current_piece_char#100 ← (byte) current_piece_char#16 - [64] call render_moving + [57] (byte) current_ypos#98 ← (byte) current_ypos#19 + [58] (byte) render_screen_render#64 ← (byte) render_screen_render#18 + [59] (byte) current_xpos#119 ← (byte) current_xpos#19 + [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 + [61] (byte) current_piece_char#100 ← (byte) current_piece_char#16 + [62] call render_moving to:main::@23 main::@23: scope:[main] from main::@22 - [65] (byte) render_screen_render#65 ← (byte) render_screen_render#18 - [66] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 - [67] call render_next + [63] (byte) render_screen_render#65 ← (byte) render_screen_render#18 + [64] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 + [65] call render_next to:main::@24 main::@24: scope:[main] from main::@23 - [68] phi() - [69] call render_score + [66] phi() + [67] call render_score to:main::@25 main::@25: scope:[main] from main::@24 - [70] phi() - [71] call render_screen_swap + [68] phi() + [69] call render_screen_swap to:main::@1 (void()) render_screen_swap() render_screen_swap: scope:[render_screen_swap] from main::@25 - [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 - [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 + [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 + [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 to:render_screen_swap::@return render_screen_swap::@return: scope:[render_screen_swap] from render_screen_swap - [74] return + [72] return to:@return (void()) render_score() render_score: scope:[render_score] from main::@24 - [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 + [73] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 to:render_score::@2 render_score::@1: scope:[render_score] from render_score - [76] phi() + [74] phi() to:render_score::@2 render_score::@2: scope:[render_score] from render_score render_score::@1 - [77] (byte*) render_score::screen#3 ← phi( render_score::@1/(const byte*) PLAYFIELD_SCREEN_1 render_score/(const byte*) PLAYFIELD_SCREEN_2 ) - [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 - [79] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) - [80] call render_bcd + [75] (byte*) render_score::screen#3 ← phi( render_score::@1/(const byte*) PLAYFIELD_SCREEN_1 render_score/(const byte*) PLAYFIELD_SCREEN_2 ) + [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 + [77] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) + [78] call render_bcd to:render_score::@3 render_score::@3: scope:[render_score] from render_score::@2 - [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 - [82] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) - [83] call render_bcd + [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 + [80] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) + [81] call render_bcd to:render_score::@4 render_score::@4: scope:[render_score] from render_score::@3 - [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 - [85] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) - [86] call render_bcd + [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 + [83] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) + [84] call render_bcd to:render_score::@5 render_score::@5: scope:[render_score] from render_score::@4 - [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 - [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 - [89] call render_bcd + [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 + [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 + [87] call render_bcd to:render_score::@6 render_score::@6: scope:[render_score] from render_score::@5 - [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 - [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 - [92] call render_bcd + [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 + [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 + [90] call render_bcd to:render_score::@7 render_score::@7: scope:[render_score] from render_score::@6 - [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 - [94] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 - [95] call render_bcd + [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 + [92] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 + [93] call render_bcd to:render_score::@return render_score::@return: scope:[render_score] from render_score::@7 - [96] return + [94] return to:@return (void()) render_bcd((byte*) render_bcd::screen , (word) render_bcd::offset , (byte) render_bcd::bcd , (byte) render_bcd::only_low) render_bcd: scope:[render_bcd] from render_score::@2 render_score::@3 render_score::@4 render_score::@5 render_score::@6 render_score::@7 - [97] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@3/(byte) render_bcd::bcd#1 render_score::@4/(byte) render_bcd::bcd#2 render_score::@5/(byte) render_bcd::bcd#3 render_score::@6/(byte) render_bcd::bcd#4 render_score::@7/(byte) render_bcd::bcd#5 ) - [97] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) 0 render_score::@3/(byte) 0 render_score::@4/(byte) 0 render_score::@5/(byte) 1 render_score::@6/(byte) 0 render_score::@7/(byte) 0 ) - [97] (word) render_bcd::offset#6 ← phi( render_score::@2/(const word) render_score::score_offset render_score::@3/(const word) render_score::score_offset+(byte) 2 render_score::@4/(const word) render_score::score_offset+(byte) 4 render_score::@5/(const word) render_score::lines_offset render_score::@6/(const word) render_score::lines_offset+(byte) 1 render_score::@7/(const word) render_score::level_offset ) - [97] (byte*) render_bcd::screen#6 ← phi( render_score::@2/(byte*) render_bcd::screen#0 render_score::@3/(byte*) render_bcd::screen#1 render_score::@4/(byte*) render_bcd::screen#2 render_score::@5/(byte*) render_bcd::screen#3 render_score::@6/(byte*) render_bcd::screen#4 render_score::@7/(byte*) render_bcd::screen#5 ) - [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 - [99] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 + [95] (byte) render_bcd::bcd#6 ← phi( render_score::@2/(byte) render_bcd::bcd#0 render_score::@3/(byte) render_bcd::bcd#1 render_score::@4/(byte) render_bcd::bcd#2 render_score::@5/(byte) render_bcd::bcd#3 render_score::@6/(byte) render_bcd::bcd#4 render_score::@7/(byte) render_bcd::bcd#5 ) + [95] (byte) render_bcd::only_low#6 ← phi( render_score::@2/(byte) 0 render_score::@3/(byte) 0 render_score::@4/(byte) 0 render_score::@5/(byte) 1 render_score::@6/(byte) 0 render_score::@7/(byte) 0 ) + [95] (word) render_bcd::offset#6 ← phi( render_score::@2/(const word) render_score::score_offset render_score::@3/(const word) render_score::score_offset+(byte) 2 render_score::@4/(const word) render_score::score_offset+(byte) 4 render_score::@5/(const word) render_score::lines_offset render_score::@6/(const word) render_score::lines_offset+(byte) 1 render_score::@7/(const word) render_score::level_offset ) + [95] (byte*) render_bcd::screen#6 ← phi( render_score::@2/(byte*) render_bcd::screen#0 render_score::@3/(byte*) render_bcd::screen#1 render_score::@4/(byte*) render_bcd::screen#2 render_score::@5/(byte*) render_bcd::screen#3 render_score::@6/(byte*) render_bcd::screen#4 render_score::@7/(byte*) render_bcd::screen#5 ) + [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 + [97] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 to:render_bcd::@2 render_bcd::@2: scope:[render_bcd] from render_bcd - [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 - [101] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 - [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 - [103] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 + [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 + [99] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 + [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 + [101] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 to:render_bcd::@1 render_bcd::@1: scope:[render_bcd] from render_bcd render_bcd::@2 - [104] (byte*) render_bcd::screen_pos#3 ← phi( render_bcd/(byte*) render_bcd::screen_pos#0 render_bcd::@2/(byte*) render_bcd::screen_pos#2 ) - [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f - [106] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 - [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 + [102] (byte*) render_bcd::screen_pos#3 ← phi( render_bcd/(byte*) render_bcd::screen_pos#0 render_bcd::@2/(byte*) render_bcd::screen_pos#2 ) + [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f + [104] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 + [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 to:render_bcd::@return render_bcd::@return: scope:[render_bcd] from render_bcd::@1 - [108] return + [106] return to:@return (void()) render_next() render_next: scope:[render_next] from main::@16 main::@23 - [109] (byte) next_piece_idx#12 ← phi( main::@16/(byte) next_piece_idx#76 main::@23/(byte) next_piece_idx#77 ) - [109] (byte) render_screen_render#15 ← phi( main::@16/(byte) $20 main::@23/(byte) render_screen_render#65 ) - [110] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 + [107] (byte) next_piece_idx#12 ← phi( main::@16/(byte) next_piece_idx#76 main::@23/(byte) next_piece_idx#77 ) + [107] (byte) render_screen_render#15 ← phi( main::@16/(byte) $20 main::@23/(byte) render_screen_render#65 ) + [108] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 to:render_next::@2 render_next::@1: scope:[render_next] from render_next - [111] phi() + [109] phi() to:render_next::@2 render_next::@2: scope:[render_next] from render_next render_next::@1 - [112] (byte*) render_next::screen_next_area#11 ← phi( render_next::@1/(const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset render_next/(const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset ) - [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 - [114] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) - [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) + [110] (byte*) render_next::screen_next_area#11 ← phi( render_next::@1/(const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset render_next/(const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset ) + [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 + [112] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) + [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) to:render_next::@3 render_next::@3: scope:[render_next] from render_next::@2 render_next::@8 - [116] (byte) render_next::l#7 ← phi( render_next::@8/(byte) render_next::l#1 render_next::@2/(byte) 0 ) - [116] (byte*) render_next::screen_next_area#10 ← phi( render_next::@8/(byte*) render_next::screen_next_area#4 render_next::@2/(byte*) render_next::screen_next_area#11 ) - [116] (byte*) render_next::next_piece_gfx#3 ← phi( render_next::@8/(byte*) render_next::next_piece_gfx#1 render_next::@2/(byte*) render_next::next_piece_gfx#9 ) + [114] (byte) render_next::l#7 ← phi( render_next::@8/(byte) render_next::l#1 render_next::@2/(byte) 0 ) + [114] (byte*) render_next::screen_next_area#10 ← phi( render_next::@8/(byte*) render_next::screen_next_area#4 render_next::@2/(byte*) render_next::screen_next_area#11 ) + [114] (byte*) render_next::next_piece_gfx#3 ← phi( render_next::@8/(byte*) render_next::next_piece_gfx#1 render_next::@2/(byte*) render_next::next_piece_gfx#9 ) to:render_next::@4 render_next::@4: scope:[render_next] from render_next::@3 render_next::@6 - [117] (byte) render_next::c#2 ← phi( render_next::@3/(byte) 0 render_next::@6/(byte) render_next::c#1 ) - [117] (byte*) render_next::screen_next_area#5 ← phi( render_next::@3/(byte*) render_next::screen_next_area#10 render_next::@6/(byte*) render_next::screen_next_area#3 ) - [117] (byte*) render_next::next_piece_gfx#2 ← phi( render_next::@3/(byte*) render_next::next_piece_gfx#3 render_next::@6/(byte*) render_next::next_piece_gfx#1 ) - [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) - [119] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 - [120] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 + [115] (byte) render_next::c#2 ← phi( render_next::@3/(byte) 0 render_next::@6/(byte) render_next::c#1 ) + [115] (byte*) render_next::screen_next_area#5 ← phi( render_next::@3/(byte*) render_next::screen_next_area#10 render_next::@6/(byte*) render_next::screen_next_area#3 ) + [115] (byte*) render_next::next_piece_gfx#2 ← phi( render_next::@3/(byte*) render_next::next_piece_gfx#3 render_next::@6/(byte*) render_next::next_piece_gfx#1 ) + [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) + [117] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 + [118] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 to:render_next::@7 render_next::@7: scope:[render_next] from render_next::@4 - [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 + [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 to:render_next::@6 render_next::@6: scope:[render_next] from render_next::@5 render_next::@7 - [122] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 - [123] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 - [124] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 + [120] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 + [121] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 + [122] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 to:render_next::@8 render_next::@8: scope:[render_next] from render_next::@6 - [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 - [126] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 - [127] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 + [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 + [124] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 + [125] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 to:render_next::@return render_next::@return: scope:[render_next] from render_next::@8 - [128] return + [126] return to:@return render_next::@5: scope:[render_next] from render_next::@4 - [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 + [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 to:render_next::@6 (void()) render_moving() render_moving: scope:[render_moving] from main::@15 main::@22 - [130] (byte) current_piece_char#68 ← phi( main::@15/(byte) current_piece_char#99 main::@22/(byte) current_piece_char#100 ) - [130] (byte*) current_piece_gfx#64 ← phi( main::@15/(byte*) current_piece_gfx#111 main::@22/(byte*) current_piece_gfx#112 ) - [130] (byte) current_xpos#59 ← phi( main::@15/(byte) current_xpos#118 main::@22/(byte) current_xpos#119 ) - [130] (byte) render_screen_render#33 ← phi( main::@15/(byte) $20 main::@22/(byte) render_screen_render#64 ) - [130] (byte) current_ypos#13 ← phi( main::@15/(byte) current_ypos#97 main::@22/(byte) current_ypos#98 ) - [131] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 + [128] (byte) current_piece_char#68 ← phi( main::@15/(byte) current_piece_char#99 main::@22/(byte) current_piece_char#100 ) + [128] (byte*) current_piece_gfx#64 ← phi( main::@15/(byte*) current_piece_gfx#111 main::@22/(byte*) current_piece_gfx#112 ) + [128] (byte) current_xpos#59 ← phi( main::@15/(byte) current_xpos#118 main::@22/(byte) current_xpos#119 ) + [128] (byte) render_screen_render#33 ← phi( main::@15/(byte) $20 main::@22/(byte) render_screen_render#64 ) + [128] (byte) current_ypos#13 ← phi( main::@15/(byte) current_ypos#97 main::@22/(byte) current_ypos#98 ) + [129] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 to:render_moving::@1 render_moving::@1: scope:[render_moving] from render_moving render_moving::@3 - [132] (byte) render_moving::l#4 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::l#1 ) - [132] (byte) render_moving::i#3 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::i#8 ) - [132] (byte) render_moving::ypos#2 ← phi( render_moving/(byte) render_moving::ypos#0 render_moving::@3/(byte) render_moving::ypos#1 ) - [133] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 + [130] (byte) render_moving::l#4 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::l#1 ) + [130] (byte) render_moving::i#3 ← phi( render_moving/(byte) 0 render_moving::@3/(byte) render_moving::i#8 ) + [130] (byte) render_moving::ypos#2 ← phi( render_moving/(byte) render_moving::ypos#0 render_moving::@3/(byte) render_moving::ypos#1 ) + [131] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 to:render_moving::@7 render_moving::@7: scope:[render_moving] from render_moving::@1 - [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 + [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 to:render_moving::@3 render_moving::@3: scope:[render_moving] from render_moving::@5 render_moving::@7 - [135] (byte) render_moving::i#8 ← phi( render_moving::@5/(byte) render_moving::i#2 render_moving::@7/(byte) render_moving::i#1 ) - [136] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 - [137] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 - [138] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 + [133] (byte) render_moving::i#8 ← phi( render_moving::@5/(byte) render_moving::i#2 render_moving::@7/(byte) render_moving::i#1 ) + [134] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 + [135] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 + [136] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 to:render_moving::@return render_moving::@return: scope:[render_moving] from render_moving::@3 - [139] return + [137] return to:@return render_moving::@2: scope:[render_moving] from render_moving::@1 - [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 - [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 - [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) - [143] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 + [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 + [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 + [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) + [141] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 to:render_moving::@4 render_moving::@4: scope:[render_moving] from render_moving::@2 render_moving::@5 - [144] (byte) render_moving::c#2 ← phi( render_moving::@2/(byte) 0 render_moving::@5/(byte) render_moving::c#1 ) - [144] (byte) render_moving::xpos#2 ← phi( render_moving::@2/(byte) render_moving::xpos#0 render_moving::@5/(byte) render_moving::xpos#1 ) - [144] (byte) render_moving::i#4 ← phi( render_moving::@2/(byte) render_moving::i#3 render_moving::@5/(byte) render_moving::i#2 ) - [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) - [146] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 - [147] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 + [142] (byte) render_moving::c#2 ← phi( render_moving::@2/(byte) 0 render_moving::@5/(byte) render_moving::c#1 ) + [142] (byte) render_moving::xpos#2 ← phi( render_moving::@2/(byte) render_moving::xpos#0 render_moving::@5/(byte) render_moving::xpos#1 ) + [142] (byte) render_moving::i#4 ← phi( render_moving::@2/(byte) render_moving::i#3 render_moving::@5/(byte) render_moving::i#2 ) + [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) + [144] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 + [145] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 to:render_moving::@6 render_moving::@6: scope:[render_moving] from render_moving::@4 - [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 + [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 to:render_moving::@5 render_moving::@5: scope:[render_moving] from render_moving::@4 render_moving::@6 - [149] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 - [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 - [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 + [147] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 + [148] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 + [149] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 to:render_moving::@3 (void()) render_playfield() render_playfield: scope:[render_playfield] from main::@14 main::@7 - [152] (byte) render_screen_render#22 ← phi( main::@7/(byte) render_screen_render#63 main::@14/(byte) $20 ) + [150] (byte) render_screen_render#22 ← phi( main::@7/(byte) render_screen_render#63 main::@14/(byte) $20 ) to:render_playfield::@1 render_playfield::@1: scope:[render_playfield] from render_playfield render_playfield::@3 - [153] (byte) render_playfield::i#3 ← phi( render_playfield/(const byte) PLAYFIELD_COLS*(byte) 2 render_playfield::@3/(byte) render_playfield::i#1 ) - [153] (byte) render_playfield::l#2 ← phi( render_playfield/(byte) 2 render_playfield::@3/(byte) render_playfield::l#1 ) - [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 - [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 - [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) + [151] (byte) render_playfield::i#3 ← phi( render_playfield/(const byte) PLAYFIELD_COLS*(byte) 2 render_playfield::@3/(byte) render_playfield::i#1 ) + [151] (byte) render_playfield::l#2 ← phi( render_playfield/(byte) 2 render_playfield::@3/(byte) render_playfield::l#1 ) + [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 + [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 + [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) to:render_playfield::@2 render_playfield::@2: scope:[render_playfield] from render_playfield::@1 render_playfield::@2 - [157] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte) 0 render_playfield::@2/(byte) render_playfield::c#1 ) - [157] (byte*) render_playfield::screen_line#2 ← phi( render_playfield::@1/(byte*) render_playfield::screen_line#0 render_playfield::@2/(byte*) render_playfield::screen_line#1 ) - [157] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) - [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) - [159] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 - [160] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 - [161] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 - [162] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 + [155] (byte) render_playfield::c#2 ← phi( render_playfield::@1/(byte) 0 render_playfield::@2/(byte) render_playfield::c#1 ) + [155] (byte*) render_playfield::screen_line#2 ← phi( render_playfield::@1/(byte*) render_playfield::screen_line#0 render_playfield::@2/(byte*) render_playfield::screen_line#1 ) + [155] (byte) render_playfield::i#2 ← phi( render_playfield::@1/(byte) render_playfield::i#3 render_playfield::@2/(byte) render_playfield::i#1 ) + [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) + [157] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 + [158] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 + [159] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 + [160] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 to:render_playfield::@3 render_playfield::@3: scope:[render_playfield] from render_playfield::@2 - [163] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 - [164] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 + [161] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 + [162] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 to:render_playfield::@return render_playfield::@return: scope:[render_playfield] from render_playfield::@3 - [165] return + [163] return to:@return (byte()) play_movement((byte) play_movement::key_event) play_movement: scope:[play_movement] from main::@4 - [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 - [167] call play_move_down - [168] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 + [164] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 + [165] call play_move_down + [166] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 to:play_movement::@2 play_movement::@2: scope:[play_movement] from play_movement - [169] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 - [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 + [167] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 + [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 to:play_movement::@return play_movement::@return: scope:[play_movement] from play_movement::@2 play_movement::@4 - [171] (byte) current_xpos#19 ← phi( play_movement::@2/(byte) current_xpos#22 play_movement::@4/(byte) current_xpos#26 ) - [171] (byte*) current_piece_gfx#18 ← phi( play_movement::@2/(byte*) current_piece_gfx#20 play_movement::@4/(byte*) current_piece_gfx#21 ) - [171] (byte) current_orientation#17 ← phi( play_movement::@2/(byte) current_orientation#20 play_movement::@4/(byte) current_orientation#25 ) - [171] (byte) play_movement::return#2 ← phi( play_movement::@2/(byte) play_movement::render#1 play_movement::@4/(byte) play_movement::return#0 ) - [172] return + [169] (byte) current_xpos#19 ← phi( play_movement::@2/(byte) current_xpos#22 play_movement::@4/(byte) current_xpos#26 ) + [169] (byte*) current_piece_gfx#18 ← phi( play_movement::@2/(byte*) current_piece_gfx#20 play_movement::@4/(byte*) current_piece_gfx#21 ) + [169] (byte) current_orientation#17 ← phi( play_movement::@2/(byte) current_orientation#20 play_movement::@4/(byte) current_orientation#25 ) + [169] (byte) play_movement::return#2 ← phi( play_movement::@2/(byte) play_movement::render#1 play_movement::@4/(byte) play_movement::return#0 ) + [170] return to:@return play_movement::@1: scope:[play_movement] from play_movement::@2 - [173] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 - [174] call play_move_leftright - [175] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 + [171] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 + [172] call play_move_leftright + [173] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 to:play_movement::@3 play_movement::@3: scope:[play_movement] from play_movement::@1 - [176] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 - [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 - [178] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 - [179] call play_move_rotate - [180] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 + [174] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 + [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 + [176] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 + [177] call play_move_rotate + [178] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 to:play_movement::@4 play_movement::@4: scope:[play_movement] from play_movement::@3 - [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 - [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 + [179] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 + [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 to:play_movement::@return (byte()) play_move_rotate((byte) play_move_rotate::key_event) play_move_rotate: scope:[play_move_rotate] from play_movement::@3 - [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 + [181] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 to:play_move_rotate::@4 play_move_rotate::@4: scope:[play_move_rotate] from play_move_rotate - [184] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 + [182] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 to:play_move_rotate::@return play_move_rotate::@return: scope:[play_move_rotate] from play_move_rotate::@4 play_move_rotate::@5 play_move_rotate::@6 - [185] (byte*) current_piece_gfx#21 ← phi( play_move_rotate::@5/(byte*) current_piece_gfx#7 play_move_rotate::@6/(byte*) current_piece_gfx#20 play_move_rotate::@4/(byte*) current_piece_gfx#20 ) - [185] (byte) current_orientation#25 ← phi( play_move_rotate::@5/(byte) current_orientation#7 play_move_rotate::@6/(byte) current_orientation#20 play_move_rotate::@4/(byte) current_orientation#20 ) - [185] (byte) play_move_rotate::return#2 ← phi( play_move_rotate::@5/(byte) 1 play_move_rotate::@6/(byte) 0 play_move_rotate::@4/(byte) 0 ) - [186] return + [183] (byte*) current_piece_gfx#21 ← phi( play_move_rotate::@5/(byte*) current_piece_gfx#7 play_move_rotate::@6/(byte*) current_piece_gfx#20 play_move_rotate::@4/(byte*) current_piece_gfx#20 ) + [183] (byte) current_orientation#25 ← phi( play_move_rotate::@5/(byte) current_orientation#7 play_move_rotate::@6/(byte) current_orientation#20 play_move_rotate::@4/(byte) current_orientation#20 ) + [183] (byte) play_move_rotate::return#2 ← phi( play_move_rotate::@5/(byte) 1 play_move_rotate::@6/(byte) 0 play_move_rotate::@4/(byte) 0 ) + [184] return to:@return play_move_rotate::@2: scope:[play_move_rotate] from play_move_rotate::@4 - [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 - [188] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f + [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 + [186] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f to:play_move_rotate::@3 play_move_rotate::@3: scope:[play_move_rotate] from play_move_rotate::@1 play_move_rotate::@2 - [189] (byte) play_move_rotate::orientation#3 ← phi( play_move_rotate::@1/(byte) play_move_rotate::orientation#1 play_move_rotate::@2/(byte) play_move_rotate::orientation#2 ) - [190] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 - [191] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 - [192] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 - [193] (byte*) current_piece#98 ← (byte*) current_piece#15 - [194] call play_collision - [195] (byte) play_collision::return#14 ← (byte) play_collision::return#15 + [187] (byte) play_move_rotate::orientation#3 ← phi( play_move_rotate::@1/(byte) play_move_rotate::orientation#1 play_move_rotate::@2/(byte) play_move_rotate::orientation#2 ) + [188] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 + [189] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 + [190] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 + [191] (byte*) current_piece#98 ← (byte*) current_piece#15 + [192] call play_collision + [193] (byte) play_collision::return#14 ← (byte) play_collision::return#15 to:play_move_rotate::@6 play_move_rotate::@6: scope:[play_move_rotate] from play_move_rotate::@3 - [196] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 - [197] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return + [194] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 + [195] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return to:play_move_rotate::@5 play_move_rotate::@5: scope:[play_move_rotate] from play_move_rotate::@6 - [198] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 - [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 + [196] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 + [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 to:play_move_rotate::@return play_move_rotate::@1: scope:[play_move_rotate] from play_move_rotate - [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 - [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f + [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 + [199] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f to:play_move_rotate::@3 (byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation) play_collision: scope:[play_collision] from play_move_down::@8 play_move_leftright::@1 play_move_leftright::@3 play_move_rotate::@3 play_spawn_current - [202] (byte) play_collision::xpos#6 ← phi( play_move_down::@8/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@3/(byte) play_collision::xpos#2 play_move_rotate::@3/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) - [202] (byte) play_collision::yp#0 ← phi( play_move_down::@8/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@3/(byte) play_collision::ypos#2 play_move_rotate::@3/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) - [202] (byte) play_collision::orientation#5 ← phi( play_move_down::@8/(byte) play_collision::orientation#0 play_move_leftright::@1/(byte) play_collision::orientation#1 play_move_leftright::@3/(byte) play_collision::orientation#2 play_move_rotate::@3/(byte) play_collision::orientation#3 play_spawn_current/(byte) 0 ) - [202] (byte*) current_piece#17 ← phi( play_move_down::@8/(byte*) current_piece#95 play_move_leftright::@1/(byte*) current_piece#96 play_move_leftright::@3/(byte*) current_piece#97 play_move_rotate::@3/(byte*) current_piece#98 play_spawn_current/(byte*) current_piece#99 ) - [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 + [200] (byte) play_collision::xpos#6 ← phi( play_move_down::@8/(byte) play_collision::xpos#0 play_move_leftright::@1/(byte) play_collision::xpos#1 play_move_leftright::@3/(byte) play_collision::xpos#2 play_move_rotate::@3/(byte) play_collision::xpos#3 play_spawn_current/(byte) play_collision::xpos#4 ) + [200] (byte) play_collision::yp#0 ← phi( play_move_down::@8/(byte) play_collision::ypos#0 play_move_leftright::@1/(byte) play_collision::ypos#1 play_move_leftright::@3/(byte) play_collision::ypos#2 play_move_rotate::@3/(byte) play_collision::ypos#3 play_spawn_current/(byte) play_collision::ypos#4 ) + [200] (byte) play_collision::orientation#5 ← phi( play_move_down::@8/(byte) play_collision::orientation#0 play_move_leftright::@1/(byte) play_collision::orientation#1 play_move_leftright::@3/(byte) play_collision::orientation#2 play_move_rotate::@3/(byte) play_collision::orientation#3 play_spawn_current/(byte) 0 ) + [200] (byte*) current_piece#17 ← phi( play_move_down::@8/(byte*) current_piece#95 play_move_leftright::@1/(byte*) current_piece#96 play_move_leftright::@3/(byte*) current_piece#97 play_move_rotate::@3/(byte*) current_piece#98 play_spawn_current/(byte*) current_piece#99 ) + [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 to:play_collision::@1 play_collision::@1: scope:[play_collision] from play_collision play_collision::@9 - [204] (byte) play_collision::l#6 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::l#1 ) - [204] (byte) play_collision::i#3 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::i#10 ) - [204] (byte) play_collision::yp#2 ← phi( play_collision/(byte) play_collision::yp#0 play_collision::@9/(byte) play_collision::yp#1 ) - [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 - [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) - [207] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 + [202] (byte) play_collision::l#6 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::l#1 ) + [202] (byte) play_collision::i#3 ← phi( play_collision/(byte) 0 play_collision::@9/(byte) play_collision::i#10 ) + [202] (byte) play_collision::yp#2 ← phi( play_collision/(byte) play_collision::yp#0 play_collision::@9/(byte) play_collision::yp#1 ) + [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 + [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) + [205] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 to:play_collision::@2 play_collision::@2: scope:[play_collision] from play_collision::@1 play_collision::@10 - [208] (byte) play_collision::c#2 ← phi( play_collision::@1/(byte) 0 play_collision::@10/(byte) play_collision::c#1 ) - [208] (byte) play_collision::xp#2 ← phi( play_collision::@1/(byte) play_collision::xp#8 play_collision::@10/(byte) play_collision::xp#1 ) - [208] (byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@10/(byte) play_collision::i#12 ) - [209] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 - [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 + [206] (byte) play_collision::c#2 ← phi( play_collision::@1/(byte) 0 play_collision::@10/(byte) play_collision::c#1 ) + [206] (byte) play_collision::xp#2 ← phi( play_collision::@1/(byte) play_collision::xp#8 play_collision::@10/(byte) play_collision::xp#1 ) + [206] (byte) play_collision::i#2 ← phi( play_collision::@1/(byte) play_collision::i#3 play_collision::@10/(byte) play_collision::i#12 ) + [207] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 + [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 to:play_collision::@7 play_collision::@7: scope:[play_collision] from play_collision::@2 - [211] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 + [209] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 to:play_collision::@return play_collision::@4: scope:[play_collision] from play_collision::@7 - [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 - [213] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 + [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 + [211] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 to:play_collision::@return play_collision::@5: scope:[play_collision] from play_collision::@4 - [214] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 + [212] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 to:play_collision::@return play_collision::@6: scope:[play_collision] from play_collision::@5 - [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 + [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 to:play_collision::@return play_collision::@return: scope:[play_collision] from play_collision::@4 play_collision::@5 play_collision::@6 play_collision::@7 play_collision::@8 - [216] (byte) play_collision::return#15 ← phi( play_collision::@5/(const byte) COLLISION_RIGHT play_collision::@6/(const byte) COLLISION_PLAYFIELD play_collision::@7/(const byte) COLLISION_BOTTOM play_collision::@8/(const byte) COLLISION_NONE play_collision::@4/(const byte) COLLISION_LEFT ) - [217] return + [214] (byte) play_collision::return#15 ← phi( play_collision::@5/(const byte) COLLISION_RIGHT play_collision::@6/(const byte) COLLISION_PLAYFIELD play_collision::@7/(const byte) COLLISION_BOTTOM play_collision::@8/(const byte) COLLISION_NONE play_collision::@4/(const byte) COLLISION_LEFT ) + [215] return to:@return play_collision::@3: scope:[play_collision] from play_collision::@2 play_collision::@6 - [218] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 - [219] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 - [220] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 + [216] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 + [217] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 + [218] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 to:play_collision::@8 play_collision::@8: scope:[play_collision] from play_collision::@3 - [221] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 - [222] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 - [223] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 + [219] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 + [220] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 + [221] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 to:play_collision::@return play_collision::@9: scope:[play_collision] from play_collision::@8 - [224] (byte) play_collision::i#10 ← (byte) play_collision::i#1 + [222] (byte) play_collision::i#10 ← (byte) play_collision::i#1 to:play_collision::@1 play_collision::@10: scope:[play_collision] from play_collision::@3 - [225] (byte) play_collision::i#12 ← (byte) play_collision::i#1 + [223] (byte) play_collision::i#12 ← (byte) play_collision::i#1 to:play_collision::@2 (byte()) play_move_leftright((byte) play_move_leftright::key_event) play_move_leftright: scope:[play_move_leftright] from play_movement::@1 - [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 + [224] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 to:play_move_leftright::@2 play_move_leftright::@2: scope:[play_move_leftright] from play_move_leftright - [227] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return + [225] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return to:play_move_leftright::@3 play_move_leftright::@3: scope:[play_move_leftright] from play_move_leftright::@2 - [228] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 - [229] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 - [230] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 - [231] (byte*) current_piece#97 ← (byte*) current_piece#15 - [232] call play_collision - [233] (byte) play_collision::return#13 ← (byte) play_collision::return#15 + [226] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 + [227] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 + [228] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 + [229] (byte*) current_piece#97 ← (byte*) current_piece#15 + [230] call play_collision + [231] (byte) play_collision::return#13 ← (byte) play_collision::return#15 to:play_move_leftright::@7 play_move_leftright::@7: scope:[play_move_leftright] from play_move_leftright::@3 - [234] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 - [235] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return + [232] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 + [233] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return to:play_move_leftright::@4 play_move_leftright::@4: scope:[play_move_leftright] from play_move_leftright::@7 - [236] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 + [234] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 to:play_move_leftright::@return play_move_leftright::@return: scope:[play_move_leftright] from play_move_leftright::@2 play_move_leftright::@4 play_move_leftright::@5 play_move_leftright::@6 play_move_leftright::@7 - [237] (byte) current_xpos#26 ← phi( play_move_leftright::@6/(byte) current_xpos#22 play_move_leftright::@4/(byte) current_xpos#6 play_move_leftright::@5/(byte) current_xpos#8 play_move_leftright::@7/(byte) current_xpos#22 play_move_leftright::@2/(byte) current_xpos#22 ) - [237] (byte) play_move_leftright::return#2 ← phi( play_move_leftright::@6/(byte) 0 play_move_leftright::@4/(byte) 1 play_move_leftright::@5/(byte) 1 play_move_leftright::@7/(byte) 0 play_move_leftright::@2/(byte) 0 ) - [238] return + [235] (byte) current_xpos#26 ← phi( play_move_leftright::@6/(byte) current_xpos#22 play_move_leftright::@4/(byte) current_xpos#6 play_move_leftright::@5/(byte) current_xpos#8 play_move_leftright::@7/(byte) current_xpos#22 play_move_leftright::@2/(byte) current_xpos#22 ) + [235] (byte) play_move_leftright::return#2 ← phi( play_move_leftright::@6/(byte) 0 play_move_leftright::@4/(byte) 1 play_move_leftright::@5/(byte) 1 play_move_leftright::@7/(byte) 0 play_move_leftright::@2/(byte) 0 ) + [236] return to:@return play_move_leftright::@1: scope:[play_move_leftright] from play_move_leftright - [239] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 - [240] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 - [241] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 - [242] (byte*) current_piece#96 ← (byte*) current_piece#15 - [243] call play_collision - [244] (byte) play_collision::return#1 ← (byte) play_collision::return#15 + [237] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 + [238] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 + [239] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 + [240] (byte*) current_piece#96 ← (byte*) current_piece#15 + [241] call play_collision + [242] (byte) play_collision::return#1 ← (byte) play_collision::return#15 to:play_move_leftright::@6 play_move_leftright::@6: scope:[play_move_leftright] from play_move_leftright::@1 - [245] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 - [246] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return + [243] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 + [244] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return to:play_move_leftright::@5 play_move_leftright::@5: scope:[play_move_leftright] from play_move_leftright::@6 - [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 + [245] (byte) current_xpos#8 ← -- (byte) current_xpos#22 to:play_move_leftright::@return (byte()) play_move_down((byte) play_move_down::key_event) play_move_down: scope:[play_move_down] from play_movement - [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 - [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 + [246] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 + [247] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 to:play_move_down::@4 play_move_down::@4: scope:[play_move_down] from play_move_down - [250] phi() + [248] phi() to:play_move_down::@1 play_move_down::@1: scope:[play_move_down] from play_move_down play_move_down::@4 - [251] (byte) play_move_down::movedown#10 ← phi( play_move_down/(byte) 0 play_move_down::@4/(byte) 1 ) - [252] call keyboard_event_pressed - [253] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + [249] (byte) play_move_down::movedown#10 ← phi( play_move_down/(byte) 0 play_move_down::@4/(byte) 1 ) + [250] call keyboard_event_pressed + [251] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 to:play_move_down::@12 play_move_down::@12: scope:[play_move_down] from play_move_down::@1 - [254] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 - [255] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 + [252] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 + [253] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 to:play_move_down::@5 play_move_down::@5: scope:[play_move_down] from play_move_down::@12 - [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 + [254] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 to:play_move_down::@6 play_move_down::@6: scope:[play_move_down] from play_move_down::@5 - [257] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 + [255] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 to:play_move_down::@2 play_move_down::@2: scope:[play_move_down] from play_move_down::@12 play_move_down::@5 play_move_down::@6 - [258] (byte) play_move_down::movedown#7 ← phi( play_move_down::@12/(byte) play_move_down::movedown#10 play_move_down::@5/(byte) play_move_down::movedown#10 play_move_down::@6/(byte) play_move_down::movedown#2 ) - [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 + [256] (byte) play_move_down::movedown#7 ← phi( play_move_down::@12/(byte) play_move_down::movedown#10 play_move_down::@5/(byte) play_move_down::movedown#10 play_move_down::@6/(byte) play_move_down::movedown#2 ) + [257] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 to:play_move_down::@7 play_move_down::@7: scope:[play_move_down] from play_move_down::@2 - [260] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 + [258] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 to:play_move_down::@3 play_move_down::@3: scope:[play_move_down] from play_move_down::@2 play_move_down::@7 - [261] (byte) play_move_down::movedown#6 ← phi( play_move_down::@2/(byte) play_move_down::movedown#7 play_move_down::@7/(byte) play_move_down::movedown#3 ) - [262] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return + [259] (byte) play_move_down::movedown#6 ← phi( play_move_down::@2/(byte) play_move_down::movedown#7 play_move_down::@7/(byte) play_move_down::movedown#3 ) + [260] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return to:play_move_down::@8 play_move_down::@8: scope:[play_move_down] from play_move_down::@3 - [263] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 - [264] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 - [265] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 - [266] (byte*) current_piece#95 ← (byte*) current_piece#10 - [267] call play_collision - [268] (byte) play_collision::return#0 ← (byte) play_collision::return#15 + [261] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 + [262] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 + [263] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 + [264] (byte*) current_piece#95 ← (byte*) current_piece#10 + [265] call play_collision + [266] (byte) play_collision::return#0 ← (byte) play_collision::return#15 to:play_move_down::@13 play_move_down::@13: scope:[play_move_down] from play_move_down::@8 - [269] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 - [270] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 + [267] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 + [268] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 to:play_move_down::@9 play_move_down::@9: scope:[play_move_down] from play_move_down::@13 - [271] phi() - [272] call play_lock_current + [269] phi() + [270] call play_lock_current to:play_move_down::@14 play_move_down::@14: scope:[play_move_down] from play_move_down::@9 - [273] phi() - [274] call play_remove_lines - [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 + [271] phi() + [272] call play_remove_lines + [273] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 to:play_move_down::@15 play_move_down::@15: scope:[play_move_down] from play_move_down::@14 - [276] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 - [277] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 - [278] call play_update_score + [274] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 + [275] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 + [276] call play_update_score to:play_move_down::@16 play_move_down::@16: scope:[play_move_down] from play_move_down::@15 - [279] phi() - [280] call play_spawn_current + [277] phi() + [278] call play_spawn_current to:play_move_down::@17 play_move_down::@17: scope:[play_move_down] from play_move_down::@16 - [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) - [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) to:play_move_down::@11 play_move_down::@11: scope:[play_move_down] from play_move_down::@10 play_move_down::@17 - [283] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#2 ) - [283] (byte) game_over#27 ← phi( play_move_down::@10/(byte) game_over#10 play_move_down::@17/(byte) game_over#52 ) - [283] (byte) current_xpos#43 ← phi( play_move_down::@10/(byte) current_xpos#14 play_move_down::@17/(byte) current_xpos#100 ) - [283] (byte*) current_piece_gfx#35 ← phi( play_move_down::@10/(byte*) current_piece_gfx#13 play_move_down::@17/(byte*) current_piece_gfx#116 ) - [283] (byte) current_orientation#37 ← phi( play_move_down::@10/(byte) current_orientation#13 play_move_down::@17/(byte) 0 ) - [283] (byte) current_piece_char#29 ← phi( play_move_down::@10/(byte) current_piece_char#10 play_move_down::@17/(byte) current_piece_char#5 ) - [283] (byte*) current_piece#28 ← phi( play_move_down::@10/(byte*) current_piece#10 play_move_down::@17/(byte*) current_piece#92 ) - [283] (byte) level_bcd#31 ← phi( play_move_down::@10/(byte) level_bcd#11 play_move_down::@17/(byte) level_bcd#19 ) - [283] (byte) current_movedown_slow#37 ← phi( play_move_down::@10/(byte) current_movedown_slow#14 play_move_down::@17/(byte) current_movedown_slow#23 ) - [283] (byte) level#33 ← phi( play_move_down::@10/(byte) level#10 play_move_down::@17/(byte) level#19 ) - [283] (word) lines_bcd#26 ← phi( play_move_down::@10/(word) lines_bcd#19 play_move_down::@17/(word) lines_bcd#17 ) - [283] (byte) current_ypos#38 ← phi( play_move_down::@10/(byte) current_ypos#3 play_move_down::@17/(byte) current_ypos#6 ) + [281] (byte) next_piece_idx#30 ← phi( play_move_down::@10/(byte) next_piece_idx#10 play_move_down::@17/(byte) play_spawn_current::piece_idx#2 ) + [281] (byte) game_over#27 ← phi( play_move_down::@10/(byte) game_over#10 play_move_down::@17/(byte) game_over#52 ) + [281] (byte) current_xpos#43 ← phi( play_move_down::@10/(byte) current_xpos#14 play_move_down::@17/(byte) current_xpos#100 ) + [281] (byte*) current_piece_gfx#35 ← phi( play_move_down::@10/(byte*) current_piece_gfx#13 play_move_down::@17/(byte*) current_piece_gfx#116 ) + [281] (byte) current_orientation#37 ← phi( play_move_down::@10/(byte) current_orientation#13 play_move_down::@17/(byte) 0 ) + [281] (byte) current_piece_char#29 ← phi( play_move_down::@10/(byte) current_piece_char#10 play_move_down::@17/(byte) current_piece_char#5 ) + [281] (byte*) current_piece#28 ← phi( play_move_down::@10/(byte*) current_piece#10 play_move_down::@17/(byte*) current_piece#92 ) + [281] (byte) level_bcd#31 ← phi( play_move_down::@10/(byte) level_bcd#11 play_move_down::@17/(byte) level_bcd#19 ) + [281] (byte) current_movedown_slow#37 ← phi( play_move_down::@10/(byte) current_movedown_slow#14 play_move_down::@17/(byte) current_movedown_slow#23 ) + [281] (byte) level#33 ← phi( play_move_down::@10/(byte) level#10 play_move_down::@17/(byte) level#19 ) + [281] (word) lines_bcd#26 ← phi( play_move_down::@10/(word) lines_bcd#19 play_move_down::@17/(word) lines_bcd#17 ) + [281] (byte) current_ypos#38 ← phi( play_move_down::@10/(byte) current_ypos#3 play_move_down::@17/(byte) current_ypos#6 ) to:play_move_down::@return play_move_down::@return: scope:[play_move_down] from play_move_down::@11 play_move_down::@3 - [284] (byte) next_piece_idx#16 ← phi( play_move_down::@11/(byte) next_piece_idx#30 play_move_down::@3/(byte) next_piece_idx#10 ) - [284] (byte) game_over#15 ← phi( play_move_down::@11/(byte) game_over#27 play_move_down::@3/(byte) game_over#10 ) - [284] (byte) current_xpos#22 ← phi( play_move_down::@11/(byte) current_xpos#43 play_move_down::@3/(byte) current_xpos#14 ) - [284] (byte*) current_piece_gfx#20 ← phi( play_move_down::@11/(byte*) current_piece_gfx#35 play_move_down::@3/(byte*) current_piece_gfx#13 ) - [284] (byte) current_orientation#20 ← phi( play_move_down::@11/(byte) current_orientation#37 play_move_down::@3/(byte) current_orientation#13 ) - [284] (byte) current_piece_char#16 ← phi( play_move_down::@11/(byte) current_piece_char#29 play_move_down::@3/(byte) current_piece_char#10 ) - [284] (byte*) current_piece#15 ← phi( play_move_down::@11/(byte*) current_piece#28 play_move_down::@3/(byte*) current_piece#10 ) - [284] (byte) level_bcd#17 ← phi( play_move_down::@11/(byte) level_bcd#31 play_move_down::@3/(byte) level_bcd#11 ) - [284] (byte) current_movedown_slow#21 ← phi( play_move_down::@11/(byte) current_movedown_slow#37 play_move_down::@3/(byte) current_movedown_slow#14 ) - [284] (byte) level#17 ← phi( play_move_down::@11/(byte) level#33 play_move_down::@3/(byte) level#10 ) - [284] (word) lines_bcd#15 ← phi( play_move_down::@11/(word) lines_bcd#26 play_move_down::@3/(word) lines_bcd#19 ) - [284] (byte) current_ypos#19 ← phi( play_move_down::@11/(byte) current_ypos#38 play_move_down::@3/(byte) current_ypos#11 ) - [284] (byte) current_movedown_counter#14 ← phi( play_move_down::@11/(byte) 0 play_move_down::@3/(byte) current_movedown_counter#12 ) - [284] (byte) play_move_down::return#3 ← phi( play_move_down::@11/(byte) 1 play_move_down::@3/(byte) 0 ) - [285] return + [282] (byte) next_piece_idx#16 ← phi( play_move_down::@11/(byte) next_piece_idx#30 play_move_down::@3/(byte) next_piece_idx#10 ) + [282] (byte) game_over#15 ← phi( play_move_down::@11/(byte) game_over#27 play_move_down::@3/(byte) game_over#10 ) + [282] (byte) current_xpos#22 ← phi( play_move_down::@11/(byte) current_xpos#43 play_move_down::@3/(byte) current_xpos#14 ) + [282] (byte*) current_piece_gfx#20 ← phi( play_move_down::@11/(byte*) current_piece_gfx#35 play_move_down::@3/(byte*) current_piece_gfx#13 ) + [282] (byte) current_orientation#20 ← phi( play_move_down::@11/(byte) current_orientation#37 play_move_down::@3/(byte) current_orientation#13 ) + [282] (byte) current_piece_char#16 ← phi( play_move_down::@11/(byte) current_piece_char#29 play_move_down::@3/(byte) current_piece_char#10 ) + [282] (byte*) current_piece#15 ← phi( play_move_down::@11/(byte*) current_piece#28 play_move_down::@3/(byte*) current_piece#10 ) + [282] (byte) level_bcd#17 ← phi( play_move_down::@11/(byte) level_bcd#31 play_move_down::@3/(byte) level_bcd#11 ) + [282] (byte) current_movedown_slow#21 ← phi( play_move_down::@11/(byte) current_movedown_slow#37 play_move_down::@3/(byte) current_movedown_slow#14 ) + [282] (byte) level#17 ← phi( play_move_down::@11/(byte) level#33 play_move_down::@3/(byte) level#10 ) + [282] (word) lines_bcd#15 ← phi( play_move_down::@11/(word) lines_bcd#26 play_move_down::@3/(word) lines_bcd#19 ) + [282] (byte) current_ypos#19 ← phi( play_move_down::@11/(byte) current_ypos#38 play_move_down::@3/(byte) current_ypos#11 ) + [282] (byte) current_movedown_counter#14 ← phi( play_move_down::@11/(byte) 0 play_move_down::@3/(byte) current_movedown_counter#12 ) + [282] (byte) play_move_down::return#3 ← phi( play_move_down::@11/(byte) 1 play_move_down::@3/(byte) 0 ) + [283] return to:@return play_move_down::@10: scope:[play_move_down] from play_move_down::@13 - [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 + [284] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 to:play_move_down::@11 (void()) play_spawn_current() play_spawn_current: scope:[play_spawn_current] from main::@12 main::@13 play_move_down::@16 - [287] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) - [287] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) - [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 - [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 - [290] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) - [291] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) - [292] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) - [293] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 - [294] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 - [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) - [296] call play_collision - [297] (byte) play_collision::return#10 ← (byte) play_collision::return#15 + [285] (byte) game_over#65 ← phi( main::@12/(byte) 0 main::@13/(byte) game_over#52 play_move_down::@16/(byte) game_over#10 ) + [285] (byte) next_piece_idx#17 ← phi( main::@12/(byte) 0 main::@13/(byte) play_spawn_current::piece_idx#2 play_move_down::@16/(byte) next_piece_idx#10 ) + [286] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 + [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 + [288] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) + [289] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) + [290] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) + [291] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 + [292] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 + [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) + [294] call play_collision + [295] (byte) play_collision::return#10 ← (byte) play_collision::return#15 to:play_spawn_current::@4 play_spawn_current::@4: scope:[play_spawn_current] from play_spawn_current - [298] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 - [299] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 + [296] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 + [297] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 to:play_spawn_current::@1 play_spawn_current::@5: scope:[play_spawn_current] from play_spawn_current::@4 - [300] phi() + [298] phi() to:play_spawn_current::@1 play_spawn_current::@1: scope:[play_spawn_current] from play_spawn_current::@4 play_spawn_current::@5 - [301] (byte) game_over#52 ← phi( play_spawn_current::@5/(byte) game_over#65 play_spawn_current::@4/(byte) 1 ) + [299] (byte) game_over#52 ← phi( play_spawn_current::@5/(byte) game_over#65 play_spawn_current::@4/(byte) 1 ) to:play_spawn_current::@2 play_spawn_current::@2: scope:[play_spawn_current] from play_spawn_current::@1 play_spawn_current::@3 - [302] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(byte) 7 play_spawn_current::@3/(byte) play_spawn_current::piece_idx#1 ) - [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 + [300] (byte) play_spawn_current::piece_idx#2 ← phi( play_spawn_current::@1/(byte) 7 play_spawn_current::@3/(byte) play_spawn_current::piece_idx#1 ) + [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 to:play_spawn_current::@return play_spawn_current::@return: scope:[play_spawn_current] from play_spawn_current::@2 - [304] return + [302] return to:@return play_spawn_current::sid_rnd1: scope:[play_spawn_current] from play_spawn_current::@2 - [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) + [303] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) to:play_spawn_current::@3 play_spawn_current::@3: scope:[play_spawn_current] from play_spawn_current::sid_rnd1 - [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 + [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 to:play_spawn_current::@2 (void()) play_update_score((byte) play_update_score::removed) play_update_score: scope:[play_update_score] from play_move_down::@15 - [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return + [305] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return to:play_update_score::@1 play_update_score::@1: scope:[play_update_score] from play_update_score - [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 - [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 - [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 - [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) + [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 + [307] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 + [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 + [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) asm { sed } - [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 - [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 + [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 + [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 asm { cld } - [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 - [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 - [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return + [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 + [315] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 + [316] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return to:play_update_score::@2 play_update_score::@2: scope:[play_update_score] from play_update_score::@1 - [319] phi() - [320] call play_increase_level + [317] phi() + [318] call play_increase_level to:play_update_score::@return play_update_score::@return: scope:[play_update_score] from play_update_score play_update_score::@1 play_update_score::@2 - [321] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) - [321] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#65 ) - [321] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) - [321] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) - [322] return + [319] (byte) level_bcd#19 ← phi( play_update_score/(byte) level_bcd#11 play_update_score::@1/(byte) level_bcd#11 play_update_score::@2/(byte) level_bcd#62 ) + [319] (byte) current_movedown_slow#23 ← phi( play_update_score/(byte) current_movedown_slow#14 play_update_score::@1/(byte) current_movedown_slow#14 play_update_score::@2/(byte) current_movedown_slow#65 ) + [319] (byte) level#19 ← phi( play_update_score/(byte) level#10 play_update_score::@1/(byte) level#10 play_update_score::@2/(byte) level#21 ) + [319] (word) lines_bcd#17 ← phi( play_update_score/(word) lines_bcd#19 play_update_score::@1/(word) lines_bcd#29 play_update_score::@2/(word) lines_bcd#29 ) + [320] return to:@return (void()) play_increase_level() play_increase_level: scope:[play_increase_level] from play_update_score::@2 - [323] (byte) level#21 ← ++ (byte) level#10 - [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 + [321] (byte) level#21 ← ++ (byte) level#10 + [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 to:play_increase_level::@3 play_increase_level::@3: scope:[play_increase_level] from play_increase_level - [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) + [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) to:play_increase_level::@1 play_increase_level::@1: scope:[play_increase_level] from play_increase_level play_increase_level::@3 - [326] (byte) current_movedown_slow#65 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) - [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 - [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f - [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 + [324] (byte) current_movedown_slow#65 ← phi( play_increase_level/(byte) 1 play_increase_level::@3/(byte) current_movedown_slow#10 ) + [325] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 + [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f + [327] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 to:play_increase_level::@4 play_increase_level::@4: scope:[play_increase_level] from play_increase_level::@1 - [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 + [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 to:play_increase_level::@2 play_increase_level::@2: scope:[play_increase_level] from play_increase_level::@1 play_increase_level::@4 - [331] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) + [329] (byte) level_bcd#62 ← phi( play_increase_level::@1/(byte) level_bcd#21 play_increase_level::@4/(byte) level_bcd#8 ) asm { sed } to:play_increase_level::@5 play_increase_level::@5: scope:[play_increase_level] from play_increase_level::@2 play_increase_level::@5 - [333] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) - [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 - [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) - [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 - [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 + [331] (byte) play_increase_level::b#2 ← phi( play_increase_level::@2/(byte) 0 play_increase_level::@5/(byte) play_increase_level::b#1 ) + [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 + [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) + [334] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 + [335] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 to:play_increase_level::@6 play_increase_level::@6: scope:[play_increase_level] from play_increase_level::@5 asm { cld } to:play_increase_level::@return play_increase_level::@return: scope:[play_increase_level] from play_increase_level::@6 - [339] return + [337] return to:@return (byte()) play_remove_lines() play_remove_lines: scope:[play_remove_lines] from play_move_down::@14 - [340] phi() + [338] phi() to:play_remove_lines::@1 play_remove_lines::@1: scope:[play_remove_lines] from play_remove_lines play_remove_lines::@6 - [341] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) - [341] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) - [341] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [341] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) + [339] (byte) play_remove_lines::removed#11 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::removed#8 ) + [339] (byte) play_remove_lines::y#8 ← phi( play_remove_lines/(byte) 0 play_remove_lines::@6/(byte) play_remove_lines::y#1 ) + [339] (byte) play_remove_lines::w#12 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [339] (byte) play_remove_lines::r#3 ← phi( play_remove_lines/(const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 play_remove_lines::@6/(byte) play_remove_lines::r#1 ) to:play_remove_lines::@2 play_remove_lines::@2: scope:[play_remove_lines] from play_remove_lines::@1 play_remove_lines::@3 - [342] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) - [342] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) - [342] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) - [342] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) - [343] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) - [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 - [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 + [340] (byte) play_remove_lines::full#4 ← phi( play_remove_lines::@1/(byte) 1 play_remove_lines::@3/(byte) play_remove_lines::full#2 ) + [340] (byte) play_remove_lines::x#2 ← phi( play_remove_lines::@1/(byte) 0 play_remove_lines::@3/(byte) play_remove_lines::x#1 ) + [340] (byte) play_remove_lines::w#4 ← phi( play_remove_lines::@1/(byte) play_remove_lines::w#12 play_remove_lines::@3/(byte) play_remove_lines::w#1 ) + [340] (byte) play_remove_lines::r#2 ← phi( play_remove_lines::@1/(byte) play_remove_lines::r#3 play_remove_lines::@3/(byte) play_remove_lines::r#1 ) + [341] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) + [342] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 + [343] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 to:play_remove_lines::@3 play_remove_lines::@9: scope:[play_remove_lines] from play_remove_lines::@2 - [346] phi() + [344] phi() to:play_remove_lines::@3 play_remove_lines::@3: scope:[play_remove_lines] from play_remove_lines::@2 play_remove_lines::@9 - [347] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) - [348] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 - [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 - [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 - [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 + [345] (byte) play_remove_lines::full#2 ← phi( play_remove_lines::@9/(byte) play_remove_lines::full#4 play_remove_lines::@2/(byte) 0 ) + [346] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 + [347] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 + [348] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 + [349] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 to:play_remove_lines::@4 play_remove_lines::@4: scope:[play_remove_lines] from play_remove_lines::@3 - [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 + [350] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 to:play_remove_lines::@5 play_remove_lines::@5: scope:[play_remove_lines] from play_remove_lines::@4 - [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS - [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 + [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS + [352] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 to:play_remove_lines::@6 play_remove_lines::@6: scope:[play_remove_lines] from play_remove_lines::@4 play_remove_lines::@5 - [355] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) - [355] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) - [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 - [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 + [353] (byte) play_remove_lines::removed#8 ← phi( play_remove_lines::@4/(byte) play_remove_lines::removed#11 play_remove_lines::@5/(byte) play_remove_lines::removed#1 ) + [353] (byte) play_remove_lines::w#11 ← phi( play_remove_lines::@4/(byte) play_remove_lines::w#1 play_remove_lines::@5/(byte) play_remove_lines::w#2 ) + [354] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 + [355] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 to:play_remove_lines::@7 play_remove_lines::@7: scope:[play_remove_lines] from play_remove_lines::@6 play_remove_lines::@8 - [358] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) - [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 + [356] (byte) play_remove_lines::w#6 ← phi( play_remove_lines::@8/(byte) play_remove_lines::w#3 play_remove_lines::@6/(byte) play_remove_lines::w#11 ) + [357] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 to:play_remove_lines::@return play_remove_lines::@return: scope:[play_remove_lines] from play_remove_lines::@7 - [360] return + [358] return to:@return play_remove_lines::@8: scope:[play_remove_lines] from play_remove_lines::@7 - [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 - [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 + [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 + [360] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 to:play_remove_lines::@7 (void()) play_lock_current() play_lock_current: scope:[play_lock_current] from play_move_down::@9 - [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + [361] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 to:play_lock_current::@1 play_lock_current::@1: scope:[play_lock_current] from play_lock_current play_lock_current::@6 - [364] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) - [364] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::i#7 ) - [364] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) - [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 - [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) - [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 + [362] (byte) play_lock_current::l#6 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::l#1 ) + [362] (byte) play_lock_current::i#3 ← phi( play_lock_current/(byte) 0 play_lock_current::@6/(byte) play_lock_current::i#7 ) + [362] (byte) play_lock_current::yp#2 ← phi( play_lock_current/(byte) play_lock_current::yp#0 play_lock_current::@6/(byte) play_lock_current::yp#1 ) + [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 + [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) + [365] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 to:play_lock_current::@2 play_lock_current::@2: scope:[play_lock_current] from play_lock_current::@1 play_lock_current::@7 - [368] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) - [368] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) - [368] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte) play_lock_current::i#9 ) - [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 - [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 + [366] (byte) play_lock_current::c#2 ← phi( play_lock_current::@1/(byte) 0 play_lock_current::@7/(byte) play_lock_current::c#1 ) + [366] (byte) play_lock_current::xp#2 ← phi( play_lock_current::@1/(byte) play_lock_current::xp#0 play_lock_current::@7/(byte) play_lock_current::xp#1 ) + [366] (byte) play_lock_current::i#2 ← phi( play_lock_current::@1/(byte) play_lock_current::i#3 play_lock_current::@7/(byte) play_lock_current::i#9 ) + [367] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 + [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 to:play_lock_current::@4 play_lock_current::@4: scope:[play_lock_current] from play_lock_current::@2 - [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 + [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 to:play_lock_current::@3 play_lock_current::@3: scope:[play_lock_current] from play_lock_current::@2 play_lock_current::@4 - [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 - [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 - [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 + [370] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 + [371] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 + [372] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 to:play_lock_current::@5 play_lock_current::@5: scope:[play_lock_current] from play_lock_current::@3 - [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 - [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 - [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 + [373] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 + [374] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 + [375] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 to:play_lock_current::@return play_lock_current::@return: scope:[play_lock_current] from play_lock_current::@5 - [378] return + [376] return to:@return play_lock_current::@6: scope:[play_lock_current] from play_lock_current::@5 - [379] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 + [377] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 to:play_lock_current::@1 play_lock_current::@7: scope:[play_lock_current] from play_lock_current::@3 - [380] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 + [378] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 to:play_lock_current::@2 (byte()) keyboard_event_pressed((byte) keyboard_event_pressed::keycode) keyboard_event_pressed: scope:[keyboard_event_pressed] from keyboard_event_scan::@1 keyboard_event_scan::@17 keyboard_event_scan::@2 keyboard_event_scan::@3 play_move_down::@1 - [381] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT keyboard_event_scan::@2/(const byte) KEY_CTRL keyboard_event_scan::@17/(const byte) KEY_LSHIFT keyboard_event_scan::@3/(const byte) KEY_COMMODORE play_move_down::@1/(const byte) KEY_SPACE ) - [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 - [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) - [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 - [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) + [379] (byte) keyboard_event_pressed::keycode#5 ← phi( keyboard_event_scan::@1/(const byte) KEY_RSHIFT keyboard_event_scan::@2/(const byte) KEY_CTRL keyboard_event_scan::@17/(const byte) KEY_LSHIFT keyboard_event_scan::@3/(const byte) KEY_COMMODORE play_move_down::@1/(const byte) KEY_SPACE ) + [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 + [381] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) + [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 + [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) to:keyboard_event_pressed::@return keyboard_event_pressed::@return: scope:[keyboard_event_pressed] from keyboard_event_pressed - [386] return + [384] return to:@return (byte()) keyboard_event_get() keyboard_event_get: scope:[keyboard_event_get] from main::@19 - [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return + [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return to:keyboard_event_get::@1 keyboard_event_get::@1: scope:[keyboard_event_get] from keyboard_event_get - [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 - [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) + [386] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 + [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) to:keyboard_event_get::@return keyboard_event_get::@return: scope:[keyboard_event_get] from keyboard_event_get keyboard_event_get::@1 - [390] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) - [390] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) - [391] return + [388] (byte) keyboard_events_size#16 ← phi( keyboard_event_get/(byte) keyboard_events_size#13 keyboard_event_get::@1/(byte) keyboard_events_size#4 ) + [388] (byte) keyboard_event_get::return#2 ← phi( keyboard_event_get/(byte) $ff keyboard_event_get::@1/(byte) keyboard_event_get::return#1 ) + [389] return to:@return (void()) keyboard_event_scan() keyboard_event_scan: scope:[keyboard_event_scan] from main::@18 - [392] phi() + [390] phi() to:keyboard_event_scan::@7 keyboard_event_scan::@7: scope:[keyboard_event_scan] from keyboard_event_scan keyboard_event_scan::@8 - [393] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) - [393] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) - [393] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) - [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 - [395] call keyboard_matrix_read - [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + [391] (byte) keyboard_events_size#30 ← phi( keyboard_event_scan/(byte) keyboard_events_size#19 keyboard_event_scan::@8/(byte) keyboard_events_size#13 ) + [391] (byte) keyboard_event_scan::keycode#11 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::keycode#13 ) + [391] (byte) keyboard_event_scan::row#2 ← phi( keyboard_event_scan/(byte) 0 keyboard_event_scan::@8/(byte) keyboard_event_scan::row#1 ) + [392] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 + [393] call keyboard_matrix_read + [394] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 to:keyboard_event_scan::@19 keyboard_event_scan::@19: scope:[keyboard_event_scan] from keyboard_event_scan::@7 - [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 - [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 + [395] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 + [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 to:keyboard_event_scan::@16 keyboard_event_scan::@16: scope:[keyboard_event_scan] from keyboard_event_scan::@19 - [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 + [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 to:keyboard_event_scan::@8 keyboard_event_scan::@8: scope:[keyboard_event_scan] from keyboard_event_scan::@15 keyboard_event_scan::@16 - [400] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) - [400] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) - [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 - [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 + [398] (byte) keyboard_events_size#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_events_size#29 keyboard_event_scan::@16/(byte) keyboard_events_size#30 ) + [398] (byte) keyboard_event_scan::keycode#13 ← phi( keyboard_event_scan::@15/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@16/(byte) keyboard_event_scan::keycode#1 ) + [399] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 + [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 to:keyboard_event_scan::@17 keyboard_event_scan::@17: scope:[keyboard_event_scan] from keyboard_event_scan::@8 - [403] phi() - [404] call keyboard_event_pressed - [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + [401] phi() + [402] call keyboard_event_pressed + [403] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@20 keyboard_event_scan::@20: scope:[keyboard_event_scan] from keyboard_event_scan::@17 - [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 - [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 + [404] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + [405] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 to:keyboard_event_scan::@18 keyboard_event_scan::@18: scope:[keyboard_event_scan] from keyboard_event_scan::@20 - [408] phi() + [406] phi() to:keyboard_event_scan::@1 keyboard_event_scan::@1: scope:[keyboard_event_scan] from keyboard_event_scan::@18 keyboard_event_scan::@20 - [409] phi() - [410] call keyboard_event_pressed - [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + [407] phi() + [408] call keyboard_event_pressed + [409] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@21 keyboard_event_scan::@21: scope:[keyboard_event_scan] from keyboard_event_scan::@1 - [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 - [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 + [410] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + [411] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 to:keyboard_event_scan::@4 keyboard_event_scan::@4: scope:[keyboard_event_scan] from keyboard_event_scan::@21 - [414] phi() + [412] phi() to:keyboard_event_scan::@2 keyboard_event_scan::@2: scope:[keyboard_event_scan] from keyboard_event_scan::@21 keyboard_event_scan::@4 - [415] phi() - [416] call keyboard_event_pressed - [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + [413] phi() + [414] call keyboard_event_pressed + [415] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@22 keyboard_event_scan::@22: scope:[keyboard_event_scan] from keyboard_event_scan::@2 - [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 - [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 + [416] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + [417] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 to:keyboard_event_scan::@5 keyboard_event_scan::@5: scope:[keyboard_event_scan] from keyboard_event_scan::@22 - [420] phi() + [418] phi() to:keyboard_event_scan::@3 keyboard_event_scan::@3: scope:[keyboard_event_scan] from keyboard_event_scan::@22 keyboard_event_scan::@5 - [421] phi() - [422] call keyboard_event_pressed - [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + [419] phi() + [420] call keyboard_event_pressed + [421] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 to:keyboard_event_scan::@23 keyboard_event_scan::@23: scope:[keyboard_event_scan] from keyboard_event_scan::@3 - [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 - [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return + [422] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + [423] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return to:keyboard_event_scan::@6 keyboard_event_scan::@6: scope:[keyboard_event_scan] from keyboard_event_scan::@23 - [426] phi() + [424] phi() to:keyboard_event_scan::@return keyboard_event_scan::@return: scope:[keyboard_event_scan] from keyboard_event_scan::@23 keyboard_event_scan::@6 - [427] return + [425] return to:@return keyboard_event_scan::@9: scope:[keyboard_event_scan] from keyboard_event_scan::@10 keyboard_event_scan::@19 - [428] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) - [428] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) - [428] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) - [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) - [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) - [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 + [426] (byte) keyboard_events_size#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_events_size#29 keyboard_event_scan::@19/(byte) keyboard_events_size#30 ) + [426] (byte) keyboard_event_scan::keycode#10 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::keycode#14 keyboard_event_scan::@19/(byte) keyboard_event_scan::keycode#11 ) + [426] (byte) keyboard_event_scan::col#2 ← phi( keyboard_event_scan::@10/(byte) keyboard_event_scan::col#1 keyboard_event_scan::@19/(byte) 0 ) + [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) + [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) + [429] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 to:keyboard_event_scan::@12 keyboard_event_scan::@12: scope:[keyboard_event_scan] from keyboard_event_scan::@9 - [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 + [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 to:keyboard_event_scan::@13 keyboard_event_scan::@13: scope:[keyboard_event_scan] from keyboard_event_scan::@12 - [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) - [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 + [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) + [432] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 to:keyboard_event_scan::@14 keyboard_event_scan::@14: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 - [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 + [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 + [434] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 keyboard_event_scan::@10: scope:[keyboard_event_scan] from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 - [437] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) - [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 - [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 - [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 + [435] (byte) keyboard_events_size#29 ← phi( keyboard_event_scan::@9/(byte) keyboard_events_size#10 keyboard_event_scan::@11/(byte) keyboard_events_size#1 keyboard_event_scan::@12/(byte) keyboard_events_size#10 keyboard_event_scan::@14/(byte) keyboard_events_size#2 ) + [436] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 + [437] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 + [438] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 to:keyboard_event_scan::@15 keyboard_event_scan::@15: scope:[keyboard_event_scan] from keyboard_event_scan::@10 - [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 + [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 to:keyboard_event_scan::@8 keyboard_event_scan::@11: scope:[keyboard_event_scan] from keyboard_event_scan::@13 - [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 - [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 - [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 + [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 + [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 + [442] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 to:keyboard_event_scan::@10 (byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid) keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_event_scan::@7 - [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) - [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) + [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) + [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) to:keyboard_matrix_read::@return keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read - [447] return + [445] return to:@return (void()) render_show() render_show: scope:[render_show] from main::@3 - [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 + [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 to:render_show::toD0182 render_show::toD0182: scope:[render_show] from render_show - [449] phi() + [447] phi() to:render_show::@1 render_show::@1: scope:[render_show] from render_show::toD0181 render_show::toD0182 - [450] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) - [451] *((const byte*) D018) ← (byte) render_show::d018val#3 - [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) - [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) - [454] (byte) render_screen_showing ← (byte) render_screen_show#16 + [448] (byte) render_show::d018val#3 ← phi( render_show::toD0181/(const byte) render_show::toD0181_return#0 render_show::toD0182/(const byte) render_show::toD0182_return#0 ) + [449] *((const byte*) D018) ← (byte) render_show::d018val#3 + [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) + [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) + [452] (byte) render_screen_showing ← (byte) render_screen_show#16 to:render_show::@return render_show::@return: scope:[render_show] from render_show::@1 - [455] return + [453] return to:@return render_show::toD0181: scope:[render_show] from render_show - [456] phi() + [454] phi() to:render_show::@1 (void()) play_init() play_init: scope:[play_init] from main::@11 - [457] phi() + [455] phi() to:play_init::@1 play_init::@1: scope:[play_init] from play_init play_init::@1 - [458] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) - [458] (byte*) play_init::pli#2 ← phi( play_init/(const byte*) playfield play_init::@1/(byte*) play_init::pli#1 ) - [458] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) - [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 - [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 - [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 - [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS - [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS - [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 - [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 + [456] (byte) play_init::idx#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::idx#1 ) + [456] (byte*) play_init::pli#2 ← phi( play_init/(const byte*) playfield play_init::@1/(byte*) play_init::pli#1 ) + [456] (byte) play_init::j#2 ← phi( play_init/(byte) 0 play_init::@1/(byte) play_init::j#1 ) + [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 + [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 + [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 + [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS + [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS + [462] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 + [463] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 to:play_init::@2 play_init::@2: scope:[play_init] from play_init::@1 - [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES - [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) + [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES + [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) to:play_init::@3 play_init::@3: scope:[play_init] from play_init::@2 play_init::@3 - [468] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) - [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 - [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) - [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 - [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 + [466] (byte) play_init::b#2 ← phi( play_init::@2/(byte) 0 play_init::@3/(byte) play_init::b#1 ) + [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 + [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) + [469] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 + [470] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 to:play_init::@return play_init::@return: scope:[play_init] from play_init::@3 - [473] return + [471] return to:@return (void()) sprites_irq_init() sprites_irq_init: scope:[sprites_irq_init] from main::@10 asm { sei } - [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER + [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER asm { ldaCIA1_INTERRUPT } - [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK - [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO - [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR - [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f - [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST - [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER - [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() + [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK + [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO + [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR + [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f + [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST + [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER + [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() asm { cli } to:sprites_irq_init::@return sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init - [485] return + [483] return to:@return (void()) sprites_init() sprites_init: scope:[sprites_init] from main::@9 - [486] *((const byte*) SPRITES_ENABLE) ← (byte) $f - [487] *((const byte*) SPRITES_MC) ← (byte) 0 - [488] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) - [489] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) + [484] *((const byte*) SPRITES_ENABLE) ← (byte) $f + [485] *((const byte*) SPRITES_MC) ← (byte) 0 + [486] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) + [487] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) to:sprites_init::@1 sprites_init::@1: scope:[sprites_init] from sprites_init sprites_init::@1 - [490] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) - [490] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) - [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 - [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 - [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK - [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 - [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 - [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 + [488] (byte) sprites_init::xpos#2 ← phi( sprites_init/(byte)(number) $18+(number) $f*(number) 8 sprites_init::@1/(byte) sprites_init::xpos#1 ) + [488] (byte) sprites_init::s#2 ← phi( sprites_init/(byte) 0 sprites_init::@1/(byte) sprites_init::s#1 ) + [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 + [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 + [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK + [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 + [493] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 + [494] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 to:sprites_init::@return sprites_init::@return: scope:[sprites_init] from sprites_init::@1 - [497] return + [495] return to:@return (void()) render_init() render_init: scope:[render_init] from main::@8 - [498] phi() + [496] phi() to:render_init::vicSelectGfxBank1 render_init::vicSelectGfxBank1: scope:[render_init] from render_init - [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 + [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 to:render_init::vicSelectGfxBank1_toDd001 render_init::vicSelectGfxBank1_toDd001: scope:[render_init] from render_init::vicSelectGfxBank1 - [500] phi() + [498] phi() to:render_init::vicSelectGfxBank1_@1 render_init::vicSelectGfxBank1_@1: scope:[render_init] from render_init::vicSelectGfxBank1_toDd001 - [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 + [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 to:render_init::@2 render_init::@2: scope:[render_init] from render_init::vicSelectGfxBank1_@1 - [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 - [503] *((const byte*) BORDERCOL) ← (const byte) BLACK - [504] *((const byte*) BGCOL1) ← (const byte) BLACK - [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) - [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) - [507] *((const byte*) BGCOL4) ← (const byte) GREY - [508] call render_screen_original + [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 + [501] *((const byte*) BORDERCOL) ← (const byte) BLACK + [502] *((const byte*) BGCOL1) ← (const byte) BLACK + [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) + [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) + [505] *((const byte*) BGCOL4) ← (const byte) GREY + [506] call render_screen_original to:render_init::@3 render_init::@3: scope:[render_init] from render_init::@2 - [509] phi() - [510] call render_screen_original + [507] phi() + [508] call render_screen_original to:render_init::@1 render_init::@1: scope:[render_init] from render_init::@1 render_init::@3 - [511] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 ) - [511] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) - [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 - [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 - [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 - [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 - [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 - [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 - [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 + [509] (byte*) render_init::li_2#2 ← phi( render_init::@1/(byte*) render_init::li_2#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 ) + [509] (byte*) render_init::li_1#2 ← phi( render_init::@1/(byte*) render_init::li_1#1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 ) + [509] (byte) render_init::i#2 ← phi( render_init::@1/(byte) render_init::i#1 render_init::@3/(byte) 0 ) + [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 + [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 + [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 + [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 + [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 + [515] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 + [516] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 to:render_init::@return render_init::@return: scope:[render_init] from render_init::@1 - [519] return + [517] return to:@return (void()) render_screen_original((byte*) render_screen_original::screen) render_screen_original: scope:[render_screen_original] from render_init::@2 render_init::@3 - [520] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2 ) + [518] (byte*) render_screen_original::screen#9 ← phi( render_init::@2/(const byte*) PLAYFIELD_SCREEN_1 render_init::@3/(const byte*) PLAYFIELD_SCREEN_2 ) to:render_screen_original::@1 render_screen_original::@1: scope:[render_screen_original] from render_screen_original render_screen_original::@5 - [521] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) - [521] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) - [521] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) - [521] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS render_screen_original::@5/(byte*) render_screen_original::cols#3 ) - [521] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) + [519] (byte) render_screen_original::y#6 ← phi( render_screen_original/(byte) 0 render_screen_original::@5/(byte) render_screen_original::y#1 ) + [519] (byte*) render_screen_original::ocols#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::ocols#1 ) + [519] (byte*) render_screen_original::oscr#4 ← phi( render_screen_original/(const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 render_screen_original::@5/(byte*) render_screen_original::oscr#1 ) + [519] (byte*) render_screen_original::cols#7 ← phi( render_screen_original/(const byte*) COLS render_screen_original::@5/(byte*) render_screen_original::cols#3 ) + [519] (byte*) render_screen_original::screen#8 ← phi( render_screen_original/(byte*) render_screen_original::screen#9 render_screen_original::@5/(byte*) render_screen_original::screen#10 ) to:render_screen_original::@2 render_screen_original::@2: scope:[render_screen_original] from render_screen_original::@1 render_screen_original::@2 - [522] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) - [522] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) - [522] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) - [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE - [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 - [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK - [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 - [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 - [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 + [520] (byte) render_screen_original::x#4 ← phi( render_screen_original::@1/(byte) 0 render_screen_original::@2/(byte) render_screen_original::x#1 ) + [520] (byte*) render_screen_original::cols#4 ← phi( render_screen_original::@1/(byte*) render_screen_original::cols#7 render_screen_original::@2/(byte*) render_screen_original::cols#1 ) + [520] (byte*) render_screen_original::screen#5 ← phi( render_screen_original::@1/(byte*) render_screen_original::screen#8 render_screen_original::@2/(byte*) render_screen_original::screen#2 ) + [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE + [522] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 + [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK + [524] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 + [525] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 + [526] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 to:render_screen_original::@3 render_screen_original::@3: scope:[render_screen_original] from render_screen_original::@2 render_screen_original::@3 - [529] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) - [529] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) - [529] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) - [529] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) - [529] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) - [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) - [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 - [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 - [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) - [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 - [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 - [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 - [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 + [527] (byte) render_screen_original::x#5 ← phi( render_screen_original::@2/(byte) render_screen_original::x#1 render_screen_original::@3/(byte) render_screen_original::x#2 ) + [527] (byte*) render_screen_original::cols#5 ← phi( render_screen_original::@2/(byte*) render_screen_original::cols#1 render_screen_original::@3/(byte*) render_screen_original::cols#2 ) + [527] (byte*) render_screen_original::ocols#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::ocols#4 render_screen_original::@3/(byte*) render_screen_original::ocols#1 ) + [527] (byte*) render_screen_original::screen#6 ← phi( render_screen_original::@2/(byte*) render_screen_original::screen#2 render_screen_original::@3/(byte*) render_screen_original::screen#3 ) + [527] (byte*) render_screen_original::oscr#2 ← phi( render_screen_original::@2/(byte*) render_screen_original::oscr#4 render_screen_original::@3/(byte*) render_screen_original::oscr#1 ) + [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) + [529] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 + [530] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 + [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) + [532] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 + [533] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 + [534] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 + [535] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 to:render_screen_original::@4 render_screen_original::@4: scope:[render_screen_original] from render_screen_original::@3 render_screen_original::@4 - [538] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) - [538] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) - [538] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) - [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE - [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 - [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK - [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 - [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 - [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 + [536] (byte) render_screen_original::x#6 ← phi( render_screen_original::@3/(byte) render_screen_original::x#2 render_screen_original::@4/(byte) render_screen_original::x#3 ) + [536] (byte*) render_screen_original::cols#6 ← phi( render_screen_original::@3/(byte*) render_screen_original::cols#2 render_screen_original::@4/(byte*) render_screen_original::cols#3 ) + [536] (byte*) render_screen_original::screen#7 ← phi( render_screen_original::@3/(byte*) render_screen_original::screen#3 render_screen_original::@4/(byte*) render_screen_original::screen#10 ) + [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE + [538] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 + [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK + [540] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 + [541] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 + [542] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 to:render_screen_original::@5 render_screen_original::@5: scope:[render_screen_original] from render_screen_original::@4 - [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 - [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 + [543] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 + [544] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 to:render_screen_original::@return render_screen_original::@return: scope:[render_screen_original] from render_screen_original::@5 - [547] return + [545] return to:@return (void()) sid_rnd_init() sid_rnd_init: scope:[sid_rnd_init] from main - [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff - [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE + [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff + [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE to:sid_rnd_init::@return sid_rnd_init::@return: scope:[sid_rnd_init] from sid_rnd_init - [550] return + [548] return to:@return interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() sprites_irq: scope:[sprites_irq] from asm { cld } - [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos - [553] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 - [554] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 - [555] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 - [556] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 - [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 - [558] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 + [550] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos + [551] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 + [552] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 + [553] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 + [554] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 + [555] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 + [556] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 to:sprites_irq::@8 sprites_irq::@8: scope:[sprites_irq] from sprites_irq sprites_irq::@8 - [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 + [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 to:sprites_irq::@9 sprites_irq::@9: scope:[sprites_irq] from sprites_irq::@8 - [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr - [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 + [558] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr + [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 to:sprites_irq::@10 sprites_irq::@10: scope:[sprites_irq] from sprites_irq::@9 - [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 - [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 - [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 - [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 - [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 - [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 + [560] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 + [561] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 + [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 + [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 + [564] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 + [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 to:sprites_irq::@2 sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@10 - [568] (byte) irq_cnt ← ++ (byte) irq_cnt - [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 + [566] (byte) irq_cnt ← ++ (byte) irq_cnt + [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 to:sprites_irq::@6 sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@2 - [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 + [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 to:sprites_irq::@7 sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@6 - [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 - [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 - [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 + [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 + [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 + [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 to:sprites_irq::@5 sprites_irq::@5: scope:[sprites_irq] from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7 - [574] *((const byte*) RASTER) ← (byte) irq_raster_next - [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER + [572] *((const byte*) RASTER) ← (byte) irq_raster_next + [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER to:sprites_irq::@return sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@5 - [576] return + [574] return to:@return sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@6 - [577] (byte) irq_cnt ← (byte) 0 - [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST - [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 - [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 + [575] (byte) irq_cnt ← (byte) 0 + [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST + [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 + [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 to:sprites_irq::@5 sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2 - [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 - [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS + [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 + [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS to:sprites_irq::toSpritePtr2 sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3 - [583] phi() + [581] phi() to:sprites_irq::@11 sprites_irq::@11: scope:[sprites_irq] from sprites_irq::toSpritePtr2 - [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 + [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 to:sprites_irq::@5 sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@9 - [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 - [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 - [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 - [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 - [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 - [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 + [583] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 + [584] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 + [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 + [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 + [587] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 + [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 to:sprites_irq::@2 @@ -11017,7 +11002,7 @@ VARIABLE REGISTER WEIGHTS (byte*) render_show::toD0182_gfx (byte) render_show::toD0182_return (byte*) render_show::toD0182_screen -(dword) score_bcd loadstore 0.04316546762589928 +(dword) score_bcd loadstore 0.043795620437956206 (void()) sid_rnd_init() (void()) sprites_init() (byte) sprites_init::s @@ -11724,12 +11709,8 @@ Target platform is c64basic / MOS6502X .label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS // Screen Sprite pointers on screen 2 .label PLAYFIELD_SPRITE_PTRS_2 = PLAYFIELD_SCREEN_2+SPRITE_PTRS - // Address of the original playscreen chars - .label PLAYFIELD_SCREEN_ORIGINAL = $3000 - // Address of the original playscreen colors - .label PLAYFIELD_COLORS_ORIGINAL = $1c00 // Address of the sprites covering the playfield - .label PLAYFIELD_SPRITES = $2000 + .label PLAYFIELD_SPRITES = $3000 // Address of the charset .label PLAYFIELD_CHARSET = $2800 // The size of the playfield @@ -11828,9 +11809,6 @@ __b1: lda #>0>>$10 sta.z score_bcd+3 // kickasm(location (const byte*) PLAYFIELD_CHARSET) {{ .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" }} - // kickasm(location (const byte*) PLAYFIELD_SCREEN_ORIGINAL) {{ // Load chars for the screen .var screen = LoadBinary("playfield-screen.iscr") // Load extended colors for the screen .var extended = LoadBinary("playfield-extended.col") // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) // <<6 to move extended colors to the upper 2 bits .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) }} - // kickasm(location (const byte*) PLAYFIELD_COLORS_ORIGINAL) {{ .import binary "playfield-screen.col" }} - // Original Color Data jmp __b2 // @2 __b2: @@ -11838,15 +11816,15 @@ __b2: jmp __b3 // @3 __b3: - // [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 + // [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 // The raster line of the next IRQ lda #IRQ_RASTER_FIRST sta.z irq_raster_next - // [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 -- vbuz1=vbuc1 + // [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 -- vbuz1=vbuc1 // Y-pos of the sprites on the next IRQ lda #SPRITES_FIRST_YPOS+$15 sta.z irq_sprite_ypos - // [9] phi from @3 to toSpritePtr1 [phi:@3->toSpritePtr1] + // [7] phi from @3 to toSpritePtr1 [phi:@3->toSpritePtr1] toSpritePtr1_from___b3: jmp toSpritePtr1 // toSpritePtr1 @@ -11854,24 +11832,24 @@ toSpritePtr1: jmp __b5 // @5 __b5: - // [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 + // [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 // Index of the sprites to show on the next IRQ lda #toSpritePtr1_return+3 sta.z irq_sprite_ptr - // [11] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 + // [9] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 // Counting the 10 IRQs lda #0 sta.z irq_cnt - // [12] phi from @5 to @4 [phi:@5->@4] + // [10] phi from @5 to @4 [phi:@5->@4] __b4_from___b5: jmp __b4 // @4 __b4: - // [13] call main - // [15] phi from @4 to main [phi:@4->main] + // [11] call main + // [13] phi from @4 to main [phi:@4->main] main_from___b4: jsr main - // [14] phi from @4 to @end [phi:@4->@end] + // [12] phi from @4 to @end [phi:@4->@end] __bend_from___b4: jmp __bend // @end @@ -11880,192 +11858,192 @@ __bend: main: { .label key_event = $7a .label render = $7d - // [16] call sid_rnd_init + // [14] call sid_rnd_init jsr sid_rnd_init jmp __b8 // main::@8 __b8: // asm { sei } sei - // [18] call render_init - // [498] phi from main::@8 to render_init [phi:main::@8->render_init] + // [16] call render_init + // [496] phi from main::@8 to render_init [phi:main::@8->render_init] render_init_from___b8: jsr render_init - // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9] + // [17] phi from main::@8 to main::@9 [phi:main::@8->main::@9] __b9_from___b8: jmp __b9 // main::@9 __b9: - // [20] call sprites_init + // [18] call sprites_init jsr sprites_init - // [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + // [19] phi from main::@9 to main::@10 [phi:main::@9->main::@10] __b10_from___b9: jmp __b10 // main::@10 __b10: - // [22] call sprites_irq_init + // [20] call sprites_irq_init jsr sprites_irq_init - // [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11] + // [21] phi from main::@10 to main::@11 [phi:main::@10->main::@11] __b11_from___b10: jmp __b11 // main::@11 __b11: - // [24] call play_init - // [457] phi from main::@11 to play_init [phi:main::@11->play_init] + // [22] call play_init + // [455] phi from main::@11 to play_init [phi:main::@11->play_init] play_init_from___b11: jsr play_init - // [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12] + // [23] phi from main::@11 to main::@12 [phi:main::@11->main::@12] __b12_from___b11: jmp __b12 // main::@12 __b12: - // [26] call play_spawn_current - // [287] phi from main::@12 to play_spawn_current [phi:main::@12->play_spawn_current] + // [24] call play_spawn_current + // [285] phi from main::@12 to play_spawn_current [phi:main::@12->play_spawn_current] play_spawn_current_from___b12: - // [287] phi (byte) game_over#65 = (byte) 0 [phi:main::@12->play_spawn_current#0] -- vbuz1=vbuc1 + // [285] phi (byte) game_over#65 = (byte) 0 [phi:main::@12->play_spawn_current#0] -- vbuz1=vbuc1 lda #0 sta.z game_over - // [287] phi (byte) next_piece_idx#17 = (byte) 0 [phi:main::@12->play_spawn_current#1] -- vbuz1=vbuc1 + // [285] phi (byte) next_piece_idx#17 = (byte) 0 [phi:main::@12->play_spawn_current#1] -- vbuz1=vbuc1 lda #0 sta.z next_piece_idx jsr play_spawn_current - // [27] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + // [25] phi from main::@12 to main::@13 [phi:main::@12->main::@13] __b13_from___b12: jmp __b13 // main::@13 __b13: - // [28] call play_spawn_current - // [287] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] + // [26] call play_spawn_current + // [285] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] play_spawn_current_from___b13: - // [287] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy + // [285] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy + // [285] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy jsr play_spawn_current - // [29] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + // [27] phi from main::@13 to main::@14 [phi:main::@13->main::@14] __b14_from___b13: jmp __b14 // main::@14 __b14: - // [30] call render_playfield - // [152] phi from main::@14 to render_playfield [phi:main::@14->render_playfield] + // [28] call render_playfield + // [150] phi from main::@14 to render_playfield [phi:main::@14->render_playfield] render_playfield_from___b14: - // [152] phi (byte) render_screen_render#22 = (byte) $20 [phi:main::@14->render_playfield#0] -- vbuz1=vbuc1 + // [150] phi (byte) render_screen_render#22 = (byte) $20 [phi:main::@14->render_playfield#0] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render_2 jsr render_playfield jmp __b15 // main::@15 __b15: - // [31] (byte) current_ypos#97 ← (byte) current_ypos#6 -- vbuz1=vbuz2 + // [29] (byte) current_ypos#97 ← (byte) current_ypos#6 -- vbuz1=vbuz2 lda.z current_ypos sta.z current_ypos_1 - // [32] (byte) current_xpos#118 ← (byte) current_xpos#100 -- vbuz1=vbuz2 + // [30] (byte) current_xpos#118 ← (byte) current_xpos#100 -- vbuz1=vbuz2 lda.z current_xpos sta.z current_xpos_1 - // [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx_1 lda PIECES+1,y sta.z current_piece_gfx_1+1 - // [34] (byte) current_piece_char#99 ← (byte) current_piece_char#5 -- vbuz1=vbuz2 + // [32] (byte) current_piece_char#99 ← (byte) current_piece_char#5 -- vbuz1=vbuz2 lda.z current_piece_char sta.z current_piece_char_1 - // [35] call render_moving - // [130] phi from main::@15 to render_moving [phi:main::@15->render_moving] + // [33] call render_moving + // [128] phi from main::@15 to render_moving [phi:main::@15->render_moving] render_moving_from___b15: - // [130] phi (byte) current_piece_char#68 = (byte) current_piece_char#99 [phi:main::@15->render_moving#0] -- register_copy - // [130] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#111 [phi:main::@15->render_moving#1] -- register_copy - // [130] phi (byte) current_xpos#59 = (byte) current_xpos#118 [phi:main::@15->render_moving#2] -- register_copy - // [130] phi (byte) render_screen_render#33 = (byte) $20 [phi:main::@15->render_moving#3] -- vbuz1=vbuc1 + // [128] phi (byte) current_piece_char#68 = (byte) current_piece_char#99 [phi:main::@15->render_moving#0] -- register_copy + // [128] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#111 [phi:main::@15->render_moving#1] -- register_copy + // [128] phi (byte) current_xpos#59 = (byte) current_xpos#118 [phi:main::@15->render_moving#2] -- register_copy + // [128] phi (byte) render_screen_render#33 = (byte) $20 [phi:main::@15->render_moving#3] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render_3 - // [130] phi (byte) current_ypos#13 = (byte) current_ypos#97 [phi:main::@15->render_moving#4] -- register_copy + // [128] phi (byte) current_ypos#13 = (byte) current_ypos#97 [phi:main::@15->render_moving#4] -- register_copy jsr render_moving jmp __b16 // main::@16 __b16: - // [36] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 -- vbuz1=vbuz2 + // [34] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 -- vbuz1=vbuz2 lda.z play_spawn_current.piece_idx sta.z next_piece_idx_1 - // [37] call render_next - // [109] phi from main::@16 to render_next [phi:main::@16->render_next] + // [35] call render_next + // [107] phi from main::@16 to render_next [phi:main::@16->render_next] render_next_from___b16: - // [109] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#76 [phi:main::@16->render_next#0] -- register_copy - // [109] phi (byte) render_screen_render#15 = (byte) $20 [phi:main::@16->render_next#1] -- vbuz1=vbuc1 + // [107] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#76 [phi:main::@16->render_next#0] -- register_copy + // [107] phi (byte) render_screen_render#15 = (byte) $20 [phi:main::@16->render_next#1] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render_1 jsr render_next jmp __b17 // main::@17 __b17: - // [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece lda PIECES+1,y sta.z current_piece+1 - // [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx lda PIECES+1,y sta.z current_piece_gfx+1 - // [40] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + // [38] phi from main::@17 to main::@1 [phi:main::@17->main::@1] __b1_from___b17: - // [40] phi (byte) level_bcd#11 = (byte) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 + // [38] phi (byte) level_bcd#11 = (byte) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 lda #0 sta.z level_bcd - // [40] phi (byte) level#10 = (byte) 0 [phi:main::@17->main::@1#1] -- vbuz1=vbuc1 + // [38] phi (byte) level#10 = (byte) 0 [phi:main::@17->main::@1#1] -- vbuz1=vbuc1 lda #0 sta.z level - // [40] phi (word) lines_bcd#19 = (word) 0 [phi:main::@17->main::@1#2] -- vwuz1=vwuc1 + // [38] phi (word) lines_bcd#19 = (word) 0 [phi:main::@17->main::@1#2] -- vwuz1=vwuc1 lda #<0 sta.z lines_bcd lda #>0 sta.z lines_bcd+1 - // [40] phi (byte) current_movedown_counter#16 = (byte) 0 [phi:main::@17->main::@1#3] -- vbuz1=vbuc1 + // [38] phi (byte) current_movedown_counter#16 = (byte) 0 [phi:main::@17->main::@1#3] -- vbuz1=vbuc1 lda #0 sta.z current_movedown_counter - // [40] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#4] -- vbuz1=vbuc1 + // [38] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#4] -- vbuz1=vbuc1 lda #0 sta.z keyboard_events_size - // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#5] -- register_copy - // [40] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#6] -- register_copy - // [40] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#7] -- register_copy - // [40] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#8] -- register_copy - // [40] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#123 [phi:main::@17->main::@1#9] -- register_copy - // [40] phi (byte) current_orientation#13 = (byte) 0 [phi:main::@17->main::@1#10] -- vbuz1=vbuc1 + // [38] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#5] -- register_copy + // [38] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#6] -- register_copy + // [38] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#7] -- register_copy + // [38] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#8] -- register_copy + // [38] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#123 [phi:main::@17->main::@1#9] -- register_copy + // [38] phi (byte) current_orientation#13 = (byte) 0 [phi:main::@17->main::@1#10] -- vbuz1=vbuc1 lda #0 sta.z current_orientation - // [40] phi (byte) current_piece_char#10 = (byte) current_piece_char#5 [phi:main::@17->main::@1#11] -- register_copy - // [40] phi (byte*) current_piece#10 = (byte*) current_piece#101 [phi:main::@17->main::@1#12] -- register_copy - // [40] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#1 [phi:main::@17->main::@1#13] -- register_copy - // [40] phi (byte) render_screen_render#18 = (byte) $20 [phi:main::@17->main::@1#14] -- vbuz1=vbuc1 + // [38] phi (byte) current_piece_char#10 = (byte) current_piece_char#5 [phi:main::@17->main::@1#11] -- register_copy + // [38] phi (byte*) current_piece#10 = (byte*) current_piece#101 [phi:main::@17->main::@1#12] -- register_copy + // [38] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#1 [phi:main::@17->main::@1#13] -- register_copy + // [38] phi (byte) render_screen_render#18 = (byte) $20 [phi:main::@17->main::@1#14] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render - // [40] phi (byte) render_screen_show#16 = (byte) 0 [phi:main::@17->main::@1#15] -- vbuz1=vbuc1 + // [38] phi (byte) render_screen_show#16 = (byte) 0 [phi:main::@17->main::@1#15] -- vbuz1=vbuc1 lda #0 sta.z render_screen_show jmp __b1 - // [40] phi from main::@25 main::@6 to main::@1 [phi:main::@25/main::@6->main::@1] + // [38] phi from main::@25 main::@6 to main::@1 [phi:main::@25/main::@6->main::@1] __b1_from___b25: __b1_from___b6: - // [40] phi (byte) level_bcd#11 = (byte) level_bcd#17 [phi:main::@25/main::@6->main::@1#0] -- register_copy - // [40] phi (byte) level#10 = (byte) level#17 [phi:main::@25/main::@6->main::@1#1] -- register_copy - // [40] phi (word) lines_bcd#19 = (word) lines_bcd#15 [phi:main::@25/main::@6->main::@1#2] -- register_copy - // [40] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#14 [phi:main::@25/main::@6->main::@1#3] -- register_copy - // [40] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@25/main::@6->main::@1#4] -- register_copy - // [40] phi (byte) next_piece_idx#10 = (byte) next_piece_idx#16 [phi:main::@25/main::@6->main::@1#5] -- register_copy - // [40] phi (byte) game_over#10 = (byte) game_over#15 [phi:main::@25/main::@6->main::@1#6] -- register_copy - // [40] phi (byte) current_ypos#11 = (byte) current_ypos#19 [phi:main::@25/main::@6->main::@1#7] -- register_copy - // [40] phi (byte) current_xpos#14 = (byte) current_xpos#19 [phi:main::@25/main::@6->main::@1#8] -- register_copy - // [40] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#18 [phi:main::@25/main::@6->main::@1#9] -- register_copy - // [40] phi (byte) current_orientation#13 = (byte) current_orientation#17 [phi:main::@25/main::@6->main::@1#10] -- register_copy - // [40] phi (byte) current_piece_char#10 = (byte) current_piece_char#16 [phi:main::@25/main::@6->main::@1#11] -- register_copy - // [40] phi (byte*) current_piece#10 = (byte*) current_piece#15 [phi:main::@25/main::@6->main::@1#12] -- register_copy - // [40] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#21 [phi:main::@25/main::@6->main::@1#13] -- register_copy - // [40] phi (byte) render_screen_render#18 = (byte) render_screen_render#11 [phi:main::@25/main::@6->main::@1#14] -- register_copy - // [40] phi (byte) render_screen_show#16 = (byte) render_screen_show#13 [phi:main::@25/main::@6->main::@1#15] -- register_copy + // [38] phi (byte) level_bcd#11 = (byte) level_bcd#17 [phi:main::@25/main::@6->main::@1#0] -- register_copy + // [38] phi (byte) level#10 = (byte) level#17 [phi:main::@25/main::@6->main::@1#1] -- register_copy + // [38] phi (word) lines_bcd#19 = (word) lines_bcd#15 [phi:main::@25/main::@6->main::@1#2] -- register_copy + // [38] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#14 [phi:main::@25/main::@6->main::@1#3] -- register_copy + // [38] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@25/main::@6->main::@1#4] -- register_copy + // [38] phi (byte) next_piece_idx#10 = (byte) next_piece_idx#16 [phi:main::@25/main::@6->main::@1#5] -- register_copy + // [38] phi (byte) game_over#10 = (byte) game_over#15 [phi:main::@25/main::@6->main::@1#6] -- register_copy + // [38] phi (byte) current_ypos#11 = (byte) current_ypos#19 [phi:main::@25/main::@6->main::@1#7] -- register_copy + // [38] phi (byte) current_xpos#14 = (byte) current_xpos#19 [phi:main::@25/main::@6->main::@1#8] -- register_copy + // [38] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#18 [phi:main::@25/main::@6->main::@1#9] -- register_copy + // [38] phi (byte) current_orientation#13 = (byte) current_orientation#17 [phi:main::@25/main::@6->main::@1#10] -- register_copy + // [38] phi (byte) current_piece_char#10 = (byte) current_piece_char#16 [phi:main::@25/main::@6->main::@1#11] -- register_copy + // [38] phi (byte*) current_piece#10 = (byte*) current_piece#15 [phi:main::@25/main::@6->main::@1#12] -- register_copy + // [38] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#21 [phi:main::@25/main::@6->main::@1#13] -- register_copy + // [38] phi (byte) render_screen_render#18 = (byte) render_screen_render#11 [phi:main::@25/main::@6->main::@1#14] -- register_copy + // [38] phi (byte) render_screen_show#16 = (byte) render_screen_show#13 [phi:main::@25/main::@6->main::@1#15] -- register_copy jmp __b1 // main::@1 __b1: @@ -12073,161 +12051,161 @@ main: { // Wait for a frame to pass // main::@2 __b2: - // [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + // [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 lda #$ff cmp RASTER bne __b2 - // [42] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [40] phi from main::@2 to main::@3 [phi:main::@2->main::@3] __b3_from___b2: jmp __b3 // main::@3 __b3: - // [43] call render_show + // [41] call render_show jsr render_show - // [44] phi from main::@3 to main::@18 [phi:main::@3->main::@18] + // [42] phi from main::@3 to main::@18 [phi:main::@3->main::@18] __b18_from___b3: jmp __b18 // main::@18 __b18: - // [45] call keyboard_event_scan - // [392] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] + // [43] call keyboard_event_scan + // [390] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] keyboard_event_scan_from___b18: jsr keyboard_event_scan - // [46] phi from main::@18 to main::@19 [phi:main::@18->main::@19] + // [44] phi from main::@18 to main::@19 [phi:main::@18->main::@19] __b19_from___b18: jmp __b19 // main::@19 __b19: - // [47] call keyboard_event_get + // [45] call keyboard_event_get jsr keyboard_event_get - // [48] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 -- vbuz1=vbuz2 + // [46] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 -- vbuz1=vbuz2 lda.z keyboard_event_get.return sta.z keyboard_event_get.return_1 jmp __b20 // main::@20 __b20: - // [49] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 -- vbuz1=vbuz2 + // [47] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 -- vbuz1=vbuz2 lda.z keyboard_event_get.return_1 sta.z key_event - // [50] if((byte) game_over#10==(byte) 0) goto main::@4 -- vbuz1_eq_0_then_la1 + // [48] if((byte) game_over#10==(byte) 0) goto main::@4 -- vbuz1_eq_0_then_la1 lda.z game_over cmp #0 beq __b4 jmp __b5 // main::@5 __b5: - // [51] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [49] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL jmp __b5 // main::@4 __b4: - // [52] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 -- vbuz1=vbuz2 + // [50] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 -- vbuz1=vbuz2 lda.z key_event sta.z play_movement.key_event - // [53] call play_movement + // [51] call play_movement jsr play_movement - // [54] (byte) play_movement::return#3 ← (byte) play_movement::return#2 -- vbuz1=vbuz2 + // [52] (byte) play_movement::return#3 ← (byte) play_movement::return#2 -- vbuz1=vbuz2 lda.z play_movement.return sta.z play_movement.return_1 jmp __b21 // main::@21 __b21: - // [55] (byte) main::render#1 ← (byte) play_movement::return#3 -- vbuz1=vbuz2 + // [53] (byte) main::render#1 ← (byte) play_movement::return#3 -- vbuz1=vbuz2 lda.z play_movement.return_1 sta.z render jmp __b6 // main::@6 __b6: - // [56] if((byte) main::render#1==(byte) 0) goto main::@1 -- vbuz1_eq_0_then_la1 + // [54] if((byte) main::render#1==(byte) 0) goto main::@1 -- vbuz1_eq_0_then_la1 lda.z render cmp #0 beq __b1_from___b6 jmp __b7 // main::@7 __b7: - // [57] (byte) render_screen_render#63 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 + // [55] (byte) render_screen_render#63 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 lda.z render_screen_render sta.z render_screen_render_2 - // [58] call render_playfield - // [152] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] + // [56] call render_playfield + // [150] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] render_playfield_from___b7: - // [152] phi (byte) render_screen_render#22 = (byte) render_screen_render#63 [phi:main::@7->render_playfield#0] -- register_copy + // [150] phi (byte) render_screen_render#22 = (byte) render_screen_render#63 [phi:main::@7->render_playfield#0] -- register_copy jsr render_playfield jmp __b22 // main::@22 __b22: - // [59] (byte) current_ypos#98 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [57] (byte) current_ypos#98 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z current_ypos_1 - // [60] (byte) render_screen_render#64 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 + // [58] (byte) render_screen_render#64 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 lda.z render_screen_render sta.z render_screen_render_3 - // [61] (byte) current_xpos#119 ← (byte) current_xpos#19 -- vbuz1=vbuz2 + // [59] (byte) current_xpos#119 ← (byte) current_xpos#19 -- vbuz1=vbuz2 lda.z current_xpos sta.z current_xpos_1 - // [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 -- pbuz1=pbuz2 + // [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 -- pbuz1=pbuz2 lda.z current_piece_gfx sta.z current_piece_gfx_1 lda.z current_piece_gfx+1 sta.z current_piece_gfx_1+1 - // [63] (byte) current_piece_char#100 ← (byte) current_piece_char#16 -- vbuz1=vbuz2 + // [61] (byte) current_piece_char#100 ← (byte) current_piece_char#16 -- vbuz1=vbuz2 lda.z current_piece_char sta.z current_piece_char_1 - // [64] call render_moving - // [130] phi from main::@22 to render_moving [phi:main::@22->render_moving] + // [62] call render_moving + // [128] phi from main::@22 to render_moving [phi:main::@22->render_moving] render_moving_from___b22: - // [130] phi (byte) current_piece_char#68 = (byte) current_piece_char#100 [phi:main::@22->render_moving#0] -- register_copy - // [130] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#112 [phi:main::@22->render_moving#1] -- register_copy - // [130] phi (byte) current_xpos#59 = (byte) current_xpos#119 [phi:main::@22->render_moving#2] -- register_copy - // [130] phi (byte) render_screen_render#33 = (byte) render_screen_render#64 [phi:main::@22->render_moving#3] -- register_copy - // [130] phi (byte) current_ypos#13 = (byte) current_ypos#98 [phi:main::@22->render_moving#4] -- register_copy + // [128] phi (byte) current_piece_char#68 = (byte) current_piece_char#100 [phi:main::@22->render_moving#0] -- register_copy + // [128] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#112 [phi:main::@22->render_moving#1] -- register_copy + // [128] phi (byte) current_xpos#59 = (byte) current_xpos#119 [phi:main::@22->render_moving#2] -- register_copy + // [128] phi (byte) render_screen_render#33 = (byte) render_screen_render#64 [phi:main::@22->render_moving#3] -- register_copy + // [128] phi (byte) current_ypos#13 = (byte) current_ypos#98 [phi:main::@22->render_moving#4] -- register_copy jsr render_moving jmp __b23 // main::@23 __b23: - // [65] (byte) render_screen_render#65 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 + // [63] (byte) render_screen_render#65 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 lda.z render_screen_render sta.z render_screen_render_1 - // [66] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 -- vbuz1=vbuz2 + // [64] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 -- vbuz1=vbuz2 lda.z next_piece_idx sta.z next_piece_idx_1 - // [67] call render_next - // [109] phi from main::@23 to render_next [phi:main::@23->render_next] + // [65] call render_next + // [107] phi from main::@23 to render_next [phi:main::@23->render_next] render_next_from___b23: - // [109] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#77 [phi:main::@23->render_next#0] -- register_copy - // [109] phi (byte) render_screen_render#15 = (byte) render_screen_render#65 [phi:main::@23->render_next#1] -- register_copy + // [107] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#77 [phi:main::@23->render_next#0] -- register_copy + // [107] phi (byte) render_screen_render#15 = (byte) render_screen_render#65 [phi:main::@23->render_next#1] -- register_copy jsr render_next - // [68] phi from main::@23 to main::@24 [phi:main::@23->main::@24] + // [66] phi from main::@23 to main::@24 [phi:main::@23->main::@24] __b24_from___b23: jmp __b24 // main::@24 __b24: - // [69] call render_score + // [67] call render_score jsr render_score - // [70] phi from main::@24 to main::@25 [phi:main::@24->main::@25] + // [68] phi from main::@24 to main::@25 [phi:main::@24->main::@25] __b25_from___b24: jmp __b25 // main::@25 __b25: - // [71] call render_screen_swap + // [69] call render_screen_swap jsr render_screen_swap jmp __b1_from___b25 } // render_screen_swap // Swap rendering to the other screen (used for double buffering) render_screen_swap: { - // [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 + // [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 lda #$20 eor.z render_screen_render sta.z render_screen_render - // [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 + // [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 lda #$20 eor.z render_screen_show sta.z render_screen_show jmp __breturn // render_screen_swap::@return __breturn: - // [74] return + // [72] return rts } // render_score @@ -12238,26 +12216,26 @@ render_score: { .const lines_offset = $28*1+$16 .const level_offset = $28*$13+$1f .label screen = 5 - // [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -- vbuz1_eq_0_then_la1 + // [73] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -- vbuz1_eq_0_then_la1 lda.z render_screen_render cmp #0 beq __b1_from_render_score - // [77] phi from render_score to render_score::@2 [phi:render_score->render_score::@2] + // [75] phi from render_score to render_score::@2 [phi:render_score->render_score::@2] __b2_from_render_score: - // [77] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_score->render_score::@2#0] -- pbuz1=pbuc1 + // [75] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_score->render_score::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2 sta.z screen+1 jmp __b2 - // [76] phi from render_score to render_score::@1 [phi:render_score->render_score::@1] + // [74] phi from render_score to render_score::@1 [phi:render_score->render_score::@1] __b1_from_render_score: jmp __b1 // render_score::@1 __b1: - // [77] phi from render_score::@1 to render_score::@2 [phi:render_score::@1->render_score::@2] + // [75] phi from render_score::@1 to render_score::@2 [phi:render_score::@1->render_score::@2] __b2_from___b1: - // [77] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_score::@1->render_score::@2#0] -- pbuz1=pbuc1 + // [75] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_score::@1->render_score::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1 @@ -12265,157 +12243,157 @@ render_score: { jmp __b2 // render_score::@2 __b2: - // [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 + // [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 lda.z screen sta.z render_bcd.screen lda.z screen+1 sta.z render_bcd.screen+1 - // [79] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) -- vbuz1=_deref_pbuc1 + // [77] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) -- vbuz1=_deref_pbuc1 lda score_bytes+2 sta.z render_bcd.bcd - // [80] call render_bcd - // [97] phi from render_score::@2 to render_bcd [phi:render_score::@2->render_bcd] + // [78] call render_bcd + // [95] phi from render_score::@2 to render_bcd [phi:render_score::@2->render_bcd] render_bcd_from___b2: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#0 [phi:render_score::@2->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@2->render_bcd#1] -- vbuz1=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#0 [phi:render_score::@2->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@2->render_bcd#1] -- vbuz1=vbuc1 lda #0 sta.z render_bcd.only_low - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset [phi:render_score::@2->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset [phi:render_score::@2->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#0 [phi:render_score::@2->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#0 [phi:render_score::@2->render_bcd#3] -- register_copy jsr render_bcd jmp __b3 // render_score::@3 __b3: - // [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 + // [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 lda.z screen sta.z render_bcd.screen lda.z screen+1 sta.z render_bcd.screen+1 - // [82] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) -- vbuz1=_deref_pbuc1 + // [80] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) -- vbuz1=_deref_pbuc1 lda score_bytes+1 sta.z render_bcd.bcd - // [83] call render_bcd - // [97] phi from render_score::@3 to render_bcd [phi:render_score::@3->render_bcd] + // [81] call render_bcd + // [95] phi from render_score::@3 to render_bcd [phi:render_score::@3->render_bcd] render_bcd_from___b3: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#1 [phi:render_score::@3->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@3->render_bcd#1] -- vbuz1=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#1 [phi:render_score::@3->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@3->render_bcd#1] -- vbuz1=vbuc1 lda #0 sta.z render_bcd.only_low - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 2 [phi:render_score::@3->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 2 [phi:render_score::@3->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset+2 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#1 [phi:render_score::@3->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#1 [phi:render_score::@3->render_bcd#3] -- register_copy jsr render_bcd jmp __b4 // render_score::@4 __b4: - // [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 + // [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 lda.z screen sta.z render_bcd.screen lda.z screen+1 sta.z render_bcd.screen+1 - // [85] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) -- vbuz1=_deref_pbuc1 + // [83] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) -- vbuz1=_deref_pbuc1 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] + // [84] call render_bcd + // [95] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd] render_bcd_from___b4: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#2 [phi:render_score::@4->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@4->render_bcd#1] -- vbuz1=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#2 [phi:render_score::@4->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@4->render_bcd#1] -- vbuz1=vbuc1 lda #0 sta.z render_bcd.only_low - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 4 [phi:render_score::@4->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 4 [phi:render_score::@4->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset+4 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#2 [phi:render_score::@4->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#2 [phi:render_score::@4->render_bcd#3] -- register_copy jsr render_bcd jmp __b5 // render_score::@5 __b5: - // [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 -- vbuz1=_hi_vwuz2 + // [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 -- vbuz1=_hi_vwuz2 lda.z lines_bcd+1 sta.z render_bcd.bcd - // [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 + // [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 lda.z screen sta.z render_bcd.screen lda.z screen+1 sta.z render_bcd.screen+1 - // [89] call render_bcd - // [97] phi from render_score::@5 to render_bcd [phi:render_score::@5->render_bcd] + // [87] call render_bcd + // [95] phi from render_score::@5 to render_bcd [phi:render_score::@5->render_bcd] render_bcd_from___b5: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#3 [phi:render_score::@5->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 1 [phi:render_score::@5->render_bcd#1] -- vbuz1=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#3 [phi:render_score::@5->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 1 [phi:render_score::@5->render_bcd#1] -- vbuz1=vbuc1 lda #1 sta.z render_bcd.only_low - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset [phi:render_score::@5->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset [phi:render_score::@5->render_bcd#2] -- vwuz1=vwuc1 lda #lines_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#3 [phi:render_score::@5->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#3 [phi:render_score::@5->render_bcd#3] -- register_copy jsr render_bcd jmp __b6 // render_score::@6 __b6: - // [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 -- vbuz1=_lo_vwuz2 + // [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 -- vbuz1=_lo_vwuz2 lda.z lines_bcd sta.z render_bcd.bcd - // [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 + // [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 lda.z screen sta.z render_bcd.screen lda.z screen+1 sta.z render_bcd.screen+1 - // [92] call render_bcd - // [97] phi from render_score::@6 to render_bcd [phi:render_score::@6->render_bcd] + // [90] call render_bcd + // [95] phi from render_score::@6 to render_bcd [phi:render_score::@6->render_bcd] render_bcd_from___b6: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#4 [phi:render_score::@6->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@6->render_bcd#1] -- vbuz1=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#4 [phi:render_score::@6->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@6->render_bcd#1] -- vbuz1=vbuc1 lda #0 sta.z render_bcd.only_low - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset+(byte) 1 [phi:render_score::@6->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset+(byte) 1 [phi:render_score::@6->render_bcd#2] -- vwuz1=vwuc1 lda #lines_offset+1 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#4 [phi:render_score::@6->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#4 [phi:render_score::@6->render_bcd#3] -- register_copy jsr render_bcd jmp __b7 // render_score::@7 __b7: - // [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 + // [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 -- pbuz1=pbuz2 lda.z screen sta.z render_bcd.screen lda.z screen+1 sta.z render_bcd.screen+1 - // [94] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 -- vbuz1=vbuz2 + // [92] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 -- vbuz1=vbuz2 lda.z level_bcd sta.z render_bcd.bcd - // [95] call render_bcd - // [97] phi from render_score::@7 to render_bcd [phi:render_score::@7->render_bcd] + // [93] call render_bcd + // [95] phi from render_score::@7 to render_bcd [phi:render_score::@7->render_bcd] render_bcd_from___b7: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#5 [phi:render_score::@7->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@7->render_bcd#1] -- vbuz1=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#5 [phi:render_score::@7->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@7->render_bcd#1] -- vbuz1=vbuc1 lda #0 sta.z render_bcd.only_low - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::level_offset [phi:render_score::@7->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::level_offset [phi:render_score::@7->render_bcd#2] -- vwuz1=vwuc1 lda #level_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#5 [phi:render_score::@7->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#5 [phi:render_score::@7->render_bcd#3] -- register_copy jsr render_bcd jmp __breturn // render_score::@return __breturn: - // [96] return + // [94] return rts } // render_bcd @@ -12436,7 +12414,7 @@ render_bcd: { .label screen_pos = $d .label offset = 9 .label only_low = $b - // [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 -- pbuz1=pbuz2_plus_vwuz3 + // [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 -- pbuz1=pbuz2_plus_vwuz3 lda.z screen clc adc.z offset @@ -12444,56 +12422,56 @@ render_bcd: { lda.z screen+1 adc.z offset+1 sta.z screen_pos+1 - // [99] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -- vbuz1_neq_0_then_la1 + // [97] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -- vbuz1_neq_0_then_la1 lda.z only_low cmp #0 bne __b1_from_render_bcd jmp __b2 // render_bcd::@2 __b2: - // [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 -- vbuz1=vbuz2_ror_4 + // [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 -- vbuz1=vbuz2_ror_4 lda.z bcd lsr lsr lsr lsr sta.z __5 - // [101] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 -- vbuz1=vbuc1_plus_vbuz2 + // [99] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 -- vbuz1=vbuc1_plus_vbuz2 lax.z __5 axs #-[ZERO_CHAR] stx.z __6 - // [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 -- _deref_pbuz1=vbuz2 + // [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 -- _deref_pbuz1=vbuz2 lda.z __6 ldy #0 sta (screen_pos),y - // [103] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 -- pbuz1=_inc_pbuz1 + // [101] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 -- pbuz1=_inc_pbuz1 inc.z screen_pos bne !+ inc.z screen_pos+1 !: - // [104] phi from render_bcd render_bcd::@2 to render_bcd::@1 [phi:render_bcd/render_bcd::@2->render_bcd::@1] + // [102] phi from render_bcd render_bcd::@2 to render_bcd::@1 [phi:render_bcd/render_bcd::@2->render_bcd::@1] __b1_from_render_bcd: __b1_from___b2: - // [104] phi (byte*) render_bcd::screen_pos#3 = (byte*) render_bcd::screen_pos#0 [phi:render_bcd/render_bcd::@2->render_bcd::@1#0] -- register_copy + // [102] phi (byte*) render_bcd::screen_pos#3 = (byte*) render_bcd::screen_pos#0 [phi:render_bcd/render_bcd::@2->render_bcd::@1#0] -- register_copy jmp __b1 // render_bcd::@1 __b1: - // [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and.z bcd sta.z __3 - // [106] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 -- vbuz1=vbuc1_plus_vbuz2 + // [104] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 -- vbuz1=vbuc1_plus_vbuz2 lax.z __3 axs #-[ZERO_CHAR] stx.z __4 - // [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 -- _deref_pbuz1=vbuz2 + // [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 -- _deref_pbuz1=vbuz2 lda.z __4 ldy #0 sta (screen_pos),y jmp __breturn // render_bcd::@return __breturn: - // [108] return + // [106] return rts } // render_next @@ -12508,26 +12486,26 @@ render_next: { .label screen_next_area = $14 .label c = $16 .label l = $11 - // [110] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -- vbuz1_eq_0_then_la1 + // [108] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -- vbuz1_eq_0_then_la1 lda.z render_screen_render_1 cmp #0 beq __b1_from_render_next - // [112] phi from render_next to render_next::@2 [phi:render_next->render_next::@2] + // [110] phi from render_next to render_next::@2 [phi:render_next->render_next::@2] __b2_from_render_next: - // [112] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset [phi:render_next->render_next::@2#0] -- pbuz1=pbuc1 + // [110] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset [phi:render_next->render_next::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2+next_area_offset sta.z screen_next_area+1 jmp __b2 - // [111] phi from render_next to render_next::@1 [phi:render_next->render_next::@1] + // [109] phi from render_next to render_next::@1 [phi:render_next->render_next::@1] __b1_from_render_next: jmp __b1 // render_next::@1 __b1: - // [112] phi from render_next::@1 to render_next::@2 [phi:render_next::@1->render_next::@2] + // [110] phi from render_next::@1 to render_next::@2 [phi:render_next::@1->render_next::@2] __b2_from___b1: - // [112] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset [phi:render_next::@1->render_next::@2#0] -- pbuz1=pbuc1 + // [110] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset [phi:render_next::@1->render_next::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1+next_area_offset @@ -12535,90 +12513,90 @@ render_next: { jmp __b2 // render_next::@2 __b2: - // [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z next_piece_idx_1 asl sta.z __6 - // [114] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) -- vbuz1=pbuc1_derefidx_vbuz2 + // [112] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z next_piece_idx_1 lda PIECES_NEXT_CHARS,y sta.z next_piece_char - // [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) -- pbuz1=pptc1_derefidx_vbuz2 + // [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __6 lda PIECES,y sta.z next_piece_gfx lda PIECES+1,y sta.z next_piece_gfx+1 - // [116] phi from render_next::@2 to render_next::@3 [phi:render_next::@2->render_next::@3] + // [114] phi from render_next::@2 to render_next::@3 [phi:render_next::@2->render_next::@3] __b3_from___b2: - // [116] phi (byte) render_next::l#7 = (byte) 0 [phi:render_next::@2->render_next::@3#0] -- vbuz1=vbuc1 + // [114] phi (byte) render_next::l#7 = (byte) 0 [phi:render_next::@2->render_next::@3#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [116] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#11 [phi:render_next::@2->render_next::@3#1] -- register_copy - // [116] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#9 [phi:render_next::@2->render_next::@3#2] -- register_copy + // [114] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#11 [phi:render_next::@2->render_next::@3#1] -- register_copy + // [114] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#9 [phi:render_next::@2->render_next::@3#2] -- register_copy jmp __b3 - // [116] phi from render_next::@8 to render_next::@3 [phi:render_next::@8->render_next::@3] + // [114] phi from render_next::@8 to render_next::@3 [phi:render_next::@8->render_next::@3] __b3_from___b8: - // [116] phi (byte) render_next::l#7 = (byte) render_next::l#1 [phi:render_next::@8->render_next::@3#0] -- register_copy - // [116] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#4 [phi:render_next::@8->render_next::@3#1] -- register_copy - // [116] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@8->render_next::@3#2] -- register_copy + // [114] phi (byte) render_next::l#7 = (byte) render_next::l#1 [phi:render_next::@8->render_next::@3#0] -- register_copy + // [114] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#4 [phi:render_next::@8->render_next::@3#1] -- register_copy + // [114] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@8->render_next::@3#2] -- register_copy jmp __b3 // render_next::@3 __b3: - // [117] phi from render_next::@3 to render_next::@4 [phi:render_next::@3->render_next::@4] + // [115] phi from render_next::@3 to render_next::@4 [phi:render_next::@3->render_next::@4] __b4_from___b3: - // [117] phi (byte) render_next::c#2 = (byte) 0 [phi:render_next::@3->render_next::@4#0] -- vbuz1=vbuc1 + // [115] phi (byte) render_next::c#2 = (byte) 0 [phi:render_next::@3->render_next::@4#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [117] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#10 [phi:render_next::@3->render_next::@4#1] -- register_copy - // [117] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#3 [phi:render_next::@3->render_next::@4#2] -- register_copy + // [115] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#10 [phi:render_next::@3->render_next::@4#1] -- register_copy + // [115] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#3 [phi:render_next::@3->render_next::@4#2] -- register_copy jmp __b4 - // [117] phi from render_next::@6 to render_next::@4 [phi:render_next::@6->render_next::@4] + // [115] phi from render_next::@6 to render_next::@4 [phi:render_next::@6->render_next::@4] __b4_from___b6: - // [117] phi (byte) render_next::c#2 = (byte) render_next::c#1 [phi:render_next::@6->render_next::@4#0] -- register_copy - // [117] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#3 [phi:render_next::@6->render_next::@4#1] -- register_copy - // [117] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@6->render_next::@4#2] -- register_copy + // [115] phi (byte) render_next::c#2 = (byte) render_next::c#1 [phi:render_next::@6->render_next::@4#0] -- register_copy + // [115] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#3 [phi:render_next::@6->render_next::@4#1] -- register_copy + // [115] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@6->render_next::@4#2] -- register_copy jmp __b4 // render_next::@4 __b4: - // [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) -- vbuz1=_deref_pbuz2 + // [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) -- vbuz1=_deref_pbuz2 ldy #0 lda (next_piece_gfx),y sta.z cell - // [119] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 -- pbuz1=_inc_pbuz1 + // [117] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 -- pbuz1=_inc_pbuz1 inc.z next_piece_gfx bne !+ inc.z next_piece_gfx+1 !: - // [120] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 -- vbuz1_neq_0_then_la1 + // [118] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 -- vbuz1_neq_0_then_la1 lda.z cell cmp #0 bne __b5 jmp __b7 // render_next::@7 __b7: - // [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (screen_next_area),y jmp __b6 // render_next::@6 __b6: - // [122] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 -- pbuz1=_inc_pbuz1 + // [120] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 -- pbuz1=_inc_pbuz1 inc.z screen_next_area bne !+ inc.z screen_next_area+1 !: - // [123] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 -- vbuz1=_inc_vbuz1 + // [121] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [124] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 -- vbuz1_neq_vbuc1_then_la1 + // [122] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z c bne __b4_from___b6 jmp __b8 // render_next::@8 __b8: - // [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 -- pbuz1=pbuz1_plus_vbuc1 + // [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 -- pbuz1=pbuz1_plus_vbuc1 lda #$24 clc adc.z screen_next_area @@ -12626,20 +12604,20 @@ render_next: { bcc !+ inc.z screen_next_area+1 !: - // [126] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 -- vbuz1=_inc_vbuz1 + // [124] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 -- vbuz1=_inc_vbuz1 inc.z l - // [127] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 -- vbuz1_neq_vbuc1_then_la1 + // [125] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b3_from___b8 jmp __breturn // render_next::@return __breturn: - // [128] return + // [126] return rts // render_next::@5 __b5: - // [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 -- _deref_pbuz1=vbuz2 + // [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 -- _deref_pbuz1=vbuz2 lda.z next_piece_char ldy #0 sta (screen_next_area),y @@ -12658,119 +12636,119 @@ render_moving: { .label l = $1e .label current_cell = $89 .label c = $21 - // [131] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 -- vbuz1=vbuz2 + // [129] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 -- vbuz1=vbuz2 lda.z current_ypos_1 sta.z ypos - // [132] phi from render_moving to render_moving::@1 [phi:render_moving->render_moving::@1] + // [130] phi from render_moving to render_moving::@1 [phi:render_moving->render_moving::@1] __b1_from_render_moving: - // [132] phi (byte) render_moving::l#4 = (byte) 0 [phi:render_moving->render_moving::@1#0] -- vbuz1=vbuc1 + // [130] phi (byte) render_moving::l#4 = (byte) 0 [phi:render_moving->render_moving::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [132] phi (byte) render_moving::i#3 = (byte) 0 [phi:render_moving->render_moving::@1#1] -- vbuz1=vbuc1 + // [130] phi (byte) render_moving::i#3 = (byte) 0 [phi:render_moving->render_moving::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i - // [132] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#0 [phi:render_moving->render_moving::@1#2] -- register_copy + // [130] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#0 [phi:render_moving->render_moving::@1#2] -- register_copy jmp __b1 - // [132] phi from render_moving::@3 to render_moving::@1 [phi:render_moving::@3->render_moving::@1] + // [130] phi from render_moving::@3 to render_moving::@1 [phi:render_moving::@3->render_moving::@1] __b1_from___b3: - // [132] phi (byte) render_moving::l#4 = (byte) render_moving::l#1 [phi:render_moving::@3->render_moving::@1#0] -- register_copy - // [132] phi (byte) render_moving::i#3 = (byte) render_moving::i#8 [phi:render_moving::@3->render_moving::@1#1] -- register_copy - // [132] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#1 [phi:render_moving::@3->render_moving::@1#2] -- register_copy + // [130] phi (byte) render_moving::l#4 = (byte) render_moving::l#1 [phi:render_moving::@3->render_moving::@1#0] -- register_copy + // [130] phi (byte) render_moving::i#3 = (byte) render_moving::i#8 [phi:render_moving::@3->render_moving::@1#1] -- register_copy + // [130] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#1 [phi:render_moving::@3->render_moving::@1#2] -- register_copy jmp __b1 // render_moving::@1 __b1: - // [133] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 -- vbuz1_ge_vbuc1_then_la1 + // [131] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 -- vbuz1_ge_vbuc1_then_la1 lda.z ypos cmp #1+1 bcs __b2 jmp __b7 // render_moving::@7 __b7: - // [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 -- vbuz1=vbuz1_plus_vbuc1 + // [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 -- vbuz1=vbuz1_plus_vbuc1 lax.z i axs #-[4] stx.z i - // [135] phi from render_moving::@5 render_moving::@7 to render_moving::@3 [phi:render_moving::@5/render_moving::@7->render_moving::@3] + // [133] phi from render_moving::@5 render_moving::@7 to render_moving::@3 [phi:render_moving::@5/render_moving::@7->render_moving::@3] __b3_from___b5: __b3_from___b7: - // [135] phi (byte) render_moving::i#8 = (byte) render_moving::i#2 [phi:render_moving::@5/render_moving::@7->render_moving::@3#0] -- register_copy + // [133] phi (byte) render_moving::i#8 = (byte) render_moving::i#2 [phi:render_moving::@5/render_moving::@7->render_moving::@3#0] -- register_copy jmp __b3 // render_moving::@3 __b3: - // [136] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 -- vbuz1=_inc_vbuz1 + // [134] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 -- vbuz1=_inc_vbuz1 inc.z ypos - // [137] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 -- vbuz1=_inc_vbuz1 + // [135] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 -- vbuz1=_inc_vbuz1 inc.z l - // [138] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 -- vbuz1_neq_vbuc1_then_la1 + // [136] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b1_from___b3 jmp __breturn // render_moving::@return __breturn: - // [139] return + // [137] return rts // render_moving::@2 __b2: - // [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 -- vbuz1=vbuz2_plus_vbuz3 + // [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 -- vbuz1=vbuz2_plus_vbuz3 lda.z render_screen_render_3 clc adc.z ypos sta.z __1 - // [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z __1 asl sta.z __6 - // [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) -- pbuz1=pptc1_derefidx_vbuz2 + // [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __6 lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 - // [143] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 -- vbuz1=vbuz2 + // [141] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 -- vbuz1=vbuz2 lda.z current_xpos_1 sta.z xpos - // [144] phi from render_moving::@2 to render_moving::@4 [phi:render_moving::@2->render_moving::@4] + // [142] phi from render_moving::@2 to render_moving::@4 [phi:render_moving::@2->render_moving::@4] __b4_from___b2: - // [144] phi (byte) render_moving::c#2 = (byte) 0 [phi:render_moving::@2->render_moving::@4#0] -- vbuz1=vbuc1 + // [142] phi (byte) render_moving::c#2 = (byte) 0 [phi:render_moving::@2->render_moving::@4#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [144] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#0 [phi:render_moving::@2->render_moving::@4#1] -- register_copy - // [144] phi (byte) render_moving::i#4 = (byte) render_moving::i#3 [phi:render_moving::@2->render_moving::@4#2] -- register_copy + // [142] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#0 [phi:render_moving::@2->render_moving::@4#1] -- register_copy + // [142] phi (byte) render_moving::i#4 = (byte) render_moving::i#3 [phi:render_moving::@2->render_moving::@4#2] -- register_copy jmp __b4 - // [144] phi from render_moving::@5 to render_moving::@4 [phi:render_moving::@5->render_moving::@4] + // [142] phi from render_moving::@5 to render_moving::@4 [phi:render_moving::@5->render_moving::@4] __b4_from___b5: - // [144] phi (byte) render_moving::c#2 = (byte) render_moving::c#1 [phi:render_moving::@5->render_moving::@4#0] -- register_copy - // [144] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#1 [phi:render_moving::@5->render_moving::@4#1] -- register_copy - // [144] phi (byte) render_moving::i#4 = (byte) render_moving::i#2 [phi:render_moving::@5->render_moving::@4#2] -- register_copy + // [142] phi (byte) render_moving::c#2 = (byte) render_moving::c#1 [phi:render_moving::@5->render_moving::@4#0] -- register_copy + // [142] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#1 [phi:render_moving::@5->render_moving::@4#1] -- register_copy + // [142] phi (byte) render_moving::i#4 = (byte) render_moving::i#2 [phi:render_moving::@5->render_moving::@4#2] -- register_copy jmp __b4 // render_moving::@4 __b4: - // [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) -- vbuz1=pbuz2_derefidx_vbuz3 + // [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) -- vbuz1=pbuz2_derefidx_vbuz3 ldy.z i lda (current_piece_gfx_1),y sta.z current_cell - // [146] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 -- vbuz1=_inc_vbuz1 + // [144] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 -- vbuz1=_inc_vbuz1 inc.z i - // [147] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -- vbuz1_eq_0_then_la1 + // [145] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -- vbuz1_eq_0_then_la1 lda.z current_cell cmp #0 beq __b5 jmp __b6 // render_moving::@6 __b6: - // [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 -- pbuz1_derefidx_vbuz2=vbuz3 + // [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z current_piece_char_1 ldy.z xpos sta (screen_line),y jmp __b5 // render_moving::@5 __b5: - // [149] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 -- vbuz1=_inc_vbuz1 + // [147] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 -- vbuz1=_inc_vbuz1 inc.z xpos - // [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 -- vbuz1=_inc_vbuz1 + // [148] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 -- vbuz1_neq_vbuc1_then_la1 + // [149] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z c bne __b4_from___b5 @@ -12786,84 +12764,84 @@ render_playfield: { .label i = $24 .label c = $27 .label l = $23 - // [153] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] + // [151] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] __b1_from_render_playfield: - // [153] phi (byte) render_playfield::i#3 = (const byte) PLAYFIELD_COLS*(byte) 2 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 + // [151] phi (byte) render_playfield::i#3 = (const byte) PLAYFIELD_COLS*(byte) 2 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 lda #PLAYFIELD_COLS*2 sta.z i - // [153] phi (byte) render_playfield::l#2 = (byte) 2 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + // [151] phi (byte) render_playfield::l#2 = (byte) 2 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 lda #2 sta.z l jmp __b1 - // [153] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] + // [151] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] __b1_from___b3: - // [153] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy - // [153] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + // [151] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy + // [151] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy jmp __b1 // render_playfield::@1 __b1: - // [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 -- vbuz1=vbuz2_plus_vbuz3 + // [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 -- vbuz1=vbuz2_plus_vbuz3 lda.z render_screen_render_2 clc adc.z l sta.z __0 - // [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z __0 asl sta.z __3 - // [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) -- pbuz1=pptc1_derefidx_vbuz2 + // [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __3 lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 - // [157] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] + // [155] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] __b2_from___b1: - // [157] phi (byte) render_playfield::c#2 = (byte) 0 [phi:render_playfield::@1->render_playfield::@2#0] -- vbuz1=vbuc1 + // [155] phi (byte) render_playfield::c#2 = (byte) 0 [phi:render_playfield::@1->render_playfield::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [157] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#0 [phi:render_playfield::@1->render_playfield::@2#1] -- register_copy - // [157] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#2] -- register_copy + // [155] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#0 [phi:render_playfield::@1->render_playfield::@2#1] -- register_copy + // [155] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#2] -- register_copy jmp __b2 - // [157] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] + // [155] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] __b2_from___b2: - // [157] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy - // [157] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy - // [157] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#2] -- register_copy + // [155] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy + // [155] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy + // [155] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#2] -- register_copy jmp __b2 // render_playfield::@2 __b2: - // [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy.z i lda playfield,y ldy #0 sta (screen_line),y - // [159] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 -- pbuz1=_inc_pbuz1 + // [157] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 -- pbuz1=_inc_pbuz1 inc.z screen_line bne !+ inc.z screen_line+1 !: - // [160] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 + // [158] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [161] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 + // [159] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [162] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 + // [160] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp.z c bne __b2_from___b2 jmp __b3 // render_playfield::@3 __b3: - // [163] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 + // [161] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 inc.z l - // [164] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 + // [162] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z l bne __b1_from___b3 jmp __breturn // render_playfield::@return __breturn: - // [165] return + // [163] return rts } // play_movement @@ -12879,72 +12857,72 @@ play_movement: { .label return = $28 .label key_event = $7b .label return_1 = $7c - // [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 -- vbuz1=vbuz2 + // [164] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 -- vbuz1=vbuz2 lda.z key_event sta.z play_move_down.key_event - // [167] call play_move_down + // [165] call play_move_down jsr play_move_down - // [168] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 -- vbuz1=vbuz2 + // [166] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 -- vbuz1=vbuz2 lda.z play_move_down.return_1 sta.z play_move_down.return jmp __b2 // play_movement::@2 __b2: - // [169] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 -- vbuz1=vbuz2 + // [167] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 -- vbuz1=vbuz2 lda.z play_move_down.return sta.z render - // [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -- vbuz1_eq_0_then_la1 + // [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -- vbuz1_eq_0_then_la1 lda.z game_over cmp #0 beq __b1 - // [171] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return] + // [169] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return] __breturn_from___b2: __breturn_from___b4: - // [171] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy - // [171] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy - // [171] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy - // [171] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy + // [169] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy + // [169] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy + // [169] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy + // [169] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy jmp __breturn // play_movement::@return __breturn: - // [172] return + // [170] return rts // play_movement::@1 __b1: - // [173] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 -- vbuz1=vbuz2 + // [171] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 -- vbuz1=vbuz2 lda.z key_event sta.z play_move_leftright.key_event - // [174] call play_move_leftright + // [172] call play_move_leftright jsr play_move_leftright - // [175] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 -- vbuz1=vbuz2 + // [173] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 -- vbuz1=vbuz2 lda.z play_move_leftright.return_1 sta.z play_move_leftright.return jmp __b3 // play_movement::@3 __b3: - // [176] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 -- vbuz1=vbuz2 + // [174] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 -- vbuz1=vbuz2 lda.z play_move_leftright.return sta.z __3 - // [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 -- vbuz1=vbuz2_plus_vbuz3 + // [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 -- vbuz1=vbuz2_plus_vbuz3 lda.z render clc adc.z __3 sta.z render_1 - // [178] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 -- vbuz1=vbuz2 + // [176] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 -- vbuz1=vbuz2 lda.z key_event sta.z play_move_rotate.key_event - // [179] call play_move_rotate + // [177] call play_move_rotate jsr play_move_rotate - // [180] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 -- vbuz1=vbuz2 + // [178] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 -- vbuz1=vbuz2 lda.z play_move_rotate.return_1 sta.z play_move_rotate.return jmp __b4 // play_movement::@4 __b4: - // [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 -- vbuz1=vbuz2 + // [179] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 -- vbuz1=vbuz2 lda.z play_move_rotate.return sta.z __4 - // [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 -- vbuz1=vbuz2_plus_vbuz3 + // [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 -- vbuz1=vbuz2_plus_vbuz3 lda.z render_1 clc adc.z __4 @@ -12964,89 +12942,89 @@ play_move_rotate: { // Handle keyboard events .label orientation = $2a .label return_1 = $29 - // [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -- vbuz1_eq_vbuc1_then_la1 + // [181] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -- vbuz1_eq_vbuc1_then_la1 lda #KEY_Z cmp.z key_event beq __b1 jmp __b4 // play_move_rotate::@4 __b4: - // [184] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -- vbuz1_eq_vbuc1_then_la1 + // [182] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -- vbuz1_eq_vbuc1_then_la1 lda #KEY_X cmp.z key_event beq __b2 - // [185] phi from play_move_rotate::@4 play_move_rotate::@6 to play_move_rotate::@return [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return] + // [183] phi from play_move_rotate::@4 play_move_rotate::@6 to play_move_rotate::@return [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return] __breturn_from___b4: __breturn_from___b6: - // [185] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#0] -- register_copy - // [185] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy - // [185] phi (byte) play_move_rotate::return#2 = (byte) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuz1=vbuc1 + // [183] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#0] -- register_copy + // [183] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy + // [183] phi (byte) play_move_rotate::return#2 = (byte) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuz1=vbuc1 lda #0 sta.z return_1 jmp __breturn // play_move_rotate::@return __breturn: - // [186] return + // [184] return rts // play_move_rotate::@2 __b2: - // [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 -- vbuz1=vbuz2_plus_vbuc1 + // [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 -- vbuz1=vbuz2_plus_vbuc1 lax.z current_orientation axs #-[$10] stx.z __5 - // [188] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f -- vbuz1=vbuz2_band_vbuc1 + // [186] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f -- vbuz1=vbuz2_band_vbuc1 lda #$3f and.z __5 sta.z orientation - // [189] phi from play_move_rotate::@1 play_move_rotate::@2 to play_move_rotate::@3 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3] + // [187] phi from play_move_rotate::@1 play_move_rotate::@2 to play_move_rotate::@3 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3] __b3_from___b1: __b3_from___b2: - // [189] phi (byte) play_move_rotate::orientation#3 = (byte) play_move_rotate::orientation#1 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3#0] -- register_copy + // [187] phi (byte) play_move_rotate::orientation#3 = (byte) play_move_rotate::orientation#1 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3#0] -- register_copy jmp __b3 // play_move_rotate::@3 __b3: - // [190] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 -- vbuz1=vbuz2 + // [188] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [191] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [189] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [192] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 + // [190] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 lda.z orientation sta.z play_collision.orientation - // [193] (byte*) current_piece#98 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [191] (byte*) current_piece#98 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [194] call play_collision - // [202] phi from play_move_rotate::@3 to play_collision [phi:play_move_rotate::@3->play_collision] + // [192] call play_collision + // [200] phi from play_move_rotate::@3 to play_collision [phi:play_move_rotate::@3->play_collision] play_collision_from___b3: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#3 [phi:play_move_rotate::@3->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#3 [phi:play_move_rotate::@3->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#3 [phi:play_move_rotate::@3->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#98 [phi:play_move_rotate::@3->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#3 [phi:play_move_rotate::@3->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#3 [phi:play_move_rotate::@3->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#3 [phi:play_move_rotate::@3->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#98 [phi:play_move_rotate::@3->play_collision#3] -- register_copy jsr play_collision - // [195] (byte) play_collision::return#14 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 + // [193] (byte) play_collision::return#14 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 lda.z play_collision.return_5 sta.z play_collision.return_4 jmp __b6 // play_move_rotate::@6 __b6: - // [196] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 -- vbuz1=vbuz2 + // [194] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 -- vbuz1=vbuz2 lda.z play_collision.return_4 sta.z __2 - // [197] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return -- vbuz1_neq_vbuc1_then_la1 + // [195] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return -- vbuz1_neq_vbuc1_then_la1 lda #COLLISION_NONE cmp.z __2 bne __breturn_from___b6 jmp __b5 // play_move_rotate::@5 __b5: - // [198] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 + // [196] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 lda.z orientation sta.z current_orientation - // [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 -- pbuz1=pbuz2_plus_vbuz3 + // [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 -- pbuz1=pbuz2_plus_vbuz3 lda.z current_orientation clc adc.z current_piece @@ -13054,21 +13032,21 @@ play_move_rotate: { lda #0 adc.z current_piece+1 sta.z current_piece_gfx+1 - // [185] phi from play_move_rotate::@5 to play_move_rotate::@return [phi:play_move_rotate::@5->play_move_rotate::@return] + // [183] phi from play_move_rotate::@5 to play_move_rotate::@return [phi:play_move_rotate::@5->play_move_rotate::@return] __breturn_from___b5: - // [185] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#7 [phi:play_move_rotate::@5->play_move_rotate::@return#0] -- register_copy - // [185] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy - // [185] phi (byte) play_move_rotate::return#2 = (byte) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuz1=vbuc1 + // [183] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#7 [phi:play_move_rotate::@5->play_move_rotate::@return#0] -- register_copy + // [183] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy + // [183] phi (byte) play_move_rotate::return#2 = (byte) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuz1=vbuc1 lda #1 sta.z return_1 jmp __breturn // play_move_rotate::@1 __b1: - // [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 -- vbuz1=vbuz2_minus_vbuc1 + // [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 -- vbuz1=vbuz2_minus_vbuc1 lax.z current_orientation axs #$10 stx.z __7 - // [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f -- vbuz1=vbuz2_band_vbuc1 + // [199] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f -- vbuz1=vbuz2_band_vbuc1 lda #$3f and.z __7 sta.z orientation @@ -13122,7 +13100,7 @@ play_collision: { // Beyond left side of the playfield // Collision with a playfield cell .label return_5 = $34 - // [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 -- pbuz1=pbuz2_plus_vbuz3 + // [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 -- pbuz1=pbuz2_plus_vbuz3 lda.z orientation clc adc.z current_piece_1 @@ -13130,46 +13108,46 @@ play_collision: { lda #0 adc.z current_piece_1+1 sta.z piece_gfx+1 - // [204] phi from play_collision to play_collision::@1 [phi:play_collision->play_collision::@1] + // [202] phi from play_collision to play_collision::@1 [phi:play_collision->play_collision::@1] __b1_from_play_collision: - // [204] phi (byte) play_collision::l#6 = (byte) 0 [phi:play_collision->play_collision::@1#0] -- vbuz1=vbuc1 + // [202] phi (byte) play_collision::l#6 = (byte) 0 [phi:play_collision->play_collision::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [204] phi (byte) play_collision::i#3 = (byte) 0 [phi:play_collision->play_collision::@1#1] -- vbuz1=vbuc1 + // [202] phi (byte) play_collision::i#3 = (byte) 0 [phi:play_collision->play_collision::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i_1 - // [204] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#0 [phi:play_collision->play_collision::@1#2] -- register_copy + // [202] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#0 [phi:play_collision->play_collision::@1#2] -- register_copy jmp __b1 // play_collision::@1 __b1: - // [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z yp asl sta.z __14 - // [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) -- pbuz1=pptc1_derefidx_vbuz2 + // [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __14 lda playfield_lines,y sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 - // [207] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 -- vbuz1=vbuz2 + // [205] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 -- vbuz1=vbuz2 lda.z xpos sta.z xp - // [208] phi from play_collision::@1 to play_collision::@2 [phi:play_collision::@1->play_collision::@2] + // [206] phi from play_collision::@1 to play_collision::@2 [phi:play_collision::@1->play_collision::@2] __b2_from___b1: - // [208] phi (byte) play_collision::c#2 = (byte) 0 [phi:play_collision::@1->play_collision::@2#0] -- vbuz1=vbuc1 + // [206] phi (byte) play_collision::c#2 = (byte) 0 [phi:play_collision::@1->play_collision::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [208] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#8 [phi:play_collision::@1->play_collision::@2#1] -- register_copy - // [208] phi (byte) play_collision::i#2 = (byte) play_collision::i#3 [phi:play_collision::@1->play_collision::@2#2] -- register_copy + // [206] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#8 [phi:play_collision::@1->play_collision::@2#1] -- register_copy + // [206] phi (byte) play_collision::i#2 = (byte) play_collision::i#3 [phi:play_collision::@1->play_collision::@2#2] -- register_copy jmp __b2 // play_collision::@2 __b2: - // [209] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 -- vbuz1=_inc_vbuz2 + // [207] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 -- vbuz1=_inc_vbuz2 ldy.z i_1 iny sty.z i - // [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z i_1 lda (piece_gfx),y cmp #0 @@ -13177,109 +13155,109 @@ play_collision: { jmp __b7 // play_collision::@7 __b7: - // [211] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -- vbuz1_lt_vbuc1_then_la1 + // [209] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -- vbuz1_lt_vbuc1_then_la1 lda.z yp cmp #PLAYFIELD_LINES bcc __b4 - // [216] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return] + // [214] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return] __breturn_from___b7: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM [phi:play_collision::@7->play_collision::@return#0] -- vbuz1=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM [phi:play_collision::@7->play_collision::@return#0] -- vbuz1=vbuc1 lda #COLLISION_BOTTOM sta.z return_5 jmp __breturn // play_collision::@4 __b4: - // [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 + // [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and.z xp sta.z __5 - // [213] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -- vbuz1_eq_0_then_la1 + // [211] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -- vbuz1_eq_0_then_la1 lda.z __5 cmp #0 beq __b5 - // [216] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return] + // [214] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return] __breturn_from___b4: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT [phi:play_collision::@4->play_collision::@return#0] -- vbuz1=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT [phi:play_collision::@4->play_collision::@return#0] -- vbuz1=vbuc1 lda #COLLISION_LEFT sta.z return_5 jmp __breturn // play_collision::@5 __b5: - // [214] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1 + // [212] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1 lda.z xp cmp #PLAYFIELD_COLS bcc __b6 - // [216] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return] + // [214] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return] __breturn_from___b5: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT [phi:play_collision::@5->play_collision::@return#0] -- vbuz1=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT [phi:play_collision::@5->play_collision::@return#0] -- vbuz1=vbuc1 lda #COLLISION_RIGHT sta.z return_5 jmp __breturn // play_collision::@6 __b6: - // [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z xp lda (playfield_line),y cmp #0 beq __b3 - // [216] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return] + // [214] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return] __breturn_from___b6: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD [phi:play_collision::@6->play_collision::@return#0] -- vbuz1=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD [phi:play_collision::@6->play_collision::@return#0] -- vbuz1=vbuc1 lda #COLLISION_PLAYFIELD sta.z return_5 jmp __breturn // play_collision::@return __breturn: - // [217] return + // [215] return rts // play_collision::@3 __b3: - // [218] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 -- vbuz1=_inc_vbuz1 + // [216] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 -- vbuz1=_inc_vbuz1 inc.z xp - // [219] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 -- vbuz1=_inc_vbuz1 + // [217] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [220] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 -- vbuz1_neq_vbuc1_then_la1 + // [218] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z c bne __b10 jmp __b8 // play_collision::@8 __b8: - // [221] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 -- vbuz1=_inc_vbuz1 + // [219] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 -- vbuz1=_inc_vbuz1 inc.z yp - // [222] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 -- vbuz1=_inc_vbuz1 + // [220] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 -- vbuz1=_inc_vbuz1 inc.z l - // [223] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 -- vbuz1_neq_vbuc1_then_la1 + // [221] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b9 - // [216] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return] + // [214] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return] __breturn_from___b8: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE [phi:play_collision::@8->play_collision::@return#0] -- vbuz1=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE [phi:play_collision::@8->play_collision::@return#0] -- vbuz1=vbuc1 lda #COLLISION_NONE sta.z return_5 jmp __breturn // play_collision::@9 __b9: - // [224] (byte) play_collision::i#10 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 + // [222] (byte) play_collision::i#10 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [204] phi from play_collision::@9 to play_collision::@1 [phi:play_collision::@9->play_collision::@1] + // [202] phi from play_collision::@9 to play_collision::@1 [phi:play_collision::@9->play_collision::@1] __b1_from___b9: - // [204] phi (byte) play_collision::l#6 = (byte) play_collision::l#1 [phi:play_collision::@9->play_collision::@1#0] -- register_copy - // [204] phi (byte) play_collision::i#3 = (byte) play_collision::i#10 [phi:play_collision::@9->play_collision::@1#1] -- register_copy - // [204] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#1 [phi:play_collision::@9->play_collision::@1#2] -- register_copy + // [202] phi (byte) play_collision::l#6 = (byte) play_collision::l#1 [phi:play_collision::@9->play_collision::@1#0] -- register_copy + // [202] phi (byte) play_collision::i#3 = (byte) play_collision::i#10 [phi:play_collision::@9->play_collision::@1#1] -- register_copy + // [202] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#1 [phi:play_collision::@9->play_collision::@1#2] -- register_copy jmp __b1 // play_collision::@10 __b10: - // [225] (byte) play_collision::i#12 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 + // [223] (byte) play_collision::i#12 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [208] phi from play_collision::@10 to play_collision::@2 [phi:play_collision::@10->play_collision::@2] + // [206] phi from play_collision::@10 to play_collision::@2 [phi:play_collision::@10->play_collision::@2] __b2_from___b10: - // [208] phi (byte) play_collision::c#2 = (byte) play_collision::c#1 [phi:play_collision::@10->play_collision::@2#0] -- register_copy - // [208] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#1 [phi:play_collision::@10->play_collision::@2#1] -- register_copy - // [208] phi (byte) play_collision::i#2 = (byte) play_collision::i#12 [phi:play_collision::@10->play_collision::@2#2] -- register_copy + // [206] phi (byte) play_collision::c#2 = (byte) play_collision::c#1 [phi:play_collision::@10->play_collision::@2#0] -- register_copy + // [206] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#1 [phi:play_collision::@10->play_collision::@2#1] -- register_copy + // [206] phi (byte) play_collision::i#2 = (byte) play_collision::i#12 [phi:play_collision::@10->play_collision::@2#2] -- register_copy jmp __b2 } // play_move_leftright @@ -13292,7 +13270,7 @@ play_move_leftright: { .label key_event = $8e .label return = $8f .label return_1 = $35 - // [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -- vbuz1_eq_vbuc1_then_la1 + // [224] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -- vbuz1_eq_vbuc1_then_la1 // Handle keyboard events lda #KEY_COMMA cmp.z key_event @@ -13300,117 +13278,117 @@ play_move_leftright: { jmp __b2 // play_move_leftright::@2 __b2: - // [227] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return -- vbuz1_neq_vbuc1_then_la1 + // [225] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return -- vbuz1_neq_vbuc1_then_la1 lda #KEY_DOT cmp.z key_event bne __breturn_from___b2 jmp __b3 // play_move_leftright::@3 __b3: - // [228] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [226] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z current_xpos iny sty.z play_collision.xpos - // [229] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [227] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [230] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 -- vbuz1=vbuz2 + // [228] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 -- vbuz1=vbuz2 lda.z current_orientation sta.z play_collision.orientation - // [231] (byte*) current_piece#97 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [229] (byte*) current_piece#97 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [232] call play_collision - // [202] phi from play_move_leftright::@3 to play_collision [phi:play_move_leftright::@3->play_collision] + // [230] call play_collision + // [200] phi from play_move_leftright::@3 to play_collision [phi:play_move_leftright::@3->play_collision] play_collision_from___b3: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#2 [phi:play_move_leftright::@3->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#2 [phi:play_move_leftright::@3->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#2 [phi:play_move_leftright::@3->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#97 [phi:play_move_leftright::@3->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#2 [phi:play_move_leftright::@3->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#2 [phi:play_move_leftright::@3->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#2 [phi:play_move_leftright::@3->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#97 [phi:play_move_leftright::@3->play_collision#3] -- register_copy jsr play_collision - // [233] (byte) play_collision::return#13 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 + // [231] (byte) play_collision::return#13 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 lda.z play_collision.return_5 sta.z play_collision.return_3 jmp __b7 // play_move_leftright::@7 __b7: - // [234] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 -- vbuz1=vbuz2 + // [232] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 -- vbuz1=vbuz2 lda.z play_collision.return_3 sta.z __4 - // [235] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuz1_neq_vbuc1_then_la1 + // [233] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuz1_neq_vbuc1_then_la1 lda #COLLISION_NONE cmp.z __4 bne __breturn_from___b7 jmp __b4 // play_move_leftright::@4 __b4: - // [236] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 -- vbuz1=_inc_vbuz1 + // [234] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 -- vbuz1=_inc_vbuz1 inc.z current_xpos - // [237] phi from play_move_leftright::@4 play_move_leftright::@5 to play_move_leftright::@return [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return] + // [235] phi from play_move_leftright::@4 play_move_leftright::@5 to play_move_leftright::@return [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return] __breturn_from___b4: __breturn_from___b5: - // [237] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy - // [237] phi (byte) play_move_leftright::return#2 = (byte) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuz1=vbuc1 + // [235] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy + // [235] phi (byte) play_move_leftright::return#2 = (byte) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuz1=vbuc1 lda #1 sta.z return_1 jmp __breturn - // [237] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return] + // [235] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return] __breturn_from___b2: __breturn_from___b6: __breturn_from___b7: - // [237] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy - // [237] phi (byte) play_move_leftright::return#2 = (byte) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuz1=vbuc1 + // [235] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy + // [235] phi (byte) play_move_leftright::return#2 = (byte) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuz1=vbuc1 lda #0 sta.z return_1 jmp __breturn // play_move_leftright::@return __breturn: - // [238] return + // [236] return rts // play_move_leftright::@1 __b1: - // [239] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 -- vbuz1=vbuz2_minus_1 + // [237] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 -- vbuz1=vbuz2_minus_1 ldx.z current_xpos dex stx.z play_collision.xpos - // [240] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [238] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [241] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 -- vbuz1=vbuz2 + // [239] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 -- vbuz1=vbuz2 lda.z current_orientation sta.z play_collision.orientation - // [242] (byte*) current_piece#96 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [240] (byte*) current_piece#96 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [243] call play_collision - // [202] phi from play_move_leftright::@1 to play_collision [phi:play_move_leftright::@1->play_collision] + // [241] call play_collision + // [200] phi from play_move_leftright::@1 to play_collision [phi:play_move_leftright::@1->play_collision] play_collision_from___b1: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#1 [phi:play_move_leftright::@1->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#1 [phi:play_move_leftright::@1->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#1 [phi:play_move_leftright::@1->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#96 [phi:play_move_leftright::@1->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#1 [phi:play_move_leftright::@1->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#1 [phi:play_move_leftright::@1->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#1 [phi:play_move_leftright::@1->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#96 [phi:play_move_leftright::@1->play_collision#3] -- register_copy jsr play_collision - // [244] (byte) play_collision::return#1 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 + // [242] (byte) play_collision::return#1 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 lda.z play_collision.return_5 sta.z play_collision.return_1 jmp __b6 // play_move_leftright::@6 __b6: - // [245] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 -- vbuz1=vbuz2 + // [243] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 -- vbuz1=vbuz2 lda.z play_collision.return_1 sta.z __8 - // [246] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuz1_neq_vbuc1_then_la1 + // [244] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuz1_neq_vbuc1_then_la1 lda #COLLISION_NONE cmp.z __8 bne __breturn_from___b6 jmp __b5 // play_move_leftright::@5 __b5: - // [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 -- vbuz1=_dec_vbuz1 + // [245] (byte) current_xpos#8 ← -- (byte) current_xpos#22 -- vbuz1=_dec_vbuz1 dec.z current_xpos jmp __breturn_from___b5 } @@ -13426,267 +13404,267 @@ play_move_down: { .label movedown = $36 .label removed = $a9 .label return_1 = $44 - // [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 -- vbuz1=_inc_vbuz1 + // [246] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 -- vbuz1=_inc_vbuz1 inc.z current_movedown_counter - // [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -- vbuz1_neq_vbuc1_then_la1 + // [247] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -- vbuz1_neq_vbuc1_then_la1 lda #KEY_SPACE cmp.z key_event bne __b1_from_play_move_down - // [250] phi from play_move_down to play_move_down::@4 [phi:play_move_down->play_move_down::@4] + // [248] phi from play_move_down to play_move_down::@4 [phi:play_move_down->play_move_down::@4] __b4_from_play_move_down: jmp __b4 // play_move_down::@4 __b4: - // [251] phi from play_move_down::@4 to play_move_down::@1 [phi:play_move_down::@4->play_move_down::@1] + // [249] phi from play_move_down::@4 to play_move_down::@1 [phi:play_move_down::@4->play_move_down::@1] __b1_from___b4: - // [251] phi (byte) play_move_down::movedown#10 = (byte) 1 [phi:play_move_down::@4->play_move_down::@1#0] -- vbuz1=vbuc1 + // [249] phi (byte) play_move_down::movedown#10 = (byte) 1 [phi:play_move_down::@4->play_move_down::@1#0] -- vbuz1=vbuc1 lda #1 sta.z movedown jmp __b1 - // [251] phi from play_move_down to play_move_down::@1 [phi:play_move_down->play_move_down::@1] + // [249] phi from play_move_down to play_move_down::@1 [phi:play_move_down->play_move_down::@1] __b1_from_play_move_down: - // [251] phi (byte) play_move_down::movedown#10 = (byte) 0 [phi:play_move_down->play_move_down::@1#0] -- vbuz1=vbuc1 + // [249] phi (byte) play_move_down::movedown#10 = (byte) 0 [phi:play_move_down->play_move_down::@1#0] -- vbuz1=vbuc1 lda #0 sta.z movedown jmp __b1 // play_move_down::@1 __b1: - // [252] call keyboard_event_pressed - // [381] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] + // [250] call keyboard_event_pressed + // [379] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] keyboard_event_pressed_from___b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_SPACE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [253] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [251] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_4 sta.z keyboard_event_pressed.return_5 jmp __b12 // play_move_down::@12 __b12: - // [254] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 -- vbuz1=vbuz2 + // [252] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_5 sta.z __2 - // [255] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -- vbuz1_eq_0_then_la1 + // [253] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -- vbuz1_eq_0_then_la1 lda.z __2 cmp #0 beq __b2_from___b12 jmp __b5 // play_move_down::@5 __b5: - // [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -- vbuz1_lt_vbuc1_then_la1 + // [254] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z current_movedown_counter cmp #current_movedown_fast bcc __b2_from___b5 jmp __b6 // play_move_down::@6 __b6: - // [257] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 -- vbuz1=_inc_vbuz1 + // [255] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 -- vbuz1=_inc_vbuz1 inc.z movedown - // [258] phi from play_move_down::@12 play_move_down::@5 play_move_down::@6 to play_move_down::@2 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2] + // [256] phi from play_move_down::@12 play_move_down::@5 play_move_down::@6 to play_move_down::@2 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2] __b2_from___b12: __b2_from___b5: __b2_from___b6: - // [258] phi (byte) play_move_down::movedown#7 = (byte) play_move_down::movedown#10 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2#0] -- register_copy + // [256] phi (byte) play_move_down::movedown#7 = (byte) play_move_down::movedown#10 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2#0] -- register_copy jmp __b2 // play_move_down::@2 __b2: - // [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -- vbuz1_lt_vbuz2_then_la1 + // [257] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -- vbuz1_lt_vbuz2_then_la1 lda.z current_movedown_counter cmp.z current_movedown_slow bcc __b3_from___b2 jmp __b7 // play_move_down::@7 __b7: - // [260] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 -- vbuz1=_inc_vbuz1 + // [258] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 -- vbuz1=_inc_vbuz1 inc.z movedown - // [261] phi from play_move_down::@2 play_move_down::@7 to play_move_down::@3 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3] + // [259] phi from play_move_down::@2 play_move_down::@7 to play_move_down::@3 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3] __b3_from___b2: __b3_from___b7: - // [261] phi (byte) play_move_down::movedown#6 = (byte) play_move_down::movedown#7 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3#0] -- register_copy + // [259] phi (byte) play_move_down::movedown#6 = (byte) play_move_down::movedown#7 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3#0] -- register_copy jmp __b3 // play_move_down::@3 __b3: - // [262] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return -- vbuz1_eq_0_then_la1 + // [260] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return -- vbuz1_eq_0_then_la1 lda.z movedown cmp #0 beq __breturn_from___b3 jmp __b8 // play_move_down::@8 __b8: - // [263] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [261] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z current_ypos iny sty.z play_collision.ypos - // [264] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [262] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [265] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 -- vbuz1=vbuz2 + // [263] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 -- vbuz1=vbuz2 lda.z current_orientation sta.z play_collision.orientation - // [266] (byte*) current_piece#95 ← (byte*) current_piece#10 -- pbuz1=pbuz2 + // [264] (byte*) current_piece#95 ← (byte*) current_piece#10 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [267] call play_collision - // [202] phi from play_move_down::@8 to play_collision [phi:play_move_down::@8->play_collision] + // [265] call play_collision + // [200] phi from play_move_down::@8 to play_collision [phi:play_move_down::@8->play_collision] play_collision_from___b8: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#0 [phi:play_move_down::@8->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#0 [phi:play_move_down::@8->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#0 [phi:play_move_down::@8->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#95 [phi:play_move_down::@8->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#0 [phi:play_move_down::@8->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#0 [phi:play_move_down::@8->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#0 [phi:play_move_down::@8->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#95 [phi:play_move_down::@8->play_collision#3] -- register_copy jsr play_collision - // [268] (byte) play_collision::return#0 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 + // [266] (byte) play_collision::return#0 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 lda.z play_collision.return_5 sta.z play_collision.return jmp __b13 // play_move_down::@13 __b13: - // [269] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 -- vbuz1=vbuz2 + // [267] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 -- vbuz1=vbuz2 lda.z play_collision.return sta.z __12 - // [270] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 -- vbuz1_eq_vbuc1_then_la1 + // [268] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 -- vbuz1_eq_vbuc1_then_la1 lda #COLLISION_NONE cmp.z __12 beq __b10 - // [271] phi from play_move_down::@13 to play_move_down::@9 [phi:play_move_down::@13->play_move_down::@9] + // [269] phi from play_move_down::@13 to play_move_down::@9 [phi:play_move_down::@13->play_move_down::@9] __b9_from___b13: jmp __b9 // play_move_down::@9 __b9: - // [272] call play_lock_current + // [270] call play_lock_current jsr play_lock_current - // [273] phi from play_move_down::@9 to play_move_down::@14 [phi:play_move_down::@9->play_move_down::@14] + // [271] phi from play_move_down::@9 to play_move_down::@14 [phi:play_move_down::@9->play_move_down::@14] __b14_from___b9: jmp __b14 // play_move_down::@14 __b14: - // [274] call play_remove_lines - // [340] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] + // [272] call play_remove_lines + // [338] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] play_remove_lines_from___b14: jsr play_remove_lines - // [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuz1=vbuz2 + // [273] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuz1=vbuz2 lda.z play_remove_lines.removed sta.z play_remove_lines.return jmp __b15 // play_move_down::@15 __b15: - // [276] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 -- vbuz1=vbuz2 + // [274] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 -- vbuz1=vbuz2 lda.z play_remove_lines.return sta.z removed - // [277] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 -- vbuz1=vbuz2 + // [275] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 -- vbuz1=vbuz2 lda.z removed sta.z play_update_score.removed - // [278] call play_update_score + // [276] call play_update_score jsr play_update_score - // [279] phi from play_move_down::@15 to play_move_down::@16 [phi:play_move_down::@15->play_move_down::@16] + // [277] phi from play_move_down::@15 to play_move_down::@16 [phi:play_move_down::@15->play_move_down::@16] __b16_from___b15: jmp __b16 // play_move_down::@16 __b16: - // [280] call play_spawn_current - // [287] phi from play_move_down::@16 to play_spawn_current [phi:play_move_down::@16->play_spawn_current] + // [278] call play_spawn_current + // [285] phi from play_move_down::@16 to play_spawn_current [phi:play_move_down::@16->play_spawn_current] play_spawn_current_from___b16: - // [287] phi (byte) game_over#65 = (byte) game_over#10 [phi:play_move_down::@16->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) next_piece_idx#10 [phi:play_move_down::@16->play_spawn_current#1] -- register_copy + // [285] phi (byte) game_over#65 = (byte) game_over#10 [phi:play_move_down::@16->play_spawn_current#0] -- register_copy + // [285] phi (byte) next_piece_idx#17 = (byte) next_piece_idx#10 [phi:play_move_down::@16->play_spawn_current#1] -- register_copy jsr play_spawn_current jmp __b17 // play_move_down::@17 __b17: - // [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece lda PIECES+1,y sta.z current_piece+1 - // [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx lda PIECES+1,y sta.z current_piece_gfx+1 - // [283] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] + // [281] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] __b11_from___b17: - // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy - // [283] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy - // [283] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy - // [283] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#116 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy - // [283] phi (byte) current_orientation#37 = (byte) 0 [phi:play_move_down::@17->play_move_down::@11#4] -- vbuz1=vbuc1 + // [281] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy + // [281] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy + // [281] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy + // [281] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#116 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy + // [281] phi (byte) current_orientation#37 = (byte) 0 [phi:play_move_down::@17->play_move_down::@11#4] -- vbuz1=vbuc1 lda #0 sta.z current_orientation - // [283] phi (byte) current_piece_char#29 = (byte) current_piece_char#5 [phi:play_move_down::@17->play_move_down::@11#5] -- register_copy - // [283] phi (byte*) current_piece#28 = (byte*) current_piece#92 [phi:play_move_down::@17->play_move_down::@11#6] -- register_copy - // [283] phi (byte) level_bcd#31 = (byte) level_bcd#19 [phi:play_move_down::@17->play_move_down::@11#7] -- register_copy - // [283] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#23 [phi:play_move_down::@17->play_move_down::@11#8] -- register_copy - // [283] phi (byte) level#33 = (byte) level#19 [phi:play_move_down::@17->play_move_down::@11#9] -- register_copy - // [283] phi (word) lines_bcd#26 = (word) lines_bcd#17 [phi:play_move_down::@17->play_move_down::@11#10] -- register_copy - // [283] phi (byte) current_ypos#38 = (byte) current_ypos#6 [phi:play_move_down::@17->play_move_down::@11#11] -- register_copy + // [281] phi (byte) current_piece_char#29 = (byte) current_piece_char#5 [phi:play_move_down::@17->play_move_down::@11#5] -- register_copy + // [281] phi (byte*) current_piece#28 = (byte*) current_piece#92 [phi:play_move_down::@17->play_move_down::@11#6] -- register_copy + // [281] phi (byte) level_bcd#31 = (byte) level_bcd#19 [phi:play_move_down::@17->play_move_down::@11#7] -- register_copy + // [281] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#23 [phi:play_move_down::@17->play_move_down::@11#8] -- register_copy + // [281] phi (byte) level#33 = (byte) level#19 [phi:play_move_down::@17->play_move_down::@11#9] -- register_copy + // [281] phi (word) lines_bcd#26 = (word) lines_bcd#17 [phi:play_move_down::@17->play_move_down::@11#10] -- register_copy + // [281] phi (byte) current_ypos#38 = (byte) current_ypos#6 [phi:play_move_down::@17->play_move_down::@11#11] -- register_copy jmp __b11 // play_move_down::@11 __b11: - // [284] phi from play_move_down::@11 to play_move_down::@return [phi:play_move_down::@11->play_move_down::@return] + // [282] phi from play_move_down::@11 to play_move_down::@return [phi:play_move_down::@11->play_move_down::@return] __breturn_from___b11: - // [284] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#30 [phi:play_move_down::@11->play_move_down::@return#0] -- register_copy - // [284] phi (byte) game_over#15 = (byte) game_over#27 [phi:play_move_down::@11->play_move_down::@return#1] -- register_copy - // [284] phi (byte) current_xpos#22 = (byte) current_xpos#43 [phi:play_move_down::@11->play_move_down::@return#2] -- register_copy - // [284] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#35 [phi:play_move_down::@11->play_move_down::@return#3] -- register_copy - // [284] phi (byte) current_orientation#20 = (byte) current_orientation#37 [phi:play_move_down::@11->play_move_down::@return#4] -- register_copy - // [284] phi (byte) current_piece_char#16 = (byte) current_piece_char#29 [phi:play_move_down::@11->play_move_down::@return#5] -- register_copy - // [284] phi (byte*) current_piece#15 = (byte*) current_piece#28 [phi:play_move_down::@11->play_move_down::@return#6] -- register_copy - // [284] phi (byte) level_bcd#17 = (byte) level_bcd#31 [phi:play_move_down::@11->play_move_down::@return#7] -- register_copy - // [284] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#37 [phi:play_move_down::@11->play_move_down::@return#8] -- register_copy - // [284] phi (byte) level#17 = (byte) level#33 [phi:play_move_down::@11->play_move_down::@return#9] -- register_copy - // [284] phi (word) lines_bcd#15 = (word) lines_bcd#26 [phi:play_move_down::@11->play_move_down::@return#10] -- register_copy - // [284] phi (byte) current_ypos#19 = (byte) current_ypos#38 [phi:play_move_down::@11->play_move_down::@return#11] -- register_copy - // [284] phi (byte) current_movedown_counter#14 = (byte) 0 [phi:play_move_down::@11->play_move_down::@return#12] -- vbuz1=vbuc1 + // [282] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#30 [phi:play_move_down::@11->play_move_down::@return#0] -- register_copy + // [282] phi (byte) game_over#15 = (byte) game_over#27 [phi:play_move_down::@11->play_move_down::@return#1] -- register_copy + // [282] phi (byte) current_xpos#22 = (byte) current_xpos#43 [phi:play_move_down::@11->play_move_down::@return#2] -- register_copy + // [282] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#35 [phi:play_move_down::@11->play_move_down::@return#3] -- register_copy + // [282] phi (byte) current_orientation#20 = (byte) current_orientation#37 [phi:play_move_down::@11->play_move_down::@return#4] -- register_copy + // [282] phi (byte) current_piece_char#16 = (byte) current_piece_char#29 [phi:play_move_down::@11->play_move_down::@return#5] -- register_copy + // [282] phi (byte*) current_piece#15 = (byte*) current_piece#28 [phi:play_move_down::@11->play_move_down::@return#6] -- register_copy + // [282] phi (byte) level_bcd#17 = (byte) level_bcd#31 [phi:play_move_down::@11->play_move_down::@return#7] -- register_copy + // [282] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#37 [phi:play_move_down::@11->play_move_down::@return#8] -- register_copy + // [282] phi (byte) level#17 = (byte) level#33 [phi:play_move_down::@11->play_move_down::@return#9] -- register_copy + // [282] phi (word) lines_bcd#15 = (word) lines_bcd#26 [phi:play_move_down::@11->play_move_down::@return#10] -- register_copy + // [282] phi (byte) current_ypos#19 = (byte) current_ypos#38 [phi:play_move_down::@11->play_move_down::@return#11] -- register_copy + // [282] phi (byte) current_movedown_counter#14 = (byte) 0 [phi:play_move_down::@11->play_move_down::@return#12] -- vbuz1=vbuc1 lda #0 sta.z current_movedown_counter - // [284] phi (byte) play_move_down::return#3 = (byte) 1 [phi:play_move_down::@11->play_move_down::@return#13] -- vbuz1=vbuc1 + // [282] phi (byte) play_move_down::return#3 = (byte) 1 [phi:play_move_down::@11->play_move_down::@return#13] -- vbuz1=vbuc1 lda #1 sta.z return_1 jmp __breturn - // [284] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return] + // [282] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return] __breturn_from___b3: - // [284] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy - // [284] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy - // [284] phi (byte) current_xpos#22 = (byte) current_xpos#14 [phi:play_move_down::@3->play_move_down::@return#2] -- register_copy - // [284] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#13 [phi:play_move_down::@3->play_move_down::@return#3] -- register_copy - // [284] phi (byte) current_orientation#20 = (byte) current_orientation#13 [phi:play_move_down::@3->play_move_down::@return#4] -- register_copy - // [284] phi (byte) current_piece_char#16 = (byte) current_piece_char#10 [phi:play_move_down::@3->play_move_down::@return#5] -- register_copy - // [284] phi (byte*) current_piece#15 = (byte*) current_piece#10 [phi:play_move_down::@3->play_move_down::@return#6] -- register_copy - // [284] phi (byte) level_bcd#17 = (byte) level_bcd#11 [phi:play_move_down::@3->play_move_down::@return#7] -- register_copy - // [284] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#14 [phi:play_move_down::@3->play_move_down::@return#8] -- register_copy - // [284] phi (byte) level#17 = (byte) level#10 [phi:play_move_down::@3->play_move_down::@return#9] -- register_copy - // [284] phi (word) lines_bcd#15 = (word) lines_bcd#19 [phi:play_move_down::@3->play_move_down::@return#10] -- register_copy - // [284] phi (byte) current_ypos#19 = (byte) current_ypos#11 [phi:play_move_down::@3->play_move_down::@return#11] -- register_copy - // [284] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#12] -- register_copy - // [284] phi (byte) play_move_down::return#3 = (byte) 0 [phi:play_move_down::@3->play_move_down::@return#13] -- vbuz1=vbuc1 + // [282] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy + // [282] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy + // [282] phi (byte) current_xpos#22 = (byte) current_xpos#14 [phi:play_move_down::@3->play_move_down::@return#2] -- register_copy + // [282] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#13 [phi:play_move_down::@3->play_move_down::@return#3] -- register_copy + // [282] phi (byte) current_orientation#20 = (byte) current_orientation#13 [phi:play_move_down::@3->play_move_down::@return#4] -- register_copy + // [282] phi (byte) current_piece_char#16 = (byte) current_piece_char#10 [phi:play_move_down::@3->play_move_down::@return#5] -- register_copy + // [282] phi (byte*) current_piece#15 = (byte*) current_piece#10 [phi:play_move_down::@3->play_move_down::@return#6] -- register_copy + // [282] phi (byte) level_bcd#17 = (byte) level_bcd#11 [phi:play_move_down::@3->play_move_down::@return#7] -- register_copy + // [282] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#14 [phi:play_move_down::@3->play_move_down::@return#8] -- register_copy + // [282] phi (byte) level#17 = (byte) level#10 [phi:play_move_down::@3->play_move_down::@return#9] -- register_copy + // [282] phi (word) lines_bcd#15 = (word) lines_bcd#19 [phi:play_move_down::@3->play_move_down::@return#10] -- register_copy + // [282] phi (byte) current_ypos#19 = (byte) current_ypos#11 [phi:play_move_down::@3->play_move_down::@return#11] -- register_copy + // [282] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#12] -- register_copy + // [282] phi (byte) play_move_down::return#3 = (byte) 0 [phi:play_move_down::@3->play_move_down::@return#13] -- vbuz1=vbuc1 lda #0 sta.z return_1 jmp __breturn // play_move_down::@return __breturn: - // [285] return + // [283] return rts // play_move_down::@10 __b10: - // [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 -- vbuz1=_inc_vbuz1 + // [284] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 -- vbuz1=_inc_vbuz1 inc.z current_ypos - // [283] phi from play_move_down::@10 to play_move_down::@11 [phi:play_move_down::@10->play_move_down::@11] + // [281] phi from play_move_down::@10 to play_move_down::@11 [phi:play_move_down::@10->play_move_down::@11] __b11_from___b10: - // [283] phi (byte) next_piece_idx#30 = (byte) next_piece_idx#10 [phi:play_move_down::@10->play_move_down::@11#0] -- register_copy - // [283] phi (byte) game_over#27 = (byte) game_over#10 [phi:play_move_down::@10->play_move_down::@11#1] -- register_copy - // [283] phi (byte) current_xpos#43 = (byte) current_xpos#14 [phi:play_move_down::@10->play_move_down::@11#2] -- register_copy - // [283] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#13 [phi:play_move_down::@10->play_move_down::@11#3] -- register_copy - // [283] phi (byte) current_orientation#37 = (byte) current_orientation#13 [phi:play_move_down::@10->play_move_down::@11#4] -- register_copy - // [283] phi (byte) current_piece_char#29 = (byte) current_piece_char#10 [phi:play_move_down::@10->play_move_down::@11#5] -- register_copy - // [283] phi (byte*) current_piece#28 = (byte*) current_piece#10 [phi:play_move_down::@10->play_move_down::@11#6] -- register_copy - // [283] phi (byte) level_bcd#31 = (byte) level_bcd#11 [phi:play_move_down::@10->play_move_down::@11#7] -- register_copy - // [283] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#14 [phi:play_move_down::@10->play_move_down::@11#8] -- register_copy - // [283] phi (byte) level#33 = (byte) level#10 [phi:play_move_down::@10->play_move_down::@11#9] -- register_copy - // [283] phi (word) lines_bcd#26 = (word) lines_bcd#19 [phi:play_move_down::@10->play_move_down::@11#10] -- register_copy - // [283] phi (byte) current_ypos#38 = (byte) current_ypos#3 [phi:play_move_down::@10->play_move_down::@11#11] -- register_copy + // [281] phi (byte) next_piece_idx#30 = (byte) next_piece_idx#10 [phi:play_move_down::@10->play_move_down::@11#0] -- register_copy + // [281] phi (byte) game_over#27 = (byte) game_over#10 [phi:play_move_down::@10->play_move_down::@11#1] -- register_copy + // [281] phi (byte) current_xpos#43 = (byte) current_xpos#14 [phi:play_move_down::@10->play_move_down::@11#2] -- register_copy + // [281] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#13 [phi:play_move_down::@10->play_move_down::@11#3] -- register_copy + // [281] phi (byte) current_orientation#37 = (byte) current_orientation#13 [phi:play_move_down::@10->play_move_down::@11#4] -- register_copy + // [281] phi (byte) current_piece_char#29 = (byte) current_piece_char#10 [phi:play_move_down::@10->play_move_down::@11#5] -- register_copy + // [281] phi (byte*) current_piece#28 = (byte*) current_piece#10 [phi:play_move_down::@10->play_move_down::@11#6] -- register_copy + // [281] phi (byte) level_bcd#31 = (byte) level_bcd#11 [phi:play_move_down::@10->play_move_down::@11#7] -- register_copy + // [281] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#14 [phi:play_move_down::@10->play_move_down::@11#8] -- register_copy + // [281] phi (byte) level#33 = (byte) level#10 [phi:play_move_down::@10->play_move_down::@11#9] -- register_copy + // [281] phi (word) lines_bcd#26 = (word) lines_bcd#19 [phi:play_move_down::@10->play_move_down::@11#10] -- register_copy + // [281] phi (byte) current_ypos#38 = (byte) current_ypos#3 [phi:play_move_down::@10->play_move_down::@11#11] -- register_copy jmp __b11 } // play_spawn_current @@ -13700,110 +13678,110 @@ play_spawn_current: { // Spawn a new next piece // Pick a random piece (0-6) .label piece_idx = $45 - // [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 -- vbuz1=vbuz2 + // [286] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 -- vbuz1=vbuz2 // Move next piece into current lda.z next_piece_idx sta.z current_piece_idx - // [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z current_piece_idx asl sta.z __7 - // [290] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [288] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z current_piece_idx lda PIECES_CHARS,y sta.z current_piece_char - // [291] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [289] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z current_piece_idx lda PIECES_START_X,y sta.z current_xpos - // [292] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [290] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z current_piece_idx lda PIECES_START_Y,y sta.z current_ypos - // [293] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 -- vbuz1=vbuz2 + // [291] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [294] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 -- vbuz1=vbuz2 + // [292] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __7 lda PIECES,y sta.z current_piece_1 lda PIECES+1,y sta.z current_piece_1+1 - // [296] call play_collision - // [202] phi from play_spawn_current to play_collision [phi:play_spawn_current->play_collision] + // [294] call play_collision + // [200] phi from play_spawn_current to play_collision [phi:play_spawn_current->play_collision] play_collision_from_play_spawn_current: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#4 [phi:play_spawn_current->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#4 [phi:play_spawn_current->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) 0 [phi:play_spawn_current->play_collision#2] -- vbuz1=vbuc1 + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#4 [phi:play_spawn_current->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#4 [phi:play_spawn_current->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) 0 [phi:play_spawn_current->play_collision#2] -- vbuz1=vbuc1 lda #0 sta.z play_collision.orientation - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#99 [phi:play_spawn_current->play_collision#3] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#99 [phi:play_spawn_current->play_collision#3] -- register_copy jsr play_collision - // [297] (byte) play_collision::return#10 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 + // [295] (byte) play_collision::return#10 ← (byte) play_collision::return#15 -- vbuz1=vbuz2 lda.z play_collision.return_5 sta.z play_collision.return_2 jmp __b4 // play_spawn_current::@4 __b4: - // [298] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 -- vbuz1=vbuz2 + // [296] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 -- vbuz1=vbuz2 lda.z play_collision.return_2 sta.z __1 - // [299] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 -- vbuz1_neq_vbuc1_then_la1 + // [297] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 -- vbuz1_neq_vbuc1_then_la1 lda #COLLISION_PLAYFIELD cmp.z __1 bne __b5_from___b4 - // [301] phi from play_spawn_current::@4 to play_spawn_current::@1 [phi:play_spawn_current::@4->play_spawn_current::@1] + // [299] phi from play_spawn_current::@4 to play_spawn_current::@1 [phi:play_spawn_current::@4->play_spawn_current::@1] __b1_from___b4: - // [301] phi (byte) game_over#52 = (byte) 1 [phi:play_spawn_current::@4->play_spawn_current::@1#0] -- vbuz1=vbuc1 + // [299] phi (byte) game_over#52 = (byte) 1 [phi:play_spawn_current::@4->play_spawn_current::@1#0] -- vbuz1=vbuc1 lda #1 sta.z game_over jmp __b1 - // [300] phi from play_spawn_current::@4 to play_spawn_current::@5 [phi:play_spawn_current::@4->play_spawn_current::@5] + // [298] phi from play_spawn_current::@4 to play_spawn_current::@5 [phi:play_spawn_current::@4->play_spawn_current::@5] __b5_from___b4: jmp __b5 // play_spawn_current::@5 __b5: - // [301] phi from play_spawn_current::@5 to play_spawn_current::@1 [phi:play_spawn_current::@5->play_spawn_current::@1] + // [299] phi from play_spawn_current::@5 to play_spawn_current::@1 [phi:play_spawn_current::@5->play_spawn_current::@1] __b1_from___b5: - // [301] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy + // [299] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy jmp __b1 // play_spawn_current::@1 __b1: - // [302] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] + // [300] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] __b2_from___b1: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 + // [300] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 lda #7 sta.z piece_idx jmp __b2 // play_spawn_current::@2 __b2: - // [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 + // [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 lda #7 cmp.z piece_idx beq sid_rnd1 jmp __breturn // play_spawn_current::@return __breturn: - // [304] return + // [302] return rts // play_spawn_current::sid_rnd1 sid_rnd1: - // [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) -- vbuz1=_deref_pbuc1 + // [303] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) -- vbuz1=_deref_pbuc1 lda SID_VOICE3_OSC sta.z sid_rnd1_return jmp __b3 // play_spawn_current::@3 __b3: - // [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z sid_rnd1_return sta.z piece_idx - // [302] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] + // [300] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] __b2_from___b3: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy + // [300] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy jmp __b2 } // play_update_score @@ -13817,26 +13795,26 @@ play_update_score: { .label lines_before = $b1 .label add_bcd = $b3 .label lines_after = $b8 - // [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuz1_eq_0_then_la1 + // [305] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuz1_eq_0_then_la1 lda.z removed cmp #0 beq __breturn_from_play_update_score jmp __b1 // play_update_score::@1 __b1: - // [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuz1=_lo_vwuz2 + // [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuz1=_lo_vwuz2 lda.z lines_bcd sta.z __2 - // [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 + // [307] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 lda #$f0 and.z __2 sta.z lines_before - // [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda.z removed asl asl sta.z __9 - // [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuz2 + // [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuz2 ldy.z __9 lda score_add_bcd,y sta.z add_bcd @@ -13848,7 +13826,7 @@ play_update_score: { sta.z add_bcd+3 // asm { sed } sed - // [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuz2 + // [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuz2 lda.z removed clc adc.z lines_bcd @@ -13856,7 +13834,7 @@ play_update_score: { bcc !+ inc.z lines_bcd+1 !: - // [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 + // [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 lda.z score_bcd clc adc.z add_bcd @@ -13872,36 +13850,36 @@ play_update_score: { sta.z score_bcd+3 // asm { cld } cld - // [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuz1=_lo_vwuz2 + // [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuz1=_lo_vwuz2 lda.z lines_bcd sta.z __4 - // [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 + // [315] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuz1=vbuz2_band_vbuc1 lda #$f0 and.z __4 sta.z lines_after - // [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuz2_then_la1 + // [316] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuz2_then_la1 lda.z lines_before cmp.z lines_after beq __breturn_from___b1 - // [319] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] + // [317] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] __b2_from___b1: jmp __b2 // play_update_score::@2 __b2: - // [320] call play_increase_level + // [318] call play_increase_level jsr play_increase_level - // [321] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] + // [319] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] __breturn_from_play_update_score: __breturn_from___b1: __breturn_from___b2: - // [321] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy - // [321] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy - // [321] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy - // [321] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy + // [319] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy + // [319] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy + // [319] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy + // [319] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy jmp __breturn // play_update_score::@return __breturn: - // [322] return + // [320] return rts } // play_increase_level @@ -13910,9 +13888,9 @@ play_increase_level: { .label __1 = $b9 .label __5 = $ba .label b = $47 - // [323] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 + // [321] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 inc.z level - // [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 + // [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 // Update speed of moving tetrominos down lda.z level cmp #$1d+1 @@ -13920,68 +13898,68 @@ play_increase_level: { jmp __b3 // play_increase_level::@3 __b3: - // [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 + // [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z level lda MOVEDOWN_SLOW_SPEEDS,y sta.z current_movedown_slow - // [326] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] + // [324] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] __b1_from___b3: - // [326] phi (byte) current_movedown_slow#65 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy + // [324] phi (byte) current_movedown_slow#65 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy jmp __b1 - // [326] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] + // [324] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] __b1_from_play_increase_level: - // [326] phi (byte) current_movedown_slow#65 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 + // [324] phi (byte) current_movedown_slow#65 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 lda #1 sta.z current_movedown_slow jmp __b1 // play_increase_level::@1 __b1: - // [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 + // [325] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 inc.z level_bcd - // [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + // [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 lda #$f and.z level_bcd sta.z __1 - // [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuz1_neq_vbuc1_then_la1 + // [327] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$a cmp.z __1 bne __b2_from___b1 jmp __b4 // play_increase_level::@4 __b4: - // [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 + // [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 // If level low nybble hits 0xa change to 0x10 lax.z level_bcd axs #-[6] stx.z level_bcd - // [331] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] + // [329] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] __b2_from___b1: __b2_from___b4: - // [331] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy + // [329] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy jmp __b2 // play_increase_level::@2 __b2: // asm { sed } // Increase the score values gained sed - // [333] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] + // [331] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] __b5_from___b2: - // [333] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuz1=vbuc1 + // [331] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuz1=vbuc1 lda #0 sta.z b jmp __b5 - // [333] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] + // [331] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] __b5_from___b5: - // [333] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy + // [331] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy jmp __b5 // play_increase_level::@5 __b5: - // [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda.z b asl asl sta.z __5 - // [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuz1=pduc1_derefidx_vbuz1_plus_pduc2_derefidx_vbuz1 + // [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuz1=pduc1_derefidx_vbuz1_plus_pduc2_derefidx_vbuz1 ldy.z __5 clc lda score_add_bcd,y @@ -13996,9 +13974,9 @@ play_increase_level: { lda score_add_bcd+3,y adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuz1=_inc_vbuz1 + // [334] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuz1=_inc_vbuz1 inc.z b - // [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuz1_neq_vbuc1_then_la1 + // [335] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp.z b bne __b5_from___b5 @@ -14010,7 +13988,7 @@ play_increase_level: { jmp __breturn // play_increase_level::@return __breturn: - // [339] return + // [337] return rts } // play_remove_lines @@ -14028,144 +14006,144 @@ play_remove_lines: { .label y = $48 .label removed = $49 .label full = $4c - // [341] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] + // [339] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] __b1_from_play_remove_lines: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 lda #0 sta.z removed - // [341] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 lda #0 sta.z y - // [341] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuz1=vbuc1 lda #PLAYFIELD_LINES*PLAYFIELD_COLS-1 sta.z w - // [341] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuz1=vbuc1 lda #PLAYFIELD_LINES*PLAYFIELD_COLS-1 sta.z r jmp __b1 // Read all lines and rewrite them - // [341] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] + // [339] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] __b1_from___b6: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy - // [341] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy - // [341] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy - // [341] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy + // [339] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy + // [339] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy + // [339] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy + // [339] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy jmp __b1 // play_remove_lines::@1 __b1: - // [342] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] + // [340] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] __b2_from___b1: - // [342] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 lda #1 sta.z full - // [342] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 lda #0 sta.z x - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy + // [340] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy jmp __b2 - // [342] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] + // [340] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] __b2_from___b3: - // [342] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy - // [342] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy + // [340] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy + // [340] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy + // [340] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy jmp __b2 // play_remove_lines::@2 __b2: - // [343] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuz2 + // [341] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z r lda playfield,y sta.z c - // [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuz1=_dec_vbuz1 + // [342] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuz1=_dec_vbuz1 dec.z r - // [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 + // [343] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 lda.z c cmp #0 bne __b9_from___b2 - // [347] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] + // [345] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] __b3_from___b2: - // [347] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 + // [345] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 lda #0 sta.z full jmp __b3 - // [346] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] + // [344] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] __b9_from___b2: jmp __b9 // play_remove_lines::@9 __b9: - // [347] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] + // [345] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] __b3_from___b9: - // [347] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy + // [345] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy jmp __b3 // play_remove_lines::@3 __b3: - // [348] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [346] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z c ldy.z w sta playfield,y - // [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuz1=_dec_vbuz1 + // [347] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuz1=_dec_vbuz1 dec.z w - // [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 + // [348] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 inc.z x - // [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 + // [349] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp.z x bne __b2_from___b3 jmp __b4 // play_remove_lines::@4 __b4: - // [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 + // [350] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 lda #1 cmp.z full bne __b6_from___b4 jmp __b5 // play_remove_lines::@5 __b5: - // [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 + // [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 lax.z w axs #-[PLAYFIELD_COLS] stx.z w - // [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 + // [352] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 inc.z removed - // [355] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] + // [353] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] __b6_from___b4: __b6_from___b5: - // [355] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy - // [355] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy + // [353] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy + // [353] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy jmp __b6 // play_remove_lines::@6 __b6: - // [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 + // [354] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 inc.z y - // [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 + // [355] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z y bne __b1_from___b6 - // [358] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] + // [356] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] __b7_from___b6: __b7_from___b8: - // [358] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy + // [356] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy jmp __b7 // Write zeros in the rest of the lines // play_remove_lines::@7 __b7: - // [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuz1_neq_vbuc1_then_la1 + // [357] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z w bne __b8 jmp __breturn // play_remove_lines::@return __breturn: - // [360] return + // [358] return rts // play_remove_lines::@8 __b8: - // [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + // [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 ldy.z w sta playfield,y - // [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuz1=_dec_vbuz1 + // [360] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuz1=_dec_vbuz1 dec.z w jmp __b7_from___b8 } @@ -14180,49 +14158,49 @@ play_lock_current: { .label c = $52 .label l = $4f .label i_1 = $50 - // [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 -- vbuz1=vbuz2 + // [361] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 -- vbuz1=vbuz2 lda.z current_ypos sta.z yp - // [364] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] + // [362] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] __b1_from_play_lock_current: - // [364] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 + // [362] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [364] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 + // [362] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i_1 - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy + // [362] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy jmp __b1 // play_lock_current::@1 __b1: - // [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z yp asl sta.z __4 - // [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuz2 + // [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __4 lda playfield_lines,y sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 - // [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [365] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda.z current_xpos sta.z xp - // [368] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] + // [366] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] __b2_from___b1: - // [368] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuz1=vbuc1 + // [366] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy + // [366] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy + // [366] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy jmp __b2 // play_lock_current::@2 __b2: - // [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 + // [367] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 ldy.z i_1 iny sty.z i - // [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z i_1 lda (current_piece_gfx),y cmp #0 @@ -14230,58 +14208,58 @@ play_lock_current: { jmp __b4 // play_lock_current::@4 __b4: - // [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 + // [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z current_piece_char ldy.z xp sta (playfield_line),y jmp __b3 // play_lock_current::@3 __b3: - // [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 + // [370] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 inc.z xp - // [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuz1=_inc_vbuz1 + // [371] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuz1_neq_vbuc1_then_la1 + // [372] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z c bne __b7 jmp __b5 // play_lock_current::@5 __b5: - // [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 + // [373] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 inc.z yp - // [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 + // [374] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 inc.z l - // [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 + // [375] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b6 jmp __breturn // play_lock_current::@return __breturn: - // [378] return + // [376] return rts // play_lock_current::@6 __b6: - // [379] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [377] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [364] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] + // [362] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] __b1_from___b6: - // [364] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy - // [364] phi (byte) play_lock_current::i#3 = (byte) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy + // [362] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy + // [362] phi (byte) play_lock_current::i#3 = (byte) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy + // [362] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy jmp __b1 // play_lock_current::@7 __b7: - // [380] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [378] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [368] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] + // [366] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] __b2_from___b7: - // [368] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy + // [366] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy + // [366] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy + // [366] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy jmp __b2 } // keyboard_event_pressed @@ -14299,21 +14277,21 @@ keyboard_event_pressed: { .label keycode = $53 .label return_4 = $c3 .label return_5 = $a4 - // [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuz1=vbuz2_ror_3 + // [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuz1=vbuz2_ror_3 lda.z keycode lsr lsr lsr sta.z __0 - // [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuz2 + // [381] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z __0 lda keyboard_scan_values,y sta.z row_bits - // [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 + // [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1 lda #7 and.z keycode sta.z __1 - // [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + // [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 lda.z row_bits ldy.z __1 and keyboard_matrix_col_bitmask,y @@ -14321,7 +14299,7 @@ keyboard_event_pressed: { jmp __breturn // keyboard_event_pressed::@return __breturn: - // [386] return + // [384] return rts } // keyboard_event_get @@ -14331,34 +14309,34 @@ keyboard_event_pressed: { keyboard_event_get: { .label return = $54 .label return_1 = $79 - // [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + // [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda.z keyboard_events_size cmp #0 beq __breturn_from_keyboard_event_get jmp __b1 // keyboard_event_get::@1 __b1: - // [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + // [386] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 dec.z keyboard_events_size - // [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) -- vbuz1=pbuc1_derefidx_vbuz2 + // [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z keyboard_events_size lda keyboard_events,y sta.z return - // [390] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] + // [388] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] __breturn_from___b1: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy + // [388] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy + // [388] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy jmp __breturn - // [390] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + // [388] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] __breturn_from_keyboard_event_get: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuz1=vbuc1 + // [388] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + // [388] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuz1=vbuc1 lda #$ff sta.z return jmp __breturn // keyboard_event_get::@return __breturn: - // [391] return + // [389] return rts } // keyboard_event_scan @@ -14379,39 +14357,39 @@ keyboard_event_scan: { .label row = $55 .label col = $56 .label event_type = $d1 - // [393] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] + // [391] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] __b7_from_keyboard_event_scan: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 + // [391] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy + // [391] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 lda #0 sta.z keycode - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 + // [391] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 lda #0 sta.z row jmp __b7 - // [393] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] + // [391] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] __b7_from___b8: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy + // [391] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy + // [391] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy + // [391] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy jmp __b7 // keyboard_event_scan::@7 __b7: - // [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuz1=vbuz2 + // [392] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuz1=vbuz2 lda.z row sta.z keyboard_matrix_read.rowid - // [395] call keyboard_matrix_read + // [393] call keyboard_matrix_read jsr keyboard_matrix_read - // [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 + // [394] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 -- vbuz1=vbuz2 lda.z keyboard_matrix_read.return sta.z keyboard_matrix_read.return_1 jmp __b19 // keyboard_event_scan::@19 __b19: - // [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 + // [395] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuz2 lda.z keyboard_matrix_read.return_1 sta.z row_scan - // [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + // [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 lda.z row_scan ldy.z row cmp keyboard_scan_values,y @@ -14419,143 +14397,143 @@ keyboard_event_scan: { jmp __b16 // keyboard_event_scan::@16 __b16: - // [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax.z keycode axs #-[8] stx.z keycode - // [400] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] + // [398] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] __b8_from___b15: __b8_from___b16: - // [400] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy - // [400] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy + // [398] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy + // [398] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy jmp __b8 // keyboard_event_scan::@8 __b8: - // [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + // [399] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 inc.z row - // [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 + // [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z row bne __b7_from___b8 - // [403] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] + // [401] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] __b17_from___b8: jmp __b17 // keyboard_event_scan::@17 __b17: - // [404] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] + // [402] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] keyboard_event_pressed_from___b17: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_LSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [403] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_4 sta.z keyboard_event_pressed.return jmp __b20 // keyboard_event_scan::@20 __b20: - // [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 -- vbuz1=vbuz2 + // [404] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return sta.z __0 - // [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuz1_eq_0_then_la1 + // [405] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuz1_eq_0_then_la1 lda.z __0 cmp #0 beq __b1_from___b20 - // [408] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] + // [406] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] __b18_from___b20: jmp __b18 // keyboard_event_scan::@18 __b18: - // [409] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] + // [407] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] __b1_from___b18: __b1_from___b20: jmp __b1 // keyboard_event_scan::@1 __b1: - // [410] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] + // [408] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] keyboard_event_pressed_from___b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_RSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [409] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_4 sta.z keyboard_event_pressed.return_1 jmp __b21 // keyboard_event_scan::@21 __b21: - // [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 -- vbuz1=vbuz2 + // [410] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_1 sta.z __3 - // [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuz1_eq_0_then_la1 + // [411] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuz1_eq_0_then_la1 lda.z __3 cmp #0 beq __b2_from___b21 - // [414] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] + // [412] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] __b4_from___b21: jmp __b4 // keyboard_event_scan::@4 __b4: - // [415] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] + // [413] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] __b2_from___b21: __b2_from___b4: jmp __b2 // keyboard_event_scan::@2 __b2: - // [416] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] + // [414] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] keyboard_event_pressed_from___b2: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_CTRL sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [415] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_4 sta.z keyboard_event_pressed.return_2 jmp __b22 // keyboard_event_scan::@22 __b22: - // [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 -- vbuz1=vbuz2 + // [416] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_2 sta.z __6 - // [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuz1_eq_0_then_la1 + // [417] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuz1_eq_0_then_la1 lda.z __6 cmp #0 beq __b3_from___b22 - // [420] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] + // [418] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] __b5_from___b22: jmp __b5 // keyboard_event_scan::@5 __b5: - // [421] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] + // [419] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] __b3_from___b22: __b3_from___b5: jmp __b3 // keyboard_event_scan::@3 __b3: - // [422] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] + // [420] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] keyboard_event_pressed_from___b3: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_COMMODORE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 + // [421] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_4 sta.z keyboard_event_pressed.return_3 jmp __b23 // keyboard_event_scan::@23 __b23: - // [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 -- vbuz1=vbuz2 + // [422] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 -- vbuz1=vbuz2 lda.z keyboard_event_pressed.return_3 sta.z __9 - // [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuz1_eq_0_then_la1 + // [423] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuz1_eq_0_then_la1 lda.z __9 cmp #0 beq __breturn - // [426] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] + // [424] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] __b6_from___b23: jmp __b6 // keyboard_event_scan::@6 @@ -14563,89 +14541,89 @@ keyboard_event_scan: { jmp __breturn // keyboard_event_scan::@return __breturn: - // [427] return + // [425] return rts // Something has changed on the keyboard row - check each column - // [428] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] + // [426] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] __b9_from___b10: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy + // [426] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy + // [426] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy + // [426] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy jmp __b9 - // [428] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] + // [426] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] __b9_from___b19: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuz1=vbuc1 + // [426] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy + // [426] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy + // [426] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuz1=vbuc1 lda #0 sta.z col jmp __b9 // keyboard_event_scan::@9 __b9: - // [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) -- vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuz3 + // [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) -- vbuz1=vbuz2_bxor_pbuc1_derefidx_vbuz3 lda.z row_scan ldy.z row eor keyboard_scan_values,y sta.z __15 - // [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + // [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 lda.z __15 ldy.z col and keyboard_matrix_col_bitmask,y sta.z __16 - // [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuz1_eq_0_then_la1 + // [429] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuz1_eq_0_then_la1 lda.z __16 cmp #0 beq __b10_from___b9 jmp __b12 // keyboard_event_scan::@12 __b12: - // [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 + // [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp.z keyboard_events_size beq __b10_from___b12 jmp __b13 // keyboard_event_scan::@13 __b13: - // [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 + // [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuz1=vbuz2_band_pbuc1_derefidx_vbuz3 lda.z row_scan ldy.z col and keyboard_matrix_col_bitmask,y sta.z event_type - // [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuz1_eq_0_then_la1 + // [432] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuz1_eq_0_then_la1 lda.z event_type cmp #0 beq __b11 jmp __b14 // keyboard_event_scan::@14 __b14: - // [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 // Key pressed lda.z keycode ldy.z keyboard_events_size sta keyboard_events,y - // [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [434] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc.z keyboard_events_size - // [437] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] + // [435] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] __b10_from___b11: __b10_from___b12: __b10_from___b14: __b10_from___b9: - // [437] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy + // [435] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy jmp __b10 // keyboard_event_scan::@10 __b10: - // [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + // [436] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 inc.z keycode - // [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 + // [437] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuz1=_inc_vbuz1 inc.z col - // [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuz1_neq_vbuc1_then_la1 + // [438] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z col bne __b9_from___b10 jmp __b15 // keyboard_event_scan::@15 __b15: - // [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 // Store the current keyboard status for the row to debounce lda.z row_scan ldy.z row @@ -14653,16 +14631,16 @@ keyboard_event_scan: { jmp __b8_from___b15 // keyboard_event_scan::@11 __b11: - // [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuz1=vbuz2_bor_vbuc1 + // [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuz1=vbuz2_bor_vbuc1 lda #$40 ora.z keycode sta.z __23 - // [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuz2 + // [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuz2 // Key released lda.z __23 ldy.z keyboard_events_size sta keyboard_events,y - // [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [442] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc.z keyboard_events_size jmp __b10_from___b11 } @@ -14677,18 +14655,18 @@ keyboard_matrix_read: { .label return = $d3 .label rowid = $c4 .label return_1 = $c5 - // [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z rowid lda keyboard_matrix_row_bitmask,y sta CIA1_PORT_A - // [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuz1=_bnot__deref_pbuc1 + // [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuz1=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff sta.z return jmp __breturn // keyboard_matrix_read::@return __breturn: - // [447] return + // [445] return rts } // render_show @@ -14697,50 +14675,50 @@ render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .label d018val = $59 - // [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 + // [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 lda.z render_screen_show cmp #0 beq toD0181_from_render_show - // [449] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] + // [447] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] toD0182_from_render_show: jmp toD0182 // render_show::toD0182 toD0182: - // [450] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] + // [448] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] __b1_from_toD0182: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuz1=vbuc1 + // [448] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuz1=vbuc1 lda #toD0182_return sta.z d018val jmp __b1 // render_show::@1 __b1: - // [451] *((const byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuz1 + // [449] *((const byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuz1 lda.z d018val sta D018 - // [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_1,y sta BGCOL2 - // [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_2,y sta BGCOL3 - // [454] (byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 + // [452] (byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda.z render_screen_show sta.z render_screen_showing jmp __breturn // render_show::@return __breturn: - // [455] return + // [453] return rts - // [456] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] + // [454] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] toD0181_from_render_show: jmp toD0181 // render_show::toD0181 toD0181: - // [450] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] + // [448] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] __b1_from_toD0181: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuz1=vbuc1 + // [448] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuz1=vbuc1 lda #toD0181_return sta.z d018val jmp __b1 @@ -14755,43 +14733,43 @@ play_init: { .label idx = $5d .label j = $5a .label b = $5e - // [458] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] + // [456] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] __b1_from_play_init: - // [458] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 + // [456] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z idx - // [458] phi (byte*) play_init::pli#2 = (const byte*) playfield [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 + // [456] phi (byte*) play_init::pli#2 = (const byte*) playfield [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 lda #playfield sta.z pli+1 - // [458] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuz1=vbuc1 + // [456] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuz1=vbuc1 lda #0 sta.z j jmp __b1 - // [458] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] + // [456] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] __b1_from___b1: - // [458] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy - // [458] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy - // [458] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy + // [456] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy + // [456] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy + // [456] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy jmp __b1 // play_init::@1 __b1: - // [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z j asl sta.z __2 - // [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuz1=pbuz2 + // [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy.z __2 lda.z pli sta playfield_lines,y lda.z pli+1 sta playfield_lines+1,y - // [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z idx ldy.z j sta playfield_lines_idx,y - // [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS -- pbuz1=pbuz1_plus_vbuc1 + // [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS -- pbuz1=pbuz1_plus_vbuc1 lda #PLAYFIELD_COLS clc adc.z pli @@ -14799,45 +14777,45 @@ play_init: { bcc !+ inc.z pli+1 !: - // [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 + // [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 lax.z idx axs #-[PLAYFIELD_COLS] stx.z idx - // [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuz1=_inc_vbuz1 + // [462] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuz1=_inc_vbuz1 inc.z j - // [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [463] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z j bne __b1_from___b1 jmp __b2 // play_init::@2 __b2: - // [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES -- _deref_pbuc1=vbuc2 + // [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES -- _deref_pbuc1=vbuc2 lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES - // [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) -- vbuz1=_deref_pbuc1 + // [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) -- vbuz1=_deref_pbuc1 // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta.z current_movedown_slow - // [468] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] + // [466] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] __b3_from___b2: - // [468] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuz1=vbuc1 + // [466] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuz1=vbuc1 lda #0 sta.z b jmp __b3 // Set the initial score add values - // [468] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] + // [466] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] __b3_from___b3: - // [468] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy + // [466] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy jmp __b3 // play_init::@3 __b3: - // [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 + // [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 -- vbuz1=vbuz2_rol_2 lda.z b asl asl sta.z __3 - // [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) -- pduc1_derefidx_vbuz1=pduc2_derefidx_vbuz1 + // [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) -- pduc1_derefidx_vbuz1=pduc2_derefidx_vbuz1 ldy.z __3 lda SCORE_BASE_BCD,y sta score_add_bcd,y @@ -14847,16 +14825,16 @@ play_init: { sta score_add_bcd+2,y lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuz1=_inc_vbuz1 + // [469] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuz1=_inc_vbuz1 inc.z b - // [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuz1_neq_vbuc1_then_la1 + // [470] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp.z b bne __b3_from___b3 jmp __breturn // play_init::@return __breturn: - // [473] return + // [471] return rts } // sprites_irq_init @@ -14864,36 +14842,36 @@ play_init: { sprites_irq_init: { // asm { sei } sei - // [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS // asm { ldaCIA1_INTERRUPT } lda CIA1_INTERRUPT - // [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 + // [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR - // [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 + // [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - // [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR -- _deref_pbuc1=vbuc2 + // [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR -- _deref_pbuc1=vbuc2 // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT - // [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL - // [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST -- _deref_pbuc1=vbuc2 + // [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER_FIRST sta RASTER - // [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - // [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 + // [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #sprites_init::@1] + // [488] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] __b1_from_sprites_init: - // [490] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 + // [488] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 lda #$18+$f*8 sta.z xpos - // [490] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuz1=vbuc1 + // [488] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuz1=vbuc1 lda #0 sta.z s jmp __b1 - // [490] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] + // [488] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] __b1_from___b1: - // [490] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy - // [490] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy + // [488] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy + // [488] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy jmp __b1 // sprites_init::@1 __b1: - // [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z s asl sta.z s2 - // [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 + // [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda.z xpos ldy.z s2 sta SPRITES_XPOS,y - // [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK -- pbuc1_derefidx_vbuz1=vbuc2 + // [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK -- pbuc1_derefidx_vbuz1=vbuc2 lda #BLACK ldy.z s sta SPRITES_COLS,y - // [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + // [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] stx.z xpos - // [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuz1=_inc_vbuz1 + // [493] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuz1=_inc_vbuz1 inc.z s - // [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [494] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z s bne __b1_from___b1 jmp __breturn // sprites_init::@return __breturn: - // [497] return + // [495] return rts } // render_init @@ -14981,10 +14959,10 @@ render_init: { jmp vicSelectGfxBank1 // render_init::vicSelectGfxBank1 vicSelectGfxBank1: - // [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2_PORT_A_DDR - // [500] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] + // [498] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: jmp vicSelectGfxBank1_toDd001 // render_init::vicSelectGfxBank1_toDd001 @@ -14992,95 +14970,95 @@ render_init: { jmp vicSelectGfxBank1___b1 // render_init::vicSelectGfxBank1_@1 vicSelectGfxBank1___b1: - // [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + // [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A jmp __b2 // render_init::@2 __b2: - // [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + // [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // [503] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [501] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [504] *((const byte*) BGCOL1) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [502] *((const byte*) BGCOL1) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL1 - // [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 + // [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 sta BGCOL2 - // [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 + // [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 sta BGCOL3 - // [507] *((const byte*) BGCOL4) ← (const byte) GREY -- _deref_pbuc1=vbuc2 + // [505] *((const byte*) BGCOL4) ← (const byte) GREY -- _deref_pbuc1=vbuc2 lda #GREY sta BGCOL4 - // [508] call render_screen_original - // [520] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] + // [506] call render_screen_original + // [518] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] render_screen_original_from___b2: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 + // [518] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1 sta.z render_screen_original.screen+1 jsr render_screen_original - // [509] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] + // [507] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] __b3_from___b2: jmp __b3 // render_init::@3 __b3: - // [510] call render_screen_original - // [520] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] + // [508] call render_screen_original + // [518] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] render_screen_original_from___b3: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 + // [518] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2 sta.z render_screen_original.screen+1 jsr render_screen_original - // [511] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] + // [509] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] __b1_from___b3: - // [511] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 + // [509] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2+2*$28+$10 sta.z li_2+1 - // [511] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 + // [509] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1+2*$28+$10 sta.z li_1+1 - // [511] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuz1=vbuc1 + // [509] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b1 - // [511] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] + // [509] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] __b1_from___b1: - // [511] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy - // [511] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy - // [511] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy + // [509] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy + // [509] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy + // [509] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy jmp __b1 // render_init::@1 __b1: - // [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z i asl sta.z __5 - // [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuz1=pbuz2 + // [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy.z __5 lda.z li_1 sta screen_lines_1,y lda.z li_1+1 sta screen_lines_1+1,y - // [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuz1=pbuz2 + // [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuz1=pbuz2 ldy.z __5 lda.z li_2 sta screen_lines_2,y lda.z li_2+1 sta screen_lines_2+1,y - // [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z li_1 @@ -15088,7 +15066,7 @@ render_init: { bcc !+ inc.z li_1+1 !: - // [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z li_2 @@ -15096,16 +15074,16 @@ render_init: { bcc !+ inc.z li_2+1 !: - // [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuz1=_inc_vbuz1 + // [515] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 -- vbuz1_neq_vbuc1_then_la1 + // [516] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z i bne __b1_from___b1 jmp __breturn // render_init::@return __breturn: - // [519] return + // [517] return rts } // render_screen_original @@ -15120,188 +15098,188 @@ render_screen_original: { .label oscr = $67 .label ocols = $69 .label y = $66 - // [521] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] + // [519] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] __b1_from_render_screen_original: - // [521] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 + // [519] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [521] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 lda #PLAYFIELD_COLORS_ORIGINAL+$20*2 sta.z ocols+1 - // [521] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta.z oscr+1 - // [521] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 lda #COLS sta.z cols+1 - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy + // [519] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy jmp __b1 - // [521] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] + // [519] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] __b1_from___b5: - // [521] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy - // [521] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy - // [521] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy - // [521] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy + // [519] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy + // [519] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy + // [519] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy + // [519] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy + // [519] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy jmp __b1 // render_screen_original::@1 __b1: - // [522] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] + // [520] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] __b2_from___b1: - // [522] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuz1=vbuc1 + // [520] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuz1=vbuc1 lda #0 sta.z x - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy + // [520] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy + // [520] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy jmp __b2 - // [522] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] + // [520] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] __b2_from___b2: - // [522] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy + // [520] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy + // [520] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy + // [520] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy jmp __b2 // render_screen_original::@2 __b2: - // [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 + // [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 + // [522] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 + // [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 + // [524] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuz1=_inc_vbuz1 + // [525] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuz1=_inc_vbuz1 inc.z x - // [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuz1_neq_vbuc1_then_la1 + // [526] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z x bne __b2_from___b2 - // [529] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] + // [527] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] __b3_from___b2: __b3_from___b3: - // [529] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy - // [529] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy - // [529] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy - // [529] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy - // [529] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy + // [527] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy + // [527] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy + // [527] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy + // [527] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy + // [527] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy jmp __b3 // render_screen_original::@3 __b3: - // [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 + // [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (oscr),y ldy #0 sta (screen),y - // [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 + // [529] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 + // [530] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 inc.z oscr bne !+ inc.z oscr+1 !: - // [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 + // [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (ocols),y ldy #0 sta (cols),y - // [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 + // [532] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 + // [533] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 inc.z ocols bne !+ inc.z ocols+1 !: - // [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuz1=_inc_vbuz1 + // [534] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuz1=_inc_vbuz1 inc.z x - // [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuz1_neq_vbuc1_then_la1 + // [535] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuz1_neq_vbuc1_then_la1 lda #$24 cmp.z x bne __b3_from___b3 - // [538] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] + // [536] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] __b4_from___b3: __b4_from___b4: - // [538] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy - // [538] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy - // [538] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy + // [536] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy + // [536] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy + // [536] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy jmp __b4 // render_screen_original::@4 __b4: - // [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 + // [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 + // [538] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 + // [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 + // [540] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuz1=_inc_vbuz1 + // [541] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuz1=_inc_vbuz1 inc.z x - // [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuz1_neq_vbuc1_then_la1 + // [542] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp.z x bne __b4_from___b4 jmp __b5 // render_screen_original::@5 __b5: - // [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 + // [543] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 inc.z y - // [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 + // [544] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z y bne __b1_from___b5 jmp __breturn // render_screen_original::@return __breturn: - // [547] return + // [545] return rts } // sid_rnd_init // Initialize SID voice 3 for random number generation sid_rnd_init: { - // [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff -- _deref_pwuc1=vwuc2 + // [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff -- _deref_pwuc1=vwuc2 lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 - // [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE -- _deref_pbuc1=vbuc2 + // [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL jmp __breturn // sid_rnd_init::@return __breturn: - // [550] return + // [548] return rts } // sprites_irq @@ -15326,116 +15304,116 @@ sprites_irq: { //(*BGCOL)++; // Clear decimal flag (because it is used by the score algorithm) cld - // [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos -- vbuz1=vbuz2 + // [550] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos -- vbuz1=vbuz2 // Place the sprites lda.z irq_sprite_ypos sta.z ypos - // [553] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [551] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda.z ypos sta SPRITES_YPOS - // [554] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [552] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda.z ypos sta SPRITES_YPOS+2 - // [555] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [553] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda.z ypos sta SPRITES_YPOS+4 - // [556] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 + // [554] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuz1 lda.z ypos sta SPRITES_YPOS+6 - // [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [555] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z irq_raster_next iny sty.z __0 - // [558] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 -- vbuz1=vbuz2 + // [556] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 -- vbuz1=vbuz2 // Wait for the y-position before changing sprite pointers lda.z __0 sta.z raster_sprite_gfx_modify jmp __b8 // sprites_irq::@8 __b8: - // [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp.z raster_sprite_gfx_modify bcc __b8 jmp __b9 // sprites_irq::@9 __b9: - // [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr -- vbuz1=vbuz2 + // [558] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr -- vbuz1=vbuz2 lda.z irq_sprite_ptr sta.z ptr - // [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 + // [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 lda.z render_screen_showing cmp #0 beq __b1 jmp __b10 // sprites_irq::@10 __b10: - // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 + // [560] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 lda.z ptr sta PLAYFIELD_SPRITE_PTRS_2 - // [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 + // [561] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 ldy.z ptr iny sty.z ptr_3 - // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 + // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 lda.z ptr_3 sta PLAYFIELD_SPRITE_PTRS_2+1 - // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 + // [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuz1 lda.z ptr_3 sta PLAYFIELD_SPRITE_PTRS_2+2 - // [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuz1=_inc_vbuz2 + // [564] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuz1=_inc_vbuz2 ldy.z ptr_3 iny sty.z ptr_4 - // [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuz1 + // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuz1 lda.z ptr_4 sta PLAYFIELD_SPRITE_PTRS_2+3 jmp __b2 // sprites_irq::@2 __b2: - // [568] (byte) irq_cnt ← ++ (byte) irq_cnt -- vbuz1=_inc_vbuz1 + // [566] (byte) irq_cnt ← ++ (byte) irq_cnt -- vbuz1=_inc_vbuz1 inc.z irq_cnt - // [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 + // [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 lda #9 cmp.z irq_cnt beq __b3 jmp __b6 // sprites_irq::@6 __b6: - // [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 + // [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$a cmp.z irq_cnt beq __b4 jmp __b7 // sprites_irq::@7 __b7: - // [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 + // [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next axs #-[$14] stx.z irq_raster_next - // [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ypos axs #-[$15] stx.z irq_sprite_ypos - // [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ptr axs #-[3] stx.z irq_sprite_ptr jmp __b5 // sprites_irq::@5 __b5: - // [574] *((const byte*) RASTER) ← (byte) irq_raster_next -- _deref_pbuc1=vbuz1 + // [572] *((const byte*) RASTER) ← (byte) irq_raster_next -- _deref_pbuc1=vbuz1 // Setup next interrupt lda.z irq_raster_next sta RASTER - // [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS jmp __breturn // sprites_irq::@return __breturn: - // [576] return - exit interrupt(HARDWARE_CLOBBER) + // [574] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -15445,31 +15423,31 @@ sprites_irq: { rti // sprites_irq::@4 __b4: - // [577] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 + // [575] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z irq_cnt - // [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 + // [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 lda #IRQ_RASTER_FIRST sta.z irq_raster_next - // [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ypos axs #-[$15] stx.z irq_sprite_ypos - // [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ptr axs #-[3] stx.z irq_sprite_ptr jmp __b5 // sprites_irq::@3 __b3: - // [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next axs #-[$15] stx.z irq_raster_next - // [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS -- vbuz1=vbuc1 + // [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS -- vbuz1=vbuc1 lda #SPRITES_FIRST_YPOS sta.z irq_sprite_ypos - // [583] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] + // [581] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] toSpritePtr2_from___b3: jmp toSpritePtr2 // sprites_irq::toSpritePtr2 @@ -15477,30 +15455,30 @@ sprites_irq: { jmp __b11 // sprites_irq::@11 __b11: - // [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 + // [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 lda #toSpritePtr2_return sta.z irq_sprite_ptr jmp __b5 // sprites_irq::@1 __b1: - // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 + // [583] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuz1 lda.z ptr sta PLAYFIELD_SPRITE_PTRS_1 - // [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 + // [584] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuz1=_inc_vbuz2 ldy.z ptr iny sty.z ptr_1 - // [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 + // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 lda.z ptr_1 sta PLAYFIELD_SPRITE_PTRS_1+1 - // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 + // [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuz1 lda.z ptr_1 sta PLAYFIELD_SPRITE_PTRS_1+2 - // [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuz1=_inc_vbuz2 + // [587] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuz1=_inc_vbuz2 ldy.z ptr_1 iny sty.z ptr_2 - // [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuz1 + // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuz1 lda.z ptr_2 sta PLAYFIELD_SPRITE_PTRS_1+3 jmp __b2 @@ -15547,6 +15525,20 @@ sprites_irq: { // The initial X/Y for each piece PIECES_START_X: .byte 4, 4, 4, 4, 4, 4, 4 PIECES_START_Y: .byte 1, 1, 1, 1, 1, 0, 1 +PLAYFIELD_SCREEN_ORIGINAL: +// Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + + // Original Color Data +PLAYFIELD_COLORS_ORIGINAL: +.import binary "playfield-screen.col" + // The color #1 to use for the pieces for each level PIECES_COLORS_1: .byte BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED // The color #2 to use for the pieces for each level @@ -15574,19 +15566,6 @@ sprites_irq: { .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" -.pc = PLAYFIELD_SCREEN_ORIGINAL "PLAYFIELD_SCREEN_ORIGINAL" - // Load chars for the screen - .var screen = LoadBinary("playfield-screen.iscr") - // Load extended colors for the screen - .var extended = LoadBinary("playfield-extended.col") - // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 - // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) - // <<6 to move extended colors to the upper 2 bits - .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) - -.pc = PLAYFIELD_COLORS_ORIGINAL "PLAYFIELD_COLORS_ORIGINAL" - .import binary "playfield-screen.col" - .pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES" .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) // Put the sprites into memory @@ -15607,11 +15586,11 @@ sprites_irq: { REGISTER UPLIFT POTENTIAL REGISTERS Statement [1] (byte) render_screen_showing ← (byte) 0 [ ] ( [ ] ) always clobbers reg byte a Statement [2] (dword) score_bcd ← (dword) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [11] (byte) irq_cnt ← (byte) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [9] (byte) irq_cnt ← (byte) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:23 [ current_ypos#13 current_ypos#97 current_ypos#98 ] Removing always clobbered register reg byte a as potential for zp[1]:55 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] Removing always clobbered register reg byte a as potential for zp[1]:25 [ current_xpos#59 current_xpos#118 current_xpos#119 ] @@ -15621,9 +15600,9 @@ Removing always clobbered register reg byte a as potential for zp[1]:63 [ curren Removing always clobbered register reg byte a as potential for zp[1]:69 [ 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 ] Removing always clobbered register reg byte a as potential for zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] Removing always clobbered register reg byte a as potential for zp[1]:70 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] -Statement [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ) always clobbers reg byte a +Statement [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] Removing always clobbered register reg byte a as potential for zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] Removing always clobbered register reg byte a as potential for zp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] @@ -15631,23 +15610,23 @@ Removing always clobbered register reg byte a as potential for zp[1]:88 [ keyboa Removing always clobbered register reg byte a as potential for zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Removing always clobbered register reg byte a as potential for zp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] Removing always clobbered register reg byte a as potential for zp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] -Statement [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ) always clobbers reg byte a +Statement [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:24 [ render_screen_render#33 render_screen_render#64 ] -Statement [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [ render_screen_show#16 render_screen_render#11 ] ( main:13::render_screen_swap:71 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#16 render_screen_render#11 ] ) always clobbers reg byte a -Statement [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 [ render_screen_show#13 render_screen_render#11 ] ( main:13::render_screen_swap:71 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#13 render_screen_render#11 ] ) always clobbers reg byte a -Statement [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ) always clobbers reg byte a -Statement [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ) always clobbers reg byte a -Statement [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ) always clobbers reg byte a -Statement [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ) always clobbers reg byte a -Statement [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ) always clobbers reg byte a +Statement [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [ render_screen_show#16 render_screen_render#11 ] ( main:11::render_screen_swap:69 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#16 render_screen_render#11 ] ) always clobbers reg byte a +Statement [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 [ render_screen_show#13 render_screen_render#11 ] ( main:11::render_screen_swap:69 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#13 render_screen_render#11 ] ) always clobbers reg byte a +Statement [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ) always clobbers reg byte a +Statement [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ) always clobbers reg byte a +Statement [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ) always clobbers reg byte a +Statement [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ) always clobbers reg byte a +Statement [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:12 [ 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 ] -Statement [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ) always clobbers reg byte a -Statement [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ) always clobbers reg byte a -Statement [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ) always clobbers reg byte a -Statement [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 [ render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte a +Statement [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ) always clobbers reg byte a +Statement [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ) always clobbers reg byte a +Statement [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ) always clobbers reg byte a +Statement [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 [ render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:11 [ render_bcd::only_low#6 ] -Statement [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 [ render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ) always clobbers reg byte a -Statement [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y +Statement [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 [ render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ) always clobbers reg byte a +Statement [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y Removing always clobbered register reg byte y as potential for zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] Removing always clobbered register reg byte y as potential for zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] Removing always clobbered register reg byte y as potential for zp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] @@ -15662,88 +15641,88 @@ Removing always clobbered register reg byte y as potential for zp[1]:58 [ level# Removing always clobbered register reg byte y as potential for zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] Removing always clobbered register reg byte y as potential for zp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] Removing always clobbered register reg byte y as potential for zp[1]:12 [ 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 ] -Statement [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a -Statement [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y -Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a +Statement [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a +Statement [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y +Statement [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:16 [ next_piece_idx#12 next_piece_idx#76 next_piece_idx#77 ] -Statement [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a +Statement [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:131 [ render_next::next_piece_char#0 ] -Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y +Statement [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:172 [ play_spawn_current::$7 ] Removing always clobbered register reg byte y as potential for zp[1]:131 [ render_next::next_piece_char#0 ] Removing always clobbered register reg byte a as potential for zp[1]:17 [ render_next::l#7 render_next::l#1 ] Removing always clobbered register reg byte y as potential for zp[1]:17 [ render_next::l#7 render_next::l#1 ] Removing always clobbered register reg byte a as potential for zp[1]:22 [ render_next::c#2 render_next::c#1 ] Removing always clobbered register reg byte y as potential for zp[1]:22 [ render_next::c#2 render_next::c#1 ] -Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a -Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a +Statement [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a +Statement [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:28 [ current_piece_char#68 current_piece_char#99 current_piece_char#100 ] Removing always clobbered register reg byte a as potential for zp[1]:29 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] Removing always clobbered register reg byte a as potential for zp[1]:30 [ render_moving::l#4 render_moving::l#1 ] -Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a +Statement [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:31 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] -Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a -Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a -Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a +Statement [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a +Statement [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a +Statement [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:32 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] Removing always clobbered register reg byte a as potential for zp[1]:33 [ render_moving::c#2 render_moving::c#1 ] -Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a -Statement [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a +Statement [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a +Statement [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:34 [ render_screen_render#22 render_screen_render#63 ] Removing always clobbered register reg byte a as potential for zp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] Removing always clobbered register reg byte a as potential for zp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Statement [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ) always clobbers reg byte a -Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y +Statement [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ) always clobbers reg byte a +Statement [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a +Statement [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:34 [ render_screen_render#22 render_screen_render#63 ] Removing always clobbered register reg byte y as potential for zp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] Removing always clobbered register reg byte y as potential for zp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] Removing always clobbered register reg byte a as potential for zp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] Removing always clobbered register reg byte y as potential for zp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] -Statement [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a +Statement [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:123 [ play_movement::key_event#0 ] -Statement [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a -Statement [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ) always clobbers reg byte a +Statement [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a +Statement [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:145 [ play_movement::render#2 ] -Statement [193] (byte*) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ) always clobbers reg byte a +Statement [191] (byte*) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:42 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] Removing always clobbered register reg byte a as potential for zp[1]:46 [ play_collision::xpos#6 play_collision::xpos#0 play_collision::xpos#1 play_collision::xpos#2 play_collision::xpos#3 play_collision::xpos#4 ] Removing always clobbered register reg byte a as potential for zp[1]:47 [ 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 ] Removing always clobbered register reg byte a as potential for zp[1]:45 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] -Statement [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 [ current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ) always clobbers reg byte a -Statement [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ) always clobbers reg byte a -Statement [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 [ play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ) always clobbers reg byte a +Statement [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 [ current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ) always clobbers reg byte a +Statement [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ) always clobbers reg byte a +Statement [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 [ play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] -Statement [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ) always clobbers reg byte a +Statement [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:49 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] Removing always clobbered register reg byte a as potential for zp[1]:48 [ play_collision::l#6 play_collision::l#1 ] -Statement [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ) always clobbers reg byte a -Statement [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a +Statement [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ) always clobbers reg byte a +Statement [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:50 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] Removing always clobbered register reg byte a as potential for zp[1]:51 [ play_collision::c#2 play_collision::c#1 ] Removing always clobbered register reg byte a as potential for zp[1]:158 [ play_collision::i#1 ] -Statement [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ) always clobbers reg byte a -Statement [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a -Statement [231] (byte*) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a -Statement [242] (byte*) current_piece#96 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a -Statement [266] (byte*) current_piece#95 ← (byte*) current_piece#10 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a -Statement [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a +Statement [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ) always clobbers reg byte a +Statement [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a +Statement [229] (byte*) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:11::play_movement:51::play_move_leftright:172 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a +Statement [240] (byte*) current_piece#96 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:11::play_movement:51::play_move_leftright:172 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a +Statement [264] (byte*) current_piece#95 ← (byte*) current_piece#10 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a +Statement [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:171 [ play_spawn_current::current_piece_idx#0 ] -Statement [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a -Statement [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a +Statement [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a +Statement [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:170 [ play_update_score::removed#0 ] -Statement [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a +Statement [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:177 [ play_update_score::lines_before#0 ] -Statement [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a -Statement [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a -Statement [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a -Statement [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#65 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#8 ] ) always clobbers reg byte a reg byte x +Statement [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a +Statement [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a +Statement [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a +Statement [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#65 level_bcd#8 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#8 ] ) always clobbers reg byte a reg byte x Removing always clobbered register reg byte x as potential for zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] Removing always clobbered register reg byte x as potential for zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] Removing always clobbered register reg byte x as potential for zp[1]:88 [ 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 ] @@ -15752,224 +15731,224 @@ Removing always clobbered register reg byte x as potential for zp[1]:70 [ game_o Removing always clobbered register reg byte x as potential for zp[1]:69 [ 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 ] Removing always clobbered register reg byte x as potential for zp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] Removing always clobbered register reg byte x as potential for zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] -Statement [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a +Statement [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:71 [ play_increase_level::b#2 play_increase_level::b#1 ] -Statement [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a -Statement [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a +Statement [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a +Statement [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:11::play_movement:51::play_move_down:165::play_remove_lines:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:72 [ play_remove_lines::y#8 play_remove_lines::y#1 ] Removing always clobbered register reg byte a as potential for zp[1]:73 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] Removing always clobbered register reg byte a as potential for zp[1]:74 [ play_remove_lines::r#2 play_remove_lines::r#3 play_remove_lines::r#1 ] -Statement [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a +Statement [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:11::play_movement:51::play_move_down:165::play_remove_lines:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:77 [ 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 ] -Statement [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a +Statement [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:78 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] Removing always clobbered register reg byte a as potential for zp[1]:80 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] Removing always clobbered register reg byte a as potential for zp[1]:79 [ play_lock_current::l#6 play_lock_current::l#1 ] -Statement [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a -Statement [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a +Statement [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:81 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] Removing always clobbered register reg byte a as potential for zp[1]:82 [ play_lock_current::c#2 play_lock_current::c#1 ] Removing always clobbered register reg byte a as potential for zp[1]:191 [ play_lock_current::i#1 ] -Statement [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:54 [ 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 ] Removing always clobbered register reg byte a as potential for zp[1]:83 [ keyboard_event_pressed::keycode#5 ] -Statement [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:193 [ keyboard_event_pressed::row_bits#0 ] -Statement [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a -Statement [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 ] ) always clobbers reg byte a -Statement [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y -Statement [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a +Statement [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:11::keyboard_event_get:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 ] ) always clobbers reg byte a +Statement [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:11::keyboard_event_get:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y +Statement [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Statement [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:198 [ keyboard_event_scan::row_scan#0 ] Removing always clobbered register reg byte a as potential for zp[1]:86 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Removing always clobbered register reg byte a as potential for zp[1]:87 [ 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 ] -Statement [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a -Statement [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y +Statement [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Removing always clobbered register reg byte y as potential for zp[1]:198 [ keyboard_event_scan::row_scan#0 ] Removing always clobbered register reg byte y as potential for zp[1]:86 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Removing always clobbered register reg byte y as potential for zp[1]:87 [ 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 ] -Statement [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a -Statement [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y -Statement [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a -Statement [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [454] (byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ) always clobbers reg byte a +Statement [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a +Statement [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y +Statement [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:11::keyboard_event_scan:43::keyboard_matrix_read:393 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:11::keyboard_event_scan:43::keyboard_matrix_read:393 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [452] (byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:90 [ play_init::j#2 play_init::j#1 ] Removing always clobbered register reg byte a as potential for zp[1]:93 [ play_init::idx#2 play_init::idx#1 ] -Statement [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a -Statement [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a -Statement [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES [ ] ( main:13::play_init:24 [ score_bcd ] ) always clobbers reg byte a -Statement [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 ] ) always clobbers reg byte a -Statement [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$3 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 play_init::b#2 play_init::$3 ] ) always clobbers reg byte a +Statement [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a +Statement [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a +Statement [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES [ ] ( main:11::play_init:22 [ score_bcd ] ) always clobbers reg byte a +Statement [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) [ current_movedown_slow#1 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 ] ) always clobbers reg byte a +Statement [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$3 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 play_init::b#2 play_init::$3 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:94 [ play_init::b#2 play_init::b#1 ] -Statement [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a -Statement [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a +Statement [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) [ current_movedown_slow#1 play_init::b#2 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a +Statement [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a -Statement [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [486] *((const byte*) SPRITES_ENABLE) ← (byte) $f [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [487] *((const byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [488] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [489] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a +Statement [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [484] *((const byte*) SPRITES_ENABLE) ← (byte) $f [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [485] *((const byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [486] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [487] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:95 [ sprites_init::s#2 sprites_init::s#1 ] Removing always clobbered register reg byte a as potential for zp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] -Statement [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a -Statement [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [503] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [504] *((const byte*) BGCOL1) ← (const byte) BLACK [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [507] *((const byte*) BGCOL4) ← (const byte) GREY [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a +Statement [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a +Statement [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [501] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [502] *((const byte*) BGCOL1) ← (const byte) BLACK [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [505] *((const byte*) BGCOL4) ← (const byte) GREY [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:97 [ render_init::i#2 render_init::i#1 ] -Statement [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a +Statement [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:215 [ render_init::$5 ] -Statement [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a -Statement [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a -Statement [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a -Statement [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y +Statement [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a +Statement [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a +Statement [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a +Statement [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] Removing always clobbered register reg byte y as potential for zp[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] Removing always clobbered register reg byte a as potential for zp[1]:111 [ 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 ] Removing always clobbered register reg byte y as potential for zp[1]:111 [ 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 ] -Statement [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y -Statement [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y -Statement [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ score_bcd ] ) always clobbers reg byte a -Statement [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE [ ] ( main:13::sid_rnd_init:16 [ score_bcd ] ) always clobbers reg byte a -Statement [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ) always clobbers reg byte a -Statement [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ) always clobbers reg byte a +Statement [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y +Statement [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y +Statement [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y +Statement [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff [ ] ( main:11::sid_rnd_init:14 [ score_bcd ] ) always clobbers reg byte a +Statement [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE [ ] ( main:11::sid_rnd_init:14 [ score_bcd ] ) always clobbers reg byte a +Statement [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ) always clobbers reg byte a +Statement [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:219 [ sprites_irq::ptr#0 ] -Statement [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ) always clobbers reg byte a -Statement [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [574] *((const byte*) RASTER) ← (byte) irq_raster_next [ ] ( [ ] ) always clobbers reg byte a -Statement [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( [ ] ) always clobbers reg byte a -Statement [576] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [577] (byte) irq_cnt ← (byte) 0 [ irq_sprite_ypos irq_sprite_ptr ] ( [ irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a -Statement [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a +Statement [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ) always clobbers reg byte a +Statement [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [572] *((const byte*) RASTER) ← (byte) irq_raster_next [ ] ( [ ] ) always clobbers reg byte a +Statement [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( [ ] ) always clobbers reg byte a +Statement [574] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [575] (byte) irq_cnt ← (byte) 0 [ irq_sprite_ypos irq_sprite_ptr ] ( [ irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a +Statement [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a Statement [1] (byte) render_screen_showing ← (byte) 0 [ ] ( [ ] ) always clobbers reg byte a Statement [2] (dword) score_bcd ← (dword) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [11] (byte) irq_cnt ← (byte) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ) always clobbers reg byte a -Statement [50] if((byte) game_over#10==(byte) 0) goto main::@4 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ) always clobbers reg byte a +Statement [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [9] (byte) irq_cnt ← (byte) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ) always clobbers reg byte a +Statement [48] if((byte) game_over#10==(byte) 0) goto main::@4 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:122 [ main::key_event#0 ] -Statement [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ) always clobbers reg byte a -Statement [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [ render_screen_show#16 render_screen_render#11 ] ( main:13::render_screen_swap:71 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#16 render_screen_render#11 ] ) always clobbers reg byte a -Statement [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 [ render_screen_show#13 render_screen_render#11 ] ( main:13::render_screen_swap:71 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#13 render_screen_render#11 ] ) always clobbers reg byte a -Statement [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 [ render_screen_render#18 lines_bcd#15 level_bcd#17 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte a -Statement [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ) always clobbers reg byte a -Statement [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ) always clobbers reg byte a -Statement [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ) always clobbers reg byte a -Statement [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ) always clobbers reg byte a -Statement [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ) always clobbers reg byte a -Statement [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ) always clobbers reg byte a -Statement [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ) always clobbers reg byte a -Statement [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ) always clobbers reg byte a -Statement [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 [ render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte a -Statement [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 [ render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ) always clobbers reg byte a -Statement [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y -Statement [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a -Statement [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y -Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a -Statement [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a -Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y -Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a -Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a -Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a -Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a -Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a -Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a -Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a -Statement [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a -Statement [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ) always clobbers reg byte a -Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y -Statement [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ) always clobbers reg byte a -Statement [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a -Statement [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a -Statement [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ) always clobbers reg byte a -Statement [193] (byte*) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ) always clobbers reg byte a -Statement [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 [ current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ) always clobbers reg byte a -Statement [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ) always clobbers reg byte a -Statement [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 [ play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ) always clobbers reg byte a -Statement [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ) always clobbers reg byte a -Statement [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ) always clobbers reg byte a -Statement [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a -Statement [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ) always clobbers reg byte a -Statement [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a -Statement [231] (byte*) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a -Statement [242] (byte*) current_piece#96 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a -Statement [266] (byte*) current_piece#95 ← (byte*) current_piece#10 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a -Statement [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a -Statement [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a -Statement [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ) always clobbers reg byte a -Statement [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ) always clobbers reg byte a -Statement [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a -Statement [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a -Statement [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a -Statement [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a -Statement [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a -Statement [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y +Statement [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ) always clobbers reg byte a +Statement [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [ render_screen_show#16 render_screen_render#11 ] ( main:11::render_screen_swap:69 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#16 render_screen_render#11 ] ) always clobbers reg byte a +Statement [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 [ render_screen_show#13 render_screen_render#11 ] ( main:11::render_screen_swap:69 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#13 render_screen_render#11 ] ) always clobbers reg byte a +Statement [73] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 [ render_screen_render#18 lines_bcd#15 level_bcd#17 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte a +Statement [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ) always clobbers reg byte a +Statement [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ) always clobbers reg byte a +Statement [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ) always clobbers reg byte a +Statement [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ) always clobbers reg byte a +Statement [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ) always clobbers reg byte a +Statement [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ) always clobbers reg byte a +Statement [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ) always clobbers reg byte a +Statement [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ) always clobbers reg byte a +Statement [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 [ render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte a +Statement [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 [ render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ) always clobbers reg byte a +Statement [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y +Statement [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a +Statement [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y +Statement [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a +Statement [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a +Statement [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y +Statement [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a +Statement [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a +Statement [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a +Statement [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a +Statement [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a +Statement [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a +Statement [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a +Statement [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a +Statement [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ) always clobbers reg byte a +Statement [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a +Statement [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y +Statement [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ) always clobbers reg byte a +Statement [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a +Statement [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a +Statement [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ) always clobbers reg byte a +Statement [191] (byte*) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ) always clobbers reg byte a +Statement [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 [ current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ) always clobbers reg byte a +Statement [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ) always clobbers reg byte a +Statement [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 [ play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ) always clobbers reg byte a +Statement [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ) always clobbers reg byte a +Statement [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ) always clobbers reg byte a +Statement [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a +Statement [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ) always clobbers reg byte a +Statement [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a +Statement [229] (byte*) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:11::play_movement:51::play_move_leftright:172 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a +Statement [240] (byte*) current_piece#96 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:11::play_movement:51::play_move_leftright:172 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a +Statement [264] (byte*) current_piece#95 ← (byte*) current_piece#10 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a +Statement [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a +Statement [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a +Statement [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ) always clobbers reg byte a +Statement [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ) always clobbers reg byte a +Statement [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a +Statement [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a +Statement [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a +Statement [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a +Statement [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a +Statement [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:123 [ play_movement::key_event#0 ] -Statement [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a -Statement [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#65 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#8 ] ) always clobbers reg byte a reg byte x -Statement [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a -Statement [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a -Statement [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a -Statement [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a -Statement [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a -Statement [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a -Statement [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a -Statement [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a -Statement [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a -Statement [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 ] ) always clobbers reg byte a -Statement [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y -Statement [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a -Statement [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x +Statement [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a +Statement [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#65 level_bcd#8 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#8 ] ) always clobbers reg byte a reg byte x +Statement [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a +Statement [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a +Statement [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:11::play_movement:51::play_move_down:165::play_remove_lines:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a +Statement [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:11::play_movement:51::play_move_down:165::play_remove_lines:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a +Statement [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a +Statement [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a +Statement [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:11::keyboard_event_get:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 ] ) always clobbers reg byte a +Statement [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:11::keyboard_event_get:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y +Statement [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a +Statement [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x Removing always clobbered register reg byte x as potential for zp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] Removing always clobbered register reg byte x as potential for zp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] Removing always clobbered register reg byte x as potential for zp[1]:67 [ current_xpos#43 current_xpos#14 current_xpos#19 current_xpos#100 current_xpos#22 current_xpos#26 current_xpos#6 current_xpos#8 ] @@ -15977,260 +15956,260 @@ Removing always clobbered register reg byte x as potential for zp[1]:55 [ curren Removing always clobbered register reg byte x as potential for zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Removing always clobbered register reg byte x as potential for zp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] Removing always clobbered register reg byte x as potential for zp[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Statement [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a -Statement [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a -Statement [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a -Statement [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a -Statement [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y -Statement [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y -Statement [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y -Statement [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a -Statement [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [454] (byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ) always clobbers reg byte a -Statement [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a -Statement [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a -Statement [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES [ ] ( main:13::play_init:24 [ score_bcd ] ) always clobbers reg byte a -Statement [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 ] ) always clobbers reg byte a -Statement [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$3 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 play_init::b#2 play_init::$3 ] ) always clobbers reg byte a -Statement [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a -Statement [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a +Statement [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a +Statement [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a +Statement [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y +Statement [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y +Statement [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y +Statement [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:11::keyboard_event_scan:43::keyboard_matrix_read:393 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:11::keyboard_event_scan:43::keyboard_matrix_read:393 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [452] (byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ) always clobbers reg byte a +Statement [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a +Statement [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a +Statement [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES [ ] ( main:11::play_init:22 [ score_bcd ] ) always clobbers reg byte a +Statement [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) [ current_movedown_slow#1 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 ] ) always clobbers reg byte a +Statement [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$3 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 play_init::b#2 play_init::$3 ] ) always clobbers reg byte a +Statement [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) [ current_movedown_slow#1 play_init::b#2 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a +Statement [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a -Statement [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [486] *((const byte*) SPRITES_ENABLE) ← (byte) $f [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [487] *((const byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [488] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [489] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a -Statement [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a -Statement [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [503] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [504] *((const byte*) BGCOL1) ← (const byte) BLACK [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [507] *((const byte*) BGCOL4) ← (const byte) GREY [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a -Statement [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a -Statement [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a -Statement [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a -Statement [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a -Statement [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y -Statement [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y -Statement [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y -Statement [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ score_bcd ] ) always clobbers reg byte a -Statement [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE [ ] ( main:13::sid_rnd_init:16 [ score_bcd ] ) always clobbers reg byte a -Statement [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ) always clobbers reg byte a -Statement [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ) always clobbers reg byte a -Statement [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ) always clobbers reg byte a -Statement [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [574] *((const byte*) RASTER) ← (byte) irq_raster_next [ ] ( [ ] ) always clobbers reg byte a -Statement [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( [ ] ) always clobbers reg byte a -Statement [576] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [577] (byte) irq_cnt ← (byte) 0 [ irq_sprite_ypos irq_sprite_ptr ] ( [ irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a -Statement [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a +Statement [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [484] *((const byte*) SPRITES_ENABLE) ← (byte) $f [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [485] *((const byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [486] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [487] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a +Statement [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a +Statement [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [501] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [502] *((const byte*) BGCOL1) ← (const byte) BLACK [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [505] *((const byte*) BGCOL4) ← (const byte) GREY [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a +Statement [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a +Statement [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a +Statement [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a +Statement [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a +Statement [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y +Statement [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y +Statement [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y +Statement [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y +Statement [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff [ ] ( main:11::sid_rnd_init:14 [ score_bcd ] ) always clobbers reg byte a +Statement [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE [ ] ( main:11::sid_rnd_init:14 [ score_bcd ] ) always clobbers reg byte a +Statement [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ) always clobbers reg byte a +Statement [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ) always clobbers reg byte a +Statement [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ) always clobbers reg byte a +Statement [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [572] *((const byte*) RASTER) ← (byte) irq_raster_next [ ] ( [ ] ) always clobbers reg byte a +Statement [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( [ ] ) always clobbers reg byte a +Statement [574] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [575] (byte) irq_cnt ← (byte) 0 [ irq_sprite_ypos irq_sprite_ptr ] ( [ irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a +Statement [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a Statement [1] (byte) render_screen_showing ← (byte) 0 [ ] ( [ ] ) always clobbers reg byte a Statement [2] (dword) score_bcd ← (dword) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [11] (byte) irq_cnt ← (byte) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a -Statement [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ( main:13 [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a -Statement [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ) always clobbers reg byte a -Statement [50] if((byte) game_over#10==(byte) 0) goto main::@4 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ) always clobbers reg byte a -Statement [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ( main:13 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ) always clobbers reg byte a -Statement [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [ render_screen_show#16 render_screen_render#11 ] ( main:13::render_screen_swap:71 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#16 render_screen_render#11 ] ) always clobbers reg byte a -Statement [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 [ render_screen_show#13 render_screen_render#11 ] ( main:13::render_screen_swap:71 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#13 render_screen_render#11 ] ) always clobbers reg byte a -Statement [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 [ render_screen_render#18 lines_bcd#15 level_bcd#17 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte a -Statement [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ) always clobbers reg byte a -Statement [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ) always clobbers reg byte a -Statement [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ) always clobbers reg byte a -Statement [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ) always clobbers reg byte a -Statement [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ) always clobbers reg byte a -Statement [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ) always clobbers reg byte a -Statement [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ) always clobbers reg byte a -Statement [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ( main:13::render_score:69 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ) always clobbers reg byte a -Statement [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 [ render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte a -Statement [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 [ render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ) always clobbers reg byte a -Statement [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y -Statement [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a -Statement [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:13::render_score:69::render_bcd:80 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:83 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:86 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:89 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:92 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:13::render_score:69::render_bcd:95 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y -Statement [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a -Statement [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a -Statement [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y -Statement [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a -Statement [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:13::render_next:37 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:13::render_next:67 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y -Statement [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a -Statement [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a -Statement [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a -Statement [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a -Statement [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a -Statement [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:13::render_moving:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:13::render_moving:64 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a -Statement [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a -Statement [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ) always clobbers reg byte a -Statement [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a -Statement [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:13::render_playfield:30 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:13::render_playfield:58 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y -Statement [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ) always clobbers reg byte a -Statement [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a -Statement [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:13::play_movement:53 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a -Statement [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ) always clobbers reg byte a -Statement [193] (byte*) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ) always clobbers reg byte a -Statement [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 [ current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ) always clobbers reg byte a -Statement [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ( main:13::play_movement:53::play_move_rotate:179 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ) always clobbers reg byte a -Statement [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 [ play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ) always clobbers reg byte a -Statement [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ) always clobbers reg byte a -Statement [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ) always clobbers reg byte a -Statement [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a -Statement [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ) always clobbers reg byte a -Statement [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:13::play_movement:53::play_move_rotate:179::play_collision:194 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:232 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_leftright:174::play_collision:243 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_collision:267 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:26::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_spawn_current:28::play_collision:296 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280::play_collision:296 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a -Statement [231] (byte*) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a -Statement [242] (byte*) current_piece#96 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:13::play_movement:53::play_move_leftright:174 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a -Statement [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 ] ) always clobbers reg byte a -Statement [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#7 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#7 ] ) always clobbers reg byte a -Statement [266] (byte*) current_piece#95 ← (byte*) current_piece#10 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a -Statement [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:13::play_movement:53::play_move_down:167 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a -Statement [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a -Statement [290] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) [ play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a -Statement [291] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) [ current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a -Statement [292] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] ) always clobbers reg byte a -Statement [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a -Statement [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ) always clobbers reg byte a -Statement [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ( main:13::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_spawn_current:28 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:13::play_movement:53::play_move_down:167::play_spawn_current:280 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ) always clobbers reg byte a -Statement [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a -Statement [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a -Statement [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a -Statement [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ) always clobbers reg byte a -Statement [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a -Statement [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a -Statement [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y -Statement [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a -Statement [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#65 level_bcd#8 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#8 ] ) always clobbers reg byte a reg byte x -Statement [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a -Statement [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ( main:13::play_movement:53::play_move_down:167::play_update_score:278::play_increase_level:320 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a -Statement [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a -Statement [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:13::play_movement:53::play_move_down:167::play_remove_lines:274 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a -Statement [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a -Statement [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a -Statement [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:13::play_movement:53::play_move_down:167::play_lock_current:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a -Statement [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a -Statement [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a -Statement [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:13::play_movement:53::play_move_down:167::keyboard_event_pressed:252 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:404 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:410 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:416 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:13::keyboard_event_scan:45::keyboard_event_pressed:422 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a -Statement [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:13::keyboard_event_get:47 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 ] ) always clobbers reg byte a -Statement [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:13::keyboard_event_get:47 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y -Statement [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a reg byte y -Statement [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x -Statement [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a -Statement [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a -Statement [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a -Statement [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a -Statement [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a -Statement [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y -Statement [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y -Statement [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a -Statement [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:13::keyboard_event_scan:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y -Statement [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a -Statement [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:13::keyboard_event_scan:45::keyboard_matrix_read:395 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a -Statement [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y -Statement [454] (byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:13::render_show:43 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a -Statement [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ) always clobbers reg byte a -Statement [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a -Statement [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a -Statement [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:13::play_init:24 [ score_bcd play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a -Statement [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES [ ] ( main:13::play_init:24 [ score_bcd ] ) always clobbers reg byte a -Statement [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) [ current_movedown_slow#1 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 ] ) always clobbers reg byte a -Statement [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$3 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 play_init::b#2 play_init::$3 ] ) always clobbers reg byte a -Statement [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) [ current_movedown_slow#1 play_init::b#2 ] ( main:13::play_init:24 [ score_bcd current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a -Statement [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a +Statement [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [9] (byte) irq_cnt ← (byte) 0 [ score_bcd ] ( [ score_bcd ] ) always clobbers reg byte a +Statement [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#97 current_ypos#6 current_xpos#118 current_xpos#100 current_piece_gfx#111 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ( main:11 [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 current_piece#101 current_piece_gfx#123 current_movedown_slow#1 game_over#52 ] ) always clobbers reg byte a +Statement [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 ] ) always clobbers reg byte a +Statement [48] if((byte) game_over#10==(byte) 0) goto main::@4 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#16 main::key_event#0 ] ) always clobbers reg byte a +Statement [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ( main:11 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 current_ypos#98 render_screen_render#64 current_xpos#119 current_piece_gfx#112 ] ) always clobbers reg byte a +Statement [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 [ render_screen_show#16 render_screen_render#11 ] ( main:11::render_screen_swap:69 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#16 render_screen_render#11 ] ) always clobbers reg byte a +Statement [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 [ render_screen_show#13 render_screen_render#11 ] ( main:11::render_screen_swap:69 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_show#13 render_screen_render#11 ] ) always clobbers reg byte a +Statement [73] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 [ render_screen_render#18 lines_bcd#15 level_bcd#17 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte a +Statement [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#0 ] ) always clobbers reg byte a +Statement [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#1 ] ) always clobbers reg byte a +Statement [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen#2 ] ) always clobbers reg byte a +Statement [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 ] ) always clobbers reg byte a +Statement [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#3 render_bcd::screen#3 ] ) always clobbers reg byte a +Statement [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 ] ) always clobbers reg byte a +Statement [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#4 render_bcd::screen#4 ] ) always clobbers reg byte a +Statement [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 [ render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ( main:11::render_score:67 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen#5 ] ) always clobbers reg byte a +Statement [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 [ render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::only_low#6 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte a +Statement [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 [ render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 render_bcd::$5 ] ) always clobbers reg byte a +Statement [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 [ render_bcd::bcd#6 render_bcd::screen_pos#0 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::bcd#6 render_bcd::screen_pos#0 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::bcd#6 render_bcd::screen_pos#0 ] ) always clobbers reg byte y +Statement [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f [ render_bcd::screen_pos#3 render_bcd::$3 ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 render_bcd::screen_pos#3 render_bcd::$3 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_bcd::screen_pos#3 render_bcd::$3 ] ) always clobbers reg byte a +Statement [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 [ ] ( main:11::render_score:67::render_bcd:78 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:81 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:84 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:87 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:90 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 render_score::screen#3 ] main:11::render_score:67::render_bcd:93 [ score_bcd render_screen_show#16 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 level#17 render_screen_render#18 lines_bcd#15 level_bcd#17 ] ) always clobbers reg byte y +Statement [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 [ next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 next_piece_idx#12 render_next::screen_next_area#11 render_next::$6 ] ) always clobbers reg byte a +Statement [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) [ render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::screen_next_area#11 render_next::next_piece_char#0 render_next::next_piece_gfx#9 ] ) always clobbers reg byte a +Statement [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#2 render_next::screen_next_area#5 render_next::c#2 render_next::cell#0 ] ) always clobbers reg byte a reg byte y +Statement [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#4 ] ) always clobbers reg byte a +Statement [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 [ render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ( main:11::render_next:35 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] main:11::render_next:65 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_next::next_piece_char#0 render_next::l#7 render_next::next_piece_gfx#1 render_next::screen_next_area#5 render_next::c#2 ] ) always clobbers reg byte a reg byte y +Statement [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#1 ] ) always clobbers reg byte a +Statement [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$1 ] ) always clobbers reg byte a +Statement [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::$6 ] ) always clobbers reg byte a +Statement [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::i#3 render_moving::l#4 render_moving::screen_line#0 ] ) always clobbers reg byte a +Statement [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::screen_line#0 render_moving::i#4 render_moving::xpos#2 render_moving::c#2 render_moving::current_cell#0 ] ) always clobbers reg byte a +Statement [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 [ render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ( main:11::render_moving:33 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] main:11::render_moving:62 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#33 current_xpos#59 current_piece_gfx#64 current_piece_char#68 render_moving::ypos#2 render_moving::l#4 render_moving::i#2 render_moving::screen_line#0 render_moving::xpos#2 render_moving::c#2 ] ) always clobbers reg byte a +Statement [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$0 ] ) always clobbers reg byte a +Statement [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::$3 ] ) always clobbers reg byte a +Statement [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#3 render_playfield::screen_line#0 ] ) always clobbers reg byte a +Statement [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) [ render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ( main:11::render_playfield:28 [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 current_movedown_slow#1 game_over#52 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] main:11::render_playfield:56 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#21 current_piece#15 current_piece_char#16 current_orientation#17 current_piece_gfx#18 current_xpos#19 current_ypos#19 game_over#15 next_piece_idx#16 keyboard_events_size#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 render_screen_render#22 render_playfield::l#2 render_playfield::i#2 render_playfield::screen_line#2 render_playfield::c#2 ] ) always clobbers reg byte a reg byte y +Statement [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_orientation#20 current_piece_gfx#20 current_xpos#22 ] ) always clobbers reg byte a +Statement [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_movement::render#2 ] ) always clobbers reg byte a +Statement [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 [ score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ( main:11::play_movement:51 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece#15 current_piece_char#16 current_ypos#19 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::return#0 current_orientation#25 current_piece_gfx#21 current_xpos#26 ] ) always clobbers reg byte a +Statement [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$5 ] ) always clobbers reg byte a +Statement [191] (byte*) current_piece#98 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#3 play_collision::ypos#3 play_collision::orientation#3 current_piece#98 ] ) always clobbers reg byte a +Statement [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 [ current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_xpos#26 current_orientation#7 current_piece_gfx#7 ] ) always clobbers reg byte a +Statement [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 [ current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ( main:11::play_movement:51::play_move_rotate:177 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::$7 ] ) always clobbers reg byte a +Statement [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 [ play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::yp#0 play_collision::xpos#6 play_collision::piece_gfx#0 ] ) always clobbers reg byte a +Statement [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::$14 ] ) always clobbers reg byte a +Statement [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::i#3 play_collision::l#6 play_collision::playfield_line#0 ] ) always clobbers reg byte a +Statement [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a +Statement [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 play_collision::$5 ] ) always clobbers reg byte a +Statement [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 [ play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ( main:11::play_movement:51::play_move_rotate:177::play_collision:192 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::render#2 current_piece#15 current_ypos#19 current_orientation#20 current_piece_gfx#20 current_xpos#26 play_move_rotate::orientation#3 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:230 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_leftright:172::play_collision:241 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_collision:265 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:24::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_spawn_current:26::play_collision:294 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278::play_collision:294 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_collision::xpos#6 play_collision::piece_gfx#0 play_collision::yp#2 play_collision::l#6 play_collision::playfield_line#0 play_collision::xp#2 play_collision::c#2 play_collision::i#1 ] ) always clobbers reg byte a +Statement [229] (byte*) current_piece#97 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ( main:11::play_movement:51::play_move_leftright:172 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#97 play_collision::orientation#2 play_collision::ypos#2 play_collision::xpos#2 ] ) always clobbers reg byte a +Statement [240] (byte*) current_piece#96 ← (byte*) current_piece#15 [ current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ( main:11::play_movement:51::play_move_leftright:172 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 score_bcd current_movedown_slow#21 current_piece_char#16 game_over#15 next_piece_idx#16 current_movedown_counter#14 lines_bcd#15 level#17 level_bcd#17 play_movement::key_event#0 play_movement::render#1 current_piece_gfx#20 current_piece#15 current_ypos#19 current_orientation#20 current_xpos#22 current_piece#96 play_collision::orientation#1 play_collision::ypos#1 play_collision::xpos#1 ] ) always clobbers reg byte a +Statement [254] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 ] ) always clobbers reg byte a +Statement [257] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#7 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#7 ] ) always clobbers reg byte a +Statement [264] (byte*) current_piece#95 ← (byte*) current_piece#10 [ score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece#95 play_collision::orientation#0 play_collision::ypos#0 play_collision::xpos#0 ] ) always clobbers reg byte a +Statement [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ( main:11::play_movement:51::play_move_down:165 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_ypos#6 current_xpos#100 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 current_piece#92 current_piece_gfx#116 lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 ] ) always clobbers reg byte a +Statement [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 [ play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a +Statement [288] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) [ play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a +Statement [289] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) [ current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 play_spawn_current::current_piece_idx#0 ] ) always clobbers reg byte a +Statement [290] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#65 ] ) always clobbers reg byte a +Statement [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 current_piece#99 play_collision::ypos#4 play_collision::xpos#4 game_over#65 ] ) always clobbers reg byte a +Statement [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 play_spawn_current::piece_idx#2 game_over#52 ] ) always clobbers reg byte a +Statement [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 [ current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ( main:11::play_spawn_current:24 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:11::play_spawn_current:26 [ score_bcd current_movedown_slow#1 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] main:11::play_movement:51::play_move_down:165::play_spawn_current:278 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd lines_bcd#17 level#19 current_movedown_slow#23 level_bcd#19 current_ypos#6 current_xpos#100 play_spawn_current::$7 current_piece_char#5 game_over#52 play_spawn_current::piece_idx#1 ] ) always clobbers reg byte a +Statement [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::$2 ] ) always clobbers reg byte a +Statement [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::$9 ] ) always clobbers reg byte a +Statement [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) [ score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 lines_bcd#19 level#10 level_bcd#11 play_update_score::removed#0 play_update_score::lines_before#0 play_update_score::add_bcd#0 ] ) always clobbers reg byte a +Statement [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 play_update_score::add_bcd#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 ] ) always clobbers reg byte a +Statement [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 [ score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd current_movedown_slow#14 level#10 level_bcd#11 play_update_score::lines_before#0 lines_bcd#29 play_update_score::$4 ] ) always clobbers reg byte a +Statement [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 [ level_bcd#11 level#21 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 ] ) always clobbers reg byte a +Statement [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) [ level_bcd#11 level#21 current_movedown_slow#10 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level_bcd#11 level#21 current_movedown_slow#10 ] ) always clobbers reg byte a reg byte y +Statement [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f [ level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#21 play_increase_level::$1 ] ) always clobbers reg byte a +Statement [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 [ level#21 current_movedown_slow#65 level_bcd#8 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#8 ] ) always clobbers reg byte a reg byte x +Statement [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 play_increase_level::$5 ] ) always clobbers reg byte a +Statement [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) [ level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ( main:11::play_movement:51::play_move_down:165::play_update_score:276::play_increase_level:318 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 game_over#10 next_piece_idx#10 score_bcd lines_bcd#29 level#21 current_movedown_slow#65 level_bcd#62 play_increase_level::b#2 ] ) always clobbers reg byte a +Statement [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS [ play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ( main:11::play_movement:51::play_move_down:165::play_remove_lines:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::y#8 play_remove_lines::removed#11 play_remove_lines::r#1 play_remove_lines::w#2 ] ) always clobbers reg byte a +Statement [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 [ play_remove_lines::removed#8 play_remove_lines::w#6 ] ( main:11::play_movement:51::play_move_down:165::play_remove_lines:272 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 play_remove_lines::removed#8 play_remove_lines::w#6 ] ) always clobbers reg byte a +Statement [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::$4 ] ) always clobbers reg byte a +Statement [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::i#3 play_lock_current::l#6 play_lock_current::playfield_line#0 ] ) always clobbers reg byte a +Statement [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 [ current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ( main:11::play_movement:51::play_move_down:165::play_lock_current:270 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_piece_char#10 current_piece_gfx#13 current_xpos#14 play_lock_current::yp#2 play_lock_current::l#6 play_lock_current::playfield_line#0 play_lock_current::xp#2 play_lock_current::c#2 play_lock_current::i#1 ] ) always clobbers reg byte a +Statement [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 [ keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::keycode#5 keyboard_event_pressed::$0 ] ) always clobbers reg byte a +Statement [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 [ keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::row_bits#0 keyboard_event_pressed::$1 ] ) always clobbers reg byte a +Statement [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) [ keyboard_event_pressed::return#11 ] ( main:11::play_movement:51::play_move_down:165::keyboard_event_pressed:250 [ render_screen_show#16 render_screen_render#18 keyboard_events_size#16 play_movement::key_event#0 score_bcd current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 lines_bcd#19 level#10 level_bcd#11 current_movedown_counter#12 play_move_down::movedown#10 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:402 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:408 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:414 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] main:11::keyboard_event_scan:43::keyboard_event_pressed:420 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_pressed::return#11 ] ) always clobbers reg byte a +Statement [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return [ keyboard_events_size#13 ] ( main:11::keyboard_event_get:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 ] ) always clobbers reg byte a +Statement [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) [ keyboard_events_size#4 keyboard_event_get::return#1 ] ( main:11::keyboard_event_get:45 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#4 keyboard_event_get::return#1 ] ) always clobbers reg byte y +Statement [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_event_scan::row_scan#0 ] ) always clobbers reg byte a reg byte y +Statement [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 [ keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_events_size#30 keyboard_event_scan::keycode#1 ] ) always clobbers reg byte a reg byte x +Statement [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 [ keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_events_size#13 keyboard_event_scan::row#1 keyboard_event_scan::keycode#13 ] ) always clobbers reg byte a +Statement [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$15 ] ) always clobbers reg byte a +Statement [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$16 ] ) always clobbers reg byte a +Statement [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a +Statement [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::event_type#0 ] ) always clobbers reg byte a +Statement [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte a reg byte y +Statement [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 [ keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#14 keyboard_events_size#29 ] ) always clobbers reg byte a reg byte y +Statement [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 keyboard_event_scan::$23 ] ) always clobbers reg byte a +Statement [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 [ keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ( main:11::keyboard_event_scan:43 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::row_scan#0 keyboard_event_scan::col#2 keyboard_event_scan::keycode#10 keyboard_events_size#10 ] ) always clobbers reg byte y +Statement [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) [ ] ( main:11::keyboard_event_scan:43::keyboard_matrix_read:393 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 ] ) always clobbers reg byte a +Statement [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) [ keyboard_matrix_read::return#0 ] ( main:11::keyboard_event_scan:43::keyboard_matrix_read:393 [ score_bcd render_screen_show#16 render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 current_movedown_counter#16 lines_bcd#19 level#10 level_bcd#11 keyboard_event_scan::row#2 keyboard_event_scan::keycode#11 keyboard_events_size#30 keyboard_matrix_read::return#0 ] ) always clobbers reg byte a +Statement [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a reg byte y +Statement [452] (byte) render_screen_showing ← (byte) render_screen_show#16 [ render_screen_show#16 level#10 ] ( main:11::render_show:41 [ score_bcd render_screen_render#18 current_movedown_slow#14 current_piece#10 current_piece_char#10 current_orientation#13 current_piece_gfx#13 current_xpos#14 current_ypos#11 game_over#10 next_piece_idx#10 keyboard_events_size#19 current_movedown_counter#16 lines_bcd#19 level_bcd#11 render_screen_show#16 level#10 ] ) always clobbers reg byte a +Statement [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 [ play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 play_init::$2 ] ) always clobbers reg byte a +Statement [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 [ play_init::j#2 play_init::pli#2 play_init::idx#2 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#2 play_init::idx#2 ] ) always clobbers reg byte a +Statement [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::idx#2 play_init::pli#1 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::idx#2 play_init::pli#1 ] ) always clobbers reg byte a +Statement [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS [ play_init::j#2 play_init::pli#1 play_init::idx#1 ] ( main:11::play_init:22 [ score_bcd play_init::j#2 play_init::pli#1 play_init::idx#1 ] ) always clobbers reg byte a +Statement [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES [ ] ( main:11::play_init:22 [ score_bcd ] ) always clobbers reg byte a +Statement [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) [ current_movedown_slow#1 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 ] ) always clobbers reg byte a +Statement [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 [ current_movedown_slow#1 play_init::b#2 play_init::$3 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 play_init::b#2 play_init::$3 ] ) always clobbers reg byte a +Statement [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) [ current_movedown_slow#1 play_init::b#2 ] ( main:11::play_init:22 [ score_bcd current_movedown_slow#1 play_init::b#2 ] ) always clobbers reg byte a +Statement [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a Statement asm { ldaCIA1_INTERRUPT } always clobbers reg byte a -Statement [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:13::sprites_irq_init:22 [ score_bcd ] ) always clobbers reg byte a -Statement [486] *((const byte*) SPRITES_ENABLE) ← (byte) $f [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [487] *((const byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [488] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [489] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) [ ] ( main:13::sprites_init:20 [ score_bcd ] ) always clobbers reg byte a -Statement [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a -Statement [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a -Statement [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:13::sprites_init:20 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a -Statement [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [503] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [504] *((const byte*) BGCOL1) ← (const byte) BLACK [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [507] *((const byte*) BGCOL4) ← (const byte) GREY [ ] ( main:13::render_init:18 [ score_bcd ] ) always clobbers reg byte a -Statement [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a -Statement [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a -Statement [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a -Statement [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a -Statement [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:13::render_init:18 [ score_bcd render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a -Statement [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y -Statement [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y -Statement [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y -Statement [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y -Statement [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:13::render_init:18::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:13::render_init:18::render_screen_original:510 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y -Statement [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff [ ] ( main:13::sid_rnd_init:16 [ score_bcd ] ) always clobbers reg byte a -Statement [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE [ ] ( main:13::sid_rnd_init:16 [ score_bcd ] ) always clobbers reg byte a -Statement [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ) always clobbers reg byte a -Statement [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ) always clobbers reg byte a -Statement [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ) always clobbers reg byte a -Statement [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [574] *((const byte*) RASTER) ← (byte) irq_raster_next [ ] ( [ ] ) always clobbers reg byte a -Statement [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( [ ] ) always clobbers reg byte a -Statement [576] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [577] (byte) irq_cnt ← (byte) 0 [ irq_sprite_ypos irq_sprite_ptr ] ( [ irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a -Statement [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x -Statement [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x -Statement [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a -Statement [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a +Statement [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() [ ] ( main:11::sprites_irq_init:20 [ score_bcd ] ) always clobbers reg byte a +Statement [484] *((const byte*) SPRITES_ENABLE) ← (byte) $f [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [485] *((const byte*) SPRITES_MC) ← (byte) 0 [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [486] *((const byte*) SPRITES_EXPAND_Y) ← *((const byte*) SPRITES_MC) [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [487] *((const byte*) SPRITES_EXPAND_X) ← *((const byte*) SPRITES_EXPAND_Y) [ ] ( main:11::sprites_init:18 [ score_bcd ] ) always clobbers reg byte a +Statement [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 [ sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 sprites_init::s2#0 ] ) always clobbers reg byte a +Statement [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK [ sprites_init::s#2 sprites_init::xpos#2 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#2 ] ) always clobbers reg byte a +Statement [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 [ sprites_init::s#2 sprites_init::xpos#1 ] ( main:11::sprites_init:18 [ score_bcd sprites_init::s#2 sprites_init::xpos#1 ] ) always clobbers reg byte a +Statement [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [501] *((const byte*) BORDERCOL) ← (const byte) BLACK [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [502] *((const byte*) BGCOL1) ← (const byte) BLACK [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [505] *((const byte*) BGCOL4) ← (const byte) GREY [ ] ( main:11::render_init:16 [ score_bcd ] ) always clobbers reg byte a +Statement [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a +Statement [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 render_init::$5 ] ) always clobbers reg byte a +Statement [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 [ render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#2 render_init::li_2#2 ] ) always clobbers reg byte a +Statement [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 [ render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_2#2 render_init::li_1#1 ] ) always clobbers reg byte a +Statement [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 [ render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ( main:11::render_init:16 [ score_bcd render_init::i#2 render_init::li_1#1 render_init::li_2#1 ] ) always clobbers reg byte a +Statement [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::screen#5 render_screen_original::cols#4 render_screen_original::x#4 ] ) always clobbers reg byte a reg byte y +Statement [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK [ render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::oscr#4 render_screen_original::ocols#4 render_screen_original::y#6 render_screen_original::cols#4 render_screen_original::x#4 render_screen_original::screen#2 ] ) always clobbers reg byte a reg byte y +Statement [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) [ render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#2 render_screen_original::screen#6 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 ] ) always clobbers reg byte a reg byte y +Statement [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#2 render_screen_original::cols#5 render_screen_original::x#5 render_screen_original::screen#3 ] ) always clobbers reg byte a reg byte y +Statement [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE [ render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::screen#7 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK [ render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ( main:11::render_init:16::render_screen_original:506 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] main:11::render_init:16::render_screen_original:508 [ score_bcd render_screen_original::y#6 render_screen_original::screen#10 render_screen_original::oscr#1 render_screen_original::ocols#1 render_screen_original::cols#6 render_screen_original::x#6 ] ) always clobbers reg byte a reg byte y +Statement [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff [ ] ( main:11::sid_rnd_init:14 [ score_bcd ] ) always clobbers reg byte a +Statement [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE [ ] ( main:11::sid_rnd_init:14 [ score_bcd ] ) always clobbers reg byte a +Statement [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ( [ render_screen_showing irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::raster_sprite_gfx_modify ] ) always clobbers reg byte a +Statement [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt sprites_irq::ptr#0 ] ) always clobbers reg byte a +Statement [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr irq_cnt ] ) always clobbers reg byte a +Statement [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [572] *((const byte*) RASTER) ← (byte) irq_raster_next [ ] ( [ ] ) always clobbers reg byte a +Statement [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER [ ] ( [ ] ) always clobbers reg byte a +Statement [574] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [575] (byte) irq_cnt ← (byte) 0 [ irq_sprite_ypos irq_sprite_ptr ] ( [ irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ypos irq_sprite_ptr ] ) always clobbers reg byte a +Statement [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 [ irq_raster_next irq_sprite_ptr ] ( [ irq_raster_next irq_sprite_ptr ] ) always clobbers reg byte a reg byte x +Statement [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a reg byte x +Statement [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a +Statement [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 [ irq_raster_next ] ( [ irq_raster_next ] ) always clobbers reg byte a Potential registers zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] : zp[1]:2 , Potential registers zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] : zp[1]:3 , Potential registers zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] : zp[1]:4 , @@ -16457,243 +16436,243 @@ Uplift Scope [sid_rnd_init] Uplift Scope [render_screen_swap] Uplift Scope [sprites_irq_init] -Uplifting [keyboard_event_scan] best 4708857 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[1]:86 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp[1]:87 [ 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[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp[1]:198 [ keyboard_event_scan::row_scan#0 ] zp[1]:200 [ keyboard_event_scan::$0 ] zp[1]:202 [ keyboard_event_scan::$3 ] zp[1]:204 [ keyboard_event_scan::$6 ] zp[1]:206 [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 4703737 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[1]:86 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] zp[1]:87 [ 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[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] zp[1]:198 [ keyboard_event_scan::row_scan#0 ] zp[1]:200 [ keyboard_event_scan::$0 ] zp[1]:202 [ keyboard_event_scan::$3 ] zp[1]:204 [ keyboard_event_scan::$6 ] zp[1]:206 [ keyboard_event_scan::$9 ] Limited combination testing to 100 combinations of 524288 possible. -Uplifting [play_collision] best 4558857 combination zp[1]:49 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] reg byte a [ play_collision::$5 ] zp[1]:50 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] reg byte x [ play_collision::c#2 play_collision::c#1 ] zp[1]:155 [ play_collision::$14 ] zp[1]:158 [ play_collision::i#1 ] zp[1]:47 [ 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[1]:48 [ play_collision::l#6 play_collision::l#1 ] zp[2]:156 [ play_collision::playfield_line#0 ] zp[2]:153 [ play_collision::piece_gfx#0 ] zp[1]:46 [ 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[1]:45 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] zp[1]:150 [ play_collision::return#14 ] zp[1]:160 [ play_collision::return#13 ] zp[1]:162 [ play_collision::return#1 ] zp[1]:166 [ play_collision::return#0 ] zp[1]:173 [ play_collision::return#10 ] zp[1]:52 [ play_collision::return#15 ] +Uplifting [play_collision] best 4553737 combination zp[1]:49 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] reg byte a [ play_collision::$5 ] zp[1]:50 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] reg byte x [ play_collision::c#2 play_collision::c#1 ] zp[1]:155 [ play_collision::$14 ] zp[1]:158 [ play_collision::i#1 ] zp[1]:47 [ 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[1]:48 [ play_collision::l#6 play_collision::l#1 ] zp[2]:156 [ play_collision::playfield_line#0 ] zp[2]:153 [ play_collision::piece_gfx#0 ] zp[1]:46 [ 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[1]:45 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] zp[1]:150 [ play_collision::return#14 ] zp[1]:160 [ play_collision::return#13 ] zp[1]:162 [ play_collision::return#1 ] zp[1]:166 [ play_collision::return#0 ] zp[1]:173 [ play_collision::return#10 ] zp[1]:52 [ play_collision::return#15 ] Limited combination testing to 100 combinations of 429981696 possible. -Uplifting [play_lock_current] best 4464857 combination zp[1]:80 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] zp[1]:81 [ 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[1]:191 [ play_lock_current::i#1 ] reg byte a [ play_lock_current::$4 ] zp[1]:79 [ play_lock_current::l#6 play_lock_current::l#1 ] zp[2]:189 [ play_lock_current::playfield_line#0 ] zp[1]:78 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] +Uplifting [play_lock_current] best 4459737 combination zp[1]:80 [ play_lock_current::i#2 play_lock_current::i#3 play_lock_current::i#7 play_lock_current::i#9 ] zp[1]:81 [ 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[1]:191 [ play_lock_current::i#1 ] reg byte a [ play_lock_current::$4 ] zp[1]:79 [ play_lock_current::l#6 play_lock_current::l#1 ] zp[2]:189 [ play_lock_current::playfield_line#0 ] zp[1]:78 [ 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 4325857 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[1]:75 [ play_remove_lines::x#2 play_remove_lines::x#1 ] zp[1]:76 [ play_remove_lines::full#4 play_remove_lines::full#2 ] zp[1]:187 [ play_remove_lines::c#0 ] zp[1]:73 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] zp[1]:72 [ play_remove_lines::y#8 play_remove_lines::y#1 ] zp[1]:168 [ play_remove_lines::return#0 ] +Uplifting [play_remove_lines] best 4320737 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[1]:75 [ play_remove_lines::x#2 play_remove_lines::x#1 ] zp[1]:76 [ play_remove_lines::full#4 play_remove_lines::full#2 ] zp[1]:187 [ play_remove_lines::c#0 ] zp[1]:73 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] zp[1]:72 [ play_remove_lines::y#8 play_remove_lines::y#1 ] zp[1]:168 [ play_remove_lines::return#0 ] Limited combination testing to 100 combinations of 20736 possible. -Uplifting [] best 4325615 combination zp[1]:88 [ 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[1]:69 [ 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[2]:65 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#123 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#116 ] zp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] zp[1]:28 [ current_piece_char#68 current_piece_char#99 current_piece_char#100 ] zp[2]:26 [ current_piece_gfx#64 current_piece_gfx#111 current_piece_gfx#112 ] zp[1]:67 [ 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[2]:43 [ current_piece#17 current_piece#95 current_piece#96 current_piece#97 current_piece#98 current_piece#99 ] reg byte x [ render_screen_render#22 render_screen_render#63 ] reg byte x [ next_piece_idx#12 next_piece_idx#76 next_piece_idx#77 ] reg byte a [ render_screen_render#15 render_screen_render#65 ] reg byte x [ current_ypos#13 current_ypos#97 current_ypos#98 ] zp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] zp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] zp[1]:55 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] zp[2]:61 [ current_piece#28 current_piece#10 current_piece#15 current_piece#101 current_piece#92 ] zp[1]:70 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] zp[1]:25 [ current_xpos#59 current_xpos#118 current_xpos#119 ] zp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] zp[2]:56 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] zp[1]:24 [ render_screen_render#33 render_screen_render#64 ] zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] zp[1]:112 [ render_screen_showing ] zp[1]:118 [ irq_sprite_ypos ] zp[1]:120 [ irq_cnt ] zp[1]:119 [ irq_sprite_ptr ] zp[1]:117 [ irq_raster_next ] zp[4]:113 [ score_bcd ] +Uplifting [] best 4320495 combination zp[1]:88 [ 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[1]:69 [ 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[2]:65 [ current_piece_gfx#35 current_piece_gfx#13 current_piece_gfx#18 current_piece_gfx#123 current_piece_gfx#20 current_piece_gfx#21 current_piece_gfx#7 current_piece_gfx#116 ] zp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] zp[1]:28 [ current_piece_char#68 current_piece_char#99 current_piece_char#100 ] zp[2]:26 [ current_piece_gfx#64 current_piece_gfx#111 current_piece_gfx#112 ] zp[1]:67 [ 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[2]:43 [ current_piece#17 current_piece#95 current_piece#96 current_piece#97 current_piece#98 current_piece#99 ] reg byte x [ render_screen_render#22 render_screen_render#63 ] reg byte x [ next_piece_idx#12 next_piece_idx#76 next_piece_idx#77 ] reg byte a [ render_screen_render#15 render_screen_render#65 ] reg byte x [ current_ypos#13 current_ypos#97 current_ypos#98 ] zp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] zp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] zp[1]:55 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] zp[2]:61 [ current_piece#28 current_piece#10 current_piece#15 current_piece#101 current_piece#92 ] zp[1]:70 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] zp[1]:25 [ current_xpos#59 current_xpos#118 current_xpos#119 ] zp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] zp[2]:56 [ lines_bcd#26 lines_bcd#19 lines_bcd#15 lines_bcd#17 lines_bcd#29 ] zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] zp[1]:24 [ render_screen_render#33 render_screen_render#64 ] zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] zp[1]:112 [ render_screen_showing ] zp[1]:118 [ irq_sprite_ypos ] zp[1]:120 [ irq_cnt ] zp[1]:119 [ irq_sprite_ptr ] zp[1]:117 [ irq_raster_next ] zp[4]:113 [ score_bcd ] Limited combination testing to 100 combinations of 1944 possible. -Uplifting [render_moving] best 4310615 combination zp[1]:31 [ 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[1]:32 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] reg byte a [ render_moving::current_cell#0 ] zp[1]:133 [ render_moving::$1 ] zp[1]:134 [ render_moving::$6 ] zp[1]:30 [ render_moving::l#4 render_moving::l#1 ] zp[2]:135 [ render_moving::screen_line#0 ] zp[1]:29 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] +Uplifting [render_moving] best 4305495 combination zp[1]:31 [ 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[1]:32 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] reg byte a [ render_moving::current_cell#0 ] zp[1]:133 [ render_moving::$1 ] zp[1]:134 [ render_moving::$6 ] zp[1]:30 [ render_moving::l#4 render_moving::l#1 ] zp[2]:135 [ render_moving::screen_line#0 ] zp[1]:29 [ 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 4295611 combination zp[2]:18 [ 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[2]:20 [ 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[1]:17 [ render_next::l#7 render_next::l#1 ] zp[1]:131 [ render_next::next_piece_char#0 ] reg byte y [ render_next::$6 ] +Uplifting [render_next] best 4290491 combination zp[2]:18 [ 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[2]:20 [ 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[1]:17 [ render_next::l#7 render_next::l#1 ] zp[1]:131 [ 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 4281605 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 4280605 combination zp[2]:37 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] zp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] zp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$0 ] reg byte a [ render_playfield::$3 ] zp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] +Uplifting [play_increase_level] best 4276485 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 4275485 combination zp[2]:37 [ render_playfield::screen_line#2 render_playfield::screen_line#0 render_playfield::screen_line#1 ] zp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] zp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] reg byte a [ render_playfield::$0 ] reg byte a [ render_playfield::$3 ] zp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] Limited combination testing to 100 combinations of 128 possible. -Uplifting [keyboard_matrix_read] best 4268599 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 4266499 combination zp[2]:107 [ 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[2]:109 [ 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[2]:103 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] zp[2]:105 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] zp[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] -Uplifting [play_spawn_current] best 4260480 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[1]:172 [ play_spawn_current::$7 ] -Uplifting [main] best 4259280 combination reg byte a [ main::render#1 ] reg byte x [ main::key_event#0 ] -Uplifting [play_movement] best 4258668 combination reg byte a [ play_movement::return#3 ] zp[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] zp[1]:123 [ play_movement::key_event#0 ] reg byte a [ play_movement::$3 ] reg byte a [ play_movement::$4 ] zp[1]:145 [ play_movement::render#2 ] +Uplifting [keyboard_matrix_read] best 4263479 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 4261379 combination zp[2]:107 [ 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[2]:109 [ 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[2]:103 [ render_screen_original::oscr#2 render_screen_original::oscr#4 render_screen_original::oscr#1 ] zp[2]:105 [ render_screen_original::ocols#2 render_screen_original::ocols#4 render_screen_original::ocols#1 ] zp[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] +Uplifting [play_spawn_current] best 4255360 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[1]:172 [ play_spawn_current::$7 ] +Uplifting [main] best 4254160 combination reg byte a [ main::render#1 ] reg byte x [ main::key_event#0 ] +Uplifting [play_movement] best 4253548 combination reg byte a [ play_movement::return#3 ] zp[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] zp[1]:123 [ play_movement::key_event#0 ] reg byte a [ play_movement::$3 ] reg byte a [ play_movement::$4 ] zp[1]:145 [ play_movement::render#2 ] Limited combination testing to 100 combinations of 576 possible. -Uplifting [keyboard_event_get] best 4257762 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 4257552 combination reg byte a [ play_init::$3 ] zp[1]:94 [ play_init::b#2 play_init::b#1 ] reg byte y [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::$2 ] zp[1]:93 [ play_init::idx#2 play_init::idx#1 ] zp[2]:91 [ play_init::pli#2 play_init::pli#1 ] +Uplifting [keyboard_event_get] best 4252642 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 4252432 combination reg byte a [ play_init::$3 ] zp[1]:94 [ play_init::b#2 play_init::b#1 ] reg byte y [ play_init::j#2 play_init::j#1 ] reg byte x [ play_init::$2 ] zp[1]:93 [ play_init::idx#2 play_init::idx#1 ] zp[2]:91 [ play_init::pli#2 play_init::pli#1 ] Limited combination testing to 100 combinations of 432 possible. -Uplifting [render_bcd] best 4257522 combination zp[2]:7 [ 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[2]:13 [ 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[1]:129 [ render_bcd::$4 ] zp[2]:9 [ render_bcd::offset#6 ] zp[1]:11 [ render_bcd::only_low#6 ] +Uplifting [render_bcd] best 4252402 combination zp[2]:7 [ 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[2]:13 [ 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[1]:129 [ render_bcd::$4 ] zp[2]:9 [ render_bcd::offset#6 ] zp[1]:11 [ render_bcd::only_low#6 ] Limited combination testing to 100 combinations of 1536 possible. -Uplifting [render_init] best 4257352 combination reg byte y [ render_init::i#2 render_init::i#1 ] reg byte x [ render_init::$5 ] zp[2]:100 [ render_init::li_2#2 render_init::li_2#1 ] zp[2]:98 [ render_init::li_1#2 render_init::li_1#1 ] -Uplifting [sprites_init] best 4257182 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] -Uplifting [play_move_down] best 4257149 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[1]:169 [ play_move_down::removed#0 ] zp[1]:140 [ play_move_down::key_event#0 ] zp[1]:68 [ play_move_down::return#3 ] +Uplifting [render_init] best 4252232 combination reg byte y [ render_init::i#2 render_init::i#1 ] reg byte x [ render_init::$5 ] zp[2]:100 [ render_init::li_2#2 render_init::li_2#1 ] zp[2]:98 [ render_init::li_1#2 render_init::li_1#1 ] +Uplifting [sprites_init] best 4252062 combination reg byte y [ sprites_init::s#2 sprites_init::s#1 ] reg byte x [ sprites_init::s2#0 ] zp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] +Uplifting [play_move_down] best 4252029 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[1]:169 [ play_move_down::removed#0 ] zp[1]:140 [ play_move_down::key_event#0 ] zp[1]:68 [ play_move_down::return#3 ] Limited combination testing to 100 combinations of 12288 possible. -Uplifting [keyboard_event_pressed] best 4257129 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[1]:201 [ keyboard_event_pressed::return#1 ] zp[1]:203 [ keyboard_event_pressed::return#2 ] zp[1]:205 [ keyboard_event_pressed::return#10 ] zp[1]:193 [ keyboard_event_pressed::row_bits#0 ] zp[1]:195 [ keyboard_event_pressed::return#11 ] zp[1]:83 [ keyboard_event_pressed::keycode#5 ] +Uplifting [keyboard_event_pressed] best 4252009 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[1]:201 [ keyboard_event_pressed::return#1 ] zp[1]:203 [ keyboard_event_pressed::return#2 ] zp[1]:205 [ keyboard_event_pressed::return#10 ] zp[1]:193 [ keyboard_event_pressed::row_bits#0 ] zp[1]:195 [ keyboard_event_pressed::return#11 ] zp[1]:83 [ keyboard_event_pressed::keycode#5 ] Limited combination testing to 100 combinations of 589824 possible. -Uplifting [sprites_irq] best 4257105 combination zp[1]:218 [ sprites_irq::raster_sprite_gfx_modify ] 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[1]:222 [ sprites_irq::ptr#1 ] zp[1]:216 [ sprites_irq::ypos#0 ] zp[1]:219 [ sprites_irq::ptr#0 ] +Uplifting [sprites_irq] best 4251985 combination zp[1]:218 [ sprites_irq::raster_sprite_gfx_modify ] 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[1]:222 [ sprites_irq::ptr#1 ] zp[1]:216 [ sprites_irq::ypos#0 ] zp[1]:219 [ sprites_irq::ptr#0 ] Limited combination testing to 100 combinations of 12288 possible. -Uplifting [play_move_rotate] best 4257087 combination zp[1]:42 [ 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[1]:152 [ play_move_rotate::$7 ] zp[1]:146 [ play_move_rotate::key_event#0 ] zp[1]:41 [ play_move_rotate::return#2 ] +Uplifting [play_move_rotate] best 4251967 combination zp[1]:42 [ 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[1]:152 [ play_move_rotate::$7 ] zp[1]:146 [ play_move_rotate::key_event#0 ] zp[1]:41 [ play_move_rotate::return#2 ] Limited combination testing to 100 combinations of 12288 possible. -Uplifting [play_update_score] best 4257065 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[4]:179 [ play_update_score::add_bcd#0 ] zp[1]:170 [ play_update_score::removed#0 ] zp[1]:177 [ play_update_score::lines_before#0 ] +Uplifting [play_update_score] best 4251945 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[4]:179 [ play_update_score::add_bcd#0 ] zp[1]:170 [ play_update_score::removed#0 ] zp[1]:177 [ play_update_score::lines_before#0 ] Limited combination testing to 100 combinations of 2304 possible. -Uplifting [play_move_leftright] best 4257038 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[1]:53 [ play_move_leftright::return#2 ] +Uplifting [play_move_leftright] best 4251918 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[1]:53 [ play_move_leftright::return#2 ] Limited combination testing to 100 combinations of 1024 possible. -Uplifting [render_show] best 4257029 combination reg byte a [ render_show::d018val#3 ] -Uplifting [render_score] best 4257029 combination zp[2]:5 [ render_score::screen#3 ] -Uplifting [sid_rnd_init] best 4257029 combination -Uplifting [render_screen_swap] best 4257029 combination -Uplifting [sprites_irq_init] best 4257029 combination +Uplifting [render_show] best 4251909 combination reg byte a [ render_show::d018val#3 ] +Uplifting [render_score] best 4251909 combination zp[2]:5 [ render_score::screen#3 ] +Uplifting [sid_rnd_init] best 4251909 combination +Uplifting [render_screen_swap] best 4251909 combination +Uplifting [sprites_irq_init] best 4251909 combination Attempting to uplift remaining variables inzp[1]:88 [ 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 4257029 combination zp[1]:88 [ 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 4251909 combination zp[1]:88 [ 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[1]:49 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] -Uplifting [play_collision] best 4257029 combination zp[1]:49 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] +Uplifting [play_collision] best 4251909 combination zp[1]:49 [ play_collision::i#2 play_collision::i#3 play_collision::i#10 play_collision::i#12 ] Attempting to uplift remaining variables inzp[1]:80 [ 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 4257029 combination zp[1]:80 [ 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 4251909 combination zp[1]:80 [ 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[1]:86 [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] -Uplifting [keyboard_event_scan] best 4107029 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] +Uplifting [keyboard_event_scan] best 4101909 combination reg byte x [ keyboard_event_scan::col#2 keyboard_event_scan::col#1 ] Attempting to uplift remaining variables inzp[1]:75 [ play_remove_lines::x#2 play_remove_lines::x#1 ] -Uplifting [play_remove_lines] best 4107029 combination zp[1]:75 [ play_remove_lines::x#2 play_remove_lines::x#1 ] +Uplifting [play_remove_lines] best 4101909 combination zp[1]:75 [ play_remove_lines::x#2 play_remove_lines::x#1 ] Attempting to uplift remaining variables inzp[1]:81 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] -Uplifting [play_lock_current] best 4107029 combination zp[1]:81 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] +Uplifting [play_lock_current] best 4101909 combination zp[1]:81 [ play_lock_current::xp#2 play_lock_current::xp#0 play_lock_current::xp#1 ] Attempting to uplift remaining variables inzp[1]:50 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] -Uplifting [play_collision] best 4107029 combination zp[1]:50 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] +Uplifting [play_collision] best 4101909 combination zp[1]:50 [ play_collision::xp#2 play_collision::xp#8 play_collision::xp#1 ] Attempting to uplift remaining variables inzp[1]:87 [ 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 4107029 combination zp[1]:87 [ 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 4101909 combination zp[1]:87 [ 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[1]:76 [ play_remove_lines::full#4 play_remove_lines::full#2 ] -Uplifting [play_remove_lines] best 4107029 combination zp[1]:76 [ play_remove_lines::full#4 play_remove_lines::full#2 ] +Uplifting [play_remove_lines] best 4101909 combination zp[1]:76 [ play_remove_lines::full#4 play_remove_lines::full#2 ] Attempting to uplift remaining variables inzp[1]:187 [ play_remove_lines::c#0 ] -Uplifting [play_remove_lines] best 4107029 combination zp[1]:187 [ play_remove_lines::c#0 ] +Uplifting [play_remove_lines] best 4101909 combination zp[1]:187 [ play_remove_lines::c#0 ] Attempting to uplift remaining variables inzp[1]:31 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] -Uplifting [render_moving] best 4107029 combination zp[1]:31 [ render_moving::i#4 render_moving::i#3 render_moving::i#8 render_moving::i#2 render_moving::i#1 ] +Uplifting [render_moving] best 4101909 combination zp[1]:31 [ 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[1]:73 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] -Uplifting [play_remove_lines] best 4107029 combination zp[1]:73 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] +Uplifting [play_remove_lines] best 4101909 combination zp[1]:73 [ play_remove_lines::removed#11 play_remove_lines::removed#8 play_remove_lines::removed#1 ] Attempting to uplift remaining variables inzp[1]:191 [ play_lock_current::i#1 ] -Uplifting [play_lock_current] best 4107029 combination zp[1]:191 [ play_lock_current::i#1 ] +Uplifting [play_lock_current] best 4101909 combination zp[1]:191 [ play_lock_current::i#1 ] Attempting to uplift remaining variables inzp[1]:69 [ 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 4107029 combination zp[1]:69 [ 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 4101909 combination zp[1]:69 [ 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[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] -Uplifting [keyboard_event_scan] best 4107029 combination zp[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] +Uplifting [keyboard_event_scan] best 4101909 combination zp[1]:85 [ keyboard_event_scan::row#2 keyboard_event_scan::row#1 ] Attempting to uplift remaining variables inzp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] -Uplifting [render_playfield] best 4107029 combination zp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] +Uplifting [render_playfield] best 4101909 combination zp[1]:39 [ render_playfield::c#2 render_playfield::c#1 ] Attempting to uplift remaining variables inzp[1]:155 [ play_collision::$14 ] -Uplifting [play_collision] best 4103029 combination reg byte a [ play_collision::$14 ] +Uplifting [play_collision] best 4097909 combination reg byte a [ play_collision::$14 ] Attempting to uplift remaining variables inzp[1]:72 [ play_remove_lines::y#8 play_remove_lines::y#1 ] -Uplifting [play_remove_lines] best 4103029 combination zp[1]:72 [ play_remove_lines::y#8 play_remove_lines::y#1 ] +Uplifting [play_remove_lines] best 4097909 combination zp[1]:72 [ play_remove_lines::y#8 play_remove_lines::y#1 ] Attempting to uplift remaining variables inzp[1]:158 [ play_collision::i#1 ] -Uplifting [play_collision] best 4103029 combination zp[1]:158 [ play_collision::i#1 ] +Uplifting [play_collision] best 4097909 combination zp[1]:158 [ play_collision::i#1 ] Attempting to uplift remaining variables inzp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] -Uplifting [render_playfield] best 4103029 combination zp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] +Uplifting [render_playfield] best 4097909 combination zp[1]:36 [ render_playfield::i#2 render_playfield::i#3 render_playfield::i#1 ] Attempting to uplift remaining variables inzp[1]:32 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] -Uplifting [render_moving] best 4103029 combination zp[1]:32 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] +Uplifting [render_moving] best 4097909 combination zp[1]:32 [ render_moving::xpos#2 render_moving::xpos#0 render_moving::xpos#1 ] Attempting to uplift remaining variables inzp[1]:47 [ 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 4103029 combination zp[1]:47 [ 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 4097909 combination zp[1]:47 [ 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[1]:198 [ keyboard_event_scan::row_scan#0 ] -Uplifting [keyboard_event_scan] best 4103029 combination zp[1]:198 [ keyboard_event_scan::row_scan#0 ] +Uplifting [keyboard_event_scan] best 4097909 combination zp[1]:198 [ keyboard_event_scan::row_scan#0 ] Attempting to uplift remaining variables inzp[1]:79 [ play_lock_current::l#6 play_lock_current::l#1 ] -Uplifting [play_lock_current] best 4103029 combination zp[1]:79 [ play_lock_current::l#6 play_lock_current::l#1 ] +Uplifting [play_lock_current] best 4097909 combination zp[1]:79 [ play_lock_current::l#6 play_lock_current::l#1 ] Attempting to uplift remaining variables inzp[1]:48 [ play_collision::l#6 play_collision::l#1 ] -Uplifting [play_collision] best 4103029 combination zp[1]:48 [ play_collision::l#6 play_collision::l#1 ] +Uplifting [play_collision] best 4097909 combination zp[1]:48 [ play_collision::l#6 play_collision::l#1 ] Attempting to uplift remaining variables inzp[1]:78 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] -Uplifting [play_lock_current] best 4103029 combination zp[1]:78 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] +Uplifting [play_lock_current] best 4097909 combination zp[1]:78 [ play_lock_current::yp#2 play_lock_current::yp#0 play_lock_current::yp#1 ] Attempting to uplift remaining variables inzp[1]:133 [ render_moving::$1 ] -Uplifting [render_moving] best 4102429 combination reg byte a [ render_moving::$1 ] +Uplifting [render_moving] best 4097309 combination reg byte a [ render_moving::$1 ] Attempting to uplift remaining variables inzp[1]:134 [ render_moving::$6 ] -Uplifting [render_moving] best 4102029 combination reg byte a [ render_moving::$6 ] +Uplifting [render_moving] best 4096909 combination reg byte a [ render_moving::$6 ] Attempting to uplift remaining variables inzp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] -Uplifting [] best 4102029 combination zp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] +Uplifting [] best 4096909 combination zp[1]:63 [ current_piece_char#29 current_piece_char#10 current_piece_char#16 current_piece_char#5 ] Attempting to uplift remaining variables inzp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] -Uplifting [render_playfield] best 4102029 combination zp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] +Uplifting [render_playfield] best 4096909 combination zp[1]:35 [ render_playfield::l#2 render_playfield::l#1 ] Attempting to uplift remaining variables inzp[1]:17 [ render_next::l#7 render_next::l#1 ] -Uplifting [render_next] best 4102029 combination zp[1]:17 [ render_next::l#7 render_next::l#1 ] +Uplifting [render_next] best 4096909 combination zp[1]:17 [ render_next::l#7 render_next::l#1 ] Attempting to uplift remaining variables inzp[1]:30 [ render_moving::l#4 render_moving::l#1 ] -Uplifting [render_moving] best 4102029 combination zp[1]:30 [ render_moving::l#4 render_moving::l#1 ] +Uplifting [render_moving] best 4096909 combination zp[1]:30 [ render_moving::l#4 render_moving::l#1 ] Attempting to uplift remaining variables inzp[1]:29 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] -Uplifting [render_moving] best 4102029 combination zp[1]:29 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] +Uplifting [render_moving] best 4096909 combination zp[1]:29 [ render_moving::ypos#2 render_moving::ypos#0 render_moving::ypos#1 ] Attempting to uplift remaining variables inzp[1]:28 [ current_piece_char#68 current_piece_char#99 current_piece_char#100 ] -Uplifting [] best 4102029 combination zp[1]:28 [ current_piece_char#68 current_piece_char#99 current_piece_char#100 ] +Uplifting [] best 4096909 combination zp[1]:28 [ current_piece_char#68 current_piece_char#99 current_piece_char#100 ] Attempting to uplift remaining variables inzp[1]:131 [ render_next::next_piece_char#0 ] -Uplifting [render_next] best 4102029 combination zp[1]:131 [ render_next::next_piece_char#0 ] +Uplifting [render_next] best 4096909 combination zp[1]:131 [ render_next::next_piece_char#0 ] Attempting to uplift remaining variables inzp[1]:46 [ 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 4102029 combination zp[1]:46 [ 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 4096909 combination zp[1]:46 [ 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[1]:67 [ 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 4102029 combination zp[1]:67 [ 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 4096909 combination zp[1]:67 [ 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[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] -Uplifting [play_movement] best 4102029 combination zp[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] +Uplifting [play_movement] best 4096909 combination zp[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] Attempting to uplift remaining variables inzp[1]:94 [ play_init::b#2 play_init::b#1 ] -Uplifting [play_init] best 4101929 combination reg byte x [ play_init::b#2 play_init::b#1 ] +Uplifting [play_init] best 4096809 combination reg byte x [ play_init::b#2 play_init::b#1 ] Attempting to uplift remaining variables inzp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] -Uplifting [] best 4101929 combination zp[1]:60 [ level_bcd#31 level_bcd#11 level_bcd#17 level_bcd#19 level_bcd#62 level_bcd#21 level_bcd#8 ] +Uplifting [] best 4096809 combination zp[1]:60 [ 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[1]:45 [ play_collision::orientation#5 play_collision::orientation#0 play_collision::orientation#1 play_collision::orientation#2 play_collision::orientation#3 ] -Uplifting [play_collision] best 4101913 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 4096793 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[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] -Uplifting [render_screen_original] best 4101913 combination zp[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] +Uplifting [render_screen_original] best 4096793 combination zp[1]:102 [ render_screen_original::y#6 render_screen_original::y#1 ] Attempting to uplift remaining variables inzp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] -Uplifting [] best 4101913 combination zp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] +Uplifting [] best 4096793 combination zp[1]:64 [ current_orientation#37 current_orientation#13 current_orientation#17 current_orientation#20 current_orientation#25 current_orientation#7 ] Attempting to uplift remaining variables inzp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] -Uplifting [] best 4101913 combination zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] +Uplifting [] best 4096793 combination zp[1]:59 [ current_movedown_slow#37 current_movedown_slow#14 current_movedown_slow#21 current_movedown_slow#1 current_movedown_slow#23 current_movedown_slow#65 current_movedown_slow#10 ] Attempting to uplift remaining variables inzp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] -Uplifting [sprites_init] best 4101913 combination zp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] +Uplifting [sprites_init] best 4096793 combination zp[1]:96 [ sprites_init::xpos#2 sprites_init::xpos#1 ] Attempting to uplift remaining variables inzp[1]:55 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] -Uplifting [] best 4101913 combination zp[1]:55 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] +Uplifting [] best 4096793 combination zp[1]:55 [ current_ypos#38 current_ypos#3 current_ypos#11 current_ypos#19 current_ypos#6 ] Attempting to uplift remaining variables inzp[1]:70 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] -Uplifting [] best 4101913 combination zp[1]:70 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] +Uplifting [] best 4096793 combination zp[1]:70 [ game_over#65 game_over#27 game_over#10 game_over#15 game_over#52 ] Attempting to uplift remaining variables inzp[1]:25 [ current_xpos#59 current_xpos#118 current_xpos#119 ] -Uplifting [] best 4101913 combination zp[1]:25 [ current_xpos#59 current_xpos#118 current_xpos#119 ] +Uplifting [] best 4096793 combination zp[1]:25 [ current_xpos#59 current_xpos#118 current_xpos#119 ] Attempting to uplift remaining variables inzp[1]:93 [ play_init::idx#2 play_init::idx#1 ] -Uplifting [play_init] best 4101913 combination zp[1]:93 [ play_init::idx#2 play_init::idx#1 ] +Uplifting [play_init] best 4096793 combination zp[1]:93 [ play_init::idx#2 play_init::idx#1 ] Attempting to uplift remaining variables inzp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] -Uplifting [] best 4101913 combination zp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] +Uplifting [] best 4096793 combination zp[1]:58 [ level#33 level#10 level#17 level#19 level#21 ] Attempting to uplift remaining variables inzp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] -Uplifting [] best 4101913 combination zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] +Uplifting [] best 4096793 combination zp[1]:4 [ current_movedown_counter#16 current_movedown_counter#14 current_movedown_counter#12 ] Attempting to uplift remaining variables inzp[1]:24 [ render_screen_render#33 render_screen_render#64 ] -Uplifting [] best 4101913 combination zp[1]:24 [ render_screen_render#33 render_screen_render#64 ] +Uplifting [] best 4096793 combination zp[1]:24 [ render_screen_render#33 render_screen_render#64 ] Attempting to uplift remaining variables inzp[1]:2 [ render_screen_show#16 render_screen_show#13 ] -Uplifting [] best 4101913 combination zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] +Uplifting [] best 4096793 combination zp[1]:2 [ render_screen_show#16 render_screen_show#13 ] Attempting to uplift remaining variables inzp[1]:123 [ play_movement::key_event#0 ] -Uplifting [play_movement] best 4101913 combination zp[1]:123 [ play_movement::key_event#0 ] +Uplifting [play_movement] best 4096793 combination zp[1]:123 [ play_movement::key_event#0 ] Attempting to uplift remaining variables inzp[1]:42 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] -Uplifting [play_move_rotate] best 4101913 combination zp[1]:42 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] +Uplifting [play_move_rotate] best 4096793 combination zp[1]:42 [ play_move_rotate::orientation#3 play_move_rotate::orientation#1 play_move_rotate::orientation#2 ] Attempting to uplift remaining variables inzp[1]:3 [ render_screen_render#18 render_screen_render#11 ] -Uplifting [] best 4101913 combination zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] +Uplifting [] best 4096793 combination zp[1]:3 [ render_screen_render#18 render_screen_render#11 ] Attempting to uplift remaining variables inzp[1]:218 [ sprites_irq::raster_sprite_gfx_modify ] -Uplifting [sprites_irq] best 4101913 combination zp[1]:218 [ sprites_irq::raster_sprite_gfx_modify ] +Uplifting [sprites_irq] best 4096793 combination zp[1]:218 [ sprites_irq::raster_sprite_gfx_modify ] Attempting to uplift remaining variables inzp[1]:129 [ render_bcd::$4 ] -Uplifting [render_bcd] best 4101907 combination reg byte a [ render_bcd::$4 ] +Uplifting [render_bcd] best 4096787 combination reg byte a [ render_bcd::$4 ] Attempting to uplift remaining variables inzp[1]:150 [ play_collision::return#14 ] -Uplifting [play_collision] best 4101901 combination reg byte a [ play_collision::return#14 ] +Uplifting [play_collision] best 4096781 combination reg byte a [ play_collision::return#14 ] Attempting to uplift remaining variables inzp[1]:152 [ play_move_rotate::$7 ] -Uplifting [play_move_rotate] best 4101895 combination reg byte x [ play_move_rotate::$7 ] +Uplifting [play_move_rotate] best 4096775 combination reg byte x [ play_move_rotate::$7 ] Attempting to uplift remaining variables inzp[1]:160 [ play_collision::return#13 ] -Uplifting [play_collision] best 4101889 combination reg byte a [ play_collision::return#13 ] +Uplifting [play_collision] best 4096769 combination reg byte a [ play_collision::return#13 ] Attempting to uplift remaining variables inzp[1]:162 [ play_collision::return#1 ] -Uplifting [play_collision] best 4101883 combination reg byte a [ play_collision::return#1 ] +Uplifting [play_collision] best 4096763 combination reg byte a [ play_collision::return#1 ] Attempting to uplift remaining variables inzp[1]:166 [ play_collision::return#0 ] -Uplifting [play_collision] best 4101877 combination reg byte a [ play_collision::return#0 ] +Uplifting [play_collision] best 4096757 combination reg byte a [ play_collision::return#0 ] Attempting to uplift remaining variables inzp[1]:168 [ play_remove_lines::return#0 ] -Uplifting [play_remove_lines] best 4101871 combination reg byte a [ play_remove_lines::return#0 ] +Uplifting [play_remove_lines] best 4096751 combination reg byte a [ play_remove_lines::return#0 ] Attempting to uplift remaining variables inzp[1]:169 [ play_move_down::removed#0 ] -Uplifting [play_move_down] best 4101865 combination reg byte a [ play_move_down::removed#0 ] +Uplifting [play_move_down] best 4096745 combination reg byte a [ play_move_down::removed#0 ] Attempting to uplift remaining variables inzp[1]:173 [ play_collision::return#10 ] -Uplifting [play_collision] best 4101859 combination reg byte a [ play_collision::return#10 ] +Uplifting [play_collision] best 4096739 combination reg byte a [ play_collision::return#10 ] Attempting to uplift remaining variables inzp[1]:200 [ keyboard_event_scan::$0 ] -Uplifting [keyboard_event_scan] best 4101853 combination reg byte a [ keyboard_event_scan::$0 ] +Uplifting [keyboard_event_scan] best 4096733 combination reg byte a [ keyboard_event_scan::$0 ] Attempting to uplift remaining variables inzp[1]:201 [ keyboard_event_pressed::return#1 ] -Uplifting [keyboard_event_pressed] best 4101847 combination reg byte a [ keyboard_event_pressed::return#1 ] +Uplifting [keyboard_event_pressed] best 4096727 combination reg byte a [ keyboard_event_pressed::return#1 ] Attempting to uplift remaining variables inzp[1]:202 [ keyboard_event_scan::$3 ] -Uplifting [keyboard_event_scan] best 4101841 combination reg byte a [ keyboard_event_scan::$3 ] +Uplifting [keyboard_event_scan] best 4096721 combination reg byte a [ keyboard_event_scan::$3 ] Attempting to uplift remaining variables inzp[1]:203 [ keyboard_event_pressed::return#2 ] -Uplifting [keyboard_event_pressed] best 4101835 combination reg byte a [ keyboard_event_pressed::return#2 ] +Uplifting [keyboard_event_pressed] best 4096715 combination reg byte a [ keyboard_event_pressed::return#2 ] Attempting to uplift remaining variables inzp[1]:204 [ keyboard_event_scan::$6 ] -Uplifting [keyboard_event_scan] best 4101829 combination reg byte a [ keyboard_event_scan::$6 ] +Uplifting [keyboard_event_scan] best 4096709 combination reg byte a [ keyboard_event_scan::$6 ] Attempting to uplift remaining variables inzp[1]:205 [ keyboard_event_pressed::return#10 ] -Uplifting [keyboard_event_pressed] best 4101823 combination reg byte a [ keyboard_event_pressed::return#10 ] +Uplifting [keyboard_event_pressed] best 4096703 combination reg byte a [ keyboard_event_pressed::return#10 ] Attempting to uplift remaining variables inzp[1]:206 [ keyboard_event_scan::$9 ] -Uplifting [keyboard_event_scan] best 4101817 combination reg byte a [ keyboard_event_scan::$9 ] +Uplifting [keyboard_event_scan] best 4096697 combination reg byte a [ keyboard_event_scan::$9 ] Attempting to uplift remaining variables inzp[1]:146 [ play_move_rotate::key_event#0 ] -Uplifting [play_move_rotate] best 4101808 combination reg byte a [ play_move_rotate::key_event#0 ] +Uplifting [play_move_rotate] best 4096688 combination reg byte a [ play_move_rotate::key_event#0 ] Attempting to uplift remaining variables inzp[1]:222 [ sprites_irq::ptr#1 ] -Uplifting [sprites_irq] best 4101796 combination reg byte x [ sprites_irq::ptr#1 ] +Uplifting [sprites_irq] best 4096676 combination reg byte x [ sprites_irq::ptr#1 ] Attempting to uplift remaining variables inzp[1]:216 [ sprites_irq::ypos#0 ] -Uplifting [sprites_irq] best 4101781 combination reg byte a [ sprites_irq::ypos#0 ] +Uplifting [sprites_irq] best 4096661 combination reg byte a [ sprites_irq::ypos#0 ] Attempting to uplift remaining variables inzp[1]:219 [ sprites_irq::ptr#0 ] -Uplifting [sprites_irq] best 4101766 combination reg byte x [ sprites_irq::ptr#0 ] +Uplifting [sprites_irq] best 4096646 combination reg byte x [ sprites_irq::ptr#0 ] Attempting to uplift remaining variables inzp[1]:140 [ play_move_down::key_event#0 ] -Uplifting [play_move_down] best 4101760 combination reg byte a [ play_move_down::key_event#0 ] +Uplifting [play_move_down] best 4096640 combination reg byte a [ play_move_down::key_event#0 ] Attempting to uplift remaining variables inzp[1]:193 [ keyboard_event_pressed::row_bits#0 ] -Uplifting [keyboard_event_pressed] best 4101760 combination zp[1]:193 [ keyboard_event_pressed::row_bits#0 ] +Uplifting [keyboard_event_pressed] best 4096640 combination zp[1]:193 [ keyboard_event_pressed::row_bits#0 ] Attempting to uplift remaining variables inzp[1]:195 [ keyboard_event_pressed::return#11 ] -Uplifting [keyboard_event_pressed] best 4101742 combination reg byte a [ keyboard_event_pressed::return#11 ] +Uplifting [keyboard_event_pressed] best 4096622 combination reg byte a [ keyboard_event_pressed::return#11 ] Attempting to uplift remaining variables inzp[1]:52 [ play_collision::return#15 ] -Uplifting [play_collision] best 4101712 combination reg byte a [ play_collision::return#15 ] +Uplifting [play_collision] best 4096592 combination reg byte a [ play_collision::return#15 ] Attempting to uplift remaining variables inzp[1]:83 [ keyboard_event_pressed::keycode#5 ] -Uplifting [keyboard_event_pressed] best 4101712 combination zp[1]:83 [ keyboard_event_pressed::keycode#5 ] +Uplifting [keyboard_event_pressed] best 4096592 combination zp[1]:83 [ keyboard_event_pressed::keycode#5 ] Attempting to uplift remaining variables inzp[1]:170 [ play_update_score::removed#0 ] -Uplifting [play_update_score] best 4101706 combination reg byte x [ play_update_score::removed#0 ] +Uplifting [play_update_score] best 4096586 combination reg byte x [ play_update_score::removed#0 ] Attempting to uplift remaining variables inzp[1]:11 [ render_bcd::only_low#6 ] -Uplifting [render_bcd] best 4101685 combination reg byte y [ render_bcd::only_low#6 ] +Uplifting [render_bcd] best 4096565 combination reg byte y [ render_bcd::only_low#6 ] Attempting to uplift remaining variables inzp[1]:145 [ play_movement::render#2 ] -Uplifting [play_movement] best 4101685 combination zp[1]:145 [ play_movement::render#2 ] +Uplifting [play_movement] best 4096565 combination zp[1]:145 [ play_movement::render#2 ] Attempting to uplift remaining variables inzp[1]:41 [ play_move_rotate::return#2 ] -Uplifting [play_move_rotate] best 4101676 combination reg byte a [ play_move_rotate::return#2 ] +Uplifting [play_move_rotate] best 4096556 combination reg byte a [ play_move_rotate::return#2 ] Attempting to uplift remaining variables inzp[1]:53 [ play_move_leftright::return#2 ] -Uplifting [play_move_leftright] best 4101667 combination reg byte a [ play_move_leftright::return#2 ] +Uplifting [play_move_leftright] best 4096547 combination reg byte a [ play_move_leftright::return#2 ] Attempting to uplift remaining variables inzp[1]:68 [ play_move_down::return#3 ] -Uplifting [play_move_down] best 4101660 combination reg byte x [ play_move_down::return#3 ] +Uplifting [play_move_down] best 4096540 combination reg byte x [ play_move_down::return#3 ] Attempting to uplift remaining variables inzp[1]:112 [ render_screen_showing ] -Uplifting [] best 4101660 combination zp[1]:112 [ render_screen_showing ] +Uplifting [] best 4096540 combination zp[1]:112 [ render_screen_showing ] Attempting to uplift remaining variables inzp[1]:118 [ irq_sprite_ypos ] -Uplifting [] best 4101660 combination zp[1]:118 [ irq_sprite_ypos ] +Uplifting [] best 4096540 combination zp[1]:118 [ irq_sprite_ypos ] Attempting to uplift remaining variables inzp[1]:120 [ irq_cnt ] -Uplifting [] best 4101660 combination zp[1]:120 [ irq_cnt ] +Uplifting [] best 4096540 combination zp[1]:120 [ irq_cnt ] Attempting to uplift remaining variables inzp[1]:119 [ irq_sprite_ptr ] -Uplifting [] best 4101660 combination zp[1]:119 [ irq_sprite_ptr ] +Uplifting [] best 4096540 combination zp[1]:119 [ irq_sprite_ptr ] Attempting to uplift remaining variables inzp[1]:117 [ irq_raster_next ] -Uplifting [] best 4101660 combination zp[1]:117 [ irq_raster_next ] +Uplifting [] best 4096540 combination zp[1]:117 [ irq_raster_next ] Attempting to uplift remaining variables inzp[1]:177 [ play_update_score::lines_before#0 ] -Uplifting [play_update_score] best 4101660 combination zp[1]:177 [ play_update_score::lines_before#0 ] +Uplifting [play_update_score] best 4096540 combination zp[1]:177 [ play_update_score::lines_before#0 ] Attempting to uplift remaining variables inzp[1]:172 [ play_spawn_current::$7 ] -Uplifting [play_spawn_current] best 4101660 combination zp[1]:172 [ play_spawn_current::$7 ] +Uplifting [play_spawn_current] best 4096540 combination zp[1]:172 [ play_spawn_current::$7 ] Coalescing zero page register [ zp[2]:5 [ render_score::screen#3 ] ] with [ zp[2]:7 [ 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[1]:40 [ play_movement::return#2 play_movement::render#1 play_movement::return#0 ] ] with [ zp[1]:145 [ play_movement::render#2 ] ] - score: 2 Coalescing zero page register [ zp[2]:9 [ render_bcd::offset#6 ] ] with [ zp[2]:13 [ render_bcd::screen_pos#3 render_bcd::screen_pos#0 render_bcd::screen_pos#2 ] ] - score: 1 @@ -16781,9 +16760,9 @@ Allocated (was zp[1]:193) zp[1]:45 [ keyboard_event_pressed::row_bits#0 play_spa Allocated (was zp[1]:198) zp[1]:46 [ keyboard_event_scan::row_scan#0 play_lock_current::i#1 play_collision::i#1 ] Allocated (was zp[1]:218) zp[1]:47 [ sprites_irq::raster_sprite_gfx_modify ] Interrupt procedure sprites_irq clobbers AXCNZV -Removing interrupt register storage sty regy+1 in 1185 entry interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage regy: in 1219 [576] return - exit interrupt(HARDWARE_CLOBBER) -Removing interrupt register storage ldy #00 in 1219 [576] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage sty regy+1 in 1183 entry interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage regy: in 1217 [574] return - exit interrupt(HARDWARE_CLOBBER) +Removing interrupt register storage ldy #00 in 1217 [574] return - exit interrupt(HARDWARE_CLOBBER) ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -16881,12 +16860,8 @@ ASSEMBLER BEFORE OPTIMIZATION .label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS // Screen Sprite pointers on screen 2 .label PLAYFIELD_SPRITE_PTRS_2 = PLAYFIELD_SCREEN_2+SPRITE_PTRS - // Address of the original playscreen chars - .label PLAYFIELD_SCREEN_ORIGINAL = $3000 - // Address of the original playscreen colors - .label PLAYFIELD_COLORS_ORIGINAL = $1c00 // Address of the sprites covering the playfield - .label PLAYFIELD_SPRITES = $2000 + .label PLAYFIELD_SPRITES = $3000 // Address of the charset .label PLAYFIELD_CHARSET = $2800 // The size of the playfield @@ -16978,9 +16953,6 @@ __b1: lda #>0>>$10 sta.z score_bcd+3 // kickasm(location (const byte*) PLAYFIELD_CHARSET) {{ .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" }} - // kickasm(location (const byte*) PLAYFIELD_SCREEN_ORIGINAL) {{ // Load chars for the screen .var screen = LoadBinary("playfield-screen.iscr") // Load extended colors for the screen .var extended = LoadBinary("playfield-extended.col") // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) // <<6 to move extended colors to the upper 2 bits .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) }} - // kickasm(location (const byte*) PLAYFIELD_COLORS_ORIGINAL) {{ .import binary "playfield-screen.col" }} - // Original Color Data jmp __b2 // @2 __b2: @@ -16988,15 +16960,15 @@ __b2: jmp __b3 // @3 __b3: - // [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 + // [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 // The raster line of the next IRQ lda #IRQ_RASTER_FIRST sta.z irq_raster_next - // [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 -- vbuz1=vbuc1 + // [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 -- vbuz1=vbuc1 // Y-pos of the sprites on the next IRQ lda #SPRITES_FIRST_YPOS+$15 sta.z irq_sprite_ypos - // [9] phi from @3 to toSpritePtr1 [phi:@3->toSpritePtr1] + // [7] phi from @3 to toSpritePtr1 [phi:@3->toSpritePtr1] toSpritePtr1_from___b3: jmp toSpritePtr1 // toSpritePtr1 @@ -17004,212 +16976,212 @@ toSpritePtr1: jmp __b5 // @5 __b5: - // [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 + // [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 // Index of the sprites to show on the next IRQ lda #toSpritePtr1_return+3 sta.z irq_sprite_ptr - // [11] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 + // [9] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 // Counting the 10 IRQs lda #0 sta.z irq_cnt - // [12] phi from @5 to @4 [phi:@5->@4] + // [10] phi from @5 to @4 [phi:@5->@4] __b4_from___b5: jmp __b4 // @4 __b4: - // [13] call main - // [15] phi from @4 to main [phi:@4->main] + // [11] call main + // [13] phi from @4 to main [phi:@4->main] main_from___b4: jsr main - // [14] phi from @4 to @end [phi:@4->@end] + // [12] phi from @4 to @end [phi:@4->@end] __bend_from___b4: jmp __bend // @end __bend: // main main: { - // [16] call sid_rnd_init + // [14] call sid_rnd_init jsr sid_rnd_init jmp __b8 // main::@8 __b8: // asm { sei } sei - // [18] call render_init - // [498] phi from main::@8 to render_init [phi:main::@8->render_init] + // [16] call render_init + // [496] phi from main::@8 to render_init [phi:main::@8->render_init] render_init_from___b8: jsr render_init - // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9] + // [17] phi from main::@8 to main::@9 [phi:main::@8->main::@9] __b9_from___b8: jmp __b9 // main::@9 __b9: - // [20] call sprites_init + // [18] call sprites_init jsr sprites_init - // [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + // [19] phi from main::@9 to main::@10 [phi:main::@9->main::@10] __b10_from___b9: jmp __b10 // main::@10 __b10: - // [22] call sprites_irq_init + // [20] call sprites_irq_init jsr sprites_irq_init - // [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11] + // [21] phi from main::@10 to main::@11 [phi:main::@10->main::@11] __b11_from___b10: jmp __b11 // main::@11 __b11: - // [24] call play_init - // [457] phi from main::@11 to play_init [phi:main::@11->play_init] + // [22] call play_init + // [455] phi from main::@11 to play_init [phi:main::@11->play_init] play_init_from___b11: jsr play_init - // [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12] + // [23] phi from main::@11 to main::@12 [phi:main::@11->main::@12] __b12_from___b11: jmp __b12 // main::@12 __b12: - // [26] call play_spawn_current - // [287] phi from main::@12 to play_spawn_current [phi:main::@12->play_spawn_current] + // [24] call play_spawn_current + // [285] phi from main::@12 to play_spawn_current [phi:main::@12->play_spawn_current] play_spawn_current_from___b12: - // [287] phi (byte) game_over#65 = (byte) 0 [phi:main::@12->play_spawn_current#0] -- vbuz1=vbuc1 + // [285] phi (byte) game_over#65 = (byte) 0 [phi:main::@12->play_spawn_current#0] -- vbuz1=vbuc1 lda #0 sta.z game_over - // [287] phi (byte) next_piece_idx#17 = (byte) 0 [phi:main::@12->play_spawn_current#1] -- vbuz1=vbuc1 + // [285] phi (byte) next_piece_idx#17 = (byte) 0 [phi:main::@12->play_spawn_current#1] -- vbuz1=vbuc1 lda #0 sta.z next_piece_idx jsr play_spawn_current - // [27] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + // [25] phi from main::@12 to main::@13 [phi:main::@12->main::@13] __b13_from___b12: jmp __b13 // main::@13 __b13: - // [28] call play_spawn_current - // [287] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] + // [26] call play_spawn_current + // [285] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] play_spawn_current_from___b13: - // [287] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy + // [285] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy + // [285] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy jsr play_spawn_current - // [29] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + // [27] phi from main::@13 to main::@14 [phi:main::@13->main::@14] __b14_from___b13: jmp __b14 // main::@14 __b14: - // [30] call render_playfield - // [152] phi from main::@14 to render_playfield [phi:main::@14->render_playfield] + // [28] call render_playfield + // [150] phi from main::@14 to render_playfield [phi:main::@14->render_playfield] render_playfield_from___b14: - // [152] phi (byte) render_screen_render#22 = (byte) $20 [phi:main::@14->render_playfield#0] -- vbuxx=vbuc1 + // [150] phi (byte) render_screen_render#22 = (byte) $20 [phi:main::@14->render_playfield#0] -- vbuxx=vbuc1 ldx #$20 jsr render_playfield jmp __b15 // main::@15 __b15: - // [31] (byte) current_ypos#97 ← (byte) current_ypos#6 -- vbuxx=vbuz1 + // [29] (byte) current_ypos#97 ← (byte) current_ypos#6 -- vbuxx=vbuz1 ldx.z current_ypos - // [32] (byte) current_xpos#118 ← (byte) current_xpos#100 -- vbuz1=vbuz2 + // [30] (byte) current_xpos#118 ← (byte) current_xpos#100 -- vbuz1=vbuz2 lda.z current_xpos sta.z current_xpos_1 - // [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx_1 lda PIECES+1,y sta.z current_piece_gfx_1+1 - // [34] (byte) current_piece_char#99 ← (byte) current_piece_char#5 -- vbuz1=vbuz2 + // [32] (byte) current_piece_char#99 ← (byte) current_piece_char#5 -- vbuz1=vbuz2 lda.z current_piece_char sta.z current_piece_char_1 - // [35] call render_moving - // [130] phi from main::@15 to render_moving [phi:main::@15->render_moving] + // [33] call render_moving + // [128] phi from main::@15 to render_moving [phi:main::@15->render_moving] render_moving_from___b15: - // [130] phi (byte) current_piece_char#68 = (byte) current_piece_char#99 [phi:main::@15->render_moving#0] -- register_copy - // [130] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#111 [phi:main::@15->render_moving#1] -- register_copy - // [130] phi (byte) current_xpos#59 = (byte) current_xpos#118 [phi:main::@15->render_moving#2] -- register_copy - // [130] phi (byte) render_screen_render#33 = (byte) $20 [phi:main::@15->render_moving#3] -- vbuz1=vbuc1 + // [128] phi (byte) current_piece_char#68 = (byte) current_piece_char#99 [phi:main::@15->render_moving#0] -- register_copy + // [128] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#111 [phi:main::@15->render_moving#1] -- register_copy + // [128] phi (byte) current_xpos#59 = (byte) current_xpos#118 [phi:main::@15->render_moving#2] -- register_copy + // [128] phi (byte) render_screen_render#33 = (byte) $20 [phi:main::@15->render_moving#3] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render_1 - // [130] phi (byte) current_ypos#13 = (byte) current_ypos#97 [phi:main::@15->render_moving#4] -- register_copy + // [128] phi (byte) current_ypos#13 = (byte) current_ypos#97 [phi:main::@15->render_moving#4] -- register_copy jsr render_moving jmp __b16 // main::@16 __b16: - // [36] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 -- vbuxx=vbuz1 + // [34] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 -- vbuxx=vbuz1 ldx.z play_spawn_current.piece_idx - // [37] call render_next - // [109] phi from main::@16 to render_next [phi:main::@16->render_next] + // [35] call render_next + // [107] phi from main::@16 to render_next [phi:main::@16->render_next] render_next_from___b16: - // [109] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#76 [phi:main::@16->render_next#0] -- register_copy - // [109] phi (byte) render_screen_render#15 = (byte) $20 [phi:main::@16->render_next#1] -- vbuaa=vbuc1 + // [107] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#76 [phi:main::@16->render_next#0] -- register_copy + // [107] phi (byte) render_screen_render#15 = (byte) $20 [phi:main::@16->render_next#1] -- vbuaa=vbuc1 lda #$20 jsr render_next jmp __b17 // main::@17 __b17: - // [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece lda PIECES+1,y sta.z current_piece+1 - // [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx lda PIECES+1,y sta.z current_piece_gfx+1 - // [40] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + // [38] phi from main::@17 to main::@1 [phi:main::@17->main::@1] __b1_from___b17: - // [40] phi (byte) level_bcd#11 = (byte) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 + // [38] phi (byte) level_bcd#11 = (byte) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 lda #0 sta.z level_bcd - // [40] phi (byte) level#10 = (byte) 0 [phi:main::@17->main::@1#1] -- vbuz1=vbuc1 + // [38] phi (byte) level#10 = (byte) 0 [phi:main::@17->main::@1#1] -- vbuz1=vbuc1 lda #0 sta.z level - // [40] phi (word) lines_bcd#19 = (word) 0 [phi:main::@17->main::@1#2] -- vwuz1=vwuc1 + // [38] phi (word) lines_bcd#19 = (word) 0 [phi:main::@17->main::@1#2] -- vwuz1=vwuc1 lda #<0 sta.z lines_bcd lda #>0 sta.z lines_bcd+1 - // [40] phi (byte) current_movedown_counter#16 = (byte) 0 [phi:main::@17->main::@1#3] -- vbuz1=vbuc1 + // [38] phi (byte) current_movedown_counter#16 = (byte) 0 [phi:main::@17->main::@1#3] -- vbuz1=vbuc1 lda #0 sta.z current_movedown_counter - // [40] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#4] -- vbuz1=vbuc1 + // [38] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#4] -- vbuz1=vbuc1 lda #0 sta.z keyboard_events_size - // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#5] -- register_copy - // [40] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#6] -- register_copy - // [40] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#7] -- register_copy - // [40] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#8] -- register_copy - // [40] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#123 [phi:main::@17->main::@1#9] -- register_copy - // [40] phi (byte) current_orientation#13 = (byte) 0 [phi:main::@17->main::@1#10] -- vbuz1=vbuc1 + // [38] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#5] -- register_copy + // [38] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#6] -- register_copy + // [38] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#7] -- register_copy + // [38] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#8] -- register_copy + // [38] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#123 [phi:main::@17->main::@1#9] -- register_copy + // [38] phi (byte) current_orientation#13 = (byte) 0 [phi:main::@17->main::@1#10] -- vbuz1=vbuc1 lda #0 sta.z current_orientation - // [40] phi (byte) current_piece_char#10 = (byte) current_piece_char#5 [phi:main::@17->main::@1#11] -- register_copy - // [40] phi (byte*) current_piece#10 = (byte*) current_piece#101 [phi:main::@17->main::@1#12] -- register_copy - // [40] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#1 [phi:main::@17->main::@1#13] -- register_copy - // [40] phi (byte) render_screen_render#18 = (byte) $20 [phi:main::@17->main::@1#14] -- vbuz1=vbuc1 + // [38] phi (byte) current_piece_char#10 = (byte) current_piece_char#5 [phi:main::@17->main::@1#11] -- register_copy + // [38] phi (byte*) current_piece#10 = (byte*) current_piece#101 [phi:main::@17->main::@1#12] -- register_copy + // [38] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#1 [phi:main::@17->main::@1#13] -- register_copy + // [38] phi (byte) render_screen_render#18 = (byte) $20 [phi:main::@17->main::@1#14] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render - // [40] phi (byte) render_screen_show#16 = (byte) 0 [phi:main::@17->main::@1#15] -- vbuz1=vbuc1 + // [38] phi (byte) render_screen_show#16 = (byte) 0 [phi:main::@17->main::@1#15] -- vbuz1=vbuc1 lda #0 sta.z render_screen_show jmp __b1 - // [40] phi from main::@25 main::@6 to main::@1 [phi:main::@25/main::@6->main::@1] + // [38] phi from main::@25 main::@6 to main::@1 [phi:main::@25/main::@6->main::@1] __b1_from___b25: __b1_from___b6: - // [40] phi (byte) level_bcd#11 = (byte) level_bcd#17 [phi:main::@25/main::@6->main::@1#0] -- register_copy - // [40] phi (byte) level#10 = (byte) level#17 [phi:main::@25/main::@6->main::@1#1] -- register_copy - // [40] phi (word) lines_bcd#19 = (word) lines_bcd#15 [phi:main::@25/main::@6->main::@1#2] -- register_copy - // [40] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#14 [phi:main::@25/main::@6->main::@1#3] -- register_copy - // [40] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@25/main::@6->main::@1#4] -- register_copy - // [40] phi (byte) next_piece_idx#10 = (byte) next_piece_idx#16 [phi:main::@25/main::@6->main::@1#5] -- register_copy - // [40] phi (byte) game_over#10 = (byte) game_over#15 [phi:main::@25/main::@6->main::@1#6] -- register_copy - // [40] phi (byte) current_ypos#11 = (byte) current_ypos#19 [phi:main::@25/main::@6->main::@1#7] -- register_copy - // [40] phi (byte) current_xpos#14 = (byte) current_xpos#19 [phi:main::@25/main::@6->main::@1#8] -- register_copy - // [40] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#18 [phi:main::@25/main::@6->main::@1#9] -- register_copy - // [40] phi (byte) current_orientation#13 = (byte) current_orientation#17 [phi:main::@25/main::@6->main::@1#10] -- register_copy - // [40] phi (byte) current_piece_char#10 = (byte) current_piece_char#16 [phi:main::@25/main::@6->main::@1#11] -- register_copy - // [40] phi (byte*) current_piece#10 = (byte*) current_piece#15 [phi:main::@25/main::@6->main::@1#12] -- register_copy - // [40] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#21 [phi:main::@25/main::@6->main::@1#13] -- register_copy - // [40] phi (byte) render_screen_render#18 = (byte) render_screen_render#11 [phi:main::@25/main::@6->main::@1#14] -- register_copy - // [40] phi (byte) render_screen_show#16 = (byte) render_screen_show#13 [phi:main::@25/main::@6->main::@1#15] -- register_copy + // [38] phi (byte) level_bcd#11 = (byte) level_bcd#17 [phi:main::@25/main::@6->main::@1#0] -- register_copy + // [38] phi (byte) level#10 = (byte) level#17 [phi:main::@25/main::@6->main::@1#1] -- register_copy + // [38] phi (word) lines_bcd#19 = (word) lines_bcd#15 [phi:main::@25/main::@6->main::@1#2] -- register_copy + // [38] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#14 [phi:main::@25/main::@6->main::@1#3] -- register_copy + // [38] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@25/main::@6->main::@1#4] -- register_copy + // [38] phi (byte) next_piece_idx#10 = (byte) next_piece_idx#16 [phi:main::@25/main::@6->main::@1#5] -- register_copy + // [38] phi (byte) game_over#10 = (byte) game_over#15 [phi:main::@25/main::@6->main::@1#6] -- register_copy + // [38] phi (byte) current_ypos#11 = (byte) current_ypos#19 [phi:main::@25/main::@6->main::@1#7] -- register_copy + // [38] phi (byte) current_xpos#14 = (byte) current_xpos#19 [phi:main::@25/main::@6->main::@1#8] -- register_copy + // [38] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#18 [phi:main::@25/main::@6->main::@1#9] -- register_copy + // [38] phi (byte) current_orientation#13 = (byte) current_orientation#17 [phi:main::@25/main::@6->main::@1#10] -- register_copy + // [38] phi (byte) current_piece_char#10 = (byte) current_piece_char#16 [phi:main::@25/main::@6->main::@1#11] -- register_copy + // [38] phi (byte*) current_piece#10 = (byte*) current_piece#15 [phi:main::@25/main::@6->main::@1#12] -- register_copy + // [38] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#21 [phi:main::@25/main::@6->main::@1#13] -- register_copy + // [38] phi (byte) render_screen_render#18 = (byte) render_screen_render#11 [phi:main::@25/main::@6->main::@1#14] -- register_copy + // [38] phi (byte) render_screen_show#16 = (byte) render_screen_show#13 [phi:main::@25/main::@6->main::@1#15] -- register_copy jmp __b1 // main::@1 __b1: @@ -17217,148 +17189,148 @@ main: { // Wait for a frame to pass // main::@2 __b2: - // [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + // [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 lda #$ff cmp RASTER bne __b2 - // [42] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [40] phi from main::@2 to main::@3 [phi:main::@2->main::@3] __b3_from___b2: jmp __b3 // main::@3 __b3: - // [43] call render_show + // [41] call render_show jsr render_show - // [44] phi from main::@3 to main::@18 [phi:main::@3->main::@18] + // [42] phi from main::@3 to main::@18 [phi:main::@3->main::@18] __b18_from___b3: jmp __b18 // main::@18 __b18: - // [45] call keyboard_event_scan - // [392] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] + // [43] call keyboard_event_scan + // [390] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] keyboard_event_scan_from___b18: jsr keyboard_event_scan - // [46] phi from main::@18 to main::@19 [phi:main::@18->main::@19] + // [44] phi from main::@18 to main::@19 [phi:main::@18->main::@19] __b19_from___b18: jmp __b19 // main::@19 __b19: - // [47] call keyboard_event_get + // [45] call keyboard_event_get jsr keyboard_event_get - // [48] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + // [46] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 jmp __b20 // main::@20 __b20: - // [49] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 - // [50] if((byte) game_over#10==(byte) 0) goto main::@4 -- vbuz1_eq_0_then_la1 + // [47] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 + // [48] if((byte) game_over#10==(byte) 0) goto main::@4 -- vbuz1_eq_0_then_la1 lda.z game_over cmp #0 beq __b4 jmp __b5 // main::@5 __b5: - // [51] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [49] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL jmp __b5 // main::@4 __b4: - // [52] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 -- vbuz1=vbuxx + // [50] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 -- vbuz1=vbuxx stx.z play_movement.key_event - // [53] call play_movement + // [51] call play_movement jsr play_movement - // [54] (byte) play_movement::return#3 ← (byte) play_movement::return#2 -- vbuaa=vbuz1 + // [52] (byte) play_movement::return#3 ← (byte) play_movement::return#2 -- vbuaa=vbuz1 lda.z play_movement.return jmp __b21 // main::@21 __b21: - // [55] (byte) main::render#1 ← (byte) play_movement::return#3 + // [53] (byte) main::render#1 ← (byte) play_movement::return#3 jmp __b6 // main::@6 __b6: - // [56] if((byte) main::render#1==(byte) 0) goto main::@1 -- vbuaa_eq_0_then_la1 + // [54] if((byte) main::render#1==(byte) 0) goto main::@1 -- vbuaa_eq_0_then_la1 cmp #0 beq __b1_from___b6 jmp __b7 // main::@7 __b7: - // [57] (byte) render_screen_render#63 ← (byte) render_screen_render#18 -- vbuxx=vbuz1 + // [55] (byte) render_screen_render#63 ← (byte) render_screen_render#18 -- vbuxx=vbuz1 ldx.z render_screen_render - // [58] call render_playfield - // [152] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] + // [56] call render_playfield + // [150] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] render_playfield_from___b7: - // [152] phi (byte) render_screen_render#22 = (byte) render_screen_render#63 [phi:main::@7->render_playfield#0] -- register_copy + // [150] phi (byte) render_screen_render#22 = (byte) render_screen_render#63 [phi:main::@7->render_playfield#0] -- register_copy jsr render_playfield jmp __b22 // main::@22 __b22: - // [59] (byte) current_ypos#98 ← (byte) current_ypos#19 -- vbuxx=vbuz1 + // [57] (byte) current_ypos#98 ← (byte) current_ypos#19 -- vbuxx=vbuz1 ldx.z current_ypos - // [60] (byte) render_screen_render#64 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 + // [58] (byte) render_screen_render#64 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 lda.z render_screen_render sta.z render_screen_render_1 - // [61] (byte) current_xpos#119 ← (byte) current_xpos#19 -- vbuz1=vbuz2 + // [59] (byte) current_xpos#119 ← (byte) current_xpos#19 -- vbuz1=vbuz2 lda.z current_xpos sta.z current_xpos_1 - // [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 -- pbuz1=pbuz2 + // [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 -- pbuz1=pbuz2 lda.z current_piece_gfx sta.z current_piece_gfx_1 lda.z current_piece_gfx+1 sta.z current_piece_gfx_1+1 - // [63] (byte) current_piece_char#100 ← (byte) current_piece_char#16 -- vbuz1=vbuz2 + // [61] (byte) current_piece_char#100 ← (byte) current_piece_char#16 -- vbuz1=vbuz2 lda.z current_piece_char sta.z current_piece_char_1 - // [64] call render_moving - // [130] phi from main::@22 to render_moving [phi:main::@22->render_moving] + // [62] call render_moving + // [128] phi from main::@22 to render_moving [phi:main::@22->render_moving] render_moving_from___b22: - // [130] phi (byte) current_piece_char#68 = (byte) current_piece_char#100 [phi:main::@22->render_moving#0] -- register_copy - // [130] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#112 [phi:main::@22->render_moving#1] -- register_copy - // [130] phi (byte) current_xpos#59 = (byte) current_xpos#119 [phi:main::@22->render_moving#2] -- register_copy - // [130] phi (byte) render_screen_render#33 = (byte) render_screen_render#64 [phi:main::@22->render_moving#3] -- register_copy - // [130] phi (byte) current_ypos#13 = (byte) current_ypos#98 [phi:main::@22->render_moving#4] -- register_copy + // [128] phi (byte) current_piece_char#68 = (byte) current_piece_char#100 [phi:main::@22->render_moving#0] -- register_copy + // [128] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#112 [phi:main::@22->render_moving#1] -- register_copy + // [128] phi (byte) current_xpos#59 = (byte) current_xpos#119 [phi:main::@22->render_moving#2] -- register_copy + // [128] phi (byte) render_screen_render#33 = (byte) render_screen_render#64 [phi:main::@22->render_moving#3] -- register_copy + // [128] phi (byte) current_ypos#13 = (byte) current_ypos#98 [phi:main::@22->render_moving#4] -- register_copy jsr render_moving jmp __b23 // main::@23 __b23: - // [65] (byte) render_screen_render#65 ← (byte) render_screen_render#18 -- vbuaa=vbuz1 + // [63] (byte) render_screen_render#65 ← (byte) render_screen_render#18 -- vbuaa=vbuz1 lda.z render_screen_render - // [66] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 -- vbuxx=vbuz1 + // [64] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 -- vbuxx=vbuz1 ldx.z next_piece_idx - // [67] call render_next - // [109] phi from main::@23 to render_next [phi:main::@23->render_next] + // [65] call render_next + // [107] phi from main::@23 to render_next [phi:main::@23->render_next] render_next_from___b23: - // [109] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#77 [phi:main::@23->render_next#0] -- register_copy - // [109] phi (byte) render_screen_render#15 = (byte) render_screen_render#65 [phi:main::@23->render_next#1] -- register_copy + // [107] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#77 [phi:main::@23->render_next#0] -- register_copy + // [107] phi (byte) render_screen_render#15 = (byte) render_screen_render#65 [phi:main::@23->render_next#1] -- register_copy jsr render_next - // [68] phi from main::@23 to main::@24 [phi:main::@23->main::@24] + // [66] phi from main::@23 to main::@24 [phi:main::@23->main::@24] __b24_from___b23: jmp __b24 // main::@24 __b24: - // [69] call render_score + // [67] call render_score jsr render_score - // [70] phi from main::@24 to main::@25 [phi:main::@24->main::@25] + // [68] phi from main::@24 to main::@25 [phi:main::@24->main::@25] __b25_from___b24: jmp __b25 // main::@25 __b25: - // [71] call render_screen_swap + // [69] call render_screen_swap jsr render_screen_swap jmp __b1_from___b25 } // render_screen_swap // Swap rendering to the other screen (used for double buffering) render_screen_swap: { - // [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 + // [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 lda #$20 eor.z render_screen_render sta.z render_screen_render - // [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 + // [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 lda #$20 eor.z render_screen_show sta.z render_screen_show jmp __breturn // render_screen_swap::@return __breturn: - // [74] return + // [72] return rts } // render_score @@ -17369,26 +17341,26 @@ render_score: { .const lines_offset = $28*1+$16 .const level_offset = $28*$13+$1f .label screen = $23 - // [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -- vbuz1_eq_0_then_la1 + // [73] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -- vbuz1_eq_0_then_la1 lda.z render_screen_render cmp #0 beq __b1_from_render_score - // [77] phi from render_score to render_score::@2 [phi:render_score->render_score::@2] + // [75] phi from render_score to render_score::@2 [phi:render_score->render_score::@2] __b2_from_render_score: - // [77] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_score->render_score::@2#0] -- pbuz1=pbuc1 + // [75] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_score->render_score::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2 sta.z screen+1 jmp __b2 - // [76] phi from render_score to render_score::@1 [phi:render_score->render_score::@1] + // [74] phi from render_score to render_score::@1 [phi:render_score->render_score::@1] __b1_from_render_score: jmp __b1 // render_score::@1 __b1: - // [77] phi from render_score::@1 to render_score::@2 [phi:render_score::@1->render_score::@2] + // [75] phi from render_score::@1 to render_score::@2 [phi:render_score::@1->render_score::@2] __b2_from___b1: - // [77] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_score::@1->render_score::@2#0] -- pbuz1=pbuc1 + // [75] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_score::@1->render_score::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1 @@ -17396,123 +17368,123 @@ render_score: { jmp __b2 // render_score::@2 __b2: - // [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 - // [79] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) -- vbuxx=_deref_pbuc1 + // [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 + // [77] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) -- vbuxx=_deref_pbuc1 ldx score_bytes+2 - // [80] call render_bcd - // [97] phi from render_score::@2 to render_bcd [phi:render_score::@2->render_bcd] + // [78] call render_bcd + // [95] phi from render_score::@2 to render_bcd [phi:render_score::@2->render_bcd] render_bcd_from___b2: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#0 [phi:render_score::@2->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@2->render_bcd#1] -- vbuyy=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#0 [phi:render_score::@2->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@2->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset [phi:render_score::@2->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset [phi:render_score::@2->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#0 [phi:render_score::@2->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#0 [phi:render_score::@2->render_bcd#3] -- register_copy jsr render_bcd jmp __b3 // render_score::@3 __b3: - // [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 - // [82] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) -- vbuxx=_deref_pbuc1 + // [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 + // [80] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) -- vbuxx=_deref_pbuc1 ldx score_bytes+1 - // [83] call render_bcd - // [97] phi from render_score::@3 to render_bcd [phi:render_score::@3->render_bcd] + // [81] call render_bcd + // [95] phi from render_score::@3 to render_bcd [phi:render_score::@3->render_bcd] render_bcd_from___b3: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#1 [phi:render_score::@3->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@3->render_bcd#1] -- vbuyy=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#1 [phi:render_score::@3->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@3->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 2 [phi:render_score::@3->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 2 [phi:render_score::@3->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset+2 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#1 [phi:render_score::@3->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#1 [phi:render_score::@3->render_bcd#3] -- register_copy jsr render_bcd jmp __b4 // render_score::@4 __b4: - // [84] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 - // [85] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) -- vbuxx=_deref_pbuc1 + // [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 + // [83] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) -- vbuxx=_deref_pbuc1 ldx.z score_bytes - // [86] call render_bcd - // [97] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd] + // [84] call render_bcd + // [95] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd] render_bcd_from___b4: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#2 [phi:render_score::@4->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@4->render_bcd#1] -- vbuyy=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#2 [phi:render_score::@4->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@4->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 4 [phi:render_score::@4->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 4 [phi:render_score::@4->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset+4 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#2 [phi:render_score::@4->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#2 [phi:render_score::@4->render_bcd#3] -- register_copy jsr render_bcd jmp __b5 // render_score::@5 __b5: - // [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 -- vbuxx=_hi_vwuz1 + // [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 -- vbuxx=_hi_vwuz1 lda.z lines_bcd+1 tax - // [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 - // [89] call render_bcd - // [97] phi from render_score::@5 to render_bcd [phi:render_score::@5->render_bcd] + // [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 + // [87] call render_bcd + // [95] phi from render_score::@5 to render_bcd [phi:render_score::@5->render_bcd] render_bcd_from___b5: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#3 [phi:render_score::@5->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 1 [phi:render_score::@5->render_bcd#1] -- vbuyy=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#3 [phi:render_score::@5->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 1 [phi:render_score::@5->render_bcd#1] -- vbuyy=vbuc1 ldy #1 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset [phi:render_score::@5->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset [phi:render_score::@5->render_bcd#2] -- vwuz1=vwuc1 lda #lines_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#3 [phi:render_score::@5->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#3 [phi:render_score::@5->render_bcd#3] -- register_copy jsr render_bcd jmp __b6 // render_score::@6 __b6: - // [90] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 -- vbuxx=_lo_vwuz1 + // [88] (byte) render_bcd::bcd#4 ← < (word) lines_bcd#15 -- vbuxx=_lo_vwuz1 lda.z lines_bcd tax - // [91] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 - // [92] call render_bcd - // [97] phi from render_score::@6 to render_bcd [phi:render_score::@6->render_bcd] + // [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 + // [90] call render_bcd + // [95] phi from render_score::@6 to render_bcd [phi:render_score::@6->render_bcd] render_bcd_from___b6: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#4 [phi:render_score::@6->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@6->render_bcd#1] -- vbuyy=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#4 [phi:render_score::@6->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@6->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset+(byte) 1 [phi:render_score::@6->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset+(byte) 1 [phi:render_score::@6->render_bcd#2] -- vwuz1=vwuc1 lda #lines_offset+1 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#4 [phi:render_score::@6->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#4 [phi:render_score::@6->render_bcd#3] -- register_copy jsr render_bcd jmp __b7 // render_score::@7 __b7: - // [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 - // [94] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 -- vbuxx=vbuz1 + // [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 + // [92] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 -- vbuxx=vbuz1 ldx.z level_bcd - // [95] call render_bcd - // [97] phi from render_score::@7 to render_bcd [phi:render_score::@7->render_bcd] + // [93] call render_bcd + // [95] phi from render_score::@7 to render_bcd [phi:render_score::@7->render_bcd] render_bcd_from___b7: - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#5 [phi:render_score::@7->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@7->render_bcd#1] -- vbuyy=vbuc1 + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#5 [phi:render_score::@7->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@7->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::level_offset [phi:render_score::@7->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::level_offset [phi:render_score::@7->render_bcd#2] -- vwuz1=vwuc1 lda #level_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#5 [phi:render_score::@7->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#5 [phi:render_score::@7->render_bcd#3] -- register_copy jsr render_bcd jmp __breturn // render_score::@return __breturn: - // [96] return + // [94] return rts } // render_bcd @@ -17527,7 +17499,7 @@ render_bcd: { .label screen = $23 .label screen_pos = $21 .label offset = $21 - // [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 -- pbuz1=pbuz2_plus_vwuz1 + // [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 -- pbuz1=pbuz2_plus_vwuz1 lda.z screen_pos clc adc.z screen @@ -17535,49 +17507,49 @@ render_bcd: { lda.z screen_pos+1 adc.z screen+1 sta.z screen_pos+1 - // [99] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -- vbuyy_neq_0_then_la1 + // [97] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -- vbuyy_neq_0_then_la1 cpy #0 bne __b1_from_render_bcd jmp __b2 // render_bcd::@2 __b2: - // [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 -- vbuaa=vbuxx_ror_4 + // [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 -- vbuaa=vbuxx_ror_4 txa lsr lsr lsr lsr - // [101] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 -- vbuaa=vbuc1_plus_vbuaa + // [99] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 -- vbuaa=vbuc1_plus_vbuaa clc adc #ZERO_CHAR - // [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 -- _deref_pbuz1=vbuaa + // [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 -- _deref_pbuz1=vbuaa ldy #0 sta (screen_pos),y - // [103] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 -- pbuz1=_inc_pbuz1 + // [101] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 -- pbuz1=_inc_pbuz1 inc.z screen_pos bne !+ inc.z screen_pos+1 !: - // [104] phi from render_bcd render_bcd::@2 to render_bcd::@1 [phi:render_bcd/render_bcd::@2->render_bcd::@1] + // [102] phi from render_bcd render_bcd::@2 to render_bcd::@1 [phi:render_bcd/render_bcd::@2->render_bcd::@1] __b1_from_render_bcd: __b1_from___b2: - // [104] phi (byte*) render_bcd::screen_pos#3 = (byte*) render_bcd::screen_pos#0 [phi:render_bcd/render_bcd::@2->render_bcd::@1#0] -- register_copy + // [102] phi (byte*) render_bcd::screen_pos#3 = (byte*) render_bcd::screen_pos#0 [phi:render_bcd/render_bcd::@2->render_bcd::@1#0] -- register_copy jmp __b1 // render_bcd::@1 __b1: - // [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 + // [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 txa and #$f - // [106] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 -- vbuaa=vbuc1_plus_vbuaa + // [104] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 -- vbuaa=vbuc1_plus_vbuaa clc adc #ZERO_CHAR - // [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 -- _deref_pbuz1=vbuaa + // [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 -- _deref_pbuz1=vbuaa ldy #0 sta (screen_pos),y jmp __breturn // render_bcd::@return __breturn: - // [108] return + // [106] return rts } // render_next @@ -17589,25 +17561,25 @@ render_next: { .label next_piece_gfx = $23 .label screen_next_area = $21 .label l = 8 - // [110] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -- vbuaa_eq_0_then_la1 + // [108] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -- vbuaa_eq_0_then_la1 cmp #0 beq __b1_from_render_next - // [112] phi from render_next to render_next::@2 [phi:render_next->render_next::@2] + // [110] phi from render_next to render_next::@2 [phi:render_next->render_next::@2] __b2_from_render_next: - // [112] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset [phi:render_next->render_next::@2#0] -- pbuz1=pbuc1 + // [110] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset [phi:render_next->render_next::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2+next_area_offset sta.z screen_next_area+1 jmp __b2 - // [111] phi from render_next to render_next::@1 [phi:render_next->render_next::@1] + // [109] phi from render_next to render_next::@1 [phi:render_next->render_next::@1] __b1_from_render_next: jmp __b1 // render_next::@1 __b1: - // [112] phi from render_next::@1 to render_next::@2 [phi:render_next::@1->render_next::@2] + // [110] phi from render_next::@1 to render_next::@2 [phi:render_next::@1->render_next::@2] __b2_from___b1: - // [112] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset [phi:render_next::@1->render_next::@2#0] -- pbuz1=pbuc1 + // [110] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset [phi:render_next::@1->render_next::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1+next_area_offset @@ -17615,84 +17587,84 @@ render_next: { jmp __b2 // render_next::@2 __b2: - // [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 -- vbuyy=vbuxx_rol_1 + // [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 -- vbuyy=vbuxx_rol_1 txa asl tay - // [114] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) -- vbuz1=pbuc1_derefidx_vbuxx + // [112] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_NEXT_CHARS,x sta.z next_piece_char - // [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) -- pbuz1=pptc1_derefidx_vbuyy + // [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) -- pbuz1=pptc1_derefidx_vbuyy lda PIECES,y sta.z next_piece_gfx lda PIECES+1,y sta.z next_piece_gfx+1 - // [116] phi from render_next::@2 to render_next::@3 [phi:render_next::@2->render_next::@3] + // [114] phi from render_next::@2 to render_next::@3 [phi:render_next::@2->render_next::@3] __b3_from___b2: - // [116] phi (byte) render_next::l#7 = (byte) 0 [phi:render_next::@2->render_next::@3#0] -- vbuz1=vbuc1 + // [114] phi (byte) render_next::l#7 = (byte) 0 [phi:render_next::@2->render_next::@3#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [116] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#11 [phi:render_next::@2->render_next::@3#1] -- register_copy - // [116] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#9 [phi:render_next::@2->render_next::@3#2] -- register_copy + // [114] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#11 [phi:render_next::@2->render_next::@3#1] -- register_copy + // [114] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#9 [phi:render_next::@2->render_next::@3#2] -- register_copy jmp __b3 - // [116] phi from render_next::@8 to render_next::@3 [phi:render_next::@8->render_next::@3] + // [114] phi from render_next::@8 to render_next::@3 [phi:render_next::@8->render_next::@3] __b3_from___b8: - // [116] phi (byte) render_next::l#7 = (byte) render_next::l#1 [phi:render_next::@8->render_next::@3#0] -- register_copy - // [116] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#4 [phi:render_next::@8->render_next::@3#1] -- register_copy - // [116] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@8->render_next::@3#2] -- register_copy + // [114] phi (byte) render_next::l#7 = (byte) render_next::l#1 [phi:render_next::@8->render_next::@3#0] -- register_copy + // [114] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#4 [phi:render_next::@8->render_next::@3#1] -- register_copy + // [114] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@8->render_next::@3#2] -- register_copy jmp __b3 // render_next::@3 __b3: - // [117] phi from render_next::@3 to render_next::@4 [phi:render_next::@3->render_next::@4] + // [115] phi from render_next::@3 to render_next::@4 [phi:render_next::@3->render_next::@4] __b4_from___b3: - // [117] phi (byte) render_next::c#2 = (byte) 0 [phi:render_next::@3->render_next::@4#0] -- vbuxx=vbuc1 + // [115] phi (byte) render_next::c#2 = (byte) 0 [phi:render_next::@3->render_next::@4#0] -- vbuxx=vbuc1 ldx #0 - // [117] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#10 [phi:render_next::@3->render_next::@4#1] -- register_copy - // [117] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#3 [phi:render_next::@3->render_next::@4#2] -- register_copy + // [115] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#10 [phi:render_next::@3->render_next::@4#1] -- register_copy + // [115] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#3 [phi:render_next::@3->render_next::@4#2] -- register_copy jmp __b4 - // [117] phi from render_next::@6 to render_next::@4 [phi:render_next::@6->render_next::@4] + // [115] phi from render_next::@6 to render_next::@4 [phi:render_next::@6->render_next::@4] __b4_from___b6: - // [117] phi (byte) render_next::c#2 = (byte) render_next::c#1 [phi:render_next::@6->render_next::@4#0] -- register_copy - // [117] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#3 [phi:render_next::@6->render_next::@4#1] -- register_copy - // [117] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@6->render_next::@4#2] -- register_copy + // [115] phi (byte) render_next::c#2 = (byte) render_next::c#1 [phi:render_next::@6->render_next::@4#0] -- register_copy + // [115] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#3 [phi:render_next::@6->render_next::@4#1] -- register_copy + // [115] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@6->render_next::@4#2] -- register_copy jmp __b4 // render_next::@4 __b4: - // [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) -- vbuaa=_deref_pbuz1 + // [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) -- vbuaa=_deref_pbuz1 ldy #0 lda (next_piece_gfx),y - // [119] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 -- pbuz1=_inc_pbuz1 + // [117] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 -- pbuz1=_inc_pbuz1 inc.z next_piece_gfx bne !+ inc.z next_piece_gfx+1 !: - // [120] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 -- vbuaa_neq_0_then_la1 + // [118] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 -- vbuaa_neq_0_then_la1 cmp #0 bne __b5 jmp __b7 // render_next::@7 __b7: - // [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (screen_next_area),y jmp __b6 // render_next::@6 __b6: - // [122] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 -- pbuz1=_inc_pbuz1 + // [120] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 -- pbuz1=_inc_pbuz1 inc.z screen_next_area bne !+ inc.z screen_next_area+1 !: - // [123] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 -- vbuxx=_inc_vbuxx + // [121] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 -- vbuxx=_inc_vbuxx inx - // [124] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 -- vbuxx_neq_vbuc1_then_la1 + // [122] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b4_from___b6 jmp __b8 // render_next::@8 __b8: - // [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 -- pbuz1=pbuz1_plus_vbuc1 + // [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 -- pbuz1=pbuz1_plus_vbuc1 lda #$24 clc adc.z screen_next_area @@ -17700,20 +17672,20 @@ render_next: { bcc !+ inc.z screen_next_area+1 !: - // [126] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 -- vbuz1=_inc_vbuz1 + // [124] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 -- vbuz1=_inc_vbuz1 inc.z l - // [127] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 -- vbuz1_neq_vbuc1_then_la1 + // [125] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b3_from___b8 jmp __breturn // render_next::@return __breturn: - // [128] return + // [126] return rts // render_next::@5 __b5: - // [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 -- _deref_pbuz1=vbuz2 + // [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 -- _deref_pbuz1=vbuz2 lda.z next_piece_char ldy #0 sta (screen_next_area),y @@ -17728,112 +17700,112 @@ render_moving: { .label xpos = $20 .label i = $1f .label l = $d - // [131] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 -- vbuz1=vbuxx + // [129] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 -- vbuz1=vbuxx stx.z ypos - // [132] phi from render_moving to render_moving::@1 [phi:render_moving->render_moving::@1] + // [130] phi from render_moving to render_moving::@1 [phi:render_moving->render_moving::@1] __b1_from_render_moving: - // [132] phi (byte) render_moving::l#4 = (byte) 0 [phi:render_moving->render_moving::@1#0] -- vbuz1=vbuc1 + // [130] phi (byte) render_moving::l#4 = (byte) 0 [phi:render_moving->render_moving::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [132] phi (byte) render_moving::i#3 = (byte) 0 [phi:render_moving->render_moving::@1#1] -- vbuz1=vbuc1 + // [130] phi (byte) render_moving::i#3 = (byte) 0 [phi:render_moving->render_moving::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i - // [132] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#0 [phi:render_moving->render_moving::@1#2] -- register_copy + // [130] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#0 [phi:render_moving->render_moving::@1#2] -- register_copy jmp __b1 - // [132] phi from render_moving::@3 to render_moving::@1 [phi:render_moving::@3->render_moving::@1] + // [130] phi from render_moving::@3 to render_moving::@1 [phi:render_moving::@3->render_moving::@1] __b1_from___b3: - // [132] phi (byte) render_moving::l#4 = (byte) render_moving::l#1 [phi:render_moving::@3->render_moving::@1#0] -- register_copy - // [132] phi (byte) render_moving::i#3 = (byte) render_moving::i#8 [phi:render_moving::@3->render_moving::@1#1] -- register_copy - // [132] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#1 [phi:render_moving::@3->render_moving::@1#2] -- register_copy + // [130] phi (byte) render_moving::l#4 = (byte) render_moving::l#1 [phi:render_moving::@3->render_moving::@1#0] -- register_copy + // [130] phi (byte) render_moving::i#3 = (byte) render_moving::i#8 [phi:render_moving::@3->render_moving::@1#1] -- register_copy + // [130] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#1 [phi:render_moving::@3->render_moving::@1#2] -- register_copy jmp __b1 // render_moving::@1 __b1: - // [133] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 -- vbuz1_ge_vbuc1_then_la1 + // [131] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 -- vbuz1_ge_vbuc1_then_la1 lda.z ypos cmp #1+1 bcs __b2 jmp __b7 // render_moving::@7 __b7: - // [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 -- vbuz1=vbuz1_plus_vbuc1 + // [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 -- vbuz1=vbuz1_plus_vbuc1 lax.z i axs #-[4] stx.z i - // [135] phi from render_moving::@5 render_moving::@7 to render_moving::@3 [phi:render_moving::@5/render_moving::@7->render_moving::@3] + // [133] phi from render_moving::@5 render_moving::@7 to render_moving::@3 [phi:render_moving::@5/render_moving::@7->render_moving::@3] __b3_from___b5: __b3_from___b7: - // [135] phi (byte) render_moving::i#8 = (byte) render_moving::i#2 [phi:render_moving::@5/render_moving::@7->render_moving::@3#0] -- register_copy + // [133] phi (byte) render_moving::i#8 = (byte) render_moving::i#2 [phi:render_moving::@5/render_moving::@7->render_moving::@3#0] -- register_copy jmp __b3 // render_moving::@3 __b3: - // [136] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 -- vbuz1=_inc_vbuz1 + // [134] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 -- vbuz1=_inc_vbuz1 inc.z ypos - // [137] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 -- vbuz1=_inc_vbuz1 + // [135] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 -- vbuz1=_inc_vbuz1 inc.z l - // [138] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 -- vbuz1_neq_vbuc1_then_la1 + // [136] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b1_from___b3 jmp __breturn // render_moving::@return __breturn: - // [139] return + // [137] return rts // render_moving::@2 __b2: - // [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 -- vbuaa=vbuz1_plus_vbuz2 + // [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 -- vbuaa=vbuz1_plus_vbuz2 lda.z render_screen_render_1 clc adc.z ypos - // [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) -- pbuz1=pptc1_derefidx_vbuaa + // [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) -- pbuz1=pptc1_derefidx_vbuaa tay lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 - // [143] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 -- vbuz1=vbuz2 + // [141] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 -- vbuz1=vbuz2 lda.z current_xpos_1 sta.z xpos - // [144] phi from render_moving::@2 to render_moving::@4 [phi:render_moving::@2->render_moving::@4] + // [142] phi from render_moving::@2 to render_moving::@4 [phi:render_moving::@2->render_moving::@4] __b4_from___b2: - // [144] phi (byte) render_moving::c#2 = (byte) 0 [phi:render_moving::@2->render_moving::@4#0] -- vbuxx=vbuc1 + // [142] phi (byte) render_moving::c#2 = (byte) 0 [phi:render_moving::@2->render_moving::@4#0] -- vbuxx=vbuc1 ldx #0 - // [144] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#0 [phi:render_moving::@2->render_moving::@4#1] -- register_copy - // [144] phi (byte) render_moving::i#4 = (byte) render_moving::i#3 [phi:render_moving::@2->render_moving::@4#2] -- register_copy + // [142] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#0 [phi:render_moving::@2->render_moving::@4#1] -- register_copy + // [142] phi (byte) render_moving::i#4 = (byte) render_moving::i#3 [phi:render_moving::@2->render_moving::@4#2] -- register_copy jmp __b4 - // [144] phi from render_moving::@5 to render_moving::@4 [phi:render_moving::@5->render_moving::@4] + // [142] phi from render_moving::@5 to render_moving::@4 [phi:render_moving::@5->render_moving::@4] __b4_from___b5: - // [144] phi (byte) render_moving::c#2 = (byte) render_moving::c#1 [phi:render_moving::@5->render_moving::@4#0] -- register_copy - // [144] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#1 [phi:render_moving::@5->render_moving::@4#1] -- register_copy - // [144] phi (byte) render_moving::i#4 = (byte) render_moving::i#2 [phi:render_moving::@5->render_moving::@4#2] -- register_copy + // [142] phi (byte) render_moving::c#2 = (byte) render_moving::c#1 [phi:render_moving::@5->render_moving::@4#0] -- register_copy + // [142] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#1 [phi:render_moving::@5->render_moving::@4#1] -- register_copy + // [142] phi (byte) render_moving::i#4 = (byte) render_moving::i#2 [phi:render_moving::@5->render_moving::@4#2] -- register_copy jmp __b4 // render_moving::@4 __b4: - // [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) -- vbuaa=pbuz1_derefidx_vbuz2 + // [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) -- vbuaa=pbuz1_derefidx_vbuz2 ldy.z i lda (current_piece_gfx_1),y - // [146] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 -- vbuz1=_inc_vbuz1 + // [144] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 -- vbuz1=_inc_vbuz1 inc.z i - // [147] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -- vbuaa_eq_0_then_la1 + // [145] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -- vbuaa_eq_0_then_la1 cmp #0 beq __b5 jmp __b6 // render_moving::@6 __b6: - // [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 -- pbuz1_derefidx_vbuz2=vbuz3 + // [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z current_piece_char_1 ldy.z xpos sta (screen_line),y jmp __b5 // render_moving::@5 __b5: - // [149] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 -- vbuz1=_inc_vbuz1 + // [147] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 -- vbuz1=_inc_vbuz1 inc.z xpos - // [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 -- vbuxx=_inc_vbuxx + // [148] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 -- vbuxx=_inc_vbuxx inx - // [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 -- vbuxx_neq_vbuc1_then_la1 + // [149] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b4_from___b5 jmp __b3_from___b5 @@ -17846,81 +17818,81 @@ render_playfield: { .label i = $a .label c = $b .label l = 9 - // [153] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] + // [151] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] __b1_from_render_playfield: - // [153] phi (byte) render_playfield::i#3 = (const byte) PLAYFIELD_COLS*(byte) 2 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 + // [151] phi (byte) render_playfield::i#3 = (const byte) PLAYFIELD_COLS*(byte) 2 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 lda #PLAYFIELD_COLS*2 sta.z i - // [153] phi (byte) render_playfield::l#2 = (byte) 2 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + // [151] phi (byte) render_playfield::l#2 = (byte) 2 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 lda #2 sta.z l jmp __b1 - // [153] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] + // [151] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] __b1_from___b3: - // [153] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy - // [153] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + // [151] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy + // [151] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy jmp __b1 // render_playfield::@1 __b1: - // [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 -- vbuaa=vbuxx_plus_vbuz1 + // [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 -- vbuaa=vbuxx_plus_vbuz1 txa clc adc.z l - // [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) -- pbuz1=pptc1_derefidx_vbuaa + // [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) -- pbuz1=pptc1_derefidx_vbuaa tay lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 - // [157] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] + // [155] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] __b2_from___b1: - // [157] phi (byte) render_playfield::c#2 = (byte) 0 [phi:render_playfield::@1->render_playfield::@2#0] -- vbuz1=vbuc1 + // [155] phi (byte) render_playfield::c#2 = (byte) 0 [phi:render_playfield::@1->render_playfield::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [157] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#0 [phi:render_playfield::@1->render_playfield::@2#1] -- register_copy - // [157] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#2] -- register_copy + // [155] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#0 [phi:render_playfield::@1->render_playfield::@2#1] -- register_copy + // [155] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#2] -- register_copy jmp __b2 - // [157] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] + // [155] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] __b2_from___b2: - // [157] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy - // [157] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy - // [157] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#2] -- register_copy + // [155] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy + // [155] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy + // [155] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#2] -- register_copy jmp __b2 // render_playfield::@2 __b2: - // [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy.z i lda playfield,y ldy #0 sta (screen_line),y - // [159] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 -- pbuz1=_inc_pbuz1 + // [157] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 -- pbuz1=_inc_pbuz1 inc.z screen_line bne !+ inc.z screen_line+1 !: - // [160] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 + // [158] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [161] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 + // [159] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [162] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 + // [160] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp.z c bne __b2_from___b2 jmp __b3 // render_playfield::@3 __b3: - // [163] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 + // [161] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 inc.z l - // [164] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 + // [162] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z l bne __b1_from___b3 jmp __breturn // render_playfield::@return __breturn: - // [165] return + // [163] return rts } // play_movement @@ -17932,58 +17904,58 @@ play_movement: { .label render = $d .label return = $d .label key_event = $1f - // [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 + // [164] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 lda.z key_event - // [167] call play_move_down + // [165] call play_move_down jsr play_move_down - // [168] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 -- vbuaa=vbuxx + // [166] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 -- vbuaa=vbuxx txa jmp __b2 // play_movement::@2 __b2: - // [169] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 -- vbuz1=vbuaa + // [167] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 -- vbuz1=vbuaa sta.z render - // [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -- vbuz1_eq_0_then_la1 + // [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -- vbuz1_eq_0_then_la1 lda.z game_over cmp #0 beq __b1 - // [171] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return] + // [169] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return] __breturn_from___b2: __breturn_from___b4: - // [171] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy - // [171] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy - // [171] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy - // [171] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy + // [169] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy + // [169] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy + // [169] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy + // [169] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy jmp __breturn // play_movement::@return __breturn: - // [172] return + // [170] return rts // play_movement::@1 __b1: - // [173] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 + // [171] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 lda.z key_event - // [174] call play_move_leftright + // [172] call play_move_leftright jsr play_move_leftright - // [175] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 + // [173] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 jmp __b3 // play_movement::@3 __b3: - // [176] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 - // [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 -- vbuz1=vbuz1_plus_vbuaa + // [174] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 + // [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 -- vbuz1=vbuz1_plus_vbuaa clc adc.z render sta.z render - // [178] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 + // [176] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 lda.z key_event - // [179] call play_move_rotate + // [177] call play_move_rotate jsr play_move_rotate - // [180] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 + // [178] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 jmp __b4 // play_movement::@4 __b4: - // [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 - // [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 -- vbuz1=vbuz1_plus_vbuaa + // [179] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 + // [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 -- vbuz1=vbuz1_plus_vbuaa clc adc.z return sta.z return @@ -17996,78 +17968,78 @@ play_movement: { play_move_rotate: { // Handle keyboard events .label orientation = $1f - // [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -- vbuaa_eq_vbuc1_then_la1 + // [181] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -- vbuaa_eq_vbuc1_then_la1 cmp #KEY_Z beq __b1 jmp __b4 // play_move_rotate::@4 __b4: - // [184] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -- vbuaa_eq_vbuc1_then_la1 + // [182] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #KEY_X beq __b2 - // [185] phi from play_move_rotate::@4 play_move_rotate::@6 to play_move_rotate::@return [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return] + // [183] phi from play_move_rotate::@4 play_move_rotate::@6 to play_move_rotate::@return [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return] __breturn_from___b4: __breturn_from___b6: - // [185] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#0] -- register_copy - // [185] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy - // [185] phi (byte) play_move_rotate::return#2 = (byte) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuaa=vbuc1 + // [183] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#0] -- register_copy + // [183] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy + // [183] phi (byte) play_move_rotate::return#2 = (byte) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuaa=vbuc1 lda #0 jmp __breturn // play_move_rotate::@return __breturn: - // [186] return + // [184] return rts // play_move_rotate::@2 __b2: - // [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 -- vbuxx=vbuz1_plus_vbuc1 + // [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 -- vbuxx=vbuz1_plus_vbuc1 lax.z current_orientation axs #-[$10] - // [188] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 + // [186] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 lda #$3f sax.z orientation - // [189] phi from play_move_rotate::@1 play_move_rotate::@2 to play_move_rotate::@3 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3] + // [187] phi from play_move_rotate::@1 play_move_rotate::@2 to play_move_rotate::@3 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3] __b3_from___b1: __b3_from___b2: - // [189] phi (byte) play_move_rotate::orientation#3 = (byte) play_move_rotate::orientation#1 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3#0] -- register_copy + // [187] phi (byte) play_move_rotate::orientation#3 = (byte) play_move_rotate::orientation#1 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3#0] -- register_copy jmp __b3 // play_move_rotate::@3 __b3: - // [190] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 -- vbuz1=vbuz2 + // [188] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [191] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [189] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [192] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 -- vbuxx=vbuz1 + // [190] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 -- vbuxx=vbuz1 ldx.z orientation - // [193] (byte*) current_piece#98 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [191] (byte*) current_piece#98 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [194] call play_collision - // [202] phi from play_move_rotate::@3 to play_collision [phi:play_move_rotate::@3->play_collision] + // [192] call play_collision + // [200] phi from play_move_rotate::@3 to play_collision [phi:play_move_rotate::@3->play_collision] play_collision_from___b3: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#3 [phi:play_move_rotate::@3->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#3 [phi:play_move_rotate::@3->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#3 [phi:play_move_rotate::@3->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#98 [phi:play_move_rotate::@3->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#3 [phi:play_move_rotate::@3->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#3 [phi:play_move_rotate::@3->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#3 [phi:play_move_rotate::@3->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#98 [phi:play_move_rotate::@3->play_collision#3] -- register_copy jsr play_collision - // [195] (byte) play_collision::return#14 ← (byte) play_collision::return#15 + // [193] (byte) play_collision::return#14 ← (byte) play_collision::return#15 jmp __b6 // play_move_rotate::@6 __b6: - // [196] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 - // [197] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return -- vbuaa_neq_vbuc1_then_la1 + // [194] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 + // [195] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_NONE bne __breturn_from___b6 jmp __b5 // play_move_rotate::@5 __b5: - // [198] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 + // [196] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 lda.z orientation sta.z current_orientation - // [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 -- pbuz1=pbuz2_plus_vbuz3 + // [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 -- pbuz1=pbuz2_plus_vbuz3 lda.z current_orientation clc adc.z current_piece @@ -18075,19 +18047,19 @@ play_move_rotate: { lda #0 adc.z current_piece+1 sta.z current_piece_gfx+1 - // [185] phi from play_move_rotate::@5 to play_move_rotate::@return [phi:play_move_rotate::@5->play_move_rotate::@return] + // [183] phi from play_move_rotate::@5 to play_move_rotate::@return [phi:play_move_rotate::@5->play_move_rotate::@return] __breturn_from___b5: - // [185] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#7 [phi:play_move_rotate::@5->play_move_rotate::@return#0] -- register_copy - // [185] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy - // [185] phi (byte) play_move_rotate::return#2 = (byte) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuaa=vbuc1 + // [183] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#7 [phi:play_move_rotate::@5->play_move_rotate::@return#0] -- register_copy + // [183] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy + // [183] phi (byte) play_move_rotate::return#2 = (byte) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuaa=vbuc1 lda #1 jmp __breturn // play_move_rotate::@1 __b1: - // [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 -- vbuxx=vbuz1_minus_vbuc1 + // [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 -- vbuxx=vbuz1_minus_vbuc1 lax.z current_orientation axs #$10 - // [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 + // [199] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 lda #$3f sax.z orientation jmp __b3_from___b1 @@ -18106,7 +18078,7 @@ play_collision: { .label xp = $b .label l = 9 .label i_1 = $a - // [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 -- pbuz1=pbuz1_plus_vbuxx + // [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 -- pbuz1=pbuz1_plus_vbuxx txa clc adc.z piece_gfx @@ -18114,44 +18086,44 @@ play_collision: { bcc !+ inc.z piece_gfx+1 !: - // [204] phi from play_collision to play_collision::@1 [phi:play_collision->play_collision::@1] + // [202] phi from play_collision to play_collision::@1 [phi:play_collision->play_collision::@1] __b1_from_play_collision: - // [204] phi (byte) play_collision::l#6 = (byte) 0 [phi:play_collision->play_collision::@1#0] -- vbuz1=vbuc1 + // [202] phi (byte) play_collision::l#6 = (byte) 0 [phi:play_collision->play_collision::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [204] phi (byte) play_collision::i#3 = (byte) 0 [phi:play_collision->play_collision::@1#1] -- vbuz1=vbuc1 + // [202] phi (byte) play_collision::i#3 = (byte) 0 [phi:play_collision->play_collision::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i_1 - // [204] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#0 [phi:play_collision->play_collision::@1#2] -- register_copy + // [202] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#0 [phi:play_collision->play_collision::@1#2] -- register_copy jmp __b1 // play_collision::@1 __b1: - // [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z yp asl - // [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) -- pbuz1=pptc1_derefidx_vbuaa + // [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) -- pbuz1=pptc1_derefidx_vbuaa tay lda playfield_lines,y sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 - // [207] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 -- vbuz1=vbuz2 + // [205] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 -- vbuz1=vbuz2 lda.z xpos sta.z xp - // [208] phi from play_collision::@1 to play_collision::@2 [phi:play_collision::@1->play_collision::@2] + // [206] phi from play_collision::@1 to play_collision::@2 [phi:play_collision::@1->play_collision::@2] __b2_from___b1: - // [208] phi (byte) play_collision::c#2 = (byte) 0 [phi:play_collision::@1->play_collision::@2#0] -- vbuxx=vbuc1 + // [206] phi (byte) play_collision::c#2 = (byte) 0 [phi:play_collision::@1->play_collision::@2#0] -- vbuxx=vbuc1 ldx #0 - // [208] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#8 [phi:play_collision::@1->play_collision::@2#1] -- register_copy - // [208] phi (byte) play_collision::i#2 = (byte) play_collision::i#3 [phi:play_collision::@1->play_collision::@2#2] -- register_copy + // [206] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#8 [phi:play_collision::@1->play_collision::@2#1] -- register_copy + // [206] phi (byte) play_collision::i#2 = (byte) play_collision::i#3 [phi:play_collision::@1->play_collision::@2#2] -- register_copy jmp __b2 // play_collision::@2 __b2: - // [209] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 -- vbuz1=_inc_vbuz2 + // [207] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 -- vbuz1=_inc_vbuz2 ldy.z i_1 iny sty.z i - // [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z i_1 lda (piece_gfx),y cmp #0 @@ -18159,101 +18131,101 @@ play_collision: { jmp __b7 // play_collision::@7 __b7: - // [211] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -- vbuz1_lt_vbuc1_then_la1 + // [209] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -- vbuz1_lt_vbuc1_then_la1 lda.z yp cmp #PLAYFIELD_LINES bcc __b4 - // [216] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return] + // [214] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return] __breturn_from___b7: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM [phi:play_collision::@7->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM [phi:play_collision::@7->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_BOTTOM jmp __breturn // play_collision::@4 __b4: - // [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 + // [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 lda #$80 and.z xp - // [213] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -- vbuaa_eq_0_then_la1 + // [211] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -- vbuaa_eq_0_then_la1 cmp #0 beq __b5 - // [216] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return] + // [214] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return] __breturn_from___b4: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT [phi:play_collision::@4->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT [phi:play_collision::@4->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_LEFT jmp __breturn // play_collision::@5 __b5: - // [214] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1 + // [212] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1 lda.z xp cmp #PLAYFIELD_COLS bcc __b6 - // [216] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return] + // [214] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return] __breturn_from___b5: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT [phi:play_collision::@5->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT [phi:play_collision::@5->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_RIGHT jmp __breturn // play_collision::@6 __b6: - // [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z xp lda (playfield_line),y cmp #0 beq __b3 - // [216] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return] + // [214] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return] __breturn_from___b6: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD [phi:play_collision::@6->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD [phi:play_collision::@6->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_PLAYFIELD jmp __breturn // play_collision::@return __breturn: - // [217] return + // [215] return rts // play_collision::@3 __b3: - // [218] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 -- vbuz1=_inc_vbuz1 + // [216] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 -- vbuz1=_inc_vbuz1 inc.z xp - // [219] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 -- vbuxx=_inc_vbuxx + // [217] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 -- vbuxx=_inc_vbuxx inx - // [220] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 -- vbuxx_neq_vbuc1_then_la1 + // [218] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b10 jmp __b8 // play_collision::@8 __b8: - // [221] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 -- vbuz1=_inc_vbuz1 + // [219] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 -- vbuz1=_inc_vbuz1 inc.z yp - // [222] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 -- vbuz1=_inc_vbuz1 + // [220] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 -- vbuz1=_inc_vbuz1 inc.z l - // [223] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 -- vbuz1_neq_vbuc1_then_la1 + // [221] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b9 - // [216] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return] + // [214] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return] __breturn_from___b8: - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE [phi:play_collision::@8->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE [phi:play_collision::@8->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_NONE jmp __breturn // play_collision::@9 __b9: - // [224] (byte) play_collision::i#10 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 + // [222] (byte) play_collision::i#10 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [204] phi from play_collision::@9 to play_collision::@1 [phi:play_collision::@9->play_collision::@1] + // [202] phi from play_collision::@9 to play_collision::@1 [phi:play_collision::@9->play_collision::@1] __b1_from___b9: - // [204] phi (byte) play_collision::l#6 = (byte) play_collision::l#1 [phi:play_collision::@9->play_collision::@1#0] -- register_copy - // [204] phi (byte) play_collision::i#3 = (byte) play_collision::i#10 [phi:play_collision::@9->play_collision::@1#1] -- register_copy - // [204] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#1 [phi:play_collision::@9->play_collision::@1#2] -- register_copy + // [202] phi (byte) play_collision::l#6 = (byte) play_collision::l#1 [phi:play_collision::@9->play_collision::@1#0] -- register_copy + // [202] phi (byte) play_collision::i#3 = (byte) play_collision::i#10 [phi:play_collision::@9->play_collision::@1#1] -- register_copy + // [202] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#1 [phi:play_collision::@9->play_collision::@1#2] -- register_copy jmp __b1 // play_collision::@10 __b10: - // [225] (byte) play_collision::i#12 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 + // [223] (byte) play_collision::i#12 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [208] phi from play_collision::@10 to play_collision::@2 [phi:play_collision::@10->play_collision::@2] + // [206] phi from play_collision::@10 to play_collision::@2 [phi:play_collision::@10->play_collision::@2] __b2_from___b10: - // [208] phi (byte) play_collision::c#2 = (byte) play_collision::c#1 [phi:play_collision::@10->play_collision::@2#0] -- register_copy - // [208] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#1 [phi:play_collision::@10->play_collision::@2#1] -- register_copy - // [208] phi (byte) play_collision::i#2 = (byte) play_collision::i#12 [phi:play_collision::@10->play_collision::@2#2] -- register_copy + // [206] phi (byte) play_collision::c#2 = (byte) play_collision::c#1 [phi:play_collision::@10->play_collision::@2#0] -- register_copy + // [206] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#1 [phi:play_collision::@10->play_collision::@2#1] -- register_copy + // [206] phi (byte) play_collision::i#2 = (byte) play_collision::i#12 [phi:play_collision::@10->play_collision::@2#2] -- register_copy jmp __b2 } // play_move_leftright @@ -18261,109 +18233,109 @@ play_collision: { // Return non-zero if a render is needed // play_move_leftright(byte register(A) key_event) play_move_leftright: { - // [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -- vbuaa_eq_vbuc1_then_la1 + // [224] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -- vbuaa_eq_vbuc1_then_la1 // Handle keyboard events cmp #KEY_COMMA beq __b1 jmp __b2 // play_move_leftright::@2 __b2: - // [227] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 + // [225] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_DOT bne __breturn_from___b2 jmp __b3 // play_move_leftright::@3 __b3: - // [228] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [226] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z current_xpos iny sty.z play_collision.xpos - // [229] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [227] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [230] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 -- vbuxx=vbuz1 + // [228] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 -- vbuxx=vbuz1 ldx.z current_orientation - // [231] (byte*) current_piece#97 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [229] (byte*) current_piece#97 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [232] call play_collision - // [202] phi from play_move_leftright::@3 to play_collision [phi:play_move_leftright::@3->play_collision] + // [230] call play_collision + // [200] phi from play_move_leftright::@3 to play_collision [phi:play_move_leftright::@3->play_collision] play_collision_from___b3: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#2 [phi:play_move_leftright::@3->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#2 [phi:play_move_leftright::@3->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#2 [phi:play_move_leftright::@3->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#97 [phi:play_move_leftright::@3->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#2 [phi:play_move_leftright::@3->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#2 [phi:play_move_leftright::@3->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#2 [phi:play_move_leftright::@3->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#97 [phi:play_move_leftright::@3->play_collision#3] -- register_copy jsr play_collision - // [233] (byte) play_collision::return#13 ← (byte) play_collision::return#15 + // [231] (byte) play_collision::return#13 ← (byte) play_collision::return#15 jmp __b7 // play_move_leftright::@7 __b7: - // [234] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 - // [235] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 + // [232] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 + // [233] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_NONE bne __breturn_from___b7 jmp __b4 // play_move_leftright::@4 __b4: - // [236] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 -- vbuz1=_inc_vbuz1 + // [234] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 -- vbuz1=_inc_vbuz1 inc.z current_xpos - // [237] phi from play_move_leftright::@4 play_move_leftright::@5 to play_move_leftright::@return [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return] + // [235] phi from play_move_leftright::@4 play_move_leftright::@5 to play_move_leftright::@return [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return] __breturn_from___b4: __breturn_from___b5: - // [237] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy - // [237] phi (byte) play_move_leftright::return#2 = (byte) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuaa=vbuc1 + // [235] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy + // [235] phi (byte) play_move_leftright::return#2 = (byte) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuaa=vbuc1 lda #1 jmp __breturn - // [237] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return] + // [235] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return] __breturn_from___b2: __breturn_from___b6: __breturn_from___b7: - // [237] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy - // [237] phi (byte) play_move_leftright::return#2 = (byte) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuaa=vbuc1 + // [235] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy + // [235] phi (byte) play_move_leftright::return#2 = (byte) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuaa=vbuc1 lda #0 jmp __breturn // play_move_leftright::@return __breturn: - // [238] return + // [236] return rts // play_move_leftright::@1 __b1: - // [239] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 -- vbuz1=vbuz2_minus_1 + // [237] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 -- vbuz1=vbuz2_minus_1 ldx.z current_xpos dex stx.z play_collision.xpos - // [240] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [238] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [241] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 -- vbuxx=vbuz1 + // [239] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 -- vbuxx=vbuz1 ldx.z current_orientation - // [242] (byte*) current_piece#96 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [240] (byte*) current_piece#96 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [243] call play_collision - // [202] phi from play_move_leftright::@1 to play_collision [phi:play_move_leftright::@1->play_collision] + // [241] call play_collision + // [200] phi from play_move_leftright::@1 to play_collision [phi:play_move_leftright::@1->play_collision] play_collision_from___b1: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#1 [phi:play_move_leftright::@1->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#1 [phi:play_move_leftright::@1->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#1 [phi:play_move_leftright::@1->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#96 [phi:play_move_leftright::@1->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#1 [phi:play_move_leftright::@1->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#1 [phi:play_move_leftright::@1->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#1 [phi:play_move_leftright::@1->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#96 [phi:play_move_leftright::@1->play_collision#3] -- register_copy jsr play_collision - // [244] (byte) play_collision::return#1 ← (byte) play_collision::return#15 + // [242] (byte) play_collision::return#1 ← (byte) play_collision::return#15 jmp __b6 // play_move_leftright::@6 __b6: - // [245] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 - // [246] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 + // [243] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 + // [244] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_NONE bne __breturn_from___b6 jmp __b5 // play_move_leftright::@5 __b5: - // [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 -- vbuz1=_dec_vbuz1 + // [245] (byte) current_xpos#8 ← -- (byte) current_xpos#22 -- vbuz1=_dec_vbuz1 dec.z current_xpos jmp __breturn_from___b5 } @@ -18372,246 +18344,246 @@ play_move_leftright: { // Return non-zero if a render is needed // play_move_down(byte register(A) key_event) play_move_down: { - // [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 -- vbuz1=_inc_vbuz1 + // [246] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 -- vbuz1=_inc_vbuz1 inc.z current_movedown_counter - // [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -- vbuaa_neq_vbuc1_then_la1 + // [247] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_SPACE bne __b1_from_play_move_down - // [250] phi from play_move_down to play_move_down::@4 [phi:play_move_down->play_move_down::@4] + // [248] phi from play_move_down to play_move_down::@4 [phi:play_move_down->play_move_down::@4] __b4_from_play_move_down: jmp __b4 // play_move_down::@4 __b4: - // [251] phi from play_move_down::@4 to play_move_down::@1 [phi:play_move_down::@4->play_move_down::@1] + // [249] phi from play_move_down::@4 to play_move_down::@1 [phi:play_move_down::@4->play_move_down::@1] __b1_from___b4: - // [251] phi (byte) play_move_down::movedown#10 = (byte) 1 [phi:play_move_down::@4->play_move_down::@1#0] -- vbuxx=vbuc1 + // [249] phi (byte) play_move_down::movedown#10 = (byte) 1 [phi:play_move_down::@4->play_move_down::@1#0] -- vbuxx=vbuc1 ldx #1 jmp __b1 - // [251] phi from play_move_down to play_move_down::@1 [phi:play_move_down->play_move_down::@1] + // [249] phi from play_move_down to play_move_down::@1 [phi:play_move_down->play_move_down::@1] __b1_from_play_move_down: - // [251] phi (byte) play_move_down::movedown#10 = (byte) 0 [phi:play_move_down->play_move_down::@1#0] -- vbuxx=vbuc1 + // [249] phi (byte) play_move_down::movedown#10 = (byte) 0 [phi:play_move_down->play_move_down::@1#0] -- vbuxx=vbuc1 ldx #0 jmp __b1 // play_move_down::@1 __b1: - // [252] call keyboard_event_pressed - // [381] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] + // [250] call keyboard_event_pressed + // [379] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] keyboard_event_pressed_from___b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_SPACE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [253] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + // [251] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 jmp __b12 // play_move_down::@12 __b12: - // [254] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 - // [255] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -- vbuaa_eq_0_then_la1 + // [252] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 + // [253] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2_from___b12 jmp __b5 // play_move_down::@5 __b5: - // [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -- vbuz1_lt_vbuc1_then_la1 + // [254] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z current_movedown_counter cmp #current_movedown_fast bcc __b2_from___b5 jmp __b6 // play_move_down::@6 __b6: - // [257] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 -- vbuxx=_inc_vbuxx + // [255] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 -- vbuxx=_inc_vbuxx inx - // [258] phi from play_move_down::@12 play_move_down::@5 play_move_down::@6 to play_move_down::@2 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2] + // [256] phi from play_move_down::@12 play_move_down::@5 play_move_down::@6 to play_move_down::@2 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2] __b2_from___b12: __b2_from___b5: __b2_from___b6: - // [258] phi (byte) play_move_down::movedown#7 = (byte) play_move_down::movedown#10 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2#0] -- register_copy + // [256] phi (byte) play_move_down::movedown#7 = (byte) play_move_down::movedown#10 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2#0] -- register_copy jmp __b2 // play_move_down::@2 __b2: - // [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -- vbuz1_lt_vbuz2_then_la1 + // [257] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -- vbuz1_lt_vbuz2_then_la1 lda.z current_movedown_counter cmp.z current_movedown_slow bcc __b3_from___b2 jmp __b7 // play_move_down::@7 __b7: - // [260] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 -- vbuxx=_inc_vbuxx + // [258] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 -- vbuxx=_inc_vbuxx inx - // [261] phi from play_move_down::@2 play_move_down::@7 to play_move_down::@3 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3] + // [259] phi from play_move_down::@2 play_move_down::@7 to play_move_down::@3 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3] __b3_from___b2: __b3_from___b7: - // [261] phi (byte) play_move_down::movedown#6 = (byte) play_move_down::movedown#7 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3#0] -- register_copy + // [259] phi (byte) play_move_down::movedown#6 = (byte) play_move_down::movedown#7 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3#0] -- register_copy jmp __b3 // play_move_down::@3 __b3: - // [262] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return -- vbuxx_eq_0_then_la1 + // [260] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return -- vbuxx_eq_0_then_la1 cpx #0 beq __breturn_from___b3 jmp __b8 // play_move_down::@8 __b8: - // [263] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [261] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z current_ypos iny sty.z play_collision.ypos - // [264] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [262] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [265] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 -- vbuxx=vbuz1 + // [263] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 -- vbuxx=vbuz1 ldx.z current_orientation - // [266] (byte*) current_piece#95 ← (byte*) current_piece#10 -- pbuz1=pbuz2 + // [264] (byte*) current_piece#95 ← (byte*) current_piece#10 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 - // [267] call play_collision - // [202] phi from play_move_down::@8 to play_collision [phi:play_move_down::@8->play_collision] + // [265] call play_collision + // [200] phi from play_move_down::@8 to play_collision [phi:play_move_down::@8->play_collision] play_collision_from___b8: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#0 [phi:play_move_down::@8->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#0 [phi:play_move_down::@8->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#0 [phi:play_move_down::@8->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#95 [phi:play_move_down::@8->play_collision#3] -- register_copy + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#0 [phi:play_move_down::@8->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#0 [phi:play_move_down::@8->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#0 [phi:play_move_down::@8->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#95 [phi:play_move_down::@8->play_collision#3] -- register_copy jsr play_collision - // [268] (byte) play_collision::return#0 ← (byte) play_collision::return#15 + // [266] (byte) play_collision::return#0 ← (byte) play_collision::return#15 jmp __b13 // play_move_down::@13 __b13: - // [269] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 - // [270] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 -- vbuaa_eq_vbuc1_then_la1 + // [267] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 + // [268] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 -- vbuaa_eq_vbuc1_then_la1 cmp #COLLISION_NONE beq __b10 - // [271] phi from play_move_down::@13 to play_move_down::@9 [phi:play_move_down::@13->play_move_down::@9] + // [269] phi from play_move_down::@13 to play_move_down::@9 [phi:play_move_down::@13->play_move_down::@9] __b9_from___b13: jmp __b9 // play_move_down::@9 __b9: - // [272] call play_lock_current + // [270] call play_lock_current jsr play_lock_current - // [273] phi from play_move_down::@9 to play_move_down::@14 [phi:play_move_down::@9->play_move_down::@14] + // [271] phi from play_move_down::@9 to play_move_down::@14 [phi:play_move_down::@9->play_move_down::@14] __b14_from___b9: jmp __b14 // play_move_down::@14 __b14: - // [274] call play_remove_lines - // [340] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] + // [272] call play_remove_lines + // [338] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] play_remove_lines_from___b14: jsr play_remove_lines - // [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuaa=vbuz1 + // [273] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuaa=vbuz1 lda.z play_remove_lines.removed jmp __b15 // play_move_down::@15 __b15: - // [276] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 - // [277] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 -- vbuxx=vbuaa + // [274] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 + // [275] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 -- vbuxx=vbuaa tax - // [278] call play_update_score + // [276] call play_update_score jsr play_update_score - // [279] phi from play_move_down::@15 to play_move_down::@16 [phi:play_move_down::@15->play_move_down::@16] + // [277] phi from play_move_down::@15 to play_move_down::@16 [phi:play_move_down::@15->play_move_down::@16] __b16_from___b15: jmp __b16 // play_move_down::@16 __b16: - // [280] call play_spawn_current - // [287] phi from play_move_down::@16 to play_spawn_current [phi:play_move_down::@16->play_spawn_current] + // [278] call play_spawn_current + // [285] phi from play_move_down::@16 to play_spawn_current [phi:play_move_down::@16->play_spawn_current] play_spawn_current_from___b16: - // [287] phi (byte) game_over#65 = (byte) game_over#10 [phi:play_move_down::@16->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) next_piece_idx#10 [phi:play_move_down::@16->play_spawn_current#1] -- register_copy + // [285] phi (byte) game_over#65 = (byte) game_over#10 [phi:play_move_down::@16->play_spawn_current#0] -- register_copy + // [285] phi (byte) next_piece_idx#17 = (byte) next_piece_idx#10 [phi:play_move_down::@16->play_spawn_current#1] -- register_copy jsr play_spawn_current jmp __b17 // play_move_down::@17 __b17: - // [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece lda PIECES+1,y sta.z current_piece+1 - // [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx lda PIECES+1,y sta.z current_piece_gfx+1 - // [283] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] + // [281] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] __b11_from___b17: - // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy - // [283] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy - // [283] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy - // [283] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#116 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy - // [283] phi (byte) current_orientation#37 = (byte) 0 [phi:play_move_down::@17->play_move_down::@11#4] -- vbuz1=vbuc1 + // [281] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy + // [281] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy + // [281] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy + // [281] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#116 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy + // [281] phi (byte) current_orientation#37 = (byte) 0 [phi:play_move_down::@17->play_move_down::@11#4] -- vbuz1=vbuc1 lda #0 sta.z current_orientation - // [283] phi (byte) current_piece_char#29 = (byte) current_piece_char#5 [phi:play_move_down::@17->play_move_down::@11#5] -- register_copy - // [283] phi (byte*) current_piece#28 = (byte*) current_piece#92 [phi:play_move_down::@17->play_move_down::@11#6] -- register_copy - // [283] phi (byte) level_bcd#31 = (byte) level_bcd#19 [phi:play_move_down::@17->play_move_down::@11#7] -- register_copy - // [283] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#23 [phi:play_move_down::@17->play_move_down::@11#8] -- register_copy - // [283] phi (byte) level#33 = (byte) level#19 [phi:play_move_down::@17->play_move_down::@11#9] -- register_copy - // [283] phi (word) lines_bcd#26 = (word) lines_bcd#17 [phi:play_move_down::@17->play_move_down::@11#10] -- register_copy - // [283] phi (byte) current_ypos#38 = (byte) current_ypos#6 [phi:play_move_down::@17->play_move_down::@11#11] -- register_copy + // [281] phi (byte) current_piece_char#29 = (byte) current_piece_char#5 [phi:play_move_down::@17->play_move_down::@11#5] -- register_copy + // [281] phi (byte*) current_piece#28 = (byte*) current_piece#92 [phi:play_move_down::@17->play_move_down::@11#6] -- register_copy + // [281] phi (byte) level_bcd#31 = (byte) level_bcd#19 [phi:play_move_down::@17->play_move_down::@11#7] -- register_copy + // [281] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#23 [phi:play_move_down::@17->play_move_down::@11#8] -- register_copy + // [281] phi (byte) level#33 = (byte) level#19 [phi:play_move_down::@17->play_move_down::@11#9] -- register_copy + // [281] phi (word) lines_bcd#26 = (word) lines_bcd#17 [phi:play_move_down::@17->play_move_down::@11#10] -- register_copy + // [281] phi (byte) current_ypos#38 = (byte) current_ypos#6 [phi:play_move_down::@17->play_move_down::@11#11] -- register_copy jmp __b11 // play_move_down::@11 __b11: - // [284] phi from play_move_down::@11 to play_move_down::@return [phi:play_move_down::@11->play_move_down::@return] + // [282] phi from play_move_down::@11 to play_move_down::@return [phi:play_move_down::@11->play_move_down::@return] __breturn_from___b11: - // [284] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#30 [phi:play_move_down::@11->play_move_down::@return#0] -- register_copy - // [284] phi (byte) game_over#15 = (byte) game_over#27 [phi:play_move_down::@11->play_move_down::@return#1] -- register_copy - // [284] phi (byte) current_xpos#22 = (byte) current_xpos#43 [phi:play_move_down::@11->play_move_down::@return#2] -- register_copy - // [284] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#35 [phi:play_move_down::@11->play_move_down::@return#3] -- register_copy - // [284] phi (byte) current_orientation#20 = (byte) current_orientation#37 [phi:play_move_down::@11->play_move_down::@return#4] -- register_copy - // [284] phi (byte) current_piece_char#16 = (byte) current_piece_char#29 [phi:play_move_down::@11->play_move_down::@return#5] -- register_copy - // [284] phi (byte*) current_piece#15 = (byte*) current_piece#28 [phi:play_move_down::@11->play_move_down::@return#6] -- register_copy - // [284] phi (byte) level_bcd#17 = (byte) level_bcd#31 [phi:play_move_down::@11->play_move_down::@return#7] -- register_copy - // [284] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#37 [phi:play_move_down::@11->play_move_down::@return#8] -- register_copy - // [284] phi (byte) level#17 = (byte) level#33 [phi:play_move_down::@11->play_move_down::@return#9] -- register_copy - // [284] phi (word) lines_bcd#15 = (word) lines_bcd#26 [phi:play_move_down::@11->play_move_down::@return#10] -- register_copy - // [284] phi (byte) current_ypos#19 = (byte) current_ypos#38 [phi:play_move_down::@11->play_move_down::@return#11] -- register_copy - // [284] phi (byte) current_movedown_counter#14 = (byte) 0 [phi:play_move_down::@11->play_move_down::@return#12] -- vbuz1=vbuc1 + // [282] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#30 [phi:play_move_down::@11->play_move_down::@return#0] -- register_copy + // [282] phi (byte) game_over#15 = (byte) game_over#27 [phi:play_move_down::@11->play_move_down::@return#1] -- register_copy + // [282] phi (byte) current_xpos#22 = (byte) current_xpos#43 [phi:play_move_down::@11->play_move_down::@return#2] -- register_copy + // [282] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#35 [phi:play_move_down::@11->play_move_down::@return#3] -- register_copy + // [282] phi (byte) current_orientation#20 = (byte) current_orientation#37 [phi:play_move_down::@11->play_move_down::@return#4] -- register_copy + // [282] phi (byte) current_piece_char#16 = (byte) current_piece_char#29 [phi:play_move_down::@11->play_move_down::@return#5] -- register_copy + // [282] phi (byte*) current_piece#15 = (byte*) current_piece#28 [phi:play_move_down::@11->play_move_down::@return#6] -- register_copy + // [282] phi (byte) level_bcd#17 = (byte) level_bcd#31 [phi:play_move_down::@11->play_move_down::@return#7] -- register_copy + // [282] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#37 [phi:play_move_down::@11->play_move_down::@return#8] -- register_copy + // [282] phi (byte) level#17 = (byte) level#33 [phi:play_move_down::@11->play_move_down::@return#9] -- register_copy + // [282] phi (word) lines_bcd#15 = (word) lines_bcd#26 [phi:play_move_down::@11->play_move_down::@return#10] -- register_copy + // [282] phi (byte) current_ypos#19 = (byte) current_ypos#38 [phi:play_move_down::@11->play_move_down::@return#11] -- register_copy + // [282] phi (byte) current_movedown_counter#14 = (byte) 0 [phi:play_move_down::@11->play_move_down::@return#12] -- vbuz1=vbuc1 lda #0 sta.z current_movedown_counter - // [284] phi (byte) play_move_down::return#3 = (byte) 1 [phi:play_move_down::@11->play_move_down::@return#13] -- vbuxx=vbuc1 + // [282] phi (byte) play_move_down::return#3 = (byte) 1 [phi:play_move_down::@11->play_move_down::@return#13] -- vbuxx=vbuc1 ldx #1 jmp __breturn - // [284] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return] + // [282] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return] __breturn_from___b3: - // [284] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy - // [284] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy - // [284] phi (byte) current_xpos#22 = (byte) current_xpos#14 [phi:play_move_down::@3->play_move_down::@return#2] -- register_copy - // [284] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#13 [phi:play_move_down::@3->play_move_down::@return#3] -- register_copy - // [284] phi (byte) current_orientation#20 = (byte) current_orientation#13 [phi:play_move_down::@3->play_move_down::@return#4] -- register_copy - // [284] phi (byte) current_piece_char#16 = (byte) current_piece_char#10 [phi:play_move_down::@3->play_move_down::@return#5] -- register_copy - // [284] phi (byte*) current_piece#15 = (byte*) current_piece#10 [phi:play_move_down::@3->play_move_down::@return#6] -- register_copy - // [284] phi (byte) level_bcd#17 = (byte) level_bcd#11 [phi:play_move_down::@3->play_move_down::@return#7] -- register_copy - // [284] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#14 [phi:play_move_down::@3->play_move_down::@return#8] -- register_copy - // [284] phi (byte) level#17 = (byte) level#10 [phi:play_move_down::@3->play_move_down::@return#9] -- register_copy - // [284] phi (word) lines_bcd#15 = (word) lines_bcd#19 [phi:play_move_down::@3->play_move_down::@return#10] -- register_copy - // [284] phi (byte) current_ypos#19 = (byte) current_ypos#11 [phi:play_move_down::@3->play_move_down::@return#11] -- register_copy - // [284] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#12] -- register_copy - // [284] phi (byte) play_move_down::return#3 = (byte) 0 [phi:play_move_down::@3->play_move_down::@return#13] -- vbuxx=vbuc1 + // [282] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy + // [282] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy + // [282] phi (byte) current_xpos#22 = (byte) current_xpos#14 [phi:play_move_down::@3->play_move_down::@return#2] -- register_copy + // [282] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#13 [phi:play_move_down::@3->play_move_down::@return#3] -- register_copy + // [282] phi (byte) current_orientation#20 = (byte) current_orientation#13 [phi:play_move_down::@3->play_move_down::@return#4] -- register_copy + // [282] phi (byte) current_piece_char#16 = (byte) current_piece_char#10 [phi:play_move_down::@3->play_move_down::@return#5] -- register_copy + // [282] phi (byte*) current_piece#15 = (byte*) current_piece#10 [phi:play_move_down::@3->play_move_down::@return#6] -- register_copy + // [282] phi (byte) level_bcd#17 = (byte) level_bcd#11 [phi:play_move_down::@3->play_move_down::@return#7] -- register_copy + // [282] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#14 [phi:play_move_down::@3->play_move_down::@return#8] -- register_copy + // [282] phi (byte) level#17 = (byte) level#10 [phi:play_move_down::@3->play_move_down::@return#9] -- register_copy + // [282] phi (word) lines_bcd#15 = (word) lines_bcd#19 [phi:play_move_down::@3->play_move_down::@return#10] -- register_copy + // [282] phi (byte) current_ypos#19 = (byte) current_ypos#11 [phi:play_move_down::@3->play_move_down::@return#11] -- register_copy + // [282] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#12] -- register_copy + // [282] phi (byte) play_move_down::return#3 = (byte) 0 [phi:play_move_down::@3->play_move_down::@return#13] -- vbuxx=vbuc1 ldx #0 jmp __breturn // play_move_down::@return __breturn: - // [285] return + // [283] return rts // play_move_down::@10 __b10: - // [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 -- vbuz1=_inc_vbuz1 + // [284] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 -- vbuz1=_inc_vbuz1 inc.z current_ypos - // [283] phi from play_move_down::@10 to play_move_down::@11 [phi:play_move_down::@10->play_move_down::@11] + // [281] phi from play_move_down::@10 to play_move_down::@11 [phi:play_move_down::@10->play_move_down::@11] __b11_from___b10: - // [283] phi (byte) next_piece_idx#30 = (byte) next_piece_idx#10 [phi:play_move_down::@10->play_move_down::@11#0] -- register_copy - // [283] phi (byte) game_over#27 = (byte) game_over#10 [phi:play_move_down::@10->play_move_down::@11#1] -- register_copy - // [283] phi (byte) current_xpos#43 = (byte) current_xpos#14 [phi:play_move_down::@10->play_move_down::@11#2] -- register_copy - // [283] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#13 [phi:play_move_down::@10->play_move_down::@11#3] -- register_copy - // [283] phi (byte) current_orientation#37 = (byte) current_orientation#13 [phi:play_move_down::@10->play_move_down::@11#4] -- register_copy - // [283] phi (byte) current_piece_char#29 = (byte) current_piece_char#10 [phi:play_move_down::@10->play_move_down::@11#5] -- register_copy - // [283] phi (byte*) current_piece#28 = (byte*) current_piece#10 [phi:play_move_down::@10->play_move_down::@11#6] -- register_copy - // [283] phi (byte) level_bcd#31 = (byte) level_bcd#11 [phi:play_move_down::@10->play_move_down::@11#7] -- register_copy - // [283] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#14 [phi:play_move_down::@10->play_move_down::@11#8] -- register_copy - // [283] phi (byte) level#33 = (byte) level#10 [phi:play_move_down::@10->play_move_down::@11#9] -- register_copy - // [283] phi (word) lines_bcd#26 = (word) lines_bcd#19 [phi:play_move_down::@10->play_move_down::@11#10] -- register_copy - // [283] phi (byte) current_ypos#38 = (byte) current_ypos#3 [phi:play_move_down::@10->play_move_down::@11#11] -- register_copy + // [281] phi (byte) next_piece_idx#30 = (byte) next_piece_idx#10 [phi:play_move_down::@10->play_move_down::@11#0] -- register_copy + // [281] phi (byte) game_over#27 = (byte) game_over#10 [phi:play_move_down::@10->play_move_down::@11#1] -- register_copy + // [281] phi (byte) current_xpos#43 = (byte) current_xpos#14 [phi:play_move_down::@10->play_move_down::@11#2] -- register_copy + // [281] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#13 [phi:play_move_down::@10->play_move_down::@11#3] -- register_copy + // [281] phi (byte) current_orientation#37 = (byte) current_orientation#13 [phi:play_move_down::@10->play_move_down::@11#4] -- register_copy + // [281] phi (byte) current_piece_char#29 = (byte) current_piece_char#10 [phi:play_move_down::@10->play_move_down::@11#5] -- register_copy + // [281] phi (byte*) current_piece#28 = (byte*) current_piece#10 [phi:play_move_down::@10->play_move_down::@11#6] -- register_copy + // [281] phi (byte) level_bcd#31 = (byte) level_bcd#11 [phi:play_move_down::@10->play_move_down::@11#7] -- register_copy + // [281] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#14 [phi:play_move_down::@10->play_move_down::@11#8] -- register_copy + // [281] phi (byte) level#33 = (byte) level#10 [phi:play_move_down::@10->play_move_down::@11#9] -- register_copy + // [281] phi (word) lines_bcd#26 = (word) lines_bcd#19 [phi:play_move_down::@10->play_move_down::@11#10] -- register_copy + // [281] phi (byte) current_ypos#38 = (byte) current_ypos#3 [phi:play_move_down::@10->play_move_down::@11#11] -- register_copy jmp __b11 } // play_spawn_current @@ -18622,98 +18594,98 @@ play_spawn_current: { // Spawn a new next piece // Pick a random piece (0-6) .label piece_idx = 5 - // [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 -- vbuxx=vbuz1 + // [286] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 -- vbuxx=vbuz1 // Move next piece into current ldx.z next_piece_idx - // [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 -- vbuz1=vbuxx_rol_1 + // [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 -- vbuz1=vbuxx_rol_1 txa asl sta.z __7 - // [290] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx + // [288] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_CHARS,x sta.z current_piece_char - // [291] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx + // [289] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_START_X,x sta.z current_xpos - // [292] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx + // [290] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_START_Y,x sta.z current_ypos - // [293] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 -- vbuz1=vbuz2 + // [291] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [294] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 -- vbuz1=vbuz2 + // [292] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __7 lda PIECES,y sta.z current_piece_1 lda PIECES+1,y sta.z current_piece_1+1 - // [296] call play_collision - // [202] phi from play_spawn_current to play_collision [phi:play_spawn_current->play_collision] + // [294] call play_collision + // [200] phi from play_spawn_current to play_collision [phi:play_spawn_current->play_collision] play_collision_from_play_spawn_current: - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#4 [phi:play_spawn_current->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#4 [phi:play_spawn_current->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) 0 [phi:play_spawn_current->play_collision#2] -- vbuxx=vbuc1 + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#4 [phi:play_spawn_current->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#4 [phi:play_spawn_current->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) 0 [phi:play_spawn_current->play_collision#2] -- vbuxx=vbuc1 ldx #0 - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#99 [phi:play_spawn_current->play_collision#3] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#99 [phi:play_spawn_current->play_collision#3] -- register_copy jsr play_collision - // [297] (byte) play_collision::return#10 ← (byte) play_collision::return#15 + // [295] (byte) play_collision::return#10 ← (byte) play_collision::return#15 jmp __b4 // play_spawn_current::@4 __b4: - // [298] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 - // [299] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 -- vbuaa_neq_vbuc1_then_la1 + // [296] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 + // [297] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_PLAYFIELD bne __b5_from___b4 - // [301] phi from play_spawn_current::@4 to play_spawn_current::@1 [phi:play_spawn_current::@4->play_spawn_current::@1] + // [299] phi from play_spawn_current::@4 to play_spawn_current::@1 [phi:play_spawn_current::@4->play_spawn_current::@1] __b1_from___b4: - // [301] phi (byte) game_over#52 = (byte) 1 [phi:play_spawn_current::@4->play_spawn_current::@1#0] -- vbuz1=vbuc1 + // [299] phi (byte) game_over#52 = (byte) 1 [phi:play_spawn_current::@4->play_spawn_current::@1#0] -- vbuz1=vbuc1 lda #1 sta.z game_over jmp __b1 - // [300] phi from play_spawn_current::@4 to play_spawn_current::@5 [phi:play_spawn_current::@4->play_spawn_current::@5] + // [298] phi from play_spawn_current::@4 to play_spawn_current::@5 [phi:play_spawn_current::@4->play_spawn_current::@5] __b5_from___b4: jmp __b5 // play_spawn_current::@5 __b5: - // [301] phi from play_spawn_current::@5 to play_spawn_current::@1 [phi:play_spawn_current::@5->play_spawn_current::@1] + // [299] phi from play_spawn_current::@5 to play_spawn_current::@1 [phi:play_spawn_current::@5->play_spawn_current::@1] __b1_from___b5: - // [301] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy + // [299] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy jmp __b1 // play_spawn_current::@1 __b1: - // [302] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] + // [300] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] __b2_from___b1: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 + // [300] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 lda #7 sta.z piece_idx jmp __b2 // play_spawn_current::@2 __b2: - // [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 + // [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 lda #7 cmp.z piece_idx beq sid_rnd1 jmp __breturn // play_spawn_current::@return __breturn: - // [304] return + // [302] return rts // play_spawn_current::sid_rnd1 sid_rnd1: - // [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) -- vbuaa=_deref_pbuc1 + // [303] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) -- vbuaa=_deref_pbuc1 lda SID_VOICE3_OSC jmp __b3 // play_spawn_current::@3 __b3: - // [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 + // [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 and #7 sta.z piece_idx - // [302] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] + // [300] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] __b2_from___b3: - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy + // [300] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy jmp __b2 } // play_update_score @@ -18722,22 +18694,22 @@ play_spawn_current: { play_update_score: { .label lines_before = $25 .label add_bcd = $26 - // [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 + // [305] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 cpx #0 beq __breturn_from_play_update_score jmp __b1 // play_update_score::@1 __b1: - // [308] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuaa=_lo_vwuz1 + // [306] (byte~) play_update_score::$2 ← < (word) lines_bcd#19 -- vbuaa=_lo_vwuz1 lda.z lines_bcd - // [309] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuaa_band_vbuc1 + // [307] (byte) play_update_score::lines_before#0 ← (byte~) play_update_score::$2 & (byte) $f0 -- vbuz1=vbuaa_band_vbuc1 and #$f0 sta.z lines_before - // [310] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [308] (byte~) play_update_score::$9 ← (byte) play_update_score::removed#0 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [311] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuaa + // [309] (dword) play_update_score::add_bcd#0 ← *((const dword*) score_add_bcd + (byte~) play_update_score::$9) -- vduz1=pduc1_derefidx_vbuaa tay lda score_add_bcd,y sta.z add_bcd @@ -18749,7 +18721,7 @@ play_update_score: { sta.z add_bcd+3 // asm { sed } sed - // [313] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuxx + // [311] (word) lines_bcd#29 ← (word) lines_bcd#19 + (byte) play_update_score::removed#0 -- vwuz1=vwuz1_plus_vbuxx txa clc adc.z lines_bcd @@ -18757,7 +18729,7 @@ play_update_score: { bcc !+ inc.z lines_bcd+1 !: - // [314] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 + // [312] (dword) score_bcd ← (dword) score_bcd + (dword) play_update_score::add_bcd#0 -- vduz1=vduz1_plus_vduz2 lda.z score_bcd clc adc.z add_bcd @@ -18773,40 +18745,40 @@ play_update_score: { sta.z score_bcd+3 // asm { cld } cld - // [316] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuaa=_lo_vwuz1 + // [314] (byte~) play_update_score::$4 ← < (word) lines_bcd#29 -- vbuaa=_lo_vwuz1 lda.z lines_bcd - // [317] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuaa=vbuaa_band_vbuc1 + // [315] (byte) play_update_score::lines_after#0 ← (byte~) play_update_score::$4 & (byte) $f0 -- vbuaa=vbuaa_band_vbuc1 and #$f0 - // [318] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuaa_then_la1 + // [316] if((byte) play_update_score::lines_before#0==(byte) play_update_score::lines_after#0) goto play_update_score::@return -- vbuz1_eq_vbuaa_then_la1 cmp.z lines_before beq __breturn_from___b1 - // [319] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] + // [317] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] __b2_from___b1: jmp __b2 // play_update_score::@2 __b2: - // [320] call play_increase_level + // [318] call play_increase_level jsr play_increase_level - // [321] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] + // [319] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] __breturn_from_play_update_score: __breturn_from___b1: __breturn_from___b2: - // [321] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy - // [321] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy - // [321] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy - // [321] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy + // [319] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy + // [319] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy + // [319] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy + // [319] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy jmp __breturn // play_update_score::@return __breturn: - // [322] return + // [320] return rts } // play_increase_level // Increase the level play_increase_level: { - // [323] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 + // [321] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 inc.z level - // [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 + // [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 // Update speed of moving tetrominos down lda.z level cmp #$1d+1 @@ -18814,64 +18786,64 @@ play_increase_level: { jmp __b3 // play_increase_level::@3 __b3: - // [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 + // [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 ldy.z level lda MOVEDOWN_SLOW_SPEEDS,y sta.z current_movedown_slow - // [326] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] + // [324] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] __b1_from___b3: - // [326] phi (byte) current_movedown_slow#65 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy + // [324] phi (byte) current_movedown_slow#65 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy jmp __b1 - // [326] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] + // [324] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] __b1_from_play_increase_level: - // [326] phi (byte) current_movedown_slow#65 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 + // [324] phi (byte) current_movedown_slow#65 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 lda #1 sta.z current_movedown_slow jmp __b1 // play_increase_level::@1 __b1: - // [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 + // [325] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 inc.z level_bcd - // [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 + // [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 lda #$f and.z level_bcd - // [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 + // [327] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 cmp #$a bne __b2_from___b1 jmp __b4 // play_increase_level::@4 __b4: - // [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 + // [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 // If level low nybble hits 0xa change to 0x10 lax.z level_bcd axs #-[6] stx.z level_bcd - // [331] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] + // [329] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] __b2_from___b1: __b2_from___b4: - // [331] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy + // [329] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy jmp __b2 // play_increase_level::@2 __b2: // asm { sed } // Increase the score values gained sed - // [333] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] + // [331] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] __b5_from___b2: - // [333] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 + // [331] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 ldx #0 jmp __b5 - // [333] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] + // [331] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] __b5_from___b5: - // [333] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy + // [331] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy jmp __b5 // play_increase_level::@5 __b5: - // [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa + // [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa tay clc lda score_add_bcd,y @@ -18886,9 +18858,9 @@ play_increase_level: { lda score_add_bcd+3,y adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx + // [334] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx inx - // [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 + // [335] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne __b5_from___b5 jmp __b6 @@ -18899,7 +18871,7 @@ play_increase_level: { jmp __breturn // play_increase_level::@return __breturn: - // [339] return + // [337] return rts } // play_remove_lines @@ -18913,137 +18885,137 @@ play_remove_lines: { .label y = 7 .label removed = 8 .label full = $a - // [341] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] + // [339] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] __b1_from_play_remove_lines: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 lda #0 sta.z removed - // [341] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 lda #0 sta.z y - // [341] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 + // [339] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 ldx #PLAYFIELD_LINES*PLAYFIELD_COLS-1 - // [341] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 + // [339] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 ldy #PLAYFIELD_LINES*PLAYFIELD_COLS-1 jmp __b1 // Read all lines and rewrite them - // [341] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] + // [339] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] __b1_from___b6: - // [341] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy - // [341] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy - // [341] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy - // [341] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy + // [339] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy + // [339] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy + // [339] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy + // [339] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy jmp __b1 // play_remove_lines::@1 __b1: - // [342] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] + // [340] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] __b2_from___b1: - // [342] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 lda #1 sta.z full - // [342] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 lda #0 sta.z x - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy + // [340] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy jmp __b2 - // [342] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] + // [340] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] __b2_from___b3: - // [342] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy - // [342] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy + // [340] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy + // [340] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy + // [340] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy jmp __b2 // play_remove_lines::@2 __b2: - // [343] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy + // [341] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy lda playfield,y sta.z c - // [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy + // [342] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy dey - // [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 + // [343] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 lda.z c cmp #0 bne __b9_from___b2 - // [347] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] + // [345] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] __b3_from___b2: - // [347] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 + // [345] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 lda #0 sta.z full jmp __b3 - // [346] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] + // [344] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] __b9_from___b2: jmp __b9 // play_remove_lines::@9 __b9: - // [347] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] + // [345] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] __b3_from___b9: - // [347] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy + // [345] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy jmp __b3 // play_remove_lines::@3 __b3: - // [348] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 + // [346] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z c sta playfield,x - // [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx + // [347] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx dex - // [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 + // [348] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 inc.z x - // [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 + // [349] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp.z x bne __b2_from___b3 jmp __b4 // play_remove_lines::@4 __b4: - // [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 + // [350] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 lda #1 cmp.z full bne __b6_from___b4 jmp __b5 // play_remove_lines::@5 __b5: - // [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS -- vbuxx=vbuxx_plus_vbuc1 + // [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[PLAYFIELD_COLS] - // [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 + // [352] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 inc.z removed - // [355] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] + // [353] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] __b6_from___b4: __b6_from___b5: - // [355] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy - // [355] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy + // [353] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy + // [353] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy jmp __b6 // play_remove_lines::@6 __b6: - // [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 + // [354] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 inc.z y - // [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 + // [355] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z y bne __b1_from___b6 - // [358] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] + // [356] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] __b7_from___b6: __b7_from___b8: - // [358] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy + // [356] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy jmp __b7 // Write zeros in the rest of the lines // play_remove_lines::@7 __b7: - // [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 + // [357] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 cpx #$ff bne __b8 jmp __breturn // play_remove_lines::@return __breturn: - // [360] return + // [358] return rts // play_remove_lines::@8 __b8: - // [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta playfield,x - // [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx + // [360] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx dex jmp __b7_from___b8 } @@ -19056,45 +19028,45 @@ play_lock_current: { .label i = $2e .label l = $b .label i_1 = $c - // [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 - // [364] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] + // [361] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + // [362] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] __b1_from_play_lock_current: - // [364] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 + // [362] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [364] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 + // [362] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i_1 - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy + // [362] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy jmp __b1 // play_lock_current::@1 __b1: - // [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z yp asl - // [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa + // [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa tay lda playfield_lines,y sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 - // [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [365] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda.z current_xpos sta.z xp - // [368] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] + // [366] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] __b2_from___b1: - // [368] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 + // [366] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 ldx #0 - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy + // [366] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy + // [366] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy jmp __b2 // play_lock_current::@2 __b2: - // [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 + // [367] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 ldy.z i_1 iny sty.z i - // [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z i_1 lda (current_piece_gfx),y cmp #0 @@ -19102,57 +19074,57 @@ play_lock_current: { jmp __b4 // play_lock_current::@4 __b4: - // [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 + // [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z current_piece_char ldy.z xp sta (playfield_line),y jmp __b3 // play_lock_current::@3 __b3: - // [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 + // [370] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 inc.z xp - // [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx + // [371] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx inx - // [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 + // [372] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b7 jmp __b5 // play_lock_current::@5 __b5: - // [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 + // [373] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 inc.z yp - // [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 + // [374] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 inc.z l - // [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 + // [375] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b6 jmp __breturn // play_lock_current::@return __breturn: - // [378] return + // [376] return rts // play_lock_current::@6 __b6: - // [379] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [377] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [364] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] + // [362] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] __b1_from___b6: - // [364] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy - // [364] phi (byte) play_lock_current::i#3 = (byte) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy + // [362] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy + // [362] phi (byte) play_lock_current::i#3 = (byte) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy + // [362] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy jmp __b1 // play_lock_current::@7 __b7: - // [380] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [378] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [368] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] + // [366] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] __b2_from___b7: - // [368] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy + // [366] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy + // [366] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy + // [366] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy jmp __b2 } // keyboard_event_pressed @@ -19162,26 +19134,26 @@ play_lock_current: { keyboard_event_pressed: { .label row_bits = $2d .label keycode = $d - // [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 + // [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda.z keycode lsr lsr lsr - // [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa + // [381] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa tay lda keyboard_scan_values,y sta.z row_bits - // [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 + // [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 lda #7 and.z keycode - // [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa + // [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa tay lda keyboard_matrix_col_bitmask,y and.z row_bits jmp __breturn // keyboard_event_pressed::@return __breturn: - // [386] return + // [384] return rts } // keyboard_event_get @@ -19189,32 +19161,32 @@ keyboard_event_pressed: { // Returns $ff if there is no event waiting. As all events are <$7f it is enough to examine bit 7 when determining if there is any event to process. // The buffer is filled by keyboard_event_scan() keyboard_event_get: { - // [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + // [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda.z keyboard_events_size cmp #0 beq __breturn_from_keyboard_event_get jmp __b1 // keyboard_event_get::@1 __b1: - // [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + // [386] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 dec.z keyboard_events_size - // [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 + // [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 ldy.z keyboard_events_size ldx keyboard_events,y - // [390] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] + // [388] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] __breturn_from___b1: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy + // [388] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy + // [388] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy jmp __breturn - // [390] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + // [388] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] __breturn_from_keyboard_event_get: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 + // [388] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + // [388] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 ldx #$ff jmp __breturn // keyboard_event_get::@return __breturn: - // [391] return + // [389] return rts } // keyboard_event_scan @@ -19226,35 +19198,35 @@ keyboard_event_scan: { .label row_scan = $2e .label keycode = $20 .label row = $1f - // [393] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] + // [391] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] __b7_from_keyboard_event_scan: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 + // [391] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy + // [391] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 lda #0 sta.z keycode - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 + // [391] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 lda #0 sta.z row jmp __b7 - // [393] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] + // [391] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] __b7_from___b8: - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy + // [391] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy + // [391] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy + // [391] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy jmp __b7 // keyboard_event_scan::@7 __b7: - // [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 + // [392] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 ldx.z row - // [395] call keyboard_matrix_read + // [393] call keyboard_matrix_read jsr keyboard_matrix_read - // [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // [394] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 jmp __b19 // keyboard_event_scan::@19 __b19: - // [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa + // [395] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa sta.z row_scan - // [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + // [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 lda.z row_scan ldy.z row cmp keyboard_scan_values,y @@ -19262,123 +19234,123 @@ keyboard_event_scan: { jmp __b16 // keyboard_event_scan::@16 __b16: - // [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax.z keycode axs #-[8] stx.z keycode - // [400] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] + // [398] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] __b8_from___b15: __b8_from___b16: - // [400] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy - // [400] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy + // [398] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy + // [398] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy jmp __b8 // keyboard_event_scan::@8 __b8: - // [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + // [399] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 inc.z row - // [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 + // [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z row bne __b7_from___b8 - // [403] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] + // [401] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] __b17_from___b8: jmp __b17 // keyboard_event_scan::@17 __b17: - // [404] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] + // [402] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] keyboard_event_pressed_from___b17: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_LSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + // [403] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 jmp __b20 // keyboard_event_scan::@20 __b20: - // [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 - // [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 + // [404] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + // [405] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 cmp #0 beq __b1_from___b20 - // [408] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] + // [406] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] __b18_from___b20: jmp __b18 // keyboard_event_scan::@18 __b18: - // [409] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] + // [407] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] __b1_from___b18: __b1_from___b20: jmp __b1 // keyboard_event_scan::@1 __b1: - // [410] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] + // [408] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] keyboard_event_pressed_from___b1: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_RSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + // [409] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 jmp __b21 // keyboard_event_scan::@21 __b21: - // [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 - // [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 + // [410] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + // [411] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2_from___b21 - // [414] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] + // [412] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] __b4_from___b21: jmp __b4 // keyboard_event_scan::@4 __b4: - // [415] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] + // [413] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] __b2_from___b21: __b2_from___b4: jmp __b2 // keyboard_event_scan::@2 __b2: - // [416] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] + // [414] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] keyboard_event_pressed_from___b2: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_CTRL sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + // [415] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 jmp __b22 // keyboard_event_scan::@22 __b22: - // [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 - // [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 + // [416] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + // [417] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq __b3_from___b22 - // [420] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] + // [418] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] __b5_from___b22: jmp __b5 // keyboard_event_scan::@5 __b5: - // [421] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] + // [419] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] __b3_from___b22: __b3_from___b5: jmp __b3 // keyboard_event_scan::@3 __b3: - // [422] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] + // [420] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] keyboard_event_pressed_from___b3: - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_COMMODORE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed - // [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + // [421] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 jmp __b23 // keyboard_event_scan::@23 __b23: - // [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 - // [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 + // [422] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + // [423] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 cmp #0 beq __breturn - // [426] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] + // [424] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] __b6_from___b23: jmp __b6 // keyboard_event_scan::@6 @@ -19386,79 +19358,79 @@ keyboard_event_scan: { jmp __breturn // keyboard_event_scan::@return __breturn: - // [427] return + // [425] return rts // Something has changed on the keyboard row - check each column - // [428] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] + // [426] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] __b9_from___b10: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy + // [426] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy + // [426] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy + // [426] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy jmp __b9 - // [428] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] + // [426] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] __b9_from___b19: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 + // [426] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy + // [426] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy + // [426] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 ldx #0 jmp __b9 // keyboard_event_scan::@9 __b9: - // [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 + // [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 lda.z row_scan ldy.z row eor keyboard_scan_values,y - // [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx + // [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx and keyboard_matrix_col_bitmask,x - // [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 + // [429] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 cmp #0 beq __b10_from___b9 jmp __b12 // keyboard_event_scan::@12 __b12: - // [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 + // [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp.z keyboard_events_size beq __b10_from___b12 jmp __b13 // keyboard_event_scan::@13 __b13: - // [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx + // [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx lda keyboard_matrix_col_bitmask,x and.z row_scan - // [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 + // [432] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 cmp #0 beq __b11 jmp __b14 // keyboard_event_scan::@14 __b14: - // [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 // Key pressed lda.z keycode ldy.z keyboard_events_size sta keyboard_events,y - // [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [434] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc.z keyboard_events_size - // [437] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] + // [435] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] __b10_from___b11: __b10_from___b12: __b10_from___b14: __b10_from___b9: - // [437] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy + // [435] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy jmp __b10 // keyboard_event_scan::@10 __b10: - // [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + // [436] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 inc.z keycode - // [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx + // [437] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx inx - // [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 + // [438] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b9_from___b10 jmp __b15 // keyboard_event_scan::@15 __b15: - // [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 // Store the current keyboard status for the row to debounce lda.z row_scan ldy.z row @@ -19466,14 +19438,14 @@ keyboard_event_scan: { jmp __b8_from___b15 // keyboard_event_scan::@11 __b11: - // [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 + // [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 lda #$40 ora.z keycode - // [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa + // [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa // Key released ldy.z keyboard_events_size sta keyboard_events,y - // [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [442] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc.z keyboard_events_size jmp __b10_from___b11 } @@ -19485,16 +19457,16 @@ keyboard_event_scan: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { - // [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx + // [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A - // [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 + // [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff jmp __breturn // keyboard_matrix_read::@return __breturn: - // [447] return + // [445] return rts } // render_show @@ -19502,48 +19474,48 @@ keyboard_matrix_read: { render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f - // [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 + // [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 lda.z render_screen_show cmp #0 beq toD0181_from_render_show - // [449] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] + // [447] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] toD0182_from_render_show: jmp toD0182 // render_show::toD0182 toD0182: - // [450] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] + // [448] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] __b1_from_toD0182: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 + // [448] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0182_return jmp __b1 // render_show::@1 __b1: - // [451] *((const byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa + // [449] *((const byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa sta D018 - // [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_1,y sta BGCOL2 - // [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_2,y sta BGCOL3 - // [454] (byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 + // [452] (byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda.z render_screen_show sta.z render_screen_showing jmp __breturn // render_show::@return __breturn: - // [455] return + // [453] return rts - // [456] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] + // [454] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] toD0181_from_render_show: jmp toD0181 // render_show::toD0181 toD0181: - // [450] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] + // [448] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] __b1_from_toD0181: - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 + // [448] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0181_return jmp __b1 } @@ -19553,40 +19525,40 @@ play_init: { .label pli = $21 // Initialize the playfield line pointers; .label idx = $f - // [458] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] + // [456] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] __b1_from_play_init: - // [458] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 + // [456] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z idx - // [458] phi (byte*) play_init::pli#2 = (const byte*) playfield [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 + // [456] phi (byte*) play_init::pli#2 = (const byte*) playfield [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 lda #playfield sta.z pli+1 - // [458] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 + // [456] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 ldy #0 jmp __b1 - // [458] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] + // [456] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] __b1_from___b1: - // [458] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy - // [458] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy - // [458] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy + // [456] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy + // [456] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy + // [456] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy jmp __b1 // play_init::@1 __b1: - // [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 lda.z pli sta playfield_lines,x lda.z pli+1 sta playfield_lines+1,x - // [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 + // [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 lda.z idx sta playfield_lines_idx,y - // [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS -- pbuz1=pbuz1_plus_vbuc1 + // [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS -- pbuz1=pbuz1_plus_vbuc1 lda #PLAYFIELD_COLS clc adc.z pli @@ -19594,42 +19566,42 @@ play_init: { bcc !+ inc.z pli+1 !: - // [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 + // [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 lax.z idx axs #-[PLAYFIELD_COLS] stx.z idx - // [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy + // [462] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy iny - // [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [463] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne __b1_from___b1 jmp __b2 // play_init::@2 __b2: - // [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES -- _deref_pbuc1=vbuc2 + // [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES -- _deref_pbuc1=vbuc2 lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES - // [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) -- vbuz1=_deref_pbuc1 + // [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) -- vbuz1=_deref_pbuc1 // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta.z current_movedown_slow - // [468] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] + // [466] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] __b3_from___b2: - // [468] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 + // [466] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 ldx #0 jmp __b3 // Set the initial score add values - // [468] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] + // [466] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] __b3_from___b3: - // [468] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy + // [466] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy jmp __b3 // play_init::@3 __b3: - // [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa + // [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa tay lda SCORE_BASE_BCD,y sta score_add_bcd,y @@ -19639,15 +19611,15 @@ play_init: { sta score_add_bcd+2,y lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y - // [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx + // [469] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx inx - // [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [470] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne __b3_from___b3 jmp __breturn // play_init::@return __breturn: - // [473] return + // [471] return rts } // sprites_irq_init @@ -19655,36 +19627,36 @@ play_init: { sprites_irq_init: { // asm { sei } sei - // [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS // asm { ldaCIA1_INTERRUPT } lda CIA1_INTERRUPT - // [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 + // [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR - // [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 + // [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT - // [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR -- _deref_pbuc1=vbuc2 + // [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR -- _deref_pbuc1=vbuc2 // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT - // [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL - // [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST -- _deref_pbuc1=vbuc2 + // [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER_FIRST sta RASTER - // [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE - // [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 + // [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #sprites_init::@1] + // [488] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] __b1_from_sprites_init: - // [490] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 + // [488] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 lda #$18+$f*8 sta.z xpos - // [490] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 + // [488] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 ldy #0 jmp __b1 - // [490] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] + // [488] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] __b1_from___b1: - // [490] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy - // [490] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy + // [488] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy + // [488] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy jmp __b1 // sprites_init::@1 __b1: - // [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 + // [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z xpos sta SPRITES_XPOS,x - // [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 + // [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK sta SPRITES_COLS,y - // [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + // [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] stx.z xpos - // [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy + // [493] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy iny - // [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [494] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #4 bne __b1_from___b1 jmp __breturn // sprites_init::@return __breturn: - // [497] return + // [495] return rts } // render_init @@ -19764,10 +19736,10 @@ render_init: { jmp vicSelectGfxBank1 // render_init::vicSelectGfxBank1 vicSelectGfxBank1: - // [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2_PORT_A_DDR - // [500] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] + // [498] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] vicSelectGfxBank1_toDd001_from_vicSelectGfxBank1: jmp vicSelectGfxBank1_toDd001 // render_init::vicSelectGfxBank1_toDd001 @@ -19775,92 +19747,92 @@ render_init: { jmp vicSelectGfxBank1___b1 // render_init::vicSelectGfxBank1_@1 vicSelectGfxBank1___b1: - // [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + // [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A jmp __b2 // render_init::@2 __b2: - // [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + // [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 - // [503] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [501] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL - // [504] *((const byte*) BGCOL1) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [502] *((const byte*) BGCOL1) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BGCOL1 - // [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 + // [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 sta BGCOL2 - // [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 + // [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 sta BGCOL3 - // [507] *((const byte*) BGCOL4) ← (const byte) GREY -- _deref_pbuc1=vbuc2 + // [505] *((const byte*) BGCOL4) ← (const byte) GREY -- _deref_pbuc1=vbuc2 lda #GREY sta BGCOL4 - // [508] call render_screen_original - // [520] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] + // [506] call render_screen_original + // [518] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] render_screen_original_from___b2: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 + // [518] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1 sta.z render_screen_original.screen+1 jsr render_screen_original - // [509] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] + // [507] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] __b3_from___b2: jmp __b3 // render_init::@3 __b3: - // [510] call render_screen_original - // [520] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] + // [508] call render_screen_original + // [518] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] render_screen_original_from___b3: - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 + // [518] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2 sta.z render_screen_original.screen+1 jsr render_screen_original - // [511] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] + // [509] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] __b1_from___b3: - // [511] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 + // [509] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2+2*$28+$10 sta.z li_2+1 - // [511] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 + // [509] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1+2*$28+$10 sta.z li_1+1 - // [511] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 + // [509] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 ldy #0 jmp __b1 - // [511] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] + // [509] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] __b1_from___b1: - // [511] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy - // [511] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy - // [511] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy + // [509] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy + // [509] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy + // [509] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy jmp __b1 // render_init::@1 __b1: - // [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 lda.z li_1 sta screen_lines_1,x lda.z li_1+1 sta screen_lines_1+1,x - // [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 lda.z li_2 sta screen_lines_2,x lda.z li_2+1 sta screen_lines_2+1,x - // [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z li_1 @@ -19868,7 +19840,7 @@ render_init: { bcc !+ inc.z li_1+1 !: - // [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z li_2 @@ -19876,15 +19848,15 @@ render_init: { bcc !+ inc.z li_2+1 !: - // [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy + // [515] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy iny - // [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [516] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne __b1_from___b1 jmp __breturn // render_init::@return __breturn: - // [519] return + // [517] return rts } // render_screen_original @@ -19898,184 +19870,184 @@ render_screen_original: { .label oscr = $14 .label ocols = $21 .label y = $13 - // [521] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] + // [519] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] __b1_from_render_screen_original: - // [521] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 + // [519] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [521] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 lda #PLAYFIELD_COLORS_ORIGINAL+$20*2 sta.z ocols+1 - // [521] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta.z oscr+1 - // [521] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 lda #COLS sta.z cols+1 - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy + // [519] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy jmp __b1 - // [521] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] + // [519] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] __b1_from___b5: - // [521] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy - // [521] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy - // [521] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy - // [521] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy + // [519] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy + // [519] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy + // [519] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy + // [519] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy + // [519] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy jmp __b1 // render_screen_original::@1 __b1: - // [522] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] + // [520] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] __b2_from___b1: - // [522] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 + // [520] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 ldx #0 - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy + // [520] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy + // [520] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy jmp __b2 - // [522] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] + // [520] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] __b2_from___b2: - // [522] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy + // [520] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy + // [520] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy + // [520] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy jmp __b2 // render_screen_original::@2 __b2: - // [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 + // [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 + // [522] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 + // [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 + // [524] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx + // [525] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx inx - // [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 + // [526] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b2_from___b2 - // [529] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] + // [527] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] __b3_from___b2: __b3_from___b3: - // [529] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy - // [529] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy - // [529] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy - // [529] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy - // [529] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy + // [527] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy + // [527] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy + // [527] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy + // [527] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy + // [527] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy jmp __b3 // render_screen_original::@3 __b3: - // [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 + // [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (oscr),y ldy #0 sta (screen),y - // [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 + // [529] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 + // [530] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 inc.z oscr bne !+ inc.z oscr+1 !: - // [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 + // [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (ocols),y ldy #0 sta (cols),y - // [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 + // [532] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 + // [533] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 inc.z ocols bne !+ inc.z ocols+1 !: - // [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx + // [534] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx inx - // [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 + // [535] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #$24 bne __b3_from___b3 - // [538] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] + // [536] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] __b4_from___b3: __b4_from___b4: - // [538] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy - // [538] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy - // [538] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy + // [536] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy + // [536] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy + // [536] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy jmp __b4 // render_screen_original::@4 __b4: - // [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 + // [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y - // [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 + // [538] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 + // [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y - // [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 + // [540] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx + // [541] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx inx - // [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 + // [542] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b4_from___b4 jmp __b5 // render_screen_original::@5 __b5: - // [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 + // [543] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 inc.z y - // [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 + // [544] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z y bne __b1_from___b5 jmp __breturn // render_screen_original::@return __breturn: - // [547] return + // [545] return rts } // sid_rnd_init // Initialize SID voice 3 for random number generation sid_rnd_init: { - // [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff -- _deref_pwuc1=vwuc2 + // [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff -- _deref_pwuc1=vwuc2 lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 - // [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE -- _deref_pbuc1=vbuc2 + // [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL jmp __breturn // sid_rnd_init::@return __breturn: - // [550] return + // [548] return rts } // sprites_irq @@ -20092,102 +20064,102 @@ sprites_irq: { //(*BGCOL)++; // Clear decimal flag (because it is used by the score algorithm) cld - // [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos -- vbuaa=vbuz1 + // [550] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos -- vbuaa=vbuz1 // Place the sprites lda.z irq_sprite_ypos - // [553] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [551] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS - // [554] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [552] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+2 - // [555] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [553] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+4 - // [556] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [554] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+6 - // [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [555] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z irq_raster_next inx - // [558] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx + // [556] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx // Wait for the y-position before changing sprite pointers stx.z raster_sprite_gfx_modify jmp __b8 // sprites_irq::@8 __b8: - // [559] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 + // [557] if(*((const byte*) RASTER)<(byte) sprites_irq::raster_sprite_gfx_modify) goto sprites_irq::@8 -- _deref_pbuc1_lt_vbuz1_then_la1 lda RASTER cmp.z raster_sprite_gfx_modify bcc __b8 jmp __b9 // sprites_irq::@9 __b9: - // [560] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr -- vbuxx=vbuz1 + // [558] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr -- vbuxx=vbuz1 ldx.z irq_sprite_ptr - // [561] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 + // [559] if((byte) render_screen_showing==(byte) 0) goto sprites_irq::@1 -- vbuz1_eq_0_then_la1 lda.z render_screen_showing cmp #0 beq __b1 jmp __b10 // sprites_irq::@10 __b10: - // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [560] *((const byte*) PLAYFIELD_SPRITE_PTRS_2) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_2 - // [563] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx + // [561] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0 -- vbuaa=_inc_vbuxx inx txa - // [564] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa + // [562] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 1) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+1 - // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa + // [563] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 2) ← (byte) sprites_irq::ptr#3 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+2 - // [566] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa + // [564] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3 -- vbuaa=_inc_vbuaa clc adc #1 - // [567] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa + // [565] *((const byte*) PLAYFIELD_SPRITE_PTRS_2+(byte) 3) ← (byte) sprites_irq::ptr#4 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_2+3 jmp __b2 // sprites_irq::@2 __b2: - // [568] (byte) irq_cnt ← ++ (byte) irq_cnt -- vbuz1=_inc_vbuz1 + // [566] (byte) irq_cnt ← ++ (byte) irq_cnt -- vbuz1=_inc_vbuz1 inc.z irq_cnt - // [569] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 + // [567] if((byte) irq_cnt==(byte) 9) goto sprites_irq::@3 -- vbuz1_eq_vbuc1_then_la1 lda #9 cmp.z irq_cnt beq __b3 jmp __b6 // sprites_irq::@6 __b6: - // [570] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 + // [568] if((byte) irq_cnt==(byte) $a) goto sprites_irq::@4 -- vbuz1_eq_vbuc1_then_la1 lda #$a cmp.z irq_cnt beq __b4 jmp __b7 // sprites_irq::@7 __b7: - // [571] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 + // [569] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $14 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next axs #-[$14] stx.z irq_raster_next - // [572] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [570] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ypos axs #-[$15] stx.z irq_sprite_ypos - // [573] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [571] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ptr axs #-[3] stx.z irq_sprite_ptr jmp __b5 // sprites_irq::@5 __b5: - // [574] *((const byte*) RASTER) ← (byte) irq_raster_next -- _deref_pbuc1=vbuz1 + // [572] *((const byte*) RASTER) ← (byte) irq_raster_next -- _deref_pbuc1=vbuz1 // Setup next interrupt lda.z irq_raster_next sta RASTER - // [575] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [573] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS jmp __breturn // sprites_irq::@return __breturn: - // [576] return - exit interrupt(HARDWARE_CLOBBER) + // [574] return - exit interrupt(HARDWARE_CLOBBER) rega: lda #00 regx: @@ -20195,31 +20167,31 @@ sprites_irq: { rti // sprites_irq::@4 __b4: - // [577] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 + // [575] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z irq_cnt - // [578] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 + // [576] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 lda #IRQ_RASTER_FIRST sta.z irq_raster_next - // [579] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [577] (byte) irq_sprite_ypos ← (byte) irq_sprite_ypos + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ypos axs #-[$15] stx.z irq_sprite_ypos - // [580] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 + // [578] (byte) irq_sprite_ptr ← (byte) irq_sprite_ptr + (byte) 3 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_sprite_ptr axs #-[3] stx.z irq_sprite_ptr jmp __b5 // sprites_irq::@3 __b3: - // [581] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 + // [579] (byte) irq_raster_next ← (byte) irq_raster_next + (byte) $15 -- vbuz1=vbuz1_plus_vbuc1 lax.z irq_raster_next axs #-[$15] stx.z irq_raster_next - // [582] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS -- vbuz1=vbuc1 + // [580] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS -- vbuz1=vbuc1 lda #SPRITES_FIRST_YPOS sta.z irq_sprite_ypos - // [583] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] + // [581] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] toSpritePtr2_from___b3: jmp toSpritePtr2 // sprites_irq::toSpritePtr2 @@ -20227,24 +20199,24 @@ sprites_irq: { jmp __b11 // sprites_irq::@11 __b11: - // [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 + // [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 lda #toSpritePtr2_return sta.z irq_sprite_ptr jmp __b5 // sprites_irq::@1 __b1: - // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [583] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1 - // [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx + // [584] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx inx - // [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+1 - // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+2 - // [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx + // [587] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx inx txa - // [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa + // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_1+3 jmp __b2 } @@ -20290,6 +20262,20 @@ sprites_irq: { // The initial X/Y for each piece PIECES_START_X: .byte 4, 4, 4, 4, 4, 4, 4 PIECES_START_Y: .byte 1, 1, 1, 1, 1, 0, 1 +PLAYFIELD_SCREEN_ORIGINAL: +// Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + + // Original Color Data +PLAYFIELD_COLORS_ORIGINAL: +.import binary "playfield-screen.col" + // The color #1 to use for the pieces for each level PIECES_COLORS_1: .byte BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED // The color #2 to use for the pieces for each level @@ -20317,19 +20303,6 @@ sprites_irq: { .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" -.pc = PLAYFIELD_SCREEN_ORIGINAL "PLAYFIELD_SCREEN_ORIGINAL" - // Load chars for the screen - .var screen = LoadBinary("playfield-screen.iscr") - // Load extended colors for the screen - .var extended = LoadBinary("playfield-extended.col") - // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 - // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) - // <<6 to move extended colors to the upper 2 bits - .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) - -.pc = PLAYFIELD_COLORS_ORIGINAL "PLAYFIELD_COLORS_ORIGINAL" - .import binary "playfield-screen.col" - .pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES" .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) // Put the sprites into memory @@ -21051,13 +21024,22 @@ FINAL SYMBOL TABLE (const byte*) PIECE_Z[(number) $40] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte) PINK = (byte) $a (const byte*) PLAYFIELD_CHARSET = (byte*) 10240 -(const byte*) PLAYFIELD_COLORS_ORIGINAL = (byte*) 7168 +(const byte*) PLAYFIELD_COLORS_ORIGINAL[] = kickasm {{ .import binary "playfield-screen.col" + }} (const byte) PLAYFIELD_COLS = (byte) $a (const byte) PLAYFIELD_LINES = (byte) $16 (const byte*) PLAYFIELD_SCREEN_1 = (byte*) 1024 (const byte*) PLAYFIELD_SCREEN_2 = (byte*) 11264 -(const byte*) PLAYFIELD_SCREEN_ORIGINAL = (byte*) 12288 -(const byte*) PLAYFIELD_SPRITES = (byte*) 8192 +(const byte*) PLAYFIELD_SCREEN_ORIGINAL[] = kickasm {{ // Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + }} +(const byte*) PLAYFIELD_SPRITES = (byte*) 12288 (const byte*) PLAYFIELD_SPRITE_PTRS_1 = (const byte*) PLAYFIELD_SCREEN_1+(const word) SPRITE_PTRS (const byte*) PLAYFIELD_SPRITE_PTRS_2 = (const byte*) PLAYFIELD_SCREEN_2+(const word) SPRITE_PTRS (const byte*) PROCPORT = (byte*) 1 @@ -21842,7 +21824,7 @@ FINAL SYMBOL TABLE (const byte) render_show::toD0182_return#0 toD0182_return = >(word)(const byte*) PLAYFIELD_SCREEN_2&(word) $3fff*(byte) 4|>(word)(const byte*) PLAYFIELD_CHARSET/(byte) 4&(byte) $f (byte*) render_show::toD0182_screen (const dword*) score_add_bcd[(number) 5] = { fill( 5, 0) } -(dword) score_bcd loadstore zp[4]:23 0.04316546762589928 +(dword) score_bcd loadstore zp[4]:23 0.043795620437956206 (const byte**) screen_lines_1[(const byte) PLAYFIELD_LINES] = { fill( PLAYFIELD_LINES, 0) } (const byte**) screen_lines_2[(const byte) PLAYFIELD_LINES] = { fill( PLAYFIELD_LINES, 0) } (void()) sid_rnd_init() @@ -22037,7 +22019,7 @@ reg byte a [ sprites_irq::ptr#2 ] FINAL ASSEMBLER -Score: 3353855 +Score: 3348735 // File Comments // Tetris Game for the Commodore 64 @@ -22134,12 +22116,8 @@ Score: 3353855 .label PLAYFIELD_SPRITE_PTRS_1 = PLAYFIELD_SCREEN_1+SPRITE_PTRS // Screen Sprite pointers on screen 2 .label PLAYFIELD_SPRITE_PTRS_2 = PLAYFIELD_SCREEN_2+SPRITE_PTRS - // Address of the original playscreen chars - .label PLAYFIELD_SCREEN_ORIGINAL = $3000 - // Address of the original playscreen colors - .label PLAYFIELD_COLORS_ORIGINAL = $1c00 // Address of the sprites covering the playfield - .label PLAYFIELD_SPRITES = $2000 + .label PLAYFIELD_SPRITES = $3000 // Address of the charset .label PLAYFIELD_CHARSET = $2800 // The size of the playfield @@ -22230,305 +22208,302 @@ __b1: sta.z score_bcd+3 // kickasm // kickasm(location (const byte*) PLAYFIELD_CHARSET) {{ .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" }} - // kickasm(location (const byte*) PLAYFIELD_SCREEN_ORIGINAL) {{ // Load chars for the screen .var screen = LoadBinary("playfield-screen.iscr") // Load extended colors for the screen .var extended = LoadBinary("playfield-extended.col") // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) // <<6 to move extended colors to the upper 2 bits .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) }} - // kickasm(location (const byte*) PLAYFIELD_COLORS_ORIGINAL) {{ .import binary "playfield-screen.col" }} -// Original Color Data // @2 // kickasm(location (const byte*) PLAYFIELD_SPRITES) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) // Put the sprites into memory .for(var sy=0;sy<10;sy++) { .var sprite_gfx_y = sy*20 .for(var sx=0;sx<3;sx++) { .for (var y=0;y<21; y++) { .var gfx_y = sprite_gfx_y + mod(2100+y-sprite_gfx_y,21) .for (var c=0; c<3; c++) { .byte sprites.getSinglecolorByte(sx*3+c,gfx_y) } } .byte 0 } } }} // @3 // irq_raster_next = IRQ_RASTER_FIRST - // [7] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 + // [5] (byte) irq_raster_next ← (const byte) IRQ_RASTER_FIRST -- vbuz1=vbuc1 // The raster line of the next IRQ lda #IRQ_RASTER_FIRST sta.z irq_raster_next // irq_sprite_ypos = SPRITES_FIRST_YPOS + 21 - // [8] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 -- vbuz1=vbuc1 + // [6] (byte) irq_sprite_ypos ← (const byte) SPRITES_FIRST_YPOS+(byte) $15 -- vbuz1=vbuc1 // Y-pos of the sprites on the next IRQ lda #SPRITES_FIRST_YPOS+$15 sta.z irq_sprite_ypos - // [9] phi from @3 to toSpritePtr1 [phi:@3->toSpritePtr1] + // [7] phi from @3 to toSpritePtr1 [phi:@3->toSpritePtr1] // toSpritePtr1 // @5 // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES) + 3 - // [10] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 + // [8] (byte) irq_sprite_ptr ← (const byte) toSpritePtr1_return#0+(byte) 3 -- vbuz1=vbuc1 // Index of the sprites to show on the next IRQ lda #toSpritePtr1_return+3 sta.z irq_sprite_ptr // irq_cnt = 0 - // [11] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 + // [9] (byte) irq_cnt ← (byte) 0 -- vbuz1=vbuc1 // Counting the 10 IRQs lda #0 sta.z irq_cnt - // [12] phi from @5 to @4 [phi:@5->@4] + // [10] phi from @5 to @4 [phi:@5->@4] // @4 - // [13] call main - // [15] phi from @4 to main [phi:@4->main] + // [11] call main + // [13] phi from @4 to main [phi:@4->main] jsr main rts - // [14] phi from @4 to @end [phi:@4->@end] + // [12] phi from @4 to @end [phi:@4->@end] // @end // main main: { // sid_rnd_init() - // [16] call sid_rnd_init + // [14] call sid_rnd_init jsr sid_rnd_init // main::@8 // asm // asm { sei } sei // render_init() - // [18] call render_init - // [498] phi from main::@8 to render_init [phi:main::@8->render_init] + // [16] call render_init + // [496] phi from main::@8 to render_init [phi:main::@8->render_init] jsr render_init - // [19] phi from main::@8 to main::@9 [phi:main::@8->main::@9] + // [17] phi from main::@8 to main::@9 [phi:main::@8->main::@9] // main::@9 // sprites_init() - // [20] call sprites_init + // [18] call sprites_init jsr sprites_init - // [21] phi from main::@9 to main::@10 [phi:main::@9->main::@10] + // [19] phi from main::@9 to main::@10 [phi:main::@9->main::@10] // main::@10 // sprites_irq_init() - // [22] call sprites_irq_init + // [20] call sprites_irq_init jsr sprites_irq_init - // [23] phi from main::@10 to main::@11 [phi:main::@10->main::@11] + // [21] phi from main::@10 to main::@11 [phi:main::@10->main::@11] // main::@11 // play_init() - // [24] call play_init - // [457] phi from main::@11 to play_init [phi:main::@11->play_init] + // [22] call play_init + // [455] phi from main::@11 to play_init [phi:main::@11->play_init] jsr play_init - // [25] phi from main::@11 to main::@12 [phi:main::@11->main::@12] + // [23] phi from main::@11 to main::@12 [phi:main::@11->main::@12] // main::@12 // play_spawn_current() - // [26] call play_spawn_current - // [287] phi from main::@12 to play_spawn_current [phi:main::@12->play_spawn_current] - // [287] phi (byte) game_over#65 = (byte) 0 [phi:main::@12->play_spawn_current#0] -- vbuz1=vbuc1 + // [24] call play_spawn_current + // [285] phi from main::@12 to play_spawn_current [phi:main::@12->play_spawn_current] + // [285] phi (byte) game_over#65 = (byte) 0 [phi:main::@12->play_spawn_current#0] -- vbuz1=vbuc1 lda #0 sta.z game_over - // [287] phi (byte) next_piece_idx#17 = (byte) 0 [phi:main::@12->play_spawn_current#1] -- vbuz1=vbuc1 + // [285] phi (byte) next_piece_idx#17 = (byte) 0 [phi:main::@12->play_spawn_current#1] -- vbuz1=vbuc1 sta.z next_piece_idx jsr play_spawn_current - // [27] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + // [25] phi from main::@12 to main::@13 [phi:main::@12->main::@13] // main::@13 // play_spawn_current() - // [28] call play_spawn_current - // [287] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] - // [287] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy + // [26] call play_spawn_current + // [285] phi from main::@13 to play_spawn_current [phi:main::@13->play_spawn_current] + // [285] phi (byte) game_over#65 = (byte) game_over#52 [phi:main::@13->play_spawn_current#0] -- register_copy + // [285] phi (byte) next_piece_idx#17 = (byte) play_spawn_current::piece_idx#2 [phi:main::@13->play_spawn_current#1] -- register_copy jsr play_spawn_current - // [29] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + // [27] phi from main::@13 to main::@14 [phi:main::@13->main::@14] // main::@14 // render_playfield() - // [30] call render_playfield - // [152] phi from main::@14 to render_playfield [phi:main::@14->render_playfield] - // [152] phi (byte) render_screen_render#22 = (byte) $20 [phi:main::@14->render_playfield#0] -- vbuxx=vbuc1 + // [28] call render_playfield + // [150] phi from main::@14 to render_playfield [phi:main::@14->render_playfield] + // [150] phi (byte) render_screen_render#22 = (byte) $20 [phi:main::@14->render_playfield#0] -- vbuxx=vbuc1 ldx #$20 jsr render_playfield // main::@15 - // [31] (byte) current_ypos#97 ← (byte) current_ypos#6 -- vbuxx=vbuz1 + // [29] (byte) current_ypos#97 ← (byte) current_ypos#6 -- vbuxx=vbuz1 ldx.z current_ypos - // [32] (byte) current_xpos#118 ← (byte) current_xpos#100 -- vbuz1=vbuz2 + // [30] (byte) current_xpos#118 ← (byte) current_xpos#100 -- vbuz1=vbuz2 lda.z current_xpos sta.z current_xpos_1 - // [33] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [31] (byte*) current_piece_gfx#111 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece_gfx_1 lda PIECES+1,y sta.z current_piece_gfx_1+1 - // [34] (byte) current_piece_char#99 ← (byte) current_piece_char#5 -- vbuz1=vbuz2 + // [32] (byte) current_piece_char#99 ← (byte) current_piece_char#5 -- vbuz1=vbuz2 lda.z current_piece_char sta.z current_piece_char_1 // render_moving() - // [35] call render_moving - // [130] phi from main::@15 to render_moving [phi:main::@15->render_moving] - // [130] phi (byte) current_piece_char#68 = (byte) current_piece_char#99 [phi:main::@15->render_moving#0] -- register_copy - // [130] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#111 [phi:main::@15->render_moving#1] -- register_copy - // [130] phi (byte) current_xpos#59 = (byte) current_xpos#118 [phi:main::@15->render_moving#2] -- register_copy - // [130] phi (byte) render_screen_render#33 = (byte) $20 [phi:main::@15->render_moving#3] -- vbuz1=vbuc1 + // [33] call render_moving + // [128] phi from main::@15 to render_moving [phi:main::@15->render_moving] + // [128] phi (byte) current_piece_char#68 = (byte) current_piece_char#99 [phi:main::@15->render_moving#0] -- register_copy + // [128] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#111 [phi:main::@15->render_moving#1] -- register_copy + // [128] phi (byte) current_xpos#59 = (byte) current_xpos#118 [phi:main::@15->render_moving#2] -- register_copy + // [128] phi (byte) render_screen_render#33 = (byte) $20 [phi:main::@15->render_moving#3] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render_1 - // [130] phi (byte) current_ypos#13 = (byte) current_ypos#97 [phi:main::@15->render_moving#4] -- register_copy + // [128] phi (byte) current_ypos#13 = (byte) current_ypos#97 [phi:main::@15->render_moving#4] -- register_copy jsr render_moving // main::@16 - // [36] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 -- vbuxx=vbuz1 + // [34] (byte) next_piece_idx#76 ← (byte) play_spawn_current::piece_idx#2 -- vbuxx=vbuz1 ldx.z play_spawn_current.piece_idx // render_next() - // [37] call render_next - // [109] phi from main::@16 to render_next [phi:main::@16->render_next] - // [109] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#76 [phi:main::@16->render_next#0] -- register_copy - // [109] phi (byte) render_screen_render#15 = (byte) $20 [phi:main::@16->render_next#1] -- vbuaa=vbuc1 + // [35] call render_next + // [107] phi from main::@16 to render_next [phi:main::@16->render_next] + // [107] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#76 [phi:main::@16->render_next#0] -- register_copy + // [107] phi (byte) render_screen_render#15 = (byte) $20 [phi:main::@16->render_next#1] -- vbuaa=vbuc1 lda #$20 jsr render_next // main::@17 - // [38] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [36] (byte*) current_piece#101 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece lda PIECES+1,y sta.z current_piece+1 - // [39] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [37] (byte*) current_piece_gfx#123 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 lda PIECES,y sta.z current_piece_gfx lda PIECES+1,y sta.z current_piece_gfx+1 - // [40] phi from main::@17 to main::@1 [phi:main::@17->main::@1] - // [40] phi (byte) level_bcd#11 = (byte) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 + // [38] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + // [38] phi (byte) level_bcd#11 = (byte) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 lda #0 sta.z level_bcd - // [40] phi (byte) level#10 = (byte) 0 [phi:main::@17->main::@1#1] -- vbuz1=vbuc1 + // [38] phi (byte) level#10 = (byte) 0 [phi:main::@17->main::@1#1] -- vbuz1=vbuc1 sta.z level - // [40] phi (word) lines_bcd#19 = (word) 0 [phi:main::@17->main::@1#2] -- vwuz1=vwuc1 + // [38] phi (word) lines_bcd#19 = (word) 0 [phi:main::@17->main::@1#2] -- vwuz1=vwuc1 sta.z lines_bcd sta.z lines_bcd+1 - // [40] phi (byte) current_movedown_counter#16 = (byte) 0 [phi:main::@17->main::@1#3] -- vbuz1=vbuc1 + // [38] phi (byte) current_movedown_counter#16 = (byte) 0 [phi:main::@17->main::@1#3] -- vbuz1=vbuc1 sta.z current_movedown_counter - // [40] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#4] -- vbuz1=vbuc1 + // [38] phi (byte) keyboard_events_size#19 = (byte) 0 [phi:main::@17->main::@1#4] -- vbuz1=vbuc1 sta.z keyboard_events_size - // [40] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#5] -- register_copy - // [40] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#6] -- register_copy - // [40] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#7] -- register_copy - // [40] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#8] -- register_copy - // [40] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#123 [phi:main::@17->main::@1#9] -- register_copy - // [40] phi (byte) current_orientation#13 = (byte) 0 [phi:main::@17->main::@1#10] -- vbuz1=vbuc1 + // [38] phi (byte) next_piece_idx#10 = (byte) play_spawn_current::piece_idx#2 [phi:main::@17->main::@1#5] -- register_copy + // [38] phi (byte) game_over#10 = (byte) game_over#52 [phi:main::@17->main::@1#6] -- register_copy + // [38] phi (byte) current_ypos#11 = (byte) current_ypos#6 [phi:main::@17->main::@1#7] -- register_copy + // [38] phi (byte) current_xpos#14 = (byte) current_xpos#100 [phi:main::@17->main::@1#8] -- register_copy + // [38] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#123 [phi:main::@17->main::@1#9] -- register_copy + // [38] phi (byte) current_orientation#13 = (byte) 0 [phi:main::@17->main::@1#10] -- vbuz1=vbuc1 sta.z current_orientation - // [40] phi (byte) current_piece_char#10 = (byte) current_piece_char#5 [phi:main::@17->main::@1#11] -- register_copy - // [40] phi (byte*) current_piece#10 = (byte*) current_piece#101 [phi:main::@17->main::@1#12] -- register_copy - // [40] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#1 [phi:main::@17->main::@1#13] -- register_copy - // [40] phi (byte) render_screen_render#18 = (byte) $20 [phi:main::@17->main::@1#14] -- vbuz1=vbuc1 + // [38] phi (byte) current_piece_char#10 = (byte) current_piece_char#5 [phi:main::@17->main::@1#11] -- register_copy + // [38] phi (byte*) current_piece#10 = (byte*) current_piece#101 [phi:main::@17->main::@1#12] -- register_copy + // [38] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#1 [phi:main::@17->main::@1#13] -- register_copy + // [38] phi (byte) render_screen_render#18 = (byte) $20 [phi:main::@17->main::@1#14] -- vbuz1=vbuc1 lda #$20 sta.z render_screen_render - // [40] phi (byte) render_screen_show#16 = (byte) 0 [phi:main::@17->main::@1#15] -- vbuz1=vbuc1 + // [38] phi (byte) render_screen_show#16 = (byte) 0 [phi:main::@17->main::@1#15] -- vbuz1=vbuc1 lda #0 sta.z render_screen_show - // [40] phi from main::@25 main::@6 to main::@1 [phi:main::@25/main::@6->main::@1] - // [40] phi (byte) level_bcd#11 = (byte) level_bcd#17 [phi:main::@25/main::@6->main::@1#0] -- register_copy - // [40] phi (byte) level#10 = (byte) level#17 [phi:main::@25/main::@6->main::@1#1] -- register_copy - // [40] phi (word) lines_bcd#19 = (word) lines_bcd#15 [phi:main::@25/main::@6->main::@1#2] -- register_copy - // [40] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#14 [phi:main::@25/main::@6->main::@1#3] -- register_copy - // [40] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@25/main::@6->main::@1#4] -- register_copy - // [40] phi (byte) next_piece_idx#10 = (byte) next_piece_idx#16 [phi:main::@25/main::@6->main::@1#5] -- register_copy - // [40] phi (byte) game_over#10 = (byte) game_over#15 [phi:main::@25/main::@6->main::@1#6] -- register_copy - // [40] phi (byte) current_ypos#11 = (byte) current_ypos#19 [phi:main::@25/main::@6->main::@1#7] -- register_copy - // [40] phi (byte) current_xpos#14 = (byte) current_xpos#19 [phi:main::@25/main::@6->main::@1#8] -- register_copy - // [40] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#18 [phi:main::@25/main::@6->main::@1#9] -- register_copy - // [40] phi (byte) current_orientation#13 = (byte) current_orientation#17 [phi:main::@25/main::@6->main::@1#10] -- register_copy - // [40] phi (byte) current_piece_char#10 = (byte) current_piece_char#16 [phi:main::@25/main::@6->main::@1#11] -- register_copy - // [40] phi (byte*) current_piece#10 = (byte*) current_piece#15 [phi:main::@25/main::@6->main::@1#12] -- register_copy - // [40] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#21 [phi:main::@25/main::@6->main::@1#13] -- register_copy - // [40] phi (byte) render_screen_render#18 = (byte) render_screen_render#11 [phi:main::@25/main::@6->main::@1#14] -- register_copy - // [40] phi (byte) render_screen_show#16 = (byte) render_screen_show#13 [phi:main::@25/main::@6->main::@1#15] -- register_copy + // [38] phi from main::@25 main::@6 to main::@1 [phi:main::@25/main::@6->main::@1] + // [38] phi (byte) level_bcd#11 = (byte) level_bcd#17 [phi:main::@25/main::@6->main::@1#0] -- register_copy + // [38] phi (byte) level#10 = (byte) level#17 [phi:main::@25/main::@6->main::@1#1] -- register_copy + // [38] phi (word) lines_bcd#19 = (word) lines_bcd#15 [phi:main::@25/main::@6->main::@1#2] -- register_copy + // [38] phi (byte) current_movedown_counter#16 = (byte) current_movedown_counter#14 [phi:main::@25/main::@6->main::@1#3] -- register_copy + // [38] phi (byte) keyboard_events_size#19 = (byte) keyboard_events_size#16 [phi:main::@25/main::@6->main::@1#4] -- register_copy + // [38] phi (byte) next_piece_idx#10 = (byte) next_piece_idx#16 [phi:main::@25/main::@6->main::@1#5] -- register_copy + // [38] phi (byte) game_over#10 = (byte) game_over#15 [phi:main::@25/main::@6->main::@1#6] -- register_copy + // [38] phi (byte) current_ypos#11 = (byte) current_ypos#19 [phi:main::@25/main::@6->main::@1#7] -- register_copy + // [38] phi (byte) current_xpos#14 = (byte) current_xpos#19 [phi:main::@25/main::@6->main::@1#8] -- register_copy + // [38] phi (byte*) current_piece_gfx#13 = (byte*) current_piece_gfx#18 [phi:main::@25/main::@6->main::@1#9] -- register_copy + // [38] phi (byte) current_orientation#13 = (byte) current_orientation#17 [phi:main::@25/main::@6->main::@1#10] -- register_copy + // [38] phi (byte) current_piece_char#10 = (byte) current_piece_char#16 [phi:main::@25/main::@6->main::@1#11] -- register_copy + // [38] phi (byte*) current_piece#10 = (byte*) current_piece#15 [phi:main::@25/main::@6->main::@1#12] -- register_copy + // [38] phi (byte) current_movedown_slow#14 = (byte) current_movedown_slow#21 [phi:main::@25/main::@6->main::@1#13] -- register_copy + // [38] phi (byte) render_screen_render#18 = (byte) render_screen_render#11 [phi:main::@25/main::@6->main::@1#14] -- register_copy + // [38] phi (byte) render_screen_show#16 = (byte) render_screen_show#13 [phi:main::@25/main::@6->main::@1#15] -- register_copy // main::@1 __b1: // Wait for a frame to pass // main::@2 __b2: // while(*RASTER!=0xff) - // [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 + // [39] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -- _deref_pbuc1_neq_vbuc2_then_la1 lda #$ff cmp RASTER bne __b2 - // [42] phi from main::@2 to main::@3 [phi:main::@2->main::@3] + // [40] phi from main::@2 to main::@3 [phi:main::@2->main::@3] // main::@3 // render_show() - // [43] call render_show + // [41] call render_show jsr render_show - // [44] phi from main::@3 to main::@18 [phi:main::@3->main::@18] + // [42] phi from main::@3 to main::@18 [phi:main::@3->main::@18] // main::@18 // keyboard_event_scan() - // [45] call keyboard_event_scan - // [392] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] + // [43] call keyboard_event_scan + // [390] phi from main::@18 to keyboard_event_scan [phi:main::@18->keyboard_event_scan] jsr keyboard_event_scan - // [46] phi from main::@18 to main::@19 [phi:main::@18->main::@19] + // [44] phi from main::@18 to main::@19 [phi:main::@18->main::@19] // main::@19 // keyboard_event_get() - // [47] call keyboard_event_get + // [45] call keyboard_event_get jsr keyboard_event_get - // [48] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 + // [46] (byte) keyboard_event_get::return#3 ← (byte) keyboard_event_get::return#2 // main::@20 // key_event = keyboard_event_get() - // [49] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 + // [47] (byte) main::key_event#0 ← (byte) keyboard_event_get::return#3 // if(game_over==0) - // [50] if((byte) game_over#10==(byte) 0) goto main::@4 -- vbuz1_eq_0_then_la1 + // [48] if((byte) game_over#10==(byte) 0) goto main::@4 -- vbuz1_eq_0_then_la1 lda.z game_over cmp #0 beq __b4 // main::@5 __b5: // (*BORDERCOL)++; - // [51] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 + // [49] *((const byte*) BORDERCOL) ← ++ *((const byte*) BORDERCOL) -- _deref_pbuc1=_inc__deref_pbuc1 inc BORDERCOL jmp __b5 // main::@4 __b4: // play_movement(key_event) - // [52] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 -- vbuz1=vbuxx + // [50] (byte) play_movement::key_event#0 ← (byte) main::key_event#0 -- vbuz1=vbuxx stx.z play_movement.key_event - // [53] call play_movement + // [51] call play_movement jsr play_movement - // [54] (byte) play_movement::return#3 ← (byte) play_movement::return#2 -- vbuaa=vbuz1 + // [52] (byte) play_movement::return#3 ← (byte) play_movement::return#2 -- vbuaa=vbuz1 lda.z play_movement.return // main::@21 // render = play_movement(key_event) - // [55] (byte) main::render#1 ← (byte) play_movement::return#3 + // [53] (byte) main::render#1 ← (byte) play_movement::return#3 // main::@6 // if(render!=0) - // [56] if((byte) main::render#1==(byte) 0) goto main::@1 -- vbuaa_eq_0_then_la1 + // [54] if((byte) main::render#1==(byte) 0) goto main::@1 -- vbuaa_eq_0_then_la1 cmp #0 beq __b1 // main::@7 - // [57] (byte) render_screen_render#63 ← (byte) render_screen_render#18 -- vbuxx=vbuz1 + // [55] (byte) render_screen_render#63 ← (byte) render_screen_render#18 -- vbuxx=vbuz1 ldx.z render_screen_render // render_playfield() - // [58] call render_playfield - // [152] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] - // [152] phi (byte) render_screen_render#22 = (byte) render_screen_render#63 [phi:main::@7->render_playfield#0] -- register_copy + // [56] call render_playfield + // [150] phi from main::@7 to render_playfield [phi:main::@7->render_playfield] + // [150] phi (byte) render_screen_render#22 = (byte) render_screen_render#63 [phi:main::@7->render_playfield#0] -- register_copy jsr render_playfield // main::@22 - // [59] (byte) current_ypos#98 ← (byte) current_ypos#19 -- vbuxx=vbuz1 + // [57] (byte) current_ypos#98 ← (byte) current_ypos#19 -- vbuxx=vbuz1 ldx.z current_ypos - // [60] (byte) render_screen_render#64 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 + // [58] (byte) render_screen_render#64 ← (byte) render_screen_render#18 -- vbuz1=vbuz2 lda.z render_screen_render sta.z render_screen_render_1 - // [61] (byte) current_xpos#119 ← (byte) current_xpos#19 -- vbuz1=vbuz2 + // [59] (byte) current_xpos#119 ← (byte) current_xpos#19 -- vbuz1=vbuz2 lda.z current_xpos sta.z current_xpos_1 - // [62] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 -- pbuz1=pbuz2 + // [60] (byte*) current_piece_gfx#112 ← (byte*) current_piece_gfx#18 -- pbuz1=pbuz2 lda.z current_piece_gfx sta.z current_piece_gfx_1 lda.z current_piece_gfx+1 sta.z current_piece_gfx_1+1 - // [63] (byte) current_piece_char#100 ← (byte) current_piece_char#16 -- vbuz1=vbuz2 + // [61] (byte) current_piece_char#100 ← (byte) current_piece_char#16 -- vbuz1=vbuz2 lda.z current_piece_char sta.z current_piece_char_1 // render_moving() - // [64] call render_moving - // [130] phi from main::@22 to render_moving [phi:main::@22->render_moving] - // [130] phi (byte) current_piece_char#68 = (byte) current_piece_char#100 [phi:main::@22->render_moving#0] -- register_copy - // [130] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#112 [phi:main::@22->render_moving#1] -- register_copy - // [130] phi (byte) current_xpos#59 = (byte) current_xpos#119 [phi:main::@22->render_moving#2] -- register_copy - // [130] phi (byte) render_screen_render#33 = (byte) render_screen_render#64 [phi:main::@22->render_moving#3] -- register_copy - // [130] phi (byte) current_ypos#13 = (byte) current_ypos#98 [phi:main::@22->render_moving#4] -- register_copy + // [62] call render_moving + // [128] phi from main::@22 to render_moving [phi:main::@22->render_moving] + // [128] phi (byte) current_piece_char#68 = (byte) current_piece_char#100 [phi:main::@22->render_moving#0] -- register_copy + // [128] phi (byte*) current_piece_gfx#64 = (byte*) current_piece_gfx#112 [phi:main::@22->render_moving#1] -- register_copy + // [128] phi (byte) current_xpos#59 = (byte) current_xpos#119 [phi:main::@22->render_moving#2] -- register_copy + // [128] phi (byte) render_screen_render#33 = (byte) render_screen_render#64 [phi:main::@22->render_moving#3] -- register_copy + // [128] phi (byte) current_ypos#13 = (byte) current_ypos#98 [phi:main::@22->render_moving#4] -- register_copy jsr render_moving // main::@23 - // [65] (byte) render_screen_render#65 ← (byte) render_screen_render#18 -- vbuaa=vbuz1 + // [63] (byte) render_screen_render#65 ← (byte) render_screen_render#18 -- vbuaa=vbuz1 lda.z render_screen_render - // [66] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 -- vbuxx=vbuz1 + // [64] (byte) next_piece_idx#77 ← (byte) next_piece_idx#16 -- vbuxx=vbuz1 ldx.z next_piece_idx // render_next() - // [67] call render_next - // [109] phi from main::@23 to render_next [phi:main::@23->render_next] - // [109] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#77 [phi:main::@23->render_next#0] -- register_copy - // [109] phi (byte) render_screen_render#15 = (byte) render_screen_render#65 [phi:main::@23->render_next#1] -- register_copy + // [65] call render_next + // [107] phi from main::@23 to render_next [phi:main::@23->render_next] + // [107] phi (byte) next_piece_idx#12 = (byte) next_piece_idx#77 [phi:main::@23->render_next#0] -- register_copy + // [107] phi (byte) render_screen_render#15 = (byte) render_screen_render#65 [phi:main::@23->render_next#1] -- register_copy jsr render_next - // [68] phi from main::@23 to main::@24 [phi:main::@23->main::@24] + // [66] phi from main::@23 to main::@24 [phi:main::@23->main::@24] // main::@24 // render_score() - // [69] call render_score + // [67] call render_score jsr render_score - // [70] phi from main::@24 to main::@25 [phi:main::@24->main::@25] + // [68] phi from main::@24 to main::@25 [phi:main::@24->main::@25] // main::@25 // render_screen_swap() - // [71] call render_screen_swap + // [69] call render_screen_swap jsr render_screen_swap jmp __b1 } @@ -22536,18 +22511,18 @@ main: { // Swap rendering to the other screen (used for double buffering) render_screen_swap: { // render_screen_render ^= 0x20 - // [72] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 + // [70] (byte) render_screen_render#11 ← (byte) render_screen_render#18 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 lda #$20 eor.z render_screen_render sta.z render_screen_render // render_screen_show ^= 0x20 - // [73] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 + // [71] (byte) render_screen_show#13 ← (byte) render_screen_show#16 ^ (byte) $20 -- vbuz1=vbuz1_bxor_vbuc1 lda #$20 eor.z render_screen_show sta.z render_screen_show // render_screen_swap::@return // } - // [74] return + // [72] return rts } // render_score @@ -22559,134 +22534,134 @@ render_score: { .const level_offset = $28*$13+$1f .label screen = $23 // if(render_screen_render==0) - // [75] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -- vbuz1_eq_0_then_la1 + // [73] if((byte) render_screen_render#18==(byte) 0) goto render_score::@1 -- vbuz1_eq_0_then_la1 lda.z render_screen_render cmp #0 beq __b1 - // [77] phi from render_score to render_score::@2 [phi:render_score->render_score::@2] - // [77] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_score->render_score::@2#0] -- pbuz1=pbuc1 + // [75] phi from render_score to render_score::@2 [phi:render_score->render_score::@2] + // [75] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_score->render_score::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2 sta.z screen+1 jmp __b2 - // [76] phi from render_score to render_score::@1 [phi:render_score->render_score::@1] + // [74] phi from render_score to render_score::@1 [phi:render_score->render_score::@1] // render_score::@1 __b1: - // [77] phi from render_score::@1 to render_score::@2 [phi:render_score::@1->render_score::@2] - // [77] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_score::@1->render_score::@2#0] -- pbuz1=pbuc1 + // [75] phi from render_score::@1 to render_score::@2 [phi:render_score::@1->render_score::@2] + // [75] phi (byte*) render_score::screen#3 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_score::@1->render_score::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1 sta.z screen+1 // render_score::@2 __b2: - // render_bcd( screen, score_offset, score_bytes[2], 0) - // [78] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 - // [79] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) -- vbuxx=_deref_pbuc1 + // render_bcd( screen, score_offset, score_bytes[2], 0) + // [76] (byte*) render_bcd::screen#0 ← (byte*) render_score::screen#3 + // [77] (byte) render_bcd::bcd#0 ← *((const byte*) render_score::score_bytes+(byte) 2) -- vbuxx=_deref_pbuc1 ldx score_bytes+2 - // [80] call render_bcd - // [97] phi from render_score::@2 to render_bcd [phi:render_score::@2->render_bcd] - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#0 [phi:render_score::@2->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@2->render_bcd#1] -- vbuyy=vbuc1 + // [78] call render_bcd + // [95] phi from render_score::@2 to render_bcd [phi:render_score::@2->render_bcd] + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#0 [phi:render_score::@2->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@2->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset [phi:render_score::@2->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset [phi:render_score::@2->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#0 [phi:render_score::@2->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#0 [phi:render_score::@2->render_bcd#3] -- register_copy jsr render_bcd // render_score::@3 - // render_bcd( screen, score_offset+2, score_bytes[1], 0) - // [81] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 - // [82] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) -- vbuxx=_deref_pbuc1 + // render_bcd( screen, score_offset+2, score_bytes[1], 0) + // [79] (byte*) render_bcd::screen#1 ← (byte*) render_score::screen#3 + // [80] (byte) render_bcd::bcd#1 ← *((const byte*) render_score::score_bytes+(byte) 1) -- vbuxx=_deref_pbuc1 ldx score_bytes+1 - // [83] call render_bcd - // [97] phi from render_score::@3 to render_bcd [phi:render_score::@3->render_bcd] - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#1 [phi:render_score::@3->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@3->render_bcd#1] -- vbuyy=vbuc1 + // [81] call render_bcd + // [95] phi from render_score::@3 to render_bcd [phi:render_score::@3->render_bcd] + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#1 [phi:render_score::@3->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@3->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 2 [phi:render_score::@3->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 2 [phi:render_score::@3->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset+2 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#1 [phi:render_score::@3->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#1 [phi:render_score::@3->render_bcd#3] -- register_copy jsr render_bcd // render_score::@4 - // 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) -- vbuxx=_deref_pbuc1 + // render_bcd( screen, score_offset+4, score_bytes[0], 0) + // [82] (byte*) render_bcd::screen#2 ← (byte*) render_score::screen#3 + // [83] (byte) render_bcd::bcd#2 ← *((const byte*) render_score::score_bytes) -- vbuxx=_deref_pbuc1 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 - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@4->render_bcd#1] -- vbuyy=vbuc1 + // [84] call render_bcd + // [95] phi from render_score::@4 to render_bcd [phi:render_score::@4->render_bcd] + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#2 [phi:render_score::@4->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@4->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 4 [phi:render_score::@4->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::score_offset+(byte) 4 [phi:render_score::@4->render_bcd#2] -- vwuz1=vwuc1 lda #score_offset+4 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#2 [phi:render_score::@4->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#2 [phi:render_score::@4->render_bcd#3] -- register_copy jsr render_bcd // render_score::@5 - // render_bcd( screen, lines_offset, >lines_bcd, 1) - // [87] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 -- vbuxx=_hi_vwuz1 + // render_bcd( screen, lines_offset, >lines_bcd, 1) + // [85] (byte) render_bcd::bcd#3 ← > (word) lines_bcd#15 -- vbuxx=_hi_vwuz1 lda.z lines_bcd+1 tax - // [88] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 - // [89] call render_bcd - // [97] phi from render_score::@5 to render_bcd [phi:render_score::@5->render_bcd] - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#3 [phi:render_score::@5->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 1 [phi:render_score::@5->render_bcd#1] -- vbuyy=vbuc1 + // [86] (byte*) render_bcd::screen#3 ← (byte*) render_score::screen#3 + // [87] call render_bcd + // [95] phi from render_score::@5 to render_bcd [phi:render_score::@5->render_bcd] + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#3 [phi:render_score::@5->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 1 [phi:render_score::@5->render_bcd#1] -- vbuyy=vbuc1 ldy #1 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset [phi:render_score::@5->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset [phi:render_score::@5->render_bcd#2] -- vwuz1=vwuc1 lda #lines_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#3 [phi:render_score::@5->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#3 [phi:render_score::@5->render_bcd#3] -- register_copy jsr render_bcd // render_score::@6 - // render_bcd( screen, lines_offset+1, render_bcd] - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#4 [phi:render_score::@6->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@6->render_bcd#1] -- vbuyy=vbuc1 + // [89] (byte*) render_bcd::screen#4 ← (byte*) render_score::screen#3 + // [90] call render_bcd + // [95] phi from render_score::@6 to render_bcd [phi:render_score::@6->render_bcd] + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#4 [phi:render_score::@6->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@6->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset+(byte) 1 [phi:render_score::@6->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::lines_offset+(byte) 1 [phi:render_score::@6->render_bcd#2] -- vwuz1=vwuc1 lda #lines_offset+1 sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#4 [phi:render_score::@6->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#4 [phi:render_score::@6->render_bcd#3] -- register_copy jsr render_bcd // render_score::@7 - // render_bcd( screen, level_offset, level_bcd, 0) - // [93] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 - // [94] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 -- vbuxx=vbuz1 + // render_bcd( screen, level_offset, level_bcd, 0) + // [91] (byte*) render_bcd::screen#5 ← (byte*) render_score::screen#3 + // [92] (byte) render_bcd::bcd#5 ← (byte) level_bcd#17 -- vbuxx=vbuz1 ldx.z level_bcd - // [95] call render_bcd - // [97] phi from render_score::@7 to render_bcd [phi:render_score::@7->render_bcd] - // [97] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#5 [phi:render_score::@7->render_bcd#0] -- register_copy - // [97] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@7->render_bcd#1] -- vbuyy=vbuc1 + // [93] call render_bcd + // [95] phi from render_score::@7 to render_bcd [phi:render_score::@7->render_bcd] + // [95] phi (byte) render_bcd::bcd#6 = (byte) render_bcd::bcd#5 [phi:render_score::@7->render_bcd#0] -- register_copy + // [95] phi (byte) render_bcd::only_low#6 = (byte) 0 [phi:render_score::@7->render_bcd#1] -- vbuyy=vbuc1 ldy #0 - // [97] phi (word) render_bcd::offset#6 = (const word) render_score::level_offset [phi:render_score::@7->render_bcd#2] -- vwuz1=vwuc1 + // [95] phi (word) render_bcd::offset#6 = (const word) render_score::level_offset [phi:render_score::@7->render_bcd#2] -- vwuz1=vwuc1 lda #level_offset sta.z render_bcd.offset+1 - // [97] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#5 [phi:render_score::@7->render_bcd#3] -- register_copy + // [95] phi (byte*) render_bcd::screen#6 = (byte*) render_bcd::screen#5 [phi:render_score::@7->render_bcd#3] -- register_copy jsr render_bcd // render_score::@return // } - // [96] return + // [94] return rts } // render_bcd @@ -22702,7 +22677,7 @@ render_bcd: { .label screen_pos = $21 .label offset = $21 // screen_pos = screen+offset - // [98] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 -- pbuz1=pbuz2_plus_vwuz1 + // [96] (byte*) render_bcd::screen_pos#0 ← (byte*) render_bcd::screen#6 + (word) render_bcd::offset#6 -- pbuz1=pbuz2_plus_vwuz1 lda.z screen_pos clc adc.z screen @@ -22711,50 +22686,50 @@ render_bcd: { adc.z screen+1 sta.z screen_pos+1 // if(only_low==0) - // [99] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -- vbuyy_neq_0_then_la1 + // [97] if((byte) render_bcd::only_low#6!=(byte) 0) goto render_bcd::@1 -- vbuyy_neq_0_then_la1 cpy #0 bne __b1 // render_bcd::@2 // bcd >> 4 - // [100] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 -- vbuaa=vbuxx_ror_4 + // [98] (byte~) render_bcd::$5 ← (byte) render_bcd::bcd#6 >> (byte) 4 -- vbuaa=vbuxx_ror_4 txa lsr lsr lsr lsr // ZERO_CHAR + (bcd >> 4) - // [101] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 -- vbuaa=vbuc1_plus_vbuaa + // [99] (byte~) render_bcd::$6 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$5 -- vbuaa=vbuc1_plus_vbuaa clc adc #ZERO_CHAR // *screen_pos++ = ZERO_CHAR + (bcd >> 4) - // [102] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 -- _deref_pbuz1=vbuaa + // [100] *((byte*) render_bcd::screen_pos#0) ← (byte~) render_bcd::$6 -- _deref_pbuz1=vbuaa ldy #0 sta (screen_pos),y // *screen_pos++ = ZERO_CHAR + (bcd >> 4); - // [103] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 -- pbuz1=_inc_pbuz1 + // [101] (byte*) render_bcd::screen_pos#2 ← ++ (byte*) render_bcd::screen_pos#0 -- pbuz1=_inc_pbuz1 inc.z screen_pos bne !+ inc.z screen_pos+1 !: - // [104] phi from render_bcd render_bcd::@2 to render_bcd::@1 [phi:render_bcd/render_bcd::@2->render_bcd::@1] - // [104] phi (byte*) render_bcd::screen_pos#3 = (byte*) render_bcd::screen_pos#0 [phi:render_bcd/render_bcd::@2->render_bcd::@1#0] -- register_copy + // [102] phi from render_bcd render_bcd::@2 to render_bcd::@1 [phi:render_bcd/render_bcd::@2->render_bcd::@1] + // [102] phi (byte*) render_bcd::screen_pos#3 = (byte*) render_bcd::screen_pos#0 [phi:render_bcd/render_bcd::@2->render_bcd::@1#0] -- register_copy // render_bcd::@1 __b1: // bcd & 0x0f - // [105] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 + // [103] (byte~) render_bcd::$3 ← (byte) render_bcd::bcd#6 & (byte) $f -- vbuaa=vbuxx_band_vbuc1 txa and #$f // ZERO_CHAR + (bcd & 0x0f) - // [106] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 -- vbuaa=vbuc1_plus_vbuaa + // [104] (byte~) render_bcd::$4 ← (const byte) render_bcd::ZERO_CHAR + (byte~) render_bcd::$3 -- vbuaa=vbuc1_plus_vbuaa clc adc #ZERO_CHAR // *screen_pos++ = ZERO_CHAR + (bcd & 0x0f) - // [107] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 -- _deref_pbuz1=vbuaa + // [105] *((byte*) render_bcd::screen_pos#3) ← (byte~) render_bcd::$4 -- _deref_pbuz1=vbuaa ldy #0 sta (screen_pos),y // render_bcd::@return // } - // [108] return + // [106] return rts } // render_next @@ -22767,21 +22742,21 @@ render_next: { .label screen_next_area = $21 .label l = 8 // if(render_screen_render==0) - // [110] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -- vbuaa_eq_0_then_la1 + // [108] if((byte) render_screen_render#15==(byte) 0) goto render_next::@1 -- vbuaa_eq_0_then_la1 cmp #0 beq __b1 - // [112] phi from render_next to render_next::@2 [phi:render_next->render_next::@2] - // [112] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset [phi:render_next->render_next::@2#0] -- pbuz1=pbuc1 + // [110] phi from render_next to render_next::@2 [phi:render_next->render_next::@2] + // [110] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_2+(const word) render_next::next_area_offset [phi:render_next->render_next::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2+next_area_offset sta.z screen_next_area+1 jmp __b2 - // [111] phi from render_next to render_next::@1 [phi:render_next->render_next::@1] + // [109] phi from render_next to render_next::@1 [phi:render_next->render_next::@1] // render_next::@1 __b1: - // [112] phi from render_next::@1 to render_next::@2 [phi:render_next::@1->render_next::@2] - // [112] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset [phi:render_next::@1->render_next::@2#0] -- pbuz1=pbuc1 + // [110] phi from render_next::@1 to render_next::@2 [phi:render_next::@1->render_next::@2] + // [110] phi (byte*) render_next::screen_next_area#11 = (const byte*) PLAYFIELD_SCREEN_1+(const word) render_next::next_area_offset [phi:render_next::@1->render_next::@2#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1+next_area_offset @@ -22789,78 +22764,78 @@ render_next: { // render_next::@2 __b2: // next_piece_gfx = PIECES[next_piece_idx] - // [113] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 -- vbuyy=vbuxx_rol_1 + // [111] (byte~) render_next::$6 ← (byte) next_piece_idx#12 << (byte) 1 -- vbuyy=vbuxx_rol_1 txa asl tay // next_piece_char = PIECES_NEXT_CHARS[next_piece_idx] - // [114] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) -- vbuz1=pbuc1_derefidx_vbuxx + // [112] (byte) render_next::next_piece_char#0 ← *((const byte*) PIECES_NEXT_CHARS + (byte) next_piece_idx#12) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_NEXT_CHARS,x sta.z next_piece_char - // [115] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) -- pbuz1=pptc1_derefidx_vbuyy + // [113] (byte*) render_next::next_piece_gfx#9 ← (byte*)*((const word*) PIECES + (byte~) render_next::$6) -- pbuz1=pptc1_derefidx_vbuyy lda PIECES,y sta.z next_piece_gfx lda PIECES+1,y sta.z next_piece_gfx+1 - // [116] phi from render_next::@2 to render_next::@3 [phi:render_next::@2->render_next::@3] - // [116] phi (byte) render_next::l#7 = (byte) 0 [phi:render_next::@2->render_next::@3#0] -- vbuz1=vbuc1 + // [114] phi from render_next::@2 to render_next::@3 [phi:render_next::@2->render_next::@3] + // [114] phi (byte) render_next::l#7 = (byte) 0 [phi:render_next::@2->render_next::@3#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [116] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#11 [phi:render_next::@2->render_next::@3#1] -- register_copy - // [116] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#9 [phi:render_next::@2->render_next::@3#2] -- register_copy - // [116] phi from render_next::@8 to render_next::@3 [phi:render_next::@8->render_next::@3] - // [116] phi (byte) render_next::l#7 = (byte) render_next::l#1 [phi:render_next::@8->render_next::@3#0] -- register_copy - // [116] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#4 [phi:render_next::@8->render_next::@3#1] -- register_copy - // [116] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@8->render_next::@3#2] -- register_copy + // [114] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#11 [phi:render_next::@2->render_next::@3#1] -- register_copy + // [114] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#9 [phi:render_next::@2->render_next::@3#2] -- register_copy + // [114] phi from render_next::@8 to render_next::@3 [phi:render_next::@8->render_next::@3] + // [114] phi (byte) render_next::l#7 = (byte) render_next::l#1 [phi:render_next::@8->render_next::@3#0] -- register_copy + // [114] phi (byte*) render_next::screen_next_area#10 = (byte*) render_next::screen_next_area#4 [phi:render_next::@8->render_next::@3#1] -- register_copy + // [114] phi (byte*) render_next::next_piece_gfx#3 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@8->render_next::@3#2] -- register_copy // render_next::@3 __b3: - // [117] phi from render_next::@3 to render_next::@4 [phi:render_next::@3->render_next::@4] - // [117] phi (byte) render_next::c#2 = (byte) 0 [phi:render_next::@3->render_next::@4#0] -- vbuxx=vbuc1 + // [115] phi from render_next::@3 to render_next::@4 [phi:render_next::@3->render_next::@4] + // [115] phi (byte) render_next::c#2 = (byte) 0 [phi:render_next::@3->render_next::@4#0] -- vbuxx=vbuc1 ldx #0 - // [117] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#10 [phi:render_next::@3->render_next::@4#1] -- register_copy - // [117] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#3 [phi:render_next::@3->render_next::@4#2] -- register_copy - // [117] phi from render_next::@6 to render_next::@4 [phi:render_next::@6->render_next::@4] - // [117] phi (byte) render_next::c#2 = (byte) render_next::c#1 [phi:render_next::@6->render_next::@4#0] -- register_copy - // [117] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#3 [phi:render_next::@6->render_next::@4#1] -- register_copy - // [117] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@6->render_next::@4#2] -- register_copy + // [115] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#10 [phi:render_next::@3->render_next::@4#1] -- register_copy + // [115] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#3 [phi:render_next::@3->render_next::@4#2] -- register_copy + // [115] phi from render_next::@6 to render_next::@4 [phi:render_next::@6->render_next::@4] + // [115] phi (byte) render_next::c#2 = (byte) render_next::c#1 [phi:render_next::@6->render_next::@4#0] -- register_copy + // [115] phi (byte*) render_next::screen_next_area#5 = (byte*) render_next::screen_next_area#3 [phi:render_next::@6->render_next::@4#1] -- register_copy + // [115] phi (byte*) render_next::next_piece_gfx#2 = (byte*) render_next::next_piece_gfx#1 [phi:render_next::@6->render_next::@4#2] -- register_copy // render_next::@4 __b4: // cell = *next_piece_gfx++ - // [118] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) -- vbuaa=_deref_pbuz1 + // [116] (byte) render_next::cell#0 ← *((byte*) render_next::next_piece_gfx#2) -- vbuaa=_deref_pbuz1 ldy #0 lda (next_piece_gfx),y - // [119] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 -- pbuz1=_inc_pbuz1 + // [117] (byte*) render_next::next_piece_gfx#1 ← ++ (byte*) render_next::next_piece_gfx#2 -- pbuz1=_inc_pbuz1 inc.z next_piece_gfx bne !+ inc.z next_piece_gfx+1 !: // if(cell!=0) - // [120] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 -- vbuaa_neq_0_then_la1 + // [118] if((byte) render_next::cell#0!=(byte) 0) goto render_next::@5 -- vbuaa_neq_0_then_la1 cmp #0 bne __b5 // render_next::@7 // *screen_next_area = 0 - // [121] *((byte*) render_next::screen_next_area#5) ← (byte) 0 -- _deref_pbuz1=vbuc1 + // [119] *((byte*) render_next::screen_next_area#5) ← (byte) 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (screen_next_area),y // render_next::@6 __b6: // screen_next_area++; - // [122] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 -- pbuz1=_inc_pbuz1 + // [120] (byte*) render_next::screen_next_area#3 ← ++ (byte*) render_next::screen_next_area#5 -- pbuz1=_inc_pbuz1 inc.z screen_next_area bne !+ inc.z screen_next_area+1 !: // for(char c:0..3) - // [123] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 -- vbuxx=_inc_vbuxx + // [121] (byte) render_next::c#1 ← ++ (byte) render_next::c#2 -- vbuxx=_inc_vbuxx inx - // [124] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 -- vbuxx_neq_vbuc1_then_la1 + // [122] if((byte) render_next::c#1!=(byte) 4) goto render_next::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b4 // render_next::@8 // screen_next_area += 36 - // [125] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 -- pbuz1=pbuz1_plus_vbuc1 + // [123] (byte*) render_next::screen_next_area#4 ← (byte*) render_next::screen_next_area#3 + (byte) $24 -- pbuz1=pbuz1_plus_vbuc1 lda #$24 clc adc.z screen_next_area @@ -22869,20 +22844,20 @@ render_next: { inc.z screen_next_area+1 !: // for(char l:0..3) - // [126] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 -- vbuz1=_inc_vbuz1 + // [124] (byte) render_next::l#1 ← ++ (byte) render_next::l#7 -- vbuz1=_inc_vbuz1 inc.z l - // [127] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 -- vbuz1_neq_vbuc1_then_la1 + // [125] if((byte) render_next::l#1!=(byte) 4) goto render_next::@3 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b3 // render_next::@return // } - // [128] return + // [126] return rts // render_next::@5 __b5: // *screen_next_area = next_piece_char - // [129] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 -- _deref_pbuz1=vbuz2 + // [127] *((byte*) render_next::screen_next_area#5) ← (byte) render_next::next_piece_char#0 -- _deref_pbuz1=vbuz2 lda.z next_piece_char ldy #0 sta (screen_next_area),y @@ -22898,106 +22873,106 @@ render_moving: { .label i = $1f .label l = $d // ypos = current_ypos - // [131] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 -- vbuz1=vbuxx + // [129] (byte) render_moving::ypos#0 ← (byte) current_ypos#13 -- vbuz1=vbuxx stx.z ypos - // [132] phi from render_moving to render_moving::@1 [phi:render_moving->render_moving::@1] - // [132] phi (byte) render_moving::l#4 = (byte) 0 [phi:render_moving->render_moving::@1#0] -- vbuz1=vbuc1 + // [130] phi from render_moving to render_moving::@1 [phi:render_moving->render_moving::@1] + // [130] phi (byte) render_moving::l#4 = (byte) 0 [phi:render_moving->render_moving::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [132] phi (byte) render_moving::i#3 = (byte) 0 [phi:render_moving->render_moving::@1#1] -- vbuz1=vbuc1 + // [130] phi (byte) render_moving::i#3 = (byte) 0 [phi:render_moving->render_moving::@1#1] -- vbuz1=vbuc1 sta.z i - // [132] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#0 [phi:render_moving->render_moving::@1#2] -- register_copy - // [132] phi from render_moving::@3 to render_moving::@1 [phi:render_moving::@3->render_moving::@1] - // [132] phi (byte) render_moving::l#4 = (byte) render_moving::l#1 [phi:render_moving::@3->render_moving::@1#0] -- register_copy - // [132] phi (byte) render_moving::i#3 = (byte) render_moving::i#8 [phi:render_moving::@3->render_moving::@1#1] -- register_copy - // [132] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#1 [phi:render_moving::@3->render_moving::@1#2] -- register_copy + // [130] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#0 [phi:render_moving->render_moving::@1#2] -- register_copy + // [130] phi from render_moving::@3 to render_moving::@1 [phi:render_moving::@3->render_moving::@1] + // [130] phi (byte) render_moving::l#4 = (byte) render_moving::l#1 [phi:render_moving::@3->render_moving::@1#0] -- register_copy + // [130] phi (byte) render_moving::i#3 = (byte) render_moving::i#8 [phi:render_moving::@3->render_moving::@1#1] -- register_copy + // [130] phi (byte) render_moving::ypos#2 = (byte) render_moving::ypos#1 [phi:render_moving::@3->render_moving::@1#2] -- register_copy // render_moving::@1 __b1: // if(ypos>1) - // [133] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 -- vbuz1_ge_vbuc1_then_la1 + // [131] if((byte) render_moving::ypos#2>=(byte) 1+(byte) 1) goto render_moving::@2 -- vbuz1_ge_vbuc1_then_la1 lda.z ypos cmp #1+1 bcs __b2 // render_moving::@7 // i += 4 - // [134] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 -- vbuz1=vbuz1_plus_vbuc1 + // [132] (byte) render_moving::i#1 ← (byte) render_moving::i#3 + (byte) 4 -- vbuz1=vbuz1_plus_vbuc1 lax.z i axs #-[4] stx.z i - // [135] phi from render_moving::@5 render_moving::@7 to render_moving::@3 [phi:render_moving::@5/render_moving::@7->render_moving::@3] - // [135] phi (byte) render_moving::i#8 = (byte) render_moving::i#2 [phi:render_moving::@5/render_moving::@7->render_moving::@3#0] -- register_copy + // [133] phi from render_moving::@5 render_moving::@7 to render_moving::@3 [phi:render_moving::@5/render_moving::@7->render_moving::@3] + // [133] phi (byte) render_moving::i#8 = (byte) render_moving::i#2 [phi:render_moving::@5/render_moving::@7->render_moving::@3#0] -- register_copy // render_moving::@3 __b3: // ypos++; - // [136] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 -- vbuz1=_inc_vbuz1 + // [134] (byte) render_moving::ypos#1 ← ++ (byte) render_moving::ypos#2 -- vbuz1=_inc_vbuz1 inc.z ypos // for(char l:0..3) - // [137] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 -- vbuz1=_inc_vbuz1 + // [135] (byte) render_moving::l#1 ← ++ (byte) render_moving::l#4 -- vbuz1=_inc_vbuz1 inc.z l - // [138] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 -- vbuz1_neq_vbuc1_then_la1 + // [136] if((byte) render_moving::l#1!=(byte) 4) goto render_moving::@1 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b1 // render_moving::@return // } - // [139] return + // [137] return rts // render_moving::@2 __b2: // render_screen_render+ypos - // [140] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 -- vbuaa=vbuz1_plus_vbuz2 + // [138] (byte~) render_moving::$1 ← (byte) render_screen_render#33 + (byte) render_moving::ypos#2 -- vbuaa=vbuz1_plus_vbuz2 lda.z render_screen_render_1 clc adc.z ypos // screen_line = screen_lines_1[render_screen_render+ypos] - // [141] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [139] (byte~) render_moving::$6 ← (byte~) render_moving::$1 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [142] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) -- pbuz1=pptc1_derefidx_vbuaa + // [140] (byte*) render_moving::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_moving::$6) -- pbuz1=pptc1_derefidx_vbuaa tay lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 // xpos = current_xpos - // [143] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 -- vbuz1=vbuz2 + // [141] (byte) render_moving::xpos#0 ← (byte) current_xpos#59 -- vbuz1=vbuz2 lda.z current_xpos_1 sta.z xpos - // [144] phi from render_moving::@2 to render_moving::@4 [phi:render_moving::@2->render_moving::@4] - // [144] phi (byte) render_moving::c#2 = (byte) 0 [phi:render_moving::@2->render_moving::@4#0] -- vbuxx=vbuc1 + // [142] phi from render_moving::@2 to render_moving::@4 [phi:render_moving::@2->render_moving::@4] + // [142] phi (byte) render_moving::c#2 = (byte) 0 [phi:render_moving::@2->render_moving::@4#0] -- vbuxx=vbuc1 ldx #0 - // [144] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#0 [phi:render_moving::@2->render_moving::@4#1] -- register_copy - // [144] phi (byte) render_moving::i#4 = (byte) render_moving::i#3 [phi:render_moving::@2->render_moving::@4#2] -- register_copy - // [144] phi from render_moving::@5 to render_moving::@4 [phi:render_moving::@5->render_moving::@4] - // [144] phi (byte) render_moving::c#2 = (byte) render_moving::c#1 [phi:render_moving::@5->render_moving::@4#0] -- register_copy - // [144] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#1 [phi:render_moving::@5->render_moving::@4#1] -- register_copy - // [144] phi (byte) render_moving::i#4 = (byte) render_moving::i#2 [phi:render_moving::@5->render_moving::@4#2] -- register_copy + // [142] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#0 [phi:render_moving::@2->render_moving::@4#1] -- register_copy + // [142] phi (byte) render_moving::i#4 = (byte) render_moving::i#3 [phi:render_moving::@2->render_moving::@4#2] -- register_copy + // [142] phi from render_moving::@5 to render_moving::@4 [phi:render_moving::@5->render_moving::@4] + // [142] phi (byte) render_moving::c#2 = (byte) render_moving::c#1 [phi:render_moving::@5->render_moving::@4#0] -- register_copy + // [142] phi (byte) render_moving::xpos#2 = (byte) render_moving::xpos#1 [phi:render_moving::@5->render_moving::@4#1] -- register_copy + // [142] phi (byte) render_moving::i#4 = (byte) render_moving::i#2 [phi:render_moving::@5->render_moving::@4#2] -- register_copy // render_moving::@4 __b4: // current_cell = current_piece_gfx[i++] - // [145] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) -- vbuaa=pbuz1_derefidx_vbuz2 + // [143] (byte) render_moving::current_cell#0 ← *((byte*) current_piece_gfx#64 + (byte) render_moving::i#4) -- vbuaa=pbuz1_derefidx_vbuz2 ldy.z i lda (current_piece_gfx_1),y - // [146] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 -- vbuz1=_inc_vbuz1 + // [144] (byte) render_moving::i#2 ← ++ (byte) render_moving::i#4 -- vbuz1=_inc_vbuz1 inc.z i // if(current_cell!=0) - // [147] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -- vbuaa_eq_0_then_la1 + // [145] if((byte) render_moving::current_cell#0==(byte) 0) goto render_moving::@5 -- vbuaa_eq_0_then_la1 cmp #0 beq __b5 // render_moving::@6 // screen_line[xpos] = current_piece_char - // [148] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 -- pbuz1_derefidx_vbuz2=vbuz3 + // [146] *((byte*) render_moving::screen_line#0 + (byte) render_moving::xpos#2) ← (byte) current_piece_char#68 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z current_piece_char_1 ldy.z xpos sta (screen_line),y // render_moving::@5 __b5: // xpos++; - // [149] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 -- vbuz1=_inc_vbuz1 + // [147] (byte) render_moving::xpos#1 ← ++ (byte) render_moving::xpos#2 -- vbuz1=_inc_vbuz1 inc.z xpos // for(char c:0..3) - // [150] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 -- vbuxx=_inc_vbuxx + // [148] (byte) render_moving::c#1 ← ++ (byte) render_moving::c#2 -- vbuxx=_inc_vbuxx inx - // [151] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 -- vbuxx_neq_vbuc1_then_la1 + // [149] if((byte) render_moving::c#1!=(byte) 4) goto render_moving::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b4 jmp __b3 @@ -23010,76 +22985,76 @@ render_playfield: { .label i = $a .label c = $b .label l = 9 - // [153] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] - // [153] phi (byte) render_playfield::i#3 = (const byte) PLAYFIELD_COLS*(byte) 2 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 + // [151] phi from render_playfield to render_playfield::@1 [phi:render_playfield->render_playfield::@1] + // [151] phi (byte) render_playfield::i#3 = (const byte) PLAYFIELD_COLS*(byte) 2 [phi:render_playfield->render_playfield::@1#0] -- vbuz1=vbuc1 lda #PLAYFIELD_COLS*2 sta.z i - // [153] phi (byte) render_playfield::l#2 = (byte) 2 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 + // [151] phi (byte) render_playfield::l#2 = (byte) 2 [phi:render_playfield->render_playfield::@1#1] -- vbuz1=vbuc1 lda #2 sta.z l - // [153] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] - // [153] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy - // [153] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy + // [151] phi from render_playfield::@3 to render_playfield::@1 [phi:render_playfield::@3->render_playfield::@1] + // [151] phi (byte) render_playfield::i#3 = (byte) render_playfield::i#1 [phi:render_playfield::@3->render_playfield::@1#0] -- register_copy + // [151] phi (byte) render_playfield::l#2 = (byte) render_playfield::l#1 [phi:render_playfield::@3->render_playfield::@1#1] -- register_copy // render_playfield::@1 __b1: // render_screen_render+l - // [154] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 -- vbuaa=vbuxx_plus_vbuz1 + // [152] (byte~) render_playfield::$0 ← (byte) render_screen_render#22 + (byte) render_playfield::l#2 -- vbuaa=vbuxx_plus_vbuz1 txa clc adc.z l // screen_line = screen_lines_1[render_screen_render+l] - // [155] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 -- vbuaa=vbuaa_rol_1 + // [153] (byte~) render_playfield::$3 ← (byte~) render_playfield::$0 << (byte) 1 -- vbuaa=vbuaa_rol_1 asl - // [156] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) -- pbuz1=pptc1_derefidx_vbuaa + // [154] (byte*) render_playfield::screen_line#0 ← *((const byte**) screen_lines_1 + (byte~) render_playfield::$3) -- pbuz1=pptc1_derefidx_vbuaa tay lda screen_lines_1,y sta.z screen_line lda screen_lines_1+1,y sta.z screen_line+1 - // [157] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] - // [157] phi (byte) render_playfield::c#2 = (byte) 0 [phi:render_playfield::@1->render_playfield::@2#0] -- vbuz1=vbuc1 + // [155] phi from render_playfield::@1 to render_playfield::@2 [phi:render_playfield::@1->render_playfield::@2] + // [155] phi (byte) render_playfield::c#2 = (byte) 0 [phi:render_playfield::@1->render_playfield::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c - // [157] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#0 [phi:render_playfield::@1->render_playfield::@2#1] -- register_copy - // [157] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#2] -- register_copy - // [157] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] - // [157] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy - // [157] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy - // [157] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#2] -- register_copy + // [155] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#0 [phi:render_playfield::@1->render_playfield::@2#1] -- register_copy + // [155] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#3 [phi:render_playfield::@1->render_playfield::@2#2] -- register_copy + // [155] phi from render_playfield::@2 to render_playfield::@2 [phi:render_playfield::@2->render_playfield::@2] + // [155] phi (byte) render_playfield::c#2 = (byte) render_playfield::c#1 [phi:render_playfield::@2->render_playfield::@2#0] -- register_copy + // [155] phi (byte*) render_playfield::screen_line#2 = (byte*) render_playfield::screen_line#1 [phi:render_playfield::@2->render_playfield::@2#1] -- register_copy + // [155] phi (byte) render_playfield::i#2 = (byte) render_playfield::i#1 [phi:render_playfield::@2->render_playfield::@2#2] -- register_copy // render_playfield::@2 __b2: // *(screen_line++) = playfield[i++] - // [158] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + // [156] *((byte*) render_playfield::screen_line#2) ← *((const byte*) playfield + (byte) render_playfield::i#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 ldy.z i lda playfield,y ldy #0 sta (screen_line),y // *(screen_line++) = playfield[i++]; - // [159] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 -- pbuz1=_inc_pbuz1 + // [157] (byte*) render_playfield::screen_line#1 ← ++ (byte*) render_playfield::screen_line#2 -- pbuz1=_inc_pbuz1 inc.z screen_line bne !+ inc.z screen_line+1 !: - // [160] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 + // [158] (byte) render_playfield::i#1 ← ++ (byte) render_playfield::i#2 -- vbuz1=_inc_vbuz1 inc.z i // for(char c:0..PLAYFIELD_COLS-1) - // [161] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 + // [159] (byte) render_playfield::c#1 ← ++ (byte) render_playfield::c#2 -- vbuz1=_inc_vbuz1 inc.z c - // [162] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 + // [160] if((byte) render_playfield::c#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto render_playfield::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp.z c bne __b2 // render_playfield::@3 // for(char l:2..PLAYFIELD_LINES-1) - // [163] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 + // [161] (byte) render_playfield::l#1 ← ++ (byte) render_playfield::l#2 -- vbuz1=_inc_vbuz1 inc.z l - // [164] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 + // [162] if((byte) render_playfield::l#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_playfield::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z l bne __b1 // render_playfield::@return // } - // [165] return + // [163] return rts } // play_movement @@ -23092,55 +23067,55 @@ play_movement: { .label return = $d .label key_event = $1f // play_move_down(key_event) - // [166] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 + // [164] (byte) play_move_down::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 lda.z key_event - // [167] call play_move_down + // [165] call play_move_down jsr play_move_down - // [168] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 -- vbuaa=vbuxx + // [166] (byte) play_move_down::return#0 ← (byte) play_move_down::return#3 -- vbuaa=vbuxx txa // play_movement::@2 // render += play_move_down(key_event) - // [169] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 -- vbuz1=vbuaa + // [167] (byte) play_movement::render#1 ← (byte) play_move_down::return#0 -- vbuz1=vbuaa sta.z render // if(game_over!=0) - // [170] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -- vbuz1_eq_0_then_la1 + // [168] if((byte) game_over#15==(byte) 0) goto play_movement::@1 -- vbuz1_eq_0_then_la1 lda.z game_over cmp #0 beq __b1 - // [171] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return] - // [171] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy - // [171] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy - // [171] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy - // [171] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy + // [169] phi from play_movement::@2 play_movement::@4 to play_movement::@return [phi:play_movement::@2/play_movement::@4->play_movement::@return] + // [169] phi (byte) current_xpos#19 = (byte) current_xpos#22 [phi:play_movement::@2/play_movement::@4->play_movement::@return#0] -- register_copy + // [169] phi (byte*) current_piece_gfx#18 = (byte*) current_piece_gfx#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#1] -- register_copy + // [169] phi (byte) current_orientation#17 = (byte) current_orientation#20 [phi:play_movement::@2/play_movement::@4->play_movement::@return#2] -- register_copy + // [169] phi (byte) play_movement::return#2 = (byte) play_movement::render#1 [phi:play_movement::@2/play_movement::@4->play_movement::@return#3] -- register_copy // play_movement::@return // } - // [172] return + // [170] return rts // play_movement::@1 __b1: // play_move_leftright(key_event) - // [173] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 + // [171] (byte) play_move_leftright::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 lda.z key_event - // [174] call play_move_leftright + // [172] call play_move_leftright jsr play_move_leftright - // [175] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 + // [173] (byte) play_move_leftright::return#0 ← (byte) play_move_leftright::return#2 // play_movement::@3 - // [176] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 + // [174] (byte~) play_movement::$3 ← (byte) play_move_leftright::return#0 // render += play_move_leftright(key_event) - // [177] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 -- vbuz1=vbuz1_plus_vbuaa + // [175] (byte) play_movement::render#2 ← (byte) play_movement::render#1 + (byte~) play_movement::$3 -- vbuz1=vbuz1_plus_vbuaa clc adc.z render sta.z render // play_move_rotate(key_event) - // [178] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 + // [176] (byte) play_move_rotate::key_event#0 ← (byte) play_movement::key_event#0 -- vbuaa=vbuz1 lda.z key_event - // [179] call play_move_rotate + // [177] call play_move_rotate jsr play_move_rotate - // [180] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 + // [178] (byte) play_move_rotate::return#0 ← (byte) play_move_rotate::return#2 // play_movement::@4 - // [181] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 + // [179] (byte~) play_movement::$4 ← (byte) play_move_rotate::return#0 // render += play_move_rotate(key_event) - // [182] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 -- vbuz1=vbuz1_plus_vbuaa + // [180] (byte) play_movement::return#0 ← (byte) play_movement::render#2 + (byte~) play_movement::$4 -- vbuz1=vbuz1_plus_vbuaa clc adc.z return sta.z return @@ -23154,95 +23129,95 @@ play_move_rotate: { // Handle keyboard events .label orientation = $1f // if(key_event==KEY_Z) - // [183] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -- vbuaa_eq_vbuc1_then_la1 + // [181] if((byte) play_move_rotate::key_event#0==(const byte) KEY_Z) goto play_move_rotate::@1 -- vbuaa_eq_vbuc1_then_la1 cmp #KEY_Z beq __b1 // play_move_rotate::@4 // if(key_event==KEY_X) - // [184] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -- vbuaa_eq_vbuc1_then_la1 + // [182] if((byte) play_move_rotate::key_event#0==(const byte) KEY_X) goto play_move_rotate::@2 -- vbuaa_eq_vbuc1_then_la1 cmp #KEY_X beq __b2 - // [185] phi from play_move_rotate::@4 play_move_rotate::@6 to play_move_rotate::@return [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return] + // [183] phi from play_move_rotate::@4 play_move_rotate::@6 to play_move_rotate::@return [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return] b1: - // [185] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#0] -- register_copy - // [185] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy - // [185] phi (byte) play_move_rotate::return#2 = (byte) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuaa=vbuc1 + // [183] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#0] -- register_copy + // [183] phi (byte) current_orientation#25 = (byte) current_orientation#20 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#1] -- register_copy + // [183] phi (byte) play_move_rotate::return#2 = (byte) 0 [phi:play_move_rotate::@4/play_move_rotate::@6->play_move_rotate::@return#2] -- vbuaa=vbuc1 lda #0 // play_move_rotate::@return // } - // [186] return + // [184] return rts // play_move_rotate::@2 __b2: // current_orientation+0x10 - // [187] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 -- vbuxx=vbuz1_plus_vbuc1 + // [185] (byte~) play_move_rotate::$5 ← (byte) current_orientation#20 + (byte) $10 -- vbuxx=vbuz1_plus_vbuc1 lax.z current_orientation axs #-[$10] // orientation = (current_orientation+0x10)&0x3f - // [188] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 + // [186] (byte) play_move_rotate::orientation#2 ← (byte~) play_move_rotate::$5 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 lda #$3f sax.z orientation - // [189] phi from play_move_rotate::@1 play_move_rotate::@2 to play_move_rotate::@3 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3] - // [189] phi (byte) play_move_rotate::orientation#3 = (byte) play_move_rotate::orientation#1 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3#0] -- register_copy + // [187] phi from play_move_rotate::@1 play_move_rotate::@2 to play_move_rotate::@3 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3] + // [187] phi (byte) play_move_rotate::orientation#3 = (byte) play_move_rotate::orientation#1 [phi:play_move_rotate::@1/play_move_rotate::@2->play_move_rotate::@3#0] -- register_copy // play_move_rotate::@3 __b3: // play_collision(current_xpos, current_ypos, orientation) - // [190] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 -- vbuz1=vbuz2 + // [188] (byte) play_collision::xpos#3 ← (byte) current_xpos#26 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [191] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [189] (byte) play_collision::ypos#3 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [192] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 -- vbuxx=vbuz1 + // [190] (byte) play_collision::orientation#3 ← (byte) play_move_rotate::orientation#3 -- vbuxx=vbuz1 ldx.z orientation - // [193] (byte*) current_piece#98 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [191] (byte*) current_piece#98 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 // play_collision(current_xpos, current_ypos, orientation) - // [194] call play_collision - // [202] phi from play_move_rotate::@3 to play_collision [phi:play_move_rotate::@3->play_collision] - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#3 [phi:play_move_rotate::@3->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#3 [phi:play_move_rotate::@3->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#3 [phi:play_move_rotate::@3->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#98 [phi:play_move_rotate::@3->play_collision#3] -- register_copy + // [192] call play_collision + // [200] phi from play_move_rotate::@3 to play_collision [phi:play_move_rotate::@3->play_collision] + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#3 [phi:play_move_rotate::@3->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#3 [phi:play_move_rotate::@3->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#3 [phi:play_move_rotate::@3->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#98 [phi:play_move_rotate::@3->play_collision#3] -- register_copy jsr play_collision // play_collision(current_xpos, current_ypos, orientation) - // [195] (byte) play_collision::return#14 ← (byte) play_collision::return#15 + // [193] (byte) play_collision::return#14 ← (byte) play_collision::return#15 // play_move_rotate::@6 - // [196] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 + // [194] (byte~) play_move_rotate::$2 ← (byte) play_collision::return#14 // if(play_collision(current_xpos, current_ypos, orientation) == COLLISION_NONE) - // [197] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return -- vbuaa_neq_vbuc1_then_la1 + // [195] if((byte~) play_move_rotate::$2!=(const byte) COLLISION_NONE) goto play_move_rotate::@return -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_NONE bne b1 // play_move_rotate::@5 // current_orientation = orientation - // [198] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 + // [196] (byte) current_orientation#7 ← (byte) play_move_rotate::orientation#3 -- vbuz1=vbuz2 lda.z orientation sta.z current_orientation // current_piece_gfx = current_piece + current_orientation - // [199] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 -- pbuz1=pbuz2_plus_vbuz3 + // [197] (byte*) current_piece_gfx#7 ← (byte*) current_piece#15 + (byte) current_orientation#7 -- pbuz1=pbuz2_plus_vbuz3 clc adc.z current_piece sta.z current_piece_gfx lda #0 adc.z current_piece+1 sta.z current_piece_gfx+1 - // [185] phi from play_move_rotate::@5 to play_move_rotate::@return [phi:play_move_rotate::@5->play_move_rotate::@return] - // [185] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#7 [phi:play_move_rotate::@5->play_move_rotate::@return#0] -- register_copy - // [185] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy - // [185] phi (byte) play_move_rotate::return#2 = (byte) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuaa=vbuc1 + // [183] phi from play_move_rotate::@5 to play_move_rotate::@return [phi:play_move_rotate::@5->play_move_rotate::@return] + // [183] phi (byte*) current_piece_gfx#21 = (byte*) current_piece_gfx#7 [phi:play_move_rotate::@5->play_move_rotate::@return#0] -- register_copy + // [183] phi (byte) current_orientation#25 = (byte) current_orientation#7 [phi:play_move_rotate::@5->play_move_rotate::@return#1] -- register_copy + // [183] phi (byte) play_move_rotate::return#2 = (byte) 1 [phi:play_move_rotate::@5->play_move_rotate::@return#2] -- vbuaa=vbuc1 lda #1 rts // play_move_rotate::@1 __b1: // current_orientation-0x10 - // [200] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 -- vbuxx=vbuz1_minus_vbuc1 + // [198] (byte~) play_move_rotate::$7 ← (byte) current_orientation#20 - (byte) $10 -- vbuxx=vbuz1_minus_vbuc1 lax.z current_orientation axs #$10 // orientation = (current_orientation-0x10)&0x3f - // [201] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 + // [199] (byte) play_move_rotate::orientation#1 ← (byte~) play_move_rotate::$7 & (byte) $3f -- vbuz1=vbuxx_band_vbuc1 lda #$3f sax.z orientation jmp __b3 @@ -23262,7 +23237,7 @@ play_collision: { .label l = 9 .label i_1 = $a // piece_gfx = current_piece + orientation - // [203] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 -- pbuz1=pbuz1_plus_vbuxx + // [201] (byte*) play_collision::piece_gfx#0 ← (byte*) current_piece#17 + (byte) play_collision::orientation#5 -- pbuz1=pbuz1_plus_vbuxx txa clc adc.z piece_gfx @@ -23270,140 +23245,140 @@ play_collision: { bcc !+ inc.z piece_gfx+1 !: - // [204] phi from play_collision to play_collision::@1 [phi:play_collision->play_collision::@1] - // [204] phi (byte) play_collision::l#6 = (byte) 0 [phi:play_collision->play_collision::@1#0] -- vbuz1=vbuc1 + // [202] phi from play_collision to play_collision::@1 [phi:play_collision->play_collision::@1] + // [202] phi (byte) play_collision::l#6 = (byte) 0 [phi:play_collision->play_collision::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [204] phi (byte) play_collision::i#3 = (byte) 0 [phi:play_collision->play_collision::@1#1] -- vbuz1=vbuc1 + // [202] phi (byte) play_collision::i#3 = (byte) 0 [phi:play_collision->play_collision::@1#1] -- vbuz1=vbuc1 sta.z i_1 - // [204] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#0 [phi:play_collision->play_collision::@1#2] -- register_copy + // [202] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#0 [phi:play_collision->play_collision::@1#2] -- register_copy // play_collision::@1 __b1: // playfield_line = playfield_lines[yp] - // [205] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [203] (byte~) play_collision::$14 ← (byte) play_collision::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z yp asl - // [206] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) -- pbuz1=pptc1_derefidx_vbuaa + // [204] (byte*) play_collision::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_collision::$14) -- pbuz1=pptc1_derefidx_vbuaa tay lda playfield_lines,y sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 - // [207] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 -- vbuz1=vbuz2 + // [205] (byte) play_collision::xp#8 ← (byte) play_collision::xpos#6 -- vbuz1=vbuz2 lda.z xpos sta.z xp - // [208] phi from play_collision::@1 to play_collision::@2 [phi:play_collision::@1->play_collision::@2] - // [208] phi (byte) play_collision::c#2 = (byte) 0 [phi:play_collision::@1->play_collision::@2#0] -- vbuxx=vbuc1 + // [206] phi from play_collision::@1 to play_collision::@2 [phi:play_collision::@1->play_collision::@2] + // [206] phi (byte) play_collision::c#2 = (byte) 0 [phi:play_collision::@1->play_collision::@2#0] -- vbuxx=vbuc1 ldx #0 - // [208] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#8 [phi:play_collision::@1->play_collision::@2#1] -- register_copy - // [208] phi (byte) play_collision::i#2 = (byte) play_collision::i#3 [phi:play_collision::@1->play_collision::@2#2] -- register_copy + // [206] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#8 [phi:play_collision::@1->play_collision::@2#1] -- register_copy + // [206] phi (byte) play_collision::i#2 = (byte) play_collision::i#3 [phi:play_collision::@1->play_collision::@2#2] -- register_copy // play_collision::@2 __b2: // if(piece_gfx[i++]!=0) - // [209] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 -- vbuz1=_inc_vbuz2 + // [207] (byte) play_collision::i#1 ← ++ (byte) play_collision::i#2 -- vbuz1=_inc_vbuz2 ldy.z i_1 iny sty.z i - // [210] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [208] if(*((byte*) play_collision::piece_gfx#0 + (byte) play_collision::i#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z i_1 lda (piece_gfx),y cmp #0 beq __b3 // play_collision::@7 // if(yp>=PLAYFIELD_LINES) - // [211] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -- vbuz1_lt_vbuc1_then_la1 + // [209] if((byte) play_collision::yp#2<(const byte) PLAYFIELD_LINES) goto play_collision::@4 -- vbuz1_lt_vbuc1_then_la1 lda.z yp cmp #PLAYFIELD_LINES bcc __b4 - // [216] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return] - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM [phi:play_collision::@7->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi from play_collision::@7 to play_collision::@return [phi:play_collision::@7->play_collision::@return] + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_BOTTOM [phi:play_collision::@7->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_BOTTOM rts // play_collision::@4 __b4: // xp&0x80 - // [212] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 + // [210] (byte~) play_collision::$5 ← (byte) play_collision::xp#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1 lda #$80 and.z xp // if((xp&0x80)!=0) - // [213] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -- vbuaa_eq_0_then_la1 + // [211] if((byte~) play_collision::$5==(byte) 0) goto play_collision::@5 -- vbuaa_eq_0_then_la1 cmp #0 beq __b5 - // [216] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return] - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT [phi:play_collision::@4->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi from play_collision::@4 to play_collision::@return [phi:play_collision::@4->play_collision::@return] + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_LEFT [phi:play_collision::@4->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_LEFT rts // play_collision::@5 __b5: // if(xp>=PLAYFIELD_COLS) - // [214] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1 + // [212] if((byte) play_collision::xp#2<(const byte) PLAYFIELD_COLS) goto play_collision::@6 -- vbuz1_lt_vbuc1_then_la1 lda.z xp cmp #PLAYFIELD_COLS bcc __b6 - // [216] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return] - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT [phi:play_collision::@5->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi from play_collision::@5 to play_collision::@return [phi:play_collision::@5->play_collision::@return] + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_RIGHT [phi:play_collision::@5->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_RIGHT rts // play_collision::@6 __b6: // if(playfield_line[xp]!=0) - // [215] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [213] if(*((byte*) play_collision::playfield_line#0 + (byte) play_collision::xp#2)==(byte) 0) goto play_collision::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z xp lda (playfield_line),y cmp #0 beq __b3 - // [216] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return] - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD [phi:play_collision::@6->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi from play_collision::@6 to play_collision::@return [phi:play_collision::@6->play_collision::@return] + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_PLAYFIELD [phi:play_collision::@6->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_PLAYFIELD // play_collision::@return // } - // [217] return + // [215] return rts // play_collision::@3 __b3: // xp++; - // [218] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 -- vbuz1=_inc_vbuz1 + // [216] (byte) play_collision::xp#1 ← ++ (byte) play_collision::xp#2 -- vbuz1=_inc_vbuz1 inc.z xp // for(char c:0..3) - // [219] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 -- vbuxx=_inc_vbuxx + // [217] (byte) play_collision::c#1 ← ++ (byte) play_collision::c#2 -- vbuxx=_inc_vbuxx inx - // [220] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 -- vbuxx_neq_vbuc1_then_la1 + // [218] if((byte) play_collision::c#1!=(byte) 4) goto play_collision::@10 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b10 // play_collision::@8 // yp++; - // [221] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 -- vbuz1=_inc_vbuz1 + // [219] (byte) play_collision::yp#1 ← ++ (byte) play_collision::yp#2 -- vbuz1=_inc_vbuz1 inc.z yp // for(char l:0..3) - // [222] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 -- vbuz1=_inc_vbuz1 + // [220] (byte) play_collision::l#1 ← ++ (byte) play_collision::l#6 -- vbuz1=_inc_vbuz1 inc.z l - // [223] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 -- vbuz1_neq_vbuc1_then_la1 + // [221] if((byte) play_collision::l#1!=(byte) 4) goto play_collision::@9 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b9 - // [216] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return] - // [216] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE [phi:play_collision::@8->play_collision::@return#0] -- vbuaa=vbuc1 + // [214] phi from play_collision::@8 to play_collision::@return [phi:play_collision::@8->play_collision::@return] + // [214] phi (byte) play_collision::return#15 = (const byte) COLLISION_NONE [phi:play_collision::@8->play_collision::@return#0] -- vbuaa=vbuc1 lda #COLLISION_NONE rts // play_collision::@9 __b9: - // [224] (byte) play_collision::i#10 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 + // [222] (byte) play_collision::i#10 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [204] phi from play_collision::@9 to play_collision::@1 [phi:play_collision::@9->play_collision::@1] - // [204] phi (byte) play_collision::l#6 = (byte) play_collision::l#1 [phi:play_collision::@9->play_collision::@1#0] -- register_copy - // [204] phi (byte) play_collision::i#3 = (byte) play_collision::i#10 [phi:play_collision::@9->play_collision::@1#1] -- register_copy - // [204] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#1 [phi:play_collision::@9->play_collision::@1#2] -- register_copy + // [202] phi from play_collision::@9 to play_collision::@1 [phi:play_collision::@9->play_collision::@1] + // [202] phi (byte) play_collision::l#6 = (byte) play_collision::l#1 [phi:play_collision::@9->play_collision::@1#0] -- register_copy + // [202] phi (byte) play_collision::i#3 = (byte) play_collision::i#10 [phi:play_collision::@9->play_collision::@1#1] -- register_copy + // [202] phi (byte) play_collision::yp#2 = (byte) play_collision::yp#1 [phi:play_collision::@9->play_collision::@1#2] -- register_copy jmp __b1 // play_collision::@10 __b10: - // [225] (byte) play_collision::i#12 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 + // [223] (byte) play_collision::i#12 ← (byte) play_collision::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [208] phi from play_collision::@10 to play_collision::@2 [phi:play_collision::@10->play_collision::@2] - // [208] phi (byte) play_collision::c#2 = (byte) play_collision::c#1 [phi:play_collision::@10->play_collision::@2#0] -- register_copy - // [208] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#1 [phi:play_collision::@10->play_collision::@2#1] -- register_copy - // [208] phi (byte) play_collision::i#2 = (byte) play_collision::i#12 [phi:play_collision::@10->play_collision::@2#2] -- register_copy + // [206] phi from play_collision::@10 to play_collision::@2 [phi:play_collision::@10->play_collision::@2] + // [206] phi (byte) play_collision::c#2 = (byte) play_collision::c#1 [phi:play_collision::@10->play_collision::@2#0] -- register_copy + // [206] phi (byte) play_collision::xp#2 = (byte) play_collision::xp#1 [phi:play_collision::@10->play_collision::@2#1] -- register_copy + // [206] phi (byte) play_collision::i#2 = (byte) play_collision::i#12 [phi:play_collision::@10->play_collision::@2#2] -- register_copy jmp __b2 } // play_move_leftright @@ -23412,102 +23387,102 @@ play_collision: { // play_move_leftright(byte register(A) key_event) play_move_leftright: { // if(key_event==KEY_COMMA) - // [226] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -- vbuaa_eq_vbuc1_then_la1 + // [224] if((byte) play_move_leftright::key_event#0==(const byte) KEY_COMMA) goto play_move_leftright::@1 -- vbuaa_eq_vbuc1_then_la1 // Handle keyboard events cmp #KEY_COMMA beq __b1 // play_move_leftright::@2 // if(key_event==KEY_DOT) - // [227] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 + // [225] if((byte) play_move_leftright::key_event#0!=(const byte) KEY_DOT) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_DOT bne b2 // play_move_leftright::@3 // play_collision(current_xpos+1,current_ypos,current_orientation) - // [228] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [226] (byte) play_collision::xpos#2 ← (byte) current_xpos#22 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z current_xpos iny sty.z play_collision.xpos - // [229] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [227] (byte) play_collision::ypos#2 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [230] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 -- vbuxx=vbuz1 + // [228] (byte) play_collision::orientation#2 ← (byte) current_orientation#20 -- vbuxx=vbuz1 ldx.z current_orientation - // [231] (byte*) current_piece#97 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [229] (byte*) current_piece#97 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 // play_collision(current_xpos+1,current_ypos,current_orientation) - // [232] call play_collision - // [202] phi from play_move_leftright::@3 to play_collision [phi:play_move_leftright::@3->play_collision] - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#2 [phi:play_move_leftright::@3->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#2 [phi:play_move_leftright::@3->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#2 [phi:play_move_leftright::@3->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#97 [phi:play_move_leftright::@3->play_collision#3] -- register_copy + // [230] call play_collision + // [200] phi from play_move_leftright::@3 to play_collision [phi:play_move_leftright::@3->play_collision] + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#2 [phi:play_move_leftright::@3->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#2 [phi:play_move_leftright::@3->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#2 [phi:play_move_leftright::@3->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#97 [phi:play_move_leftright::@3->play_collision#3] -- register_copy jsr play_collision // play_collision(current_xpos+1,current_ypos,current_orientation) - // [233] (byte) play_collision::return#13 ← (byte) play_collision::return#15 + // [231] (byte) play_collision::return#13 ← (byte) play_collision::return#15 // play_move_leftright::@7 - // [234] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 + // [232] (byte~) play_move_leftright::$4 ← (byte) play_collision::return#13 // if(play_collision(current_xpos+1,current_ypos,current_orientation)==COLLISION_NONE) - // [235] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 + // [233] if((byte~) play_move_leftright::$4!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_NONE bne b2 // play_move_leftright::@4 // current_xpos++; - // [236] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 -- vbuz1=_inc_vbuz1 + // [234] (byte) current_xpos#6 ← ++ (byte) current_xpos#22 -- vbuz1=_inc_vbuz1 inc.z current_xpos - // [237] phi from play_move_leftright::@4 play_move_leftright::@5 to play_move_leftright::@return [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return] + // [235] phi from play_move_leftright::@4 play_move_leftright::@5 to play_move_leftright::@return [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return] b1: - // [237] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy - // [237] phi (byte) play_move_leftright::return#2 = (byte) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuaa=vbuc1 + // [235] phi (byte) current_xpos#26 = (byte) current_xpos#6 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#0] -- register_copy + // [235] phi (byte) play_move_leftright::return#2 = (byte) 1 [phi:play_move_leftright::@4/play_move_leftright::@5->play_move_leftright::@return#1] -- vbuaa=vbuc1 lda #1 rts - // [237] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return] + // [235] phi from play_move_leftright::@2 play_move_leftright::@6 play_move_leftright::@7 to play_move_leftright::@return [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return] b2: - // [237] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy - // [237] phi (byte) play_move_leftright::return#2 = (byte) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuaa=vbuc1 + // [235] phi (byte) current_xpos#26 = (byte) current_xpos#22 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#0] -- register_copy + // [235] phi (byte) play_move_leftright::return#2 = (byte) 0 [phi:play_move_leftright::@2/play_move_leftright::@6/play_move_leftright::@7->play_move_leftright::@return#1] -- vbuaa=vbuc1 lda #0 // play_move_leftright::@return // } - // [238] return + // [236] return rts // play_move_leftright::@1 __b1: // play_collision(current_xpos-1,current_ypos,current_orientation) - // [239] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 -- vbuz1=vbuz2_minus_1 + // [237] (byte) play_collision::xpos#1 ← (byte) current_xpos#22 - (byte) 1 -- vbuz1=vbuz2_minus_1 ldx.z current_xpos dex stx.z play_collision.xpos - // [240] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 -- vbuz1=vbuz2 + // [238] (byte) play_collision::ypos#1 ← (byte) current_ypos#19 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [241] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 -- vbuxx=vbuz1 + // [239] (byte) play_collision::orientation#1 ← (byte) current_orientation#20 -- vbuxx=vbuz1 ldx.z current_orientation - // [242] (byte*) current_piece#96 ← (byte*) current_piece#15 -- pbuz1=pbuz2 + // [240] (byte*) current_piece#96 ← (byte*) current_piece#15 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 // play_collision(current_xpos-1,current_ypos,current_orientation) - // [243] call play_collision - // [202] phi from play_move_leftright::@1 to play_collision [phi:play_move_leftright::@1->play_collision] - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#1 [phi:play_move_leftright::@1->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#1 [phi:play_move_leftright::@1->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#1 [phi:play_move_leftright::@1->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#96 [phi:play_move_leftright::@1->play_collision#3] -- register_copy + // [241] call play_collision + // [200] phi from play_move_leftright::@1 to play_collision [phi:play_move_leftright::@1->play_collision] + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#1 [phi:play_move_leftright::@1->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#1 [phi:play_move_leftright::@1->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#1 [phi:play_move_leftright::@1->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#96 [phi:play_move_leftright::@1->play_collision#3] -- register_copy jsr play_collision // play_collision(current_xpos-1,current_ypos,current_orientation) - // [244] (byte) play_collision::return#1 ← (byte) play_collision::return#15 + // [242] (byte) play_collision::return#1 ← (byte) play_collision::return#15 // play_move_leftright::@6 - // [245] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 + // [243] (byte~) play_move_leftright::$8 ← (byte) play_collision::return#1 // if(play_collision(current_xpos-1,current_ypos,current_orientation)==COLLISION_NONE) - // [246] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 + // [244] if((byte~) play_move_leftright::$8!=(const byte) COLLISION_NONE) goto play_move_leftright::@return -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_NONE bne b2 // play_move_leftright::@5 // current_xpos--; - // [247] (byte) current_xpos#8 ← -- (byte) current_xpos#22 -- vbuz1=_dec_vbuz1 + // [245] (byte) current_xpos#8 ← -- (byte) current_xpos#22 -- vbuz1=_dec_vbuz1 dec.z current_xpos jmp b1 } @@ -23517,219 +23492,219 @@ play_move_leftright: { // play_move_down(byte register(A) key_event) play_move_down: { // ++current_movedown_counter; - // [248] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 -- vbuz1=_inc_vbuz1 + // [246] (byte) current_movedown_counter#12 ← ++ (byte) current_movedown_counter#16 -- vbuz1=_inc_vbuz1 inc.z current_movedown_counter // if(key_event==KEY_SPACE) - // [249] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -- vbuaa_neq_vbuc1_then_la1 + // [247] if((byte) play_move_down::key_event#0!=(const byte) KEY_SPACE) goto play_move_down::@1 -- vbuaa_neq_vbuc1_then_la1 cmp #KEY_SPACE bne b1 - // [250] phi from play_move_down to play_move_down::@4 [phi:play_move_down->play_move_down::@4] + // [248] phi from play_move_down to play_move_down::@4 [phi:play_move_down->play_move_down::@4] // play_move_down::@4 - // [251] phi from play_move_down::@4 to play_move_down::@1 [phi:play_move_down::@4->play_move_down::@1] - // [251] phi (byte) play_move_down::movedown#10 = (byte) 1 [phi:play_move_down::@4->play_move_down::@1#0] -- vbuxx=vbuc1 + // [249] phi from play_move_down::@4 to play_move_down::@1 [phi:play_move_down::@4->play_move_down::@1] + // [249] phi (byte) play_move_down::movedown#10 = (byte) 1 [phi:play_move_down::@4->play_move_down::@1#0] -- vbuxx=vbuc1 ldx #1 jmp __b1 - // [251] phi from play_move_down to play_move_down::@1 [phi:play_move_down->play_move_down::@1] + // [249] phi from play_move_down to play_move_down::@1 [phi:play_move_down->play_move_down::@1] b1: - // [251] phi (byte) play_move_down::movedown#10 = (byte) 0 [phi:play_move_down->play_move_down::@1#0] -- vbuxx=vbuc1 + // [249] phi (byte) play_move_down::movedown#10 = (byte) 0 [phi:play_move_down->play_move_down::@1#0] -- vbuxx=vbuc1 ldx #0 // play_move_down::@1 __b1: // keyboard_event_pressed(KEY_SPACE) - // [252] call keyboard_event_pressed - // [381] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [250] call keyboard_event_pressed + // [379] phi from play_move_down::@1 to keyboard_event_pressed [phi:play_move_down::@1->keyboard_event_pressed] + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_SPACE [phi:play_move_down::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_SPACE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_SPACE) - // [253] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 + // [251] (byte) keyboard_event_pressed::return#12 ← (byte) keyboard_event_pressed::return#11 // play_move_down::@12 - // [254] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 + // [252] (byte~) play_move_down::$2 ← (byte) keyboard_event_pressed::return#12 // if(keyboard_event_pressed(KEY_SPACE)!=0) - // [255] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -- vbuaa_eq_0_then_la1 + // [253] if((byte~) play_move_down::$2==(byte) 0) goto play_move_down::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2 // play_move_down::@5 // if(current_movedown_counter>=current_movedown_fast) - // [256] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -- vbuz1_lt_vbuc1_then_la1 + // [254] if((byte) current_movedown_counter#12<(const byte) current_movedown_fast) goto play_move_down::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z current_movedown_counter cmp #current_movedown_fast bcc __b2 // play_move_down::@6 // movedown++; - // [257] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 -- vbuxx=_inc_vbuxx + // [255] (byte) play_move_down::movedown#2 ← ++ (byte) play_move_down::movedown#10 -- vbuxx=_inc_vbuxx inx - // [258] phi from play_move_down::@12 play_move_down::@5 play_move_down::@6 to play_move_down::@2 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2] - // [258] phi (byte) play_move_down::movedown#7 = (byte) play_move_down::movedown#10 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2#0] -- register_copy + // [256] phi from play_move_down::@12 play_move_down::@5 play_move_down::@6 to play_move_down::@2 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2] + // [256] phi (byte) play_move_down::movedown#7 = (byte) play_move_down::movedown#10 [phi:play_move_down::@12/play_move_down::@5/play_move_down::@6->play_move_down::@2#0] -- register_copy // play_move_down::@2 __b2: // if(current_movedown_counter>=current_movedown_slow) - // [259] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -- vbuz1_lt_vbuz2_then_la1 + // [257] if((byte) current_movedown_counter#12<(byte) current_movedown_slow#14) goto play_move_down::@3 -- vbuz1_lt_vbuz2_then_la1 lda.z current_movedown_counter cmp.z current_movedown_slow bcc __b3 // play_move_down::@7 // movedown++; - // [260] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 -- vbuxx=_inc_vbuxx + // [258] (byte) play_move_down::movedown#3 ← ++ (byte) play_move_down::movedown#7 -- vbuxx=_inc_vbuxx inx - // [261] phi from play_move_down::@2 play_move_down::@7 to play_move_down::@3 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3] - // [261] phi (byte) play_move_down::movedown#6 = (byte) play_move_down::movedown#7 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3#0] -- register_copy + // [259] phi from play_move_down::@2 play_move_down::@7 to play_move_down::@3 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3] + // [259] phi (byte) play_move_down::movedown#6 = (byte) play_move_down::movedown#7 [phi:play_move_down::@2/play_move_down::@7->play_move_down::@3#0] -- register_copy // play_move_down::@3 __b3: // if(movedown!=0) - // [262] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return -- vbuxx_eq_0_then_la1 + // [260] if((byte) play_move_down::movedown#6==(byte) 0) goto play_move_down::@return -- vbuxx_eq_0_then_la1 cpx #0 beq b2 // play_move_down::@8 // play_collision(current_xpos,current_ypos+1,current_orientation) - // [263] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 -- vbuz1=vbuz2_plus_1 + // [261] (byte) play_collision::ypos#0 ← (byte) current_ypos#11 + (byte) 1 -- vbuz1=vbuz2_plus_1 ldy.z current_ypos iny sty.z play_collision.ypos - // [264] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [262] (byte) play_collision::xpos#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [265] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 -- vbuxx=vbuz1 + // [263] (byte) play_collision::orientation#0 ← (byte) current_orientation#13 -- vbuxx=vbuz1 ldx.z current_orientation - // [266] (byte*) current_piece#95 ← (byte*) current_piece#10 -- pbuz1=pbuz2 + // [264] (byte*) current_piece#95 ← (byte*) current_piece#10 -- pbuz1=pbuz2 lda.z current_piece sta.z current_piece_1 lda.z current_piece+1 sta.z current_piece_1+1 // play_collision(current_xpos,current_ypos+1,current_orientation) - // [267] call play_collision - // [202] phi from play_move_down::@8 to play_collision [phi:play_move_down::@8->play_collision] - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#0 [phi:play_move_down::@8->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#0 [phi:play_move_down::@8->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#0 [phi:play_move_down::@8->play_collision#2] -- register_copy - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#95 [phi:play_move_down::@8->play_collision#3] -- register_copy + // [265] call play_collision + // [200] phi from play_move_down::@8 to play_collision [phi:play_move_down::@8->play_collision] + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#0 [phi:play_move_down::@8->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#0 [phi:play_move_down::@8->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) play_collision::orientation#0 [phi:play_move_down::@8->play_collision#2] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#95 [phi:play_move_down::@8->play_collision#3] -- register_copy jsr play_collision // play_collision(current_xpos,current_ypos+1,current_orientation) - // [268] (byte) play_collision::return#0 ← (byte) play_collision::return#15 + // [266] (byte) play_collision::return#0 ← (byte) play_collision::return#15 // play_move_down::@13 - // [269] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 + // [267] (byte~) play_move_down::$12 ← (byte) play_collision::return#0 // if(play_collision(current_xpos,current_ypos+1,current_orientation)==COLLISION_NONE) - // [270] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 -- vbuaa_eq_vbuc1_then_la1 + // [268] if((byte~) play_move_down::$12==(const byte) COLLISION_NONE) goto play_move_down::@10 -- vbuaa_eq_vbuc1_then_la1 cmp #COLLISION_NONE beq __b10 - // [271] phi from play_move_down::@13 to play_move_down::@9 [phi:play_move_down::@13->play_move_down::@9] + // [269] phi from play_move_down::@13 to play_move_down::@9 [phi:play_move_down::@13->play_move_down::@9] // play_move_down::@9 // play_lock_current() - // [272] call play_lock_current + // [270] call play_lock_current jsr play_lock_current - // [273] phi from play_move_down::@9 to play_move_down::@14 [phi:play_move_down::@9->play_move_down::@14] + // [271] phi from play_move_down::@9 to play_move_down::@14 [phi:play_move_down::@9->play_move_down::@14] // play_move_down::@14 // play_remove_lines() - // [274] call play_remove_lines - // [340] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] + // [272] call play_remove_lines + // [338] phi from play_move_down::@14 to play_remove_lines [phi:play_move_down::@14->play_remove_lines] jsr play_remove_lines // play_remove_lines() - // [275] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuaa=vbuz1 + // [273] (byte) play_remove_lines::return#0 ← (byte) play_remove_lines::removed#8 -- vbuaa=vbuz1 lda.z play_remove_lines.removed // play_move_down::@15 // removed = play_remove_lines() - // [276] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 + // [274] (byte) play_move_down::removed#0 ← (byte) play_remove_lines::return#0 // play_update_score(removed) - // [277] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 -- vbuxx=vbuaa + // [275] (byte) play_update_score::removed#0 ← (byte) play_move_down::removed#0 -- vbuxx=vbuaa tax - // [278] call play_update_score + // [276] call play_update_score jsr play_update_score - // [279] phi from play_move_down::@15 to play_move_down::@16 [phi:play_move_down::@15->play_move_down::@16] + // [277] phi from play_move_down::@15 to play_move_down::@16 [phi:play_move_down::@15->play_move_down::@16] // play_move_down::@16 // play_spawn_current() - // [280] call play_spawn_current - // [287] phi from play_move_down::@16 to play_spawn_current [phi:play_move_down::@16->play_spawn_current] - // [287] phi (byte) game_over#65 = (byte) game_over#10 [phi:play_move_down::@16->play_spawn_current#0] -- register_copy - // [287] phi (byte) next_piece_idx#17 = (byte) next_piece_idx#10 [phi:play_move_down::@16->play_spawn_current#1] -- register_copy + // [278] call play_spawn_current + // [285] phi from play_move_down::@16 to play_spawn_current [phi:play_move_down::@16->play_spawn_current] + // [285] phi (byte) game_over#65 = (byte) game_over#10 [phi:play_move_down::@16->play_spawn_current#0] -- register_copy + // [285] phi (byte) next_piece_idx#17 = (byte) next_piece_idx#10 [phi:play_move_down::@16->play_spawn_current#1] -- register_copy jsr play_spawn_current // play_move_down::@17 - // [281] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [279] (byte*) current_piece#92 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z play_spawn_current.__7 lda PIECES,y sta.z current_piece lda PIECES+1,y sta.z current_piece+1 - // [282] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [280] (byte*) current_piece_gfx#116 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 lda PIECES,y sta.z current_piece_gfx lda PIECES+1,y sta.z current_piece_gfx+1 - // [283] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] - // [283] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy - // [283] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy - // [283] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy - // [283] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#116 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy - // [283] phi (byte) current_orientation#37 = (byte) 0 [phi:play_move_down::@17->play_move_down::@11#4] -- vbuz1=vbuc1 + // [281] phi from play_move_down::@17 to play_move_down::@11 [phi:play_move_down::@17->play_move_down::@11] + // [281] phi (byte) next_piece_idx#30 = (byte) play_spawn_current::piece_idx#2 [phi:play_move_down::@17->play_move_down::@11#0] -- register_copy + // [281] phi (byte) game_over#27 = (byte) game_over#52 [phi:play_move_down::@17->play_move_down::@11#1] -- register_copy + // [281] phi (byte) current_xpos#43 = (byte) current_xpos#100 [phi:play_move_down::@17->play_move_down::@11#2] -- register_copy + // [281] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#116 [phi:play_move_down::@17->play_move_down::@11#3] -- register_copy + // [281] phi (byte) current_orientation#37 = (byte) 0 [phi:play_move_down::@17->play_move_down::@11#4] -- vbuz1=vbuc1 lda #0 sta.z current_orientation - // [283] phi (byte) current_piece_char#29 = (byte) current_piece_char#5 [phi:play_move_down::@17->play_move_down::@11#5] -- register_copy - // [283] phi (byte*) current_piece#28 = (byte*) current_piece#92 [phi:play_move_down::@17->play_move_down::@11#6] -- register_copy - // [283] phi (byte) level_bcd#31 = (byte) level_bcd#19 [phi:play_move_down::@17->play_move_down::@11#7] -- register_copy - // [283] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#23 [phi:play_move_down::@17->play_move_down::@11#8] -- register_copy - // [283] phi (byte) level#33 = (byte) level#19 [phi:play_move_down::@17->play_move_down::@11#9] -- register_copy - // [283] phi (word) lines_bcd#26 = (word) lines_bcd#17 [phi:play_move_down::@17->play_move_down::@11#10] -- register_copy - // [283] phi (byte) current_ypos#38 = (byte) current_ypos#6 [phi:play_move_down::@17->play_move_down::@11#11] -- register_copy + // [281] phi (byte) current_piece_char#29 = (byte) current_piece_char#5 [phi:play_move_down::@17->play_move_down::@11#5] -- register_copy + // [281] phi (byte*) current_piece#28 = (byte*) current_piece#92 [phi:play_move_down::@17->play_move_down::@11#6] -- register_copy + // [281] phi (byte) level_bcd#31 = (byte) level_bcd#19 [phi:play_move_down::@17->play_move_down::@11#7] -- register_copy + // [281] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#23 [phi:play_move_down::@17->play_move_down::@11#8] -- register_copy + // [281] phi (byte) level#33 = (byte) level#19 [phi:play_move_down::@17->play_move_down::@11#9] -- register_copy + // [281] phi (word) lines_bcd#26 = (word) lines_bcd#17 [phi:play_move_down::@17->play_move_down::@11#10] -- register_copy + // [281] phi (byte) current_ypos#38 = (byte) current_ypos#6 [phi:play_move_down::@17->play_move_down::@11#11] -- register_copy // play_move_down::@11 __b11: - // [284] phi from play_move_down::@11 to play_move_down::@return [phi:play_move_down::@11->play_move_down::@return] - // [284] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#30 [phi:play_move_down::@11->play_move_down::@return#0] -- register_copy - // [284] phi (byte) game_over#15 = (byte) game_over#27 [phi:play_move_down::@11->play_move_down::@return#1] -- register_copy - // [284] phi (byte) current_xpos#22 = (byte) current_xpos#43 [phi:play_move_down::@11->play_move_down::@return#2] -- register_copy - // [284] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#35 [phi:play_move_down::@11->play_move_down::@return#3] -- register_copy - // [284] phi (byte) current_orientation#20 = (byte) current_orientation#37 [phi:play_move_down::@11->play_move_down::@return#4] -- register_copy - // [284] phi (byte) current_piece_char#16 = (byte) current_piece_char#29 [phi:play_move_down::@11->play_move_down::@return#5] -- register_copy - // [284] phi (byte*) current_piece#15 = (byte*) current_piece#28 [phi:play_move_down::@11->play_move_down::@return#6] -- register_copy - // [284] phi (byte) level_bcd#17 = (byte) level_bcd#31 [phi:play_move_down::@11->play_move_down::@return#7] -- register_copy - // [284] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#37 [phi:play_move_down::@11->play_move_down::@return#8] -- register_copy - // [284] phi (byte) level#17 = (byte) level#33 [phi:play_move_down::@11->play_move_down::@return#9] -- register_copy - // [284] phi (word) lines_bcd#15 = (word) lines_bcd#26 [phi:play_move_down::@11->play_move_down::@return#10] -- register_copy - // [284] phi (byte) current_ypos#19 = (byte) current_ypos#38 [phi:play_move_down::@11->play_move_down::@return#11] -- register_copy - // [284] phi (byte) current_movedown_counter#14 = (byte) 0 [phi:play_move_down::@11->play_move_down::@return#12] -- vbuz1=vbuc1 + // [282] phi from play_move_down::@11 to play_move_down::@return [phi:play_move_down::@11->play_move_down::@return] + // [282] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#30 [phi:play_move_down::@11->play_move_down::@return#0] -- register_copy + // [282] phi (byte) game_over#15 = (byte) game_over#27 [phi:play_move_down::@11->play_move_down::@return#1] -- register_copy + // [282] phi (byte) current_xpos#22 = (byte) current_xpos#43 [phi:play_move_down::@11->play_move_down::@return#2] -- register_copy + // [282] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#35 [phi:play_move_down::@11->play_move_down::@return#3] -- register_copy + // [282] phi (byte) current_orientation#20 = (byte) current_orientation#37 [phi:play_move_down::@11->play_move_down::@return#4] -- register_copy + // [282] phi (byte) current_piece_char#16 = (byte) current_piece_char#29 [phi:play_move_down::@11->play_move_down::@return#5] -- register_copy + // [282] phi (byte*) current_piece#15 = (byte*) current_piece#28 [phi:play_move_down::@11->play_move_down::@return#6] -- register_copy + // [282] phi (byte) level_bcd#17 = (byte) level_bcd#31 [phi:play_move_down::@11->play_move_down::@return#7] -- register_copy + // [282] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#37 [phi:play_move_down::@11->play_move_down::@return#8] -- register_copy + // [282] phi (byte) level#17 = (byte) level#33 [phi:play_move_down::@11->play_move_down::@return#9] -- register_copy + // [282] phi (word) lines_bcd#15 = (word) lines_bcd#26 [phi:play_move_down::@11->play_move_down::@return#10] -- register_copy + // [282] phi (byte) current_ypos#19 = (byte) current_ypos#38 [phi:play_move_down::@11->play_move_down::@return#11] -- register_copy + // [282] phi (byte) current_movedown_counter#14 = (byte) 0 [phi:play_move_down::@11->play_move_down::@return#12] -- vbuz1=vbuc1 lda #0 sta.z current_movedown_counter - // [284] phi (byte) play_move_down::return#3 = (byte) 1 [phi:play_move_down::@11->play_move_down::@return#13] -- vbuxx=vbuc1 + // [282] phi (byte) play_move_down::return#3 = (byte) 1 [phi:play_move_down::@11->play_move_down::@return#13] -- vbuxx=vbuc1 ldx #1 rts - // [284] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return] + // [282] phi from play_move_down::@3 to play_move_down::@return [phi:play_move_down::@3->play_move_down::@return] b2: - // [284] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy - // [284] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy - // [284] phi (byte) current_xpos#22 = (byte) current_xpos#14 [phi:play_move_down::@3->play_move_down::@return#2] -- register_copy - // [284] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#13 [phi:play_move_down::@3->play_move_down::@return#3] -- register_copy - // [284] phi (byte) current_orientation#20 = (byte) current_orientation#13 [phi:play_move_down::@3->play_move_down::@return#4] -- register_copy - // [284] phi (byte) current_piece_char#16 = (byte) current_piece_char#10 [phi:play_move_down::@3->play_move_down::@return#5] -- register_copy - // [284] phi (byte*) current_piece#15 = (byte*) current_piece#10 [phi:play_move_down::@3->play_move_down::@return#6] -- register_copy - // [284] phi (byte) level_bcd#17 = (byte) level_bcd#11 [phi:play_move_down::@3->play_move_down::@return#7] -- register_copy - // [284] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#14 [phi:play_move_down::@3->play_move_down::@return#8] -- register_copy - // [284] phi (byte) level#17 = (byte) level#10 [phi:play_move_down::@3->play_move_down::@return#9] -- register_copy - // [284] phi (word) lines_bcd#15 = (word) lines_bcd#19 [phi:play_move_down::@3->play_move_down::@return#10] -- register_copy - // [284] phi (byte) current_ypos#19 = (byte) current_ypos#11 [phi:play_move_down::@3->play_move_down::@return#11] -- register_copy - // [284] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#12] -- register_copy - // [284] phi (byte) play_move_down::return#3 = (byte) 0 [phi:play_move_down::@3->play_move_down::@return#13] -- vbuxx=vbuc1 + // [282] phi (byte) next_piece_idx#16 = (byte) next_piece_idx#10 [phi:play_move_down::@3->play_move_down::@return#0] -- register_copy + // [282] phi (byte) game_over#15 = (byte) game_over#10 [phi:play_move_down::@3->play_move_down::@return#1] -- register_copy + // [282] phi (byte) current_xpos#22 = (byte) current_xpos#14 [phi:play_move_down::@3->play_move_down::@return#2] -- register_copy + // [282] phi (byte*) current_piece_gfx#20 = (byte*) current_piece_gfx#13 [phi:play_move_down::@3->play_move_down::@return#3] -- register_copy + // [282] phi (byte) current_orientation#20 = (byte) current_orientation#13 [phi:play_move_down::@3->play_move_down::@return#4] -- register_copy + // [282] phi (byte) current_piece_char#16 = (byte) current_piece_char#10 [phi:play_move_down::@3->play_move_down::@return#5] -- register_copy + // [282] phi (byte*) current_piece#15 = (byte*) current_piece#10 [phi:play_move_down::@3->play_move_down::@return#6] -- register_copy + // [282] phi (byte) level_bcd#17 = (byte) level_bcd#11 [phi:play_move_down::@3->play_move_down::@return#7] -- register_copy + // [282] phi (byte) current_movedown_slow#21 = (byte) current_movedown_slow#14 [phi:play_move_down::@3->play_move_down::@return#8] -- register_copy + // [282] phi (byte) level#17 = (byte) level#10 [phi:play_move_down::@3->play_move_down::@return#9] -- register_copy + // [282] phi (word) lines_bcd#15 = (word) lines_bcd#19 [phi:play_move_down::@3->play_move_down::@return#10] -- register_copy + // [282] phi (byte) current_ypos#19 = (byte) current_ypos#11 [phi:play_move_down::@3->play_move_down::@return#11] -- register_copy + // [282] phi (byte) current_movedown_counter#14 = (byte) current_movedown_counter#12 [phi:play_move_down::@3->play_move_down::@return#12] -- register_copy + // [282] phi (byte) play_move_down::return#3 = (byte) 0 [phi:play_move_down::@3->play_move_down::@return#13] -- vbuxx=vbuc1 ldx #0 // play_move_down::@return // } - // [285] return + // [283] return rts // play_move_down::@10 __b10: // current_ypos++; - // [286] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 -- vbuz1=_inc_vbuz1 + // [284] (byte) current_ypos#3 ← ++ (byte) current_ypos#11 -- vbuz1=_inc_vbuz1 inc.z current_ypos - // [283] phi from play_move_down::@10 to play_move_down::@11 [phi:play_move_down::@10->play_move_down::@11] - // [283] phi (byte) next_piece_idx#30 = (byte) next_piece_idx#10 [phi:play_move_down::@10->play_move_down::@11#0] -- register_copy - // [283] phi (byte) game_over#27 = (byte) game_over#10 [phi:play_move_down::@10->play_move_down::@11#1] -- register_copy - // [283] phi (byte) current_xpos#43 = (byte) current_xpos#14 [phi:play_move_down::@10->play_move_down::@11#2] -- register_copy - // [283] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#13 [phi:play_move_down::@10->play_move_down::@11#3] -- register_copy - // [283] phi (byte) current_orientation#37 = (byte) current_orientation#13 [phi:play_move_down::@10->play_move_down::@11#4] -- register_copy - // [283] phi (byte) current_piece_char#29 = (byte) current_piece_char#10 [phi:play_move_down::@10->play_move_down::@11#5] -- register_copy - // [283] phi (byte*) current_piece#28 = (byte*) current_piece#10 [phi:play_move_down::@10->play_move_down::@11#6] -- register_copy - // [283] phi (byte) level_bcd#31 = (byte) level_bcd#11 [phi:play_move_down::@10->play_move_down::@11#7] -- register_copy - // [283] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#14 [phi:play_move_down::@10->play_move_down::@11#8] -- register_copy - // [283] phi (byte) level#33 = (byte) level#10 [phi:play_move_down::@10->play_move_down::@11#9] -- register_copy - // [283] phi (word) lines_bcd#26 = (word) lines_bcd#19 [phi:play_move_down::@10->play_move_down::@11#10] -- register_copy - // [283] phi (byte) current_ypos#38 = (byte) current_ypos#3 [phi:play_move_down::@10->play_move_down::@11#11] -- register_copy + // [281] phi from play_move_down::@10 to play_move_down::@11 [phi:play_move_down::@10->play_move_down::@11] + // [281] phi (byte) next_piece_idx#30 = (byte) next_piece_idx#10 [phi:play_move_down::@10->play_move_down::@11#0] -- register_copy + // [281] phi (byte) game_over#27 = (byte) game_over#10 [phi:play_move_down::@10->play_move_down::@11#1] -- register_copy + // [281] phi (byte) current_xpos#43 = (byte) current_xpos#14 [phi:play_move_down::@10->play_move_down::@11#2] -- register_copy + // [281] phi (byte*) current_piece_gfx#35 = (byte*) current_piece_gfx#13 [phi:play_move_down::@10->play_move_down::@11#3] -- register_copy + // [281] phi (byte) current_orientation#37 = (byte) current_orientation#13 [phi:play_move_down::@10->play_move_down::@11#4] -- register_copy + // [281] phi (byte) current_piece_char#29 = (byte) current_piece_char#10 [phi:play_move_down::@10->play_move_down::@11#5] -- register_copy + // [281] phi (byte*) current_piece#28 = (byte*) current_piece#10 [phi:play_move_down::@10->play_move_down::@11#6] -- register_copy + // [281] phi (byte) level_bcd#31 = (byte) level_bcd#11 [phi:play_move_down::@10->play_move_down::@11#7] -- register_copy + // [281] phi (byte) current_movedown_slow#37 = (byte) current_movedown_slow#14 [phi:play_move_down::@10->play_move_down::@11#8] -- register_copy + // [281] phi (byte) level#33 = (byte) level#10 [phi:play_move_down::@10->play_move_down::@11#9] -- register_copy + // [281] phi (word) lines_bcd#26 = (word) lines_bcd#19 [phi:play_move_down::@10->play_move_down::@11#10] -- register_copy + // [281] phi (byte) current_ypos#38 = (byte) current_ypos#3 [phi:play_move_down::@10->play_move_down::@11#11] -- register_copy jmp __b11 } // play_spawn_current @@ -23741,93 +23716,93 @@ play_spawn_current: { // Pick a random piece (0-6) .label piece_idx = 5 // current_piece_idx = next_piece_idx - // [288] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 -- vbuxx=vbuz1 + // [286] (byte) play_spawn_current::current_piece_idx#0 ← (byte) next_piece_idx#17 -- vbuxx=vbuz1 // Move next piece into current ldx.z next_piece_idx // current_piece = PIECES[current_piece_idx] - // [289] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 -- vbuz1=vbuxx_rol_1 + // [287] (byte~) play_spawn_current::$7 ← (byte) play_spawn_current::current_piece_idx#0 << (byte) 1 -- vbuz1=vbuxx_rol_1 txa asl sta.z __7 // current_piece_char = PIECES_CHARS[current_piece_idx] - // [290] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx + // [288] (byte) current_piece_char#5 ← *((const byte*) PIECES_CHARS + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_CHARS,x sta.z current_piece_char // current_xpos = PIECES_START_X[current_piece_idx] - // [291] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx + // [289] (byte) current_xpos#100 ← *((const byte*) PIECES_START_X + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_START_X,x sta.z current_xpos // current_ypos = PIECES_START_Y[current_piece_idx] - // [292] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx + // [290] (byte) current_ypos#6 ← *((const byte*) PIECES_START_Y + (byte) play_spawn_current::current_piece_idx#0) -- vbuz1=pbuc1_derefidx_vbuxx lda PIECES_START_Y,x sta.z current_ypos // play_collision(current_xpos,current_ypos,current_orientation) - // [293] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 -- vbuz1=vbuz2 + // [291] (byte) play_collision::xpos#4 ← (byte) current_xpos#100 -- vbuz1=vbuz2 lda.z current_xpos sta.z play_collision.xpos - // [294] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 -- vbuz1=vbuz2 + // [292] (byte) play_collision::ypos#4 ← (byte) current_ypos#6 -- vbuz1=vbuz2 lda.z current_ypos sta.z play_collision.ypos - // [295] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 + // [293] (byte*) current_piece#99 ← (byte*)*((const word*) PIECES + (byte~) play_spawn_current::$7) -- pbuz1=pptc1_derefidx_vbuz2 ldy.z __7 lda PIECES,y sta.z current_piece_1 lda PIECES+1,y sta.z current_piece_1+1 // play_collision(current_xpos,current_ypos,current_orientation) - // [296] call play_collision - // [202] phi from play_spawn_current to play_collision [phi:play_spawn_current->play_collision] - // [202] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#4 [phi:play_spawn_current->play_collision#0] -- register_copy - // [202] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#4 [phi:play_spawn_current->play_collision#1] -- register_copy - // [202] phi (byte) play_collision::orientation#5 = (byte) 0 [phi:play_spawn_current->play_collision#2] -- vbuxx=vbuc1 + // [294] call play_collision + // [200] phi from play_spawn_current to play_collision [phi:play_spawn_current->play_collision] + // [200] phi (byte) play_collision::xpos#6 = (byte) play_collision::xpos#4 [phi:play_spawn_current->play_collision#0] -- register_copy + // [200] phi (byte) play_collision::yp#0 = (byte) play_collision::ypos#4 [phi:play_spawn_current->play_collision#1] -- register_copy + // [200] phi (byte) play_collision::orientation#5 = (byte) 0 [phi:play_spawn_current->play_collision#2] -- vbuxx=vbuc1 ldx #0 - // [202] phi (byte*) current_piece#17 = (byte*) current_piece#99 [phi:play_spawn_current->play_collision#3] -- register_copy + // [200] phi (byte*) current_piece#17 = (byte*) current_piece#99 [phi:play_spawn_current->play_collision#3] -- register_copy jsr play_collision // play_collision(current_xpos,current_ypos,current_orientation) - // [297] (byte) play_collision::return#10 ← (byte) play_collision::return#15 + // [295] (byte) play_collision::return#10 ← (byte) play_collision::return#15 // play_spawn_current::@4 - // [298] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 + // [296] (byte~) play_spawn_current::$1 ← (byte) play_collision::return#10 // if(play_collision(current_xpos,current_ypos,current_orientation)==COLLISION_PLAYFIELD) - // [299] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 -- vbuaa_neq_vbuc1_then_la1 + // [297] if((byte~) play_spawn_current::$1!=(const byte) COLLISION_PLAYFIELD) goto play_spawn_current::@5 -- vbuaa_neq_vbuc1_then_la1 cmp #COLLISION_PLAYFIELD bne __b1 - // [301] phi from play_spawn_current::@4 to play_spawn_current::@1 [phi:play_spawn_current::@4->play_spawn_current::@1] - // [301] phi (byte) game_over#52 = (byte) 1 [phi:play_spawn_current::@4->play_spawn_current::@1#0] -- vbuz1=vbuc1 + // [299] phi from play_spawn_current::@4 to play_spawn_current::@1 [phi:play_spawn_current::@4->play_spawn_current::@1] + // [299] phi (byte) game_over#52 = (byte) 1 [phi:play_spawn_current::@4->play_spawn_current::@1#0] -- vbuz1=vbuc1 lda #1 sta.z game_over - // [300] phi from play_spawn_current::@4 to play_spawn_current::@5 [phi:play_spawn_current::@4->play_spawn_current::@5] + // [298] phi from play_spawn_current::@4 to play_spawn_current::@5 [phi:play_spawn_current::@4->play_spawn_current::@5] // play_spawn_current::@5 - // [301] phi from play_spawn_current::@5 to play_spawn_current::@1 [phi:play_spawn_current::@5->play_spawn_current::@1] - // [301] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy + // [299] phi from play_spawn_current::@5 to play_spawn_current::@1 [phi:play_spawn_current::@5->play_spawn_current::@1] + // [299] phi (byte) game_over#52 = (byte) game_over#65 [phi:play_spawn_current::@5->play_spawn_current::@1#0] -- register_copy // play_spawn_current::@1 __b1: - // [302] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 + // [300] phi from play_spawn_current::@1 to play_spawn_current::@2 [phi:play_spawn_current::@1->play_spawn_current::@2] + // [300] phi (byte) play_spawn_current::piece_idx#2 = (byte) 7 [phi:play_spawn_current::@1->play_spawn_current::@2#0] -- vbuz1=vbuc1 lda #7 sta.z piece_idx // play_spawn_current::@2 __b2: // while(piece_idx==7) - // [303] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 + // [301] if((byte) play_spawn_current::piece_idx#2==(byte) 7) goto play_spawn_current::sid_rnd1 -- vbuz1_eq_vbuc1_then_la1 lda #7 cmp.z piece_idx beq sid_rnd1 // play_spawn_current::@return // } - // [304] return + // [302] return rts // play_spawn_current::sid_rnd1 sid_rnd1: // return *SID_VOICE3_OSC; - // [305] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) -- vbuaa=_deref_pbuc1 + // [303] (byte) play_spawn_current::sid_rnd1_return#0 ← *((const byte*) SID_VOICE3_OSC) -- vbuaa=_deref_pbuc1 lda SID_VOICE3_OSC // play_spawn_current::@3 // piece_idx = sid_rnd()&7 - // [306] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 + // [304] (byte) play_spawn_current::piece_idx#1 ← (byte) play_spawn_current::sid_rnd1_return#0 & (byte) 7 -- vbuz1=vbuaa_band_vbuc1 and #7 sta.z piece_idx - // [302] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] - // [302] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy + // [300] phi from play_spawn_current::@3 to play_spawn_current::@2 [phi:play_spawn_current::@3->play_spawn_current::@2] + // [300] phi (byte) play_spawn_current::piece_idx#2 = (byte) play_spawn_current::piece_idx#1 [phi:play_spawn_current::@3->play_spawn_current::@2#0] -- register_copy jmp __b2 } // play_update_score @@ -23837,23 +23812,23 @@ play_update_score: { .label lines_before = $25 .label add_bcd = $26 // if(removed!=0) - // [307] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 + // [305] if((byte) play_update_score::removed#0==(byte) 0) goto play_update_score::@return -- vbuxx_eq_0_then_la1 cpx #0 beq __breturn // play_update_score::@1 // play_update_score::@2] + // [317] phi from play_update_score::@1 to play_update_score::@2 [phi:play_update_score::@1->play_update_score::@2] // play_update_score::@2 // play_increase_level() - // [320] call play_increase_level + // [318] call play_increase_level jsr play_increase_level - // [321] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] - // [321] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy - // [321] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy - // [321] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy - // [321] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy + // [319] phi from play_update_score play_update_score::@1 play_update_score::@2 to play_update_score::@return [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return] + // [319] phi (byte) level_bcd#19 = (byte) level_bcd#11 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#0] -- register_copy + // [319] phi (byte) current_movedown_slow#23 = (byte) current_movedown_slow#14 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#1] -- register_copy + // [319] phi (byte) level#19 = (byte) level#10 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#2] -- register_copy + // [319] phi (word) lines_bcd#17 = (word) lines_bcd#19 [phi:play_update_score/play_update_score::@1/play_update_score::@2->play_update_score::@return#3] -- register_copy // play_update_score::@return __breturn: // } - // [322] return + // [320] return rts } // play_increase_level // Increase the level play_increase_level: { // level++; - // [323] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 + // [321] (byte) level#21 ← ++ (byte) level#10 -- vbuz1=_inc_vbuz1 inc.z level // if(level>29) - // [324] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 + // [322] if((byte) level#21>=(byte) $1d+(byte) 1) goto play_increase_level::@1 -- vbuz1_ge_vbuc1_then_la1 // Update speed of moving tetrominos down lda.z level cmp #$1d+1 bcs b1 // play_increase_level::@3 // current_movedown_slow = MOVEDOWN_SLOW_SPEEDS[level] - // [325] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 + // [323] (byte) current_movedown_slow#10 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS + (byte) level#21) -- vbuz1=pbuc1_derefidx_vbuz2 tay lda MOVEDOWN_SLOW_SPEEDS,y sta.z current_movedown_slow - // [326] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] - // [326] phi (byte) current_movedown_slow#65 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy + // [324] phi from play_increase_level::@3 to play_increase_level::@1 [phi:play_increase_level::@3->play_increase_level::@1] + // [324] phi (byte) current_movedown_slow#65 = (byte) current_movedown_slow#10 [phi:play_increase_level::@3->play_increase_level::@1#0] -- register_copy jmp __b1 - // [326] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] + // [324] phi from play_increase_level to play_increase_level::@1 [phi:play_increase_level->play_increase_level::@1] b1: - // [326] phi (byte) current_movedown_slow#65 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 + // [324] phi (byte) current_movedown_slow#65 = (byte) 1 [phi:play_increase_level->play_increase_level::@1#0] -- vbuz1=vbuc1 lda #1 sta.z current_movedown_slow // play_increase_level::@1 __b1: // level_bcd++; - // [327] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 + // [325] (byte) level_bcd#21 ← ++ (byte) level_bcd#11 -- vbuz1=_inc_vbuz1 inc.z level_bcd // level_bcd&0xf - // [328] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 + // [326] (byte~) play_increase_level::$1 ← (byte) level_bcd#21 & (byte) $f -- vbuaa=vbuz1_band_vbuc1 lda #$f and.z level_bcd // if((level_bcd&0xf)==0xa) - // [329] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 + // [327] if((byte~) play_increase_level::$1!=(byte) $a) goto play_increase_level::@2 -- vbuaa_neq_vbuc1_then_la1 cmp #$a bne __b2 // play_increase_level::@4 // level_bcd += 6 - // [330] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 + // [328] (byte) level_bcd#8 ← (byte) level_bcd#21 + (byte) 6 -- vbuz1=vbuz1_plus_vbuc1 // If level low nybble hits 0xa change to 0x10 lax.z level_bcd axs #-[6] stx.z level_bcd - // [331] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] - // [331] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy + // [329] phi from play_increase_level::@1 play_increase_level::@4 to play_increase_level::@2 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2] + // [329] phi (byte) level_bcd#62 = (byte) level_bcd#21 [phi:play_increase_level::@1/play_increase_level::@4->play_increase_level::@2#0] -- register_copy // play_increase_level::@2 __b2: // asm // asm { sed } // Increase the score values gained sed - // [333] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] - // [333] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 + // [331] phi from play_increase_level::@2 to play_increase_level::@5 [phi:play_increase_level::@2->play_increase_level::@5] + // [331] phi (byte) play_increase_level::b#2 = (byte) 0 [phi:play_increase_level::@2->play_increase_level::@5#0] -- vbuxx=vbuc1 ldx #0 - // [333] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] - // [333] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy + // [331] phi from play_increase_level::@5 to play_increase_level::@5 [phi:play_increase_level::@5->play_increase_level::@5] + // [331] phi (byte) play_increase_level::b#2 = (byte) play_increase_level::b#1 [phi:play_increase_level::@5->play_increase_level::@5#0] -- register_copy // play_increase_level::@5 __b5: // score_add_bcd[b] += SCORE_BASE_BCD[b] - // [334] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [332] (byte~) play_increase_level::$5 ← (byte) play_increase_level::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [335] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa + // [333] *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) ← *((const dword*) score_add_bcd + (byte~) play_increase_level::$5) + *((const dword*) SCORE_BASE_BCD + (byte~) play_increase_level::$5) -- pduc1_derefidx_vbuaa=pduc1_derefidx_vbuaa_plus_pduc2_derefidx_vbuaa tay clc lda score_add_bcd,y @@ -24001,9 +23976,9 @@ play_increase_level: { adc SCORE_BASE_BCD+3,y sta score_add_bcd+3,y // for(char b: 0..4) - // [336] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx + // [334] (byte) play_increase_level::b#1 ← ++ (byte) play_increase_level::b#2 -- vbuxx=_inc_vbuxx inx - // [337] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 + // [335] if((byte) play_increase_level::b#1!=(byte) 5) goto play_increase_level::@5 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne __b5 // play_increase_level::@6 @@ -24012,7 +23987,7 @@ play_increase_level: { cld // play_increase_level::@return // } - // [339] return + // [337] return rts } // play_remove_lines @@ -24026,121 +24001,121 @@ play_remove_lines: { .label y = 7 .label removed = 8 .label full = $a - // [341] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] - // [341] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 + // [339] phi from play_remove_lines to play_remove_lines::@1 [phi:play_remove_lines->play_remove_lines::@1] + // [339] phi (byte) play_remove_lines::removed#11 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#0] -- vbuz1=vbuc1 lda #0 sta.z removed - // [341] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 + // [339] phi (byte) play_remove_lines::y#8 = (byte) 0 [phi:play_remove_lines->play_remove_lines::@1#1] -- vbuz1=vbuc1 sta.z y - // [341] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 + // [339] phi (byte) play_remove_lines::w#12 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#2] -- vbuxx=vbuc1 ldx #PLAYFIELD_LINES*PLAYFIELD_COLS-1 - // [341] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 + // [339] phi (byte) play_remove_lines::r#3 = (const byte) PLAYFIELD_LINES*(const byte) PLAYFIELD_COLS-(byte) 1 [phi:play_remove_lines->play_remove_lines::@1#3] -- vbuyy=vbuc1 ldy #PLAYFIELD_LINES*PLAYFIELD_COLS-1 // Read all lines and rewrite them - // [341] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] - // [341] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy - // [341] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy - // [341] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy - // [341] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy + // [339] phi from play_remove_lines::@6 to play_remove_lines::@1 [phi:play_remove_lines::@6->play_remove_lines::@1] + // [339] phi (byte) play_remove_lines::removed#11 = (byte) play_remove_lines::removed#8 [phi:play_remove_lines::@6->play_remove_lines::@1#0] -- register_copy + // [339] phi (byte) play_remove_lines::y#8 = (byte) play_remove_lines::y#1 [phi:play_remove_lines::@6->play_remove_lines::@1#1] -- register_copy + // [339] phi (byte) play_remove_lines::w#12 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6->play_remove_lines::@1#2] -- register_copy + // [339] phi (byte) play_remove_lines::r#3 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@6->play_remove_lines::@1#3] -- register_copy // play_remove_lines::@1 __b1: - // [342] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] - // [342] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 + // [340] phi from play_remove_lines::@1 to play_remove_lines::@2 [phi:play_remove_lines::@1->play_remove_lines::@2] + // [340] phi (byte) play_remove_lines::full#4 = (byte) 1 [phi:play_remove_lines::@1->play_remove_lines::@2#0] -- vbuz1=vbuc1 lda #1 sta.z full - // [342] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 + // [340] phi (byte) play_remove_lines::x#2 = (byte) 0 [phi:play_remove_lines::@1->play_remove_lines::@2#1] -- vbuz1=vbuc1 lda #0 sta.z x - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy - // [342] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] - // [342] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy - // [342] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy - // [342] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy - // [342] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy + // [340] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#12 [phi:play_remove_lines::@1->play_remove_lines::@2#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#3 [phi:play_remove_lines::@1->play_remove_lines::@2#3] -- register_copy + // [340] phi from play_remove_lines::@3 to play_remove_lines::@2 [phi:play_remove_lines::@3->play_remove_lines::@2] + // [340] phi (byte) play_remove_lines::full#4 = (byte) play_remove_lines::full#2 [phi:play_remove_lines::@3->play_remove_lines::@2#0] -- register_copy + // [340] phi (byte) play_remove_lines::x#2 = (byte) play_remove_lines::x#1 [phi:play_remove_lines::@3->play_remove_lines::@2#1] -- register_copy + // [340] phi (byte) play_remove_lines::w#4 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@3->play_remove_lines::@2#2] -- register_copy + // [340] phi (byte) play_remove_lines::r#2 = (byte) play_remove_lines::r#1 [phi:play_remove_lines::@3->play_remove_lines::@2#3] -- register_copy // play_remove_lines::@2 __b2: // c = playfield[r--] - // [343] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy + // [341] (byte) play_remove_lines::c#0 ← *((const byte*) playfield + (byte) play_remove_lines::r#2) -- vbuz1=pbuc1_derefidx_vbuyy lda playfield,y sta.z c - // [344] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy + // [342] (byte) play_remove_lines::r#1 ← -- (byte) play_remove_lines::r#2 -- vbuyy=_dec_vbuyy dey // if(c==0) - // [345] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 + // [343] if((byte) play_remove_lines::c#0!=(byte) 0) goto play_remove_lines::@9 -- vbuz1_neq_0_then_la1 cmp #0 bne __b3 - // [347] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] - // [347] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 + // [345] phi from play_remove_lines::@2 to play_remove_lines::@3 [phi:play_remove_lines::@2->play_remove_lines::@3] + // [345] phi (byte) play_remove_lines::full#2 = (byte) 0 [phi:play_remove_lines::@2->play_remove_lines::@3#0] -- vbuz1=vbuc1 lda #0 sta.z full - // [346] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] + // [344] phi from play_remove_lines::@2 to play_remove_lines::@9 [phi:play_remove_lines::@2->play_remove_lines::@9] // play_remove_lines::@9 - // [347] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] - // [347] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy + // [345] phi from play_remove_lines::@9 to play_remove_lines::@3 [phi:play_remove_lines::@9->play_remove_lines::@3] + // [345] phi (byte) play_remove_lines::full#2 = (byte) play_remove_lines::full#4 [phi:play_remove_lines::@9->play_remove_lines::@3#0] -- register_copy // play_remove_lines::@3 __b3: // playfield[w--] = c - // [348] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 + // [346] *((const byte*) playfield + (byte) play_remove_lines::w#4) ← (byte) play_remove_lines::c#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z c sta playfield,x // playfield[w--] = c; - // [349] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx + // [347] (byte) play_remove_lines::w#1 ← -- (byte) play_remove_lines::w#4 -- vbuxx=_dec_vbuxx dex // for(char x:0..PLAYFIELD_COLS-1) - // [350] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 + // [348] (byte) play_remove_lines::x#1 ← ++ (byte) play_remove_lines::x#2 -- vbuz1=_inc_vbuz1 inc.z x - // [351] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 + // [349] if((byte) play_remove_lines::x#1!=(const byte) PLAYFIELD_COLS-(byte) 1+(byte) 1) goto play_remove_lines::@2 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_COLS-1+1 cmp.z x bne __b2 // play_remove_lines::@4 // if(full==1) - // [352] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 + // [350] if((byte) play_remove_lines::full#2!=(byte) 1) goto play_remove_lines::@6 -- vbuz1_neq_vbuc1_then_la1 lda #1 cmp.z full bne __b6 // play_remove_lines::@5 // w = w + PLAYFIELD_COLS - // [353] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS -- vbuxx=vbuxx_plus_vbuc1 + // [351] (byte) play_remove_lines::w#2 ← (byte) play_remove_lines::w#1 + (const byte) PLAYFIELD_COLS -- vbuxx=vbuxx_plus_vbuc1 txa axs #-[PLAYFIELD_COLS] // removed++; - // [354] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 + // [352] (byte) play_remove_lines::removed#1 ← ++ (byte) play_remove_lines::removed#11 -- vbuz1=_inc_vbuz1 inc.z removed - // [355] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] - // [355] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy - // [355] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy + // [353] phi from play_remove_lines::@4 play_remove_lines::@5 to play_remove_lines::@6 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6] + // [353] phi (byte) play_remove_lines::removed#8 = (byte) play_remove_lines::removed#11 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#0] -- register_copy + // [353] phi (byte) play_remove_lines::w#11 = (byte) play_remove_lines::w#1 [phi:play_remove_lines::@4/play_remove_lines::@5->play_remove_lines::@6#1] -- register_copy // play_remove_lines::@6 __b6: // for(char y:0..PLAYFIELD_LINES-1) - // [356] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 + // [354] (byte) play_remove_lines::y#1 ← ++ (byte) play_remove_lines::y#8 -- vbuz1=_inc_vbuz1 inc.z y - // [357] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 + // [355] if((byte) play_remove_lines::y#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_remove_lines::@1 -- vbuz1_neq_vbuc1_then_la1 lda #PLAYFIELD_LINES-1+1 cmp.z y bne __b1 - // [358] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] + // [356] phi from play_remove_lines::@6 play_remove_lines::@8 to play_remove_lines::@7 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7] b1: - // [358] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy + // [356] phi (byte) play_remove_lines::w#6 = (byte) play_remove_lines::w#11 [phi:play_remove_lines::@6/play_remove_lines::@8->play_remove_lines::@7#0] -- register_copy // Write zeros in the rest of the lines // play_remove_lines::@7 // while(w!=0xff) - // [359] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 + // [357] if((byte) play_remove_lines::w#6!=(byte) $ff) goto play_remove_lines::@8 -- vbuxx_neq_vbuc1_then_la1 cpx #$ff bne __b8 // play_remove_lines::@return // } - // [360] return + // [358] return rts // play_remove_lines::@8 __b8: // playfield[w--] = 0 - // [361] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + // [359] *((const byte*) playfield + (byte) play_remove_lines::w#6) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta playfield,x // playfield[w--] = 0; - // [362] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx + // [360] (byte) play_remove_lines::w#3 ← -- (byte) play_remove_lines::w#6 -- vbuxx=_dec_vbuxx dex jmp b1 } @@ -24154,98 +24129,98 @@ play_lock_current: { .label l = $b .label i_1 = $c // yp = current_ypos - // [363] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 - // [364] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] - // [364] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 + // [361] (byte) play_lock_current::yp#0 ← (byte) current_ypos#11 + // [362] phi from play_lock_current to play_lock_current::@1 [phi:play_lock_current->play_lock_current::@1] + // [362] phi (byte) play_lock_current::l#6 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#0] -- vbuz1=vbuc1 lda #0 sta.z l - // [364] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 + // [362] phi (byte) play_lock_current::i#3 = (byte) 0 [phi:play_lock_current->play_lock_current::@1#1] -- vbuz1=vbuc1 sta.z i_1 - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy + // [362] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#0 [phi:play_lock_current->play_lock_current::@1#2] -- register_copy // play_lock_current::@1 __b1: // playfield_line = playfield_lines[yp] - // [365] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + // [363] (byte~) play_lock_current::$4 ← (byte) play_lock_current::yp#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda.z yp asl - // [366] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa + // [364] (byte*) play_lock_current::playfield_line#0 ← *((const byte**) playfield_lines + (byte~) play_lock_current::$4) -- pbuz1=pptc1_derefidx_vbuaa tay lda playfield_lines,y sta.z playfield_line lda playfield_lines+1,y sta.z playfield_line+1 // xp = current_xpos - // [367] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 + // [365] (byte) play_lock_current::xp#0 ← (byte) current_xpos#14 -- vbuz1=vbuz2 lda.z current_xpos sta.z xp - // [368] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] - // [368] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 + // [366] phi from play_lock_current::@1 to play_lock_current::@2 [phi:play_lock_current::@1->play_lock_current::@2] + // [366] phi (byte) play_lock_current::c#2 = (byte) 0 [phi:play_lock_current::@1->play_lock_current::@2#0] -- vbuxx=vbuc1 ldx #0 - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy + // [366] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#0 [phi:play_lock_current::@1->play_lock_current::@2#1] -- register_copy + // [366] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#3 [phi:play_lock_current::@1->play_lock_current::@2#2] -- register_copy // play_lock_current::@2 __b2: // if(current_piece_gfx[i++]!=0) - // [369] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 + // [367] (byte) play_lock_current::i#1 ← ++ (byte) play_lock_current::i#2 -- vbuz1=_inc_vbuz2 ldy.z i_1 iny sty.z i - // [370] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 + // [368] if(*((byte*) current_piece_gfx#13 + (byte) play_lock_current::i#2)==(byte) 0) goto play_lock_current::@3 -- pbuz1_derefidx_vbuz2_eq_0_then_la1 ldy.z i_1 lda (current_piece_gfx),y cmp #0 beq __b3 // play_lock_current::@4 // playfield_line[xp] = current_piece_char - // [371] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 + // [369] *((byte*) play_lock_current::playfield_line#0 + (byte) play_lock_current::xp#2) ← (byte) current_piece_char#10 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z current_piece_char ldy.z xp sta (playfield_line),y // play_lock_current::@3 __b3: // xp++; - // [372] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 + // [370] (byte) play_lock_current::xp#1 ← ++ (byte) play_lock_current::xp#2 -- vbuz1=_inc_vbuz1 inc.z xp // for(char c:0..3) - // [373] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx + // [371] (byte) play_lock_current::c#1 ← ++ (byte) play_lock_current::c#2 -- vbuxx=_inc_vbuxx inx - // [374] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 + // [372] if((byte) play_lock_current::c#1!=(byte) 4) goto play_lock_current::@7 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b7 // play_lock_current::@5 // yp++; - // [375] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 + // [373] (byte) play_lock_current::yp#1 ← ++ (byte) play_lock_current::yp#2 -- vbuz1=_inc_vbuz1 inc.z yp // for(char l:0..3) - // [376] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 + // [374] (byte) play_lock_current::l#1 ← ++ (byte) play_lock_current::l#6 -- vbuz1=_inc_vbuz1 inc.z l - // [377] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 + // [375] if((byte) play_lock_current::l#1!=(byte) 4) goto play_lock_current::@6 -- vbuz1_neq_vbuc1_then_la1 lda #4 cmp.z l bne __b6 // play_lock_current::@return // } - // [378] return + // [376] return rts // play_lock_current::@6 __b6: - // [379] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [377] (byte) play_lock_current::i#7 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [364] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] - // [364] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy - // [364] phi (byte) play_lock_current::i#3 = (byte) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy - // [364] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy + // [362] phi from play_lock_current::@6 to play_lock_current::@1 [phi:play_lock_current::@6->play_lock_current::@1] + // [362] phi (byte) play_lock_current::l#6 = (byte) play_lock_current::l#1 [phi:play_lock_current::@6->play_lock_current::@1#0] -- register_copy + // [362] phi (byte) play_lock_current::i#3 = (byte) play_lock_current::i#7 [phi:play_lock_current::@6->play_lock_current::@1#1] -- register_copy + // [362] phi (byte) play_lock_current::yp#2 = (byte) play_lock_current::yp#1 [phi:play_lock_current::@6->play_lock_current::@1#2] -- register_copy jmp __b1 // play_lock_current::@7 __b7: - // [380] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 + // [378] (byte) play_lock_current::i#9 ← (byte) play_lock_current::i#1 -- vbuz1=vbuz2 lda.z i sta.z i_1 - // [368] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] - // [368] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy - // [368] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy - // [368] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy + // [366] phi from play_lock_current::@7 to play_lock_current::@2 [phi:play_lock_current::@7->play_lock_current::@2] + // [366] phi (byte) play_lock_current::c#2 = (byte) play_lock_current::c#1 [phi:play_lock_current::@7->play_lock_current::@2#0] -- register_copy + // [366] phi (byte) play_lock_current::xp#2 = (byte) play_lock_current::xp#1 [phi:play_lock_current::@7->play_lock_current::@2#1] -- register_copy + // [366] phi (byte) play_lock_current::i#2 = (byte) play_lock_current::i#9 [phi:play_lock_current::@7->play_lock_current::@2#2] -- register_copy jmp __b2 } // keyboard_event_pressed @@ -24256,28 +24231,28 @@ keyboard_event_pressed: { .label row_bits = $2d .label keycode = $d // keycode>>3 - // [382] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 + // [380] (byte~) keyboard_event_pressed::$0 ← (byte) keyboard_event_pressed::keycode#5 >> (byte) 3 -- vbuaa=vbuz1_ror_3 lda.z keycode lsr lsr lsr // row_bits = keyboard_scan_values[keycode>>3] - // [383] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa + // [381] (byte) keyboard_event_pressed::row_bits#0 ← *((const byte*) keyboard_scan_values + (byte~) keyboard_event_pressed::$0) -- vbuz1=pbuc1_derefidx_vbuaa tay lda keyboard_scan_values,y sta.z row_bits // keycode&7 - // [384] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 + // [382] (byte~) keyboard_event_pressed::$1 ← (byte) keyboard_event_pressed::keycode#5 & (byte) 7 -- vbuaa=vbuz1_band_vbuc1 lda #7 and.z keycode // row_bits & keyboard_matrix_col_bitmask[keycode&7] - // [385] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa + // [383] (byte) keyboard_event_pressed::return#11 ← (byte) keyboard_event_pressed::row_bits#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte~) keyboard_event_pressed::$1) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuaa tay lda keyboard_matrix_col_bitmask,y and.z row_bits // keyboard_event_pressed::@return // } - // [386] return + // [384] return rts } // keyboard_event_get @@ -24286,29 +24261,29 @@ keyboard_event_pressed: { // The buffer is filled by keyboard_event_scan() keyboard_event_get: { // if(keyboard_events_size==0) - // [387] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 + // [385] if((byte) keyboard_events_size#13==(byte) 0) goto keyboard_event_get::@return -- vbuz1_eq_0_then_la1 lda.z keyboard_events_size cmp #0 beq b1 // keyboard_event_get::@1 // return keyboard_events[--keyboard_events_size]; - // [388] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 + // [386] (byte) keyboard_events_size#4 ← -- (byte) keyboard_events_size#13 -- vbuz1=_dec_vbuz1 dec.z keyboard_events_size - // [389] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 + // [387] (byte) keyboard_event_get::return#1 ← *((const byte*) keyboard_events + (byte) keyboard_events_size#4) -- vbuxx=pbuc1_derefidx_vbuz1 ldy.z keyboard_events_size ldx keyboard_events,y - // [390] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy + // [388] phi from keyboard_event_get::@1 to keyboard_event_get::@return [phi:keyboard_event_get::@1->keyboard_event_get::@return] + // [388] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#4 [phi:keyboard_event_get::@1->keyboard_event_get::@return#0] -- register_copy + // [388] phi (byte) keyboard_event_get::return#2 = (byte) keyboard_event_get::return#1 [phi:keyboard_event_get::@1->keyboard_event_get::@return#1] -- register_copy rts - // [390] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] + // [388] phi from keyboard_event_get to keyboard_event_get::@return [phi:keyboard_event_get->keyboard_event_get::@return] b1: - // [390] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy - // [390] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 + // [388] phi (byte) keyboard_events_size#16 = (byte) keyboard_events_size#13 [phi:keyboard_event_get->keyboard_event_get::@return#0] -- register_copy + // [388] phi (byte) keyboard_event_get::return#2 = (byte) $ff [phi:keyboard_event_get->keyboard_event_get::@return#1] -- vbuxx=vbuc1 ldx #$ff // keyboard_event_get::@return // } - // [391] return + // [389] return rts } // keyboard_event_scan @@ -24320,194 +24295,194 @@ keyboard_event_scan: { .label row_scan = $2e .label keycode = $20 .label row = $1f - // [393] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 + // [391] phi from keyboard_event_scan to keyboard_event_scan::@7 [phi:keyboard_event_scan->keyboard_event_scan::@7] + // [391] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#19 [phi:keyboard_event_scan->keyboard_event_scan::@7#0] -- register_copy + // [391] phi (byte) keyboard_event_scan::keycode#11 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#1] -- vbuz1=vbuc1 lda #0 sta.z keycode - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 + // [391] phi (byte) keyboard_event_scan::row#2 = (byte) 0 [phi:keyboard_event_scan->keyboard_event_scan::@7#2] -- vbuz1=vbuc1 sta.z row - // [393] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] - // [393] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy - // [393] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy - // [393] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy + // [391] phi from keyboard_event_scan::@8 to keyboard_event_scan::@7 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7] + // [391] phi (byte) keyboard_events_size#30 = (byte) keyboard_events_size#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#0] -- register_copy + // [391] phi (byte) keyboard_event_scan::keycode#11 = (byte) keyboard_event_scan::keycode#13 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#1] -- register_copy + // [391] phi (byte) keyboard_event_scan::row#2 = (byte) keyboard_event_scan::row#1 [phi:keyboard_event_scan::@8->keyboard_event_scan::@7#2] -- register_copy // keyboard_event_scan::@7 __b7: // keyboard_matrix_read(row) - // [394] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 + // [392] (byte) keyboard_matrix_read::rowid#0 ← (byte) keyboard_event_scan::row#2 -- vbuxx=vbuz1 ldx.z row - // [395] call keyboard_matrix_read + // [393] call keyboard_matrix_read jsr keyboard_matrix_read - // [396] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 + // [394] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0 // keyboard_event_scan::@19 // row_scan = keyboard_matrix_read(row) - // [397] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa + // [395] (byte) keyboard_event_scan::row_scan#0 ← (byte) keyboard_matrix_read::return#2 -- vbuz1=vbuaa sta.z row_scan // if(row_scan!=keyboard_scan_values[row]) - // [398] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 + // [396] if((byte) keyboard_event_scan::row_scan#0!=*((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2)) goto keyboard_event_scan::@9 -- vbuz1_neq_pbuc1_derefidx_vbuz2_then_la1 ldy.z row cmp keyboard_scan_values,y bne b2 // keyboard_event_scan::@16 // keycode = keycode + 8 - // [399] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 + // [397] (byte) keyboard_event_scan::keycode#1 ← (byte) keyboard_event_scan::keycode#11 + (byte) 8 -- vbuz1=vbuz1_plus_vbuc1 lax.z keycode axs #-[8] stx.z keycode - // [400] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] - // [400] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy - // [400] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy + // [398] phi from keyboard_event_scan::@15 keyboard_event_scan::@16 to keyboard_event_scan::@8 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8] + // [398] phi (byte) keyboard_events_size#13 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#0] -- register_copy + // [398] phi (byte) keyboard_event_scan::keycode#13 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@15/keyboard_event_scan::@16->keyboard_event_scan::@8#1] -- register_copy // keyboard_event_scan::@8 __b8: // for(byte row : 0..7) - // [401] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 + // [399] (byte) keyboard_event_scan::row#1 ← ++ (byte) keyboard_event_scan::row#2 -- vbuz1=_inc_vbuz1 inc.z row - // [402] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 + // [400] if((byte) keyboard_event_scan::row#1!=(byte) 8) goto keyboard_event_scan::@7 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp.z row bne __b7 - // [403] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] + // [401] phi from keyboard_event_scan::@8 to keyboard_event_scan::@17 [phi:keyboard_event_scan::@8->keyboard_event_scan::@17] // keyboard_event_scan::@17 // keyboard_event_pressed(KEY_LSHIFT) - // [404] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [402] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@17 to keyboard_event_pressed [phi:keyboard_event_scan::@17->keyboard_event_pressed] + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_LSHIFT [phi:keyboard_event_scan::@17->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_LSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_LSHIFT) - // [405] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 + // [403] (byte) keyboard_event_pressed::return#0 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@20 - // [406] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 + // [404] (byte~) keyboard_event_scan::$0 ← (byte) keyboard_event_pressed::return#0 // if(keyboard_event_pressed(KEY_LSHIFT)!= 0) - // [407] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 + // [405] if((byte~) keyboard_event_scan::$0==(byte) 0) goto keyboard_event_scan::@1 -- vbuaa_eq_0_then_la1 cmp #0 - // [408] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] + // [406] phi from keyboard_event_scan::@20 to keyboard_event_scan::@18 [phi:keyboard_event_scan::@20->keyboard_event_scan::@18] // keyboard_event_scan::@18 - // [409] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] + // [407] phi from keyboard_event_scan::@18 keyboard_event_scan::@20 to keyboard_event_scan::@1 [phi:keyboard_event_scan::@18/keyboard_event_scan::@20->keyboard_event_scan::@1] // keyboard_event_scan::@1 // keyboard_event_pressed(KEY_RSHIFT) - // [410] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [408] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@1 to keyboard_event_pressed [phi:keyboard_event_scan::@1->keyboard_event_pressed] + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_RSHIFT [phi:keyboard_event_scan::@1->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_RSHIFT sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_RSHIFT) - // [411] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 + // [409] (byte) keyboard_event_pressed::return#1 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@21 - // [412] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 + // [410] (byte~) keyboard_event_scan::$3 ← (byte) keyboard_event_pressed::return#1 // if(keyboard_event_pressed(KEY_RSHIFT)!= 0) - // [413] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 + // [411] if((byte~) keyboard_event_scan::$3==(byte) 0) goto keyboard_event_scan::@2 -- vbuaa_eq_0_then_la1 cmp #0 - // [414] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] + // [412] phi from keyboard_event_scan::@21 to keyboard_event_scan::@4 [phi:keyboard_event_scan::@21->keyboard_event_scan::@4] // keyboard_event_scan::@4 - // [415] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] + // [413] phi from keyboard_event_scan::@21 keyboard_event_scan::@4 to keyboard_event_scan::@2 [phi:keyboard_event_scan::@21/keyboard_event_scan::@4->keyboard_event_scan::@2] // keyboard_event_scan::@2 // keyboard_event_pressed(KEY_CTRL) - // [416] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [414] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@2 to keyboard_event_pressed [phi:keyboard_event_scan::@2->keyboard_event_pressed] + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_CTRL [phi:keyboard_event_scan::@2->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_CTRL sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_CTRL) - // [417] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 + // [415] (byte) keyboard_event_pressed::return#2 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@22 - // [418] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 + // [416] (byte~) keyboard_event_scan::$6 ← (byte) keyboard_event_pressed::return#2 // if(keyboard_event_pressed(KEY_CTRL)!= 0) - // [419] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 + // [417] if((byte~) keyboard_event_scan::$6==(byte) 0) goto keyboard_event_scan::@3 -- vbuaa_eq_0_then_la1 cmp #0 - // [420] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] + // [418] phi from keyboard_event_scan::@22 to keyboard_event_scan::@5 [phi:keyboard_event_scan::@22->keyboard_event_scan::@5] // keyboard_event_scan::@5 - // [421] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] + // [419] phi from keyboard_event_scan::@22 keyboard_event_scan::@5 to keyboard_event_scan::@3 [phi:keyboard_event_scan::@22/keyboard_event_scan::@5->keyboard_event_scan::@3] // keyboard_event_scan::@3 // keyboard_event_pressed(KEY_COMMODORE) - // [422] call keyboard_event_pressed - // [381] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] - // [381] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 + // [420] call keyboard_event_pressed + // [379] phi from keyboard_event_scan::@3 to keyboard_event_pressed [phi:keyboard_event_scan::@3->keyboard_event_pressed] + // [379] phi (byte) keyboard_event_pressed::keycode#5 = (const byte) KEY_COMMODORE [phi:keyboard_event_scan::@3->keyboard_event_pressed#0] -- vbuz1=vbuc1 lda #KEY_COMMODORE sta.z keyboard_event_pressed.keycode jsr keyboard_event_pressed // keyboard_event_pressed(KEY_COMMODORE) - // [423] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 + // [421] (byte) keyboard_event_pressed::return#10 ← (byte) keyboard_event_pressed::return#11 // keyboard_event_scan::@23 - // [424] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 + // [422] (byte~) keyboard_event_scan::$9 ← (byte) keyboard_event_pressed::return#10 // if(keyboard_event_pressed(KEY_COMMODORE)!= 0) - // [425] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 + // [423] if((byte~) keyboard_event_scan::$9==(byte) 0) goto keyboard_event_scan::@return -- vbuaa_eq_0_then_la1 cmp #0 - // [426] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] + // [424] phi from keyboard_event_scan::@23 to keyboard_event_scan::@6 [phi:keyboard_event_scan::@23->keyboard_event_scan::@6] // keyboard_event_scan::@6 // keyboard_event_scan::@return // } - // [427] return + // [425] return rts // Something has changed on the keyboard row - check each column - // [428] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy - // [428] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] + // [426] phi from keyboard_event_scan::@10 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9] + // [426] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#29 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#0] -- register_copy + // [426] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#14 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#1] -- register_copy + // [426] phi (byte) keyboard_event_scan::col#2 = (byte) keyboard_event_scan::col#1 [phi:keyboard_event_scan::@10->keyboard_event_scan::@9#2] -- register_copy + // [426] phi from keyboard_event_scan::@19 to keyboard_event_scan::@9 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9] b2: - // [428] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy - // [428] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy - // [428] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 + // [426] phi (byte) keyboard_events_size#10 = (byte) keyboard_events_size#30 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#0] -- register_copy + // [426] phi (byte) keyboard_event_scan::keycode#10 = (byte) keyboard_event_scan::keycode#11 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#1] -- register_copy + // [426] phi (byte) keyboard_event_scan::col#2 = (byte) 0 [phi:keyboard_event_scan::@19->keyboard_event_scan::@9#2] -- vbuxx=vbuc1 ldx #0 // keyboard_event_scan::@9 __b9: // row_scan^keyboard_scan_values[row] - // [429] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 + // [427] (byte~) keyboard_event_scan::$15 ← (byte) keyboard_event_scan::row_scan#0 ^ *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) -- vbuaa=vbuz1_bxor_pbuc1_derefidx_vbuz2 lda.z row_scan ldy.z row eor keyboard_scan_values,y // (row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col] - // [430] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx + // [428] (byte~) keyboard_event_scan::$16 ← (byte~) keyboard_event_scan::$15 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuaa_band_pbuc1_derefidx_vbuxx and keyboard_matrix_col_bitmask,x // if(((row_scan^keyboard_scan_values[row])&keyboard_matrix_col_bitmask[col])!=0) - // [431] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 + // [429] if((byte~) keyboard_event_scan::$16==(byte) 0) goto keyboard_event_scan::@10 -- vbuaa_eq_0_then_la1 cmp #0 beq __b10 // keyboard_event_scan::@12 // if(keyboard_events_size!=8) - // [432] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 + // [430] if((byte) keyboard_events_size#10==(byte) 8) goto keyboard_event_scan::@10 -- vbuz1_eq_vbuc1_then_la1 lda #8 cmp.z keyboard_events_size beq __b10 // keyboard_event_scan::@13 // event_type = row_scan&keyboard_matrix_col_bitmask[col] - // [433] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx + // [431] (byte) keyboard_event_scan::event_type#0 ← (byte) keyboard_event_scan::row_scan#0 & *((const byte*) keyboard_matrix_col_bitmask + (byte) keyboard_event_scan::col#2) -- vbuaa=vbuz1_band_pbuc1_derefidx_vbuxx lda keyboard_matrix_col_bitmask,x and.z row_scan // if(event_type==0) - // [434] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 + // [432] if((byte) keyboard_event_scan::event_type#0==(byte) 0) goto keyboard_event_scan::@11 -- vbuaa_eq_0_then_la1 cmp #0 beq __b11 // keyboard_event_scan::@14 // keyboard_events[keyboard_events_size++] = keycode - // [435] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 + // [433] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte) keyboard_event_scan::keycode#10 -- pbuc1_derefidx_vbuz1=vbuz2 // Key pressed lda.z keycode ldy.z keyboard_events_size sta keyboard_events,y // keyboard_events[keyboard_events_size++] = keycode; - // [436] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [434] (byte) keyboard_events_size#2 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc.z keyboard_events_size - // [437] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] - // [437] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy + // [435] phi from keyboard_event_scan::@11 keyboard_event_scan::@12 keyboard_event_scan::@14 keyboard_event_scan::@9 to keyboard_event_scan::@10 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10] + // [435] phi (byte) keyboard_events_size#29 = (byte) keyboard_events_size#1 [phi:keyboard_event_scan::@11/keyboard_event_scan::@12/keyboard_event_scan::@14/keyboard_event_scan::@9->keyboard_event_scan::@10#0] -- register_copy // keyboard_event_scan::@10 __b10: // keycode++; - // [438] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 + // [436] (byte) keyboard_event_scan::keycode#14 ← ++ (byte) keyboard_event_scan::keycode#10 -- vbuz1=_inc_vbuz1 inc.z keycode // for(byte col : 0..7) - // [439] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx + // [437] (byte) keyboard_event_scan::col#1 ← ++ (byte) keyboard_event_scan::col#2 -- vbuxx=_inc_vbuxx inx - // [440] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 + // [438] if((byte) keyboard_event_scan::col#1!=(byte) 8) goto keyboard_event_scan::@9 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne __b9 // keyboard_event_scan::@15 // keyboard_scan_values[row] = row_scan - // [441] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 + // [439] *((const byte*) keyboard_scan_values + (byte) keyboard_event_scan::row#2) ← (byte) keyboard_event_scan::row_scan#0 -- pbuc1_derefidx_vbuz1=vbuz2 // Store the current keyboard status for the row to debounce lda.z row_scan ldy.z row @@ -24516,16 +24491,16 @@ keyboard_event_scan: { // keyboard_event_scan::@11 __b11: // keycode|$40 - // [442] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 + // [440] (byte~) keyboard_event_scan::$23 ← (byte) keyboard_event_scan::keycode#10 | (byte) $40 -- vbuaa=vbuz1_bor_vbuc1 lda #$40 ora.z keycode // keyboard_events[keyboard_events_size++] = keycode|$40 - // [443] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa + // [441] *((const byte*) keyboard_events + (byte) keyboard_events_size#10) ← (byte~) keyboard_event_scan::$23 -- pbuc1_derefidx_vbuz1=vbuaa // Key released ldy.z keyboard_events_size sta keyboard_events,y // keyboard_events[keyboard_events_size++] = keycode|$40; - // [444] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 + // [442] (byte) keyboard_events_size#1 ← ++ (byte) keyboard_events_size#10 -- vbuz1=_inc_vbuz1 inc.z keyboard_events_size jmp __b10 } @@ -24538,16 +24513,16 @@ keyboard_event_scan: { // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] - // [445] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx + // [443] *((const byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A // ~*CIA1_PORT_B - // [446] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 + // [444] (byte) keyboard_matrix_read::return#0 ← ~ *((const byte*) CIA1_PORT_B) -- vbuaa=_bnot__deref_pbuc1 lda CIA1_PORT_B eor #$ff // keyboard_matrix_read::@return // } - // [447] return + // [445] return rts } // render_show @@ -24556,42 +24531,42 @@ render_show: { .const toD0181_return = (>(PLAYFIELD_SCREEN_1&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f .const toD0182_return = (>(PLAYFIELD_SCREEN_2&$3fff)*4)|(>PLAYFIELD_CHARSET)/4&$f // if(render_screen_show==0) - // [448] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 + // [446] if((byte) render_screen_show#16==(byte) 0) goto render_show::toD0181 -- vbuz1_eq_0_then_la1 lda.z render_screen_show cmp #0 beq toD0181 - // [449] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] + // [447] phi from render_show to render_show::toD0182 [phi:render_show->render_show::toD0182] // render_show::toD0182 - // [450] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 + // [448] phi from render_show::toD0182 to render_show::@1 [phi:render_show::toD0182->render_show::@1] + // [448] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0182_return#0 [phi:render_show::toD0182->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0182_return // render_show::@1 __b1: // *D018 = d018val - // [451] *((const byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa + // [449] *((const byte*) D018) ← (byte) render_show::d018val#3 -- _deref_pbuc1=vbuaa sta D018 // *BGCOL2 = PIECES_COLORS_1[level] - // [452] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [450] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 ldy.z level lda PIECES_COLORS_1,y sta BGCOL2 // *BGCOL3 = PIECES_COLORS_2[level] - // [453] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 + // [451] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2 + (byte) level#10) -- _deref_pbuc1=pbuc2_derefidx_vbuz1 lda PIECES_COLORS_2,y sta BGCOL3 // render_screen_showing = render_screen_show - // [454] (byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 + // [452] (byte) render_screen_showing ← (byte) render_screen_show#16 -- vbuz1=vbuz2 lda.z render_screen_show sta.z render_screen_showing // render_show::@return // } - // [455] return + // [453] return rts - // [456] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] + // [454] phi from render_show to render_show::toD0181 [phi:render_show->render_show::toD0181] // render_show::toD0181 toD0181: - // [450] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] - // [450] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 + // [448] phi from render_show::toD0181 to render_show::@1 [phi:render_show::toD0181->render_show::@1] + // [448] phi (byte) render_show::d018val#3 = (const byte) render_show::toD0181_return#0 [phi:render_show::toD0181->render_show::@1#0] -- vbuaa=vbuc1 lda #toD0181_return jmp __b1 } @@ -24601,39 +24576,39 @@ play_init: { .label pli = $21 // Initialize the playfield line pointers; .label idx = $f - // [458] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] - // [458] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 + // [456] phi from play_init to play_init::@1 [phi:play_init->play_init::@1] + // [456] phi (byte) play_init::idx#2 = (byte) 0 [phi:play_init->play_init::@1#0] -- vbuz1=vbuc1 lda #0 sta.z idx - // [458] phi (byte*) play_init::pli#2 = (const byte*) playfield [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 + // [456] phi (byte*) play_init::pli#2 = (const byte*) playfield [phi:play_init->play_init::@1#1] -- pbuz1=pbuc1 lda #playfield sta.z pli+1 - // [458] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 + // [456] phi (byte) play_init::j#2 = (byte) 0 [phi:play_init->play_init::@1#2] -- vbuyy=vbuc1 ldy #0 - // [458] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] - // [458] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy - // [458] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy - // [458] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy + // [456] phi from play_init::@1 to play_init::@1 [phi:play_init::@1->play_init::@1] + // [456] phi (byte) play_init::idx#2 = (byte) play_init::idx#1 [phi:play_init::@1->play_init::@1#0] -- register_copy + // [456] phi (byte*) play_init::pli#2 = (byte*) play_init::pli#1 [phi:play_init::@1->play_init::@1#1] -- register_copy + // [456] phi (byte) play_init::j#2 = (byte) play_init::j#1 [phi:play_init::@1->play_init::@1#2] -- register_copy // play_init::@1 __b1: // playfield_lines[j] = pli - // [459] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [457] (byte~) play_init::$2 ← (byte) play_init::j#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [460] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [458] *((const byte**) playfield_lines + (byte~) play_init::$2) ← (byte*) play_init::pli#2 -- pptc1_derefidx_vbuxx=pbuz1 lda.z pli sta playfield_lines,x lda.z pli+1 sta playfield_lines+1,x // playfield_lines_idx[j] = idx - // [461] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 + // [459] *((const byte*) playfield_lines_idx + (byte) play_init::j#2) ← (byte) play_init::idx#2 -- pbuc1_derefidx_vbuyy=vbuz1 lda.z idx sta playfield_lines_idx,y // pli += PLAYFIELD_COLS - // [462] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS -- pbuz1=pbuz1_plus_vbuc1 + // [460] (byte*) play_init::pli#1 ← (byte*) play_init::pli#2 + (const byte) PLAYFIELD_COLS -- pbuz1=pbuz1_plus_vbuc1 lda #PLAYFIELD_COLS clc adc.z pli @@ -24642,40 +24617,40 @@ play_init: { inc.z pli+1 !: // idx += PLAYFIELD_COLS - // [463] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 + // [461] (byte) play_init::idx#1 ← (byte) play_init::idx#2 + (const byte) PLAYFIELD_COLS -- vbuz1=vbuz1_plus_vbuc1 lax.z idx axs #-[PLAYFIELD_COLS] stx.z idx // for(char j:0..PLAYFIELD_LINES-1) - // [464] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy + // [462] (byte) play_init::j#1 ← ++ (byte) play_init::j#2 -- vbuyy=_inc_vbuyy iny - // [465] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [463] if((byte) play_init::j#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto play_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne __b1 // play_init::@2 // playfield_lines_idx[PLAYFIELD_LINES] = PLAYFIELD_COLS*PLAYFIELD_LINES - // [466] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES -- _deref_pbuc1=vbuc2 + // [464] *((const byte*) playfield_lines_idx+(const byte) PLAYFIELD_LINES) ← (const byte) PLAYFIELD_COLS*(const byte) PLAYFIELD_LINES -- _deref_pbuc1=vbuc2 lda #PLAYFIELD_COLS*PLAYFIELD_LINES sta playfield_lines_idx+PLAYFIELD_LINES // current_movedown_slow = MOVEDOWN_SLOW_SPEEDS[level] - // [467] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) -- vbuz1=_deref_pbuc1 + // [465] (byte) current_movedown_slow#1 ← *((const byte*) MOVEDOWN_SLOW_SPEEDS) -- vbuz1=_deref_pbuc1 // Set initial speed of moving down a tetromino lda MOVEDOWN_SLOW_SPEEDS sta.z current_movedown_slow - // [468] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] - // [468] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 + // [466] phi from play_init::@2 to play_init::@3 [phi:play_init::@2->play_init::@3] + // [466] phi (byte) play_init::b#2 = (byte) 0 [phi:play_init::@2->play_init::@3#0] -- vbuxx=vbuc1 ldx #0 // Set the initial score add values - // [468] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] - // [468] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy + // [466] phi from play_init::@3 to play_init::@3 [phi:play_init::@3->play_init::@3] + // [466] phi (byte) play_init::b#2 = (byte) play_init::b#1 [phi:play_init::@3->play_init::@3#0] -- register_copy // play_init::@3 __b3: // score_add_bcd[b] = SCORE_BASE_BCD[b] - // [469] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 + // [467] (byte~) play_init::$3 ← (byte) play_init::b#2 << (byte) 2 -- vbuaa=vbuxx_rol_2 txa asl asl - // [470] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa + // [468] *((const dword*) score_add_bcd + (byte~) play_init::$3) ← *((const dword*) SCORE_BASE_BCD + (byte~) play_init::$3) -- pduc1_derefidx_vbuaa=pduc2_derefidx_vbuaa tay lda SCORE_BASE_BCD,y sta score_add_bcd,y @@ -24686,14 +24661,14 @@ play_init: { lda SCORE_BASE_BCD+3,y sta score_add_bcd+3,y // for(char b: 0..4) - // [471] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx + // [469] (byte) play_init::b#1 ← ++ (byte) play_init::b#2 -- vbuxx=_inc_vbuxx inx - // [472] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 + // [470] if((byte) play_init::b#1!=(byte) 5) goto play_init::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne __b3 // play_init::@return // } - // [473] return + // [471] return rts } // sprites_irq_init @@ -24703,7 +24678,7 @@ sprites_irq_init: { // asm { sei } sei // *IRQ_STATUS = IRQ_RASTER - // [475] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [473] *((const byte*) IRQ_STATUS) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Acknowledge any IRQ and setup the next one lda #IRQ_RASTER sta IRQ_STATUS @@ -24711,36 +24686,36 @@ sprites_irq_init: { // asm { ldaCIA1_INTERRUPT } lda CIA1_INTERRUPT // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK - // [477] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 + // [475] *((const byte*) PROCPORT_DDR) ← (const byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2 // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR // *PROCPORT = PROCPORT_RAM_IO - // [478] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 + // [476] *((const byte*) PROCPORT) ← (const byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2 lda #PROCPORT_RAM_IO sta PROCPORT // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR - // [479] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR -- _deref_pbuc1=vbuc2 + // [477] *((const byte*) CIA1_INTERRUPT) ← (const byte) CIA_INTERRUPT_CLEAR -- _deref_pbuc1=vbuc2 // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT // *VIC_CONTROL &=0x7f - // [480] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + // [478] *((const byte*) VIC_CONTROL) ← *((const byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 // Set raster line lda #$7f and VIC_CONTROL sta VIC_CONTROL // *RASTER = IRQ_RASTER_FIRST - // [481] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST -- _deref_pbuc1=vbuc2 + // [479] *((const byte*) RASTER) ← (const byte) IRQ_RASTER_FIRST -- _deref_pbuc1=vbuc2 lda #IRQ_RASTER_FIRST sta RASTER // *IRQ_ENABLE = IRQ_RASTER - // [482] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 + // [480] *((const byte*) IRQ_ENABLE) ← (const byte) IRQ_RASTER -- _deref_pbuc1=vbuc2 // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE // *HARDWARE_IRQ = &sprites_irq - // [483] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 + // [481] *((const void()**) HARDWARE_IRQ) ← &interrupt(HARDWARE_CLOBBER)(void()) sprites_irq() -- _deref_pptc1=pprc2 // Set the IRQ routine lda #sprites_init::@1] - // [490] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 + // [488] phi from sprites_init to sprites_init::@1 [phi:sprites_init->sprites_init::@1] + // [488] phi (byte) sprites_init::xpos#2 = (byte)(number) $18+(number) $f*(number) 8 [phi:sprites_init->sprites_init::@1#0] -- vbuz1=vbuc1 lda #$18+$f*8 sta.z xpos - // [490] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 + // [488] phi (byte) sprites_init::s#2 = (byte) 0 [phi:sprites_init->sprites_init::@1#1] -- vbuyy=vbuc1 ldy #0 - // [490] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] - // [490] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy - // [490] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy + // [488] phi from sprites_init::@1 to sprites_init::@1 [phi:sprites_init::@1->sprites_init::@1] + // [488] phi (byte) sprites_init::xpos#2 = (byte) sprites_init::xpos#1 [phi:sprites_init::@1->sprites_init::@1#0] -- register_copy + // [488] phi (byte) sprites_init::s#2 = (byte) sprites_init::s#1 [phi:sprites_init::@1->sprites_init::@1#1] -- register_copy // sprites_init::@1 __b1: // s2 = s*2 - // [491] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [489] (byte) sprites_init::s2#0 ← (byte) sprites_init::s#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax // SPRITES_XPOS[s2] = xpos - // [492] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 + // [490] *((const byte*) SPRITES_XPOS + (byte) sprites_init::s2#0) ← (byte) sprites_init::xpos#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda.z xpos sta SPRITES_XPOS,x // SPRITES_COLS[s] = BLACK - // [493] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 + // [491] *((const byte*) SPRITES_COLS + (byte) sprites_init::s#2) ← (const byte) BLACK -- pbuc1_derefidx_vbuyy=vbuc2 lda #BLACK sta SPRITES_COLS,y // xpos = xpos+24 - // [494] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 + // [492] (byte) sprites_init::xpos#1 ← (byte) sprites_init::xpos#2 + (byte) $18 -- vbuz1=vbuz1_plus_vbuc1 lax.z xpos axs #-[$18] stx.z xpos // for(char s:0..3) - // [495] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy + // [493] (byte) sprites_init::s#1 ← ++ (byte) sprites_init::s#2 -- vbuyy=_inc_vbuyy iny - // [496] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [494] if((byte) sprites_init::s#1!=(byte) 4) goto sprites_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #4 bne __b1 // sprites_init::@return // } - // [497] return + // [495] return rts } // render_init @@ -24821,98 +24796,98 @@ render_init: { .label li_2 = $2b // render_init::vicSelectGfxBank1 // *CIA2_PORT_A_DDR = %00000011 - // [499] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 + // [497] *((const byte*) CIA2_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2_PORT_A_DDR - // [500] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] + // [498] phi from render_init::vicSelectGfxBank1 to render_init::vicSelectGfxBank1_toDd001 [phi:render_init::vicSelectGfxBank1->render_init::vicSelectGfxBank1_toDd001] // render_init::vicSelectGfxBank1_toDd001 // render_init::vicSelectGfxBank1_@1 // *CIA2_PORT_A = toDd00(gfx) - // [501] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 + // [499] *((const byte*) CIA2_PORT_A) ← (const byte) render_init::vicSelectGfxBank1_toDd001_return#0 -- _deref_pbuc1=vbuc2 lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A // render_init::@2 // *D011 = VIC_ECM | VIC_DEN | VIC_RSEL | 3 - // [502] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 + // [500] *((const byte*) D011) ← (const byte) VIC_ECM|(const byte) VIC_DEN|(const byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2 // Enable Extended Background Color Mode lda #VIC_ECM|VIC_DEN|VIC_RSEL|3 sta D011 // *BORDERCOL = BLACK - // [503] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [501] *((const byte*) BORDERCOL) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 lda #BLACK sta BORDERCOL // *BGCOL1 = BLACK - // [504] *((const byte*) BGCOL1) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 + // [502] *((const byte*) BGCOL1) ← (const byte) BLACK -- _deref_pbuc1=vbuc2 sta BGCOL1 // *BGCOL2 = PIECES_COLORS_1[0] - // [505] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 + // [503] *((const byte*) BGCOL2) ← *((const byte*) PIECES_COLORS_1) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_1 sta BGCOL2 // *BGCOL3 = PIECES_COLORS_2[0] - // [506] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 + // [504] *((const byte*) BGCOL3) ← *((const byte*) PIECES_COLORS_2) -- _deref_pbuc1=_deref_pbuc2 lda PIECES_COLORS_2 sta BGCOL3 // *BGCOL4 = GREY - // [507] *((const byte*) BGCOL4) ← (const byte) GREY -- _deref_pbuc1=vbuc2 + // [505] *((const byte*) BGCOL4) ← (const byte) GREY -- _deref_pbuc1=vbuc2 lda #GREY sta BGCOL4 // render_screen_original(PLAYFIELD_SCREEN_1) - // [508] call render_screen_original - // [520] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 + // [506] call render_screen_original + // [518] phi from render_init::@2 to render_screen_original [phi:render_init::@2->render_screen_original] + // [518] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_1 [phi:render_init::@2->render_screen_original#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1 sta.z render_screen_original.screen+1 jsr render_screen_original - // [509] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] + // [507] phi from render_init::@2 to render_init::@3 [phi:render_init::@2->render_init::@3] // render_init::@3 // render_screen_original(PLAYFIELD_SCREEN_2) - // [510] call render_screen_original - // [520] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] - // [520] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 + // [508] call render_screen_original + // [518] phi from render_init::@3 to render_screen_original [phi:render_init::@3->render_screen_original] + // [518] phi (byte*) render_screen_original::screen#9 = (const byte*) PLAYFIELD_SCREEN_2 [phi:render_init::@3->render_screen_original#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2 sta.z render_screen_original.screen+1 jsr render_screen_original - // [511] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] - // [511] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 + // [509] phi from render_init::@3 to render_init::@1 [phi:render_init::@3->render_init::@1] + // [509] phi (byte*) render_init::li_2#2 = (const byte*) PLAYFIELD_SCREEN_2+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#0] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_2+2*$28+$10 sta.z li_2+1 - // [511] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 + // [509] phi (byte*) render_init::li_1#2 = (const byte*) PLAYFIELD_SCREEN_1+(byte)(number) 2*(number) $28+(byte) $10 [phi:render_init::@3->render_init::@1#1] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_1+2*$28+$10 sta.z li_1+1 - // [511] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 + // [509] phi (byte) render_init::i#2 = (byte) 0 [phi:render_init::@3->render_init::@1#2] -- vbuyy=vbuc1 ldy #0 - // [511] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] - // [511] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy - // [511] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy - // [511] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy + // [509] phi from render_init::@1 to render_init::@1 [phi:render_init::@1->render_init::@1] + // [509] phi (byte*) render_init::li_2#2 = (byte*) render_init::li_2#1 [phi:render_init::@1->render_init::@1#0] -- register_copy + // [509] phi (byte*) render_init::li_1#2 = (byte*) render_init::li_1#1 [phi:render_init::@1->render_init::@1#1] -- register_copy + // [509] phi (byte) render_init::i#2 = (byte) render_init::i#1 [phi:render_init::@1->render_init::@1#2] -- register_copy // render_init::@1 __b1: // screen_lines_1[i] = li_1 - // [512] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 + // [510] (byte~) render_init::$5 ← (byte) render_init::i#2 << (byte) 1 -- vbuxx=vbuyy_rol_1 tya asl tax - // [513] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [511] *((const byte**) screen_lines_1 + (byte~) render_init::$5) ← (byte*) render_init::li_1#2 -- pptc1_derefidx_vbuxx=pbuz1 lda.z li_1 sta screen_lines_1,x lda.z li_1+1 sta screen_lines_1+1,x // screen_lines_2[i] = li_2 - // [514] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 + // [512] *((const byte**) screen_lines_2 + (byte~) render_init::$5) ← (byte*) render_init::li_2#2 -- pptc1_derefidx_vbuxx=pbuz1 lda.z li_2 sta screen_lines_2,x lda.z li_2+1 sta screen_lines_2+1,x // li_1 += 40 - // [515] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [513] (byte*) render_init::li_1#1 ← (byte*) render_init::li_1#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z li_1 @@ -24921,7 +24896,7 @@ render_init: { inc.z li_1+1 !: // li_2 += 40 - // [516] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + // [514] (byte*) render_init::li_2#1 ← (byte*) render_init::li_2#2 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z li_2 @@ -24930,14 +24905,14 @@ render_init: { inc.z li_2+1 !: // for(char i:0..PLAYFIELD_LINES-1) - // [517] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy + // [515] (byte) render_init::i#1 ← ++ (byte) render_init::i#2 -- vbuyy=_inc_vbuyy iny - // [518] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 + // [516] if((byte) render_init::i#1!=(const byte) PLAYFIELD_LINES-(byte) 1+(byte) 1) goto render_init::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #PLAYFIELD_LINES-1+1 bne __b1 // render_init::@return // } - // [519] return + // [517] return rts } // render_screen_original @@ -24951,182 +24926,182 @@ render_screen_original: { .label oscr = $14 .label ocols = $21 .label y = $13 - // [521] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] - // [521] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 + // [519] phi from render_screen_original to render_screen_original::@1 [phi:render_screen_original->render_screen_original::@1] + // [519] phi (byte) render_screen_original::y#6 = (byte) 0 [phi:render_screen_original->render_screen_original::@1#0] -- vbuz1=vbuc1 lda #0 sta.z y - // [521] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::ocols#4 = (const byte*) PLAYFIELD_COLORS_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#1] -- pbuz1=pbuc1 lda #PLAYFIELD_COLORS_ORIGINAL+$20*2 sta.z ocols+1 - // [521] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::oscr#4 = (const byte*) PLAYFIELD_SCREEN_ORIGINAL+(byte)(number) $20*(number) 2 [phi:render_screen_original->render_screen_original::@1#2] -- pbuz1=pbuc1 lda #PLAYFIELD_SCREEN_ORIGINAL+$20*2 sta.z oscr+1 - // [521] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 + // [519] phi (byte*) render_screen_original::cols#7 = (const byte*) COLS [phi:render_screen_original->render_screen_original::@1#3] -- pbuz1=pbuc1 lda #COLS sta.z cols+1 - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy - // [521] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] - // [521] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy - // [521] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy - // [521] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy - // [521] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy - // [521] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy + // [519] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#9 [phi:render_screen_original->render_screen_original::@1#4] -- register_copy + // [519] phi from render_screen_original::@5 to render_screen_original::@1 [phi:render_screen_original::@5->render_screen_original::@1] + // [519] phi (byte) render_screen_original::y#6 = (byte) render_screen_original::y#1 [phi:render_screen_original::@5->render_screen_original::@1#0] -- register_copy + // [519] phi (byte*) render_screen_original::ocols#4 = (byte*) render_screen_original::ocols#1 [phi:render_screen_original::@5->render_screen_original::@1#1] -- register_copy + // [519] phi (byte*) render_screen_original::oscr#4 = (byte*) render_screen_original::oscr#1 [phi:render_screen_original::@5->render_screen_original::@1#2] -- register_copy + // [519] phi (byte*) render_screen_original::cols#7 = (byte*) render_screen_original::cols#3 [phi:render_screen_original::@5->render_screen_original::@1#3] -- register_copy + // [519] phi (byte*) render_screen_original::screen#8 = (byte*) render_screen_original::screen#10 [phi:render_screen_original::@5->render_screen_original::@1#4] -- register_copy // render_screen_original::@1 __b1: - // [522] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] - // [522] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 + // [520] phi from render_screen_original::@1 to render_screen_original::@2 [phi:render_screen_original::@1->render_screen_original::@2] + // [520] phi (byte) render_screen_original::x#4 = (byte) 0 [phi:render_screen_original::@1->render_screen_original::@2#0] -- vbuxx=vbuc1 ldx #0 - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy - // [522] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] - // [522] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy - // [522] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy - // [522] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy + // [520] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#7 [phi:render_screen_original::@1->render_screen_original::@2#1] -- register_copy + // [520] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#8 [phi:render_screen_original::@1->render_screen_original::@2#2] -- register_copy + // [520] phi from render_screen_original::@2 to render_screen_original::@2 [phi:render_screen_original::@2->render_screen_original::@2] + // [520] phi (byte) render_screen_original::x#4 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2->render_screen_original::@2#0] -- register_copy + // [520] phi (byte*) render_screen_original::cols#4 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2->render_screen_original::@2#1] -- register_copy + // [520] phi (byte*) render_screen_original::screen#5 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2->render_screen_original::@2#2] -- register_copy // render_screen_original::@2 __b2: // *screen++ = SPACE - // [523] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 + // [521] *((byte*) render_screen_original::screen#5) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y // *screen++ = SPACE; - // [524] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 + // [522] (byte*) render_screen_original::screen#2 ← ++ (byte*) render_screen_original::screen#5 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: // *cols++ = BLACK - // [525] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 + // [523] *((byte*) render_screen_original::cols#4) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y // *cols++ = BLACK; - // [526] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 + // [524] (byte*) render_screen_original::cols#1 ← ++ (byte*) render_screen_original::cols#4 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: // while(++x!=4) - // [527] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx + // [525] (byte) render_screen_original::x#1 ← ++ (byte) render_screen_original::x#4 -- vbuxx=_inc_vbuxx inx - // [528] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 + // [526] if((byte) render_screen_original::x#1!=(byte) 4) goto render_screen_original::@2 -- vbuxx_neq_vbuc1_then_la1 cpx #4 bne __b2 - // [529] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] - // [529] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy - // [529] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy - // [529] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy - // [529] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy - // [529] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy + // [527] phi from render_screen_original::@2 render_screen_original::@3 to render_screen_original::@3 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3] + // [527] phi (byte) render_screen_original::x#5 = (byte) render_screen_original::x#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#0] -- register_copy + // [527] phi (byte*) render_screen_original::cols#5 = (byte*) render_screen_original::cols#1 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#1] -- register_copy + // [527] phi (byte*) render_screen_original::ocols#2 = (byte*) render_screen_original::ocols#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#2] -- register_copy + // [527] phi (byte*) render_screen_original::screen#6 = (byte*) render_screen_original::screen#2 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#3] -- register_copy + // [527] phi (byte*) render_screen_original::oscr#2 = (byte*) render_screen_original::oscr#4 [phi:render_screen_original::@2/render_screen_original::@3->render_screen_original::@3#4] -- register_copy // render_screen_original::@3 __b3: // *screen++ = *oscr++ - // [530] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 + // [528] *((byte*) render_screen_original::screen#6) ← *((byte*) render_screen_original::oscr#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (oscr),y sta (screen),y // *screen++ = *oscr++; - // [531] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 + // [529] (byte*) render_screen_original::screen#3 ← ++ (byte*) render_screen_original::screen#6 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: - // [532] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 + // [530] (byte*) render_screen_original::oscr#1 ← ++ (byte*) render_screen_original::oscr#2 -- pbuz1=_inc_pbuz1 inc.z oscr bne !+ inc.z oscr+1 !: // *cols++ = *ocols++ - // [533] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 + // [531] *((byte*) render_screen_original::cols#5) ← *((byte*) render_screen_original::ocols#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (ocols),y sta (cols),y // *cols++ = *ocols++; - // [534] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 + // [532] (byte*) render_screen_original::cols#2 ← ++ (byte*) render_screen_original::cols#5 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: - // [535] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 + // [533] (byte*) render_screen_original::ocols#1 ← ++ (byte*) render_screen_original::ocols#2 -- pbuz1=_inc_pbuz1 inc.z ocols bne !+ inc.z ocols+1 !: // while(++x!=36) - // [536] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx + // [534] (byte) render_screen_original::x#2 ← ++ (byte) render_screen_original::x#5 -- vbuxx=_inc_vbuxx inx - // [537] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 + // [535] if((byte) render_screen_original::x#2!=(byte) $24) goto render_screen_original::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #$24 bne __b3 - // [538] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] - // [538] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy - // [538] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy - // [538] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy + // [536] phi from render_screen_original::@3 render_screen_original::@4 to render_screen_original::@4 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4] + // [536] phi (byte) render_screen_original::x#6 = (byte) render_screen_original::x#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#0] -- register_copy + // [536] phi (byte*) render_screen_original::cols#6 = (byte*) render_screen_original::cols#2 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#1] -- register_copy + // [536] phi (byte*) render_screen_original::screen#7 = (byte*) render_screen_original::screen#3 [phi:render_screen_original::@3/render_screen_original::@4->render_screen_original::@4#2] -- register_copy // render_screen_original::@4 __b4: // *screen++ = SPACE - // [539] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 + // [537] *((byte*) render_screen_original::screen#7) ← (const byte) render_screen_original::SPACE -- _deref_pbuz1=vbuc1 lda #SPACE ldy #0 sta (screen),y // *screen++ = SPACE; - // [540] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 + // [538] (byte*) render_screen_original::screen#10 ← ++ (byte*) render_screen_original::screen#7 -- pbuz1=_inc_pbuz1 inc.z screen bne !+ inc.z screen+1 !: // *cols++ = BLACK - // [541] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 + // [539] *((byte*) render_screen_original::cols#6) ← (const byte) BLACK -- _deref_pbuz1=vbuc1 lda #BLACK ldy #0 sta (cols),y // *cols++ = BLACK; - // [542] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 + // [540] (byte*) render_screen_original::cols#3 ← ++ (byte*) render_screen_original::cols#6 -- pbuz1=_inc_pbuz1 inc.z cols bne !+ inc.z cols+1 !: // while(++x!=40) - // [543] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx + // [541] (byte) render_screen_original::x#3 ← ++ (byte) render_screen_original::x#6 -- vbuxx=_inc_vbuxx inx - // [544] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 + // [542] if((byte) render_screen_original::x#3!=(byte) $28) goto render_screen_original::@4 -- vbuxx_neq_vbuc1_then_la1 cpx #$28 bne __b4 // render_screen_original::@5 // for(char y:0..24) - // [545] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 + // [543] (byte) render_screen_original::y#1 ← ++ (byte) render_screen_original::y#6 -- vbuz1=_inc_vbuz1 inc.z y - // [546] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 + // [544] if((byte) render_screen_original::y#1!=(byte) $19) goto render_screen_original::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp.z y bne __b1 // render_screen_original::@return // } - // [547] return + // [545] return rts } // sid_rnd_init // Initialize SID voice 3 for random number generation sid_rnd_init: { // *SID_VOICE3_FREQ = 0xffff - // [548] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff -- _deref_pwuc1=vwuc2 + // [546] *((const word*) SID_VOICE3_FREQ) ← (word) $ffff -- _deref_pwuc1=vwuc2 lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE - // [549] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE -- _deref_pbuc1=vbuc2 + // [547] *((const byte*) SID_VOICE3_CONTROL) ← (const byte) SID_CONTROL_NOISE -- _deref_pbuc1=vbuc2 lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL // sid_rnd_init::@return // } - // [550] return + // [548] return rts } // sprites_irq @@ -25145,113 +25120,113 @@ sprites_irq: { // Clear decimal flag (because it is used by the score algorithm) cld // ypos = irq_sprite_ypos - // [552] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos -- vbuaa=vbuz1 + // [550] (byte) sprites_irq::ypos#0 ← (byte) irq_sprite_ypos -- vbuaa=vbuz1 // Place the sprites lda.z irq_sprite_ypos // SPRITES_YPOS[0] = ypos - // [553] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [551] *((const byte*) SPRITES_YPOS) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS // SPRITES_YPOS[2] = ypos - // [554] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [552] *((const byte*) SPRITES_YPOS+(byte) 2) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+2 // SPRITES_YPOS[4] = ypos - // [555] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [553] *((const byte*) SPRITES_YPOS+(byte) 4) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+4 // SPRITES_YPOS[6] = ypos - // [556] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa + // [554] *((const byte*) SPRITES_YPOS+(byte) 6) ← (byte) sprites_irq::ypos#0 -- _deref_pbuc1=vbuaa sta SPRITES_YPOS+6 // irq_raster_next+1 - // [557] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 -- vbuxx=vbuz1_plus_1 + // [555] (byte~) sprites_irq::$0 ← (byte) irq_raster_next + (byte) 1 -- vbuxx=vbuz1_plus_1 ldx.z irq_raster_next inx // raster_sprite_gfx_modify = irq_raster_next+1 - // [558] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx + // [556] (byte) sprites_irq::raster_sprite_gfx_modify ← (byte~) sprites_irq::$0 -- vbuz1=vbuxx // Wait for the y-position before changing sprite pointers stx.z raster_sprite_gfx_modify // sprites_irq::@8 __b8: // while(*RASTERsprites_irq::toSpritePtr2] + // [581] phi from sprites_irq::@3 to sprites_irq::toSpritePtr2 [phi:sprites_irq::@3->sprites_irq::toSpritePtr2] // sprites_irq::toSpritePtr2 // sprites_irq::@11 // irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES) - // [584] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 + // [582] (byte) irq_sprite_ptr ← (const byte) sprites_irq::toSpritePtr2_return#0 -- vbuz1=vbuc1 lda #toSpritePtr2_return sta.z irq_sprite_ptr jmp __b5 // sprites_irq::@1 __b1: // PLAYFIELD_SPRITE_PTRS_1[0] = ptr++ - // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx + // [583] *((const byte*) PLAYFIELD_SPRITE_PTRS_1) ← (byte) sprites_irq::ptr#0 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1 // PLAYFIELD_SPRITE_PTRS_1[0] = ptr++; - // [586] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx + // [584] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0 -- vbuxx=_inc_vbuxx inx // PLAYFIELD_SPRITE_PTRS_1[1] = ptr - // [587] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [585] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 1) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+1 // PLAYFIELD_SPRITE_PTRS_1[2] = ptr++ - // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx + // [586] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 2) ← (byte) sprites_irq::ptr#1 -- _deref_pbuc1=vbuxx stx PLAYFIELD_SPRITE_PTRS_1+2 // PLAYFIELD_SPRITE_PTRS_1[2] = ptr++; - // [589] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx + // [587] (byte) sprites_irq::ptr#2 ← ++ (byte) sprites_irq::ptr#1 -- vbuaa=_inc_vbuxx inx txa // PLAYFIELD_SPRITE_PTRS_1[3] = ptr - // [590] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa + // [588] *((const byte*) PLAYFIELD_SPRITE_PTRS_1+(byte) 3) ← (byte) sprites_irq::ptr#2 -- _deref_pbuc1=vbuaa sta PLAYFIELD_SPRITE_PTRS_1+3 jmp __b2 } @@ -25362,6 +25337,20 @@ sprites_irq: { // The initial X/Y for each piece PIECES_START_X: .byte 4, 4, 4, 4, 4, 4, 4 PIECES_START_Y: .byte 1, 1, 1, 1, 1, 0, 1 +PLAYFIELD_SCREEN_ORIGINAL: +// Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + + // Original Color Data +PLAYFIELD_COLORS_ORIGINAL: +.import binary "playfield-screen.col" + // The color #1 to use for the pieces for each level PIECES_COLORS_1: .byte BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED, BLUE, GREEN, PURPLE, BLUE, RED, LIGHT_GREEN, RED, BLUE, LIGHT_BLUE, RED // The color #2 to use for the pieces for each level @@ -25389,19 +25378,6 @@ sprites_irq: { .fill 8,$00 // Place a filled char at the start of the charset .import binary "playfield-screen.imap" -.pc = PLAYFIELD_SCREEN_ORIGINAL "PLAYFIELD_SCREEN_ORIGINAL" - // Load chars for the screen - .var screen = LoadBinary("playfield-screen.iscr") - // Load extended colors for the screen - .var extended = LoadBinary("playfield-extended.col") - // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 - // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) - // <<6 to move extended colors to the upper 2 bits - .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) - -.pc = PLAYFIELD_COLORS_ORIGINAL "PLAYFIELD_COLORS_ORIGINAL" - .import binary "playfield-screen.col" - .pc = PLAYFIELD_SPRITES "PLAYFIELD_SPRITES" .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000)) // Put the sprites into memory diff --git a/src/test/ref/complex/tetris/tetris.sym b/src/test/ref/complex/tetris/tetris.sym index 88448d437..46820bc2a 100644 --- a/src/test/ref/complex/tetris/tetris.sym +++ b/src/test/ref/complex/tetris/tetris.sym @@ -64,13 +64,22 @@ (const byte*) PIECE_Z[(number) $40] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0 } (const byte) PINK = (byte) $a (const byte*) PLAYFIELD_CHARSET = (byte*) 10240 -(const byte*) PLAYFIELD_COLORS_ORIGINAL = (byte*) 7168 +(const byte*) PLAYFIELD_COLORS_ORIGINAL[] = kickasm {{ .import binary "playfield-screen.col" + }} (const byte) PLAYFIELD_COLS = (byte) $a (const byte) PLAYFIELD_LINES = (byte) $16 (const byte*) PLAYFIELD_SCREEN_1 = (byte*) 1024 (const byte*) PLAYFIELD_SCREEN_2 = (byte*) 11264 -(const byte*) PLAYFIELD_SCREEN_ORIGINAL = (byte*) 12288 -(const byte*) PLAYFIELD_SPRITES = (byte*) 8192 +(const byte*) PLAYFIELD_SCREEN_ORIGINAL[] = kickasm {{ // Load chars for the screen + .var screen = LoadBinary("playfield-screen.iscr") + // Load extended colors for the screen + .var extended = LoadBinary("playfield-extended.col") + // screen.get(i)+1 because the charset is loaded into PLAYFIELD_CHARSET+8 + // extended.get(i)-1 because the extended colors are 1-based (1/2/3/4) + // <<6 to move extended colors to the upper 2 bits + .fill screen.getSize(), ( (screen.get(i)+1) | (extended.get(i)-1)<<6 ) + }} +(const byte*) PLAYFIELD_SPRITES = (byte*) 12288 (const byte*) PLAYFIELD_SPRITE_PTRS_1 = (const byte*) PLAYFIELD_SCREEN_1+(const word) SPRITE_PTRS (const byte*) PLAYFIELD_SPRITE_PTRS_2 = (const byte*) PLAYFIELD_SCREEN_2+(const word) SPRITE_PTRS (const byte*) PROCPORT = (byte*) 1 @@ -855,7 +864,7 @@ (const byte) render_show::toD0182_return#0 toD0182_return = >(word)(const byte*) PLAYFIELD_SCREEN_2&(word) $3fff*(byte) 4|>(word)(const byte*) PLAYFIELD_CHARSET/(byte) 4&(byte) $f (byte*) render_show::toD0182_screen (const dword*) score_add_bcd[(number) 5] = { fill( 5, 0) } -(dword) score_bcd loadstore zp[4]:23 0.04316546762589928 +(dword) score_bcd loadstore zp[4]:23 0.043795620437956206 (const byte**) screen_lines_1[(const byte) PLAYFIELD_LINES] = { fill( PLAYFIELD_LINES, 0) } (const byte**) screen_lines_2[(const byte) PLAYFIELD_LINES] = { fill( PLAYFIELD_LINES, 0) } (void()) sid_rnd_init() diff --git a/src/test/ref/complex/xmega65/xmega65.asm b/src/test/ref/complex/xmega65/xmega65.asm index fb51a9abb..276f26745 100644 --- a/src/test/ref/complex/xmega65/xmega65.asm +++ b/src/test/ref/complex/xmega65/xmega65.asm @@ -22,9 +22,11 @@ main: { // Print message .label sc = 4 .label msg = 2 + // *VIC_MEMORY = 0x14 // Initialize screen memory lda #$14 sta VIC_MEMORY + // memset(SCREEN, ' ', 40*25) ldx #' ' lda #$28*$19 sta.z memset.num+1 jsr memset + // memset(COLS, WHITE, 40*25) ldx #WHITE lda #MESSAGE sta.z msg+1 __b1: + // while(*msg) ldy #0 lda (msg),y cmp #0 bne __b2 __b3: + // if(*RASTER==54 || *RASTER==66) lda #$36 cmp RASTER beq __b4 lda #$42 cmp RASTER beq __b4 + // *BGCOL = BLACK lda #BLACK sta BGCOL jmp __b3 __b4: + // *BGCOL = WHITE lda #WHITE sta BGCOL jmp __b3 __b2: + // *sc++ = *msg++ ldy #0 lda (msg),y sta (sc),y + // *sc++ = *msg++; inc.z sc bne !+ inc.z sc+1 @@ -93,11 +102,13 @@ memset: { .label dst = 4 .label num = 2 .label str = 4 + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -106,6 +117,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -113,11 +125,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -125,13 +140,17 @@ memset: { jmp __b2 } syscall2: { + // *(SCREEN+78) = '<' lda #'<' sta SCREEN+$4e + // } rts } syscall1: { + // *(SCREEN+79) = '>' lda #'>' sta SCREEN+$4f + // } rts } .segment Data diff --git a/src/test/ref/complex/xmega65/xmega65.log b/src/test/ref/complex/xmega65/xmega65.log index cc64586fa..5dbf2e2b1 100644 --- a/src/test/ref/complex/xmega65/xmega65.log +++ b/src/test/ref/complex/xmega65/xmega65.log @@ -302,14 +302,14 @@ Identical Phi Values (byte) memset::c#2 (byte) memset::c#4 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) main::$5 [35] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) main::$5 [28] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s [43] (bool~) main::$4 ← (bool~) main::$2 || (bool~) main::$3 +Rewriting || if()-condition to two if()s [35] (bool~) main::$4 ← (bool~) main::$2 || (bool~) main::$3 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [23] (word) memset::num#0 ← (unumber)(number) $28*(number) $19 -Constant right-side identified [28] (word) memset::num#1 ← (unumber)(number) $28*(number) $19 +Constant right-side identified [16] (word) memset::num#0 ← (unumber)(number) $28*(number) $19 +Constant right-side identified [21] (word) memset::num#1 ← (unumber)(number) $28*(number) $19 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const void*) memset::str#0 = (void*)SCREEN Constant (const byte) memset::c#0 = ' ' @@ -320,7 +320,7 @@ Constant (const word) memset::num#1 = (unumber)$28*$19 Constant (const byte*) main::sc#0 = SCREEN+$28 Constant (const byte*) main::msg#0 = MESSAGE Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [40] if(true) goto main::@8 +if() condition always true - replacing block destination [32] if(true) goto main::@8 Successful SSA optimization Pass2ConstantIfs Eliminating unused variable (void*) memset::return#2 and assignment [12] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [14] (void*) memset::return#3 ← (void*) memset::str#3 diff --git a/src/test/ref/complex/xmega65/xmega65logo.asm b/src/test/ref/complex/xmega65/xmega65logo.asm index cef9c7753..b4ce9806f 100644 --- a/src/test/ref/complex/xmega65/xmega65logo.asm +++ b/src/test/ref/complex/xmega65/xmega65logo.asm @@ -11,15 +11,20 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // (SCREEN+40*0)[i] = LOGO256_RED[i] lda LOGO256_RED,x sta SCREEN,x + // (SCREEN+40*8)[i] = LOGO256_GREEN[i] lda LOGO256_GREEN,x sta SCREEN+$28*8,x + // (SCREEN+40*16)[i] = LOGO256_BLUE[i] lda LOGO256_BLUE,x sta SCREEN+$28*$10,x + // for(byte i:0..0xff) inx cpx #0 bne __b1 + // } rts } // Import a 128x128 8bit-per-color logo using inline KickAsm diff --git a/src/test/ref/condition-integer-0.asm b/src/test/ref/condition-integer-0.asm index 9f8e70acd..5024c5c96 100644 --- a/src/test/ref/condition-integer-0.asm +++ b/src/test/ref/condition-integer-0.asm @@ -6,31 +6,40 @@ .label SCREEN = $400 main: { .label i1 = 2 + // SCREEN[idx++] = '+' lda #'+' sta SCREEN + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN+1 ldy #2 ldx #0 // loop byte __b3: + // if(i) cpx #0 beq __b4 + // SCREEN[idx++] = '+' lda #'+' sta SCREEN,y + // SCREEN[idx++] = '+'; iny __b4: + // for( byte i:0..2) inx cpx #3 bne __b3 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,y + // SCREEN[idx++] = ' '; iny lda #<0 sta.z i1 sta.z i1+1 // loop word __b7: + // if(i) lda.z i1 cmp #<0 bne !+ @@ -38,10 +47,13 @@ main: { cmp #>0 beq __b8 !: + // SCREEN[idx++] = '+' lda #'+' sta SCREEN,y + // SCREEN[idx++] = '+'; iny __b8: + // for( word i:0..2) inc.z i1 bne !+ inc.z i1+1 @@ -52,5 +64,6 @@ main: { lda.z i1 cmp #<3 bne __b7 + // } rts } diff --git a/src/test/ref/condition-integer-0.log b/src/test/ref/condition-integer-0.log index 9966f0bad..27cb28f09 100644 --- a/src/test/ref/condition-integer-0.log +++ b/src/test/ref/condition-integer-0.log @@ -174,10 +174,10 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Alias (word) main::i1#2 = (word) main::i1#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 [19] if((byte) 0==(byte) main::i#2) goto main::@6 -Simple Condition (bool~) main::$3 [23] if((byte) main::i#1!=rangelast(0,2)) goto main::@5 -Simple Condition (bool~) main::$4 [34] if((byte) 0==(word) main::i1#2) goto main::@10 -Simple Condition (bool~) main::$5 [38] if((word) main::i1#1!=rangelast(0,2)) goto main::@9 +Simple Condition (bool~) main::$2 [16] if((byte) 0==(byte) main::i#2) goto main::@6 +Simple Condition (bool~) main::$3 [20] if((byte) main::i#1!=rangelast(0,2)) goto main::@5 +Simple Condition (bool~) main::$4 [28] if((byte) 0==(word) main::i1#2) goto main::@10 +Simple Condition (bool~) main::$5 [32] if((word) main::i1#1!=rangelast(0,2)) goto main::@9 Successful SSA optimization Pass2ConditionalJumpSimplification Rewriting ! if()-condition to reversed if() [1] (bool~) main::$0 ← ! (number) 0!=(number) 0 Rewriting ! if()-condition to reversed if() [4] (bool~) main::$1 ← ! (number) 0!=(number) $3e7 @@ -190,11 +190,11 @@ if() condition always false - eliminating [2] if((number) 0!=(number) 0) goto ma Removing PHI-reference to removed block (main::@1) in block main::@2 if() condition always true - replacing block destination [5] if((number) 0!=(number) $3e7) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [21] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [23] if(main::i#1!=rangelast(0,2)) goto main::@5 to (number) 3 -Resolved ranged next value [36] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [38] if(main::i1#1!=rangelast(0,2)) goto main::@9 to (number) 3 -Simplifying expression containing zero SCREEN in [7] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte) '0' +Resolved ranged next value [18] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [20] if(main::i#1!=rangelast(0,2)) goto main::@5 to (number) 3 +Resolved ranged next value [30] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [32] if(main::i1#1!=rangelast(0,2)) goto main::@9 to (number) 3 +Simplifying expression containing zero SCREEN in [6] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte) '0' Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating variable (byte) main::idx#1 from unused block main::@3 Removing PHI-reference to removed block (main::@3) in block main::@1 @@ -213,11 +213,11 @@ Alias (byte) main::idx#3 = (byte) main::idx#8 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::idx#13 (const byte) main::idx#0 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [5] (byte) main::idx#3 ← ++ (const byte) main::idx#0 +Constant right-side identified [4] (byte) main::idx#3 ← ++ (const byte) main::idx#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::idx#3 = ++main::idx#0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero SCREEN in [4] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte) '+' +Simplifying expression containing zero SCREEN in [3] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte) '+' Successful SSA optimization PassNSimplifyExpressionWithZero Constant right-side identified [1] (byte) main::idx#2 ← ++ (const byte) main::idx#3 Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/condition-integer-1.asm b/src/test/ref/condition-integer-1.asm index 269c32cb8..ca10a0a92 100644 --- a/src/test/ref/condition-integer-1.asm +++ b/src/test/ref/condition-integer-1.asm @@ -6,41 +6,53 @@ .label SCREEN = $400 main: { .label i1 = 2 + // SCREEN[idx++] = '0' lda #'0' sta SCREEN + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN+1 ldy #2 ldx #0 // loop byte __b3: + // if(!i) cpx #0 bne __b4 + // SCREEN[idx++] = '0' lda #'0' sta SCREEN,y + // SCREEN[idx++] = '0'; iny __b4: + // for( byte i:0..2) inx cpx #3 bne __b3 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,y + // SCREEN[idx++] = ' '; iny lda #<0 sta.z i1 sta.z i1+1 // loop word __b7: + // if(!i) lda.z i1+1 cmp #>0 bne __b8 lda.z i1 cmp #<0 bne __b8 + // SCREEN[idx++] = '0' lda #'0' sta SCREEN,y + // SCREEN[idx++] = '0'; iny __b8: + // for( word i:0..2) inc.z i1 bne !+ inc.z i1+1 @@ -51,5 +63,6 @@ main: { lda.z i1 cmp #<3 bne __b7 + // } rts } diff --git a/src/test/ref/condition-integer-1.log b/src/test/ref/condition-integer-1.log index 6f815d705..cdd251e07 100644 --- a/src/test/ref/condition-integer-1.log +++ b/src/test/ref/condition-integer-1.log @@ -180,10 +180,10 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Alias (word) main::i1#2 = (word) main::i1#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$3 [20] if((byte) 0!=(byte) main::i#2) goto main::@6 -Simple Condition (bool~) main::$4 [24] if((byte) main::i#1!=rangelast(0,2)) goto main::@5 -Simple Condition (bool~) main::$6 [36] if((byte) 0!=(word) main::i1#2) goto main::@10 -Simple Condition (bool~) main::$7 [40] if((word) main::i1#1!=rangelast(0,2)) goto main::@9 +Simple Condition (bool~) main::$3 [16] if((byte) 0!=(byte) main::i#2) goto main::@6 +Simple Condition (bool~) main::$4 [20] if((byte) main::i#1!=rangelast(0,2)) goto main::@5 +Simple Condition (bool~) main::$6 [28] if((byte) 0!=(word) main::i1#2) goto main::@10 +Simple Condition (bool~) main::$7 [32] if((word) main::i1#1!=rangelast(0,2)) goto main::@9 Successful SSA optimization Pass2ConditionalJumpSimplification Rewriting ! if()-condition to reversed if() [1] (bool~) main::$0 ← ! !(number) 0!=(number) 0 Rewriting ! if()-condition to reversed if() [4] (bool~) main::$1 ← ! !(number) 0!=(number) $3e7 @@ -196,11 +196,11 @@ Removing PHI-reference to removed block (main) in block main::@1 if() condition always true - replacing block destination [2] if(!(number) 0!=(number) 0) goto main::@3 if() condition always false - eliminating [5] if(!(number) 0!=(number) $3e7) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [22] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [24] if(main::i#1!=rangelast(0,2)) goto main::@5 to (number) 3 -Resolved ranged next value [38] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [40] if(main::i1#1!=rangelast(0,2)) goto main::@9 to (number) 3 -Simplifying expression containing zero SCREEN in [7] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte) '0' +Resolved ranged next value [18] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [20] if(main::i#1!=rangelast(0,2)) goto main::@5 to (number) 3 +Resolved ranged next value [30] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [32] if(main::i1#1!=rangelast(0,2)) goto main::@9 to (number) 3 +Simplifying expression containing zero SCREEN in [6] *((const byte*) SCREEN + (const byte) main::idx#0) ← (byte) '0' Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating variable (byte) main::idx#3 from unused block main::@4 Removing PHI-reference to removed block (main::@4) in block main::@2 @@ -217,7 +217,7 @@ Finalized unsigned number type (byte) 3 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::idx#1 = (byte) main::idx#13 (byte) main::idx#8 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [2] (byte) main::idx#1 ← ++ (const byte) main::idx#0 +Constant right-side identified [1] (byte) main::idx#1 ← ++ (const byte) main::idx#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::idx#1 = ++main::idx#0 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/condition-integer-2.asm b/src/test/ref/condition-integer-2.asm index c6ca4f8ad..743e9a312 100644 --- a/src/test/ref/condition-integer-2.asm +++ b/src/test/ref/condition-integer-2.asm @@ -9,37 +9,52 @@ main: { ldx #2 // for() __b1: + // for( byte i=2;i;i--) cpx #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,y + // SCREEN[idx++] = ' '; iny lda #3 __b4: + // while( j-- ) sec sbc #1 cmp #0 bne __b5 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,y + // SCREEN[idx++] = ' '; iny lda #2 __b7: + // SCREEN[idx++] = k sta SCREEN,y + // SCREEN[idx++] = k; iny + // while(k--) sec sbc #1 cmp #0 bne __b7 + // } rts __b5: + // SCREEN[idx++] = j sta SCREEN,y + // SCREEN[idx++] = j; iny jmp __b4 __b2: + // SCREEN[idx++] = i txa sta SCREEN,y + // SCREEN[idx++] = i; iny + // for( byte i=2;i;i--) dex jmp __b1 } diff --git a/src/test/ref/condition-integer-2.log b/src/test/ref/condition-integer-2.log index e543273ec..6062f394e 100644 --- a/src/test/ref/condition-integer-2.log +++ b/src/test/ref/condition-integer-2.log @@ -159,8 +159,8 @@ Identical Phi Values (byte) idx#18 (byte) idx#0 Identical Phi Values (byte) idx#14 (byte) idx#13 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [5] if((byte) 0!=(byte) main::i#2) goto main::@2 -Simple Condition (bool~) main::$1 [17] if((byte) 0!=(byte) main::j#1) goto main::@8 -Simple Condition (bool~) main::$2 [30] if((byte) 0!=(byte) main::k#1) goto main::@13 +Simple Condition (bool~) main::$1 [15] if((byte) 0!=(byte) main::j#1) goto main::@8 +Simple Condition (bool~) main::$2 [26] if((byte) 0!=(byte) main::k#1) goto main::@13 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) idx#0 = 0 Constant (const byte) main::i#0 = 2 diff --git a/src/test/ref/condition-integer-3.asm b/src/test/ref/condition-integer-3.asm index e94a06a08..b92c26cda 100644 --- a/src/test/ref/condition-integer-3.asm +++ b/src/test/ref/condition-integer-3.asm @@ -8,6 +8,7 @@ main: { ldx #0 ldy #-2 __b1: + // i?'+':'0' cpy #0 bne __b2 lda #'0' @@ -15,10 +16,14 @@ main: { __b2: lda #'+' __b3: + // SCREEN[idx++] = j sta SCREEN,x + // SCREEN[idx++] = j; inx + // for( signed byte i: -2..2) iny cpy #3 bne __b1 + // } rts } diff --git a/src/test/ref/condition-integer-3.log b/src/test/ref/condition-integer-3.log index aa2fa6510..cb23d31f7 100644 --- a/src/test/ref/condition-integer-3.log +++ b/src/test/ref/condition-integer-3.log @@ -98,15 +98,15 @@ Alias (byte) main::idx#2 = (byte) main::idx#3 Alias (signed byte) main::i#2 = (signed byte) main::i#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$4 [4] if((signed byte) 0!=(signed byte) main::i#2) goto main::@2 -Simple Condition (bool~) main::$3 [15] if((signed byte) main::i#1!=rangelast(-2,2)) goto main::@1 +Simple Condition (bool~) main::$3 [12] if((signed byte) main::i#1!=rangelast(-2,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::idx#0 = 0 Constant (const signed byte) main::i#0 = -2 Constant (const byte) main::$1 = '+' Constant (const byte) main::$0 = '0' Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [13] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [15] if(main::i#1!=rangelast(-2,2)) goto main::@1 to (number) 3 +Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [12] if(main::i#1!=rangelast(-2,2)) goto main::@1 to (number) 3 Adding number conversion cast (snumber) 3 in if((signed byte) main::i#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/condition-integer-4.asm b/src/test/ref/condition-integer-4.asm index c27f20ff9..7b9e8d51d 100644 --- a/src/test/ref/condition-integer-4.asm +++ b/src/test/ref/condition-integer-4.asm @@ -12,52 +12,69 @@ main: { ldx #0 ldy #0 __b1: + // i&1 tya and #1 + // if(i&1) cmp #0 beq __b2 + // (SCREEN+40*0)[idx] = '+' lda #'+' sta SCREEN,x __b2: + // i&2 tya and #2 + // if(i&2) cmp #0 beq __b3 + // (SCREEN+40*1)[idx] = '+' lda #'+' sta SCREEN+$28*1,x __b3: + // i&1 tya and #1 sta.z __4 + // i&2 tya and #2 sta.z __5 + // if(i&1 && i&2) lda #0 cmp.z __4 beq __b4 cmp.z __5 beq __b4 + // (SCREEN+40*2)[idx] = '+' lda #'+' sta SCREEN+$28*2,x __b4: + // i&1 tya and #1 sta.z __8 + // i&2 tya and #2 sta.z __9 + // if(i&1 || i&2) lda #0 cmp.z __8 bne __b9 cmp.z __9 beq __b5 __b9: + // (SCREEN+40*3)[idx] = '+' lda #'+' sta SCREEN+$28*3,x __b5: + // idx++; inx + // for( byte i:0..7) iny cpy #8 bne __b1 + // } rts } diff --git a/src/test/ref/condition-integer-4.log b/src/test/ref/condition-integer-4.log index 9e40fe973..c7a0a3c71 100644 --- a/src/test/ref/condition-integer-4.log +++ b/src/test/ref/condition-integer-4.log @@ -199,14 +199,14 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#10 = (byte) main::i#3 (byte) main::i#2 (byte) main::i#4 (byte) main::i#6 Alias (byte) main::idx#10 = (byte) main::idx#3 (byte) main::idx#2 (byte) main::idx#4 (byte) main::idx#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [6] if((byte) 0==(byte~) main::$0) goto main::@2 -Simple Condition (bool~) main::$3 [11] if((byte) 0==(byte~) main::$2) goto main::@3 -Simple Condition (bool~) main::$12 [34] if((byte) main::i#1!=rangelast(0,7)) goto main::@1 +Simple Condition (bool~) main::$1 [5] if((byte) 0==(byte~) main::$0) goto main::@2 +Simple Condition (bool~) main::$3 [8] if((byte) 0==(byte~) main::$2) goto main::@3 +Simple Condition (bool~) main::$12 [25] if((byte) main::i#1!=rangelast(0,7)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [18] (bool~) main::$7 ← ! (bool~) main::$6 -Rewriting && if()-condition to two if()s [17] (bool~) main::$6 ← (byte~) main::$4 && (byte~) main::$5 -Rewriting ! if()-condition to reversed if() [26] (bool~) main::$11 ← ! (bool~) main::$10 -Rewriting || if()-condition to two if()s [25] (bool~) main::$10 ← (byte~) main::$8 || (byte~) main::$9 +Rewriting ! if()-condition to reversed if() [13] (bool~) main::$7 ← ! (bool~) main::$6 +Rewriting && if()-condition to two if()s [12] (bool~) main::$6 ← (byte~) main::$4 && (byte~) main::$5 +Rewriting ! if()-condition to reversed if() [19] (bool~) main::$11 ← ! (bool~) main::$10 +Rewriting || if()-condition to two if()s [18] (bool~) main::$10 ← (byte~) main::$8 || (byte~) main::$9 Successful SSA optimization Pass2ConditionalAndOrRewriting Warning! Adding boolean cast to non-boolean condition (byte~) main::$4 Warning! Adding boolean cast to non-boolean condition (byte~) main::$8 @@ -215,11 +215,11 @@ Warning! Adding boolean cast to non-boolean condition (byte~) main::$9 Constant (const byte) main::idx#0 = 0 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [32] main::i#1 ← ++ main::i#10 to ++ -Resolved ranged comparison value [34] if(main::i#1!=rangelast(0,7)) goto main::@1 to (number) 8 -Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [13] *((const byte*) SCREEN+(byte)(number) $28*(number) 0 + (byte) main::idx#10) ← (byte) '+' +Resolved ranged next value [23] main::i#1 ← ++ main::i#10 to ++ +Resolved ranged comparison value [25] if(main::i#1!=rangelast(0,7)) goto main::@1 to (number) 8 +Simplifying constant evaluating to zero (byte)(number) $28*(number) 0 in [9] *((const byte*) SCREEN+(byte)(number) $28*(number) 0 + (byte) main::idx#10) ← (byte) '+' Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero SCREEN in [13] *((const byte*) SCREEN+(byte) 0 + (byte) main::idx#10) ← (byte) '+' +Simplifying expression containing zero SCREEN in [9] *((const byte*) SCREEN+(byte) 0 + (byte) main::idx#10) ← (byte) '+' Successful SSA optimization PassNSimplifyExpressionWithZero Adding number conversion cast (unumber) 0 in (bool~) main::$15 ← (number) 0 != (byte~) main::$4 Adding number conversion cast (unumber) 0 in (bool~) main::$16 ← (number) 0 != (byte~) main::$8 diff --git a/src/test/ref/condition-type-mismatch.asm b/src/test/ref/condition-type-mismatch.asm index 56cb967a2..aa475a929 100644 --- a/src/test/ref/condition-type-mismatch.asm +++ b/src/test/ref/condition-type-mismatch.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" main: { .label screen = $400 + // *screen = 'a' lda #'a' sta screen + // } rts } diff --git a/src/test/ref/condition-type-mismatch.log b/src/test/ref/condition-type-mismatch.log index 21d6658f9..f78eeab3e 100644 --- a/src/test/ref/condition-type-mismatch.log +++ b/src/test/ref/condition-type-mismatch.log @@ -48,9 +48,9 @@ Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [1] (bool~) main::$0 ← (byte) 0 == (const byte) main::b from [0] (bool~) main::$1 ← (byte) 0 != (const byte) main::b Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) main::$0 [2] if((byte) 0==(const byte) main::b) goto main::@return +Simple Condition (bool~) main::$0 [1] if((byte) 0==(const byte) main::b) goto main::@return Successful SSA optimization Pass2ConditionalJumpSimplification -if() condition always false - eliminating [2] if((byte) 0==(const byte) main::b) goto main::@return +if() condition always false - eliminating [1] if((byte) 0==(const byte) main::b) goto main::@return Successful SSA optimization Pass2ConstantIfs Eliminating unused constant (const byte) main::b Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/consolidate-array-index-problem.asm b/src/test/ref/consolidate-array-index-problem.asm index 69c155b55..646e96a9e 100644 --- a/src/test/ref/consolidate-array-index-problem.asm +++ b/src/test/ref/consolidate-array-index-problem.asm @@ -7,15 +7,20 @@ main: { .label cols = $d800 ldy #0 __b1: + // y=x+12 tya tax axs #-[$c] + // screen[y] = 'a' lda #'a' sta screen,x + // cols[y] = BLACK lda #BLACK sta cols,x + // for(byte x:0..10) iny cpy #$b bne __b1 + // } rts } diff --git a/src/test/ref/consolidate-array-index-problem.log b/src/test/ref/consolidate-array-index-problem.log index 14772cfb5..f48b5eb52 100644 --- a/src/test/ref/consolidate-array-index-problem.log +++ b/src/test/ref/consolidate-array-index-problem.log @@ -63,12 +63,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) main::$0 ← (byte) main::x#2 + (byte) $c Alias (byte) main::y#0 = (byte~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [8] if((byte) main::x#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [7] if((byte) main::x#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [6] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [8] if(main::x#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [5] main::x#1 ← ++ main::x#2 to ++ +Resolved ranged comparison value [7] if(main::x#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::x#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/consolidate-constant-problem.asm b/src/test/ref/consolidate-constant-problem.asm index 2a0ce4e21..41fa4948b 100644 --- a/src/test/ref/consolidate-constant-problem.asm +++ b/src/test/ref/consolidate-constant-problem.asm @@ -3,10 +3,15 @@ .pc = $80d "Program" .label screen = $400 main: { + // *(screen+40*j+39) = 0 lda #0 sta screen+$27 + // screen[40*j+37] = 0 sta screen+$25 + // *(screen+40*j+39) = 0 sta screen+$28*1+$27 + // screen[40*j+37] = 0 sta screen+$28*1+$25 + // } rts } diff --git a/src/test/ref/const-condition.asm b/src/test/ref/const-condition.asm index d53a726c8..90a1490ca 100644 --- a/src/test/ref/const-condition.asm +++ b/src/test/ref/const-condition.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[0] = '!' lda #'!' sta SCREEN + // } rts } diff --git a/src/test/ref/const-declaration.asm b/src/test/ref/const-declaration.asm index c5956f94d..bd969ad11 100644 --- a/src/test/ref/const-declaration.asm +++ b/src/test/ref/const-declaration.asm @@ -10,8 +10,11 @@ .label BODY1 = SCREEN+MARGIN_TOP*LINE_LEN+MARGIN_LEFT .label BODY2 = SCREEN+OFFSET main: { + // *BODY1 = '*' lda #'*' sta BODY1 + // *BODY2 = '*' sta BODY2 + // } rts } diff --git a/src/test/ref/const-early-identification.asm b/src/test/ref/const-early-identification.asm index e03359367..fb134303e 100644 --- a/src/test/ref/const-early-identification.asm +++ b/src/test/ref/const-early-identification.asm @@ -5,6 +5,7 @@ .label SCREEN = $400 .label A = 2 __bbegin: + // A = 'a' // Not an early constant (address-of is used) lda #'a' sta.z A @@ -13,21 +14,30 @@ __bbegin: main: { .const B = 'b' .label addrA = A + // SCREEN[0] = A lda.z A sta SCREEN + // SCREEN[1] = B lda #B sta SCREEN+1 + // SCREEN[2] = *addrA lda.z addrA sta SCREEN+2 + // sub() jsr sub + // } rts } sub: { .const C = 'c' + // SCREEN[3] = C lda #C sta SCREEN+3 + // D = A+1 ldx.z A inx + // SCREEN[4] = D stx SCREEN+4 + // } rts } diff --git a/src/test/ref/const-identification.asm b/src/test/ref/const-identification.asm index d3d9c5f43..68b3a6657 100644 --- a/src/test/ref/const-identification.asm +++ b/src/test/ref/const-identification.asm @@ -6,14 +6,18 @@ main: { ldx #0 __b1: + // plots[i] = i txa sta plots,x + // SCREEN[i] = 0 lda #0 sta SCREEN,x + // for(byte i : 0..39) inx cpx #$28 bne __b1 __b2: + // line(0, 10) jsr line jmp __b2 } @@ -22,20 +26,28 @@ line: { .const x1 = $a ldy #x0 __b1: + // for(byte x = x0; x<=x1; x++) cpy #x1+1 bcc __b2 + // } rts __b2: + // plot(x) jsr plot + // for(byte x = x0; x<=x1; x++) iny jmp __b1 } // plot(byte register(Y) x) plot: { + // idx = plots[x] ldx plots,y + // SCREEN[idx]+1 lda SCREEN,x clc adc #1 + // SCREEN[idx] = SCREEN[idx]+1 sta SCREEN,x + // } rts } diff --git a/src/test/ref/const-identification.log b/src/test/ref/const-identification.log index d6bb1d514..9972c06c7 100644 --- a/src/test/ref/const-identification.log +++ b/src/test/ref/const-identification.log @@ -183,7 +183,7 @@ Identical Phi Values (byte) line::x1#2 (byte) line::x1#1 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [6] if((byte) main::i#1!=rangelast(0,$27)) goto main::@1 Simple Condition (bool~) line::$0 [14] if((byte) line::x0#0<(byte) line::x1#0) goto line::@1 -Simple Condition (bool~) line::$2 [22] if((byte) line::x#2<=(byte) line::x1#0) goto line::@6 +Simple Condition (bool~) line::$2 [19] if((byte) line::x#2<=(byte) line::x1#0) goto line::@6 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) line::x0#0 = 0 @@ -196,7 +196,7 @@ if() condition always true - replacing block destination [14] if((const byte) li Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++ Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,$27)) goto main::@1 to (number) $28 -Rewriting conditional comparison [22] if((byte) line::x#2<=(const byte) line::x1#0) goto line::@6 +Rewriting conditional comparison [19] if((byte) line::x#2<=(const byte) line::x1#0) goto line::@6 Removing unused block main::@return Removing PHI-reference to removed block (line::@3) in block plot Removing unused block line::@3 diff --git a/src/test/ref/const-if-problem.asm b/src/test/ref/const-if-problem.asm index fd23f1f84..0666b23a1 100644 --- a/src/test/ref/const-if-problem.asm +++ b/src/test/ref/const-if-problem.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // SCREEN[0] = 'a' lda #'a' sta SCREEN + // } rts } diff --git a/src/test/ref/const-int-cast-problem.asm b/src/test/ref/const-int-cast-problem.asm index 18e81d2b0..c62dfeac0 100644 --- a/src/test/ref/const-int-cast-problem.asm +++ b/src/test/ref/const-int-cast-problem.asm @@ -6,14 +6,18 @@ main: { ldx #$79 __b1: + // i>>4 txa lsr lsr lsr lsr + // SCREEN[i] = i>>4 sta SCREEN,x + // for( byte i: 121..122) inx cpx #$7b bne __b1 + // } rts } diff --git a/src/test/ref/const-mult-div.asm b/src/test/ref/const-mult-div.asm index 3c1a4040d..3d2776530 100644 --- a/src/test/ref/const-mult-div.asm +++ b/src/test/ref/const-mult-div.asm @@ -5,7 +5,9 @@ main: { .const b = 6*$e/3+mod($16,3) .label screen = $400 + // screen[0] = b lda #b sta screen + // } rts } diff --git a/src/test/ref/const-param.asm b/src/test/ref/const-param.asm index 9425f1222..971851d24 100644 --- a/src/test/ref/const-param.asm +++ b/src/test/ref/const-param.asm @@ -5,20 +5,32 @@ main: { .label reverse = $80 .label screen = $400 + // sum(reverse, 'c') lda #'c' jsr sum + // sum(reverse, 'c') + // screen[0] = sum(reverse, 'c') sta screen + // sum(reverse, 'm') lda #'m' jsr sum + // sum(reverse, 'm') + // screen[1] = sum(reverse, 'm') sta screen+1 + // sum(reverse, 'l') lda #'l' jsr sum + // sum(reverse, 'l') + // screen[2] = sum(reverse, 'l') sta screen+2 + // } rts } // sum(byte register(A) b) sum: { + // a+b clc adc #main.reverse + // } rts } diff --git a/src/test/ref/const-param.log b/src/test/ref/const-param.log index a6de6b28a..00b6d63f6 100644 --- a/src/test/ref/const-param.log +++ b/src/test/ref/const-param.log @@ -123,7 +123,7 @@ Constant (const byte) sum::b#1 = 'm' Constant (const byte) sum::a#2 = main::reverse Constant (const byte) sum::b#2 = 'l' Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::screen in [6] *((const byte*) main::screen + (byte) 0) ← (byte~) main::$0 +Simplifying expression containing zero main::screen in [5] *((const byte*) main::screen + (byte) 0) ← (byte~) main::$0 Successful SSA optimization PassNSimplifyExpressionWithZero Inlining constant with var siblings (const byte) sum::a#0 Inlining constant with var siblings (const byte) sum::b#0 diff --git a/src/test/ref/const-pointer.asm b/src/test/ref/const-pointer.asm index 29cd3df0e..2c289dfd0 100644 --- a/src/test/ref/const-pointer.asm +++ b/src/test/ref/const-pointer.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" main: { .label screen = $400 + // screen[0] = '*' lda #'*' sta screen + // } rts } diff --git a/src/test/ref/const-signed-promotion.asm b/src/test/ref/const-signed-promotion.asm index 4f008c947..e42507b5e 100644 --- a/src/test/ref/const-signed-promotion.asm +++ b/src/test/ref/const-signed-promotion.asm @@ -6,6 +6,7 @@ main: { .label screen = $400 ldx #0 __b1: + // world[i]= 400 txa asl tay @@ -13,13 +14,16 @@ main: { sta world,y lda #>$190 sta world+1,y + // for(byte i:0..2) inx cpx #3 bne __b1 + // *screen = world[0] lda world sta screen lda world+1 sta screen+1 + // } rts } world: .fill 2*3, 0 diff --git a/src/test/ref/const-word-pointer.asm b/src/test/ref/const-word-pointer.asm index 935f34ad4..c4f25ead8 100644 --- a/src/test/ref/const-word-pointer.asm +++ b/src/test/ref/const-word-pointer.asm @@ -7,21 +7,32 @@ main: { .label screen = $400 .label wp = w .label w = 2 + // w = $0d03 lda #<$d03 sta.z w lda #>$d03 sta.z w+1 + // <*wp lda.z wp + // screen[0] = <*wp sta screen + // >*wp lda.z wp+1 + // screen[1] = >*wp sta screen+1 + // *wp = $210c lda #<$210c sta.z wp lda #>$210c sta.z wp+1 + // <*wp lda.z wp + // screen[2] = <*wp sta screen+2 + // >*wp lda.z wp+1 + // screen[3] = >*wp sta screen+3 + // } rts } diff --git a/src/test/ref/constabsmin.asm b/src/test/ref/constabsmin.asm index eadb2ce4e..697620021 100644 --- a/src/test/ref/constabsmin.asm +++ b/src/test/ref/constabsmin.asm @@ -3,7 +3,9 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // *SCREEN = 1 lda #1 sta SCREEN + // } rts } diff --git a/src/test/ref/constant-string-concat-0.asm b/src/test/ref/constant-string-concat-0.asm index bf1814e95..c43c254e1 100644 --- a/src/test/ref/constant-string-concat-0.asm +++ b/src/test/ref/constant-string-concat-0.asm @@ -6,13 +6,17 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // for( byte i=0;msg[i]!=0;i++) lda msg,x cmp #0 bne __b2 + // } rts __b2: + // SCREEN[i] = msg[i] lda msg,x sta SCREEN,x + // for( byte i=0;msg[i]!=0;i++) inx jmp __b1 msg: .text "camelot" diff --git a/src/test/ref/constant-string-concat.asm b/src/test/ref/constant-string-concat.asm index 37b0d8bce..bda662329 100644 --- a/src/test/ref/constant-string-concat.asm +++ b/src/test/ref/constant-string-concat.asm @@ -6,11 +6,14 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // SCREEN[i] = s[i] lda s,x sta SCREEN,x + // for( byte i: 0..7) inx cpx #8 bne __b1 + // } rts s: .text "camelot" .byte 0 diff --git a/src/test/ref/constantmin.asm b/src/test/ref/constantmin.asm index 558292b30..08a528971 100644 --- a/src/test/ref/constantmin.asm +++ b/src/test/ref/constantmin.asm @@ -6,16 +6,21 @@ .label VIC = $d000 .const RED = 2 main: { + // *SCREEN = STAR lda #STAR sta SCREEN + // *BGCOL = RED lda #RED sta VIC+$10*2+1 ldx #$28 __b1: + // SCREEN[i] = (STAR+1) lda #STAR+1 sta SCREEN,x + // for(byte i: 40..79) inx cpx #$50 bne __b1 + // } rts } diff --git a/src/test/ref/constantmin.log b/src/test/ref/constantmin.log index 9b0c852a6..de2ff825a 100644 --- a/src/test/ref/constantmin.log +++ b/src/test/ref/constantmin.log @@ -78,16 +78,16 @@ Alias (byte*) BGCOL#0 = (byte*~) $1 (byte*) BGCOL#2 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) BGCOL#1 (byte*) BGCOL#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$0 [11] if((byte) main::i#1!=rangelast($28,$4f)) goto main::@1 +Simple Condition (bool~) main::$0 [10] if((byte) main::i#1!=rangelast($28,$4f)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte*~) $0 ← (const byte*) VIC + (byte)(number) $10*(number) 2 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) $0 = VIC+(byte)$10*2 Constant (const byte) main::i#0 = $28 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast($28,$4f)) goto main::@1 to (number) $50 -Converting *(pointer+n) to pointer[n] [5] *((byte*) BGCOL#0) ← (const byte) RED -- *($0 + 1) +Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast($28,$4f)) goto main::@1 to (number) $50 +Converting *(pointer+n) to pointer[n] [4] *((byte*) BGCOL#0) ← (const byte) RED -- *($0 + 1) Successful SSA optimization Pass2InlineDerefIdx Eliminating unused variable (byte*) BGCOL#0 and assignment [0] (byte*) BGCOL#0 ← (const byte*) $0 + (byte) 1 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/constants.asm b/src/test/ref/constants.asm index 13dcdd67d..770fbe73c 100644 --- a/src/test/ref/constants.asm +++ b/src/test/ref/constants.asm @@ -7,11 +7,16 @@ .label print_char_cursor = 2 .label print_line_cursor = 4 main: { + // print_cls() jsr print_cls + // *BGCOL = GREEN lda #GREEN sta BGCOL + // test_bytes() jsr test_bytes + // test_sbytes() jsr test_sbytes + // } rts } // Test different signed byte constants @@ -21,6 +26,7 @@ test_sbytes: { .const bc = 2 .const bd = bc-4 .const be = -bd + // assert_sbyte("0=0", bb, 0) lda #0 sta.z assert_sbyte.c ldx #bb @@ -29,6 +35,7 @@ test_sbytes: { lda #>msg sta.z assert_sbyte.msg+1 jsr assert_sbyte + // assert_sbyte("0+2=2", bc, 2) lda #2 sta.z assert_sbyte.c ldx #bc @@ -37,6 +44,7 @@ test_sbytes: { lda #>msg1 sta.z assert_sbyte.msg+1 jsr assert_sbyte + // assert_sbyte("0+2-4=-2", bd, -2) lda #-2 sta.z assert_sbyte.c ldx #bd @@ -45,6 +53,7 @@ test_sbytes: { lda #>msg2 sta.z assert_sbyte.msg+1 jsr assert_sbyte + // assert_sbyte("-(0+2-4)=2", be, 2) lda #2 sta.z assert_sbyte.c ldx #be @@ -53,6 +62,7 @@ test_sbytes: { lda #>msg3 sta.z assert_sbyte.msg+1 jsr assert_sbyte + // assert_sbyte("-127-127=2", bf, 2) lda #2 sta.z assert_sbyte.c ldx #bf @@ -61,6 +71,7 @@ test_sbytes: { lda #>msg4 sta.z assert_sbyte.msg+1 jsr assert_sbyte + // } rts msg2: .text "0+2-4=-2" .byte 0 @@ -73,29 +84,38 @@ test_sbytes: { assert_sbyte: { .label msg = 7 .label c = 6 + // print_str(msg) lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str(msg) jsr print_str + // print_str(" ") lda #str sta.z print_str.str+1 jsr print_str + // if(b!=c) cpx.z c bne __b1 + // print_str("ok") lda #str2 sta.z print_str.str+1 jsr print_str __b2: + // print_ln() jsr print_ln + // } rts __b1: + // *BGCOL = RED lda #RED sta BGCOL + // print_str("fail!") lda #str1 @@ -108,15 +128,19 @@ assert_sbyte: { print_str: { .label str = 7 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -130,6 +154,7 @@ print_str: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -137,6 +162,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor$400 @@ -172,6 +200,7 @@ test_bytes: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // assert_byte("0+2=2", bc, 2) lda #2 sta.z assert_byte.c ldx #bc @@ -184,6 +213,7 @@ test_bytes: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // assert_byte("0+2-4=254", bd, 254) lda #$fe sta.z assert_byte.c ldx #bd @@ -192,6 +222,7 @@ test_bytes: { lda #>msg2 sta.z assert_byte.msg+1 jsr assert_byte + // } rts msg2: .text "0+2-4=254" .byte 0 @@ -200,25 +231,33 @@ test_bytes: { assert_byte: { .label msg = 7 .label c = 6 + // print_str(msg) jsr print_str + // print_str(" ") lda #str sta.z print_str.str+1 jsr print_str + // if(b!=c) cpx.z c bne __b1 + // print_str("ok") lda #str2 sta.z print_str.str+1 jsr print_str __b2: + // print_ln() jsr print_ln + // } rts __b1: + // *BGCOL = RED lda #RED sta BGCOL + // print_str("fail!") lda #str1 @@ -228,7 +267,9 @@ assert_byte: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -243,17 +284,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #(angle_w+0x0080) lda.z __10+1 tax + // diff(ang_w, *screen_ref) ldy #0 lda (screen_ref),y jsr diff + // diff_sum += diff(ang_w, *screen_ref) //*screen = (>angle_w)-angle_b; //*screen = >angle_w; clc @@ -71,29 +81,37 @@ main: { bcc !+ inc.z diff_sum+1 !: + // ang_w - *screen_ref txa sec ldy #0 sbc (screen_ref),y + // *screen = ang_w - *screen_ref sta (screen),y + // screen++; inc.z screen bne !+ inc.z screen+1 !: + // screen_ref++; inc.z screen_ref bne !+ inc.z screen_ref+1 !: + // for(signed byte x: -19..20) inc.z x lda #$15 cmp.z x bne __b2 + // for(signed byte y: -12..12) inc.z y lda #$d cmp.z y bne __b1 + // print_word(diff_sum) jsr print_word __b5: + // (*col00)++; inc col00 jmp __b5 } @@ -101,6 +119,7 @@ main: { // print_word(word zp($c) w) print_word: { .label w = $c + // print_byte(>w) lda.z w+1 tax lda #<$400 @@ -108,41 +127,52 @@ print_word: { lda #>$400 sta.z print_char_cursor+1 jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // diff(byte register(X) bb1, byte register(A) bb2) diff: { + // (bb1=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -184,6 +217,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -201,15 +235,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -218,8 +256,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -228,6 +268,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -241,21 +282,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -263,6 +310,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -270,6 +318,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -281,6 +330,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -288,6 +338,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -295,6 +346,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -302,6 +354,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -314,6 +367,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -322,6 +376,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -330,6 +385,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -374,6 +430,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -381,6 +438,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -389,22 +447,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -412,6 +479,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -419,10 +487,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -430,10 +500,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/cordic-atan2-16-ref.log b/src/test/ref/cordic-atan2-16-ref.log index d2ae3ca1f..af0a8d13a 100644 --- a/src/test/ref/cordic-atan2-16-ref.log +++ b/src/test/ref/cordic-atan2-16-ref.log @@ -1373,22 +1373,22 @@ Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Identical Phi Values (byte*) print_char_cursor#33 (byte*) print_char_cursor#0 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) atan2_16::$0 [38] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [60] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [69] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [72] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [83] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [100] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [104] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$14 [215] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 -Simple Condition (bool~) main::$15 [219] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 -Simple Condition (bool~) diff::$0 [234] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 +Simple Condition (bool~) init_font_hex::$4 [28] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [32] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) atan2_16::$0 [36] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [40] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [47] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [51] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [54] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [59] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [62] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [76] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$14 [154] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 +Simple Condition (bool~) main::$15 [157] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 +Simple Condition (bool~) diff::$0 [167] if((byte) diff::bb1#0<(byte) diff::bb2#0) goto diff::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [100] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [76] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant (const byte) init_font_hex::c#0 = 0 @@ -1411,20 +1411,20 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [226] if(true) goto main::@6 +if() condition always true - replacing block destination [162] if(true) goto main::@6 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [98] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [100] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [213] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [215] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 -Resolved ranged next value [217] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [219] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d +Resolved ranged next value [26] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [30] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [74] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [152] main::x#1 ← ++ main::x#2 to ++ +Resolved ranged comparison value [154] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 +Resolved ranged next value [155] main::y#1 ← ++ main::y#4 to ++ +Resolved ranged comparison value [157] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 diff --git a/src/test/ref/cordic-atan2-16.asm b/src/test/ref/cordic-atan2-16.asm index ab016417c..06709c27d 100644 --- a/src/test/ref/cordic-atan2-16.asm +++ b/src/test/ref/cordic-atan2-16.asm @@ -20,7 +20,9 @@ main: { .label screen = 8 .label x = $f .label y = $a + // init_font_hex(CHARSET) jsr init_font_hex + // *D018 = toD018(SCREEN, CHARSET) lda #toD0181_return sta D018 lda #(angle_w+0x0080) lda.z __9+1 + // *screen++ = ang_w ldy #0 sta (screen),y + // *screen++ = ang_w; inc.z screen bne !+ inc.z screen+1 !: + // for(signed byte x: -19..20) inc.z x lda #$15 cmp.z x bne __b2 + // for(signed byte y: -12..12) inc.z y lda #$d cmp.z y bne __b1 __b4: + // (*col00)++; inc col00 jmp __b4 } @@ -82,6 +95,7 @@ atan2_16: { .label return = 2 .label x = $11 .label y = $13 + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -94,6 +108,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -111,15 +126,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -128,8 +147,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -138,6 +159,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -151,21 +173,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -173,6 +201,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -180,6 +209,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -191,6 +221,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -198,6 +229,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -205,6 +237,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -212,6 +245,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -224,6 +258,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -232,6 +267,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -240,6 +276,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -284,6 +321,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -291,6 +329,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -299,22 +338,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -322,6 +370,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -329,10 +378,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -340,10 +391,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/cordic-atan2-16.log b/src/test/ref/cordic-atan2-16.log index a8a4a06d2..2bf3159e3 100644 --- a/src/test/ref/cordic-atan2-16.log +++ b/src/test/ref/cordic-atan2-16.log @@ -986,21 +986,21 @@ Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) atan2_16::$0 [38] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [60] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [69] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [72] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [83] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [100] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [104] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$11 [165] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 -Simple Condition (bool~) main::$12 [169] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 +Simple Condition (bool~) init_font_hex::$4 [28] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [32] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) atan2_16::$0 [36] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [40] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [47] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [51] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [54] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [59] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [62] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [76] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$11 [120] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 +Simple Condition (bool~) main::$12 [123] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [100] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [76] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant (const byte) init_font_hex::c#0 = 0 @@ -1020,20 +1020,20 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [170] if(true) goto main::@6 +if() condition always true - replacing block destination [124] if(true) goto main::@6 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [98] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [100] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [163] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [165] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 -Resolved ranged next value [167] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [169] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d +Resolved ranged next value [26] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [30] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [74] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [118] main::x#1 ← ++ main::x#2 to ++ +Resolved ranged comparison value [120] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 +Resolved ranged next value [121] main::y#1 ← ++ main::y#4 to ++ +Resolved ranged comparison value [123] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 diff --git a/src/test/ref/cordic-atan2-clear.asm b/src/test/ref/cordic-atan2-clear.asm index 3a59a1882..bcc690cd3 100644 --- a/src/test/ref/cordic-atan2-clear.asm +++ b/src/test/ref/cordic-atan2-clear.asm @@ -13,18 +13,23 @@ main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f // Clear the screen by modifying the charset .label clear_char = 2 + // init_font_hex(CHARSET) jsr init_font_hex + // *D018 = toD018(SCREEN, CHARSET) lda #toD0181_return sta D018 + // init_angle_screen(SCREEN) jsr init_angle_screen lda #CHARSET sta.z clear_char+1 __b2: + // while(*RASTER!=0xff) lda #$ff cmp RASTER bne __b2 + // if(clear_charCHARSET+$800 bcc !+ @@ -33,9 +38,11 @@ main: { cmp #$28 sta.z screen_topline+1 + // screen_bottomline += 40 lda #$28 clc adc.z screen_bottomline @@ -88,25 +98,35 @@ init_angle_screen: { bcc !+ inc.z screen_bottomline+1 !: + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b3: + // x*2 lda.z x asl + // 39-x*2 eor #$ff clc adc #$27+1 + // (word){ 39-x*2, 0 } ldy #0 sta.z xw+1 sty.z xw + // y*2 lda.z y asl + // (word){ y*2, 0 } sta.z yw+1 sty.z yw + // atan2_16(xw, yw) jsr atan2_16 + // angle_w = atan2_16(xw, yw) + // angle_w+0x0080 lda #$80 clc adc.z __11 @@ -114,25 +134,34 @@ init_angle_screen: { bcc !+ inc.z __11+1 !: + // ang_w = >(angle_w+0x0080) lda.z __11+1 sta.z ang_w + // 0x80+ang_w lda #$80 clc adc.z ang_w + // screen_topline[x] = 0x80+ang_w ldy.z x sta (screen_topline),y + // 0x80-ang_w lda #$80 sec sbc.z ang_w + // screen_bottomline[x] = 0x80-ang_w sta (screen_bottomline),y + // -ang_w lda.z ang_w eor #$ff clc adc #1 + // screen_topline[xb] = -ang_w ldy.z xb sta (screen_topline),y + // screen_bottomline[xb] = ang_w lda.z ang_w sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b2 @@ -152,6 +181,7 @@ atan2_16: { .label return = 4 .label x = $13 .label y = $15 + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -164,6 +194,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -181,15 +212,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -198,8 +233,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -208,6 +245,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -221,21 +259,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -243,6 +287,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -250,6 +295,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -261,6 +307,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -268,6 +315,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -275,6 +323,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -282,6 +331,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -294,6 +344,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -302,6 +353,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -310,6 +362,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -354,6 +407,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -361,6 +415,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -369,22 +424,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -392,6 +456,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -399,10 +464,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -410,10 +477,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/cordic-atan2-clear.log b/src/test/ref/cordic-atan2-clear.log index 981c6c0bd..a270c8a2a 100644 --- a/src/test/ref/cordic-atan2-clear.log +++ b/src/test/ref/cordic-atan2-clear.log @@ -1132,23 +1132,23 @@ Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) atan2_16::$0 [38] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [60] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [69] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [72] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [83] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [100] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [104] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$3 [143] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) main::$5 [147] if((byte*) main::clear_char#5>=(const byte*) CHARSET+(word) $800) goto main::@1 -Simple Condition (bool~) init_angle_screen::$2 [163] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [200] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_font_hex::$4 [28] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [32] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) atan2_16::$0 [36] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [40] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [47] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [51] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [54] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [59] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [62] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [76] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$3 [105] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) main::$5 [107] if((byte*) main::clear_char#5>=(const byte*) CHARSET+(word) $800) goto main::@1 +Simple Condition (bool~) init_angle_screen::$2 [120] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [148] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [100] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [76] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant (const byte) init_font_hex::c#0 = 0 @@ -1170,19 +1170,19 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [140] if(true) goto main::@4 +if() condition always true - replacing block destination [102] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [98] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [100] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [198] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [200] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Rewriting conditional comparison [163] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Resolved ranged next value [26] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [30] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [74] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [146] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [148] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Rewriting conditional comparison [120] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 diff --git a/src/test/ref/cordic-atan2.asm b/src/test/ref/cordic-atan2.asm index a6b382bfc..08eeae257 100644 --- a/src/test/ref/cordic-atan2.asm +++ b/src/test/ref/cordic-atan2.asm @@ -16,7 +16,9 @@ main: { .label screen = 3 .label x = $a .label y = 5 + // init_font_hex(CHARSET) jsr init_font_hex + // *D018 = toD018(SCREEN, CHARSET) lda #toD0181_return sta D018 lda #0)?y:-y lda.z y cmp #0 beq !+ @@ -74,6 +84,7 @@ atan2_8: { adc #1 tax __b3: + // (x>0)?x:-x lda.z x cmp #0 beq !+ @@ -91,31 +102,39 @@ atan2_8: { sta.z angle sta.z i __b10: + // if(yi==0) txa cmp #0 bne __b11 __b12: + // angle = angle/2 lda.z angle lsr tax + // if(x<0) lda.z x cmp #0 bpl __b7 + // angle = 128-angle txa eor #$ff tax axs #-$80-1 __b7: + // if(y<0) lda.z y cmp #0 bpl __b8 + // angle = -angle dex txa eor #$ff tax __b8: + // } rts __b11: + // xd = xi>>i lda.z xi ldy.z i cpy #0 @@ -127,6 +146,7 @@ atan2_8: { bne !l- !e: sta.z xd + // yd = yi>>i ldy.z i txa cpy #0 @@ -138,40 +158,48 @@ atan2_8: { bne !l- !e: tay + // if(yi>0) txa cmp #0 beq !+ bpl __b13 !: + // xi -= yd tya eor #$ff sec adc.z xi sta.z xi + // yi += xd txa clc adc.z xd tax + // angle -= CORDIC_ATAN2_ANGLES_8[i] lda.z angle ldy.z i sec sbc CORDIC_ATAN2_ANGLES_8,y sta.z angle __b14: + // for( byte i: 0..CORDIC_ITERATIONS_8-1) inc.z i lda #CORDIC_ITERATIONS_8-1+1 cmp.z i beq __b12 jmp __b10 __b13: + // xi += yd tya clc adc.z xi sta.z xi + // yi -= xd txa sec sbc.z xd tax + // angle += CORDIC_ATAN2_ANGLES_8[i] lda.z angle ldy.z i clc @@ -214,6 +242,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -221,6 +250,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -229,22 +259,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -252,6 +291,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -259,10 +299,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -270,10 +312,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/cordic-atan2.log b/src/test/ref/cordic-atan2.log index 22c099fc4..6ab18d7e7 100644 --- a/src/test/ref/cordic-atan2.log +++ b/src/test/ref/cordic-atan2.log @@ -770,19 +770,19 @@ Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::pr Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) atan2_8::$0 [38] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 -Simple Condition (bool~) atan2_8::$5 [47] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 -Simple Condition (bool~) atan2_8::$18 [60] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@16 -Simple Condition (bool~) atan2_8::$21 [67] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@18 -Simple Condition (bool~) atan2_8::$12 [73] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7 -Simple Condition (bool~) atan2_8::$22 [85] if((byte) atan2_8::i#1!=rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@15 -Simple Condition (bool~) atan2_8::$15 [89] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8 -Simple Condition (bool~) main::$3 [137] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 -Simple Condition (bool~) main::$4 [141] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 +Simple Condition (bool~) init_font_hex::$4 [28] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [32] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) atan2_8::$0 [36] if((signed byte) atan2_8::y#0>(signed byte) 0) goto atan2_8::@1 +Simple Condition (bool~) atan2_8::$5 [40] if((signed byte) atan2_8::x#0>(signed byte) 0) goto atan2_8::@4 +Simple Condition (bool~) atan2_8::$18 [47] if((signed byte) atan2_8::yi#3!=(signed byte) 0) goto atan2_8::@16 +Simple Condition (bool~) atan2_8::$21 [51] if((signed byte) atan2_8::yi#3>(signed byte) 0) goto atan2_8::@18 +Simple Condition (bool~) atan2_8::$12 [55] if((signed byte) atan2_8::x#0>=(signed byte) 0) goto atan2_8::@7 +Simple Condition (bool~) atan2_8::$22 [65] if((byte) atan2_8::i#1!=rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@15 +Simple Condition (bool~) atan2_8::$15 [68] if((signed byte) atan2_8::y#0>=(signed byte) 0) goto atan2_8::@8 +Simple Condition (bool~) main::$3 [101] if((signed byte) main::x#1!=rangelast(-$13,$14)) goto main::@2 +Simple Condition (bool~) main::$4 [104] if((signed byte) main::y#1!=rangelast(-$c,$c)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [85] if((byte) atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 +Negating conditional jump and destination [65] if((byte) atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant (const byte) init_font_hex::c#0 = 0 @@ -802,20 +802,20 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [142] if(true) goto main::@6 +if() condition always true - replacing block destination [105] if(true) goto main::@6 Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [83] atan2_8::i#1 ← ++ atan2_8::i#2 to ++ -Resolved ranged comparison value [85] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 to (const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1 -Resolved ranged next value [135] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [137] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 -Resolved ranged next value [139] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [141] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d +Resolved ranged next value [26] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [30] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [63] atan2_8::i#1 ← ++ atan2_8::i#2 to ++ +Resolved ranged comparison value [65] if(atan2_8::i#1==rangelast(0,CORDIC_ITERATIONS_8-1)) goto atan2_8::@17 to (const byte) CORDIC_ITERATIONS_8-(byte) 1+(number) 1 +Resolved ranged next value [99] main::x#1 ← ++ main::x#2 to ++ +Resolved ranged comparison value [101] if(main::x#1!=rangelast(-$13,$14)) goto main::@2 to (number) $15 +Resolved ranged next value [102] main::y#1 ← ++ main::y#4 to ++ +Resolved ranged comparison value [104] if(main::y#1!=rangelast(-$c,$c)) goto main::@1 to (number) $d Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 diff --git a/src/test/ref/cpu-6502.asm b/src/test/ref/cpu-6502.asm index b970f6b0b..48f93756f 100644 --- a/src/test/ref/cpu-6502.asm +++ b/src/test/ref/cpu-6502.asm @@ -7,21 +7,28 @@ main: { .label screen = $400 ldx #0 __b1: + // while(c<100) cpx #$64 bcc __b2 + // } rts __b2: + // screen[c] = '*' lda #'*' sta screen,x + // c&4 txa and #4 + // if((c&4)==0) cmp #0 bne __b3 + // c+=5 txa clc adc #5 tax __b3: + // c++; inx jmp __b1 } diff --git a/src/test/ref/cpu-6502.log b/src/test/ref/cpu-6502.log index ccfd4b36a..4a2ba52fd 100644 --- a/src/test/ref/cpu-6502.log +++ b/src/test/ref/cpu-6502.log @@ -90,7 +90,7 @@ Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::c#3 = (byte) main::c#4 (byte) main::c#6 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [3] if((byte) main::c#3<(byte) $64) goto main::@2 -Simple Condition (bool~) main::$3 [9] if((byte~) main::$1!=(byte) 0) goto main::@4 +Simple Condition (bool~) main::$3 [7] if((byte~) main::$1!=(byte) 0) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::c#0 = 0 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/danny-joystick-problem.asm b/src/test/ref/danny-joystick-problem.asm index f9adc5f8c..6004688a4 100644 --- a/src/test/ref/danny-joystick-problem.asm +++ b/src/test/ref/danny-joystick-problem.asm @@ -7,11 +7,16 @@ .label CIA2_PORT_B = $dd01 .label SCREEN = $400 main: { + // (*CIA2_PORT_B) &= 0x7f lda #$7f and CIA2_PORT_B sta CIA2_PORT_B + // asm lda #0 + // port4Value = *CIA2_PORT_B lda CIA2_PORT_B + // *SCREEN = port4Value sta SCREEN + // } rts } diff --git a/src/test/ref/declared-memory-var-0.asm b/src/test/ref/declared-memory-var-0.asm index e91701112..b7863433d 100644 --- a/src/test/ref/declared-memory-var-0.asm +++ b/src/test/ref/declared-memory-var-0.asm @@ -6,15 +6,19 @@ main: { ldx #0 __b1: + // SCREEN[i] = idx lda idx sta SCREEN,x + // idx +=i txa clc adc idx sta idx + // for( char i: 0..5 ) inx cpx #6 bne __b1 + // } rts } idx: .byte 0 diff --git a/src/test/ref/declared-memory-var-1.asm b/src/test/ref/declared-memory-var-1.asm index 8e7553658..5a1c8e6f4 100644 --- a/src/test/ref/declared-memory-var-1.asm +++ b/src/test/ref/declared-memory-var-1.asm @@ -8,15 +8,19 @@ main: { ldx #0 __b1: + // SCREEN[i] = *idx_p lda idx_p sta SCREEN,x + // *idx_p +=i txa clc adc idx_p sta idx_p + // for( char i: 0..5 ) inx cpx #6 bne __b1 + // } rts } idx: .byte 0 diff --git a/src/test/ref/declared-memory-var-2.asm b/src/test/ref/declared-memory-var-2.asm index ca65c9b49..2318c1090 100644 --- a/src/test/ref/declared-memory-var-2.asm +++ b/src/test/ref/declared-memory-var-2.asm @@ -7,6 +7,7 @@ main: { ldx #0 __b1: + // *cursor = '*' lda #'*' ldy cursor sty.z $fe @@ -14,6 +15,7 @@ main: { sty.z $ff ldy #0 sta ($fe),y + // cursor += 41 lda #$29 clc adc cursor @@ -21,9 +23,11 @@ main: { bcc !+ inc cursor+1 !: + // for( char i: 0..24 ) inx cpx #$19 bne __b1 + // } rts } cursor: .word SCREEN diff --git a/src/test/ref/declared-memory-var-3.asm b/src/test/ref/declared-memory-var-3.asm index f94e32f31..7554b9219 100644 --- a/src/test/ref/declared-memory-var-3.asm +++ b/src/test/ref/declared-memory-var-3.asm @@ -7,10 +7,13 @@ main: { .label SCREEN = $400 .label barp = bar + // SCREEN[i++] = barp->thing1 lda barp sta SCREEN + // SCREEN[i++] = barp->thing2 lda barp+OFFSET_STRUCT_FOO_THING2 sta SCREEN+1 + // } rts } bar: .byte 'a', 'b' diff --git a/src/test/ref/declared-memory-var-4.asm b/src/test/ref/declared-memory-var-4.asm index f54a3b4d5..f1b2605e7 100644 --- a/src/test/ref/declared-memory-var-4.asm +++ b/src/test/ref/declared-memory-var-4.asm @@ -8,19 +8,25 @@ main: { .label SCREEN = $400 .label barp = bar + // SCREEN[i++] = barp->thing1 lda barp sta SCREEN + // SCREEN[i++] = barp->thing2 lda barp+OFFSET_STRUCT_FOO_THING2 sta SCREEN+1 ldx #2 ldy #0 __b1: + // SCREEN[i++] = barp->thing3[j] lda barp+OFFSET_STRUCT_FOO_THING3,y sta SCREEN,x + // SCREEN[i++] = barp->thing3[j]; inx + // for( char j: 0..11) iny cpy #$c bne __b1 + // } rts } bar: .byte 'a', 'b' diff --git a/src/test/ref/declared-memory-var-5.asm b/src/test/ref/declared-memory-var-5.asm index f4e3888f2..596a48c49 100644 --- a/src/test/ref/declared-memory-var-5.asm +++ b/src/test/ref/declared-memory-var-5.asm @@ -6,10 +6,13 @@ .const OFFSET_STRUCT_FOO_THING2 = 1 main: { .label SCREEN = $400 + // SCREEN[i++] = bar.thing1 lda bar sta SCREEN + // SCREEN[i++] = bar.thing2 lda bar+OFFSET_STRUCT_FOO_THING2 sta SCREEN+1 + // } rts } bar: .byte 'a', 'b' diff --git a/src/test/ref/declared-memory-var-6.asm b/src/test/ref/declared-memory-var-6.asm index ebac86514..f27399253 100644 --- a/src/test/ref/declared-memory-var-6.asm +++ b/src/test/ref/declared-memory-var-6.asm @@ -14,32 +14,46 @@ main: { .const default_zp_abs = '.' .const default_mem_flex = '.' .const default_mem_abs = '.' + // out(reg_zp_flex) ldx #0 lda #reg_zp_flex jsr out + // out(reg_zp_abs) lda #reg_zp_abs jsr out + // out(reg_mem_flex) lda #reg_mem_flex jsr out + // out(reg_mem_abs) lda #reg_mem_abs jsr out + // out(default_default) lda #default_default jsr out + // out(reg_default) lda #reg_default jsr out + // out(default_zp_flex) lda #default_zp_flex jsr out + // out(default_zp_abs) lda #default_zp_abs jsr out + // out(default_mem_flex) lda #default_mem_flex jsr out + // out(default_mem_abs) lda #default_mem_abs jsr out + // } rts } // out(byte register(A) c) out: { + // SCREEN[i++] = c sta SCREEN,x + // SCREEN[i++] = c; inx + // } rts } diff --git a/src/test/ref/declared-memory-var-7.asm b/src/test/ref/declared-memory-var-7.asm index 4f9b81e97..a48a5f226 100644 --- a/src/test/ref/declared-memory-var-7.asm +++ b/src/test/ref/declared-memory-var-7.asm @@ -6,6 +6,7 @@ .label SCREEN = $400 .label idx = 2 __bbegin: + // idx lda #0 sta.z idx jsr main @@ -13,14 +14,18 @@ __bbegin: main: { ldx #0 __b1: + // SCREEN[i] = idx lda.z idx sta SCREEN,x + // idx +=i txa clc adc.z idx sta.z idx + // for( char i: 0..5 ) inx cpx #6 bne __b1 + // } rts } diff --git a/src/test/ref/declared-memory-var-8.asm b/src/test/ref/declared-memory-var-8.asm index aae35878d..5955cde1b 100644 --- a/src/test/ref/declared-memory-var-8.asm +++ b/src/test/ref/declared-memory-var-8.asm @@ -6,6 +6,7 @@ .label SCREEN = $400 .label idx = $1000 __bbegin: + // idx lda #0 sta idx jsr main @@ -13,14 +14,18 @@ __bbegin: main: { ldx #0 __b1: + // SCREEN[i] = idx lda idx sta SCREEN,x + // idx +=i txa clc adc idx sta idx + // for( char i: 0..5 ) inx cpx #6 bne __b1 + // } rts } diff --git a/src/test/ref/declared-ssa-var-0.asm b/src/test/ref/declared-ssa-var-0.asm index 5c1ccb961..4212c733a 100644 --- a/src/test/ref/declared-ssa-var-0.asm +++ b/src/test/ref/declared-ssa-var-0.asm @@ -8,73 +8,100 @@ .label SCREEN4 = $400+$78 .label idx_nssa_g = 2 __bbegin: + // idx_nssa_g lda #0 sta.z idx_nssa_g jsr main rts main: { .label idx_nssa_l = 3 + // idx_nssa_l lda #0 sta.z idx_nssa_l + // SCREEN1[idx_ssa_g++] = 'C' lda #'C' sta SCREEN1 ldy #1 ldx #'M' __b1: + // SCREEN1[idx_ssa_g++] = i txa sta SCREEN1,y + // SCREEN1[idx_ssa_g++] = i; iny + // for( char i: 'M'..'L') dex cpx #'L'-1 bne __b1 + // SCREEN1[idx_ssa_g++] = '!' lda #'!' sta SCREEN1,y + // SCREEN2[idx_nssa_g++] = 'C' lda #'C' ldy.z idx_nssa_g sta SCREEN2,y + // SCREEN2[idx_nssa_g++] = 'C'; inc.z idx_nssa_g lda #'M' __b3: + // SCREEN2[idx_nssa_g++] = i ldy.z idx_nssa_g sta SCREEN2,y + // SCREEN2[idx_nssa_g++] = i; inc.z idx_nssa_g + // for( char i: 'M'..'L') sec sbc #1 cmp #'L'-1 bne __b3 + // SCREEN2[idx_nssa_g++] = '!' lda #'!' ldy.z idx_nssa_g sta SCREEN2,y + // SCREEN2[idx_nssa_g++] = '!'; inc.z idx_nssa_g + // SCREEN3[idx_ssa_l++] = 'C' lda #'C' sta SCREEN3 ldy #1 ldx #'M' __b5: + // SCREEN3[idx_ssa_l++] = i txa sta SCREEN3,y + // SCREEN3[idx_ssa_l++] = i; iny + // for( char i: 'M'..'L') dex cpx #'L'-1 bne __b5 + // SCREEN3[idx_ssa_l++] = '!' lda #'!' sta SCREEN3,y + // SCREEN4[idx_nssa_l++] = 'C' lda #'C' ldy.z idx_nssa_l sta SCREEN4,y + // SCREEN4[idx_nssa_l++] = 'C'; inc.z idx_nssa_l lda #'M' __b7: + // SCREEN4[idx_nssa_l++] = i ldy.z idx_nssa_l sta SCREEN4,y + // SCREEN4[idx_nssa_l++] = i; inc.z idx_nssa_l + // for( char i: 'M'..'L') sec sbc #1 cmp #'L'-1 bne __b7 + // SCREEN4[idx_nssa_l++] = '!' lda #'!' ldy.z idx_nssa_l sta SCREEN4,y + // SCREEN4[idx_nssa_l++] = '!'; inc.z idx_nssa_l + // } rts } diff --git a/src/test/ref/declared-ssa-var-0.log b/src/test/ref/declared-ssa-var-0.log index 561bb4661..a8ad7ea74 100644 --- a/src/test/ref/declared-ssa-var-0.log +++ b/src/test/ref/declared-ssa-var-0.log @@ -193,9 +193,9 @@ Identical Phi Values (byte) idx_ssa_g#12 (byte) idx_ssa_g#14 Identical Phi Values (byte) idx_ssa_g#10 (byte) idx_ssa_g#12 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [13] if((byte) main::i#1!=rangelast('M','L')) goto main::@1 -Simple Condition (bool~) main::$1 [25] if((byte) main::i1#1!=rangelast('M','L')) goto main::@3 -Simple Condition (bool~) main::$2 [37] if((byte) main::i2#1!=rangelast('M','L')) goto main::@5 -Simple Condition (bool~) main::$3 [49] if((byte) main::i3#1!=rangelast('M','L')) goto main::@7 +Simple Condition (bool~) main::$1 [24] if((byte) main::i1#1!=rangelast('M','L')) goto main::@3 +Simple Condition (bool~) main::$2 [35] if((byte) main::i2#1!=rangelast('M','L')) goto main::@5 +Simple Condition (bool~) main::$3 [46] if((byte) main::i3#1!=rangelast('M','L')) goto main::@7 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) idx_ssa_g#0 = 0 Constant (const byte) main::idx_ssa_l#0 = 0 @@ -206,14 +206,14 @@ Constant (const byte) main::i3#0 = 'M' Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [11] main::i#1 ← -- main::i#2 to -- Resolved ranged comparison value [13] if(main::i#1!=rangelast('M','L')) goto main::@1 to (byte) 'L'-(number) 1 -Resolved ranged next value [23] main::i1#1 ← -- main::i1#2 to -- -Resolved ranged comparison value [25] if(main::i1#1!=rangelast('M','L')) goto main::@3 to (byte) 'L'-(number) 1 -Resolved ranged next value [35] main::i2#1 ← -- main::i2#2 to -- -Resolved ranged comparison value [37] if(main::i2#1!=rangelast('M','L')) goto main::@5 to (byte) 'L'-(number) 1 -Resolved ranged next value [47] main::i3#1 ← -- main::i3#2 to -- -Resolved ranged comparison value [49] if(main::i3#1!=rangelast('M','L')) goto main::@7 to (byte) 'L'-(number) 1 +Resolved ranged next value [22] main::i1#1 ← -- main::i1#2 to -- +Resolved ranged comparison value [24] if(main::i1#1!=rangelast('M','L')) goto main::@3 to (byte) 'L'-(number) 1 +Resolved ranged next value [33] main::i2#1 ← -- main::i2#2 to -- +Resolved ranged comparison value [35] if(main::i2#1!=rangelast('M','L')) goto main::@5 to (byte) 'L'-(number) 1 +Resolved ranged next value [44] main::i3#1 ← -- main::i3#2 to -- +Resolved ranged comparison value [46] if(main::i3#1!=rangelast('M','L')) goto main::@7 to (byte) 'L'-(number) 1 Simplifying expression containing zero SCREEN1 in [5] *((const byte*) SCREEN1 + (const byte) idx_ssa_g#0) ← (byte) 'C' -Simplifying expression containing zero SCREEN3 in [29] *((const byte*) SCREEN3 + (const byte) main::idx_ssa_l#0) ← (byte) 'C' +Simplifying expression containing zero SCREEN3 in [27] *((const byte*) SCREEN3 + (const byte) main::idx_ssa_l#0) ← (byte) 'C' Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) idx_ssa_g#3 and assignment [10] (byte) idx_ssa_g#3 ← ++ (byte) idx_ssa_g#2 Eliminating unused variable (byte) main::idx_ssa_l#3 and assignment [28] (byte) main::idx_ssa_l#3 ← ++ (byte) main::idx_ssa_l#2 diff --git a/src/test/ref/deep-nesting.asm b/src/test/ref/deep-nesting.asm index 8637ea14c..7dc99b09a 100644 --- a/src/test/ref/deep-nesting.asm +++ b/src/test/ref/deep-nesting.asm @@ -4,504 +4,705 @@ .pc = $80d "Program" main: { .label screen = $400 + // f1(0) jsr f1 + // screen[0] = f1(0) lda #f1.return sta screen + // } rts } f1: { .label return = f2.return+1 + // f2(x) jsr f2 + // } rts } f2: { .label return = f3.return+1 + // f3(x) jsr f3 + // } rts } f3: { .label return = f4.return+1 + // f4(x) jsr f4 + // } rts } f4: { .label return = f5.return+1 + // f5(x) jsr f5 + // } rts } f5: { .label return = f6.return+1 + // f6(x) jsr f6 + // } rts } f6: { .label return = f7.return+1 + // f7(x) jsr f7 + // } rts } f7: { .label return = f8.return+1 + // f8(x) jsr f8 + // } rts } f8: { .label return = f9.return+1 + // f9(x) jsr f9 + // } rts } f9: { .label return = f10.return+1 + // f10(x) jsr f10 + // } rts } f10: { .label return = f11.return+1 + // f11(x) jsr f11 + // } rts } f11: { .label return = f12.return+1 + // f12(x) jsr f12 + // } rts } f12: { .label return = f13.return+1 + // f13(x) jsr f13 + // } rts } f13: { .label return = f14.return+1 + // f14(x) jsr f14 + // } rts } f14: { .label return = f15.return+1 + // f15(x) jsr f15 + // } rts } f15: { .label return = f16.return+1 + // f16(x) jsr f16 + // } rts } f16: { .label return = f17.return+1 + // f17(x) jsr f17 + // } rts } f17: { .label return = f18.return+1 + // f18(x) jsr f18 + // } rts } f18: { .label return = f19.return+1 + // f19(x) jsr f19 + // } rts } f19: { .label return = f20.return+1 + // f20(x) jsr f20 + // } rts } f20: { .label return = f21.return+1 + // f21(x) jsr f21 + // } rts } f21: { .label return = f22.return+1 + // f22(x) jsr f22 + // } rts } f22: { .label return = f23.return+1 + // f23(x) jsr f23 + // } rts } f23: { .label return = f24.return+1 + // f24(x) jsr f24 + // } rts } f24: { .label return = f25.return+1 + // f25(x) jsr f25 + // } rts } f25: { .label return = f26.return+1 + // f26(x) jsr f26 + // } rts } f26: { .label return = f27.return+1 + // f27(x) jsr f27 + // } rts } f27: { .label return = f28.return+1 + // f28(x) jsr f28 + // } rts } f28: { .label return = f29.return+1 + // f29(x) jsr f29 + // } rts } f29: { .label return = f30.return+1 + // f30(x) jsr f30 + // } rts } f30: { .label return = f31.return+1 + // f31(x) jsr f31 + // } rts } f31: { .label return = f32.return+1 + // f32(x) jsr f32 + // } rts } f32: { .label return = f33.return+1 + // f33(x) jsr f33 + // } rts } f33: { .label return = f34.return+1 + // f34(x) jsr f34 + // } rts } f34: { .label return = f35.return+1 + // f35(x) jsr f35 + // } rts } f35: { .label return = f36.return+1 + // f36(x) jsr f36 + // } rts } f36: { .label return = f37.return+1 + // f37(x) jsr f37 + // } rts } f37: { .label return = f38.return+1 + // f38(x) jsr f38 + // } rts } f38: { .label return = f39.return+1 + // f39(x) jsr f39 + // } rts } f39: { .label return = f40.return+1 + // f40(x) jsr f40 + // } rts } f40: { .label return = f41.return+1 + // f41(x) jsr f41 + // } rts } f41: { .label return = f42.return+1 + // f42(x) jsr f42 + // } rts } f42: { .label return = f43.return+1 + // f43(x) jsr f43 + // } rts } f43: { .label return = f44.return+1 + // f44(x) jsr f44 + // } rts } f44: { .label return = f45.return+1 + // f45(x) jsr f45 + // } rts } f45: { .label return = f46.return+1 + // f46(x) jsr f46 + // } rts } f46: { .label return = f47.return+1 + // f47(x) jsr f47 + // } rts } f47: { .label return = f48.return+1 + // f48(x) jsr f48 + // } rts } f48: { .label return = f49.return+1 + // f49(x) jsr f49 + // } rts } f49: { .label return = f50.return+1 + // f50(x) jsr f50 + // } rts } f50: { .label return = f51.return+1 + // f51(x) jsr f51 + // } rts } f51: { .label return = f52.return+1 + // f52(x) jsr f52 + // } rts } f52: { .label return = f53.return+1 + // f53(x) jsr f53 + // } rts } f53: { .label return = f54.return+1 + // f54(x) jsr f54 + // } rts } f54: { .label return = f55.return+1 + // f55(x) jsr f55 + // } rts } f55: { .label return = f56.return+1 + // f56(x) jsr f56 + // } rts } f56: { .label return = f57.return+1 + // f57(x) jsr f57 + // } rts } f57: { .label return = f58.return+1 + // f58(x) jsr f58 + // } rts } f58: { .label return = f59.return+1 + // f59(x) jsr f59 + // } rts } f59: { .label return = f60.return+1 + // f60(x) jsr f60 + // } rts } f60: { .label return = f61.return+1 + // f61(x) jsr f61 + // } rts } f61: { .label return = f62.return+1 + // f62(x) jsr f62 + // } rts } f62: { .label return = f63.return+1 + // f63(x) jsr f63 + // } rts } f63: { .label return = f64.return+1 + // f64(x) jsr f64 + // } rts } f64: { .label return = f65.return+1 + // f65(x) jsr f65 + // } rts } f65: { .label return = f66.return+1 + // f66(x) jsr f66 + // } rts } f66: { .label return = f67.return+1 + // f67(x) jsr f67 + // } rts } f67: { .label return = f68.return+1 + // f68(x) jsr f68 + // } rts } f68: { .label return = f69.return+1 + // f69(x) jsr f69 + // } rts } f69: { .label return = f70.return+1 + // f70(x) jsr f70 + // } rts } f70: { .label return = f71.return+1 + // f71(x) jsr f71 + // } rts } f71: { .label return = f72.return+1 + // f72(x) jsr f72 + // } rts } f72: { .label return = f73.return+1 + // f73(x) jsr f73 + // } rts } f73: { .label return = f74.return+1 + // f74(x) jsr f74 + // } rts } f74: { .label return = f75.return+1 + // f75(x) jsr f75 + // } rts } f75: { .label return = f76.return+1 + // f76(x) jsr f76 + // } rts } f76: { .label return = f77.return+1 + // f77(x) jsr f77 + // } rts } f77: { .label return = f78.return+1 + // f78(x) jsr f78 + // } rts } f78: { .label return = f79.return+1 + // f79(x) jsr f79 + // } rts } f79: { .label return = f80.return+1 + // f80(x) jsr f80 + // } rts } f80: { .label return = f81.return+1 + // f81(x) jsr f81 + // } rts } f81: { .label return = f82.return+1 + // f82(x) jsr f82 + // } rts } f82: { .label return = f83.return+1 + // f83(x) jsr f83 + // } rts } f83: { .label return = f84.return+1 + // f84(x) jsr f84 + // } rts } f84: { .label return = f85.return+1 + // f85(x) jsr f85 + // } rts } f85: { .label return = f86.return+1 + // f86(x) jsr f86 + // } rts } f86: { .label return = f87.return+1 + // f87(x) jsr f87 + // } rts } f87: { .label return = f88.return+1 + // f88(x) jsr f88 + // } rts } f88: { .label return = f89.return+1 + // f89(x) jsr f89 + // } rts } f89: { .label return = f90.return+1 + // f90(x) jsr f90 + // } rts } f90: { .label return = f91.return+1 + // f91(x) jsr f91 + // } rts } f91: { .label return = f92.return+1 + // f92(x) jsr f92 + // } rts } f92: { .label return = f93.return+1 + // f93(x) jsr f93 + // } rts } f93: { .label return = f94.return+1 + // f94(x) jsr f94 + // } rts } f94: { .label return = f95.return+1 + // f95(x) jsr f95 + // } rts } f95: { .label return = f96.return+1 + // f96(x) jsr f96 + // } rts } f96: { .label return = f97.return+1 + // f97(x) jsr f97 + // } rts } f97: { .label return = f98.return+1 + // f98(x) jsr f98 + // } rts } f98: { .label return = f99.return+1 + // f99(x) jsr f99 + // } rts } f99: { .label return = 1 + // f100(x) jsr f100 + // } rts } f100: { diff --git a/src/test/ref/deep-nesting.log b/src/test/ref/deep-nesting.log index 8325dc360..dda969ba4 100644 --- a/src/test/ref/deep-nesting.log +++ b/src/test/ref/deep-nesting.log @@ -4538,8 +4538,8 @@ Constant (const byte) f100::return#0 = f100::x#0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) f99::$0 = f100::return#0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::screen in [5] *((const byte*) main::screen + (byte) 0) ← (byte~) main::$0 -Simplifying expression containing zero 1 in [1091] (byte) f99::return#1 ← (const byte) f99::$0 + (byte) 1 +Simplifying expression containing zero main::screen in [4] *((const byte*) main::screen + (byte) 0) ← (byte~) main::$0 +Simplifying expression containing zero 1 in [697] (byte) f99::return#1 ← (const byte) f99::$0 + (byte) 1 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) f99::$0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/default-font.asm b/src/test/ref/default-font.asm index 9510fce3e..5a84b17bb 100644 --- a/src/test/ref/default-font.asm +++ b/src/test/ref/default-font.asm @@ -7,6 +7,7 @@ main: { .label screen = 4 .label ch = 3 .label x = 2 + // memset(SCREEN, ' ', 1000) jsr memset lda #0 sta.z x @@ -19,17 +20,21 @@ main: { __b1: ldx #0 __b2: + // *screen++ = ch++ lda.z ch ldy #0 sta (screen),y + // *screen++ = ch++; inc.z screen bne !+ inc.z screen+1 !: inc.z ch + // for( byte y: 0..15) inx cpx #$10 bne __b2 + // screen += (40-16) lda #$28-$10 clc adc.z screen @@ -37,10 +42,12 @@ main: { bcc !+ inc.z screen+1 !: + // for( byte x: 0..15) inc.z x lda #$10 cmp.z x bne __b1 + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -55,17 +62,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #msg1 sta.z print.m+1 jsr print + // print(msg2) lda #msg2 sta.z print.m+1 jsr print + // } rts } // print(byte* zp(2) m) print: { .label m = 2 + // SCREEN[screen_idx++] = *(word*)(m+2) lda.z screen_idx asl ldy #2 @@ -31,7 +35,9 @@ print: { iny lda (m),y sta SCREEN+1,x + // SCREEN[screen_idx++] = *(word*)(m+2); inc.z screen_idx + // } rts } msg1: .byte 'a', 'b', 'c', 'd' diff --git a/src/test/ref/deref-to-derefidx-2.log b/src/test/ref/deref-to-derefidx-2.log index ecf83980d..d37e22e2b 100644 --- a/src/test/ref/deref-to-derefidx-2.log +++ b/src/test/ref/deref-to-derefidx-2.log @@ -118,7 +118,7 @@ Constant (const byte*) print::m#0 = msg1 Constant (const byte*) print::m#1 = msg2 Constant (const byte) screen_idx#14 = 0 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [17] *((const word*) SCREEN + (byte~) print::$2) ← *((word*~) print::$1) -- *((word*)print::m#2 + 2) +Converting *(pointer+n) to pointer[n] [13] *((const word*) SCREEN + (byte~) print::$2) ← *((word*~) print::$1) -- *((word*)print::m#2 + 2) Successful SSA optimization Pass2InlineDerefIdx Eliminating unused variable (word*~) print::$1 and assignment [5] (word*~) print::$1 ← (word*)(byte*~) print::$0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/deref-to-derefidx.asm b/src/test/ref/deref-to-derefidx.asm index 4a76d2679..0fcadfd7f 100644 --- a/src/test/ref/deref-to-derefidx.asm +++ b/src/test/ref/deref-to-derefidx.asm @@ -4,26 +4,32 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // print(msg1) ldx #0 lda #msg1 sta.z print.m+1 jsr print + // print(msg2) lda #msg2 sta.z print.m+1 jsr print + // } rts } // print(byte* zp(2) m) print: { .label m = 2 + // SCREEN[idx++] = *(m+2) ldy #2 lda (m),y sta SCREEN,x + // SCREEN[idx++] = *(m+2); inx + // } rts } msg1: .byte 'a', 'b', 'c', 'd' diff --git a/src/test/ref/deref-to-derefidx.log b/src/test/ref/deref-to-derefidx.log index ce58db309..8dc228c73 100644 --- a/src/test/ref/deref-to-derefidx.log +++ b/src/test/ref/deref-to-derefidx.log @@ -110,7 +110,7 @@ Constant (const byte*) print::m#0 = msg1 Constant (const byte*) print::m#1 = msg2 Constant (const byte) idx#14 = 0 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [15] *((const byte*) SCREEN + (byte) idx#10) ← *((byte*~) print::$0) -- *(print::m#2 + 2) +Converting *(pointer+n) to pointer[n] [11] *((const byte*) SCREEN + (byte) idx#10) ← *((byte*~) print::$0) -- *(print::m#2 + 2) Successful SSA optimization Pass2InlineDerefIdx Eliminating unused variable (byte*~) print::$0 and assignment [4] (byte*~) print::$0 ← (byte*) print::m#2 + (byte) 2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/derefidx-word-0.asm b/src/test/ref/derefidx-word-0.asm index fe6b2f653..5f3388715 100644 --- a/src/test/ref/derefidx-word-0.asm +++ b/src/test/ref/derefidx-word-0.asm @@ -10,6 +10,7 @@ main: { sta.z i sta.z i+1 __b1: + // for( word i=0;i<1000;i+=40) lda.z i+1 cmp #>$3e8 bcc __b2 @@ -18,8 +19,10 @@ main: { cmp #<$3e8 bcc __b2 !: + // } rts __b2: + // screen[i] = 'a' lda.z i clc adc #a>>$10 adc #0 sta.z b+3 + // c = (byte) b lda.z b + // SCREEN[i] = c sta SCREEN,x + // for( byte i: 0..100) inx cpx #$65 bne __b1 + // } rts } diff --git a/src/test/ref/dword.log b/src/test/ref/dword.log index 581dfa760..20ab6ec52 100644 --- a/src/test/ref/dword.log +++ b/src/test/ref/dword.log @@ -59,12 +59,12 @@ Successful SSA optimization PassNCastSimplification Alias (dword) main::b#0 = (dword~) main::$0 Alias (byte) main::c#0 = (byte~) main::$1 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 [9] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$2 [7] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 Adding number conversion cast (unumber) $65 in if((byte) main::i#1!=(number) $65) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $65 diff --git a/src/test/ref/emptyblock-error.asm b/src/test/ref/emptyblock-error.asm index 7306ccda6..76fc43f53 100644 --- a/src/test/ref/emptyblock-error.asm +++ b/src/test/ref/emptyblock-error.asm @@ -5,15 +5,19 @@ .label B = $1000 main: { __b1: + // menu() jsr menu jmp __b1 } menu: { + // mode() jsr mode + // } rts } mode: { __b1: + // if(*B == 0) lda B cmp #0 bne __b1 diff --git a/src/test/ref/emptyblock-error.log b/src/test/ref/emptyblock-error.log index 0a38ef31a..627d03062 100644 --- a/src/test/ref/emptyblock-error.log +++ b/src/test/ref/emptyblock-error.log @@ -106,7 +106,7 @@ Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [8] (bool~) mode::$1 ← *((const byte*) B) != (byte) 0 from [7] (bool~) mode::$0 ← *((const byte*) B) == (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) mode::$1 [9] if(*((const byte*) B)!=(byte) 0) goto mode::@1 +Simple Condition (bool~) mode::$1 [8] if(*((const byte*) B)!=(byte) 0) goto mode::@1 Successful SSA optimization Pass2ConditionalJumpSimplification if() condition always true - replacing block destination [0] if(true) goto main::@2 if() condition always true - replacing block destination [3] if(true) goto menu::@2 diff --git a/src/test/ref/encoding-literal-char.asm b/src/test/ref/encoding-literal-char.asm index cb9a745e5..43d1346ff 100644 --- a/src/test/ref/encoding-literal-char.asm +++ b/src/test/ref/encoding-literal-char.asm @@ -12,22 +12,31 @@ .const csu = 'A' .label screen = $400 main: { + // screen[idx++] = cpm lda #cpm sta screen + // screen[idx++] = ccpu lda #ccpu sta screen+1 + // screen[idx++] = csm lda #csm sta screen+2 + // screen[idx++] = csu lda #csu sta screen+3 + // screen[idx++] = spm[0] lda spm sta screen+$28 + // screen[idx++] = spu[0] lda spu sta screen+$29 + // screen[idx++] = ssm[0] lda ssm sta screen+$2a + // screen[idx++] = ssu[0] lda ssu sta screen+$2b + // } rts } .encoding "petscii_mixed" diff --git a/src/test/ref/enum-0.asm b/src/test/ref/enum-0.asm index b8481a770..bfed1a488 100644 --- a/src/test/ref/enum-0.asm +++ b/src/test/ref/enum-0.asm @@ -5,7 +5,9 @@ .const ON = 1 main: { .label SCREEN = $400 + // *SCREEN = state lda #ON sta SCREEN + // } rts } diff --git a/src/test/ref/enum-1.asm b/src/test/ref/enum-1.asm index 72cef665a..e4e086cc7 100644 --- a/src/test/ref/enum-1.asm +++ b/src/test/ref/enum-1.asm @@ -5,7 +5,9 @@ .const BROKEN = 9 main: { .label SCREEN = $400 + // *SCREEN = state lda #BROKEN sta SCREEN + // } rts } diff --git a/src/test/ref/enum-2.asm b/src/test/ref/enum-2.asm index 8d58fc5ca..6efcd35b3 100644 --- a/src/test/ref/enum-2.asm +++ b/src/test/ref/enum-2.asm @@ -5,7 +5,9 @@ .const B = 'b' main: { .label SCREEN = $400 + // *SCREEN = letter lda #B sta SCREEN + // } rts } diff --git a/src/test/ref/enum-3.asm b/src/test/ref/enum-3.asm index 455c97fc3..934bcc260 100644 --- a/src/test/ref/enum-3.asm +++ b/src/test/ref/enum-3.asm @@ -5,7 +5,9 @@ .const BROKEN = 4*4+2+1 main: { .label SCREEN = $400 + // *SCREEN = state lda #BROKEN sta SCREEN + // } rts } diff --git a/src/test/ref/enum-4.asm b/src/test/ref/enum-4.asm index 124db5c09..895b24f3d 100644 --- a/src/test/ref/enum-4.asm +++ b/src/test/ref/enum-4.asm @@ -5,7 +5,9 @@ main: { .const ON = 1 .label SCREEN = $400 + // *SCREEN = state lda #ON sta SCREEN + // } rts } diff --git a/src/test/ref/enum-5.asm b/src/test/ref/enum-5.asm index e8c3ea5aa..a4997bf1d 100644 --- a/src/test/ref/enum-5.asm +++ b/src/test/ref/enum-5.asm @@ -5,15 +5,20 @@ main: { .const ON = 1 .label SCREEN = $400 + // *SCREEN = state lda #ON sta SCREEN + // test() jsr test + // } rts } test: { .const ON = 8 .label SCREEN = $428 + // *SCREEN = state lda #ON sta SCREEN + // } rts } diff --git a/src/test/ref/enum-6.asm b/src/test/ref/enum-6.asm index 657d28311..c5ef61185 100644 --- a/src/test/ref/enum-6.asm +++ b/src/test/ref/enum-6.asm @@ -6,9 +6,12 @@ main: { .const OFF = 0 .const ON = 1 .label SCREEN = $400 + // SCREEN[0] = state lda #ON sta SCREEN + // SCREEN[1] = state lda #OFF sta SCREEN+1 + // } rts } diff --git a/src/test/ref/enum-7.asm b/src/test/ref/enum-7.asm index 19dd10f6b..2431777ee 100644 --- a/src/test/ref/enum-7.asm +++ b/src/test/ref/enum-7.asm @@ -6,9 +6,12 @@ main: { .label SCREEN = $400 .const button_size = $18 + // SCREEN[0] = button.color lda #RED sta SCREEN + // SCREEN[1] = button.size lda #button_size sta SCREEN+1 + // } rts } diff --git a/src/test/ref/enum-8.asm b/src/test/ref/enum-8.asm index fd9288121..28ec4aabf 100644 --- a/src/test/ref/enum-8.asm +++ b/src/test/ref/enum-8.asm @@ -6,9 +6,12 @@ main: { .label SCREEN = $400 .const button_size = $18 + // SCREEN[0] = button.color lda #RED sta SCREEN + // SCREEN[1] = button.size lda #button_size sta SCREEN+1 + // } rts } diff --git a/src/test/ref/euclid-3.asm b/src/test/ref/euclid-3.asm index 9e69b7d3d..c70f153bd 100644 --- a/src/test/ref/euclid-3.asm +++ b/src/test/ref/euclid-3.asm @@ -9,7 +9,9 @@ .label print_line_cursor = 6 .label print_char_cursor = 4 main: { + // print_cls() jsr print_cls + // print_euclid(128,2) lda #<$400 sta.z print_line_cursor lda #>$400 @@ -27,6 +29,7 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_euclid(169,69) lda #$45 sta.z print_euclid.b lda #$a9 @@ -36,6 +39,7 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_euclid(155,55) lda #$37 sta.z print_euclid.b lda #$9b @@ -45,6 +49,7 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_euclid(199,3) lda #3 sta.z print_euclid.b lda #$c7 @@ -54,6 +59,7 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_euclid(91,26) lda #$1a sta.z print_euclid.b lda #$5b @@ -63,36 +69,48 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_euclid(119,187) lda #$bb sta.z print_euclid.b lda #$77 sta.z print_euclid.a jsr print_euclid + // } rts } // print_euclid(byte zp(2) a, byte zp(3) b) print_euclid: { .label b = 3 .label a = 2 + // print_byte(a) ldx.z a jsr print_byte + // print_char(' ') lda #' ' jsr print_char + // print_byte(b) ldx.z b jsr print_byte + // print_char(' ') lda #' ' jsr print_char + // euclid(a,b) ldx.z b jsr euclid + // euclid(a,b) lda.z euclid.a + // print_byte(euclid(a,b)) tax jsr print_byte + // print_ln() jsr print_ln + // } rts } // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -100,6 +118,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // euclid(byte zp(2) a, byte register(X) b) euclid: { .label a = 2 __b1: + // while (a!=b) cpx.z a bne __b2 + // } rts __b2: + // if(a>b) cpx.z a bcc __b3 + // b=b-a txa sec sbc.z a tax jmp __b1 __b3: + // a=a-b txa eor #$ff sec @@ -163,7 +196,9 @@ euclid: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -178,17 +213,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #(byte) euclid::b#2) goto euclid::@4 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_ln::$1 [18] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#32) goto print_ln::@1 +Simple Condition (bool~) euclid::$0 [95] if((byte) euclid::a#2!=(byte) euclid::b#2) goto euclid::@2 +Simple Condition (bool~) euclid::$1 [97] if((byte) euclid::a#2>(byte) euclid::b#2) goto euclid::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -864,7 +864,7 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/euclid-problem-2.asm b/src/test/ref/euclid-problem-2.asm index 838622b24..106e68960 100644 --- a/src/test/ref/euclid-problem-2.asm +++ b/src/test/ref/euclid-problem-2.asm @@ -5,30 +5,43 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // euclid(128,2) ldx #2 lda #$80 sta.z euclid.a jsr euclid + // euclid(128,2) lda.z euclid.a + // SCREEN[idx++] = euclid(128,2) sta SCREEN + // euclid(169,69) ldx #$45 lda #$a9 sta.z euclid.a jsr euclid + // euclid(169,69) lda.z euclid.a + // SCREEN[idx++] = euclid(169,69) sta SCREEN+1 + // euclid(255,155) ldx #$9b lda #$ff sta.z euclid.a jsr euclid + // euclid(255,155) lda.z euclid.a + // SCREEN[idx++] = euclid(255,155) sta SCREEN+2 + // euclid(99,3) ldx #3 lda #$63 sta.z euclid.a jsr euclid + // euclid(99,3) lda.z euclid.a + // SCREEN[idx++] = euclid(99,3) sta SCREEN+3 + // } rts } // Calculate least common denominator using euclids subtraction method @@ -36,18 +49,23 @@ main: { euclid: { .label a = 2 __b1: + // while (a!=b) cpx.z a bne __b2 + // } rts __b2: + // if(a>b) cpx.z a bcc __b3 + // b = b-a txa sec sbc.z a tax jmp __b1 __b3: + // a = a-b txa eor #$ff sec diff --git a/src/test/ref/euclid-problem-2.log b/src/test/ref/euclid-problem-2.log index a3e04c606..a89d153a9 100644 --- a/src/test/ref/euclid-problem-2.log +++ b/src/test/ref/euclid-problem-2.log @@ -248,8 +248,8 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) idx#13 (byte) idx#0 Identical Phi Values (byte) idx#12 (byte) idx#11 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) euclid::$0 [40] if((byte) euclid::a#5!=(byte) euclid::b#5) goto euclid::@2 -Simple Condition (bool~) euclid::$1 [43] if((byte) euclid::a#5>(byte) euclid::b#5) goto euclid::@4 +Simple Condition (bool~) euclid::$0 [34] if((byte) euclid::a#5!=(byte) euclid::b#5) goto euclid::@2 +Simple Condition (bool~) euclid::$1 [36] if((byte) euclid::a#5>(byte) euclid::b#5) goto euclid::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) idx#0 = 0 Constant (const byte) euclid::a#0 = $80 @@ -261,7 +261,7 @@ Constant (const byte) euclid::b#2 = $9b Constant (const byte) euclid::a#3 = $63 Constant (const byte) euclid::b#3 = 3 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero SCREEN in [8] *((const byte*) SCREEN + (const byte) idx#0) ← (byte~) main::$0 +Simplifying expression containing zero SCREEN in [7] *((const byte*) SCREEN + (const byte) idx#0) ← (byte~) main::$0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) idx#11 and assignment [19] (byte) idx#11 ← ++ (byte) idx#10 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/euclid-problem.asm b/src/test/ref/euclid-problem.asm index 47a9f4507..288104143 100644 --- a/src/test/ref/euclid-problem.asm +++ b/src/test/ref/euclid-problem.asm @@ -10,20 +10,26 @@ main: { lda #$80 sta.z a __b1: + // while (a!=b) cpx.z a bne __b2 + // *SCREEN = a lda.z a sta SCREEN + // } rts __b2: + // if(a>b) cpx.z a bcc __b4 + // b = b-a txa sec sbc.z a tax jmp __b1 __b4: + // a = a-b txa eor #$ff sec diff --git a/src/test/ref/euclid-problem.log b/src/test/ref/euclid-problem.log index e9ab973f5..e27e45a17 100644 --- a/src/test/ref/euclid-problem.log +++ b/src/test/ref/euclid-problem.log @@ -93,7 +93,7 @@ Alias (byte) main::a#1 = (byte~) main::$3 Alias (byte) main::b#1 = (byte~) main::$2 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [4] if((byte) main::a#2!=(byte) main::b#2) goto main::@2 -Simple Condition (bool~) main::$1 [7] if((byte) main::a#2>(byte) main::b#2) goto main::@4 +Simple Condition (bool~) main::$1 [6] if((byte) main::a#2>(byte) main::b#2) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::a#0 = $80 Constant (const byte) main::b#0 = 2 diff --git a/src/test/ref/examples/3d/3d.asm b/src/test/ref/examples/3d/3d.asm index 5eaeadc57..9b07db041 100644 --- a/src/test/ref/examples/3d/3d.asm +++ b/src/test/ref/examples/3d/3d.asm @@ -34,20 +34,28 @@ .label print_screen = $400 .label sx = 2 .label sy = 3 + // kickasm main: { + // asm sei + // sprites_init() jsr sprites_init + // *psp1 = (word)mulf_sqr1 //mulf_init(); lda #mulf_sqr1 sta psp1+1 + // *psp2 = (word)mulf_sqr2 lda #mulf_sqr2 sta psp2+1 + // debug_print_init() jsr debug_print_init + // anim() jsr anim + // } rts } anim: { @@ -58,25 +66,33 @@ anim: { //signed byte xmin = 0; //signed byte xmax = 0; __b2: + // while(*RASTER!=$ff) lda #$ff cmp RASTER bne __b2 __b3: + // while(*RASTER!=$fe) lda #$fe cmp RASTER bne __b3 __b4: + // while(*RASTER!=$fd) lda #$fd cmp RASTER bne __b4 + // (*BORDERCOL)++; inc BORDERCOL + // calculate_matrix(sx,sy,sz) ldx.z sx jsr calculate_matrix + // store_matrix() jsr store_matrix lda #0 sta.z i __b6: + // (*BORDERCOL)++; inc BORDERCOL + // rotate_matrix(xs[i], ys[i], zs[i]) ldy.z i ldx xs,y lda ys,y @@ -84,44 +100,61 @@ anim: { lda zs,y sta.z rotate_matrix.z jsr rotate_matrix + // xrs[i] = *xr //if(*xrxmax) xmax = *xr; lda xr ldy.z i sta xrs,y + // yrs[i] = *yr lda yr sta yrs,y + // zrs[i] = *zr lda zr sta zrs,y + // pps[i] = *pp lda pp sta pps,y + // xps[i] = *xp lda xp sta xps,y + // yps[i] = *yp lda yp sta yps,y + // i2 = i*2 tya asl tax + // $80+(byte)((*xp)) lda #$80 clc adc xp + // SPRITES_XPOS[i2] = $80+(byte)((*xp)) sta SPRITES_XPOS,x + // $80+(byte)((*yp)) lda #$80 clc adc yp + // SPRITES_YPOS[i2] = $80+(byte)((*yp)) sta SPRITES_YPOS,x + // for(byte i: 0..7) inc.z i lda #8 cmp.z i bne __b6 + // *BORDERCOL = LIGHT_GREY lda #LIGHT_GREY sta BORDERCOL + // debug_print() jsr debug_print + // *BORDERCOL = LIGHT_BLUE lda #LIGHT_BLUE sta BORDERCOL + // sx +=2 // Increment angles inc.z sx inc.z sx + // sy -=3 lax.z sy axs #3 stx.z sy @@ -154,73 +187,96 @@ debug_print: { .label at_line = SCREEN+$13*$28 .label c = 5 .label i = 6 + // print_sbyte_pos(sx, 0, 37) ldx.z sx + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos1_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(sy, 1, 37) ldx.z sy + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos2_row*$28+print_sbyte_pos2_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos3_row*$28+print_sbyte_pos3_col sta.z print_sbyte_at.at+1 ldx #sz jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[0], 4, 29) ldx rotation_matrix + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos4_row*$28+print_sbyte_pos4_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[1], 4, 33) ldx rotation_matrix+1 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos5_row*$28+print_sbyte_pos5_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[2], 4, 37) ldx rotation_matrix+2 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos6_row*$28+print_sbyte_pos6_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[3], 5, 29) ldx rotation_matrix+3 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos7_row*$28+print_sbyte_pos7_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[4], 5, 33) ldx rotation_matrix+4 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos8_row*$28+print_sbyte_pos8_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[5], 5, 37) ldx rotation_matrix+5 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos9_row*$28+print_sbyte_pos9_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[6], 6, 29) ldx rotation_matrix+6 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos10_row*$28+print_sbyte_pos10_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[7], 6, 33) ldx rotation_matrix+7 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos11_row*$28+print_sbyte_pos11_col sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // print_sbyte_pos(rotation_matrix[8], 6, 37) ldx rotation_matrix+8 + // print_sbyte_at(sb, print_screen+row*40+col) lda #print_screen+print_sbyte_pos12_row*$28+print_sbyte_pos12_col @@ -231,6 +287,7 @@ debug_print: { lda #4 sta.z c __b1: + // print_sbyte_at(xrs[i], at_line+40*0+c) lda.z c clc adc #>4 txa lsr lsr lsr lsr tay + // print_char_at(print_hextab[b>>4], at) lda print_hextab,y tay jsr print_char_at + // b&$f lda #$f axs #0 + // print_char_at(print_hextab[b&$f], at+1) inc.z print_char_at.at bne !+ inc.z print_char_at.at+1 !: ldy print_hextab,x jsr print_char_at + // } rts } // Rotate a 3D point (x,y,z) using the rotation matrix @@ -367,12 +445,16 @@ print_byte_at: { rotate_matrix: { .label y = 6 .label z = 4 + // *xr = x txa sta xr + // *yr = y lda.z y sta yr + // *zr = z lda.z z sta zr + // asm tax C1: lda mulf_sqr1,x @@ -459,12 +541,14 @@ rotate_matrix: { sec sbc (psp2),y sta xp + // } rts } // Store the rotation matrix into the rotation routine rotate() // After this each call to rotate() will rotate a point with the matrix // Implemented in assembler to utilize seriously fast multiplication store_matrix: { + // asm lda rotation_matrix+0 sta rotate_matrix.A1+1 eor #$ff @@ -501,6 +585,7 @@ store_matrix: { sta rotate_matrix.I1+1 eor #$ff sta rotate_matrix.I2+1 + // } rts } // Prepare the 3x3 rotation matrix into rotation_matrix[] @@ -518,137 +603,182 @@ calculate_matrix: { .label t7 = $a .label t8 = $b .label t9 = $c + // t1 = sy-sz lda.z sy sta.z t1 + // t2 = sy+sz lda.z sy sta.z t2 + // t3 = sx+sz stx.z t3 + // t4 = sx-sz stx.z t4 + // t5 = sx+t2 txa clc adc.z t2 sta.z t5 + // t6 = sx-t1 txa sec sbc.z t1 sta.z t6 + // t7 = sx+t1 txa clc adc.z t1 sta.z t7 + // t8 = t2-sx txa eor #$ff sec adc.z t2 sta.z t8 + // t9 = sy-sx txa eor #$ff sec adc.z sy sta.z t9 + // t10 = sy+sx txa clc adc.z sy tax + // COSH[t1]+COSH[t2] ldy.z t1 lda COSH,y ldy.z t2 clc adc COSH,y + // rotation_matrix[0] = COSH[t1]+COSH[t2] sta rotation_matrix + // SINH[t1]-SINH[t2] ldy.z t1 lda SINH,y ldy.z t2 sec sbc SINH,y + // rotation_matrix[1] = SINH[t1]-SINH[t2] sta rotation_matrix+1 + // SINH[sy]+SINH[sy] ldy.z sy clc lda SINH,y adc SINH,y + // rotation_matrix[2] = SINH[sy]+SINH[sy] sta rotation_matrix+2 + // SINH[t3]-SINH[t4] ldy.z t3 lda SINH,y ldy.z t4 sec sbc SINH,y + // SINH[t3]-SINH[t4] + COSQ[t6] ldy.z t6 clc adc COSQ,y + // SINH[t3]-SINH[t4] + COSQ[t6]-COSQ[t5] ldy.z t5 sec sbc COSQ,y + // SINH[t3]-SINH[t4] + COSQ[t6]-COSQ[t5]+COSQ[t8] ldy.z t8 clc adc COSQ,y + // SINH[t3]-SINH[t4] + COSQ[t6]-COSQ[t5]+COSQ[t8]-COSQ[t7] ldy.z t7 sec sbc COSQ,y + // rotation_matrix[3] = SINH[t3]-SINH[t4] + COSQ[t6]-COSQ[t5]+COSQ[t8]-COSQ[t7] sta rotation_matrix+3 + // COSH[t3]+COSH[t4] ldy.z t3 lda COSH,y ldy.z t4 clc adc COSH,y + // COSH[t3]+COSH[t4] + SINQ[t5] ldy.z t5 clc adc SINQ,y + // COSH[t3]+COSH[t4] + SINQ[t5]-SINQ[t6] ldy.z t6 sec sbc SINQ,y + // COSH[t3]+COSH[t4] + SINQ[t5]-SINQ[t6]-SINQ[t7] ldy.z t7 sec sbc SINQ,y + // COSH[t3]+COSH[t4] + SINQ[t5]-SINQ[t6]-SINQ[t7]-SINQ[t8] ldy.z t8 sec sbc SINQ,y + // rotation_matrix[4] = COSH[t3]+COSH[t4] + SINQ[t5]-SINQ[t6]-SINQ[t7]-SINQ[t8] sta rotation_matrix+4 + // SINH[t9]-SINH[t10] ldy.z t9 lda SINH,y sec sbc SINH,x + // rotation_matrix[5] = SINH[t9]-SINH[t10] sta rotation_matrix+5 + // COSH[t4]-COSH[t3] ldy.z t4 lda COSH,y ldy.z t3 sec sbc COSH,y + // COSH[t4]-COSH[t3] + SINQ[t6] ldy.z t6 clc adc SINQ,y + // COSH[t4]-COSH[t3] + SINQ[t6]-SINQ[t5] ldy.z t5 sec sbc SINQ,y + // COSH[t4]-COSH[t3] + SINQ[t6]-SINQ[t5]-SINQ[t8] ldy.z t8 sec sbc SINQ,y + // COSH[t4]-COSH[t3] + SINQ[t6]-SINQ[t5]-SINQ[t8]-SINQ[t7] ldy.z t7 sec sbc SINQ,y + // rotation_matrix[6] = COSH[t4]-COSH[t3] + SINQ[t6]-SINQ[t5]-SINQ[t8]-SINQ[t7] sta rotation_matrix+6 + // SINH[t3]+SINH[t4] ldy.z t3 lda SINH,y ldy.z t4 clc adc SINH,y + // SINH[t3]+SINH[t4] + COSQ[t6] ldy.z t6 clc adc COSQ,y + // SINH[t3]+SINH[t4] + COSQ[t6]-COSQ[t5] ldy.z t5 sec sbc COSQ,y + // SINH[t3]+SINH[t4] + COSQ[t6]-COSQ[t5]+COSQ[t7] ldy.z t7 clc adc COSQ,y + // SINH[t3]+SINH[t4] + COSQ[t6]-COSQ[t5]+COSQ[t7]-COSQ[t8] ldy.z t8 sec sbc COSQ,y + // rotation_matrix[7] = SINH[t3]+SINH[t4] + COSQ[t6]-COSQ[t5]+COSQ[t7]-COSQ[t8] sta rotation_matrix+7 + // COSH[t9]+COSH[t10] lda COSH,x ldy.z t9 clc adc COSH,y + // rotation_matrix[8] = COSH[t9]+COSH[t10] sta rotation_matrix+8 + // } rts } debug_print_init: { @@ -666,7 +796,9 @@ debug_print_init: { .label __65 = $1d .label c = 2 .label i = 3 + // print_cls() jsr print_cls + // print_str_at("sx", SCREEN+40*0+34) lda #SCREEN+$22 @@ -676,6 +808,7 @@ debug_print_init: { lda #>str sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("sy", SCREEN+40*1+34) lda #SCREEN+$28*1+$22 @@ -685,6 +818,7 @@ debug_print_init: { lda #>str1 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("sz", SCREEN+40*2+34) lda #SCREEN+$28*2+$22 @@ -694,6 +828,7 @@ debug_print_init: { lda #>str2 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("x", SCREEN+40*16) lda #SCREEN+$28*$10 @@ -703,6 +838,7 @@ debug_print_init: { lda #>str3 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("y", SCREEN+40*17) lda #SCREEN+$28*$11 @@ -712,6 +848,7 @@ debug_print_init: { lda #>str4 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("z", SCREEN+40*18) lda #SCREEN+$28*$12 @@ -721,6 +858,7 @@ debug_print_init: { lda #>str5 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("xr", SCREEN+40*19) lda #SCREEN+$28*$13 @@ -730,6 +868,7 @@ debug_print_init: { lda #>str6 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("yr", SCREEN+40*20) lda #SCREEN+$28*$14 @@ -739,6 +878,7 @@ debug_print_init: { lda #>str7 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("zr", SCREEN+40*21) lda #SCREEN+$28*$15 @@ -748,6 +888,7 @@ debug_print_init: { lda #>str8 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("pp", SCREEN+40*22) lda #SCREEN+$28*$16 @@ -757,6 +898,7 @@ debug_print_init: { lda #>str9 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("xp", SCREEN+40*23) lda #SCREEN+$28*$17 @@ -766,6 +908,7 @@ debug_print_init: { lda #>str10 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("yp", SCREEN+40*24) lda #SCREEN+$28*$18 @@ -780,6 +923,7 @@ debug_print_init: { lda #4 sta.z c __b1: + // print_sbyte_at(xs[i], at_line+40*0+c) lda.z c clc adc #at_cols adc #0 sta.z __41+1 + // *(at_cols+40*0+c+j) = col txa sta (__41),y + // at_cols+40*1+c lda.z c clc adc #at_cols+$28*1 adc #0 sta.z __44+1 + // *(at_cols+40*1+c+j) = col txa sta (__44),y + // at_cols+40*2+c lda.z c clc adc #at_cols+$28*2 adc #0 sta.z __47+1 + // *(at_cols+40*2+c+j) = col txa sta (__47),y + // at_cols+40*3+c lda.z c clc adc #at_cols+$28*3 adc #0 sta.z __50+1 + // *(at_cols+40*3+c+j) = col txa sta (__50),y + // at_cols+40*4+c lda.z c clc adc #at_cols+$28*4 adc #0 sta.z __53+1 + // *(at_cols+40*4+c+j) = col txa sta (__53),y + // at_cols+40*5+c lda.z c clc adc #at_cols+$28*5 adc #0 sta.z __56+1 + // *(at_cols+40*5+c+j) = col txa sta (__56),y + // at_cols+40*6+c lda.z c clc adc #at_cols+$28*6 adc #0 sta.z __59+1 + // *(at_cols+40*6+c+j) = col txa sta (__59),y + // at_cols+40*7+c lda.z c clc adc #at_cols+$28*7 adc #0 sta.z __62+1 + // *(at_cols+40*7+c+j) = col txa sta (__62),y + // at_cols+40*8+c lda.z c clc adc #at_cols+$28*8 adc #0 sta.z __65+1 + // *(at_cols+40*8+c+j) = col txa sta (__65),y + // for( byte j: 0..3) iny cpy #4 beq !__b2+ jmp __b2 !__b2: + // c += 4 lax.z c axs #-[4] stx.z c + // for( byte i: 0..7) inc.z i lda #8 cmp.z i beq !__b1+ jmp __b1 !__b1: + // } rts str: .text "sx" .byte 0 @@ -941,15 +1110,19 @@ print_str_at: { .label at = $f .label str = $d __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(at++) = *(str++) ldy #0 lda (str),y sta (at),y + // *(at++) = *(str++); inc.z at bne !+ inc.z at+1 @@ -962,7 +1135,9 @@ print_str_at: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -977,17 +1152,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #mulf_sqr1 sta psp1+1 + // *psp2 = (word)mulf_sqr2 lda #mulf_sqr2 sta psp2+1 + // print_cls() jsr print_cls + // do_perspective($39, -$47, $36) jsr do_perspective + // } rts } do_perspective: { .label x = $39 .label y = -$47 .label z = $36 + // print_str("(") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -42,43 +50,56 @@ do_perspective: { lda #>str sta.z print_str.str+1 jsr print_str + // print_sbyte(x) ldx #x jsr print_sbyte + // print_str(",") lda #str1 sta.z print_str.str+1 jsr print_str + // print_sbyte(y) ldx #y jsr print_sbyte + // print_str(",") lda #str1 sta.z print_str.str+1 jsr print_str + // print_sbyte(z) ldx #z jsr print_sbyte + // print_str(") -> (") lda #str3 sta.z print_str.str+1 jsr print_str + // perspective(x, y, z) jsr perspective ldx xr + // print_byte((byte)*xr) jsr print_byte + // print_str(",") lda #str1 sta.z print_str.str+1 jsr print_str ldx yr + // print_byte((byte)*yr) jsr print_byte + // print_str(")") lda #str5 sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln + // } rts str: .text "(" .byte 0 @@ -96,6 +117,7 @@ print_ln: { lda #>$400 sta.z print_line_cursor+1 __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -103,6 +125,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Apply perspective to a 3d-point. Result is returned in (*xr,*yr) // Implemented in assembler to utilize seriously fast multiplication perspective: { + // *xr = x lda #do_perspective.x sta xr + // *yr = y lda #do_perspective.y sta yr + // *zr = z lda #do_perspective.z sta zr + // asm sta PP+1 PP: lda PERSP_Z @@ -192,21 +232,28 @@ perspective: { sbc (psp2),y adc #$80 sta xr + // } rts } // Print a signed byte as HEX // print_sbyte(signed byte register(X) b) print_sbyte: { + // if(b<0) cpx #0 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_byte((byte)b) jsr print_byte + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // b = -b txa eor #$ff clc @@ -216,7 +263,9 @@ print_sbyte: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -231,17 +280,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #sqr lda.z sqr+1 sta.z val + // mulf_sqr1[i] = val sta mulf_sqr1,y + // (mulf_sqr1+$100)[i] = val sta mulf_sqr1+$100,y + // -i tya eor #$ff tax inx + // mulf_sqr1[-i] = val lda.z val sta mulf_sqr1,x + // (mulf_sqr1+$100)[-i] = val sta mulf_sqr1+$100,x + // mulf_sqr2[i+1] = val sta mulf_sqr2+1,y + // (mulf_sqr2+$100)[i+1] = val sta mulf_sqr2+$100+1,y + // 1-i tya eor #$ff tax axs #-1-1 + // mulf_sqr2[1-i] = val lda.z val sta mulf_sqr2,x + // 1-i tya eor #$ff tax axs #-1-1 + // (mulf_sqr2+$100)[1-i] = val lda.z val sta mulf_sqr2+$100,x + // sqr += add lda.z sqr clc adc.z add @@ -293,6 +359,7 @@ mulf_init: { lda.z sqr+1 adc.z add+1 sta.z sqr+1 + // add +=2 lda.z add clc adc #<2 @@ -300,9 +367,11 @@ mulf_init: { lda.z add+1 adc #>2 sta.z add+1 + // for( byte i:0..128) iny cpy #$81 bne __b1 + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/examples/3d/perspective.log b/src/test/ref/examples/3d/perspective.log index f33d7a91e..b531bd91d 100644 --- a/src/test/ref/examples/3d/perspective.log +++ b/src/test/ref/examples/3d/perspective.log @@ -1079,15 +1079,15 @@ Identical Phi Values (byte*) print_char_cursor#68 (byte*) print_char_cursor#12 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [202] (byte~) mulf_init::$2 ← - (byte) mulf_init::i#2 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [26] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [39] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -Simple Condition (bool~) print_sbyte::$0 [48] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 -Simple Condition (bool~) mulf_init::$7 [216] if((byte) mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#7)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 +Simple Condition (bool~) print_sbyte::$0 [30] if((signed byte) print_sbyte::b#4<(signed byte) 0) goto print_sbyte::@1 +Simple Condition (bool~) mulf_init::$7 [149] if((byte) mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [107] (word~) main::$1 ← (word)(const byte*) mulf_sqr1 -Constant right-side identified [109] (word~) main::$2 ← (word)(const byte*) mulf_sqr2 +Constant right-side identified [67] (word~) main::$1 ← (word)(const byte*) mulf_sqr1 +Constant right-side identified [69] (word~) main::$2 ← (word)(const byte*) mulf_sqr2 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) print_char::ch#0 = '-' @@ -1121,12 +1121,12 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) do_perspective::str1 Successful SSA optimization Pass2ConstantStringConsolidation -Resolved ranged next value [214] mulf_init::i#1 ← ++ mulf_init::i#2 to ++ -Resolved ranged comparison value [216] if(mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 to (number) $81 +Resolved ranged next value [147] mulf_init::i#1 ← ++ mulf_init::i#2 to ++ +Resolved ranged comparison value [149] if(mulf_init::i#1!=rangelast(0,$80)) goto mulf_init::@1 to (number) $81 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $81 in if((byte) mulf_init::i#1!=(number) $81) goto mulf_init::@1 diff --git a/src/test/ref/examples/bresenham/bitmap-bresenham.asm b/src/test/ref/examples/bresenham/bitmap-bresenham.asm index b0a13f6db..664290a81 100644 --- a/src/test/ref/examples/bresenham/bitmap-bresenham.asm +++ b/src/test/ref/examples/bresenham/bitmap-bresenham.asm @@ -12,17 +12,25 @@ .label BITMAP = $2000 .const lines_cnt = 8 main: { + // *BORDERCOL = 0 lda #0 sta BORDERCOL + // *BGCOL = 0 sta BGCOL + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *VIC_MEMORY = (byte)((((word)SCREEN&$3fff)/$40)|(((word)BITMAP&$3fff)/$400)) lda #(SCREEN&$3fff)/$40|(BITMAP&$3fff)/$400 sta VIC_MEMORY + // bitmap_init(BITMAP) jsr bitmap_init + // bitmap_clear() jsr bitmap_clear + // init_screen() jsr init_screen __b1: + // lines() jsr lines jmp __b1 } @@ -31,11 +39,14 @@ lines: { lda #0 sta.z l __b1: + // for(byte l=0; l>1 lda.z yd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // x++; inx + // e = e+yd lda.z e clc adc.z yd sta.z e + // if(xd>1 lda.z xd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(yd>1 lda.z yd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // x++; inx + // e = e+yd lda.z e clc adc.z yd sta.z e + // if(xd>1 lda.z xd lsr sta.z e __b1: + // bitmap_plot(x,y) ldy.z y jsr bitmap_plot + // y = y++; inc.z y + // e = e+xd lda.z e clc adc.z xd sta.z e + // if(ydSCREEN sta.z c+1 __b1: + // for(byte* c = SCREEN; c!=SCREEN+$400;c++) lda.z c+1 cmp #>SCREEN+$400 bne __b2 lda.z c cmp #bitmap lda #>BITMAP sta bitmap_plot_xhi,x + // bitmap_plot_bit[x] = bits tya sta bitmap_plot_bit,x + // bits = bits>>1 tya lsr tay + // if(bits==0) cpy #0 bne __b2 ldy #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -394,16 +491,24 @@ bitmap_init: { sta.z yoffs+1 tax __b3: + // y&$7 lda #7 sax.z __10 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __10 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -412,9 +517,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Tables for the plotter - initialized by calling bitmap_draw_init(); diff --git a/src/test/ref/examples/bresenham/bitmap-bresenham.log b/src/test/ref/examples/bresenham/bitmap-bresenham.log index 08745b104..45d956c75 100644 --- a/src/test/ref/examples/bresenham/bitmap-bresenham.log +++ b/src/test/ref/examples/bresenham/bitmap-bresenham.log @@ -1474,29 +1474,29 @@ Identical Phi Values (byte) bitmap_line_ydxd::y1#2 (byte) bitmap_line_ydxd::y1#6 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [29] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) bitmap_init::$4 [13] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$5 [17] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$12 [32] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$14 [36] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_clear::$1 [52] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 [56] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 -Simple Condition (bool~) bitmap_line::$0 [72] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 -Simple Condition (bool~) bitmap_line::$12 [77] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 -Simple Condition (bool~) bitmap_line::$2 [82] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 -Simple Condition (bool~) bitmap_line::$8 [87] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 -Simple Condition (bool~) bitmap_line::$4 [92] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 -Simple Condition (bool~) bitmap_line::$18 [125] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 -Simple Condition (bool~) bitmap_line::$14 [130] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 -Simple Condition (bool~) bitmap_line_xdyi::$4 [173] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 -Simple Condition (bool~) bitmap_line_xdyi::$7 [177] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 -Simple Condition (bool~) bitmap_line_xdyd::$4 [196] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 -Simple Condition (bool~) bitmap_line_xdyd::$7 [200] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 -Simple Condition (bool~) bitmap_line_ydxi::$4 [219] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 -Simple Condition (bool~) bitmap_line_ydxi::$7 [223] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 -Simple Condition (bool~) bitmap_line_ydxd::$4 [243] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 -Simple Condition (bool~) bitmap_line_ydxd::$7 [247] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 -Simple Condition (bool~) lines::$0 [267] if((byte) lines::l#2<(const byte) lines_cnt) goto lines::@2 -Simple Condition (bool~) init_screen::$0 [282] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@2 +Simple Condition (bool~) bitmap_init::$4 [11] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$5 [15] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$12 [28] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$14 [32] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_clear::$1 [45] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [48] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 +Simple Condition (bool~) bitmap_line::$0 [62] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1 +Simple Condition (bool~) bitmap_line::$12 [65] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20 +Simple Condition (bool~) bitmap_line::$2 [68] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10 +Simple Condition (bool~) bitmap_line::$8 [71] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15 +Simple Condition (bool~) bitmap_line::$4 [74] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11 +Simple Condition (bool~) bitmap_line::$18 [101] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25 +Simple Condition (bool~) bitmap_line::$14 [104] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21 +Simple Condition (bool~) bitmap_line_xdyi::$4 [139] if((byte) bitmap_line_xdyi::xd#5>=(byte) bitmap_line_xdyi::e#1) goto bitmap_line_xdyi::@2 +Simple Condition (bool~) bitmap_line_xdyi::$7 [143] if((byte) bitmap_line_xdyi::x#2!=(byte~) bitmap_line_xdyi::$6) goto bitmap_line_xdyi::@1 +Simple Condition (bool~) bitmap_line_xdyd::$4 [156] if((byte) bitmap_line_xdyd::xd#5>=(byte) bitmap_line_xdyd::e#1) goto bitmap_line_xdyd::@2 +Simple Condition (bool~) bitmap_line_xdyd::$7 [160] if((byte) bitmap_line_xdyd::x#2!=(byte~) bitmap_line_xdyd::$6) goto bitmap_line_xdyd::@1 +Simple Condition (bool~) bitmap_line_ydxi::$4 [173] if((byte) bitmap_line_ydxi::yd#5>=(byte) bitmap_line_ydxi::e#1) goto bitmap_line_ydxi::@2 +Simple Condition (bool~) bitmap_line_ydxi::$7 [177] if((byte) bitmap_line_ydxi::y#2!=(byte~) bitmap_line_ydxi::$6) goto bitmap_line_ydxi::@1 +Simple Condition (bool~) bitmap_line_ydxd::$4 [190] if((byte) bitmap_line_ydxd::yd#5>=(byte) bitmap_line_ydxd::e#1) goto bitmap_line_ydxd::@2 +Simple Condition (bool~) bitmap_line_ydxd::$7 [194] if((byte) bitmap_line_ydxd::y#3!=(byte~) bitmap_line_ydxd::$6) goto bitmap_line_ydxd::@1 +Simple Condition (bool~) lines::$0 [212] if((byte) lines::l#2<(const byte) lines_cnt) goto lines::@2 +Simple Condition (bool~) init_screen::$0 [225] if((byte*) init_screen::c#2!=(const byte*) SCREEN+(word) $400) goto init_screen::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) bitmap_init::bits#0 = $80 Constant (const byte) bitmap_init::x#0 = 0 @@ -1511,18 +1511,18 @@ Constant (const byte*) bitmap_init::bitmap#0 = BITMAP Constant (const byte) lines::l#0 = 0 Constant (const byte*) init_screen::c#0 = SCREEN Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [262] if(true) goto main::@1 +if() condition always true - replacing block destination [207] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [15] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [17] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [34] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [36] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [50] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ -Resolved ranged comparison value [52] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 -Resolved ranged next value [54] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ -Resolved ranged comparison value [56] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 -Simplifying expression containing zero bitmap_plot_xhi in [41] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) -Simplifying expression containing zero bitmap_plot_xlo in [41] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Resolved ranged next value [13] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [15] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [30] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [32] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [43] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ +Resolved ranged comparison value [45] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 +Resolved ranged next value [46] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ +Resolved ranged comparison value [48] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 +Simplifying expression containing zero bitmap_plot_xhi in [35] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi + (byte) 0) w= *((const byte*) bitmap_plot_xlo + (byte) 0) +Simplifying expression containing zero bitmap_plot_xlo in [35] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_xhi) w= *((const byte*) bitmap_plot_xlo + (byte) 0) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) bitmap_line::xd#0 Eliminating unused constant (const byte) bitmap_line::yd#0 diff --git a/src/test/ref/examples/chargen/chargen-analysis.asm b/src/test/ref/examples/chargen/chargen-analysis.asm index 530d2b3ec..eab4e1342 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.asm +++ b/src/test/ref/examples/chargen/chargen-analysis.asm @@ -80,6 +80,7 @@ main: { sta.z sc+1 // Clear screen __b1: + // for( byte* sc=SCREEN;scSCREEN+$3e8 bcs !__b2+ @@ -92,6 +93,7 @@ main: { jmp __b2 !__b2: !: + // print_str_at("f1", SCREEN+1) lda #SCREEN+1 @@ -101,6 +103,7 @@ main: { lda #>str sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("f3", SCREEN+1+10) lda #SCREEN+1+$a @@ -110,6 +113,7 @@ main: { lda #>str1 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("f5", SCREEN+1+20) lda #SCREEN+1+$14 @@ -119,6 +123,7 @@ main: { lda #>str2 sta.z print_str_at.str+1 jsr print_str_at + // print_str_at("f7", SCREEN+1+30) lda #SCREEN+1+$1e @@ -131,10 +136,12 @@ main: { lda #0 sta.z i __b4: + // plot_chargen(i, $20, 0) ldy.z i ldx #0 lda #$20 jsr plot_chargen + // for(byte i : 0..3 ) inc.z i lda #4 cmp.z i @@ -142,36 +149,51 @@ main: { lda #0 sta.z cur_pos __b5: + // keyboard_key_pressed(KEY_F1) ldx #KEY_F1 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_F1) + // if(keyboard_key_pressed(KEY_F1)!=0) cmp #0 beq __b6 lda #0 sta.z cur_pos __b6: + // keyboard_key_pressed(KEY_F3) ldx #KEY_F3 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_F3) + // if(keyboard_key_pressed(KEY_F3)!=0) cmp #0 beq __b7 lda #1 sta.z cur_pos __b7: + // keyboard_key_pressed(KEY_F5) ldx #KEY_F5 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_F5) + // if(keyboard_key_pressed(KEY_F5)!=0) cmp #0 beq __b8 lda #2 sta.z cur_pos __b8: + // keyboard_key_pressed(KEY_F7) ldx #KEY_F7 jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_F7) + // if(keyboard_key_pressed(KEY_F7)!=0) cmp #0 beq __b9 lda #3 sta.z cur_pos __b9: + // keyboard_key_pressed(KEY_LSHIFT) ldx #KEY_LSHIFT jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_LSHIFT) + // if(keyboard_key_pressed(KEY_LSHIFT)!=0) cmp #0 bne __b10 lda #0 @@ -185,32 +207,43 @@ main: { sta.z ch // Check for key presses - and plot char if found __b12: + // keyboard_get_keycode(ch) ldx.z ch jsr keyboard_get_keycode + // key = keyboard_get_keycode(ch) + // if(key!=$3f) cmp #$3f beq b1 + // keyboard_key_pressed(key) tax jsr keyboard_key_pressed + // keyboard_key_pressed(key) + // pressed = keyboard_key_pressed(key) jmp __b13 b1: lda #0 __b13: + // if(pressed!=0) cmp #0 beq __b14 + // plot_chargen(cur_pos, ch, shift) ldy.z cur_pos lda.z ch ldx.z shift jsr plot_chargen __b14: + // for( byte ch : 0..$3f) inc.z ch lda #$40 cmp.z ch bne __b12 jmp __b5 __b2: + // *sc = ' ' lda #' ' ldy #0 sta (sc),y + // for( byte* sc=SCREEN;scCHARGEN sta.z chargen+1 + // if(shift!=0) cpx #0 beq __b1 + // chargen = chargen + $0800 clc lda.z chargen adc #<$800 @@ -262,11 +301,15 @@ plot_chargen: { adc #>$800 sta.z chargen+1 __b1: + // *PROCPORT = $32 lda #$32 sta PROCPORT + // mul8u(pos, 10) tya tax jsr mul8u + // mul8u(pos, 10) + // sc = SCREEN+40+1+mul8u(pos, 10) clc lda.z sc adc #>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 @@ -361,16 +423,21 @@ mul8u: { // Returns zero if the key is not pressed and a non-zero value if the key is currently pressed // keyboard_key_pressed(byte register(X) key) keyboard_key_pressed: { + // colidx = key&7 txa and #7 tay + // rowidx = key>>3 txa lsr lsr lsr + // keyboard_matrix_read(rowidx) tax jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask,y + // } rts } // Read a single row of the keyboard matrix @@ -380,10 +447,13 @@ keyboard_key_pressed: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Get the keycode corresponding to a specific screen code character @@ -392,7 +462,9 @@ keyboard_matrix_read: { // If there is no non-shifted key representing the char $3f is returned (representing RUN/STOP) . // keyboard_get_keycode(byte register(X) ch) keyboard_get_keycode: { + // return keyboard_char_keycodes[ch]; lda keyboard_char_keycodes,x + // } rts } // Print a string at a specific screen position @@ -401,15 +473,19 @@ print_str_at: { .label at = $c .label str = $a __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(at++) = *(str++) ldy #0 lda (str),y sta (at),y + // *(at++) = *(str++); inc.z at bne !+ inc.z at+1 diff --git a/src/test/ref/examples/chargen/chargen-analysis.log b/src/test/ref/examples/chargen/chargen-analysis.log index e6f93da3b..3d4d33065 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.log +++ b/src/test/ref/examples/chargen/chargen-analysis.log @@ -1180,29 +1180,29 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) plot_chargen::chargen#3 (byte*) plot_chargen::chargen#5 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) mul8u::$0 [5] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [10] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) main::$12 [56] if((byte*) main::sc#2<(byte*~) main::$11) goto main::@2 -Simple Condition (bool~) main::$14 [88] if((byte) main::i#1!=rangelast(0,3)) goto main::@7 -Simple Condition (bool~) main::$17 [99] if((byte~) main::$15==(byte) 0) goto main::@10 -Simple Condition (bool~) main::$20 [108] if((byte~) main::$18==(byte) 0) goto main::@11 -Simple Condition (bool~) main::$23 [118] if((byte~) main::$21==(byte) 0) goto main::@12 -Simple Condition (bool~) main::$26 [128] if((byte~) main::$24==(byte) 0) goto main::@13 -Simple Condition (bool~) main::$28 [137] if((byte~) main::$27!=(byte) 0) goto main::@14 -Simple Condition (bool~) main::$31 [155] if((byte) main::key#0==(byte) $3f) goto main::@17 -Simple Condition (bool~) main::$34 [159] if((byte) main::pressed#2==(byte) 0) goto main::@18 -Simple Condition (bool~) main::$36 [170] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@16 -Simple Condition (bool~) print_str_at::$0 [183] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 -Simple Condition (bool~) plot_chargen::$4 [197] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1 -Simple Condition (bool~) plot_chargen::$12 [222] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5 -Simple Condition (bool~) plot_chargen::$14 [230] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 -Simple Condition (bool~) plot_chargen::$16 [238] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 +Simple Condition (bool~) mul8u::$3 [8] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) main::$12 [34] if((byte*) main::sc#2<(byte*~) main::$11) goto main::@2 +Simple Condition (bool~) main::$14 [60] if((byte) main::i#1!=rangelast(0,3)) goto main::@7 +Simple Condition (bool~) main::$17 [69] if((byte~) main::$15==(byte) 0) goto main::@10 +Simple Condition (bool~) main::$20 [76] if((byte~) main::$18==(byte) 0) goto main::@11 +Simple Condition (bool~) main::$23 [84] if((byte~) main::$21==(byte) 0) goto main::@12 +Simple Condition (bool~) main::$26 [92] if((byte~) main::$24==(byte) 0) goto main::@13 +Simple Condition (bool~) main::$28 [100] if((byte~) main::$27!=(byte) 0) goto main::@14 +Simple Condition (bool~) main::$31 [113] if((byte) main::key#0==(byte) $3f) goto main::@17 +Simple Condition (bool~) main::$34 [116] if((byte) main::pressed#2==(byte) 0) goto main::@18 +Simple Condition (bool~) main::$36 [123] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@16 +Simple Condition (bool~) print_str_at::$0 [133] if((byte) 0!=*((byte*) print_str_at::str#5)) goto print_str_at::@2 +Simple Condition (bool~) plot_chargen::$4 [144] if((byte) plot_chargen::shift#2==(byte) 0) goto plot_chargen::@1 +Simple Condition (bool~) plot_chargen::$12 [164] if((byte~) plot_chargen::$10==(byte) 0) goto plot_chargen::@5 +Simple Condition (bool~) plot_chargen::$14 [171] if((byte) plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 +Simple Condition (bool~) plot_chargen::$16 [176] if((byte) plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [54] (byte*~) main::$11 ← (const byte*) SCREEN + (word) $3e8 -Constant right-side identified [60] (byte*) print_str_at::at#0 ← (const byte*) SCREEN + (byte) 1 -Constant right-side identified [64] (byte*~) main::$2 ← (const byte*) SCREEN + (byte) 1 -Constant right-side identified [69] (byte*~) main::$5 ← (const byte*) SCREEN + (byte) 1 -Constant right-side identified [74] (byte*~) main::$8 ← (const byte*) SCREEN + (byte) 1 -Constant right-side identified [200] (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (byte) $28 +Constant right-side identified [32] (byte*~) main::$11 ← (const byte*) SCREEN + (word) $3e8 +Constant right-side identified [37] (byte*) print_str_at::at#0 ← (const byte*) SCREEN + (byte) 1 +Constant right-side identified [40] (byte*~) main::$2 ← (const byte*) SCREEN + (byte) 1 +Constant right-side identified [44] (byte*~) main::$5 ← (const byte*) SCREEN + (byte) 1 +Constant right-side identified [48] (byte*~) main::$8 ← (const byte*) SCREEN + (byte) 1 +Constant right-side identified [147] (byte*~) plot_chargen::$5 ← (const byte*) SCREEN + (byte) $28 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) mul8u::res#0 = 0 Constant (const byte*) main::sc#0 = SCREEN @@ -1242,16 +1242,16 @@ Constant (const byte) plot_chargen::c#1 = '*' Successful SSA optimization Pass2ConstantIdentification Constant (const word) mul8u::mb#0 = (word)mul8u::b#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [178] if(true) goto main::@9 +if() condition always true - replacing block destination [128] if(true) goto main::@9 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [86] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [88] if(main::i#1!=rangelast(0,3)) goto main::@7 to (number) 4 -Resolved ranged next value [168] main::ch#1 ← ++ main::ch#2 to ++ -Resolved ranged comparison value [170] if(main::ch#1!=rangelast(0,$3f)) goto main::@16 to (number) $40 -Resolved ranged next value [228] plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++ -Resolved ranged comparison value [230] if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 to (number) 8 -Resolved ranged next value [236] plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++ -Resolved ranged comparison value [238] if(plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 to (number) 8 +Resolved ranged next value [58] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [60] if(main::i#1!=rangelast(0,3)) goto main::@7 to (number) 4 +Resolved ranged next value [121] main::ch#1 ← ++ main::ch#2 to ++ +Resolved ranged comparison value [123] if(main::ch#1!=rangelast(0,$3f)) goto main::@16 to (number) $40 +Resolved ranged next value [169] plot_chargen::x#1 ← ++ plot_chargen::x#2 to ++ +Resolved ranged comparison value [171] if(plot_chargen::x#1!=rangelast(0,7)) goto plot_chargen::@4 to (number) 8 +Resolved ranged next value [174] plot_chargen::y#1 ← ++ plot_chargen::y#2 to ++ +Resolved ranged comparison value [176] if(plot_chargen::y#1!=rangelast(0,7)) goto plot_chargen::@3 to (number) 8 Eliminating unused constant (const byte) main::shift#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/examples/fastmultiply/fastmultiply8.asm b/src/test/ref/examples/fastmultiply/fastmultiply8.asm index 3b33540bd..499ef543e 100644 --- a/src/test/ref/examples/fastmultiply/fastmultiply8.asm +++ b/src/test/ref/examples/fastmultiply/fastmultiply8.asm @@ -20,6 +20,7 @@ main: { .label j = 5 .label i = 2 .label at_line = $c + // init_screen() jsr init_screen lda #<$400+4 sta.z at @@ -27,6 +28,7 @@ main: { sta.z at+1 ldx #0 __b1: + // print_sbyte_at(vals[k], at) lda vals,x sta.z print_sbyte_at.b lda.z at @@ -34,6 +36,7 @@ main: { lda.z at+1 sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // at += 4 lda #4 clc adc.z at @@ -41,6 +44,7 @@ main: { bcc !+ inc.z at+1 !: + // for(byte k: 0..8) inx cpx #9 bne __b1 @@ -51,6 +55,7 @@ main: { lda #>$400 sta.z at_line+1 __b2: + // at_line +=40 lda #$28 clc adc.z at_1 @@ -58,6 +63,7 @@ main: { bcc !+ inc.z at_1+1 !: + // print_sbyte_at(vals[i], at) ldy.z i lda vals,y sta.z print_sbyte_at.b @@ -73,6 +79,7 @@ main: { lda #0 sta.z j __b3: + // at += 4 lda #4 clc adc.z at_2 @@ -80,24 +87,30 @@ main: { bcc !+ inc.z at_2+1 !: + // fmul8(vals[i], vals[j]) ldy.z i lda vals,y ldy.z j ldx vals,y jsr fmul8 + // r = fmul8(vals[i], vals[j]) + // print_sbyte_at(r, at) sta.z print_sbyte_at.b lda.z at_2 sta.z print_sbyte_at.at lda.z at_2+1 sta.z print_sbyte_at.at+1 jsr print_sbyte_at + // for(byte j: 0..8) inc.z j lda #9 cmp.z j bne __b3 + // for(byte i: 0..8) inc.z i cmp.z i bne __b2 + // } rts } // Print a signed byte as hex at a specific screen position @@ -105,22 +118,28 @@ main: { print_sbyte_at: { .label b = 8 .label at = 6 + // if(b<0) lda.z b bmi __b1 + // print_char_at(' ', at) lda #' ' sta.z print_char_at.ch jsr print_char_at __b2: + // print_byte_at((byte)b, at+1) inc.z print_byte_at.at bne !+ inc.z print_byte_at.at+1 !: jsr print_byte_at + // } rts __b1: + // print_char_at('-', at) lda #'-' sta.z print_char_at.ch jsr print_char_at + // b = -b lda.z b eor #$ff clc @@ -133,9 +152,11 @@ print_sbyte_at: { print_char_at: { .label at = 6 .label ch = 9 + // *(at) = ch lda.z ch ldy #0 sta (at),y + // } rts } // Print a byte as HEX at a specific position @@ -143,18 +164,22 @@ print_char_at: { print_byte_at: { .label b = 8 .label at = 6 + // b>>4 lda.z b lsr lsr lsr lsr + // print_char_at(print_hextab[b>>4], at) tay lda print_hextab,y sta.z print_char_at.ch jsr print_char_at + // b&$f lda #$f and.z b tay + // print_char_at(print_hextab[b&$f], at+1) inc.z print_char_at.at bne !+ inc.z print_char_at.at+1 @@ -162,13 +187,17 @@ print_byte_at: { lda print_hextab,y sta.z print_char_at.ch jsr print_char_at + // } rts } // fmul8(signed byte register(A) a, signed byte register(X) b) fmul8: { + // *ap = a sta ap + // *bp = b txa sta bp + // asm lda ap sta A1+1 eor #$ff @@ -180,16 +209,21 @@ fmul8: { A2: sbc mulf_sqr2,x sta cp + // return *cp; + // } rts } init_screen: { .const WHITE = 1 .label COLS = $a + // print_cls() jsr print_cls ldx #0 __b1: + // COLS[l] = WHITE lda #WHITE sta $d800,x + // for(byte l: 0..39) inx cpx #$28 bne __b1 @@ -199,15 +233,20 @@ init_screen: { lda #>$d800 sta.z COLS+1 __b2: + // COLS[0] = WHITE lda #WHITE ldy #0 sta (COLS),y + // COLS[1] = WHITE ldy #1 sta (COLS),y + // COLS[2] = WHITE ldy #2 sta (COLS),y + // COLS[3] = WHITE ldy #3 sta (COLS),y + // COLS += 40 lda #$28 clc adc.z COLS @@ -215,14 +254,18 @@ init_screen: { bcc !+ inc.z COLS+1 !: + // for(byte m: 0..24) inx cpx #$19 bne __b2 + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -237,17 +280,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f + // asm sei + // *BORDERCOL = BLACK lda #BLACK sta BORDERCOL + // *BGCOL = BLACK sta BGCOL + // fillscreen(BUFFER, 00) lda #BUFFER sta.z fillscreen.screen+1 ldx #0 jsr fillscreen + // fillscreen(SCREEN1, 00) lda #SCREEN1 sta.z fillscreen.screen+1 ldx #0 jsr fillscreen + // fillscreen(SCREEN2, 00) lda #SCREEN2 sta.z fillscreen.screen+1 ldx #0 jsr fillscreen + // fillscreen(COLS, YELLOW) lda #COLS sta.z fillscreen.screen+1 ldx #YELLOW jsr fillscreen + // sid_rnd_init() jsr sid_rnd_init + // makecharset(CHARSET) jsr makecharset __b1: + // fire(SCREEN1) lda #SCREEN1 sta.z fire.screen+1 jsr fire + // *D018 = toD018(SCREEN1, CHARSET) lda #toD0181_return sta D018 + // fire(SCREEN2) lda #SCREEN2 sta.z fire.screen+1 jsr fire + // *D018 = toD018(SCREEN2, CHARSET) lda #toD0182_return sta D018 jmp __b1 @@ -88,12 +101,14 @@ fire: { lda #>BUFFER sta.z buffer+1 __b1: + // while (buffer != (BUFFER + (24 * 40))) lda.z buffer+1 cmp #>BUFFER+$18*$28 bne __b2 lda.z buffer cmp #BUFFER+$18*$28 sta.z buffer_1+1 __b6: + // for(; buffer != (BUFFER+(25*40)); ++screen, ++buffer) lda.z buffer_1+1 cmp #>BUFFER+$19*$28 bne __b7 lda.z buffer_1 cmp # 2) cmp #2+1 bcc __b4 + // c -= 3 sec sbc #3 __b4: + // *buffer = c ldy #0 sta (buffer),y + // *screen = *buffer = c lda (buffer),y sta (screen_1),y + // ++screen; inc.z screen_1 bne !+ inc.z screen_1+1 !: + // ++buffer; inc.z buffer bne !+ inc.z buffer+1 @@ -169,7 +202,9 @@ fire: { // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { + // return *SID_VOICE3_OSC; lda SID_VOICE3_OSC + // } rts } // Make a fire-friendly charset in chars $00-$3f of the passed charset @@ -189,6 +224,7 @@ makecharset: { lda #>CHARSET sta.z font+1 __b1: + // for (unsigned char *font = charset; font != (charset+(1*8)); ++font) lda.z font+1 cmp #>CHARSET+1*8 beq !__b2+ @@ -204,6 +240,7 @@ makecharset: { lda #>CHARSET+$40*8 sta.z font1+1 __b3: + // for (unsigned char *font = (charset+(64*8)); font != (charset+(256*8)); ++font) lda.z font1+1 cmp #>CHARSET+$100*8 beq !__b4+ @@ -217,18 +254,22 @@ makecharset: { lda #0 sta.z c __b5: + // for (unsigned char c = 0; c < 0x40; ++c) lda.z c cmp #$40 bcc b1 + // } rts b1: ldx #0 txa sta.z i __b6: + // for (unsigned char bc = 0, i = 0; i < 8; i++) lda.z i cmp #8 bcc b2 + // for (unsigned char c = 0; c < 0x40; ++c) inc.z c jmp __b5 b2: @@ -236,19 +277,23 @@ makecharset: { tya sta.z ii __b8: + // for (unsigned char ii = 0; ii < 8; ii++) lda.z ii cmp #8 bcc __b9 + // (unsigned short)c lda.z c sta.z __15 lda #0 sta.z __15+1 + // ((unsigned short)c) << 3 asl.z __16 rol.z __16+1 asl.z __16 rol.z __16+1 asl.z __16 rol.z __16+1 + // (((unsigned short)c) << 3) + i lda.z i clc adc.z __17 @@ -256,6 +301,7 @@ makecharset: { bcc !+ inc.z __17+1 !: + // (charset + (1 * 8)) [(((unsigned short)c) << 3) + i] = b clc lda.z __18 adc # 0x3f) cpx #$3f+1 bcc __b11 + // bc = bc - 0x40 txa axs #$40 + // i & 1 lda #1 and.z i + // ii + (i & 1) clc adc.z ii + // (ii + (i & 1)) & 0x7 and #7 sta.z __13 + // b += bittab[(ii + (i & 1)) & 0x7] tya ldy.z __13 clc adc bittab,y tay __b11: + // for (unsigned char ii = 0; ii < 8; ii++) inc.z ii jmp __b8 __b4: + // *font = 0xff lda #$ff ldy #0 sta (font1),y + // for (unsigned char *font = (charset+(64*8)); font != (charset+(256*8)); ++font) inc.z font1 bne !+ inc.z font1+1 !: jmp __b3 __b2: + // *font = 0x00 lda #0 tay sta (font),y + // for (unsigned char *font = charset; font != (charset+(1*8)); ++font) inc.z font bne !+ inc.z font+1 @@ -313,12 +372,15 @@ makecharset: { } // Initialize SID voice 3 for random number generation sid_rnd_init: { + // *SID_VOICE3_FREQ = $ffff lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 + // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL + // } rts } // Fill a screen (1000 bytes) with a specific byte @@ -330,13 +392,16 @@ fillscreen: { sta.z i sta.z i+1 __b1: + // *screen++ = fill txa ldy #0 sta (screen),y + // *screen++ = fill; inc.z screen bne !+ inc.z screen+1 !: + // for( unsigned word i : 0..999) inc.z i bne !+ inc.z i+1 @@ -347,5 +412,6 @@ fillscreen: { lda.z i cmp #<$3e8 bne __b1 + // } rts } diff --git a/src/test/ref/examples/fire/fire.log b/src/test/ref/examples/fire/fire.log index 13098905b..4ea9ba8d7 100644 --- a/src/test/ref/examples/fire/fire.log +++ b/src/test/ref/examples/fire/fire.log @@ -925,20 +925,20 @@ Identical Phi Values (byte*) makecharset::charset#11 (byte*) makecharset::charse Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) makecharset::charset#14 (byte*) makecharset::charset#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) fire::$3 [73] if((byte*) fire::buffer#4!=(byte*~) fire::$2) goto fire::@2 -Simple Condition (bool~) fire::$9 [82] if((byte) fire::c#0<=(byte) 2) goto fire::@4 -Simple Condition (bool~) fire::$11 [98] if((byte*) fire::buffer#10!=(byte*~) fire::$10) goto fire::@10 -Simple Condition (bool~) makecharset::$1 [116] if((byte*) makecharset::font#2!=(byte*~) makecharset::$0) goto makecharset::@2 -Simple Condition (bool~) makecharset::$4 [126] if((byte*) makecharset::font1#2!=(byte*~) makecharset::$3) goto makecharset::@8 -Simple Condition (bool~) makecharset::$5 [134] if((byte) makecharset::c#2<(byte) $40) goto makecharset::@14 -Simple Condition (bool~) makecharset::$6 [140] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@17 -Simple Condition (bool~) makecharset::$7 [148] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@20 -Simple Condition (bool~) makecharset::$9 [153] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22 -Simple Condition (bool~) fillscreen::$0 [178] if((word) fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 +Simple Condition (bool~) fire::$3 [58] if((byte*) fire::buffer#4!=(byte*~) fire::$2) goto fire::@2 +Simple Condition (bool~) fire::$9 [64] if((byte) fire::c#0<=(byte) 2) goto fire::@4 +Simple Condition (bool~) fire::$11 [76] if((byte*) fire::buffer#10!=(byte*~) fire::$10) goto fire::@10 +Simple Condition (bool~) makecharset::$1 [91] if((byte*) makecharset::font#2!=(byte*~) makecharset::$0) goto makecharset::@2 +Simple Condition (bool~) makecharset::$4 [98] if((byte*) makecharset::font1#2!=(byte*~) makecharset::$3) goto makecharset::@8 +Simple Condition (bool~) makecharset::$5 [104] if((byte) makecharset::c#2<(byte) $40) goto makecharset::@14 +Simple Condition (bool~) makecharset::$6 [109] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@17 +Simple Condition (bool~) makecharset::$7 [115] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@20 +Simple Condition (bool~) makecharset::$9 [118] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22 +Simple Condition (bool~) fillscreen::$0 [140] if((word) fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [71] (byte*~) fire::$2 ← (const byte*) BUFFER + (word)(number) $18*(number) $28 -Constant right-side identified [86] (byte*) fire::buffer#1 ← (const byte*) BUFFER + (word)(number) $18*(number) $28 -Constant right-side identified [96] (byte*~) fire::$10 ← (const byte*) BUFFER + (word)(number) $19*(number) $28 +Constant right-side identified [56] (byte*~) fire::$2 ← (const byte*) BUFFER + (word)(number) $18*(number) $28 +Constant right-side identified [66] (byte*) fire::buffer#1 ← (const byte*) BUFFER + (word)(number) $18*(number) $28 +Constant right-side identified [74] (byte*~) fire::$10 ← (const byte*) BUFFER + (word)(number) $19*(number) $28 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) fillscreen::screen#0 = BUFFER Constant (const byte) fillscreen::fill#0 = 0 @@ -971,13 +971,13 @@ Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Constant (const word) main::toD0182_$0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [25] if(true) goto main::@2 +if() condition always true - replacing block destination [23] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [176] fillscreen::i#1 ← ++ fillscreen::i#2 to ++ -Resolved ranged comparison value [178] if(fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 to (number) $3e8 -Rewriting conditional comparison [82] if((byte) fire::c#0<=(byte) 2) goto fire::@4 -Rewriting conditional comparison [153] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22 -De-inlining pointer[w] to *(pointer+w) [159] *((byte*~) makecharset::$14 + (word~) makecharset::$17) ← (byte) makecharset::b#2 +Resolved ranged next value [138] fillscreen::i#1 ← ++ fillscreen::i#2 to ++ +Resolved ranged comparison value [140] if(fillscreen::i#1!=rangelast(0,$3e7)) goto fillscreen::@1 to (number) $3e8 +Rewriting conditional comparison [64] if((byte) fire::c#0<=(byte) 2) goto fire::@4 +Rewriting conditional comparison [118] if((byte) makecharset::bc#1<=(byte) $3f) goto makecharset::@22 +De-inlining pointer[w] to *(pointer+w) [123] *((byte*~) makecharset::$14 + (word~) makecharset::$17) ← (byte) makecharset::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/examples/helloworld/helloworld.asm b/src/test/ref/examples/helloworld/helloworld.asm index c0ac50843..40bd1c9d5 100644 --- a/src/test/ref/examples/helloworld/helloworld.asm +++ b/src/test/ref/examples/helloworld/helloworld.asm @@ -4,8 +4,11 @@ .label print_char_cursor = 4 .label print_line_cursor = 2 main: { + // print_str("hello world!") jsr print_str + // print_ln() jsr print_ln + // } rts str: .text "hello world!" .byte 0 @@ -17,6 +20,7 @@ print_ln: { lda #>$400 sta.z print_line_cursor+1 __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -24,6 +28,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursormain.str sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 diff --git a/src/test/ref/examples/helloworld/helloworld.log b/src/test/ref/examples/helloworld/helloworld.log index 479d41039..39d4ed5fb 100644 --- a/src/test/ref/examples/helloworld/helloworld.log +++ b/src/test/ref/examples/helloworld/helloworld.log @@ -258,8 +258,8 @@ Identical Phi Values (byte*) print_char_cursor#14 (byte*) print_line_cursor#1 Identical Phi Values (byte*) print_char_cursor#16 (byte*) print_char_cursor#14 Identical Phi Values (byte*) print_line_cursor#11 (byte*) print_line_cursor#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_str::$0 [6] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [19] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 +Simple Condition (bool~) print_str::$0 [4] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [13] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const byte*) print_str::str#1 = main::str diff --git a/src/test/ref/examples/irq/irq-hyperscreen.asm b/src/test/ref/examples/irq/irq-hyperscreen.asm index 003b8e299..2eedae5a5 100644 --- a/src/test/ref/examples/irq/irq-hyperscreen.asm +++ b/src/test/ref/examples/irq/irq-hyperscreen.asm @@ -22,70 +22,93 @@ .const RED = 2 .label GHOST_BYTE = $3fff main: { + // *GHOST_BYTE = 0 lda #0 sta GHOST_BYTE + // asm sei + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=$7f // Set raster line to $fa lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = $fa lda #$fa sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *KERNEL_IRQ = &irq_bottom_1 // Set the IRQ routine lda #irq_bottom_1 sta KERNEL_IRQ+1 + // asm cli + // } rts } // Interrupt Routine 2 irq_bottom_2: { + // *BORDERCOL = WHITE lda #WHITE sta BORDERCOL + // *VIC_CONTROL |= VIC_RSEL // Set screen height back to 25 lines (preparing for the next screen) lda #VIC_RSEL ora VIC_CONTROL sta VIC_CONTROL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // *RASTER = $fa // Trigger IRQ 1 at line $fa lda #$fa sta RASTER + // *KERNEL_IRQ = &irq_bottom_1 lda #irq_bottom_1 sta KERNEL_IRQ+1 + // *BORDERCOL = RED lda #RED sta BORDERCOL + // } jmp $ea31 } // Interrupt Routine 1 irq_bottom_1: { + // *BORDERCOL = WHITE lda #WHITE sta BORDERCOL + // *VIC_CONTROL &= ($ff^VIC_RSEL) // Set screen height to 24 lines - this is done after the border should have started drawing - so it wont start lda #$ff^VIC_RSEL and VIC_CONTROL sta VIC_CONTROL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // *RASTER = $fd // Trigger IRQ 2 at line $fd lda #$fd sta RASTER + // *KERNEL_IRQ = &irq_bottom_2 lda #irq_bottom_2 sta KERNEL_IRQ+1 + // *BORDERCOL = RED lda #RED sta BORDERCOL + // } jmp $ea81 } diff --git a/src/test/ref/examples/kernalload/kernalload.asm b/src/test/ref/examples/kernalload/kernalload.asm index 134f23e01..3a5f37ba8 100644 --- a/src/test/ref/examples/kernalload/kernalload.asm +++ b/src/test/ref/examples/kernalload/kernalload.asm @@ -29,26 +29,38 @@ .segment Code main: { .const toSpritePtr1_return = LOAD_SPRITE/$40 + // loadFileToMemory(8, "SPRITE", LOAD_SPRITE) jsr loadFileToMemory + // loadFileToMemory(8, "SPRITE", LOAD_SPRITE) + // status = loadFileToMemory(8, "SPRITE", LOAD_SPRITE) tax + // if(status!=0xff) cpx #$ff beq __b1 + // *BORDERCOL = 0x02 lda #2 sta BORDERCOL + // error(status) txa jsr error __b1: + // *SPRITES_ENABLE = %00000001 // Show the loaded sprite on screen lda #1 sta SPRITES_ENABLE + // SPRITES_PTR[0] = toSpritePtr(LOAD_SPRITE) lda #toSpritePtr1_return sta SPRITES_PTR + // SPRITES_COLS[0] = GREEN lda #GREEN sta SPRITES_COLS + // SPRITES_XPOS[0] = 0x15 lda #$15 sta SPRITES_XPOS + // SPRITES_YPOS[0] = 0x33 lda #$33 sta SPRITES_YPOS + // } rts .segment Data filename: .text "SPRITE" @@ -60,9 +72,12 @@ main: { // error(byte register(A) err) error: { .label errCode = $ff + // *errCode = err sta errCode + // asm tax jsr $a437 + // } rts } // Load a file to memory @@ -71,9 +86,13 @@ error: { // - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf) loadFileToMemory: { .label device = 8 + // setnam(filename) jsr setnam + // setlfs(device) jsr setlfs + // load(address, false) jsr load + // } rts } //LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.) @@ -82,12 +101,15 @@ load: { .label loadOrVerify = $fd .label loadAddress = $fe .label status = $fd + // *loadOrVerify = (char)verify lda #0 sta loadOrVerify + // *loadAddress = address lda #LOAD_SPRITE sta loadAddress+1 + // asm ldx loadAddress tay lda loadOrVerify @@ -96,17 +118,22 @@ load: { lda #$ff error: sta status + // return *status; + // } rts } // SETLFS. Set file parameters. setlfs: { .label deviceNum = $ff + // *deviceNum = device lda #loadFileToMemory.device sta deviceNum + // asm tax lda #1 ldy #0 jsr $ffba + // } rts } // Kernal SETNAM function @@ -115,17 +142,24 @@ setnam: { .label filename_len = $fd .label filename_ptr = $fe .label __0 = 4 + // strlen(filename) jsr strlen + // strlen(filename) + // (char)strlen(filename) lda.z __0 + // *filename_len = (char)strlen(filename) sta filename_len + // *filename_ptr = filename lda #main.filename sta filename_ptr+1 + // asm lda filename_len ldx filename_ptr ldy filename_ptr+1 jsr $ffbd + // } rts } // Computes the length of the string str up to but not including the terminating null character. @@ -142,16 +176,20 @@ strlen: { lda #>main.filename sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // len++; inc.z len bne !+ inc.z len+1 !: + // str++; inc.z str bne !+ inc.z str+1 diff --git a/src/test/ref/examples/kernalload/kernalload.log b/src/test/ref/examples/kernalload/kernalload.log index a8795e607..a74ed1a5d 100644 --- a/src/test/ref/examples/kernalload/kernalload.log +++ b/src/test/ref/examples/kernalload/kernalload.log @@ -434,7 +434,7 @@ Identical Phi Values (bool) load::verify#1 (bool) load::verify#0 Identical Phi Values (byte*) load::address#1 (byte*) load::address#0 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) strlen::$0 [4] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2 -Simple Condition (bool~) main::$2 [23] if((byte) main::status#0==(byte) $ff) goto main::@1 +Simple Condition (bool~) main::$2 [15] if((byte) main::status#0==(byte) $ff) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) strlen::len#0 = 0 Constant (const byte) loadFileToMemory::device#0 = 8 @@ -453,10 +453,10 @@ Constant (const byte*) strlen::str#1 = setnam::filename#0 Successful SSA optimization Pass2ConstantIdentification Simplifying constant evaluating to zero (byte)(const bool) load::verify#0 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero SPRITES_PTR in [35] *((const byte*) SPRITES_PTR + (byte) 0) ← (byte) main::toSpritePtr1_return#0 -Simplifying expression containing zero SPRITES_COLS in [36] *((const byte*) SPRITES_COLS + (byte) 0) ← (const byte) GREEN -Simplifying expression containing zero SPRITES_XPOS in [37] *((const byte*) SPRITES_XPOS + (byte) 0) ← (byte) $15 -Simplifying expression containing zero SPRITES_YPOS in [38] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte) $33 +Simplifying expression containing zero SPRITES_PTR in [21] *((const byte*) SPRITES_PTR + (byte) 0) ← (byte) main::toSpritePtr1_return#0 +Simplifying expression containing zero SPRITES_COLS in [22] *((const byte*) SPRITES_COLS + (byte) 0) ← (const byte) GREEN +Simplifying expression containing zero SPRITES_XPOS in [23] *((const byte*) SPRITES_XPOS + (byte) 0) ← (byte) $15 +Simplifying expression containing zero SPRITES_YPOS in [24] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte) $33 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const bool) load::verify#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/examples/linking/linking.asm b/src/test/ref/examples/linking/linking.asm index 28d27d388..e9e998ab0 100644 --- a/src/test/ref/examples/linking/linking.asm +++ b/src/test/ref/examples/linking/linking.asm @@ -20,15 +20,19 @@ main: { ldx #0 __b1: + // base[i] = i txa sta base,x + // for(char i:0..255) inx cpx #0 bne __b1 __b2: + // fillscreen(*BGCOL) lda BGCOL sta.z fillscreen.c jsr fillscreen + // (*BGCOL)++; inc BGCOL jmp __b2 } @@ -43,6 +47,7 @@ fillscreen: { lda #>SCREEN sta.z screen+1 __b1: + // for( char *screen = SCREEN; screenSCREEN+$3e8 bcc __b2 @@ -51,14 +56,19 @@ fillscreen: { cmp #PLEX_XPOS[xpos_idx] lda PLEX_XPOS+1,x + // if(>PLEX_XPOS[xpos_idx]!=0) cmp #0 bne __b1 + // $ff^plex_sprite_msb lda #$ff eor.z plex_sprite_msb + // *SPRITES_XMSB &= ($ff^plex_sprite_msb) and SPRITES_XMSB sta SPRITES_XMSB __b2: + // plex_sprite_idx+1 ldx.z plex_sprite_idx inx + // plex_sprite_idx = (plex_sprite_idx+1)&7 lda #7 sax.z plex_sprite_idx + // plex_show_idx++; inc.z plex_show_idx + // plex_sprite_msb *=2 asl.z plex_sprite_msb + // if(plex_sprite_msb==0) lda.z plex_sprite_msb cmp #0 bne __b5 @@ -153,8 +196,10 @@ plexShowSprite: { sta.z plex_sprite_msb rts __b5: + // } rts __b1: + // *SPRITES_XMSB |= plex_sprite_msb lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB @@ -176,20 +221,26 @@ plexSort: { lda #0 sta.z m __b1: + // nxt_idx = PLEX_SORTED_IDX[m+1] ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx + // nxt_y = PLEX_YPOS[nxt_idx] tay lda PLEX_YPOS,y sta.z nxt_y + // if(nxt_y=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -Simple Condition (bool~) plexSort::$8 [30] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 -Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [53] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 -Simple Condition (bool~) plexShowSprite::$4 [83] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -Simple Condition (bool~) plexShowSprite::$8 [97] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return -Simple Condition (bool~) init::$3 [145] if((byte) init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 -Simple Condition (bool~) init::$4 [153] if((byte) init::ss#1!=rangelast(0,7)) goto init::@3 -Simple Condition (bool~) loop::$0 [163] if(*((const byte*) RASTER)!=(byte) $ff) goto loop::@4 -Simple Condition (bool~) loop::$2 [173] if((byte) loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 -Simple Condition (bool~) loop::$6 [187] if((byte~) loop::$5!=(byte) 0) goto loop::@12 -Simple Condition (bool~) loop::$8 [201] if(*((const byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@19 -Simple Condition (bool~) loop::$11 [212] if((byte) loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 +Simple Condition (bool~) plexInit::$1 [11] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 +Simple Condition (bool~) plexSort::$3 [19] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 +Simple Condition (bool~) plexSort::$8 [23] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 +Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [42] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 +Simple Condition (bool~) plexShowSprite::$4 [61] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 +Simple Condition (bool~) plexShowSprite::$8 [70] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@return +Simple Condition (bool~) init::$3 [99] if((byte) init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 +Simple Condition (bool~) init::$4 [106] if((byte) init::ss#1!=rangelast(0,7)) goto init::@3 +Simple Condition (bool~) loop::$0 [114] if(*((const byte*) RASTER)!=(byte) $ff) goto loop::@4 +Simple Condition (bool~) loop::$2 [122] if((byte) loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 +Simple Condition (bool~) loop::$6 [131] if((byte~) loop::$5!=(byte) 0) goto loop::@12 +Simple Condition (bool~) loop::$8 [138] if(*((const byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@19 +Simple Condition (bool~) loop::$11 [144] if((byte) loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s [39] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 +Rewriting && if()-condition to two if()s [30] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 Successful SSA optimization Pass2ConditionalAndOrRewriting -Constant right-side identified [137] (byte*~) init::$1 ← (const byte*) SPRITE / (byte) $40 +Constant right-side identified [91] (byte*~) init::$1 ← (const byte*) SPRITE / (byte) $40 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PLEX_SCREEN_PTR#0 = (byte*)$400+$3f8 Constant (const byte) plex_show_idx#0 = 0 @@ -1437,22 +1437,22 @@ Constant (const byte) loop::ss#0 = 0 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) init::$2 = (byte)init::$1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [160] if(true) goto loop::@4 +if() condition always true - replacing block destination [111] if(true) goto loop::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [13] plexInit::i#1 ← ++ plexInit::i#2 to ++ -Resolved ranged comparison value [15] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [28] plexSort::m#1 ← ++ plexSort::m#2 to ++ -Resolved ranged comparison value [30] if(plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 to (const byte) PLEX_COUNT-(byte) 2+(number) 1 -Resolved ranged next value [51] plexSort::plexFreePrepare1_s#1 ← ++ plexSort::plexFreePrepare1_s#2 to ++ -Resolved ranged comparison value [53] if(plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 to (number) 8 -Resolved ranged next value [143] init::sx#1 ← ++ init::sx#2 to ++ -Resolved ranged comparison value [145] if(init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [151] init::ss#1 ← ++ init::ss#2 to ++ -Resolved ranged comparison value [153] if(init::ss#1!=rangelast(0,7)) goto init::@3 to (number) 8 -Resolved ranged next value [171] loop::sy#1 ← ++ loop::sy#2 to ++ -Resolved ranged comparison value [173] if(loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [210] loop::ss#1 ← ++ loop::ss#5 to ++ -Resolved ranged comparison value [212] if(loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [9] plexInit::i#1 ← ++ plexInit::i#2 to ++ +Resolved ranged comparison value [11] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [21] plexSort::m#1 ← ++ plexSort::m#2 to ++ +Resolved ranged comparison value [23] if(plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 to (const byte) PLEX_COUNT-(byte) 2+(number) 1 +Resolved ranged next value [40] plexSort::plexFreePrepare1_s#1 ← ++ plexSort::plexFreePrepare1_s#2 to ++ +Resolved ranged comparison value [42] if(plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 to (number) 8 +Resolved ranged next value [97] init::sx#1 ← ++ init::sx#2 to ++ +Resolved ranged comparison value [99] if(init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [104] init::ss#1 ← ++ init::ss#2 to ++ +Resolved ranged comparison value [106] if(init::ss#1!=rangelast(0,7)) goto init::@3 to (number) 8 +Resolved ranged next value [120] loop::sy#1 ← ++ loop::sy#2 to ++ +Resolved ranged comparison value [122] if(loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [142] loop::ss#1 ← ++ loop::ss#5 to ++ +Resolved ranged comparison value [144] if(loop::ss#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@18 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 Eliminating unused variable - keeping the phi block (byte) plex_show_idx#20 Eliminating unused variable - keeping the phi block (byte) plex_sprite_idx#20 Eliminating unused variable - keeping the phi block (byte) plex_sprite_msb#10 @@ -1503,7 +1503,7 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) plexShowSprite::$11 = (byte~) plexShowSprite::$10 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) plexSort::$5 [19] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 -Simple Condition (bool~) plexSort::$6 [96] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +Simple Condition (bool~) plexSort::$6 [95] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [19] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement diff --git a/src/test/ref/examples/music/music.asm b/src/test/ref/examples/music/music.asm index 67ec61a7b..6d663d1a8 100644 --- a/src/test/ref/examples/music/music.asm +++ b/src/test/ref/examples/music/music.asm @@ -5,22 +5,28 @@ .label RASTER = $d012 .label BORDERCOL = $d020 .label MUSIC = $1000 + // kickasm // Load the SID .const music = LoadSid("toiletrensdyr.sid") // Place the SID into memory // Play the music main: { + // asm // Initialize the music jsr music.init // Wait for the RASTER __b1: + // while (*RASTER != $fd) lda #$fd cmp RASTER bne __b1 + // (*BORDERCOL)++; inc BORDERCOL + // asm // Play the music jsr music.play + // (*BORDERCOL)--; dec BORDERCOL jmp __b1 } diff --git a/src/test/ref/examples/music/music_irq.asm b/src/test/ref/examples/music/music_irq.asm index 087b32fd0..cbf74f918 100644 --- a/src/test/ref/examples/music/music_irq.asm +++ b/src/test/ref/examples/music/music_irq.asm @@ -18,43 +18,57 @@ // The vector used when the KERNAL serves IRQ interrupts .label KERNEL_IRQ = $314 .label MUSIC = $1000 + // kickasm // Load the SID .const music = LoadSid("toiletrensdyr.sid") // Place the SID into memory // Setup Raster IRQ and initialize SID player main: { + // asm sei jsr music.init + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=$7f // Set raster line to $fd lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = $fd lda #$fd sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *KERNEL_IRQ = &irq_play // Set the IRQ routine lda #irq_play sta KERNEL_IRQ+1 + // asm cli + // } rts } // Raster IRQ Routine playing music irq_play: { + // (*BORDERCOL)++; inc BORDERCOL + // asm // Play SID jsr music.play + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // (*BORDERCOL)--; dec BORDERCOL + // } jmp $ea31 } .pc = MUSIC "MUSIC" diff --git a/src/test/ref/examples/nmisamples/nmisamples.asm b/src/test/ref/examples/nmisamples/nmisamples.asm index a78e5e071..eb29fb436 100644 --- a/src/test/ref/examples/nmisamples/nmisamples.asm +++ b/src/test/ref/examples/nmisamples/nmisamples.asm @@ -20,6 +20,7 @@ .const SAMPLE_SIZE = $6100 .label sample = 2 __b1: + // sample = SAMPLE lda #SAMPLE @@ -27,6 +28,7 @@ __b1: jsr main rts main: { + // asm // Boosting 8580 Digis // See https://gist.github.com/munshkr/30f35e39905e63876ff7 (line 909) lda #$ff @@ -38,54 +40,72 @@ main: { sta $d40b sta $d412 sei + // *CIA2_INTERRUPT = CIA_INTERRUPT_CLEAR lda #CIA_INTERRUPT_CLEAR sta CIA2_INTERRUPT + // *KERNEL_NMI = &nmi lda #nmi sta KERNEL_NMI+1 + // *CIA2_TIMER_A = 0x88 lda #0 sta CIA2_TIMER_A+1 lda #<$88 sta CIA2_TIMER_A + // *CIA2_INTERRUPT = 0x81 // speed lda #$81 sta CIA2_INTERRUPT + // *CIA2_TIMER_A_CONTROL = 0x01 lda #1 sta CIA2_TIMER_A_CONTROL + // asm cli + // } rts } nmi2: { sta rega+1 stx regx+1 sty regy+1 + // (*BORDERCOL)++; inc BORDERCOL + // asm lda CIA2_INTERRUPT + // *sample >> 4 ldy #0 lda (sample),y lsr lsr lsr lsr + // *SID_VOLUME = *sample >> 4 sta SID_VOLUME + // sample++; inc.z sample bne !+ inc.z sample+1 !: + // >sample lda.z sample+1 + // if (>sample == >(SAMPLE+$6100)) cmp #>SAMPLE+$6100 bne __b1 + // sample = SAMPLE lda #SAMPLE sta.z sample+1 __b1: + // *KERNEL_NMI = &nmi lda #nmi sta KERNEL_NMI+1 + // (*BORDERCOL)--; dec BORDERCOL + // } rega: lda #00 regx: @@ -98,17 +118,24 @@ nmi: { sta rega+1 stx regx+1 sty regy+1 + // (*BORDERCOL)++; inc BORDERCOL + // asm lda CIA2_INTERRUPT + // *sample & $0f lda #$f ldy #0 and (sample),y + // *SID_VOLUME = *sample & $0f sta SID_VOLUME + // *KERNEL_NMI = &nmi2 lda #nmi2 sta KERNEL_NMI+1 + // (*BORDERCOL)--; dec BORDERCOL + // } rega: lda #00 regx: diff --git a/src/test/ref/examples/nmisamples/nmisamples.log b/src/test/ref/examples/nmisamples/nmisamples.log index 668dc71f6..1d95ca4c1 100644 --- a/src/test/ref/examples/nmisamples/nmisamples.log +++ b/src/test/ref/examples/nmisamples/nmisamples.log @@ -136,7 +136,7 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) nmi::$1 ← *((byte*) sample) & (byte) $f Inversing boolean not [24] (bool~) nmi2::$4 ← (byte~) nmi2::$2 != >(const byte*) SAMPLE+(word) $6100 from [23] (bool~) nmi2::$3 ← (byte~) nmi2::$2 == >(const byte*) SAMPLE+(word) $6100 Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) nmi2::$4 [25] if((byte~) nmi2::$2!=>(const byte*) SAMPLE+(word) $6100) goto nmi2::@1 +Simple Condition (bool~) nmi2::$4 [24] if((byte~) nmi2::$2!=>(const byte*) SAMPLE+(word) $6100) goto nmi2::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Adding NOP phi() at start of @begin Adding NOP phi() at start of @7 diff --git a/src/test/ref/examples/plasma/plasma-unroll.asm b/src/test/ref/examples/plasma/plasma-unroll.asm index 800f06890..35df7021f 100644 --- a/src/test/ref/examples/plasma/plasma-unroll.asm +++ b/src/test/ref/examples/plasma/plasma-unroll.asm @@ -33,18 +33,23 @@ main: { .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f .label col = 9 + // asm sei + // *BORDERCOL = BLUE lda #BLUE sta BORDERCOL + // *BGCOL = BLUE sta BGCOL lda #COLS sta.z col+1 __b1: + // *col = BLACK lda #BLACK ldy #0 sta (col),y + // for(unsigned char* col : COLS..COLS+1000) inc.z col bne !+ inc.z col+1 @@ -55,7 +60,9 @@ main: { lda.z col cmp #$100 bcc __b2 @@ -268,24 +354,32 @@ makecharset: { cmp #<$100 bcc __b2 !: + // } rts __b2: + // s) lda.z s cmp.z __7 bcs __b8 + // b |= bittab[ii] tya ora bittab,x tay __b8: + // for (unsigned char ii = 0; ii < 8; ++ii) inx jmp __b5 bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 @@ -344,24 +448,31 @@ makecharset: { // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { + // return *SID_VOICE3_OSC; lda SID_VOICE3_OSC + // } rts } // Print a single char print_char: { .const ch = '.' + // *(print_char_cursor++) = ch lda #ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -376,17 +487,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$ffff sta SID_VOICE3_FREQ+1 + // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL + // } rts } .align $100 diff --git a/src/test/ref/examples/plasma/plasma-unroll.log b/src/test/ref/examples/plasma/plasma-unroll.log index 7d3038e0e..faa65ea4d 100644 --- a/src/test/ref/examples/plasma/plasma-unroll.log +++ b/src/test/ref/examples/plasma/plasma-unroll.log @@ -1594,18 +1594,18 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_line_cursor#0 Identical Phi Values (byte*) makecharset::charset#10 (byte*) makecharset::charset#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) main::$2 [58] if((byte*) main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 -Simple Condition (bool~) doplasma::$0 [113] if((byte) doplasma::i#2<(byte) $19) goto doplasma::@2 -Simple Condition (bool~) doplasma::$3 [131] if((byte) doplasma::i1#2<(byte) $28) goto doplasma::@8 -Simple Condition (bool~) doplasma::$5 [144] if((byte) doplasma::i2#2<(byte) $28) goto doplasma::@14 -Simple Condition (bool~) doplasma::$6 [150] unroll if((byte) doplasma::ii#2<(byte) $19) goto doplasma::@17 -Simple Condition (bool~) makecharset::$2 [175] if((word) makecharset::c#2<(word) $100) goto makecharset::@2 -Simple Condition (bool~) makecharset::$4 [182] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5 -Simple Condition (bool~) makecharset::$14 [190] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19 -Simple Condition (bool~) makecharset::$5 [193] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8 -Simple Condition (bool~) makecharset::$9 [202] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) main::$2 [39] if((byte*) main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 +Simple Condition (bool~) doplasma::$0 [72] if((byte) doplasma::i#2<(byte) $19) goto doplasma::@2 +Simple Condition (bool~) doplasma::$3 [86] if((byte) doplasma::i1#2<(byte) $28) goto doplasma::@8 +Simple Condition (bool~) doplasma::$5 [97] if((byte) doplasma::i2#2<(byte) $28) goto doplasma::@14 +Simple Condition (bool~) doplasma::$6 [102] unroll if((byte) doplasma::ii#2<(byte) $19) goto doplasma::@17 +Simple Condition (bool~) makecharset::$2 [117] if((word) makecharset::c#2<(word) $100) goto makecharset::@2 +Simple Condition (bool~) makecharset::$4 [123] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5 +Simple Condition (bool~) makecharset::$14 [128] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19 +Simple Condition (bool~) makecharset::$5 [131] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8 +Simple Condition (bool~) makecharset::$9 [137] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -1638,12 +1638,12 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [84] if(true) goto main::@4 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [56] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [56] main::col#1 ← ++ main::col#2 to ++ -Resolved ranged comparison value [58] if(main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 to (byte*)(const byte*) COLS+(word) $3e8+(number) 1 -De-inlining pointer[w] to *(pointer+w) [206] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2 +Resolved ranged next value [37] main::col#1 ← ++ main::col#2 to ++ +Resolved ranged comparison value [39] if(main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 to (byte*)(const byte*) COLS+(word) $3e8+(number) 1 +De-inlining pointer[w] to *(pointer+w) [140] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars @@ -1709,8 +1709,8 @@ Alias (byte) doplasma::val#1 = (byte) doplasma::val#4 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#4 (const byte) doplasma::ii#1 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [35] (byte~) doplasma::$9 ← (const byte) doplasma::ii#1 * (byte) $28 -Constant right-side identified [38] (byte) doplasma::ii#5 ← ++ (const byte) doplasma::ii#1 +Constant right-side identified [34] (byte~) doplasma::$9 ← (const byte) doplasma::ii#1 * (byte) $28 +Constant right-side identified [37] (byte) doplasma::ii#5 ← ++ (const byte) doplasma::ii#1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$9 = doplasma::ii#1*$28 Constant (const byte) doplasma::ii#5 = ++doplasma::ii#1 @@ -1727,8 +1727,8 @@ Alias (byte) doplasma::val#5 = (byte) doplasma::val#6 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#6 (const byte) doplasma::ii#5 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [37] (byte~) doplasma::$11 ← (const byte) doplasma::ii#5 * (byte) $28 -Constant right-side identified [40] (byte) doplasma::ii#7 ← ++ (const byte) doplasma::ii#5 +Constant right-side identified [36] (byte~) doplasma::$11 ← (const byte) doplasma::ii#5 * (byte) $28 +Constant right-side identified [39] (byte) doplasma::ii#7 ← ++ (const byte) doplasma::ii#5 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$11 = doplasma::ii#5*$28 Constant (const byte) doplasma::ii#7 = ++doplasma::ii#5 @@ -1745,8 +1745,8 @@ Alias (byte) doplasma::val#7 = (byte) doplasma::val#8 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#8 (const byte) doplasma::ii#7 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [39] (byte~) doplasma::$13 ← (const byte) doplasma::ii#7 * (byte) $28 -Constant right-side identified [42] (byte) doplasma::ii#9 ← ++ (const byte) doplasma::ii#7 +Constant right-side identified [38] (byte~) doplasma::$13 ← (const byte) doplasma::ii#7 * (byte) $28 +Constant right-side identified [41] (byte) doplasma::ii#9 ← ++ (const byte) doplasma::ii#7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$13 = doplasma::ii#7*$28 Constant (const byte) doplasma::ii#9 = ++doplasma::ii#7 @@ -1763,8 +1763,8 @@ Alias (byte) doplasma::val#10 = (byte) doplasma::val#9 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#10 (const byte) doplasma::ii#9 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [41] (byte~) doplasma::$15 ← (const byte) doplasma::ii#9 * (byte) $28 -Constant right-side identified [44] (byte) doplasma::ii#11 ← ++ (const byte) doplasma::ii#9 +Constant right-side identified [40] (byte~) doplasma::$15 ← (const byte) doplasma::ii#9 * (byte) $28 +Constant right-side identified [43] (byte) doplasma::ii#11 ← ++ (const byte) doplasma::ii#9 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$15 = doplasma::ii#9*$28 Constant (const byte) doplasma::ii#11 = ++doplasma::ii#9 @@ -1781,8 +1781,8 @@ Alias (byte) doplasma::val#11 = (byte) doplasma::val#12 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#12 (const byte) doplasma::ii#11 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [43] (byte~) doplasma::$17 ← (const byte) doplasma::ii#11 * (byte) $28 -Constant right-side identified [46] (byte) doplasma::ii#13 ← ++ (const byte) doplasma::ii#11 +Constant right-side identified [42] (byte~) doplasma::$17 ← (const byte) doplasma::ii#11 * (byte) $28 +Constant right-side identified [45] (byte) doplasma::ii#13 ← ++ (const byte) doplasma::ii#11 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$17 = doplasma::ii#11*$28 Constant (const byte) doplasma::ii#13 = ++doplasma::ii#11 @@ -1799,8 +1799,8 @@ Alias (byte) doplasma::val#13 = (byte) doplasma::val#14 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#14 (const byte) doplasma::ii#13 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [45] (byte~) doplasma::$19 ← (const byte) doplasma::ii#13 * (byte) $28 -Constant right-side identified [48] (byte) doplasma::ii#15 ← ++ (const byte) doplasma::ii#13 +Constant right-side identified [44] (byte~) doplasma::$19 ← (const byte) doplasma::ii#13 * (byte) $28 +Constant right-side identified [47] (byte) doplasma::ii#15 ← ++ (const byte) doplasma::ii#13 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$19 = doplasma::ii#13*$28 Constant (const byte) doplasma::ii#15 = ++doplasma::ii#13 @@ -1817,8 +1817,8 @@ Alias (byte) doplasma::val#15 = (byte) doplasma::val#16 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#16 (const byte) doplasma::ii#15 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [47] (byte~) doplasma::$21 ← (const byte) doplasma::ii#15 * (byte) $28 -Constant right-side identified [50] (byte) doplasma::ii#17 ← ++ (const byte) doplasma::ii#15 +Constant right-side identified [46] (byte~) doplasma::$21 ← (const byte) doplasma::ii#15 * (byte) $28 +Constant right-side identified [49] (byte) doplasma::ii#17 ← ++ (const byte) doplasma::ii#15 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$21 = doplasma::ii#15*$28 Constant (const byte) doplasma::ii#17 = ++doplasma::ii#15 @@ -1835,8 +1835,8 @@ Alias (byte) doplasma::val#17 = (byte) doplasma::val#18 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#18 (const byte) doplasma::ii#17 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [49] (byte~) doplasma::$23 ← (const byte) doplasma::ii#17 * (byte) $28 -Constant right-side identified [52] (byte) doplasma::ii#19 ← ++ (const byte) doplasma::ii#17 +Constant right-side identified [48] (byte~) doplasma::$23 ← (const byte) doplasma::ii#17 * (byte) $28 +Constant right-side identified [51] (byte) doplasma::ii#19 ← ++ (const byte) doplasma::ii#17 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$23 = doplasma::ii#17*$28 Constant (const byte) doplasma::ii#19 = ++doplasma::ii#17 @@ -1853,8 +1853,8 @@ Alias (byte) doplasma::val#19 = (byte) doplasma::val#20 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#20 (const byte) doplasma::ii#19 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [51] (byte~) doplasma::$25 ← (const byte) doplasma::ii#19 * (byte) $28 -Constant right-side identified [54] (byte) doplasma::ii#21 ← ++ (const byte) doplasma::ii#19 +Constant right-side identified [50] (byte~) doplasma::$25 ← (const byte) doplasma::ii#19 * (byte) $28 +Constant right-side identified [53] (byte) doplasma::ii#21 ← ++ (const byte) doplasma::ii#19 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$25 = doplasma::ii#19*$28 Constant (const byte) doplasma::ii#21 = ++doplasma::ii#19 @@ -1871,8 +1871,8 @@ Alias (byte) doplasma::val#21 = (byte) doplasma::val#22 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#22 (const byte) doplasma::ii#21 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [53] (byte~) doplasma::$27 ← (const byte) doplasma::ii#21 * (byte) $28 -Constant right-side identified [56] (byte) doplasma::ii#23 ← ++ (const byte) doplasma::ii#21 +Constant right-side identified [52] (byte~) doplasma::$27 ← (const byte) doplasma::ii#21 * (byte) $28 +Constant right-side identified [55] (byte) doplasma::ii#23 ← ++ (const byte) doplasma::ii#21 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$27 = doplasma::ii#21*$28 Constant (const byte) doplasma::ii#23 = ++doplasma::ii#21 @@ -1889,8 +1889,8 @@ Alias (byte) doplasma::val#23 = (byte) doplasma::val#24 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#24 (const byte) doplasma::ii#23 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [55] (byte~) doplasma::$29 ← (const byte) doplasma::ii#23 * (byte) $28 -Constant right-side identified [58] (byte) doplasma::ii#25 ← ++ (const byte) doplasma::ii#23 +Constant right-side identified [54] (byte~) doplasma::$29 ← (const byte) doplasma::ii#23 * (byte) $28 +Constant right-side identified [57] (byte) doplasma::ii#25 ← ++ (const byte) doplasma::ii#23 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$29 = doplasma::ii#23*$28 Constant (const byte) doplasma::ii#25 = ++doplasma::ii#23 @@ -1907,8 +1907,8 @@ Alias (byte) doplasma::val#25 = (byte) doplasma::val#26 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#26 (const byte) doplasma::ii#25 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [57] (byte~) doplasma::$31 ← (const byte) doplasma::ii#25 * (byte) $28 -Constant right-side identified [60] (byte) doplasma::ii#27 ← ++ (const byte) doplasma::ii#25 +Constant right-side identified [56] (byte~) doplasma::$31 ← (const byte) doplasma::ii#25 * (byte) $28 +Constant right-side identified [59] (byte) doplasma::ii#27 ← ++ (const byte) doplasma::ii#25 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$31 = doplasma::ii#25*$28 Constant (const byte) doplasma::ii#27 = ++doplasma::ii#25 @@ -1925,8 +1925,8 @@ Alias (byte) doplasma::val#27 = (byte) doplasma::val#28 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#28 (const byte) doplasma::ii#27 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [59] (byte~) doplasma::$33 ← (const byte) doplasma::ii#27 * (byte) $28 -Constant right-side identified [62] (byte) doplasma::ii#29 ← ++ (const byte) doplasma::ii#27 +Constant right-side identified [58] (byte~) doplasma::$33 ← (const byte) doplasma::ii#27 * (byte) $28 +Constant right-side identified [61] (byte) doplasma::ii#29 ← ++ (const byte) doplasma::ii#27 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$33 = doplasma::ii#27*$28 Constant (const byte) doplasma::ii#29 = ++doplasma::ii#27 @@ -1943,8 +1943,8 @@ Alias (byte) doplasma::val#29 = (byte) doplasma::val#30 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#30 (const byte) doplasma::ii#29 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [61] (byte~) doplasma::$35 ← (const byte) doplasma::ii#29 * (byte) $28 -Constant right-side identified [64] (byte) doplasma::ii#31 ← ++ (const byte) doplasma::ii#29 +Constant right-side identified [60] (byte~) doplasma::$35 ← (const byte) doplasma::ii#29 * (byte) $28 +Constant right-side identified [63] (byte) doplasma::ii#31 ← ++ (const byte) doplasma::ii#29 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$35 = doplasma::ii#29*$28 Constant (const byte) doplasma::ii#31 = ++doplasma::ii#29 @@ -1961,8 +1961,8 @@ Alias (byte) doplasma::val#31 = (byte) doplasma::val#32 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#32 (const byte) doplasma::ii#31 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [63] (byte~) doplasma::$37 ← (const byte) doplasma::ii#31 * (byte) $28 -Constant right-side identified [66] (byte) doplasma::ii#33 ← ++ (const byte) doplasma::ii#31 +Constant right-side identified [62] (byte~) doplasma::$37 ← (const byte) doplasma::ii#31 * (byte) $28 +Constant right-side identified [65] (byte) doplasma::ii#33 ← ++ (const byte) doplasma::ii#31 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$37 = doplasma::ii#31*$28 Constant (const byte) doplasma::ii#33 = ++doplasma::ii#31 @@ -1979,8 +1979,8 @@ Alias (byte) doplasma::val#33 = (byte) doplasma::val#34 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#34 (const byte) doplasma::ii#33 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [65] (byte~) doplasma::$39 ← (const byte) doplasma::ii#33 * (byte) $28 -Constant right-side identified [68] (byte) doplasma::ii#35 ← ++ (const byte) doplasma::ii#33 +Constant right-side identified [64] (byte~) doplasma::$39 ← (const byte) doplasma::ii#33 * (byte) $28 +Constant right-side identified [67] (byte) doplasma::ii#35 ← ++ (const byte) doplasma::ii#33 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$39 = doplasma::ii#33*$28 Constant (const byte) doplasma::ii#35 = ++doplasma::ii#33 @@ -1997,8 +1997,8 @@ Alias (byte) doplasma::val#35 = (byte) doplasma::val#36 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#36 (const byte) doplasma::ii#35 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [67] (byte~) doplasma::$41 ← (const byte) doplasma::ii#35 * (byte) $28 -Constant right-side identified [70] (byte) doplasma::ii#37 ← ++ (const byte) doplasma::ii#35 +Constant right-side identified [66] (byte~) doplasma::$41 ← (const byte) doplasma::ii#35 * (byte) $28 +Constant right-side identified [69] (byte) doplasma::ii#37 ← ++ (const byte) doplasma::ii#35 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$41 = doplasma::ii#35*$28 Constant (const byte) doplasma::ii#37 = ++doplasma::ii#35 @@ -2015,8 +2015,8 @@ Alias (byte) doplasma::val#37 = (byte) doplasma::val#38 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#38 (const byte) doplasma::ii#37 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [69] (byte~) doplasma::$43 ← (const byte) doplasma::ii#37 * (byte) $28 -Constant right-side identified [72] (byte) doplasma::ii#39 ← ++ (const byte) doplasma::ii#37 +Constant right-side identified [68] (byte~) doplasma::$43 ← (const byte) doplasma::ii#37 * (byte) $28 +Constant right-side identified [71] (byte) doplasma::ii#39 ← ++ (const byte) doplasma::ii#37 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$43 = doplasma::ii#37*$28 Constant (const byte) doplasma::ii#39 = ++doplasma::ii#37 @@ -2033,8 +2033,8 @@ Alias (byte) doplasma::val#39 = (byte) doplasma::val#40 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#40 (const byte) doplasma::ii#39 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [71] (byte~) doplasma::$45 ← (const byte) doplasma::ii#39 * (byte) $28 -Constant right-side identified [74] (byte) doplasma::ii#41 ← ++ (const byte) doplasma::ii#39 +Constant right-side identified [70] (byte~) doplasma::$45 ← (const byte) doplasma::ii#39 * (byte) $28 +Constant right-side identified [73] (byte) doplasma::ii#41 ← ++ (const byte) doplasma::ii#39 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$45 = doplasma::ii#39*$28 Constant (const byte) doplasma::ii#41 = ++doplasma::ii#39 @@ -2051,8 +2051,8 @@ Alias (byte) doplasma::val#41 = (byte) doplasma::val#42 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#42 (const byte) doplasma::ii#41 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [73] (byte~) doplasma::$47 ← (const byte) doplasma::ii#41 * (byte) $28 -Constant right-side identified [76] (byte) doplasma::ii#43 ← ++ (const byte) doplasma::ii#41 +Constant right-side identified [72] (byte~) doplasma::$47 ← (const byte) doplasma::ii#41 * (byte) $28 +Constant right-side identified [75] (byte) doplasma::ii#43 ← ++ (const byte) doplasma::ii#41 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$47 = doplasma::ii#41*$28 Constant (const byte) doplasma::ii#43 = ++doplasma::ii#41 @@ -2069,8 +2069,8 @@ Alias (byte) doplasma::val#43 = (byte) doplasma::val#44 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#44 (const byte) doplasma::ii#43 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [75] (byte~) doplasma::$49 ← (const byte) doplasma::ii#43 * (byte) $28 -Constant right-side identified [78] (byte) doplasma::ii#45 ← ++ (const byte) doplasma::ii#43 +Constant right-side identified [74] (byte~) doplasma::$49 ← (const byte) doplasma::ii#43 * (byte) $28 +Constant right-side identified [77] (byte) doplasma::ii#45 ← ++ (const byte) doplasma::ii#43 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$49 = doplasma::ii#43*$28 Constant (const byte) doplasma::ii#45 = ++doplasma::ii#43 @@ -2087,8 +2087,8 @@ Alias (byte) doplasma::val#45 = (byte) doplasma::val#46 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#46 (const byte) doplasma::ii#45 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [77] (byte~) doplasma::$51 ← (const byte) doplasma::ii#45 * (byte) $28 -Constant right-side identified [80] (byte) doplasma::ii#47 ← ++ (const byte) doplasma::ii#45 +Constant right-side identified [76] (byte~) doplasma::$51 ← (const byte) doplasma::ii#45 * (byte) $28 +Constant right-side identified [79] (byte) doplasma::ii#47 ← ++ (const byte) doplasma::ii#45 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$51 = doplasma::ii#45*$28 Constant (const byte) doplasma::ii#47 = ++doplasma::ii#45 @@ -2105,8 +2105,8 @@ Alias (byte) doplasma::val#47 = (byte) doplasma::val#48 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#48 (const byte) doplasma::ii#47 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [79] (byte~) doplasma::$53 ← (const byte) doplasma::ii#47 * (byte) $28 -Constant right-side identified [82] (byte) doplasma::ii#49 ← ++ (const byte) doplasma::ii#47 +Constant right-side identified [78] (byte~) doplasma::$53 ← (const byte) doplasma::ii#47 * (byte) $28 +Constant right-side identified [81] (byte) doplasma::ii#49 ← ++ (const byte) doplasma::ii#47 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$53 = doplasma::ii#47*$28 Constant (const byte) doplasma::ii#49 = ++doplasma::ii#47 @@ -2123,8 +2123,8 @@ Alias (byte) doplasma::val#49 = (byte) doplasma::val#50 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#50 (const byte) doplasma::ii#49 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [81] (byte~) doplasma::$55 ← (const byte) doplasma::ii#49 * (byte) $28 -Constant right-side identified [84] (byte) doplasma::ii#51 ← ++ (const byte) doplasma::ii#49 +Constant right-side identified [80] (byte~) doplasma::$55 ← (const byte) doplasma::ii#49 * (byte) $28 +Constant right-side identified [83] (byte) doplasma::ii#51 ← ++ (const byte) doplasma::ii#49 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$55 = doplasma::ii#49*$28 Constant (const byte) doplasma::ii#51 = ++doplasma::ii#49 @@ -2141,8 +2141,8 @@ Alias (byte) doplasma::val#51 = (byte) doplasma::val#52 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) doplasma::ii#52 (const byte) doplasma::ii#51 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [83] (byte~) doplasma::$57 ← (const byte) doplasma::ii#51 * (byte) $28 -Constant right-side identified [86] (byte) doplasma::ii#53 ← ++ (const byte) doplasma::ii#51 +Constant right-side identified [82] (byte~) doplasma::$57 ← (const byte) doplasma::ii#51 * (byte) $28 +Constant right-side identified [85] (byte) doplasma::ii#53 ← ++ (const byte) doplasma::ii#51 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) doplasma::$57 = doplasma::ii#51*$28 Constant (const byte) doplasma::ii#53 = ++doplasma::ii#51 diff --git a/src/test/ref/examples/plasma/plasma.asm b/src/test/ref/examples/plasma/plasma.asm index 42eca0f7a..2403f9a01 100644 --- a/src/test/ref/examples/plasma/plasma.asm +++ b/src/test/ref/examples/plasma/plasma.asm @@ -33,18 +33,23 @@ main: { .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f .label col = 9 + // asm sei + // *BORDERCOL = BLUE lda #BLUE sta BORDERCOL + // *BGCOL = BLUE sta BGCOL lda #COLS sta.z col+1 __b1: + // *col = BLACK lda #BLACK ldy #0 sta (col),y + // for(char* col : COLS..COLS+1000) inc.z col bne !+ inc.z col+1 @@ -55,6 +60,7 @@ main: { lda.z col cmp #SCREEN1 sta.z doplasma.screen+1 jsr doplasma + // *D018 = toD018(SCREEN1, CHARSET) lda #toD0181_return sta D018 + // doplasma(SCREEN2) lda #SCREEN2 sta.z doplasma.screen+1 jsr doplasma + // *D018 = toD018(SCREEN2, CHARSET) lda #toD0182_return sta D018 jmp __b4 @@ -89,49 +99,63 @@ doplasma: { .label c2b = 8 .label i1 = 6 .label screen = 9 + // c1a = c1A lda.z c1A sta.z c1a + // c1b = c1B lda.z c1B sta.z c1b lda #0 sta.z i __b1: + // for (char i = 0; i < 25; ++i) lda.z i cmp #$19 bcc __b2 + // c1A += 3 lax.z c1A axs #-[3] stx.z c1A + // c1B -= 5 lax.z c1B axs #5 stx.z c1B + // c2a = c2A lda.z c2A sta.z c2a + // c2b = c2B lda.z c2B sta.z c2b lda #0 sta.z i1 __b4: + // for (char i = 0; i < 40; ++i) lda.z i1 cmp #$28 bcc __b5 + // c2A += 2 lda.z c2A clc adc #2 sta.z c2A + // c2B -= 3 lax.z c2B axs #3 stx.z c2B ldx #0 __b7: + // for (char ii = 0; ii < 25; ++ii) cpx #$19 bcc b1 + // } rts b1: ldy #0 __b8: + // for (char i = 0; i < 40; ++i) cpy #$28 bcc __b9 + // screen += 40 lda #$28 clc adc.z screen @@ -139,45 +163,59 @@ doplasma: { bcc !+ inc.z screen+1 !: + // for (char ii = 0; ii < 25; ++ii) inx jmp __b7 __b9: + // xbuf[i] + ybuf[ii] lda xbuf,y clc adc ybuf,x + // screen[i] = (xbuf[i] + ybuf[ii]) sta (screen),y + // for (char i = 0; i < 40; ++i) iny jmp __b8 __b5: + // SINTABLE[c2a] + SINTABLE[c2b] ldy.z c2a lda SINTABLE,y ldy.z c2b clc adc SINTABLE,y + // xbuf[i] = (SINTABLE[c2a] + SINTABLE[c2b]) ldy.z i1 sta xbuf,y + // c2a += 3 lax.z c2a axs #-[3] stx.z c2a + // c2b += 7 lax.z c2b axs #-[7] stx.z c2b + // for (char i = 0; i < 40; ++i) inc.z i1 jmp __b4 __b2: + // SINTABLE[c1a] + SINTABLE[c1b] ldy.z c1a lda SINTABLE,y ldy.z c1b clc adc SINTABLE,y + // ybuf[i] = (SINTABLE[c1a] + SINTABLE[c1b]) ldy.z i sta ybuf,y + // c1a += 4 lax.z c1a axs #-[4] stx.z c1a + // c1b += 9 lax.z c1b axs #-[9] stx.z c1b + // for (char i = 0; i < 25; ++i) inc.z i jmp __b1 xbuf: .fill $28, 0 @@ -192,7 +230,9 @@ makecharset: { .label i = $b .label c = $c .label __16 = $f + // sid_rnd_init() jsr sid_rnd_init + // print_cls() jsr print_cls lda #$100 bcc __b2 @@ -210,24 +251,32 @@ makecharset: { cmp #<$100 bcc __b2 !: + // } rts __b2: + // s) lda.z s cmp.z __7 bcs __b8 + // b |= bittab[ii] tya ora bittab,x tay __b8: + // for (char ii = 0; ii < 8; ++ii) inx jmp __b5 bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 @@ -286,24 +345,31 @@ makecharset: { // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { + // return *SID_VOICE3_OSC; lda SID_VOICE3_OSC + // } rts } // Print a single char print_char: { .const ch = '.' + // *(print_char_cursor++) = ch lda #ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -318,17 +384,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$ffff sta SID_VOICE3_FREQ+1 + // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL + // } rts } .align $100 diff --git a/src/test/ref/examples/plasma/plasma.log b/src/test/ref/examples/plasma/plasma.log index 24fdc1c99..4e08fadf2 100644 --- a/src/test/ref/examples/plasma/plasma.log +++ b/src/test/ref/examples/plasma/plasma.log @@ -1712,18 +1712,18 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_line_cursor#12 (byte*) print_line_cursor#0 Identical Phi Values (byte*) makecharset::charset#10 (byte*) makecharset::charset#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) main::$1 [58] if((byte*) main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 -Simple Condition (bool~) doplasma::$0 [137] if((byte) doplasma::i#2<(byte) $19) goto doplasma::@2 -Simple Condition (bool~) doplasma::$2 [152] if((byte) doplasma::i1#2<(byte) $28) goto doplasma::@8 -Simple Condition (bool~) doplasma::$4 [165] if((byte) doplasma::ii#2<(byte) $19) goto doplasma::@14 -Simple Condition (bool~) doplasma::$5 [170] if((byte) doplasma::i2#2<(byte) $28) goto doplasma::@17 -Simple Condition (bool~) makecharset::$2 [194] if((word) makecharset::c#2<(word) $100) goto makecharset::@2 -Simple Condition (bool~) makecharset::$4 [201] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5 -Simple Condition (bool~) makecharset::$14 [209] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19 -Simple Condition (bool~) makecharset::$5 [212] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8 -Simple Condition (bool~) makecharset::$9 [221] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) main::$1 [39] if((byte*) main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 +Simple Condition (bool~) doplasma::$0 [86] if((byte) doplasma::i#2<(byte) $19) goto doplasma::@2 +Simple Condition (bool~) doplasma::$2 [99] if((byte) doplasma::i1#2<(byte) $28) goto doplasma::@8 +Simple Condition (bool~) doplasma::$4 [110] if((byte) doplasma::ii#2<(byte) $19) goto doplasma::@14 +Simple Condition (bool~) doplasma::$5 [114] if((byte) doplasma::i2#2<(byte) $28) goto doplasma::@17 +Simple Condition (bool~) makecharset::$2 [128] if((word) makecharset::c#2<(word) $100) goto makecharset::@2 +Simple Condition (bool~) makecharset::$4 [134] if((byte) makecharset::i#2<(byte) 8) goto makecharset::@5 +Simple Condition (bool~) makecharset::$14 [139] if((byte~) makecharset::$12!=(byte) 0) goto makecharset::@19 +Simple Condition (bool~) makecharset::$5 [142] if((byte) makecharset::ii#2<(byte) 8) goto makecharset::@8 +Simple Condition (bool~) makecharset::$9 [148] if((byte~) makecharset::$7<=(byte) makecharset::s#0) goto makecharset::@10 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -1760,12 +1760,12 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [66] if(true) goto main::@4 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [44] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [56] main::col#1 ← ++ main::col#2 to ++ -Resolved ranged comparison value [58] if(main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 to (byte*)(const byte*) COLS+(word) $3e8+(number) 1 -De-inlining pointer[w] to *(pointer+w) [225] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2 +Resolved ranged next value [37] main::col#1 ← ++ main::col#2 to ++ +Resolved ranged comparison value [39] if(main::col#1!=rangelast(COLS,COLS+$3e8)) goto main::@1 to (byte*)(const byte*) COLS+(word) $3e8+(number) 1 +De-inlining pointer[w] to *(pointer+w) [151] *((const byte*) makecharset::charset#0 + (word~) makecharset::$11) ← (byte) makecharset::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/examples/rasterbars/raster-bars.asm b/src/test/ref/examples/rasterbars/raster-bars.asm index c8e5ca5ac..0a534ed7a 100644 --- a/src/test/ref/examples/rasterbars/raster-bars.asm +++ b/src/test/ref/examples/rasterbars/raster-bars.asm @@ -5,19 +5,24 @@ .label BORDERCOL = $d020 .label BGCOL = $d021 main: { + // asm sei __b1: + // while (*RASTER!=$a) lda #$a cmp RASTER bne __b1 __b2: + // while (*RASTER!=$b) lda #$b cmp RASTER bne __b2 + // raster() jsr raster jmp __b1 } raster: { + // asm nop nop nop @@ -37,13 +42,19 @@ raster: { nop nop nop + // col = rastercols[i] lda rastercols ldx #0 __b1: + // *BGCOL = col sta BGCOL + // *BORDERCOL = col sta BORDERCOL + // col = rastercols[++i]; inx + // col = rastercols[++i] lda rastercols,x + // asm nop nop nop @@ -66,8 +77,10 @@ raster: { nop nop nop + // while (col!=$ff) cmp #$ff bne __b1 + // } rts } rastercols: .byte $b, 0, $b, $b, $c, $b, $c, $c, $f, $c, $f, $f, 1, $f, 1, 1, $f, 1, $f, $f, $c, $f, $c, $c, $b, $c, $b, $b, 0, $b, 0, $ff diff --git a/src/test/ref/examples/rotate/rotate.asm b/src/test/ref/examples/rotate/rotate.asm index 690f0c684..19a753f57 100644 --- a/src/test/ref/examples/rotate/rotate.asm +++ b/src/test/ref/examples/rotate/rotate.asm @@ -28,11 +28,16 @@ .label COS = SIN+$40 // A single sprite .label SPRITE = $3000 + // kickasm // sin(x) = cos(x+PI/2) main: { + // asm sei + // init() jsr init + // anim() jsr anim + // } rts } anim: { @@ -56,34 +61,46 @@ anim: { lda #0 sta.z angle __b2: + // while(*RASTER!=$ff) lda #$ff cmp RASTER bne __b2 + // (*BORDERCOL)++; inc BORDERCOL + // clock_start() jsr clock_start lda #0 sta.z sprite_msb sta.z i __b4: + // x = xs[i] ldy.z i lda xs,y sta.z x + // y = ys[i] // signed fixed[7.0] lda ys,y sta.z y ldy.z angle lda COS,y + // mulf8u_prepare((byte)a) jsr mulf8u_prepare + // mulf8s_prepared(x) ldy.z x jsr mulf8s_prepared + // mulf8s_prepared(x) + // xr = mulf8s_prepared(x)*2 lda.z __6 asl sta.z xr lda.z __6+1 rol sta.z xr+1 + // mulf8s_prepared(y) ldy.z y jsr mulf8s_prepared + // mulf8s_prepared(y) + // yr = mulf8s_prepared(y)*2 lda.z __8 asl sta.z yr @@ -92,11 +109,16 @@ anim: { sta.z yr+1 ldy.z angle lda SIN,y + // mulf8u_prepare((byte)a) jsr mulf8u_prepare + // mulf8s_prepared(y) ldy.z y jsr mulf8s_prepared + // mulf8s_prepared(y) + // mulf8s_prepared(y)*2 asl.z __12 rol.z __12+1 + // xr -= mulf8s_prepared(y)*2 lda.z xr sec sbc.z __12 @@ -104,10 +126,14 @@ anim: { lda.z xr+1 sbc.z __12+1 sta.z xr+1 + // mulf8s_prepared(x) ldy.z x jsr mulf8s_prepared + // mulf8s_prepared(x) + // mulf8s_prepared(x)*2 asl.z __14 rol.z __14+1 + // yr += mulf8s_prepared(x)*2 // signed fixed[8.8] lda.z yr clc @@ -116,7 +142,9 @@ anim: { lda.z yr+1 adc.z __14+1 sta.z yr+1 + // >xr lda.z xr+1 + // xpos = ((signed byte) >xr) + 24 /*border*/ + 149 tax clc adc #<$18+$95 @@ -128,34 +156,49 @@ anim: { !: adc #>$18+$95 sta.z xpos+1 + // sprite_msb = sprite_msb/2 lsr.z sprite_msb + // >xpos + // if(>xpos!=0) cmp #0 beq __b5 + // sprite_msb |= $80 lda #$80 ora.z sprite_msb sta.z sprite_msb __b5: + // (>yr) + 89 lda.z yr+1 + // ypos = (>yr) + 89 /*center*/+ 51 clc adc #$59+$33 tay + // i2 = i*2 lda.z i asl tax + // CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 + // print_dword_at(cyclecount, SCREEN) jsr print_dword_at + // *BORDERCOL = LIGHT_BLUE lda #LIGHT_BLUE sta BORDERCOL jmp __b2 @@ -178,6 +223,7 @@ anim: { // print_dword_at(dword zp($13) dw) print_dword_at: { .label dw = $13 + // print_word_at(>dw, at) lda.z dw+2 sta.z print_word_at.w lda.z dw+3 @@ -187,6 +233,7 @@ print_dword_at: { lda #>SCREEN sta.z print_word_at.at+1 jsr print_word_at + // print_word_at(SCREEN+4 sta.z print_word_at.at+1 jsr print_word_at + // } rts } // Print a word as HEX at a specific position @@ -203,9 +251,11 @@ print_dword_at: { print_word_at: { .label w = 3 .label at = 5 + // print_byte_at(>w, at) lda.z w+1 sta.z print_byte_at.b jsr print_byte_at + // print_byte_at(>4 lda.z b lsr lsr lsr lsr + // print_char_at(print_hextab[b>>4], at) tay ldx print_hextab,y lda.z at @@ -235,9 +288,11 @@ print_byte_at: { lda.z at+1 sta.z print_char_at.at+1 jsr print_char_at + // b&$f lda #$f and.z b tay + // print_char_at(print_hextab[b&$f], at+1) lda.z at clc adc #1 @@ -247,21 +302,25 @@ print_byte_at: { sta.z print_char_at.at+1 ldx print_hextab,y jsr print_char_at + // } rts } // Print a single char // print_char_at(byte register(X) ch, byte* zp(8) at) print_char_at: { .label at = 8 + // *(at) = ch txa ldy #0 sta (at),y + // } rts } // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = $13 + // 0xffffffff - *CIA2_TIMER_AB lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -275,6 +334,7 @@ clock: { lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -283,24 +343,33 @@ clock: { mulf8s_prepared: { .label memA = $fd .label m = 3 + // mulf8u_prepared((byte) b) tya jsr mulf8u_prepared + // m = mulf8u_prepared((byte) b) + // if(*memA<0) lda memA cmp #0 bpl __b1 + // >m lda.z m+1 + // >m = (>m)-(byte)b sty.z $ff sec sbc.z $ff sta.z m+1 __b1: + // if(b<0) cpy #0 bpl __b2 + // >m lda.z m+1 + // >m = (>m)-(byte)*memA sec sbc memA sta.z m+1 __b2: + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -310,7 +379,9 @@ mulf8u_prepared: { .label resL = $fe .label memB = $ff .label return = 3 + // *memB = b sta memB + // asm tax sec sm1: @@ -323,32 +394,40 @@ mulf8u_prepared: { sm4: sbc mulf_sqr2_hi,x sta memB + // return { *memB, *resL }; lda resL sta.z return lda memB sta.z return+1 + // } rts } // Prepare for fast multiply with an unsigned byte to a word result // mulf8u_prepare(byte register(A) a) mulf8u_prepare: { .label memA = $fd + // *memA = a sta memA + // asm sta mulf8u_prepared.sm1+1 sta mulf8u_prepared.sm3+1 eor #$ff sta mulf8u_prepared.sm2+1 sta mulf8u_prepared.sm4+1 + // } rts } // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2_TIMER_A_CONTROL + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_AB = 0xffffffff lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -357,26 +436,35 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL + // } rts } init: { .label sprites_ptr = SCREEN+$3f8 + // mulf_init() jsr mulf_init + // *SPRITES_ENABLE = %11111111 lda #$ff sta SPRITES_ENABLE ldx #0 __b1: + // sprites_ptr[i] = (byte)(SPRITE/$40) lda #SPRITE/$40 sta sprites_ptr,x + // SPRITES_COLS[i] = GREEN lda #GREEN sta SPRITES_COLS,x + // for(byte i: 0..7) inx cpx #8 bne __b1 + // } rts } // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) @@ -407,6 +495,7 @@ mulf_init: { lda #>mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -425,63 +514,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -489,6 +599,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 diff --git a/src/test/ref/examples/rotate/rotate.log b/src/test/ref/examples/rotate/rotate.log index a36627d6f..57b8d22ad 100644 --- a/src/test/ref/examples/rotate/rotate.log +++ b/src/test/ref/examples/rotate/rotate.log @@ -1428,18 +1428,18 @@ Identical Phi Values (signed byte) anim::sin_a#1 (signed byte) anim::sin_a#0 Identical Phi Values (byte) anim::angle#10 (byte) anim::angle#2 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) mulf_init::$0 [7] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [13] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [32] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [41] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf8s_prepared::$3 [71] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$5 [75] if((signed byte) mulf8s_prepared::b#4>=(signed byte) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) init::$4 [160] if((byte) init::i#1!=rangelast(0,7)) goto init::@1 -Simple Condition (bool~) anim::$0 [167] if(*((const byte*) RASTER)!=(byte) $ff) goto anim::@4 -Simple Condition (bool~) anim::$22 [233] if((byte~) anim::$20==(byte) 0) goto anim::@11 -Simple Condition (bool~) anim::$28 [246] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@10 +Simple Condition (bool~) mulf_init::$3 [11] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [28] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [34] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf8s_prepared::$3 [56] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$5 [59] if((signed byte) mulf8s_prepared::b#4>=(signed byte) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) init::$4 [123] if((byte) init::i#1!=rangelast(0,7)) goto init::@1 +Simple Condition (bool~) anim::$0 [130] if(*((const byte*) RASTER)!=(byte) $ff) goto anim::@4 +Simple Condition (bool~) anim::$22 [173] if((byte~) anim::$20==(byte) 0) goto anim::@11 +Simple Condition (bool~) anim::$28 [184] if((byte) anim::i#1!=rangelast(0,7)) goto anim::@10 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [150] (byte*) init::sprites_ptr#0 ← (const byte*) SCREEN + (word) $3f8 -Constant right-side identified [154] (byte*~) init::$2 ← (const byte*) SPRITE / (byte) $40 +Constant right-side identified [114] (byte*) init::sprites_ptr#0 ← (const byte*) SCREEN + (word) $3f8 +Constant right-side identified [117] (byte*~) init::$2 ← (const byte*) SPRITE / (byte) $40 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) mulf_init::sqr#0 = 0 Constant (const byte) mulf_init::x_2#0 = 0 @@ -1462,20 +1462,20 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) print_word_at::at#0 = print_dword_at::at#0 Constant (const byte) init::$3 = (byte)init::$2 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [164] if(true) goto anim::@4 +if() condition always true - replacing block destination [127] if(true) goto anim::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [158] init::i#1 ← ++ init::i#2 to ++ -Resolved ranged comparison value [160] if(init::i#1!=rangelast(0,7)) goto init::@1 to (number) 8 -Resolved ranged next value [244] anim::i#1 ← ++ anim::i#10 to ++ -Resolved ranged comparison value [246] if(anim::i#1!=rangelast(0,7)) goto anim::@10 to (number) 8 -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [99] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [100] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Resolved ranged next value [121] init::i#1 ← ++ init::i#2 to ++ +Resolved ranged comparison value [123] if(init::i#1!=rangelast(0,7)) goto init::@1 to (number) 8 +Resolved ranged next value [182] anim::i#1 ← ++ anim::i#10 to ++ +Resolved ranged comparison value [184] if(anim::i#1!=rangelast(0,7)) goto anim::@10 to (number) 8 +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [73] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [74] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [100] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [102] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [103] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [74] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [76] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [77] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [103] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [77] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP Eliminating unused constant (const byte) CIA_TIMER_CONTROL_CONTINUOUS diff --git a/src/test/ref/examples/scroll/scroll.asm b/src/test/ref/examples/scroll/scroll.asm index 64160a8c8..a8766648c 100644 --- a/src/test/ref/examples/scroll/scroll.asm +++ b/src/test/ref/examples/scroll/scroll.asm @@ -8,6 +8,7 @@ main: { .label line = SCREEN+$28 .label nxt = 2 + // fillscreen(SCREEN, $20) jsr fillscreen lda #TEXT sta.z nxt+1 __b9: + // line[39] = c stx line+$27 + // nxt++; inc.z nxt bne !+ inc.z nxt+1 !: ldx #7 __b4: + // *SCROLL = scroll stx SCROLL + // --*BGCOL; dec BGCOL jmp __b1 __b6: + // line[i]=line[i+1] lda line+1,x sta line,x + // for(byte i=0;i!=39;i++) inx jmp __b5 } @@ -68,6 +83,7 @@ fillscreen: { lda #>SCREEN sta.z cursor+1 __b1: + // for( byte* cursor = screen; cursor < screen+1000; cursor++) lda.z cursor+1 cmp #>SCREEN+$3e8 bcc __b2 @@ -76,11 +92,14 @@ fillscreen: { cmp #TEXT sta.z nxt+1 __b1: + // nxt++; inc.z nxt bne !+ inc.z nxt+1 !: + // } rts } // Fill the screen with one char @@ -171,6 +215,7 @@ fillscreen: { lda #>SCREEN sta.z cursor+1 __b1: + // for( byte* cursor = screen; cursor < screen+1000; cursor++) lda.z cursor+1 cmp #>SCREEN+$3e8 bcc __b2 @@ -179,11 +224,14 @@ fillscreen: { cmp #(SCREEN&$3fff)*4)|(>LOGO)/4&$f + // asm sei + // *BORDERCOL = WHITE lda #WHITE sta BORDERCOL + // *BGCOL2 = DARK_GREY lda #DARK_GREY sta BGCOL2 + // *BGCOL = *BGCOL2 = DARK_GREY sta BGCOL + // *BGCOL3 = BLACK lda #BLACK sta BGCOL3 + // *D018 = toD018(SCREEN, LOGO) lda #toD0181_return sta D018 + // *D016 = VIC_MCM lda #VIC_MCM sta D016 + // memset(SCREEN, BLACK, 1000) ldx #BLACK lda #SCREEN sta.z memset.str+1 jsr memset + // memset(COLS, WHITE|8, 1000) ldx #WHITE|8 lda #xsin sta.z __2+1 + // xpos = *(xsin+xsin_idx) ldy #0 lda (xpos),y pha @@ -100,7 +119,9 @@ loop: { sta.z xpos+1 pla sta.z xpos + // render_logo(xpos) jsr render_logo + // if(++xsin_idx==XSIN_SIZE) inc.z xsin_idx bne !+ inc.z xsin_idx+1 @@ -115,6 +136,7 @@ loop: { sta.z xsin_idx sta.z xsin_idx+1 __b4: + // (*BORDERCOL)--; dec BORDERCOL jmp __b1 } @@ -125,10 +147,15 @@ render_logo: { .label x_char = $14 .label logo_idx = 2 .label logo_idx_1 = 3 + // (byte)xpos lda.z xpos + // (byte)xpos&7 and #7 + // VIC_MCM|((byte)xpos&7) ora #VIC_MCM + // *D016 = VIC_MCM|((byte)xpos&7) sta D016 + // xpos/8 lda.z xpos+1 cmp #$80 ror @@ -144,47 +171,66 @@ render_logo: { cmp #$80 ror.z __3+1 ror.z __3 + // x_char = (signed byte)(xpos/8) lda.z __3 sta.z x_char + // if(xpos<0) lda.z xpos+1 bmi __b1 ldy #0 __b2: + // while(screen_idx!=logo_start) cpy.z x_char bne __b3 lda #0 sta.z logo_idx __b5: + // while(screen_idx!=40) cpy #$28 bne __b6 + // } rts __b6: + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line lda.z logo_idx sta SCREEN,y + // logo_idx+40*line lda #$28*1 clc adc.z logo_idx + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*1,y + // logo_idx+40*line lda #$28*2 clc adc.z logo_idx + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*2,y + // logo_idx+40*line lda #$28*3 clc adc.z logo_idx + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*3,y + // logo_idx+40*line lda #$28*4 clc adc.z logo_idx + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*4,y + // logo_idx+40*line lda #$28*5 clc adc.z logo_idx + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*5,y + // screen_idx++; iny + // logo_idx++; inc.z logo_idx jmp __b5 __b3: + // (SCREEN+40*line)[screen_idx] = $00 lda #0 sta SCREEN,y sta SCREEN+$28*1,y @@ -192,9 +238,11 @@ render_logo: { sta SCREEN+$28*3,y sta SCREEN+$28*4,y sta SCREEN+$28*5,y + // screen_idx++; iny jmp __b2 __b1: + // -x_char lda.z x_char eor #$ff clc @@ -202,14 +250,17 @@ render_logo: { sta.z logo_idx_1 ldy #0 __b8: + // while(logo_idx!=40) lda #$28 cmp.z logo_idx_1 bne __b9 __b11: + // while(screen_idx!=40) cpy #$28 bne __b12 rts __b12: + // (SCREEN+40*line)[screen_idx] = $00 lda #0 sta SCREEN,y sta SCREEN+$28*1,y @@ -217,32 +268,46 @@ render_logo: { sta SCREEN+$28*3,y sta SCREEN+$28*4,y sta SCREEN+$28*5,y + // screen_idx++; iny jmp __b11 __b9: + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line lda.z logo_idx_1 sta SCREEN,y + // logo_idx+40*line lda #$28*1 clc adc.z logo_idx_1 + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*1,y + // logo_idx+40*line lda #$28*2 clc adc.z logo_idx_1 + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*2,y + // logo_idx+40*line lda #$28*3 clc adc.z logo_idx_1 + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*3,y + // logo_idx+40*line lda #$28*4 clc adc.z logo_idx_1 + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*4,y + // logo_idx+40*line lda #$28*5 clc adc.z logo_idx_1 + // (SCREEN+40*line)[screen_idx] = logo_idx+40*line sta SCREEN+$28*5,y + // screen_idx++; iny + // logo_idx++; inc.z logo_idx_1 jmp __b8 } @@ -262,7 +327,10 @@ sin16s_gen2: { // Iterate over the table .label x = 4 .label i = $23 + // div32u16u(PI2_u4f28, wavelength) jsr div32u16u + // div32u16u(PI2_u4f28, wavelength) + // step = div32u16u(PI2_u4f28, wavelength) lda #xsin @@ -279,6 +347,7 @@ sin16s_gen2: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; iXSIN_SIZE bcc __b2 @@ -287,8 +356,10 @@ sin16s_gen2: { cmp #mul16s(sin16s(x), ampl) lda.z __6+2 sta.z __9 lda.z __6+3 sta.z __9+1 + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl) ldy #0 lda.z __9 sta (sintab),y iny lda.z __9+1 sta (sintab),y + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl); lda #SIZEOF_SIGNED_WORD clc adc.z sintab @@ -316,6 +391,7 @@ sin16s_gen2: { bcc !+ inc.z sintab+1 !: + // x = x + step lda.z x clc adc.z step @@ -329,6 +405,7 @@ sin16s_gen2: { lda.z x+3 adc.z step+3 sta.z x+3 + // for( word i=0; isin16s_gen2.ampl sta.z mul16u.b+1 jsr mul16u + // mul16u((word)a, (word) b) + // m = mul16u((word)a, (word) b) + // if(a<0) lda.z a+1 bpl __b2 + // >m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc #0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -419,8 +510,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -444,6 +537,7 @@ sin16s: { .label x5 = $21 .label x5_128 = $21 .label sinx = $10 + // if(x >= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -460,6 +554,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -494,6 +590,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -542,26 +642,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) + // x2 = mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return sta.z x2 lda.z mulu16_sel.return+1 sta.z x2+1 + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -569,22 +678,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -593,6 +709,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -600,8 +717,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -610,6 +729,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -622,11 +742,14 @@ mulu16_sel: { .label v2 = $19 .label return = $21 .label return_1 = $12 + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2) + // mul16u(v1, v2)<dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -657,15 +783,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>XSIN_SIZE bcc __b3 @@ -713,10 +854,12 @@ divr16u: { cmp #XSIN_SIZE sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -736,6 +882,7 @@ memset: { .label end = $23 .label dst = $10 .label str = $10 + // end = (char*)str + num lda.z str clc adc #<$3e8 @@ -744,17 +891,21 @@ memset: { adc #>$3e8 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 lda.z dst cmp.z end bne __b3 + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 diff --git a/src/test/ref/examples/scrolllogo/scrolllogo.log b/src/test/ref/examples/scrolllogo/scrolllogo.log index 99a813da7..cce9c07bd 100644 --- a/src/test/ref/examples/scrolllogo/scrolllogo.log +++ b/src/test/ref/examples/scrolllogo/scrolllogo.log @@ -2114,34 +2114,34 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [412] (byte~) render_logo::$14 ← (byte) $28 * (byte) render_logo::line#10 Identified duplicate assignment right side [429] (byte~) render_logo::$22 ← (byte) $28 * (byte) render_logo::line#11 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [71] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [76] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 [102] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$6 [106] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$4 [143] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 -Simple Condition (bool~) sin16s::$1 [171] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [175] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [234] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$1 [263] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [273] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) main::$5 [324] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 -Simple Condition (bool~) loop::$0 [347] if(*((const byte*) RASTER)!=(byte) $ff) goto loop::@4 -Simple Condition (bool~) loop::$5 [359] if((word) xsin_idx#3!=(const word) XSIN_SIZE) goto loop::@11 -Simple Condition (bool~) render_logo::$5 [378] if((signed word) render_logo::xpos#0<(signed byte) 0) goto render_logo::@1 -Simple Condition (bool~) render_logo::$7 [390] if((byte) render_logo::screen_idx#18!=(byte) render_logo::logo_start#0) goto render_logo::@5 -Simple Condition (bool~) render_logo::$10 [401] unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 -Simple Condition (bool~) render_logo::$11 [406] if((byte) render_logo::screen_idx#10!=(byte) $28) goto render_logo::@13 -Simple Condition (bool~) render_logo::$16 [417] unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 -Simple Condition (bool~) render_logo::$19 [423] if((byte) render_logo::logo_idx#11!=(byte) $28) goto render_logo::@22 -Simple Condition (bool~) render_logo::$24 [434] unroll if((byte) render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 -Simple Condition (bool~) render_logo::$25 [440] if((byte) render_logo::screen_idx#15!=(byte) $28) goto render_logo::@30 -Simple Condition (bool~) render_logo::$28 [449] unroll if((byte) render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [62] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [65] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$4 [91] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 +Simple Condition (bool~) sin16s::$1 [111] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [114] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [155] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$1 [172] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [179] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) main::$5 [218] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 +Simple Condition (bool~) loop::$0 [234] if(*((const byte*) RASTER)!=(byte) $ff) goto loop::@4 +Simple Condition (bool~) loop::$5 [243] if((word) xsin_idx#3!=(const word) XSIN_SIZE) goto loop::@11 +Simple Condition (bool~) render_logo::$5 [259] if((signed word) render_logo::xpos#0<(signed byte) 0) goto render_logo::@1 +Simple Condition (bool~) render_logo::$7 [267] if((byte) render_logo::screen_idx#18!=(byte) render_logo::logo_start#0) goto render_logo::@5 +Simple Condition (bool~) render_logo::$10 [276] unroll if((byte) render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 +Simple Condition (bool~) render_logo::$11 [280] if((byte) render_logo::screen_idx#10!=(byte) $28) goto render_logo::@13 +Simple Condition (bool~) render_logo::$16 [290] unroll if((byte) render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 +Simple Condition (bool~) render_logo::$19 [295] if((byte) render_logo::logo_idx#11!=(byte) $28) goto render_logo::@22 +Simple Condition (bool~) render_logo::$24 [305] unroll if((byte) render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 +Simple Condition (bool~) render_logo::$25 [310] if((byte) render_logo::screen_idx#15!=(byte) $28) goto render_logo::@30 +Simple Condition (bool~) render_logo::$28 [318] unroll if((byte) render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [201] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [307] (void*) memset::str#0 ← (void*)(const byte*) SCREEN +Constant right-side identified [133] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [203] (void*) memset::str#0 ← (void*)(const byte*) SCREEN Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2192,20 +2192,20 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) divr16u::divisor#0 = div32u16u::divisor#0 Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [344] if(true) goto loop::@4 +if() condition always true - replacing block destination [231] if(true) goto loop::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [322] main::ch#1 ← ++ main::ch#2 to ++ -Resolved ranged comparison value [324] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 -Resolved ranged next value [399] render_logo::line#2 ← ++ render_logo::line#9 to ++ -Resolved ranged comparison value [401] unroll if(render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 to (number) 6 -Resolved ranged next value [415] render_logo::line#4 ← ++ render_logo::line#10 to ++ -Resolved ranged comparison value [417] unroll if(render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 to (number) 6 -Resolved ranged next value [432] render_logo::line#6 ← ++ render_logo::line#11 to ++ -Resolved ranged comparison value [434] unroll if(render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 to (number) 6 -Resolved ranged next value [447] render_logo::line#8 ← ++ render_logo::line#12 to ++ -Resolved ranged comparison value [449] unroll if(render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 to (number) 6 +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [216] main::ch#1 ← ++ main::ch#2 to ++ +Resolved ranged comparison value [218] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 +Resolved ranged next value [274] render_logo::line#2 ← ++ render_logo::line#9 to ++ +Resolved ranged comparison value [276] unroll if(render_logo::line#2!=rangelast(0,5)) goto render_logo::@7 to (number) 6 +Resolved ranged next value [288] render_logo::line#4 ← ++ render_logo::line#10 to ++ +Resolved ranged comparison value [290] unroll if(render_logo::line#4!=rangelast(0,5)) goto render_logo::@15 to (number) 6 +Resolved ranged next value [303] render_logo::line#6 ← ++ render_logo::line#11 to ++ +Resolved ranged comparison value [305] unroll if(render_logo::line#6!=rangelast(0,5)) goto render_logo::@24 to (number) 6 +Resolved ranged next value [316] render_logo::line#8 ← ++ render_logo::line#12 to ++ +Resolved ranged comparison value [318] unroll if(render_logo::line#8!=rangelast(0,5)) goto render_logo::@32 to (number) 6 Eliminating unused variable (void*) memset::return#2 and assignment [159] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [161] (void*) memset::return#3 ← (void*) memset::str#3 Eliminating unused constant (const byte) render_logo::logo_idx#0 @@ -2267,9 +2267,9 @@ Removing unused block mul16s::@4 Successful SSA optimization Pass2EliminateUnusedBlocks Alias (dword) mul16s::m#4 = (dword) mul16s::m#5 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [50] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 -Constant right-side identified [138] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 -Constant right-side identified [140] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 +Constant right-side identified [49] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 +Constant right-side identified [137] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 +Constant right-side identified [139] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1 Constant (const word) main::toD0181_$2 = main::toD0181_$1*4 @@ -2292,7 +2292,7 @@ Eliminating unused constant (const signed word) sin16s_gen2::offs#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$9 = (signed word~) sin16s_gen2::$8 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [135] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7 +Constant right-side identified [134] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3|main::toD0181_$7 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/examples/showlogo/showlogo.asm b/src/test/ref/examples/showlogo/showlogo.asm index 98787d39b..371ccfe55 100644 --- a/src/test/ref/examples/showlogo/showlogo.asm +++ b/src/test/ref/examples/showlogo/showlogo.asm @@ -17,19 +17,27 @@ .const DARK_GREY = $b .label SCREEN = $400 .label LOGO = $2000 + // kickasm main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>LOGO)/4&$f + // *BORDERCOL = WHITE lda #WHITE sta BORDERCOL + // *BGCOL2 = DARK_GREY lda #DARK_GREY sta BGCOL2 + // *BGCOL = *BGCOL2 = DARK_GREY sta BGCOL + // *BGCOL3 = BLACK lda #BLACK sta BGCOL3 + // *D018 = toD018(SCREEN, LOGO) lda #toD0181_return sta D018 + // *D016 = VIC_MCM | VIC_CSEL lda #VIC_MCM|VIC_CSEL sta D016 + // memset(SCREEN, BLACK, 40*25) ldx #BLACK lda #$28*$19 sta.z memset.num+1 jsr memset + // memset(COLS, WHITE|8, 40*25) ldx #WHITE|8 lda #0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -82,6 +97,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -89,11 +105,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 diff --git a/src/test/ref/examples/showlogo/showlogo.log b/src/test/ref/examples/showlogo/showlogo.log index 7d2a7cf4d..60c971f3a 100644 --- a/src/test/ref/examples/showlogo/showlogo.log +++ b/src/test/ref/examples/showlogo/showlogo.log @@ -335,14 +335,14 @@ Identical Phi Values (byte) memset::c#2 (byte) memset::c#4 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) main::$3 [59] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) main::$3 [46] if((byte) main::ch#1!=rangelast(0,$ef)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [44] (void*) memset::str#0 ← (void*)(const byte*) SCREEN -Constant right-side identified [46] (word) memset::num#0 ← (unumber)(number) $28*(number) $19 -Constant right-side identified [51] (word) memset::num#1 ← (unumber)(number) $28*(number) $19 -Constant right-side identified [61] (byte*~) main::$7 ← (const byte*) SCREEN + (word) $3e7 +Constant right-side identified [31] (void*) memset::str#0 ← (void*)(const byte*) SCREEN +Constant right-side identified [33] (word) memset::num#0 ← (unumber)(number) $28*(number) $19 +Constant right-side identified [38] (word) memset::num#1 ← (unumber)(number) $28*(number) $19 +Constant right-side identified [48] (byte*~) main::$7 ← (const byte*) SCREEN + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::toD0181_screen#0 = SCREEN Constant (const byte*) main::toD0181_gfx#0 = LOGO @@ -358,10 +358,10 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [60] if(true) goto main::@4 +if() condition always true - replacing block destination [47] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [57] main::ch#1 ← ++ main::ch#2 to ++ -Resolved ranged comparison value [59] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 +Resolved ranged next value [44] main::ch#1 ← ++ main::ch#2 to ++ +Resolved ranged comparison value [46] if(main::ch#1!=rangelast(0,$ef)) goto main::@1 to (number) $f0 Eliminating unused variable (void*) memset::return#2 and assignment [25] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [27] (void*) memset::return#3 ← (void*) memset::str#3 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/examples/sinplotter/sine-plotter.asm b/src/test/ref/examples/sinplotter/sine-plotter.asm index fec41a895..5fc0c551f 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.asm +++ b/src/test/ref/examples/sinplotter/sine-plotter.asm @@ -38,28 +38,41 @@ main: { .const vicSelectGfxBank1_toDd001_return = 3 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable normal interrupt // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D016 = VIC_CSEL lda #VIC_CSEL sta D016 + // *D018 = toD018(SCREEN, BITMAP) lda #toD0181_return sta D018 + // bitmap_init(BITMAP, SCREEN) jsr bitmap_init + // bitmap_clear(BLACK, WHITE) jsr bitmap_clear + // sin16s_gen2(sin, SIN_SIZE, -320, 320) jsr sin16s_gen2 + // render_sine() jsr render_sine __b1: + // (*BGCOL)++; inc BGCOL jmp __b1 } @@ -78,6 +91,7 @@ render_sine: { sta.z sin_idx sta.z sin_idx+1 __b1: + // for(word sin_idx=0; sin_idxSIN_SIZE bcc __b2 @@ -86,8 +100,10 @@ render_sine: { cmp #sin sta.z __1+1 + // sin_val = *(sin+sin_idx) ldy #0 lda (sin_val),y pha @@ -109,9 +126,14 @@ render_sine: { sta.z sin_val+1 pla sta.z sin_val + // wrap_y(sin_val) jsr wrap_y + // wrap_y(sin_val) + // ypos = wrap_y(sin_val) tax + // bitmap_plot(xpos,ypos) jsr bitmap_plot + // sin2+sin_idx lda.z sin_idx asl sta.z __11 @@ -125,6 +147,7 @@ render_sine: { lda.z __4+1 adc #>sin2 sta.z __4+1 + // sin2_val = *(sin2+sin_idx) ldy #0 lda (sin2_val),y pha @@ -133,6 +156,7 @@ render_sine: { sta.z sin2_val+1 pla sta.z sin2_val + // wrap_y(sin2_val+10) lda.z wrap_y.y clc adc #<$a @@ -141,12 +165,17 @@ render_sine: { adc #>$a sta.z wrap_y.y+1 jsr wrap_y + // wrap_y(sin2_val+10) + // ypos2 = wrap_y(sin2_val+10) tax + // bitmap_plot(xpos,ypos2) jsr bitmap_plot + // xpos++; inc.z xpos bne !+ inc.z xpos+1 !: + // if(xpos==320) lda.z xpos+1 cmp #>$140 bne __b3 @@ -157,6 +186,7 @@ render_sine: { sta.z xpos sta.z xpos+1 __b3: + // for(word sin_idx=0; sin_idx$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -186,18 +219,22 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // =200) lda.z y cmp #<$c8 lda.z y+1 @@ -207,11 +244,15 @@ wrap_y: { !: bpl __b2 __b3: + // while(y<0) lda.z y+1 bmi __b4 + // (byte)y lda.z y + // } rts __b4: + // y += 200 clc lda.z y adc #<$c8 @@ -221,6 +262,7 @@ wrap_y: { sta.z y+1 jmp __b3 __b2: + // y -= 200 lda.z y sec sbc #<$c8 @@ -246,7 +288,10 @@ sin16s_gen2: { // Iterate over the table .label x = 2 .label i = $10 + // div32u16u(PI2_u4f28, wavelength) jsr div32u16u + // div32u16u(PI2_u4f28, wavelength) + // step = div32u16u(PI2_u4f28, wavelength) lda #sin @@ -263,6 +308,7 @@ sin16s_gen2: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; iSIN_SIZE bcc __b2 @@ -271,8 +317,10 @@ sin16s_gen2: { cmp #mul16s(sin16s(x), ampl) lda.z __6+2 sta.z __9 lda.z __6+3 sta.z __9+1 + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl) ldy #0 lda.z __9 sta (sintab),y iny lda.z __9+1 sta (sintab),y + // *sintab++ = offs + (signed word)>mul16s(sin16s(x), ampl); lda #SIZEOF_SIGNED_WORD clc adc.z sintab @@ -300,6 +352,7 @@ sin16s_gen2: { bcc !+ inc.z sintab+1 !: + // x = x + step lda.z x clc adc.z step @@ -313,6 +366,7 @@ sin16s_gen2: { lda.z x+3 adc.z step+3 sta.z x+3 + // for( word i=0; isin16s_gen2.ampl sta.z mul16u.b+1 jsr mul16u + // mul16u((word)a, (word) b) + // m = mul16u((word)a, (word) b) + // if(a<0) lda.z a+1 bpl __b2 + // >m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc #0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -403,8 +471,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -428,6 +498,7 @@ sin16s: { .label x5 = $20 .label x5_128 = $20 .label sinx = $c + // if(x >= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -444,6 +515,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -478,6 +551,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -526,26 +603,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) + // x2 = mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return sta.z x2 lda.z mulu16_sel.return+1 sta.z x2+1 + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -553,22 +639,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -577,6 +670,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -584,8 +678,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -594,6 +690,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -606,11 +703,14 @@ mulu16_sel: { .label v2 = $12 .label return = $20 .label return_1 = $e + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2) + // mul16u(v1, v2)<dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -641,15 +744,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>SIN_SIZE bcc __b3 @@ -697,10 +815,12 @@ divr16u: { cmp #SIN_SIZE sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Clear all graphics on the bitmap @@ -719,6 +842,7 @@ divr16u: { // fgcol - the foreground color to fill the screen with bitmap_clear: { .const col = WHITE*$10 + // memset(bitmap_screen, col, 1000uw) ldx #col lda #$3e8 sta.z memset.num+1 jsr memset + // memset(bitmap_gfx, 0, 8000uw) ldx #0 lda #$1f40 sta.z memset.num+1 jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -748,11 +874,13 @@ memset: { .label dst = $12 .label num = $10 .label str = $12 + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -761,6 +889,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -768,11 +897,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -786,12 +918,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -801,16 +937,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -819,9 +963,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // Tables for the plotter - initialized by calling bitmap_init(); diff --git a/src/test/ref/examples/sinplotter/sine-plotter.log b/src/test/ref/examples/sinplotter/sine-plotter.log index 98a4879a6..f59d42ed5 100644 --- a/src/test/ref/examples/sinplotter/sine-plotter.log +++ b/src/test/ref/examples/sinplotter/sine-plotter.log @@ -2310,29 +2310,29 @@ Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [310] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [71] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [76] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) mul16s::$4 [102] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$6 [106] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 -Simple Condition (bool~) sin16s_gen2::$4 [143] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 -Simple Condition (bool~) sin16s::$1 [171] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [175] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [234] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$1 [263] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [273] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) bitmap_init::$1 [293] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [297] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [313] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [317] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) render_sine::$0 [422] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 -Simple Condition (bool~) render_sine::$9 [454] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@4 -Simple Condition (bool~) wrap_y::$1 [463] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 -Simple Condition (bool~) wrap_y::$2 [468] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [62] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [65] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) sin16s_gen2::$4 [91] if((word) sin16s_gen2::i#2<(word) sin16s_gen2::wavelength#0) goto sin16s_gen2::@2 +Simple Condition (bool~) sin16s::$1 [111] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [114] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [155] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$1 [172] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [179] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bitmap_init::$1 [194] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [198] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [210] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [214] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) render_sine::$0 [286] if((word) render_sine::sin_idx#2<(const word) SIN_SIZE) goto render_sine::@2 +Simple Condition (bool~) render_sine::$9 [309] if((word) render_sine::xpos#1!=(word) $140) goto render_sine::@4 +Simple Condition (bool~) wrap_y::$1 [317] if((signed word) wrap_y::y#4>=(signed word) $c8) goto wrap_y::@2 +Simple Condition (bool~) wrap_y::$2 [321] if((signed word) wrap_y::y#6<(signed byte) 0) goto wrap_y::@8 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [201] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [133] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2386,15 +2386,15 @@ Constant (const word) divr16u::divisor#1 = div32u16u::divisor#0 Constant (const void*) memset::str#0 = (void*)bitmap_screen#1 Constant (const void*) memset::str#1 = (void*)bitmap_gfx#1 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [410] if(true) goto main::@2 +if() condition always true - replacing block destination [279] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [295] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [297] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [315] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [317] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Simplifying expression containing zero bitmap_clear::$0 in [327] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [196] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [198] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [212] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [214] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Simplifying expression containing zero bitmap_clear::$0 in [219] (byte) bitmap_clear::col#0 ← (byte~) bitmap_clear::$0 + (const byte) bitmap_clear::bgcol#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [168] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [170] (void*) memset::return#3 ← (void*) memset::str#3 @@ -2427,10 +2427,10 @@ Successful SSA optimization Pass2AliasElimination Constant right-side identified [18] (word) divr16u::dividend#1 ← > (const dword) div32u16u::dividend#0 Constant right-side identified [22] (word) divr16u::dividend#2 ← < (const dword) div32u16u::dividend#0 Constant right-side identified [59] (signed word) sin16s_gen2::ampl#0 ← (const signed word) sin16s_gen2::max#0 - (const signed word) sin16s_gen2::min#0 -Constant right-side identified [164] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 -Constant right-side identified [183] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 -Constant right-side identified [188] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff -Constant right-side identified [191] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 +Constant right-side identified [163] (byte) bitmap_clear::col#0 ← (const byte) bitmap_clear::fgcol#0 * (byte) $10 +Constant right-side identified [181] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 +Constant right-side identified [186] (word~) main::toD0181_$1 ← (const word) main::toD0181_$0 & (word) $3fff +Constant right-side identified [189] (byte~) main::toD0181_$5 ← > (const word) main::toD0181_$4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) divr16u::dividend#1 = >div32u16u::dividend#0 Constant (const word) divr16u::dividend#2 = > (signed byte) 1 -Constant right-side identified [168] (byte~) main::vicSelectGfxBank1_toDd001_$2 ← (const byte) main::vicSelectGfxBank1_toDd001_$1 / (byte) $40 -Constant right-side identified [172] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 -Constant right-side identified [174] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 +Constant right-side identified [49] (signed word~) sin16s_gen2::$1 ← (const signed word) sin16s_gen2::ampl#0 >> (signed byte) 1 +Constant right-side identified [167] (byte~) main::vicSelectGfxBank1_toDd001_$2 ← (const byte) main::vicSelectGfxBank1_toDd001_$1 / (byte) $40 +Constant right-side identified [171] (word~) main::toD0181_$2 ← (const word) main::toD0181_$1 * (byte) 4 +Constant right-side identified [173] (byte~) main::toD0181_$6 ← (const byte) main::toD0181_$5 / (byte) 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const signed word) sin16s_gen2::$1 = sin16s_gen2::ampl#0>>1 Constant (const byte) main::vicSelectGfxBank1_toDd001_$2 = main::vicSelectGfxBank1_toDd001_$1/$40 @@ -2469,7 +2469,7 @@ Constant (const byte) main::toD0181_$6 = main::toD0181_$5/4 Successful SSA optimization Pass2ConstantIdentification Simplifying constant evaluating to zero (const byte) main::vicSelectGfxBank1_toDd001_$1/(byte) $40 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero 3 in [169] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2 +Simplifying expression containing zero 3 in [168] (byte) main::vicSelectGfxBank1_toDd001_return#0 ← (byte) 3 ^ (const byte) main::vicSelectGfxBank1_toDd001_$2 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) main::vicSelectGfxBank1_toDd001_$1 Eliminating unused constant (const byte) main::vicSelectGfxBank1_toDd001_$2 @@ -2496,7 +2496,7 @@ Eliminating unused constant (const signed word) sin16s_gen2::offs#0 Successful SSA optimization PassNEliminateUnusedVars Alias (signed word~) sin16s_gen2::$9 = (signed word~) sin16s_gen2::$8 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [167] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7 +Constant right-side identified [166] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toD0181_return#0 = main::toD0181_$3|main::toD0181_$7 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.asm b/src/test/ref/examples/sinsprites/sinus-sprites.asm index 99c45bd47..a7699e8f9 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.asm +++ b/src/test/ref/examples/sinsprites/sinus-sprites.asm @@ -30,14 +30,17 @@ .label sin_idx_x = 6 .label sin_idx_y = 8 main: { + // init() jsr init lda #0 sta.z sin_idx_y sta.z sin_idx_x __b1: + // while (*RASTER!=$ff) lda #$ff cmp RASTER bne __b1 + // anim() jsr anim jmp __b1 } @@ -49,9 +52,12 @@ anim: { .label x_msb = $a .label j2 = $b .label j = 5 + // (*BORDERCOL)++; inc BORDERCOL + // xidx = sin_idx_x lda.z sin_idx_x sta.z xidx + // yidx = sin_idx_y lda.z sin_idx_y sta.z yidx lda #0 @@ -61,6 +67,7 @@ anim: { lda #0 sta.z x_msb __b3: + // x = (word)$1e + sintab_x[xidx] ldy.z xidx lda sintab_x,y clc @@ -69,44 +76,60 @@ anim: { lda #>$1e adc #0 sta.z x+1 + // x_msb*2 asl.z __7 + // >x + // x_msb = x_msb*2 | >x ora.z x_msb sta.z x_msb + // =sinlen_x) txa cmp #sinlen_x bcc __b4 + // xidx = xidx-sinlen_x lax.z xidx axs #sinlen_x stx.z xidx __b4: + // yidx = yidx+8 lax.z yidx axs #-[8] stx.z yidx + // if(yidx>=sinlen_y) txa cmp #sinlen_y bcc __b5 + // yidx = yidx-sinlen_y lax.z yidx axs #sinlen_y stx.z yidx __b5: + // j2 = j2-2 dec.z j2 dec.z j2 + // for( byte j : 0..6) inc.z j lda #7 cmp.z j bne __b3 + // *SPRITES_XMSB = x_msb lda.z x_msb sta SPRITES_XMSB + // if(++sin_idx_x>=sinlen_x) inc.z sin_idx_x lda.z sin_idx_x cmp #sinlen_x @@ -114,6 +137,7 @@ anim: { lda #0 sta.z sin_idx_x __b1: + // if(++sin_idx_y>=sinlen_y) inc.z sin_idx_y lda.z sin_idx_y cmp #sinlen_y @@ -121,27 +145,37 @@ anim: { lda #0 sta.z sin_idx_y __b2: + // (*BORDERCOL)--; dec BORDERCOL + // } rts } init: { + // clear_screen() jsr clear_screen ldx #0 __b1: + // COLS[i] = $0 lda #0 sta COLS,x + // COLS[40+i] = $b lda #$b sta COLS+$28,x + // for( byte i : 0..39) inx cpx #$28 bne __b1 + // place_sprites() jsr place_sprites + // gen_sprites() jsr gen_sprites + // progress_init(SCREEN) lda #SCREEN sta.z progress_init.line+1 jsr progress_init + // gen_sintab(sintab_x, sinlen_x, $00, $ff) lda #sintab_x @@ -152,11 +186,13 @@ init: { sta.z gen_sintab.min ldx #$ff jsr gen_sintab + // progress_init(SCREEN+40) lda #SCREEN+$28 sta.z progress_init.line+1 jsr progress_init + // gen_sintab(sintab_y, sinlen_y, $32, $d0) lda #sintab_y @@ -167,7 +203,9 @@ init: { sta.z gen_sintab.min ldx #$d0 jsr gen_sintab + // clear_screen() jsr clear_screen + // } rts } clear_screen: { @@ -177,6 +215,7 @@ clear_screen: { lda #>SCREEN sta.z sc+1 __b1: + // for(byte* sc = SCREEN; scSCREEN+$3e8 bcc __b2 @@ -185,11 +224,14 @@ clear_screen: { cmp #f_min sta.z setMEMtoFAC.mem+1 jsr setMEMtoFAC + // subFACfromARG() jsr subFACfromARG + // setMEMtoFAC(f_amp) lda #f_amp sta.z setMEMtoFAC.mem+1 jsr setMEMtoFAC + // setFAC(2) lda #<2 sta.z setFAC.prepareMEM1_mem lda #>2 sta.z setFAC.prepareMEM1_mem+1 jsr setFAC + // divMEMbyFAC(f_amp) lda #f_amp sta.z divMEMbyFAC.mem+1 jsr divMEMbyFAC + // setMEMtoFAC(f_amp) lda #f_amp sta.z setMEMtoFAC.mem+1 jsr setMEMtoFAC + // addMEMtoFAC(f_min) jsr addMEMtoFAC + // setMEMtoFAC(f_min) lda #f_min @@ -258,49 +311,64 @@ gen_sintab: { sta.z i // f_min = min + (max - min) / 2 __b1: + // for(byte i =0; if_2pi sta.z mulFACbyMEM.mem+1 jsr mulFACbyMEM + // setMEMtoFAC(f_i) lda #f_i sta.z setMEMtoFAC.mem+1 jsr setMEMtoFAC + // setFAC((word)length) lda.z length sta.z setFAC.w lda #0 sta.z setFAC.w+1 jsr setFAC + // divMEMbyFAC(f_i) lda #f_i sta.z divMEMbyFAC.mem+1 jsr divMEMbyFAC + // sinFAC() jsr sinFAC + // mulFACbyMEM(f_amp) lda #f_amp sta.z mulFACbyMEM.mem+1 jsr mulFACbyMEM + // addMEMtoFAC(f_min) jsr addMEMtoFAC + // getFAC() jsr getFAC + // (byte)getFAC() lda.z __24 + // sintab[i] = (byte)getFAC() // fac = sin( i * 2 * PI / length ) * (max - min) / 2 + min + (max - min) / 2 ldy.z i sta (sintab),y + // progress_inc() jsr progress_inc + // for(byte i =0; imem lda #>gen_sintab.f_min sta memHi + // asm lda memLo ldy memHi jsr $b867 + // } rts } // FAC = MEM*FAC @@ -368,20 +448,28 @@ addMEMtoFAC: { // mulFACbyMEM(byte* zp($13) mem) mulFACbyMEM: { .label mem = $13 + // mem lda.z mem+1 + // *memHi = >mem sta memHi + // asm lda memLo ldy memHi jsr $ba28 + // } rts } // FAC = sin(FAC) // Set FAC to sinus of the FAC - sin(FAC) // Sinus is calculated on radians (0-2*PI) sinFAC: { + // asm jsr $e26b + // } rts } // FAC = MEM/FAC @@ -390,13 +478,19 @@ sinFAC: { // divMEMbyFAC(byte* zp($13) mem) divMEMbyFAC: { .label mem = $13 + // mem lda.z mem+1 + // *memHi = >mem sta memHi + // asm lda memLo ldy memHi jsr $bb0f + // } rts } // FAC = word @@ -405,13 +499,19 @@ divMEMbyFAC: { setFAC: { .label prepareMEM1_mem = $13 .label w = $13 + // mem lda.z prepareMEM1_mem+1 + // *memHi = >mem sta memHi + // asm // Load word register Y,A into FAC (floating point accumulator) ldy memLo jsr $b391 + // } rts } // MEM = FAC @@ -420,25 +520,35 @@ setFAC: { // setMEMtoFAC(byte* zp($13) mem) setMEMtoFAC: { .label mem = $13 + // mem lda.z mem+1 + // *memHi = >mem sta memHi + // asm ldx memLo tay jsr $bbd4 + // } rts } // FAC = ARG-FAC // Set FAC to ARG minus FAC subFACfromARG: { + // asm jsr $b853 + // } rts } // ARG = FAC // Set the ARG (floating point argument) to the value of the FAC (floating point accumulator) setARGtoFAC: { + // asm jsr $bc0f + // } rts } // Initialize the PETSCII progress bar @@ -457,6 +567,7 @@ gen_sprites: { lda #0 sta.z i __b1: + // gen_chargen_sprite(cml[i], spr) ldy.z i ldx cml,y lda.z spr @@ -464,6 +575,7 @@ gen_sprites: { lda.z spr+1 sta.z gen_chargen_sprite.sprite+1 jsr gen_chargen_sprite + // spr = spr + $40 lda #$40 clc adc.z spr @@ -471,10 +583,12 @@ gen_sprites: { bcc !+ inc.z spr+1 !: + // for( byte i : 0..6 ) inc.z i lda #7 cmp.z i bne __b1 + // } rts cml: .text "camelot" } @@ -494,16 +608,19 @@ gen_chargen_sprite: { .label y = 4 // Find the current chargen pixel (c) .label c = 8 + // (word)ch txa sta.z __0 lda #0 sta.z __0+1 + // ((word)ch)*8 asl.z __1 rol.z __1+1 asl.z __1 rol.z __1+1 asl.z __1 rol.z __1+1 + // chargen = CHARGEN+((word)ch)*8 clc lda.z chargen adc #CHARGEN sta.z chargen+1 + // asm sei + // *PROCPORT = $32 lda #$32 sta PROCPORT lda #0 sta.z y __b1: + // bits = chargen[y] // current chargen line ldy.z y lda (chargen),y @@ -526,8 +646,10 @@ gen_chargen_sprite: { tay sta.z s_gen __b2: + // bits & $80 lda #$80 and.z bits + // if((bits & $80) != 0) cmp #0 beq b1 lda #1 @@ -540,20 +662,27 @@ gen_chargen_sprite: { ldx #0 // generate 3 pixels in the sprite byte (s_gen) __b4: + // s_gen*2 lda.z s_gen asl + // s_gen = s_gen*2 | c ora.z c sta.z s_gen + // if(++s_gen_cnt==8) iny cpy #8 bne __b5 + // sprite[0] = s_gen // sprite byte filled - store and move to next byte ldy #0 sta (sprite),y + // sprite[3] = s_gen ldy #3 sta (sprite),y + // sprite[6] = s_gen ldy #6 sta (sprite),y + // sprite++; inc.z sprite bne !+ inc.z sprite+1 @@ -562,14 +691,18 @@ gen_chargen_sprite: { tya sta.z s_gen __b5: + // for(byte b : 0..2) inx cpx #3 bne __b4 + // bits = bits*2 asl.z bits + // for(byte x:0..7) inc.z x lda #8 cmp.z x bne __b2 + // sprite = sprite + 6 lda #6 clc adc.z sprite @@ -577,13 +710,17 @@ gen_chargen_sprite: { bcc !+ inc.z sprite+1 !: + // for(byte y:0..7) inc.z y lda #8 cmp.z y bne __b1 + // *PROCPORT = $37 lda #$37 sta PROCPORT + // asm cli + // } rts } place_sprites: { @@ -593,9 +730,12 @@ place_sprites: { .label col = $b .label j2 = $a .label j = 8 + // *SPRITES_ENABLE = %01111111 lda #$7f sta SPRITES_ENABLE + // *SPRITES_EXPAND_X = %01111111 sta SPRITES_EXPAND_X + // *SPRITES_EXPAND_Y = %01111111 sta SPRITES_EXPAND_Y lda #5 sta.z col @@ -608,32 +748,42 @@ place_sprites: { lda #sprites/$40 sta.z spr_id __b1: + // sprites_ptr[j] = spr_id++ lda.z spr_id ldy.z j sta sprites_ptr,y + // sprites_ptr[j] = spr_id++; inc.z spr_id + // SPRITES_XPOS[j2] = spr_x lda.z spr_x ldy.z j2 sta SPRITES_XPOS,y + // SPRITES_YPOS[j2] = 80 lda #$50 sta SPRITES_YPOS,y + // SPRITES_COLS[j] = col lda.z col ldy.z j sta SPRITES_COLS,y + // spr_x = spr_x + 32 lax.z spr_x axs #-[$20] stx.z spr_x + // col = col^($7^$5) lda #7^5 eor.z col sta.z col + // j2++; ldx.z j2 inx inx stx.z j2 + // for( byte j : 0..6) inc.z j lda #7 cmp.z j bne __b1 + // } rts } sintab_x: .fill $dd, 0 diff --git a/src/test/ref/examples/sinsprites/sinus-sprites.log b/src/test/ref/examples/sinsprites/sinus-sprites.log index 5a1569e8d..bf7f57ebd 100644 --- a/src/test/ref/examples/sinsprites/sinus-sprites.log +++ b/src/test/ref/examples/sinsprites/sinus-sprites.log @@ -2150,23 +2150,23 @@ Identical Phi Values (byte*) progress_cursor#39 (byte*) progress_cursor#22 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) gen_chargen_sprite::chargen#1 (byte*) gen_chargen_sprite::chargen#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [69] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -Simple Condition (bool~) init::$9 [92] if((byte) init::i#1!=rangelast(0,$27)) goto init::@1 -Simple Condition (bool~) clear_screen::$0 [133] if((byte*) clear_screen::sc#2<(const byte*) SCREEN+(word) $3e8) goto clear_screen::@2 -Simple Condition (bool~) progress_inc::$1 [151] if((byte) progress_idx#10!=(byte) 8) goto progress_inc::@1 -Simple Condition (bool~) anim::$13 [186] if((byte) anim::xidx#1<(const byte) sinlen_x) goto anim::@5 -Simple Condition (bool~) anim::$17 [192] if((byte) anim::yidx#1<(const byte) sinlen_y) goto anim::@6 -Simple Condition (bool~) anim::$20 [201] if((byte) anim::j#1!=rangelast(0,6)) goto anim::@4 -Simple Condition (bool~) anim::$2 [210] if((byte) sin_idx_x#3<(const byte) sinlen_x) goto anim::@1 -Simple Condition (bool~) anim::$4 [215] if((byte) sin_idx_y#3<(const byte) sinlen_y) goto anim::@2 -Simple Condition (bool~) place_sprites::$2 [248] if((byte) place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 -Simple Condition (bool~) gen_sprites::$2 [261] if((byte) gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 -Simple Condition (bool~) gen_chargen_sprite::$5 [281] if((byte~) gen_chargen_sprite::$3==(byte) 0) goto gen_chargen_sprite::@3 -Simple Condition (bool~) gen_chargen_sprite::$9 [293] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte) 8) goto gen_chargen_sprite::@5 -Simple Condition (bool~) gen_chargen_sprite::$10 [297] if((byte) gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 -Simple Condition (bool~) gen_chargen_sprite::$12 [310] if((byte) gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 -Simple Condition (bool~) gen_chargen_sprite::$14 [316] if((byte) gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 -Simple Condition (bool~) gen_sintab::$13 [357] if((byte) gen_sintab::i#10<(byte) gen_sintab::length#10) goto gen_sintab::@2 +Simple Condition (bool~) main::$1 [53] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 +Simple Condition (bool~) init::$9 [67] if((byte) init::i#1!=rangelast(0,$27)) goto init::@1 +Simple Condition (bool~) clear_screen::$0 [93] if((byte*) clear_screen::sc#2<(const byte*) SCREEN+(word) $3e8) goto clear_screen::@2 +Simple Condition (bool~) progress_inc::$1 [106] if((byte) progress_idx#10!=(byte) 8) goto progress_inc::@1 +Simple Condition (bool~) anim::$13 [132] if((byte) anim::xidx#1<(const byte) sinlen_x) goto anim::@5 +Simple Condition (bool~) anim::$17 [136] if((byte) anim::yidx#1<(const byte) sinlen_y) goto anim::@6 +Simple Condition (bool~) anim::$20 [142] if((byte) anim::j#1!=rangelast(0,6)) goto anim::@4 +Simple Condition (bool~) anim::$2 [147] if((byte) sin_idx_x#3<(const byte) sinlen_x) goto anim::@1 +Simple Condition (bool~) anim::$4 [151] if((byte) sin_idx_y#3<(const byte) sinlen_y) goto anim::@2 +Simple Condition (bool~) place_sprites::$2 [177] if((byte) place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 +Simple Condition (bool~) gen_sprites::$2 [188] if((byte) gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 +Simple Condition (bool~) gen_chargen_sprite::$5 [206] if((byte~) gen_chargen_sprite::$3==(byte) 0) goto gen_chargen_sprite::@3 +Simple Condition (bool~) gen_chargen_sprite::$9 [215] if((byte) gen_chargen_sprite::s_gen_cnt#1!=(byte) 8) goto gen_chargen_sprite::@5 +Simple Condition (bool~) gen_chargen_sprite::$10 [219] if((byte) gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 +Simple Condition (bool~) gen_chargen_sprite::$12 [229] if((byte) gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 +Simple Condition (bool~) gen_chargen_sprite::$14 [233] if((byte) gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 +Simple Condition (bool~) gen_sintab::$13 [261] if((byte) gen_sintab::i#10<(byte) gen_sintab::length#10) goto gen_sintab::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) init::i#0 = 0 Constant (const byte*) progress_init::line#0 = SCREEN @@ -2221,23 +2221,23 @@ Constant (const byte*) divMEMbyFAC::mem#1 = gen_sintab::f_i Constant (const byte*) mulFACbyMEM::mem#1 = gen_sintab::f_amp Constant (const byte*) addMEMtoFAC::mem#1 = gen_sintab::f_min Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [75] if(true) goto main::@2 +if() condition always true - replacing block destination [56] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [90] init::i#1 ← ++ init::i#2 to ++ -Resolved ranged comparison value [92] if(init::i#1!=rangelast(0,$27)) goto init::@1 to (number) $28 -Resolved ranged next value [199] anim::j#1 ← ++ anim::j#2 to ++ -Resolved ranged comparison value [201] if(anim::j#1!=rangelast(0,6)) goto anim::@4 to (number) 7 -Resolved ranged next value [246] place_sprites::j#1 ← ++ place_sprites::j#2 to ++ -Resolved ranged comparison value [248] if(place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 to (number) 7 -Resolved ranged next value [259] gen_sprites::i#1 ← ++ gen_sprites::i#2 to ++ -Resolved ranged comparison value [261] if(gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 to (number) 7 -Resolved ranged next value [295] gen_chargen_sprite::b#1 ← ++ gen_chargen_sprite::b#2 to ++ -Resolved ranged comparison value [297] if(gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 to (number) 3 -Resolved ranged next value [308] gen_chargen_sprite::x#1 ← ++ gen_chargen_sprite::x#6 to ++ -Resolved ranged comparison value [310] if(gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 to (number) 8 -Resolved ranged next value [314] gen_chargen_sprite::y#1 ← ++ gen_chargen_sprite::y#2 to ++ -Resolved ranged comparison value [316] if(gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 to (number) 8 -Simplifying expression containing zero gen_chargen_sprite::sprite#3 in [299] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 0) ← (byte) gen_chargen_sprite::s_gen#1 +Resolved ranged next value [65] init::i#1 ← ++ init::i#2 to ++ +Resolved ranged comparison value [67] if(init::i#1!=rangelast(0,$27)) goto init::@1 to (number) $28 +Resolved ranged next value [140] anim::j#1 ← ++ anim::j#2 to ++ +Resolved ranged comparison value [142] if(anim::j#1!=rangelast(0,6)) goto anim::@4 to (number) 7 +Resolved ranged next value [175] place_sprites::j#1 ← ++ place_sprites::j#2 to ++ +Resolved ranged comparison value [177] if(place_sprites::j#1!=rangelast(0,6)) goto place_sprites::@1 to (number) 7 +Resolved ranged next value [186] gen_sprites::i#1 ← ++ gen_sprites::i#2 to ++ +Resolved ranged comparison value [188] if(gen_sprites::i#1!=rangelast(0,6)) goto gen_sprites::@1 to (number) 7 +Resolved ranged next value [217] gen_chargen_sprite::b#1 ← ++ gen_chargen_sprite::b#2 to ++ +Resolved ranged comparison value [219] if(gen_chargen_sprite::b#1!=rangelast(0,2)) goto gen_chargen_sprite::@4 to (number) 3 +Resolved ranged next value [227] gen_chargen_sprite::x#1 ← ++ gen_chargen_sprite::x#6 to ++ +Resolved ranged comparison value [229] if(gen_chargen_sprite::x#1!=rangelast(0,7)) goto gen_chargen_sprite::@2 to (number) 8 +Resolved ranged next value [231] gen_chargen_sprite::y#1 ← ++ gen_chargen_sprite::y#2 to ++ +Resolved ranged comparison value [233] if(gen_chargen_sprite::y#1!=rangelast(0,7)) goto gen_chargen_sprite::@1 to (number) 8 +Simplifying expression containing zero gen_chargen_sprite::sprite#3 in [220] *((byte*) gen_chargen_sprite::sprite#3 + (byte) 0) ← (byte) gen_chargen_sprite::s_gen#1 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte*) progress_cursor#36 Eliminating unused constant (const byte) progress_idx#36 diff --git a/src/test/ref/examples/zpcode/zpcode.asm b/src/test/ref/examples/zpcode/zpcode.asm index f785a7287..fa36c3917 100644 --- a/src/test/ref/examples/zpcode/zpcode.asm +++ b/src/test/ref/examples/zpcode/zpcode.asm @@ -17,23 +17,31 @@ main: { // Transfer ZP-code to zeropage .label zpCode = zpLoop + // asm sei ldx #0 __b1: + // for(char i=0;i<20;i++) cpx #$14 bcc __b2 __b3: + // while(*RASTER!=0xff) lda #$ff cmp RASTER bne __b3 + // loop() jsr loop + // zpLoop() jsr zpLoop + // *BGCOL = 0 lda #0 sta BGCOL jmp __b3 __b2: + // zpCode[i] = zpCodeData[i] lda zpCodeData,x sta zpCode,x + // for(char i=0;i<20;i++) inx jmp __b1 } @@ -41,10 +49,13 @@ main: { zpLoop: { ldx #0 __b1: + // (*BGCOL)++; inc BGCOL + // for(char i:0..100) inx cpx #$65 bne __b1 + // } rts } .segment Code @@ -52,10 +63,13 @@ zpLoop: { loop: { ldx #0 __b1: + // (*BGCOL)--; dec BGCOL + // for(char i:0..100) inx cpx #$65 bne __b1 + // } rts } .segment Data diff --git a/src/test/ref/examples/zpcode/zpcode.log b/src/test/ref/examples/zpcode/zpcode.log index acc4128d1..1062287e7 100644 --- a/src/test/ref/examples/zpcode/zpcode.log +++ b/src/test/ref/examples/zpcode/zpcode.log @@ -159,20 +159,20 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [4] if((byte) main::i#2<(byte) $14) goto main::@2 -Simple Condition (bool~) main::$1 [10] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@10 -Simple Condition (bool~) loop::$1 [20] if((byte) loop::i#1!=rangelast(0,$64)) goto loop::@1 -Simple Condition (bool~) zpLoop::$1 [27] if((byte) zpLoop::i#1!=rangelast(0,$64)) goto zpLoop::@1 +Simple Condition (bool~) main::$1 [9] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@10 +Simple Condition (bool~) loop::$1 [19] if((byte) loop::i#1!=rangelast(0,$64)) goto loop::@1 +Simple Condition (bool~) zpLoop::$1 [26] if((byte) zpLoop::i#1!=rangelast(0,$64)) goto zpLoop::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) loop::i#0 = 0 Constant (const byte) zpLoop::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [8] if(true) goto main::@10 +if() condition always true - replacing block destination [7] if(true) goto main::@10 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [18] loop::i#1 ← ++ loop::i#2 to ++ -Resolved ranged comparison value [20] if(loop::i#1!=rangelast(0,$64)) goto loop::@1 to (number) $65 -Resolved ranged next value [25] zpLoop::i#1 ← ++ zpLoop::i#2 to ++ -Resolved ranged comparison value [27] if(zpLoop::i#1!=rangelast(0,$64)) goto zpLoop::@1 to (number) $65 +Resolved ranged next value [17] loop::i#1 ← ++ loop::i#2 to ++ +Resolved ranged comparison value [19] if(loop::i#1!=rangelast(0,$64)) goto loop::@1 to (number) $65 +Resolved ranged next value [24] zpLoop::i#1 ← ++ zpLoop::i#2 to ++ +Resolved ranged comparison value [26] if(zpLoop::i#1!=rangelast(0,$64)) goto zpLoop::@1 to (number) $65 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $65 in if((byte) loop::i#1!=(number) $65) goto loop::@1 diff --git a/src/test/ref/fastmultiply-127.asm b/src/test/ref/fastmultiply-127.asm index f81c5f1ba..5cd60702b 100644 --- a/src/test/ref/fastmultiply-127.asm +++ b/src/test/ref/fastmultiply-127.asm @@ -9,7 +9,9 @@ .label print_char_cursor = 7 .label print_line_cursor = 5 main: { + // print_cls() jsr print_cls + // print_str("unsigned") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -19,39 +21,48 @@ main: { lda #>str sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 sta.z print_line_cursor+1 jsr print_ln + // print_mulf8u127(0,0) lda #0 sta.z print_mulf8u127.b tay jsr print_mulf8u127 + // print_mulf8u127(127,127) lda #$7f sta.z print_mulf8u127.b tay jsr print_mulf8u127 + // print_mulf8u127(64,64) lda #$40 sta.z print_mulf8u127.b tay jsr print_mulf8u127 + // print_mulf8u127(64,127) lda #$7f sta.z print_mulf8u127.b ldy #$40 jsr print_mulf8u127 + // print_mulf8u127(64,192) lda #$c0 sta.z print_mulf8u127.b ldy #$40 jsr print_mulf8u127 + // print_mulf8u127(255,127) lda #$7f sta.z print_mulf8u127.b ldy #$ff jsr print_mulf8u127 + // print_mulf8u127(192,192) lda #$c0 sta.z print_mulf8u127.b tay jsr print_mulf8u127 + // print_mulf8u127(255,255) lda #$ff sta.z print_mulf8u127.b tay @@ -60,52 +71,65 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("signed") lda #str1 sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln + // print_mulf8s127(0,0) lda #0 sta.z print_mulf8s127.b tay jsr print_mulf8s127 + // print_mulf8s127(64,64) lda #$40 sta.z print_mulf8s127.b tay jsr print_mulf8s127 + // print_mulf8s127(64,127) lda #$7f sta.z print_mulf8s127.b ldy #$40 jsr print_mulf8s127 + // print_mulf8s127(-64,64) lda #$40 sta.z print_mulf8s127.b ldy #-$40 jsr print_mulf8s127 + // print_mulf8s127(64,-64) lda #-$40 sta.z print_mulf8s127.b ldy #$40 jsr print_mulf8s127 + // print_mulf8s127(-64,-64) lda #-$40 sta.z print_mulf8s127.b tay jsr print_mulf8s127 + // print_mulf8s127(127,127) lda #$7f sta.z print_mulf8s127.b tay jsr print_mulf8s127 + // print_mulf8s127(-127,127) lda #$7f sta.z print_mulf8s127.b ldy #-$7f jsr print_mulf8s127 + // print_mulf8s127(127,-127) lda #-$7f sta.z print_mulf8s127.b ldy #$7f jsr print_mulf8s127 + // print_mulf8s127(-127,-127) lda #-$7f sta.z print_mulf8s127.b tay jsr print_mulf8s127 + // } rts str: .text "unsigned" .byte 0 @@ -116,27 +140,38 @@ main: { print_mulf8s127: { .label c = 2 .label b = 4 + // mulf8s127(a,b) jsr mulf8s127 + // c = mulf8s127(a,b) + // print_sbyte(a) tya tax lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_sbyte(a) jsr print_sbyte + // print_char('*') lda #'*' jsr print_char + // print_sbyte(b) ldx.z b jsr print_sbyte + // print_char('=') lda #'=' jsr print_char + // print_sword(c) jsr print_sword + // print_ln() jsr print_ln + // } rts } // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -144,6 +179,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a signed byte as HEX // print_sbyte(signed byte register(X) b) print_sbyte: { + // if(b<0) cpx #0 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_byte((byte)b) jsr print_byte + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // b = -b txa eor #$ff clc @@ -246,11 +306,15 @@ mulf8s127: { .label b = 4 .label return = 2 .label c = 2 + // mulf8u127((unsigned char)a, (unsigned char)b) tya ldx.z b jsr mulf8u127 + // mulf8u127((unsigned char)a, (unsigned char)b) + // if(a<0) cpy #0 bpl __b1 + // (signed word)b lda.z b sta.z __12 ora #$7f @@ -258,8 +322,10 @@ mulf8s127: { lda #0 !: sta.z __12+1 + // (signed word)b*2 asl.z __13 rol.z __13+1 + // c -= (signed word)b*2 lda.z c sec sbc.z __13 @@ -268,9 +334,11 @@ mulf8s127: { sbc.z __13+1 sta.z c+1 __b1: + // if(b<0) lda.z b cmp #0 bpl __b2 + // (signed word)a tya sta.z __14 ora #$7f @@ -278,8 +346,10 @@ mulf8s127: { lda #0 !: sta.z __14+1 + // (signed word)a*2 asl.z __15 rol.z __15+1 + // c -= (signed word)a*2 lda.z c sec sbc.z __15 @@ -288,11 +358,13 @@ mulf8s127: { sbc.z __15+1 sta.z c+1 __b2: + // if(a<0 && b<0) cpy #0 bpl __b3 lda.z b cmp #0 bpl __b3 + // c -= 0x200 lda.z c sec sbc #<$200 @@ -302,6 +374,7 @@ mulf8s127: { sta.z c+1 rts __b3: + // } rts } // mulf8u127(byte register(A) a, byte register(X) b) @@ -312,8 +385,11 @@ mulf8u127: { .label resL = $fe .label resH = $ff .label return = 2 + // *memA = a sta memA + // *memB = b stx memB + // asm sta sm1+1 sta sm3+1 eor #$ff @@ -330,10 +406,12 @@ mulf8u127: { sm4: sbc mulf127_sqr2_hi,x sta resH + // return *res; lda res sta.z return lda res+1 sta.z return+1 + // } rts } // Print a zero-terminated string @@ -341,15 +419,19 @@ mulf8u127: { print_str: { .label str = 2 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -364,29 +446,42 @@ print_str: { print_mulf8u127: { .label c = 2 .label b = 4 + // mulf8u127(a,b) tya ldx.z b jsr mulf8u127 + // mulf8u127(a,b) + // c = mulf8u127(a,b) + // print_byte(a) tya tax lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_byte(a) jsr print_byte + // print_char('*') lda #'*' jsr print_char + // print_byte(b) ldx.z b jsr print_byte + // print_char('=') lda #'=' jsr print_char + // print_word(c) jsr print_word + // print_ln() jsr print_ln + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -401,17 +496,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(signed byte) 0) goto mulf8s127::@1 -Simple Condition (bool~) mulf8s127::$7 [371] if((signed byte) mulf8s127::b#0>=(signed byte) 0) goto mulf8s127::@2 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#123) goto print_ln::@1 +Simple Condition (bool~) print_sword::$0 [30] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) print_sbyte::$0 [45] if((signed byte) print_sbyte::b#3<(signed byte) 0) goto print_sbyte::@1 +Simple Condition (bool~) mulf8s127::$5 [235] if((signed byte) mulf8s127::a#0>=(signed byte) 0) goto mulf8s127::@1 +Simple Condition (bool~) mulf8s127::$7 [238] if((signed byte) mulf8s127::b#0>=(signed byte) 0) goto mulf8s127::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [380] (bool~) mulf8s127::$11 ← ! (bool~) mulf8s127::$10 -Rewriting && if()-condition to two if()s [379] (bool~) mulf8s127::$10 ← (bool~) mulf8s127::$8 && (bool~) mulf8s127::$9 +Rewriting ! if()-condition to reversed if() [246] (bool~) mulf8s127::$11 ← ! (bool~) mulf8s127::$10 +Rewriting && if()-condition to two if()s [245] (bool~) mulf8s127::$10 ← (bool~) mulf8s127::$8 && (bool~) mulf8s127::$9 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) print_char::ch#0 = '-' @@ -1901,7 +1901,7 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/fibmem.asm b/src/test/ref/fibmem.asm index 572eaed1a..22c29b00c 100644 --- a/src/test/ref/fibmem.asm +++ b/src/test/ref/fibmem.asm @@ -2,19 +2,25 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // fibs[0] = 0 lda #0 sta fibs + // fibs[1] = 1 lda #1 sta fibs+1 ldx #0 __b1: + // fibs[i]+fibs[i+1] lda fibs,x clc adc fibs+1,x + // fibs[i+2] = fibs[i]+fibs[i+1] sta fibs+2,x + // while(++i<15) inx cpx #$f bcc __b1 + // } rts } fibs: .fill $f, 0 diff --git a/src/test/ref/fill-square.asm b/src/test/ref/fill-square.asm index df803ba21..a23cdc429 100644 --- a/src/test/ref/fill-square.asm +++ b/src/test/ref/fill-square.asm @@ -13,10 +13,12 @@ main: { lda #5 sta.z y __b1: + // (word)y lda.z y sta.z __0 lda #0 sta.z __0+1 + // (word)y*40 lda.z __0 asl sta.z __6 @@ -38,6 +40,7 @@ main: { rol.z __1+1 asl.z __1 rol.z __1+1 + // line = SCREEN+(word)y*40 clc lda.z line adc #(SCREEN&$3fff)*4)|(>CHARSET)/4&$f + // *D018 = toD018(SCREEN, CHARSET) lda #toD0181_return sta D018 + // init_font_hex(CHARSET) jsr init_font_hex ldx #0 // Show all chars on screen __b1: + // SCREEN[c] = c txa sta SCREEN,x + // for (byte c: 0..255) inx cpx #0 bne __b1 + // } rts } // Make charset from proto chars @@ -48,6 +53,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -55,6 +61,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -63,22 +70,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -86,6 +102,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -93,10 +110,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -104,10 +123,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/font-hex-show.log b/src/test/ref/font-hex-show.log index 268f28f0f..1a0d38d7c 100644 --- a/src/test/ref/font-hex-show.log +++ b/src/test/ref/font-hex-show.log @@ -332,9 +332,9 @@ Identical Phi Values (byte*) init_font_hex::proto_hi#4 (byte*) init_font_hex::pr Identical Phi Values (byte) init_font_hex::c#5 (byte) init_font_hex::c#6 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) main::$2 [61] if((byte) main::c#1!=rangelast(0,$ff)) goto main::@1 +Simple Condition (bool~) init_font_hex::$4 [28] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [32] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) main::$2 [53] if((byte) main::c#1!=rangelast(0,$ff)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant (const byte) init_font_hex::c#0 = 0 @@ -352,12 +352,12 @@ Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [59] main::c#1 ← ++ main::c#2 to ++ -Resolved ranged comparison value [61] if(main::c#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 +Resolved ranged next value [26] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [30] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [51] main::c#1 ← ++ main::c#2 to ++ +Resolved ranged comparison value [53] if(main::c#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 diff --git a/src/test/ref/for-empty-increment.asm b/src/test/ref/for-empty-increment.asm index c0811d467..0db8f14a8 100644 --- a/src/test/ref/for-empty-increment.asm +++ b/src/test/ref/for-empty-increment.asm @@ -6,12 +6,16 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // for(unsigned char i=0;i<10;) cpx #$a bcc __b2 + // } rts __b2: + // SCREEN[i] = i++ txa sta SCREEN,x + // SCREEN[i] = i++; inx jmp __b1 } diff --git a/src/test/ref/for-empty-init.asm b/src/test/ref/for-empty-init.asm index c4b284b3f..09a2f91bc 100644 --- a/src/test/ref/for-empty-init.asm +++ b/src/test/ref/for-empty-init.asm @@ -6,12 +6,16 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // for(;i<10;i++) cpx #$a bcc __b2 + // } rts __b2: + // SCREEN[i] = i txa sta SCREEN,x + // for(;i<10;i++) inx jmp __b1 } diff --git a/src/test/ref/for-two-vars.asm b/src/test/ref/for-two-vars.asm index 839749802..b738e557b 100644 --- a/src/test/ref/for-two-vars.asm +++ b/src/test/ref/for-two-vars.asm @@ -12,13 +12,17 @@ main: { sta.z sc+1 ldx #0 __b1: + // for( byte i=0; i<40; i++, sc--) cpx #$28 bcc __b2 + // } rts __b2: + // *sc = i txa ldy #0 sta (sc),y + // for( byte i=0; i<40; i++, sc--) inx lda.z sc bne !+ diff --git a/src/test/ref/forced-zeropage.asm b/src/test/ref/forced-zeropage.asm index bc1869ac1..ab8b76854 100644 --- a/src/test/ref/forced-zeropage.asm +++ b/src/test/ref/forced-zeropage.asm @@ -5,6 +5,7 @@ main: { .label __1 = 4 .label u = 2 + // u = *(word *)0xA0 - u sec lda $a0 sbc #<$22b @@ -12,10 +13,12 @@ main: { lda $a0+1 sbc #>$22b sta.z u+1 + // *((word*)0x0400) = u lda.z u sta $400 lda.z u+1 sta $400+1 + // *(byte **)0xD1 + 0xD400 clc lda $d1 adc #<$d400 @@ -23,9 +26,11 @@ main: { lda $d1+1 adc #>$d400 sta.z __1+1 + // *(byte **)0xF3 = *(byte **)0xD1 + 0xD400 lda.z __1 sta $f3 lda.z __1+1 sta $f3+1 + // } rts } diff --git a/src/test/ref/forclassicmin.asm b/src/test/ref/forclassicmin.asm index eb876c3bd..d31fd5bb1 100644 --- a/src/test/ref/forclassicmin.asm +++ b/src/test/ref/forclassicmin.asm @@ -6,12 +6,16 @@ main: { ldx #0 __b1: + // for(byte i=0; i!=100; i++) cpx #$64 bne __b2 + // } rts __b2: + // SCREEN[i] = i txa sta SCREEN,x + // for(byte i=0; i!=100; i++) inx jmp __b1 } diff --git a/src/test/ref/forincrementassign.asm b/src/test/ref/forincrementassign.asm index 9275460ed..8dd818853 100644 --- a/src/test/ref/forincrementassign.asm +++ b/src/test/ref/forincrementassign.asm @@ -7,12 +7,16 @@ main: { lda #0 __b1: + // for(byte i=0;i<40;i=i+2) cmp #$28 bcc __b2 + // } rts __b2: + // SCREEN[i] = i tax sta SCREEN,x + // i=i+2 clc adc #2 jmp __b1 diff --git a/src/test/ref/forrangedwords.asm b/src/test/ref/forrangedwords.asm index 591b3a240..76aad721a 100644 --- a/src/test/ref/forrangedwords.asm +++ b/src/test/ref/forrangedwords.asm @@ -9,10 +9,15 @@ main: { sta.z w sta.z w+1 __b1: + // w lda.z w+1 + // SCREEN[1] = >w sta SCREEN+1 + // for( word w: 0..$ffff) inc.z w bne !+ inc.z w+1 @@ -26,10 +31,15 @@ main: { lda #>-$7fff sta.z sw+1 __b2: + // sw lda.z sw+1 + // SCREEN[4] = >sw sta SCREEN+4 + // for( signed word sw: -$7fff..$7ffe) inc.z sw bne !+ inc.z sw+1 @@ -40,5 +50,6 @@ main: { lda.z sw cmp #<$7fff bne __b2 + // } rts } diff --git a/src/test/ref/forrangemin.asm b/src/test/ref/forrangemin.asm index dc81ccbcb..dd2cb989c 100644 --- a/src/test/ref/forrangemin.asm +++ b/src/test/ref/forrangemin.asm @@ -7,17 +7,22 @@ main: { ldx #0 __b1: + // SCREEN1[i] = i txa sta SCREEN1,x + // for(byte i : 0..255) inx cpx #0 bne __b1 ldx #$64 __b2: + // SCREEN2[j] = j txa sta SCREEN2,x + // for(j : 100..0) dex cpx #$ff bne __b2 + // } rts } diff --git a/src/test/ref/forrangesymbolic.asm b/src/test/ref/forrangesymbolic.asm index 7e2d2bbad..efb5d104f 100644 --- a/src/test/ref/forrangesymbolic.asm +++ b/src/test/ref/forrangesymbolic.asm @@ -11,9 +11,11 @@ main: { lda #>BITMAP+$1fff sta.z b+1 __b1: + // *b = $5a lda #$5a ldy #0 sta (b),y + // for(byte* b : BITMAP+$1fff..BITMAP) lda.z b bne !+ dec.z b+1 @@ -25,5 +27,6 @@ main: { lda.z b cmp #$450 sta.z fct.z+1 ldx #$aa jsr fct + // fct(x, z) + // a1 = fct(x, z) + // screen[0] = a1 sta screen + // fct(x, z) lda #<$450+1 sta.z fct.z lda #>$450+1 sta.z fct.z+1 ldx #$55 jsr fct + // fct(x, z) + // a2 = fct(x, z) + // screen[1] = a2 sta screen+1 + // } rts } // fct(byte register(X) x, byte* zp(2) z) fct: { .label z = 2 + // x & z[2] ldy #2 txa and (z),y + // } rts } diff --git a/src/test/ref/fragment-synth.log b/src/test/ref/fragment-synth.log index 9c9e0b845..78093940d 100644 --- a/src/test/ref/fragment-synth.log +++ b/src/test/ref/fragment-synth.log @@ -153,7 +153,7 @@ Constant (const byte) fct::x#0 = main::x#0 Constant (const byte*) fct::z#0 = main::z#0 Constant (const byte) fct::x#1 = main::x#1 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::screen in [11] *((const byte*) main::screen + (byte) 0) ← (byte) main::a1#0 +Simplifying expression containing zero main::screen in [9] *((const byte*) main::screen + (byte) 0) ← (byte) main::a1#0 Successful SSA optimization PassNSimplifyExpressionWithZero Constant right-side identified [6] (byte*) main::z#1 ← ++ (const byte*) main::z#0 Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/fragment-variations.asm b/src/test/ref/fragment-variations.asm index 5e450573e..134c69d9c 100644 --- a/src/test/ref/fragment-variations.asm +++ b/src/test/ref/fragment-variations.asm @@ -8,6 +8,7 @@ main: { .label screen = $400 .label __0 = 6 .label __1 = 6 + // mul16u(w, w) lda #<$a sta.z mul16u.a lda #>$a @@ -17,6 +18,8 @@ main: { lda #>$a sta.z mul16u.b+1 jsr mul16u + // mul16u(w, w) + // screen[0] = mul16u(w, w) lda.z __0 sta screen lda.z __0+1 @@ -25,6 +28,7 @@ main: { sta screen+2 lda.z __0+3 sta screen+3 + // mul16u(w, w) lda #<$3e8 sta.z mul16u.a lda #>$3e8 @@ -34,6 +38,8 @@ main: { lda #>$3e8 sta.z mul16u.b+1 jsr mul16u + // mul16u(w, w) + // screen[1] = mul16u(w, w) lda.z __1 sta screen+1*SIZEOF_DWORD lda.z __1+1 @@ -42,6 +48,7 @@ main: { sta screen+1*SIZEOF_DWORD+2 lda.z __1+3 sta screen+1*SIZEOF_DWORD+3 + // } rts } // mul16u(word zp(2) b, word zp(4) a) @@ -50,6 +57,7 @@ mul16u: { .label mb = 6 .label b = 2 .label a = 4 + // mb = b lda.z b sta.z mb lda.z b+1 @@ -57,6 +65,7 @@ mul16u: { lda #0 sta.z mb+2 sta.z mb+3 + // mb+a lda.z return clc adc.z a @@ -70,5 +79,6 @@ mul16u: { lda.z return+3 adc #0 sta.z return+3 + // } rts } diff --git a/src/test/ref/fragment-variations.log b/src/test/ref/fragment-variations.log index db4561316..0bc0758eb 100644 --- a/src/test/ref/fragment-variations.log +++ b/src/test/ref/fragment-variations.log @@ -120,8 +120,8 @@ Alias (dword) mul16u::return#0 = (dword) mul16u::return#4 Alias (dword) mul16u::return#1 = (dword) mul16u::return#5 Alias (dword) mul16u::return#2 = (dword~) mul16u::$0 (dword) mul16u::return#6 (dword) mul16u::return#3 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [7] (byte~) main::$2 ← (byte) 0 * (const byte) SIZEOF_DWORD -Constant right-side identified [16] (byte~) main::$3 ← (byte) 1 * (const byte) SIZEOF_DWORD +Constant right-side identified [6] (byte~) main::$2 ← (byte) 0 * (const byte) SIZEOF_DWORD +Constant right-side identified [14] (byte~) main::$3 ← (byte) 1 * (const byte) SIZEOF_DWORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::w#0 = $a Constant (const byte) main::$2 = 0*SIZEOF_DWORD @@ -135,7 +135,7 @@ Constant (const word) mul16u::a#1 = main::w#1 Successful SSA optimization Pass2ConstantIdentification Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_DWORD in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero main::screen in [8] *((const dword*) main::screen + (const byte) main::$2) ← (dword~) main::$0 +Simplifying expression containing zero main::screen in [7] *((const dword*) main::screen + (const byte) main::$2) ← (dword~) main::$0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) main::$2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/function-pointer-noarg-2.asm b/src/test/ref/function-pointer-noarg-2.asm index ed351c23a..d66d9d1f0 100644 --- a/src/test/ref/function-pointer-noarg-2.asm +++ b/src/test/ref/function-pointer-noarg-2.asm @@ -5,11 +5,15 @@ main: { ldx #0 __b1: + // i&1 txa and #1 + // if((i&1)==0) cmp #0 + // for ( byte i: 0..100) inx cpx #$65 bne __b1 + // } rts } diff --git a/src/test/ref/function-pointer-noarg-2.log b/src/test/ref/function-pointer-noarg-2.log index 34df0da0d..65fdf5a97 100644 --- a/src/test/ref/function-pointer-noarg-2.log +++ b/src/test/ref/function-pointer-noarg-2.log @@ -99,12 +99,12 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$1 [4] if((byte~) main::$0==(byte) 0) goto main::@3 -Simple Condition (bool~) main::$2 [9] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$2 [7] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 Removing unused procedure fn1 Removing unused procedure block fn1 Removing unused procedure block fn1::@return diff --git a/src/test/ref/function-pointer-noarg-3.asm b/src/test/ref/function-pointer-noarg-3.asm index 64fdb10f9..9c86ba05c 100644 --- a/src/test/ref/function-pointer-noarg-3.asm +++ b/src/test/ref/function-pointer-noarg-3.asm @@ -2,6 +2,7 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" + // kickasm ff: jmp (main.f) @@ -9,9 +10,12 @@ main: { .label f = 2 ldx #0 __b2: + // ++i; inx + // i&1 txa and #1 + // if((i&1)==0) cmp #0 beq __b3 lda #fn1 sta.z f+1 __b4: + // kickasm jsr ff jmp __b2 } fn2: { .label BGCOL = $d021 + // (*BGCOL)++; inc BGCOL + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } diff --git a/src/test/ref/function-pointer-noarg-3.log b/src/test/ref/function-pointer-noarg-3.log index 0e91c44c4..835f8cab0 100644 --- a/src/test/ref/function-pointer-noarg-3.log +++ b/src/test/ref/function-pointer-noarg-3.log @@ -125,7 +125,7 @@ Alias (byte) main::i#1 = (byte) main::i#5 (byte) main::i#6 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#1 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [8] if((byte~) main::$0==(byte) 0) goto main::@4 +Simple Condition (bool~) main::$1 [7] if((byte~) main::$0==(byte) 0) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const void()*) main::f#0 = (void()*) 0 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/function-pointer-noarg-call-10.asm b/src/test/ref/function-pointer-noarg-call-10.asm index ad5c903e0..7119c727a 100644 --- a/src/test/ref/function-pointer-noarg-call-10.asm +++ b/src/test/ref/function-pointer-noarg-call-10.asm @@ -5,21 +5,25 @@ .label SCREEN = $400 .label idx = 7 __b1: + // idx = 0 lda #0 sta.z idx jsr main rts main: { + // do10(&hello) lda #hello sta.z do10.fn+1 jsr do10 + // do10(&world) lda #world sta.z do10.fn+1 jsr do10 + // } rts } // do10(void()* zp(2) fn) @@ -29,21 +33,26 @@ do10: { lda #0 sta.z i __b1: + // (*fn)() jsr bi_fn + // for( byte i: 0..9) inc.z i lda #$a cmp.z i bne __b1 + // } rts bi_fn: jmp (fn) } world: { + // print("world ") lda #msg sta.z print.msg+1 jsr print + // } rts msg: .text "world " .byte 0 @@ -53,22 +62,28 @@ print: { .label msg = 5 ldy #0 __b1: + // SCREEN[idx++] = msg[i++] lda (msg),y ldx.z idx sta SCREEN,x + // SCREEN[idx++] = msg[i++]; inc.z idx iny + // while(msg[i]) lda (msg),y cmp #0 bne __b1 + // } rts } hello: { + // print("hello ") lda #msg sta.z print.msg+1 jsr print + // } rts msg: .text "hello " .byte 0 diff --git a/src/test/ref/function-pointer-noarg-call-2.asm b/src/test/ref/function-pointer-noarg-call-2.asm index 34dcc27f0..6e7d079a6 100644 --- a/src/test/ref/function-pointer-noarg-call-2.asm +++ b/src/test/ref/function-pointer-noarg-call-2.asm @@ -8,9 +8,12 @@ main: { lda #0 sta.z i __b2: + // ++i; inc.z i + // i&1 lda #1 and.z i + // if((i&1)==0) cmp #0 beq __b3 lda #fn1 sta.z f+1 __b4: + // (*f)() jsr bi_f jmp __b2 bi_f: @@ -31,11 +35,15 @@ main: { } fn2: { .label BGCOL = $d021 + // (*BGCOL)++; inc BGCOL + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } diff --git a/src/test/ref/function-pointer-noarg-call-2.log b/src/test/ref/function-pointer-noarg-call-2.log index 80a309818..26c58a0bf 100644 --- a/src/test/ref/function-pointer-noarg-call-2.log +++ b/src/test/ref/function-pointer-noarg-call-2.log @@ -119,7 +119,7 @@ Alias (byte) main::i#1 = (byte) main::i#5 (byte) main::i#6 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#1 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [8] if((byte~) main::$0==(byte) 0) goto main::@4 +Simple Condition (bool~) main::$1 [7] if((byte~) main::$0==(byte) 0) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const void()*) main::f#0 = (void()*) 0 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/function-pointer-noarg-call-3.asm b/src/test/ref/function-pointer-noarg-call-3.asm index 54e3aa3c0..1685d8847 100644 --- a/src/test/ref/function-pointer-noarg-call-3.asm +++ b/src/test/ref/function-pointer-noarg-call-3.asm @@ -8,9 +8,12 @@ main: { lda #0 sta.z i __b2: + // (*getfn(++i))(); inc.z i + // getfn(++i) lda.z i jsr getfn + // (*getfn(++i))() jsr bi___1 jmp __b2 bi___1: @@ -19,7 +22,9 @@ main: { // getfn(byte register(A) b) getfn: { .label return = 3 + // b&1 and #1 + // if((b&1)==0) cmp #0 beq __b1 lda #fn1 sta.z return+1 + // } rts } fn2: { .label BGCOL = $d021 + // (*BGCOL)++; inc BGCOL + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } diff --git a/src/test/ref/function-pointer-noarg-call-3.log b/src/test/ref/function-pointer-noarg-call-3.log index 9ec844d0e..cbc486c3d 100644 --- a/src/test/ref/function-pointer-noarg-call-3.log +++ b/src/test/ref/function-pointer-noarg-call-3.log @@ -142,7 +142,7 @@ Alias (void()*) getfn::return#3 = (void()*) getfn::return#5 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) getfn::b#1 (byte) getfn::b#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) getfn::$1 [15] if((byte~) getfn::$0==(byte) 0) goto getfn::@1 +Simple Condition (bool~) getfn::$1 [13] if((byte~) getfn::$0==(byte) 0) goto getfn::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const void()*) getfn::return#1 = &fn1 diff --git a/src/test/ref/function-pointer-noarg-call-4.asm b/src/test/ref/function-pointer-noarg-call-4.asm index 3fd2f4fe0..44c4a475e 100644 --- a/src/test/ref/function-pointer-noarg-call-4.asm +++ b/src/test/ref/function-pointer-noarg-call-4.asm @@ -5,14 +5,19 @@ main: { ldx #0 __b2: + // (*getfn(++i))(); inx + // getfn(++i) jsr getfn + // (*getfn(++i))() jsr fn1 jmp __b2 } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } getfn: { diff --git a/src/test/ref/function-pointer-noarg-call-4.log b/src/test/ref/function-pointer-noarg-call-4.log index 22d1be2a0..1d9aff707 100644 --- a/src/test/ref/function-pointer-noarg-call-4.log +++ b/src/test/ref/function-pointer-noarg-call-4.log @@ -105,7 +105,7 @@ Constant (const void()*) getfn::return#0 = getfn::return#1 Successful SSA optimization Pass2ConstantIdentification Constant (const void()*) main::$1 = getfn::return#0 Successful SSA optimization Pass2ConstantIdentification -Replacing constant pointer function [10] call fn1 +Replacing constant pointer function [8] call fn1 Successful SSA optimization Pass2ConstantCallPointerIdentification if() condition always true - replacing block destination [2] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs diff --git a/src/test/ref/function-pointer-noarg-call-5.asm b/src/test/ref/function-pointer-noarg-call-5.asm index 21320a04e..3fbcb2417 100644 --- a/src/test/ref/function-pointer-noarg-call-5.asm +++ b/src/test/ref/function-pointer-noarg-call-5.asm @@ -8,15 +8,19 @@ main: { lda #0 sta.z i __b2: + // f = fns[++i&1] inc.z i + // ++i&1 lda #1 and.z i + // f = fns[++i&1] asl tay lda fns,y sta.z f lda fns+1,y sta.z f+1 + // (*f)() jsr bi_f jmp __b2 bi_f: @@ -24,12 +28,16 @@ main: { } fn2: { .label BGCOL = $d021 + // (*BGCOL)++; inc BGCOL + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } fns: .word fn1, fn2 diff --git a/src/test/ref/function-pointer-noarg-call-6.asm b/src/test/ref/function-pointer-noarg-call-6.asm index 9d96ac43b..be47995f8 100644 --- a/src/test/ref/function-pointer-noarg-call-6.asm +++ b/src/test/ref/function-pointer-noarg-call-6.asm @@ -9,6 +9,7 @@ main: { lda #>$d800 sta.z cols+1 __b1: + // for(byte* cols = $d800; cols<$d800+1000;cols++) lda.z cols+1 cmp #>$d800+$3e8 bcc __b2 @@ -17,14 +18,18 @@ main: { cmp #<$d800+$3e8 bcc __b2 !: + // } rts __b2: + // (*cls)() jsr fn1 + // (*cols)++; ldy #0 lda (cols),y clc adc #1 sta (cols),y + // for(byte* cols = $d800; cols<$d800+1000;cols++) inc.z cols bne !+ inc.z cols+1 @@ -38,6 +43,7 @@ fn1: { lda #>$400 sta.z screen+1 __b1: + // for(byte* screen=$400;screen<$400+1000;screen++) lda.z screen+1 cmp #>$400+$3e8 bcc __b2 @@ -46,13 +52,16 @@ fn1: { cmp #<$400+$3e8 bcc __b2 !: + // } rts __b2: + // (*screen)++; ldy #0 lda (screen),y clc adc #1 sta (screen),y + // for(byte* screen=$400;screen<$400+1000;screen++) inc.z screen bne !+ inc.z screen+1 diff --git a/src/test/ref/function-pointer-noarg-call-6.log b/src/test/ref/function-pointer-noarg-call-6.log index 33f1ddda7..94293c3f1 100644 --- a/src/test/ref/function-pointer-noarg-call-6.log +++ b/src/test/ref/function-pointer-noarg-call-6.log @@ -93,12 +93,12 @@ Alias (byte*) fn1::screen#2 = (byte*) fn1::screen#3 Alias (byte*) main::cols#2 = (byte*) main::cols#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) fn1::$0 [3] if((byte*) fn1::screen#2<(word)(number) $400+(number) $3e8) goto fn1::@2 -Simple Condition (bool~) main::$0 [11] if((byte*) main::cols#2<(word)(number) $d800+(number) $3e8) goto main::@2 +Simple Condition (bool~) main::$0 [10] if((byte*) main::cols#2<(word)(number) $d800+(number) $3e8) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) fn1::screen#0 = (byte*) 1024 Constant (const byte*) main::cols#0 = (byte*) 55296 Successful SSA optimization Pass2ConstantIdentification -Replacing constant pointer function [13] call fn1 +Replacing constant pointer function [11] call fn1 Successful SSA optimization Pass2ConstantCallPointerIdentification Eliminating unused constant (const void()*) main::cls Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/function-pointer-noarg-call-7.asm b/src/test/ref/function-pointer-noarg-call-7.asm index 87dab2548..cf2b960b8 100644 --- a/src/test/ref/function-pointer-noarg-call-7.asm +++ b/src/test/ref/function-pointer-noarg-call-7.asm @@ -5,12 +5,15 @@ .label SCREEN = $400 .label idx = 3 __b1: + // idx = 0 lda #0 sta.z idx jsr main rts main: { + // do10(f) jsr do10 + // } rts } do10: { @@ -18,24 +21,31 @@ do10: { lda #0 sta.z i __b1: + // (*fn)() jsr hello + // for( byte i: 0..9) inc.z i lda #$a cmp.z i bne __b1 + // } rts } hello: { ldx #0 __b1: + // SCREEN[idx++] = msg[i++] lda msg,x ldy.z idx sta SCREEN,y + // SCREEN[idx++] = msg[i++]; inc.z idx inx + // while(msg[i]) lda msg,x cmp #0 bne __b1 + // } rts } msg: .text "hello " diff --git a/src/test/ref/function-pointer-noarg-call-8.asm b/src/test/ref/function-pointer-noarg-call-8.asm index 274330fe3..56d4caf6d 100644 --- a/src/test/ref/function-pointer-noarg-call-8.asm +++ b/src/test/ref/function-pointer-noarg-call-8.asm @@ -6,23 +6,30 @@ .label msg = 3 .label idx = 5 __b1: + // msg lda #<0 sta.z msg sta.z msg+1 + // idx = 0 sta.z idx jsr main rts main: { + // msg = msg1 lda #msg1 sta.z msg+1 + // do10(f) jsr do10 + // msg = msg2 lda #msg2 sta.z msg+1 + // do10(f) jsr do10 + // } rts } do10: { @@ -30,24 +37,31 @@ do10: { lda #0 sta.z i __b1: + // (*fn)() jsr hello + // for( byte i: 0..9) inc.z i lda #$a cmp.z i bne __b1 + // } rts } hello: { ldy #0 __b1: + // SCREEN[idx++] = msg[i++] lda (msg),y ldx.z idx sta SCREEN,x + // SCREEN[idx++] = msg[i++]; inc.z idx iny + // while(msg[i]) lda (msg),y cmp #0 bne __b1 + // } rts } msg1: .text "hello " diff --git a/src/test/ref/function-pointer-noarg-call-9.asm b/src/test/ref/function-pointer-noarg-call-9.asm index d0373db3c..168f1dcaf 100644 --- a/src/test/ref/function-pointer-noarg-call-9.asm +++ b/src/test/ref/function-pointer-noarg-call-9.asm @@ -5,22 +5,30 @@ .label SCREEN = $400 .label idx = 2 __bbegin: + // idx = 0 lda #0 sta.z idx jsr main rts main: { + // (*f)() jsr fn1 + // SCREEN[idx] = 'a' lda #'a' ldy.z idx sta SCREEN,y + // (*f)() jsr fn1 + // SCREEN[idx] = 'a' lda #'a' ldy.z idx sta SCREEN,y + // } rts } fn1: { + // idx++; inc.z idx + // } rts } diff --git a/src/test/ref/function-pointer-noarg-call.asm b/src/test/ref/function-pointer-noarg-call.asm index 59193aa18..6c0b6e9d7 100644 --- a/src/test/ref/function-pointer-noarg-call.asm +++ b/src/test/ref/function-pointer-noarg-call.asm @@ -3,11 +3,15 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // (*f)() jsr fn1 + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } diff --git a/src/test/ref/function-pointer-noarg.asm b/src/test/ref/function-pointer-noarg.asm index 061e7170e..4b6aff5a9 100644 --- a/src/test/ref/function-pointer-noarg.asm +++ b/src/test/ref/function-pointer-noarg.asm @@ -4,23 +4,32 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[0] = <(word)f lda #(word)f lda #>fn1 sta SCREEN+1 + // SCREEN[2] = <(word)f lda #(word)f lda #>fn2 sta SCREEN+3 + // } rts } fn2: { .label BGCOL = $d021 + // (*BGCOL)++; inc BGCOL + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } diff --git a/src/test/ref/function-pointer-return.asm b/src/test/ref/function-pointer-return.asm index 5f8ac12a2..13705e9c2 100644 --- a/src/test/ref/function-pointer-return.asm +++ b/src/test/ref/function-pointer-return.asm @@ -7,9 +7,12 @@ main: { .label f = 2 ldx #0 __b2: + // ++i; inx + // i&1 txa and #1 + // if((i&1)==0) cmp #0 beq __b3 lda #fn1 sta.z f+1 __b4: + // (byte)f lda.z f + // SCREEN[0] = (byte)f sta SCREEN jmp __b2 } fn2: { .label BGCOL = $d021 + // (*BGCOL)++; inc BGCOL + // } rts } fn1: { .label BORDERCOL = $d020 + // (*BORDERCOL)++; inc BORDERCOL + // } rts } diff --git a/src/test/ref/function-pointer-return.log b/src/test/ref/function-pointer-return.log index 24a9fa344..142d71a81 100644 --- a/src/test/ref/function-pointer-return.log +++ b/src/test/ref/function-pointer-return.log @@ -146,7 +146,7 @@ Alias (byte) fn2::return#0 = (byte) fn2::return#2 (byte) fn2::return#1 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#1 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [8] if((byte~) main::$0==(byte) 0) goto main::@4 +Simple Condition (bool~) main::$1 [7] if((byte~) main::$0==(byte) 0) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte()*) main::f#0 = (byte()*) 0 Constant (const byte) main::i#0 = 0 @@ -155,7 +155,7 @@ Constant (const byte()*) main::f#2 = &fn2 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [3] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Simplifying expression containing zero main::SCREEN in [15] *((const byte*) main::SCREEN + (byte) 0) ← (byte~) main::$2 +Simplifying expression containing zero main::SCREEN in [12] *((const byte*) main::SCREEN + (byte) 0) ← (byte~) main::$2 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) fn1::return#0 and assignment [9] (byte) fn1::return#0 ← *((const byte*) fn1::BORDERCOL) Eliminating unused variable (byte) fn2::return#0 and assignment [12] (byte) fn2::return#0 ← *((const byte*) fn2::BGCOL) diff --git a/src/test/ref/gfxbank.asm b/src/test/ref/gfxbank.asm index 54c84cffb..d5f15db41 100644 --- a/src/test/ref/gfxbank.asm +++ b/src/test/ref/gfxbank.asm @@ -8,9 +8,12 @@ .label CIA2_PORT_A_DDR = $dd02 main: { .const vicSelectGfxBank1_toDd001_return = 3 + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // } rts } diff --git a/src/test/ref/global-pc-multiple.asm b/src/test/ref/global-pc-multiple.asm index 2cab2e153..7744f0788 100644 --- a/src/test/ref/global-pc-multiple.asm +++ b/src/test/ref/global-pc-multiple.asm @@ -5,20 +5,26 @@ .label BGCOL = $d021 .label RASTER = $d012 main: { + // asm sei __b1: + // if(*RASTER<30) lda RASTER cmp #$1e bcc __b2 + // *BGCOL = 0 lda #0 sta BGCOL jmp __b1 __b2: + // incScreen() jsr incScreen jmp __b1 } incScreen: { + // *BGCOL = *RASTER lda RASTER sta BGCOL + // } rts } diff --git a/src/test/ref/global-pc.asm b/src/test/ref/global-pc.asm index 56f1c96a2..a8070f7ee 100644 --- a/src/test/ref/global-pc.asm +++ b/src/test/ref/global-pc.asm @@ -5,9 +5,12 @@ .label BGCOL = $d021 .label RASTER = $d012 main: { + // asm sei __b1: + // col = *RASTER lda RASTER + // *BGCOL = col sta BGCOL jmp __b1 } diff --git a/src/test/ref/halfscii.asm b/src/test/ref/halfscii.asm index cb83c4556..06148ccfa 100644 --- a/src/test/ref/halfscii.asm +++ b/src/test/ref/halfscii.asm @@ -14,7 +14,9 @@ main: { .label chargen1 = 6 .label charset4 = 4 .label chargen = 2 + // asm sei + // *PROCPORT = $32 lda #$32 sta PROCPORT lda #CHARGEN sta.z chargen+1 __b1: + // chargen1 = chargen+1 lda.z chargen clc adc #1 @@ -33,20 +36,28 @@ main: { lda.z chargen+1 adc #0 sta.z chargen1+1 + // *chargen & %01100000 lda #$60 ldy #0 and (chargen),y sta.z __1 + // *chargen1 & %01100000 lda #$60 and (chargen1),y + // (*chargen1 & %01100000)/4 lsr lsr + // (*chargen & %01100000) | (*chargen1 & %01100000)/4 ora.z __1 + // ((*chargen & %01100000) | (*chargen1 & %01100000)/4)/2 + lsr + // ((*chargen & %01100000) | (*chargen1 & %01100000)/4)/2/4 lsr lsr - lsr + // bits = bits_count[((*chargen & %01100000) | (*chargen1 & %01100000)/4)/2/4] tay lda bits_count,y + // if(bits>=2) cmp #2 bcc b1 lda #1 @@ -54,68 +65,98 @@ main: { b1: lda #0 __b2: + // bits_gen = bits_gen*2 asl tax + // *chargen & %00011000 lda #$18 ldy #0 and (chargen),y sta.z __11 + // *chargen1 & %00011000 lda #$18 and (chargen1),y + // (*chargen1 & %00011000)/4 lsr lsr + // (*chargen & %00011000) | (*chargen1 & %00011000)/4 ora.z __11 + // ((*chargen & %00011000) | (*chargen1 & %00011000)/4)/2 lsr + // bits = bits_count[((*chargen & %00011000) | (*chargen1 & %00011000)/4)/2] tay lda bits_count,y + // if(bits>=2) cmp #2 bcc __b3 + // bits_gen = bits_gen + 1 inx __b3: + // bits_gen = bits_gen*2 txa asl tax + // *chargen & %00000110 lda #6 ldy #0 and (chargen),y + // (*chargen & %00000110)*2 asl sta.z __21 + // *chargen1 & %00000110 lda #6 and (chargen1),y + // (*chargen1 & %00000110)/2 lsr + // (*chargen & %00000110)*2 | (*chargen1 & %00000110)/2 ora.z __21 + // bits = bits_count[((*chargen & %00000110)*2 | (*chargen1 & %00000110)/2)] tay lda bits_count,y + // if(bits>=2) cmp #2 bcc __b4 + // bits_gen = bits_gen + 1 inx __b4: + // bits_gen = bits_gen*2 txa asl tax + // *chargen & %00000001 lda #1 ldy #0 and (chargen),y + // (*chargen & %00000001)*4 asl asl sta.z __30 + // *chargen1 & %00000001 lda #1 and (chargen1),y + // (*chargen & %00000001)*4 | (*chargen1 & %00000001) ora.z __30 + // bits = bits_count[((*chargen & %00000001)*4 | (*chargen1 & %00000001))] tay lda bits_count,y + // if(bits>=2) cmp #2 bcc __b5 + // bits_gen = bits_gen + 1 inx __b5: + // bits_gen = bits_gen*2 txa asl + // *charset4 = bits_gen ldy #0 sta (charset4),y + // charset4++; inc.z charset4 bne !+ inc.z charset4+1 !: + // chargen = chargen+2 lda #2 clc adc.z chargen @@ -123,6 +164,7 @@ main: { bcc !+ inc.z chargen+1 !: + // while (chargenCHARGEN+$800 bcs !__b1+ @@ -135,18 +177,24 @@ main: { jmp __b1 !__b1: !: + // *PROCPORT = $37 lda #$37 sta PROCPORT + // asm cli ldx #0 __b11: + // SCREEN[i] = i txa sta SCREEN,x + // for(byte i : 0..255) inx cpx #0 bne __b11 + // *D018 = $19 lda #$19 sta D018 + // } rts } bits_count: .byte 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 diff --git a/src/test/ref/halfscii.log b/src/test/ref/halfscii.log index fd52d5b43..ce1279c46 100644 --- a/src/test/ref/halfscii.log +++ b/src/test/ref/halfscii.log @@ -480,14 +480,14 @@ Alias (byte*) main::chargen#10 = (byte*) main::chargen#3 (byte*) main::chargen#2 Alias (byte*) main::chargen1#0 = (byte*) main::chargen1#1 (byte*) main::chargen1#2 (byte*) main::chargen1#3 Alias (byte*) main::charset4#10 = (byte*) main::charset4#7 (byte*) main::charset4#5 (byte*) main::charset4#3 (byte*) main::charset4#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$8 [17] if((byte) main::bits#0<(byte) 2) goto main::@2 -Simple Condition (bool~) main::$17 [29] if((byte) main::bits#1<(byte) 2) goto main::@3 -Simple Condition (bool~) main::$26 [44] if((byte) main::bits#2<(byte) 2) goto main::@4 -Simple Condition (bool~) main::$34 [58] if((byte) main::bits#3<(byte) 2) goto main::@5 -Simple Condition (bool~) main::$39 [71] if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1 -Simple Condition (bool~) main::$40 [82] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@11 +Simple Condition (bool~) main::$8 [15] if((byte) main::bits#0<(byte) 2) goto main::@2 +Simple Condition (bool~) main::$17 [25] if((byte) main::bits#1<(byte) 2) goto main::@3 +Simple Condition (bool~) main::$26 [36] if((byte) main::bits#2<(byte) 2) goto main::@4 +Simple Condition (bool~) main::$34 [46] if((byte) main::bits#3<(byte) 2) goto main::@5 +Simple Condition (bool~) main::$39 [55] if((byte*) main::chargen#1<(byte*~) main::$38) goto main::@1 +Simple Condition (bool~) main::$40 [64] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@11 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [69] (byte*~) main::$38 ← (const byte*) CHARGEN + (word) $800 +Constant right-side identified [53] (byte*~) main::$38 ← (const byte*) CHARGEN + (word) $800 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::chargen#0 = CHARGEN Constant (const byte*) main::charset4#0 = CHARSET4 @@ -495,9 +495,9 @@ Constant (const byte) main::bits_gen#0 = 0 Constant (const byte*) main::$38 = CHARGEN+$800 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [80] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [82] if(main::i#1!=rangelast(0,$ff)) goto main::@11 to (number) 0 -Simplifying expression containing zero 1 in [31] (byte) main::bits_gen#2 ← (const byte) main::bits_gen#0 + (byte) 1 +Resolved ranged next value [62] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [64] if(main::i#1!=rangelast(0,$ff)) goto main::@11 to (number) 0 +Simplifying expression containing zero 1 in [26] (byte) main::bits_gen#2 ← (const byte) main::bits_gen#0 + (byte) 1 Successful SSA optimization PassNSimplifyExpressionWithZero Adding number conversion cast (unumber) 0 in if((byte) main::i#1!=(number) 0) goto main::@11 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/helloworld0.asm b/src/test/ref/helloworld0.asm index 5e3c52c6c..dab6d0afc 100644 --- a/src/test/ref/helloworld0.asm +++ b/src/test/ref/helloworld0.asm @@ -6,11 +6,14 @@ main: { ldx #0 __b1: + // SCREEN[i] = msg[i] lda msg,x sta SCREEN,x + // for( byte i: 0..11) inx cpx #$c bne __b1 + // } rts } msg: .text "hello world!" diff --git a/src/test/ref/helloworld2-inline.asm b/src/test/ref/helloworld2-inline.asm index bb912df46..fa6a84479 100644 --- a/src/test/ref/helloworld2-inline.asm +++ b/src/test/ref/helloworld2-inline.asm @@ -7,28 +7,37 @@ main: { ldx #0 ldy #0 print21___b1: + // for(byte i=0; msg[i]; i++) lda #0 cmp hello,y bne print21___b2 tax tay print22___b1: + // for(byte i=0; msg[i]; i++) lda #0 cmp hello,y bne print22___b2 + // } rts print22___b2: + // at[j] = msg[i] lda hello,y sta print22_at,x + // j += 2 inx inx + // for(byte i=0; msg[i]; i++) iny jmp print22___b1 print21___b2: + // at[j] = msg[i] lda hello,y sta screen,x + // j += 2 inx inx + // for(byte i=0; msg[i]; i++) iny jmp print21___b1 hello: .text "hello world!" diff --git a/src/test/ref/helloworld2-inline.log b/src/test/ref/helloworld2-inline.log index 902d16a61..3af7028de 100644 --- a/src/test/ref/helloworld2-inline.log +++ b/src/test/ref/helloworld2-inline.log @@ -183,10 +183,10 @@ Identical Phi Values (byte*) main::print21_at#1 (byte*) main::print21_at#0 Identical Phi Values (byte*) main::print22_msg#1 (byte*) main::print22_msg#0 Identical Phi Values (byte*) main::print22_at#1 (byte*) main::print22_at#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::print21_$0 [7] if((byte) 0!=*((byte*) main::print21_msg#0 + (byte) main::print21_i#2)) goto main::print21_@2 -Simple Condition (bool~) main::print22_$0 [20] if((byte) 0!=*((byte*) main::print22_msg#0 + (byte) main::print22_i#2)) goto main::print22_@2 +Simple Condition (bool~) main::print21_$0 [6] if((byte) 0!=*((byte*) main::print21_msg#0 + (byte) main::print21_i#2)) goto main::print21_@2 +Simple Condition (bool~) main::print22_$0 [16] if((byte) 0!=*((byte*) main::print22_msg#0 + (byte) main::print22_i#2)) goto main::print22_@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [12] (byte*) main::print22_at#0 ← (const byte*) screen + (byte) $50 +Constant right-side identified [10] (byte*) main::print22_at#0 ← (const byte*) screen + (byte) $50 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::print21_at#0 = screen Constant (const byte*) main::print21_msg#0 = main::hello diff --git a/src/test/ref/helloworld2.asm b/src/test/ref/helloworld2.asm index 9ad1e54b9..d85ece932 100644 --- a/src/test/ref/helloworld2.asm +++ b/src/test/ref/helloworld2.asm @@ -3,16 +3,19 @@ .pc = $80d "Program" .label screen = $400 main: { + // print2(screen, hello) lda #screen sta.z print2.at+1 jsr print2 + // print2(screen+80, hello) lda #screen+$50 sta.z print2.at+1 jsr print2 + // } rts hello: .text "hello world!" .byte 0 @@ -23,15 +26,20 @@ print2: { ldy #0 ldx #0 __b1: + // for(byte i=0; msg[i]; i++) lda main.hello,x cmp #0 bne __b2 + // } rts __b2: + // at[j] = msg[i] lda main.hello,x sta (at),y + // j += 2 iny iny + // for(byte i=0; msg[i]; i++) inx jmp __b1 } diff --git a/src/test/ref/helloworld2.log b/src/test/ref/helloworld2.log index 55e7832c9..c850b8c17 100644 --- a/src/test/ref/helloworld2.log +++ b/src/test/ref/helloworld2.log @@ -125,7 +125,7 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) print2::msg#2 (byte*) print2::msg#4 Identical Phi Values (byte*) print2::at#2 (byte*) print2::at#4 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print2::$0 [13] if((byte) 0!=*((byte*) print2::msg#4 + (byte) print2::i#2)) goto print2::@2 +Simple Condition (bool~) print2::$0 [12] if((byte) 0!=*((byte*) print2::msg#4 + (byte) print2::i#2)) goto print2::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [3] (byte*) print2::at#1 ← (const byte*) screen + (byte) $50 Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/hex2dec-ptrptr.asm b/src/test/ref/hex2dec-ptrptr.asm index 348cbfcac..9ea1a89c3 100644 --- a/src/test/ref/hex2dec-ptrptr.asm +++ b/src/test/ref/hex2dec-ptrptr.asm @@ -3,7 +3,9 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // cls() jsr cls + // utoa16w(00000, screen) lda #<$400 sta.z utoa16w.dst lda #>$400 @@ -12,6 +14,7 @@ main: { sta.z utoa16w.value sta.z utoa16w.value+1 jsr utoa16w + // utoa16w(01234, screen) lda #<$400+$28 sta.z utoa16w.dst lda #>$400+$28 @@ -21,6 +24,7 @@ main: { lda #>$4d2 sta.z utoa16w.value+1 jsr utoa16w + // utoa16w(05678, screen) lda #<$400+$28+$28 sta.z utoa16w.dst lda #>$400+$28+$28 @@ -30,6 +34,7 @@ main: { lda #>$162e sta.z utoa16w.value+1 jsr utoa16w + // utoa16w(09999, screen) lda #<$400+$28+$28+$28 sta.z utoa16w.dst lda #>$400+$28+$28+$28 @@ -39,6 +44,7 @@ main: { lda #>$270f sta.z utoa16w.value+1 jsr utoa16w + // utoa16w(58888, screen) lda #<$400+$28+$28+$28+$28 sta.z utoa16w.dst lda #>$400+$28+$28+$28+$28 @@ -48,6 +54,7 @@ main: { lda #>$e608 sta.z utoa16w.value+1 jsr utoa16w + // } rts } // Hexadecimal utoa() for an unsigned int (16bits) @@ -55,40 +62,57 @@ main: { utoa16w: { .label dst = 4 .label value = 2 + // >value lda.z value+1 + // utoa16n((>value)>>4, &dst, started) lsr lsr lsr lsr ldx #0 jsr utoa16n + // utoa16n((>value)>>4, &dst, started) + // started = utoa16n((>value)>>4, &dst, started) + // >value lda.z value+1 + // utoa16n((>value)&0x0f, &dst, started) and #$f jsr utoa16n + // utoa16n((>value)&0x0f, &dst, started) + // started = utoa16n((>value)&0x0f, &dst, started) + // >4, &dst, started) lsr lsr lsr lsr jsr utoa16n + // screen sta.z sc+1 __b1: + // *sc=' ' lda #' ' ldy #0 sta (sc),y + // for( unsigned char *sc: screen..screen+999) inc.z sc bne !+ inc.z sc+1 @@ -125,6 +153,7 @@ cls: { lda.z sc cmp #>1 lda raster lsr + // rst = (*control&0x80)|(*raster>>1) ora.z __1 + // while (rst!=0x30) cmp #$30 bne __b1 + // *bordercol = 1 lda #1 sta bordercol + // time_start = *raster lda raster sta.z time_start + // utoa16w(00000, screen) lda #<$400 sta.z utoa16w.dst lda #>$400 @@ -31,7 +40,9 @@ main: { sta.z utoa16w.value sta.z utoa16w.value+1 jsr utoa16w + // (*bordercol)++; inc bordercol + // utoa16w(01234, screen) lda #<$400+$28 sta.z utoa16w.dst lda #>$400+$28 @@ -41,7 +52,9 @@ main: { lda #>$4d2 sta.z utoa16w.value+1 jsr utoa16w + // (*bordercol)++; inc bordercol + // utoa16w(05678, screen) lda #<$400+$28+$28 sta.z utoa16w.dst lda #>$400+$28+$28 @@ -51,7 +64,9 @@ main: { lda #>$162e sta.z utoa16w.value+1 jsr utoa16w + // (*bordercol)++; inc bordercol + // utoa16w(09999, screen) lda #<$400+$28+$28+$28 sta.z utoa16w.dst lda #>$400+$28+$28+$28 @@ -61,7 +76,9 @@ main: { lda #>$270f sta.z utoa16w.value+1 jsr utoa16w + // (*bordercol)++; inc bordercol + // utoa16w(58888, screen) lda #<$400+$28+$28+$28+$28 sta.z utoa16w.dst lda #>$400+$28+$28+$28+$28 @@ -71,25 +88,32 @@ main: { lda #>$e608 sta.z utoa16w.value+1 jsr utoa16w + // time_end = *raster ldx raster + // *bordercol = 0 lda #0 sta bordercol + // time = time_end - time_start txa sec sbc.z time_start + // utoa10w((unsigned int)time, screen+80) sta.z utoa10w.value lda #0 sta.z utoa10w.value+1 jsr utoa10w ldx #0 __b3: + // for( byte i=0; msg[i]!=0; i++ ) lda msg,x cmp #0 bne __b4 jmp __b1 __b4: + // (screen+80+3)[i] = msg[i] lda msg,x sta $400+$28+$28+$28+$28+$50+3,x + // for( byte i=0; msg[i]!=0; i++ ) inx jmp __b3 msg: .text "raster lines" @@ -111,8 +135,10 @@ utoa10w: { sta.z digit tax __b1: + // value>=UTOA10_SUB[i] txa asl + // while(value>=UTOA10_SUB[i]) tay lda UTOA10_SUB+1,y cmp.z value+1 @@ -122,17 +148,22 @@ utoa10w: { beq __b2 !: bcc __b2 + // i&1 txa and #1 + // if((i&1)!=0) cmp #0 beq __b6 + // if(bStarted!=0) lda.z bStarted cmp #0 beq __b7 + // *dst++ = DIGITS[digit] ldy.z digit lda DIGITS,y ldy #0 sta (dst),y + // *dst++ = DIGITS[digit]; inc.z dst bne !+ inc.z dst+1 @@ -141,27 +172,35 @@ utoa10w: { lda #0 sta.z digit __b6: + // for( unsigned char i: 0..7) inx cpx #8 bne __b1 + // (unsigned char) value lda.z value + // *dst++ = DIGITS[(unsigned char) value] tay lda DIGITS,y ldy #0 sta (dst),y + // *dst++ = DIGITS[(unsigned char) value]; inc.z dst bne !+ inc.z dst+1 !: + // *dst = 0 lda #0 tay sta (dst),y + // } rts __b2: + // digit += UTOA10_VAL[i] lda UTOA10_VAL,x clc adc.z digit sta.z digit + // value -= UTOA10_SUB[i] txa asl tay @@ -181,40 +220,57 @@ utoa10w: { utoa16w: { .label dst = 8 .label value = 2 + // >value lda.z value+1 + // utoa16n((>value)>>4, &dst, started) lsr lsr lsr lsr ldx #0 jsr utoa16n + // utoa16n((>value)>>4, &dst, started) + // started = utoa16n((>value)>>4, &dst, started) + // >value lda.z value+1 + // utoa16n((>value)&0x0f, &dst, started) and #$f jsr utoa16n + // utoa16n((>value)&0x0f, &dst, started) + // started = utoa16n((>value)&0x0f, &dst, started) + // >4, &dst, started) lsr lsr lsr lsr jsr utoa16n + // screen sta.z sc+1 __b1: + // *sc=' ' lda #' ' ldy #0 sta (sc),y + // for( unsigned char *sc: screen..screen+999) inc.z sc bne !+ inc.z sc+1 @@ -251,6 +311,7 @@ cls: { lda.z sc cmp #=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@3 -Simple Condition (bool~) utoa10w::$4 [85] if((byte~) utoa10w::$2==(byte) 0) goto utoa10w::@10 -Simple Condition (bool~) utoa10w::$7 [89] if((byte) utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2 -Simple Condition (bool~) utoa10w::$6 [93] if((byte) utoa10w::bStarted#2==(byte) 0) goto utoa10w::@11 -Simple Condition (bool~) utoa16n::$1 [149] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@1 -Simple Condition (bool~) utoa16n::$3 [153] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@2 +Simple Condition (bool~) main::$4 [7] if((byte) main::rst#0!=(byte) $30) goto main::@4 +Simple Condition (bool~) main::$18 [43] if(*((const byte*) main::msg + (byte) main::i#2)!=(byte) 0) goto main::@7 +Simple Condition (bool~) cls::$1 [55] if((byte*) cls::sc#1!=rangelast(cls::screen,cls::$0)) goto cls::@1 +Simple Condition (bool~) utoa10w::$1 [64] if((word) utoa10w::value#10>=*((const word*) UTOA10_SUB + (byte~) utoa10w::$8)) goto utoa10w::@3 +Simple Condition (bool~) utoa10w::$4 [71] if((byte~) utoa10w::$2==(byte) 0) goto utoa10w::@10 +Simple Condition (bool~) utoa10w::$7 [75] if((byte) utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2 +Simple Condition (bool~) utoa10w::$6 [77] if((byte) utoa10w::bStarted#2==(byte) 0) goto utoa10w::@11 +Simple Condition (bool~) utoa16n::$1 [120] if((byte) utoa16n::nybble#4==(byte) 0) goto utoa16n::@1 +Simple Condition (bool~) utoa16n::$3 [123] if((byte) utoa16n::return#4==(byte) 0) goto utoa16n::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [60] (byte*~) cls::$0 ← (const byte*) cls::screen + (word) $3e7 +Constant right-side identified [49] (byte*~) cls::$0 ← (const byte*) cls::screen + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::screen#0 = (byte*) 1024 Constant (const word) utoa16w::value#0 = 0 @@ -799,10 +799,10 @@ Constant (const byte) utoa16n::started#0 = utoa16w::started#0 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [2] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [64] cls::sc#1 ← ++ cls::sc#2 to ++ -Resolved ranged comparison value [66] if(cls::sc#1!=rangelast(cls::screen,cls::$0)) goto cls::@1 to (byte*)(const byte*) cls::$0+(number) 1 -Resolved ranged next value [87] utoa10w::i#1 ← ++ utoa10w::i#2 to ++ -Resolved ranged comparison value [89] if(utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2 to (number) 8 +Resolved ranged next value [53] cls::sc#1 ← ++ cls::sc#2 to ++ +Resolved ranged comparison value [55] if(cls::sc#1!=rangelast(cls::screen,cls::$0)) goto cls::@1 to (byte*)(const byte*) cls::$0+(number) 1 +Resolved ranged next value [73] utoa10w::i#1 ← ++ utoa10w::i#2 to ++ +Resolved ranged comparison value [75] if(utoa10w::i#1!=rangelast(0,7)) goto utoa10w::@2 to (number) 8 Eliminating unused variable (byte) utoa16w::started#3 and assignment [81] (byte) utoa16w::started#3 ← (byte) utoa16n::return#2 Eliminating unused variable (byte) utoa16n::return#3 and assignment [85] (byte) utoa16n::return#3 ← (byte) utoa16n::return#4 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/ifmin.asm b/src/test/ref/ifmin.asm index c9c848814..40fecb7b0 100644 --- a/src/test/ref/ifmin.asm +++ b/src/test/ref/ifmin.asm @@ -6,12 +6,16 @@ main: { ldx #0 __b1: + // if(i<50) cpx #$32 bcs __b2 + // *SCREEN = i stx SCREEN __b2: + // while(++i<100) inx cpx #$64 bcc __b1 + // } rts } diff --git a/src/test/ref/ifmin.log b/src/test/ref/ifmin.log index 925c1d794..b452f5708 100644 --- a/src/test/ref/ifmin.log +++ b/src/test/ref/ifmin.log @@ -72,8 +72,8 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [4] if((byte) main::i#2>=(byte) $32) goto main::@2 -Simple Condition (bool~) main::$2 [8] if((byte) main::i#1<(byte) $64) goto main::@1 +Simple Condition (bool~) main::$1 [3] if((byte) main::i#2>=(byte) $32) goto main::@2 +Simple Condition (bool~) main::$2 [6] if((byte) main::i#1<(byte) $64) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/immzero.asm b/src/test/ref/immzero.asm index f98830a74..d5d92c11f 100644 --- a/src/test/ref/immzero.asm +++ b/src/test/ref/immzero.asm @@ -9,6 +9,7 @@ main: { sta.z w sta.z w+1 __b1: + // w = w + j txa clc adc.z w @@ -16,8 +17,10 @@ main: { bcc !+ inc.z w+1 !: + // for ( byte j : 0..10) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/immzero.log b/src/test/ref/immzero.log index fccc3c03d..907073bc9 100644 --- a/src/test/ref/immzero.log +++ b/src/test/ref/immzero.log @@ -51,13 +51,13 @@ Simplifying constant integer cast 0 Successful SSA optimization PassNCastSimplification Alias (word) main::w#1 = (word~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [7] if((byte) main::j#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [6] if((byte) main::j#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) main::w#0 = 0 Constant (const byte) main::j#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [5] main::j#1 ← ++ main::j#2 to ++ -Resolved ranged comparison value [7] if(main::j#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [4] main::j#1 ← ++ main::j#2 to ++ +Resolved ranged comparison value [6] if(main::j#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::j#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/importing.asm b/src/test/ref/importing.asm index 00f39606b..ed3234368 100644 --- a/src/test/ref/importing.asm +++ b/src/test/ref/importing.asm @@ -5,9 +5,12 @@ .const RED = 2 main: { .label screen = $400 + // *screen = 1 lda #1 sta screen + // *BGCOL = RED lda #RED sta BGCOL + // } rts } diff --git a/src/test/ref/incd020.asm b/src/test/ref/incd020.asm index 8d0ea512d..0c2b97231 100644 --- a/src/test/ref/incd020.asm +++ b/src/test/ref/incd020.asm @@ -6,7 +6,9 @@ .label BGCOL = $d020 main: { __b1: + // ++*BGCOL; inc BGCOL + // (*BGCOL)--; dec BGCOL jmp __b1 } diff --git a/src/test/ref/incrementinarray.asm b/src/test/ref/incrementinarray.asm index 2d4510245..a4ccc7d23 100644 --- a/src/test/ref/incrementinarray.asm +++ b/src/test/ref/incrementinarray.asm @@ -4,6 +4,7 @@ .label print_char_cursor = 4 .label print_line_cursor = 6 main: { + // print_cls() jsr print_cls ldx #0 lda #<$400 @@ -15,15 +16,20 @@ main: { lda #>$400 sta.z print_char_cursor+1 __b1: + // print_str(txt) jsr print_str + // print_ln() jsr print_ln + // txt[1]++; lda txt+1 clc adc #1 sta txt+1 + // for ( byte i: 0..10) inx cpx #$b bne __b4 + // } rts __b4: lda.z print_line_cursor @@ -35,6 +41,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -42,6 +49,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursortxt sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -82,7 +95,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -97,17 +112,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #max) sta.z $ff cpy.z $ff bcs __b4 tay __b4: + // SCREEN[0] = min stx SCREEN + // SCREEN[1] = max sty SCREEN+1 + // SCREEN[2] = pos sta SCREEN+2 jmp __b2 } diff --git a/src/test/ref/infloop-error.log b/src/test/ref/infloop-error.log index 6a98d3aa6..5326456bc 100644 --- a/src/test/ref/infloop-error.log +++ b/src/test/ref/infloop-error.log @@ -140,8 +140,8 @@ Alias candidate removed (phi-usage) (byte) main::pos#1 = (byte) main::pos#3 (byt Identical Phi Values (byte) main::pos#3 (byte) main::pos#1 Identical Phi Values (byte) main::pos#5 (byte) main::pos#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [9] if((byte) main::pos#1>=(byte) main::min#2) goto main::@4 -Simple Condition (bool~) main::$3 [13] if((byte) main::pos#1<=(byte) main::max#2) goto main::@5 +Simple Condition (bool~) main::$1 [7] if((byte) main::pos#1>=(byte) main::min#2) goto main::@4 +Simple Condition (bool~) main::$3 [10] if((byte) main::pos#1<=(byte) main::max#2) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::min#0 = $ff Constant (const byte) main::max#0 = 0 @@ -149,7 +149,7 @@ Constant (const byte) main::pos#0 = 0 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [4] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Simplifying expression containing zero SCREEN in [17] *((const byte*) SCREEN + (byte) 0) ← (byte) main::min#3 +Simplifying expression containing zero SCREEN in [12] *((const byte*) SCREEN + (byte) 0) ← (byte) main::min#3 Successful SSA optimization PassNSimplifyExpressionWithZero Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/init-volatiles.asm b/src/test/ref/init-volatiles.asm index 30a1def8e..1bfe157b4 100644 --- a/src/test/ref/init-volatiles.asm +++ b/src/test/ref/init-volatiles.asm @@ -4,17 +4,21 @@ .pc = $80d "Program" .label x = 2 __bbegin: + // x = 12 lda #$c sta.z x jsr main rts main: { __b1: + // while(++x<50) inc.z x lda.z x cmp #$32 bcc __b1 + // x = 0 lda #0 sta.z x + // } rts } diff --git a/src/test/ref/initializer-0.asm b/src/test/ref/initializer-0.asm index a3ec33d5c..fa297518b 100644 --- a/src/test/ref/initializer-0.asm +++ b/src/test/ref/initializer-0.asm @@ -8,12 +8,16 @@ main: { ldx #0 ldy #0 __b1: + // SCREEN[idx++] = chars[i] lda chars,y sta SCREEN,x + // SCREEN[idx++] = chars[i]; inx + // for( char i: 0..2) iny cpy #3 bne __b1 + // } rts } chars: .byte 1, 2, 3 diff --git a/src/test/ref/initializer-1.asm b/src/test/ref/initializer-1.asm index a73276960..d29f54bf6 100644 --- a/src/test/ref/initializer-1.asm +++ b/src/test/ref/initializer-1.asm @@ -10,19 +10,27 @@ main: { txa sta.z i __b1: + // words[i] lda words+1,y + // SCREEN[idx++] = >words[i] sta SCREEN,x + // SCREEN[idx++] = >words[i]; inx + // for( char i: 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } words: .word 1, 2, 3 diff --git a/src/test/ref/initializer-2.asm b/src/test/ref/initializer-2.asm index 209d42ea2..7ee0d0d77 100644 --- a/src/test/ref/initializer-2.asm +++ b/src/test/ref/initializer-2.asm @@ -11,19 +11,25 @@ main: { tya sta.z i __b1: + // SCREEN[idx++] = points[i].x lda.z i asl tax lda points,x sta SCREEN,y + // SCREEN[idx++] = points[i].x; iny + // SCREEN[idx++] = points[i].y lda points+OFFSET_STRUCT_POINT_Y,x sta SCREEN,y + // SCREEN[idx++] = points[i].y; iny + // for( char i: 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } points: .byte 1, 2, 3, 4, 5, 6 diff --git a/src/test/ref/initializer-3.asm b/src/test/ref/initializer-3.asm index d306fd9ac..4a6c4866f 100644 --- a/src/test/ref/initializer-3.asm +++ b/src/test/ref/initializer-3.asm @@ -12,6 +12,7 @@ main: { sta.z idx tax __b1: + // SCREEN[idx++] = points[i].x txa asl stx.z $ff @@ -22,20 +23,29 @@ main: { lda points,y ldy.z idx sta SCREEN,y + // SCREEN[idx++] = points[i].x; inc.z idx + // points[i].y ldy.z __4 lda points+OFFSET_STRUCT_POINT_Y+1,y + // SCREEN[idx++] = >points[i].y ldy.z idx sta SCREEN,y + // SCREEN[idx++] = >points[i].y; inc.z idx + // for( char i: 0..2) inx cpx #3 bne __b1 + // } rts } points: .byte 1 diff --git a/src/test/ref/inline-asm-clobber-none.asm b/src/test/ref/inline-asm-clobber-none.asm index 56c712afb..1f175cbe6 100644 --- a/src/test/ref/inline-asm-clobber-none.asm +++ b/src/test/ref/inline-asm-clobber-none.asm @@ -9,6 +9,7 @@ main: { __b2: ldy #0 __b3: + // asm pha txa pha @@ -20,15 +21,19 @@ main: { pla tax pla + // for( byte k:0..10) iny cpy #$b bne __b3 + // for( byte j:0..10) inx cpx #$b bne __b2 + // for( byte i:0..10) clc adc #1 cmp #$b bne __b1 + // } rts } diff --git a/src/test/ref/inline-asm-clobber-none.log b/src/test/ref/inline-asm-clobber-none.log index 09ffc3ec4..5e301e57b 100644 --- a/src/test/ref/inline-asm-clobber-none.log +++ b/src/test/ref/inline-asm-clobber-none.log @@ -93,8 +93,8 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte) main::i#5 (byte) main::i#6 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [9] if((byte) main::k#1!=rangelast(0,$a)) goto main::@3 -Simple Condition (bool~) main::$1 [13] if((byte) main::j#1!=rangelast(0,$a)) goto main::@2 -Simple Condition (bool~) main::$2 [17] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [12] if((byte) main::j#1!=rangelast(0,$a)) goto main::@2 +Simple Condition (bool~) main::$2 [15] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#0 = 0 @@ -102,10 +102,10 @@ Constant (const byte) main::k#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [7] main::k#1 ← ++ main::k#2 to ++ Resolved ranged comparison value [9] if(main::k#1!=rangelast(0,$a)) goto main::@3 to (number) $b -Resolved ranged next value [11] main::j#1 ← ++ main::j#4 to ++ -Resolved ranged comparison value [13] if(main::j#1!=rangelast(0,$a)) goto main::@2 to (number) $b -Resolved ranged next value [15] main::i#1 ← ++ main::i#6 to ++ -Resolved ranged comparison value [17] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [10] main::j#1 ← ++ main::j#4 to ++ +Resolved ranged comparison value [12] if(main::j#1!=rangelast(0,$a)) goto main::@2 to (number) $b +Resolved ranged next value [13] main::i#1 ← ++ main::i#6 to ++ +Resolved ranged comparison value [15] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::k#1!=(number) $b) goto main::@3 Adding number conversion cast (unumber) $b in if((byte) main::j#1!=(number) $b) goto main::@2 Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 diff --git a/src/test/ref/inline-asm-clobber.asm b/src/test/ref/inline-asm-clobber.asm index 60f596c75..f4c937eb3 100644 --- a/src/test/ref/inline-asm-clobber.asm +++ b/src/test/ref/inline-asm-clobber.asm @@ -10,11 +10,14 @@ main: { __b1: lda #0 __b2: + // SCREEN[i] = j sta SCREEN,x + // for(byte j: 0..100) clc adc #1 cmp #$65 bne __b2 + // for(byte i : 0..100) inx cpx #$65 bne __b1 @@ -24,16 +27,21 @@ main: { lda #0 sta.z l __b5: + // asm eor #$55 tax + // SCREEN[k] = l lda.z l sta SCREEN,y + // for(byte l: 0..100) inc.z l lda #$65 cmp.z l bne __b5 + // for(byte k : 0..100) iny cpy #$65 bne __b4 + // } rts } diff --git a/src/test/ref/inline-asm-clobber.log b/src/test/ref/inline-asm-clobber.log index 278385b66..9b1526d66 100644 --- a/src/test/ref/inline-asm-clobber.log +++ b/src/test/ref/inline-asm-clobber.log @@ -108,9 +108,9 @@ Identical Phi Values (byte) main::i#2 (byte) main::i#4 Identical Phi Values (byte) main::k#2 (byte) main::k#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [7] if((byte) main::j#1!=rangelast(0,$64)) goto main::@2 -Simple Condition (bool~) main::$1 [11] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 -Simple Condition (bool~) main::$2 [20] if((byte) main::l#1!=rangelast(0,$64)) goto main::@6 -Simple Condition (bool~) main::$3 [24] if((byte) main::k#1!=rangelast(0,$64)) goto main::@5 +Simple Condition (bool~) main::$1 [10] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$2 [19] if((byte) main::l#1!=rangelast(0,$64)) goto main::@6 +Simple Condition (bool~) main::$3 [22] if((byte) main::k#1!=rangelast(0,$64)) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#0 = 0 @@ -119,12 +119,12 @@ Constant (const byte) main::l#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [5] main::j#1 ← ++ main::j#2 to ++ Resolved ranged comparison value [7] if(main::j#1!=rangelast(0,$64)) goto main::@2 to (number) $65 -Resolved ranged next value [9] main::i#1 ← ++ main::i#4 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 -Resolved ranged next value [18] main::l#1 ← ++ main::l#2 to ++ -Resolved ranged comparison value [20] if(main::l#1!=rangelast(0,$64)) goto main::@6 to (number) $65 -Resolved ranged next value [22] main::k#1 ← ++ main::k#4 to ++ -Resolved ranged comparison value [24] if(main::k#1!=rangelast(0,$64)) goto main::@5 to (number) $65 +Resolved ranged next value [8] main::i#1 ← ++ main::i#4 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [17] main::l#1 ← ++ main::l#2 to ++ +Resolved ranged comparison value [19] if(main::l#1!=rangelast(0,$64)) goto main::@6 to (number) $65 +Resolved ranged next value [20] main::k#1 ← ++ main::k#4 to ++ +Resolved ranged comparison value [22] if(main::k#1!=rangelast(0,$64)) goto main::@5 to (number) $65 Adding number conversion cast (unumber) $65 in if((byte) main::j#1!=(number) $65) goto main::@2 Adding number conversion cast (unumber) $65 in if((byte) main::i#1!=(number) $65) goto main::@1 Adding number conversion cast (unumber) $65 in if((byte) main::l#1!=(number) $65) goto main::@6 diff --git a/src/test/ref/inline-asm-jsr-clobber.asm b/src/test/ref/inline-asm-jsr-clobber.asm index afdbab580..3a22a041b 100644 --- a/src/test/ref/inline-asm-jsr-clobber.asm +++ b/src/test/ref/inline-asm-jsr-clobber.asm @@ -7,10 +7,13 @@ main: { lda #0 sta.z i __b1: + // asm jsr $e544 + // for( byte i:0..10) inc.z i lda #$b cmp.z i bne __b1 + // } rts } diff --git a/src/test/ref/inline-asm-label.asm b/src/test/ref/inline-asm-label.asm index ce0930ee9..3e9a4e06a 100644 --- a/src/test/ref/inline-asm-label.asm +++ b/src/test/ref/inline-asm-label.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // asm ldx #0 nxt: lda table,x @@ -11,6 +12,7 @@ main: { inx cpx #4 bne nxt + // } rts } table: .text "cml!" diff --git a/src/test/ref/inline-asm-optimized.asm b/src/test/ref/inline-asm-optimized.asm index 5909a24c1..e2326bcf1 100644 --- a/src/test/ref/inline-asm-optimized.asm +++ b/src/test/ref/inline-asm-optimized.asm @@ -4,11 +4,16 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // *SCREEN = 0 lda #0 sta SCREEN + // asm sta SCREEN+1 sta SCREEN+2 + // SCREEN[3] = 0 sta SCREEN+3 + // asm sta SCREEN+4 + // } rts } diff --git a/src/test/ref/inline-asm-param.asm b/src/test/ref/inline-asm-param.asm index cd880d438..7b25ca037 100644 --- a/src/test/ref/inline-asm-param.asm +++ b/src/test/ref/inline-asm-param.asm @@ -5,10 +5,13 @@ main: { ldx #0 __b1: + // asm lda #'a' sta SCREEN + // for( byte i:0..3) inx cpx #4 bne __b1 + // } rts } diff --git a/src/test/ref/inline-asm-ref-scoped.asm b/src/test/ref/inline-asm-ref-scoped.asm index c085cde68..c33f15693 100644 --- a/src/test/ref/inline-asm-ref-scoped.asm +++ b/src/test/ref/inline-asm-ref-scoped.asm @@ -3,14 +3,19 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // asm lda #'c' sta sub.ll+1 + // sub() jsr sub + // } rts } sub: { + // asm ll: lda #0 sta $400 + // } rts } diff --git a/src/test/ref/inline-asm-refout-const.asm b/src/test/ref/inline-asm-refout-const.asm index d044e2960..6523a2396 100644 --- a/src/test/ref/inline-asm-refout-const.asm +++ b/src/test/ref/inline-asm-refout-const.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // asm ldx #0 !: lda table,x @@ -11,6 +12,7 @@ main: { inx cpx #4 bne !- + // } rts } table: .text "cml!" diff --git a/src/test/ref/inline-asm-refout.asm b/src/test/ref/inline-asm-refout.asm index 0756a1180..14c10108f 100644 --- a/src/test/ref/inline-asm-refout.asm +++ b/src/test/ref/inline-asm-refout.asm @@ -4,8 +4,10 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // *(SCREEN+40) = table[0] lda table sta SCREEN+$28 + // asm ldx #0 !: lda table,x @@ -13,6 +15,7 @@ main: { inx cpx #4 bne !- + // } rts } table: .text "cml!" diff --git a/src/test/ref/inline-asm.asm b/src/test/ref/inline-asm.asm index 6eff4c9f0..682b4cb35 100644 --- a/src/test/ref/inline-asm.asm +++ b/src/test/ref/inline-asm.asm @@ -2,6 +2,7 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // asm lda #'a' ldx #$ff !: @@ -11,5 +12,6 @@ main: { sta $700,x dex bne !- + // } rts } diff --git a/src/test/ref/inline-assignment.asm b/src/test/ref/inline-assignment.asm index 8278e8e35..35cda4588 100644 --- a/src/test/ref/inline-assignment.asm +++ b/src/test/ref/inline-assignment.asm @@ -5,12 +5,16 @@ main: { ldx #0 __b1: + // SCREEN[i] = a = i txa sta SCREEN,x + // (SCREEN+80)[i] = a txa sta SCREEN+$50,x + // for( byte i : 0..39) inx cpx #$28 bne __b1 + // } rts } diff --git a/src/test/ref/inline-assignment.log b/src/test/ref/inline-assignment.log index 01d6c6755..b9b09d817 100644 --- a/src/test/ref/inline-assignment.log +++ b/src/test/ref/inline-assignment.log @@ -55,13 +55,13 @@ Finalized unsigned number type (byte) $50 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::a#1 = (byte) main::i#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 [8] if((byte) main::i#1!=rangelast(0,$27)) goto main::@1 +Simple Condition (bool~) main::$0 [7] if((byte) main::i#1!=rangelast(0,$27)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::a#0 = 0 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [6] main::i#1 ← ++ main::a#1 to ++ -Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,$27)) goto main::@1 to (number) $28 +Resolved ranged next value [5] main::i#1 ← ++ main::a#1 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$27)) goto main::@1 to (number) $28 Eliminating unused constant (const byte) main::a#0 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $28 in if((byte) main::i#1!=(number) $28) goto main::@1 diff --git a/src/test/ref/inline-dword-0.asm b/src/test/ref/inline-dword-0.asm index 40db59ef8..5934dd469 100644 --- a/src/test/ref/inline-dword-0.asm +++ b/src/test/ref/inline-dword-0.asm @@ -5,6 +5,7 @@ main: { .const w = $1234*$10000+$5678 .label screen = $400 + // screen[0] = w lda #w @@ -13,5 +14,6 @@ main: { sta screen+2 lda #>w>>$10 sta screen+3 + // } rts } diff --git a/src/test/ref/inline-function-if.asm b/src/test/ref/inline-function-if.asm index d5729668a..512b324b5 100644 --- a/src/test/ref/inline-function-if.asm +++ b/src/test/ref/inline-function-if.asm @@ -7,9 +7,12 @@ main: { .const toUpper1_ch = 'c' .const toUpper2_ch = 'm' .const toUpper1_return = toUpper1_ch+$40 + // screen[0] = toUpper('c',true) lda #toUpper1_return sta screen + // screen[1] = toUpper('m',false) lda #toUpper2_ch sta screen+1 + // } rts } diff --git a/src/test/ref/inline-function-if.log b/src/test/ref/inline-function-if.log index 35ae2cbc7..9f07ad122 100644 --- a/src/test/ref/inline-function-if.log +++ b/src/test/ref/inline-function-if.log @@ -152,8 +152,8 @@ Alias (byte) main::toUpper2_ch#0 = (byte) main::toUpper2_ch#1 (byte) main::toUpp Alias (bool) main::toUpper2_bo#0 = (bool) main::toUpper2_bo#1 Alias (byte) main::toUpper2_return#0 = (byte) main::toUpper2_res#2 (byte) main::toUpper2_return#2 (byte) main::toUpper2_return#1 (byte) main::toUpper2_return#3 (byte~) main::$1 Successful SSA optimization Pass2AliasElimination -Rewriting ! if()-condition to reversed if() [4] (bool~) main::toUpper1_$0 ← ! (bool) main::toUpper1_bo#0 -Rewriting ! if()-condition to reversed if() [19] (bool~) main::toUpper2_$0 ← ! (bool) main::toUpper2_bo#0 +Rewriting ! if()-condition to reversed if() [2] (bool~) main::toUpper1_$0 ← ! (bool) main::toUpper1_bo#0 +Rewriting ! if()-condition to reversed if() [9] (bool~) main::toUpper2_$0 ← ! (bool) main::toUpper2_bo#0 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte) main::toUpper1_ch#0 = 'c' Constant (const bool) main::toUpper1_bo#0 = true @@ -161,10 +161,10 @@ Constant (const byte) main::toUpper2_ch#0 = 'm' Constant (const bool) main::toUpper2_bo#0 = false Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (main::toUpper1) in block main::toUpper1_@1 -if() condition always true - replacing block destination [5] if((const bool) main::toUpper1_bo#0) goto main::toUpper1_@2 -if() condition always false - eliminating [20] if((const bool) main::toUpper2_bo#0) goto main::toUpper2_@2 +if() condition always true - replacing block destination [3] if((const bool) main::toUpper1_bo#0) goto main::toUpper1_@2 +if() condition always false - eliminating [10] if((const bool) main::toUpper2_bo#0) goto main::toUpper2_@2 Successful SSA optimization Pass2ConstantIfs -Simplifying expression containing zero screen in [14] *((const byte*) screen + (byte) 0) ← (byte) main::toUpper1_return#0 +Simplifying expression containing zero screen in [6] *((const byte*) screen + (byte) 0) ← (byte) main::toUpper1_return#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const bool) main::toUpper1_bo#0 Eliminating unused constant (const bool) main::toUpper2_bo#0 @@ -177,7 +177,7 @@ Alias (byte) main::toUpper1_return#0 = (byte) main::toUpper1_res#1 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::toUpper2_return#0 (const byte) main::toUpper2_ch#0 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [1] (byte) main::toUpper1_return#0 ← (const byte) main::toUpper1_ch#0 + (byte) $40 +Constant right-side identified [0] (byte) main::toUpper1_return#0 ← (const byte) main::toUpper1_ch#0 + (byte) $40 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::toUpper1_return#0 = main::toUpper1_ch#0+$40 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/inline-function-level2.asm b/src/test/ref/inline-function-level2.asm index 7dacf0c48..bdb797286 100644 --- a/src/test/ref/inline-function-level2.asm +++ b/src/test/ref/inline-function-level2.asm @@ -21,6 +21,7 @@ main: { lda #>$400 sta.z sc+1 __b1: + // for(byte* sc = $400;sc<$400+1000;sc++) lda.z sc+1 cmp #>$400+$3e8 bcc __b2 @@ -39,6 +40,7 @@ main: { sta.z line1_pos+1 ldx #0 line1___b1: + // for( byte i=0;ipos, ch) lda.z line2_pos+1 + // *(cur_line+xpos) = ch tay lda #line2_ch sta (cur_line_1),y + // pos += xadd lda #line2_xadd clc adc.z line2_pos @@ -66,6 +73,7 @@ main: { bcc !+ inc.z line2_pos+1 !: + // cur_line += 40 lda #$28 clc adc.z cur_line_1 @@ -73,13 +81,17 @@ main: { bcc !+ inc.z cur_line_1+1 !: + // for( byte i=0;ipos, ch) lda.z line1_pos+1 + // *(cur_line+xpos) = ch tay lda #line1_ch sta (cur_line),y + // pos += xadd lda #line1_xadd clc adc.z line1_pos @@ -87,6 +99,7 @@ main: { bcc !+ inc.z line1_pos+1 !: + // cur_line += 40 lda #$28 clc adc.z cur_line @@ -94,12 +107,15 @@ main: { bcc !+ inc.z cur_line+1 !: + // for( byte i=0;i$400 sta.z screen+1 ldx #1 jsr print_msg + // print_msg(2) ldx #2 jsr print_msg + // } rts } // print_msg(byte register(X) idx) print_msg: { .label msg = 4 + // if(idx==1) cpx #1 beq __b1 lda #msg_1 sta.z msg+1 __b2: + // print(msg) jsr print + // } rts msg_1: .text "Hello " .byte 0 @@ -41,15 +47,19 @@ print_msg: { print: { .label msg = 4 __b1: + // while(*msg) ldy #0 lda (msg),y cmp #0 bne __b2 + // } rts __b2: + // *(screen++) = *(msg++) ldy #0 lda (msg),y sta (screen),y + // *(screen++) = *(msg++); inc.z screen bne !+ inc.z screen+1 diff --git a/src/test/ref/inline-string-2.log b/src/test/ref/inline-string-2.log index eee241a48..36c8dc496 100644 --- a/src/test/ref/inline-string-2.log +++ b/src/test/ref/inline-string-2.log @@ -204,8 +204,8 @@ Identical Phi Values (byte*) print::msg#4 (byte*) print::msg#0 Identical Phi Values (byte*) screen#23 (byte*) screen#18 Identical Phi Values (byte*) screen#16 (byte*) screen#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_msg::$0 [15] if((byte) print_msg::idx#2==(byte) 1) goto print_msg::@1 -Simple Condition (bool~) print::$0 [32] if((byte) 0!=*((byte*) print::msg#2)) goto print::@2 +Simple Condition (bool~) print_msg::$0 [11] if((byte) print_msg::idx#2==(byte) 1) goto print_msg::@1 +Simple Condition (bool~) print::$0 [23] if((byte) 0!=*((byte*) print::msg#2)) goto print::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) print_msg::idx#0 = 1 Constant (const byte) print_msg::idx#1 = 2 diff --git a/src/test/ref/inline-string-3.asm b/src/test/ref/inline-string-3.asm index aab87e455..28b45fb3d 100644 --- a/src/test/ref/inline-string-3.asm +++ b/src/test/ref/inline-string-3.asm @@ -8,17 +8,22 @@ main: { .label PTR = $9ffe .label SCREEN = $400 .label ptr = 2 + // *PTR = STRING lda #>STRING sta PTR+1 + // (byte*) { *(PTR+1), *PTR } lda PTR sta.z ptr lda PTR+1 sta.z ptr+1 + // *SCREEN = *ptr ldy #0 lda (ptr),y sta SCREEN + // } rts STRING: .text "camelot" } diff --git a/src/test/ref/inline-string-4.asm b/src/test/ref/inline-string-4.asm index a5171dcf1..f0229f21f 100644 --- a/src/test/ref/inline-string-4.asm +++ b/src/test/ref/inline-string-4.asm @@ -5,12 +5,15 @@ .label screen = $400 main: { .label dw = msg + // output(dw) jsr output + // } rts msg: .text "camelot" .byte 0 } output: { + // *screen = dw lda #main.dw @@ -19,5 +22,6 @@ output: { sta screen+2 lda #>main.dw>>$10 sta screen+3 + // } rts } diff --git a/src/test/ref/inline-string.asm b/src/test/ref/inline-string.asm index 9b152a359..d6cdd44fd 100644 --- a/src/test/ref/inline-string.asm +++ b/src/test/ref/inline-string.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" .label screen = 2 main: { + // print(msg1) lda #<$400 sta.z screen lda #>$400 @@ -13,16 +14,19 @@ main: { lda #>msg1 sta.z print.msg+1 jsr print + // print(msg2) lda #msg2 sta.z print.msg+1 jsr print + // print("message 3 ") lda #msg sta.z print.msg+1 jsr print + // } rts msg2: .text "message 2 " .byte 0 @@ -33,15 +37,19 @@ main: { print: { .label msg = 4 __b1: + // while(*msg) ldy #0 lda (msg),y cmp #0 bne __b2 + // } rts __b2: + // *(screen++) = *(msg++) ldy #0 lda (msg),y sta (screen),y + // *(screen++) = *(msg++); inc.z screen bne !+ inc.z screen+1 diff --git a/src/test/ref/inline-string.log b/src/test/ref/inline-string.log index 663fcb4fa..64d9f9f06 100644 --- a/src/test/ref/inline-string.log +++ b/src/test/ref/inline-string.log @@ -141,7 +141,7 @@ Identical Phi Values (byte*) screen#1 (byte*) screen#12 Identical Phi Values (byte*) screen#10 (byte*) screen#12 Identical Phi Values (byte*) screen#14 (byte*) screen#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print::$0 [20] if((byte) 0!=*((byte*) print::msg#4)) goto print::@2 +Simple Condition (bool~) print::$0 [15] if((byte) 0!=*((byte*) print::msg#4)) goto print::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print::msg#0 = msg1 Constant (const byte*) print::msg#1 = main::msg2 diff --git a/src/test/ref/inline-word-0.asm b/src/test/ref/inline-word-0.asm index 70f2ee94d..cb1b6f184 100644 --- a/src/test/ref/inline-word-0.asm +++ b/src/test/ref/inline-word-0.asm @@ -5,9 +5,11 @@ main: { .const w = 2*$100+1 .label screen = $400 + // screen[0] = w lda #w sta screen+1 + // } rts } diff --git a/src/test/ref/inline-word-1.asm b/src/test/ref/inline-word-1.asm index 2d3ff9368..ef1d45710 100644 --- a/src/test/ref/inline-word-1.asm +++ b/src/test/ref/inline-word-1.asm @@ -5,9 +5,11 @@ main: { .const w = 1*$100+2 .label screen = $400 + // screen[0] = w lda #w sta screen+1 + // } rts } diff --git a/src/test/ref/inline-word-2.asm b/src/test/ref/inline-word-2.asm index 2d3ff9368..ef1d45710 100644 --- a/src/test/ref/inline-word-2.asm +++ b/src/test/ref/inline-word-2.asm @@ -5,9 +5,11 @@ main: { .const w = 1*$100+2 .label screen = $400 + // screen[0] = w lda #w sta screen+1 + // } rts } diff --git a/src/test/ref/inline-word.asm b/src/test/ref/inline-word.asm index d4543e874..75f176bf7 100644 --- a/src/test/ref/inline-word.asm +++ b/src/test/ref/inline-word.asm @@ -11,20 +11,25 @@ main: { __b1: ldx #4 __b2: + // w = { his[h], l } ldy.z h lda his,y sta.z w+1 stx.z w + // *sc = '*' lda #'*' ldy #0 sta (w),y + // for (byte l: 4..7) inx cpx #8 bne __b2 + // for( byte h: 0..2) inc.z h lda #3 cmp.z h bne __b1 + // } rts his: .byte >SCREEN, >SCREEN+$100, >SCREEN+$200 } diff --git a/src/test/ref/inline-word.log b/src/test/ref/inline-word.log index 139142c35..ad5aecd81 100644 --- a/src/test/ref/inline-word.log +++ b/src/test/ref/inline-word.log @@ -91,16 +91,16 @@ Alias (byte) main::h#2 = (byte) main::h#3 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::h#2 (byte) main::h#4 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [11] if((byte) main::l#1!=rangelast(4,7)) goto main::@2 -Simple Condition (bool~) main::$2 [15] if((byte) main::h#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$1 [9] if((byte) main::l#1!=rangelast(4,7)) goto main::@2 +Simple Condition (bool~) main::$2 [12] if((byte) main::h#1!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::h#0 = 0 Constant (const byte) main::l#0 = 4 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::l#1 ← ++ main::l#2 to ++ -Resolved ranged comparison value [11] if(main::l#1!=rangelast(4,7)) goto main::@2 to (number) 8 -Resolved ranged next value [13] main::h#1 ← ++ main::h#4 to ++ -Resolved ranged comparison value [15] if(main::h#1!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [7] main::l#1 ← ++ main::l#2 to ++ +Resolved ranged comparison value [9] if(main::l#1!=rangelast(4,7)) goto main::@2 to (number) 8 +Resolved ranged next value [10] main::h#1 ← ++ main::h#4 to ++ +Resolved ranged comparison value [12] if(main::h#1!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 8 in if((byte) main::l#1!=(number) 8) goto main::@2 Adding number conversion cast (unumber) 3 in if((byte) main::h#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/inlinearrayproblem.asm b/src/test/ref/inlinearrayproblem.asm index 9563b8a73..d9ffb1ca5 100644 --- a/src/test/ref/inlinearrayproblem.asm +++ b/src/test/ref/inlinearrayproblem.asm @@ -8,13 +8,17 @@ main: { ldx #0 __b1: + // SCREEN[i] = txt[i] lda txt,x sta SCREEN,x + // SCREEN2[i] = data[i] lda data,x sta SCREEN2,x + // for( byte i : 0..3) inx cpx #4 bne __b1 + // } rts txt: .text "qwe" data: .byte 1, 2, 3 diff --git a/src/test/ref/inmem-const-array.asm b/src/test/ref/inmem-const-array.asm index 02ba3df3b..c56716015 100644 --- a/src/test/ref/inmem-const-array.asm +++ b/src/test/ref/inmem-const-array.asm @@ -10,18 +10,23 @@ main: { ldy #0 ldx #0 __b1: + // screen[i] = '*' lda #'*' sta screen,x + // cols[i] = colseq[j] lda colseq,y sta cols,x + // if(++j==3) iny cpy #3 bne __b2 ldy #0 __b2: + // for( byte i : 0..39) inx cpx #$28 bne __b1 + // } rts colseq: .byte WHITE, RED, GREEN } diff --git a/src/test/ref/inmem-const-array.log b/src/test/ref/inmem-const-array.log index dc06c8b55..b481bd8c2 100644 --- a/src/test/ref/inmem-const-array.log +++ b/src/test/ref/inmem-const-array.log @@ -93,15 +93,15 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [8] if((byte) main::j#1!=(byte) 3) goto main::@2 -Simple Condition (bool~) main::$2 [12] if((byte) main::i#1!=rangelast(0,$27)) goto main::@1 +Simple Condition (bool~) main::$1 [7] if((byte) main::j#1!=(byte) 3) goto main::@2 +Simple Condition (bool~) main::$2 [11] if((byte) main::i#1!=rangelast(0,$27)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::j#0 = 0 Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#2 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,$27)) goto main::@1 to (number) $28 +Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$27)) goto main::@1 to (number) $28 Adding number conversion cast (unumber) $28 in if((byte) main::i#1!=(number) $28) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $28 diff --git a/src/test/ref/inmemarray.asm b/src/test/ref/inmemarray.asm index 5a0fd880a..b24228704 100644 --- a/src/test/ref/inmemarray.asm +++ b/src/test/ref/inmemarray.asm @@ -6,16 +6,20 @@ main: { ldx #0 ldy #0 __b1: + // SCREEN[i] = TXT[j] lda TXT,y sta SCREEN,x + // if(++j==8) iny cpy #8 bne __b2 ldy #0 __b2: + // for(byte i : 0..100) inx cpx #$65 bne __b1 + // } rts } TXT: .byte 3, 1, $d, 5, $c, $f, $14, $20 diff --git a/src/test/ref/inmemarray.log b/src/test/ref/inmemarray.log index ee23043c7..c8777f668 100644 --- a/src/test/ref/inmemarray.log +++ b/src/test/ref/inmemarray.log @@ -86,15 +86,15 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [7] if((byte) main::j#1!=(byte) 8) goto main::@2 -Simple Condition (bool~) main::$2 [11] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$1 [6] if((byte) main::j#1!=(byte) 8) goto main::@2 +Simple Condition (bool~) main::$2 [10] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::j#0 = 0 Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#2 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 Adding number conversion cast (unumber) $65 in if((byte) main::i#1!=(number) $65) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $65 diff --git a/src/test/ref/inmemstring.asm b/src/test/ref/inmemstring.asm index d6ed4010e..d5a716c6b 100644 --- a/src/test/ref/inmemstring.asm +++ b/src/test/ref/inmemstring.asm @@ -10,14 +10,17 @@ main: { sta.z cursor+1 ldx #0 __b1: + // *cursor = TEXT[i] lda TEXT,x ldy #0 sta (cursor),y + // if(++i==8) inx cpx #8 bne __b2 ldx #0 __b2: + // while(++cursor$400 sta.z screen+1 __b1: + // CHAR_COUNTS[*screen++]++; ldy #0 lda (screen),y asl @@ -34,6 +35,7 @@ main: { bne !+ inc.z screen+1 !: + // for( word i:0..999) inc.z i bne !+ inc.z i+1 @@ -44,6 +46,7 @@ main: { lda.z i cmp #<$3e8 bne __b1 + // } rts } CHAR_COUNTS: .fill 2*$100, 0 diff --git a/src/test/ref/int-conversion.asm b/src/test/ref/int-conversion.asm index 871083003..9ba21ad65 100644 --- a/src/test/ref/int-conversion.asm +++ b/src/test/ref/int-conversion.asm @@ -19,6 +19,7 @@ main: { lda #>SCREEN sta.z s+1 __b1: + // for(byte* s=SCREEN;sSCREEN+$3e8 bcc __b2 @@ -27,13 +28,18 @@ main: { cmp #SCREEN sta.z s+1 __b1: + // for(byte* s=SCREEN;sSCREEN+$3e8 bcc __b2 @@ -27,12 +28,16 @@ main: { cmp #irq sta KERNEL_IRQ+1 + // } rts } irq: { + // SCREEN[40] = col1++ lda.z col1 sta SCREEN+$28 + // SCREEN[40] = col1++; inc.z col1 + // SCREEN[41] = col2++ lda.z col2 sta SCREEN+$29 + // SCREEN[41] = col2++; inc.z col2 + // } jmp $ea81 } diff --git a/src/test/ref/interrupt-volatile-reuse-problem2.asm b/src/test/ref/interrupt-volatile-reuse-problem2.asm index 2ae3ef592..dd83b7076 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem2.asm +++ b/src/test/ref/interrupt-volatile-reuse-problem2.asm @@ -7,12 +7,14 @@ .label SCREEN = $400 .label col1 = 3 __bbegin: + // col1 = 0 lda #0 sta.z col1 jsr main rts main: { .label y = 2 + // *KERNEL_IRQ = &irq lda #irq @@ -25,29 +27,39 @@ main: { __b2: ldy #0 __b3: + // a+y tya clc adc.z y + // SCREEN[x] = a+y sta SCREEN,x + // for (byte a:0..10) iny cpy #$b bne __b3 + // for(byte y: 0..10) inc.z y lda #$b cmp.z y bne __b2 + // for(byte x: 0..10) inx cpx #$b bne __b1 jmp b1 } irq: { + // *IRQ_STATUS = 1 // Acknowledge the IRQ lda #1 sta IRQ_STATUS + // asm lda $dc0d + // SCREEN[40] = col1++ lda.z col1 sta SCREEN+$28 + // SCREEN[40] = col1++; inc.z col1 + // } jmp $ea81 } diff --git a/src/test/ref/interrupt-volatile-reuse-problem2.log b/src/test/ref/interrupt-volatile-reuse-problem2.log index 98751ffb7..3f6cfa96f 100644 --- a/src/test/ref/interrupt-volatile-reuse-problem2.log +++ b/src/test/ref/interrupt-volatile-reuse-problem2.log @@ -140,8 +140,8 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte) main::x#4 (byte) main::x#6 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$1 [13] if((byte) main::a#1!=rangelast(0,$a)) goto main::@6 -Simple Condition (bool~) main::$2 [17] if((byte) main::y#1!=rangelast(0,$a)) goto main::@5 -Simple Condition (bool~) main::$3 [21] if((byte) main::x#1!=rangelast(0,$a)) goto main::@4 +Simple Condition (bool~) main::$2 [16] if((byte) main::y#1!=rangelast(0,$a)) goto main::@5 +Simple Condition (bool~) main::$3 [19] if((byte) main::x#1!=rangelast(0,$a)) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Constant (const byte) main::y#0 = 0 @@ -151,10 +151,10 @@ if() condition always true - replacing block destination [2] if(true) goto main: Successful SSA optimization Pass2ConstantIfs Resolved ranged next value [11] main::a#1 ← ++ main::a#2 to ++ Resolved ranged comparison value [13] if(main::a#1!=rangelast(0,$a)) goto main::@6 to (number) $b -Resolved ranged next value [15] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [17] if(main::y#1!=rangelast(0,$a)) goto main::@5 to (number) $b -Resolved ranged next value [19] main::x#1 ← ++ main::x#6 to ++ -Resolved ranged comparison value [21] if(main::x#1!=rangelast(0,$a)) goto main::@4 to (number) $b +Resolved ranged next value [14] main::y#1 ← ++ main::y#4 to ++ +Resolved ranged comparison value [16] if(main::y#1!=rangelast(0,$a)) goto main::@5 to (number) $b +Resolved ranged next value [17] main::x#1 ← ++ main::x#6 to ++ +Resolved ranged comparison value [19] if(main::x#1!=rangelast(0,$a)) goto main::@4 to (number) $b Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $b in if((byte) main::a#1!=(number) $b) goto main::@6 diff --git a/src/test/ref/irq-hardware-clobber-jsr.asm b/src/test/ref/irq-hardware-clobber-jsr.asm index 726824404..73f7fabb9 100644 --- a/src/test/ref/irq-hardware-clobber-jsr.asm +++ b/src/test/ref/irq-hardware-clobber-jsr.asm @@ -30,49 +30,65 @@ .const BLACK = 0 .const WHITE = 1 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &irq // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 + // asm cli __b1: + // (*BORDERCOL)++; inc BORDERCOL jmp __b1 } // Interrupt Routine irq: { sta rega+1 + // do_irq() jsr do_irq + // } rega: lda #00 rti } do_irq: { + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rts } diff --git a/src/test/ref/irq-hardware-clobber.asm b/src/test/ref/irq-hardware-clobber.asm index 2b2a9bb85..0679251ca 100644 --- a/src/test/ref/irq-hardware-clobber.asm +++ b/src/test/ref/irq-hardware-clobber.asm @@ -24,44 +24,58 @@ .const PROCPORT_RAM_IO = $35 // RAM in $A000, $E000 CHAR ROM in $D000 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &irq // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 + // asm cli __b1: + // (*FGCOL)++; inc FGCOL jmp __b1 } // Interrupt Routine irq: { sta rega+1 + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 rti diff --git a/src/test/ref/irq-hardware-stack.asm b/src/test/ref/irq-hardware-stack.asm index e43a4c7d6..87cd0f346 100644 --- a/src/test/ref/irq-hardware-stack.asm +++ b/src/test/ref/irq-hardware-stack.asm @@ -24,31 +24,41 @@ .const PROCPORT_RAM_IO = $35 // RAM in $A000, $E000 CHAR ROM in $D000 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &irq // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 + // asm cli __b1: + // (*FGCOL)++; inc FGCOL jmp __b1 } @@ -59,13 +69,17 @@ irq: { pha tya pha + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } pla tay pla diff --git a/src/test/ref/irq-hardware.asm b/src/test/ref/irq-hardware.asm index da20ec90d..5adea2634 100644 --- a/src/test/ref/irq-hardware.asm +++ b/src/test/ref/irq-hardware.asm @@ -24,31 +24,41 @@ .const PROCPORT_RAM_IO = $35 // RAM in $A000, $E000 CHAR ROM in $D000 main: { + // asm sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *HARDWARE_IRQ = &irq // Set the IRQ routine lda #irq sta HARDWARE_IRQ+1 + // asm cli __b1: + // (*FGCOL)++; inc FGCOL jmp __b1 } @@ -57,13 +67,17 @@ irq: { sta rega+1 stx regx+1 sty regy+1 + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } rega: lda #00 regx: diff --git a/src/test/ref/irq-idx-problem.asm b/src/test/ref/irq-idx-problem.asm index d68cf77bd..af47a4241 100644 --- a/src/test/ref/irq-idx-problem.asm +++ b/src/test/ref/irq-idx-problem.asm @@ -22,62 +22,84 @@ .const IRQ_CHANGE_NEXT = $7f .label irq_idx = 2 __b1: + // irq_idx = 0 lda #0 sta.z irq_idx jsr main rts main: { + // asm sei + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=$7f // Set raster line to $60 lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = $60 lda #$60 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *IRQ_STATUS = IRQ_RASTER // Acknowledge any IRQ sta IRQ_STATUS + // *KERNEL_IRQ = &table_driven_irq // Setup the table driven IRQ routine lda #table_driven_irq sta KERNEL_IRQ+1 + // asm cli + // } rts } table_driven_irq: { __b1: + // idx = IRQ_CHANGE_IDX[irq_idx] ldy.z irq_idx lda IRQ_CHANGE_IDX,y + // val = IRQ_CHANGE_VAL[irq_idx] ldx IRQ_CHANGE_VAL,y + // irq_idx++; inc.z irq_idx + // if (idx < VIC_SIZE) cmp #VIC_SIZE bcc __b2 + // if (idx < VIC_SIZE + 8) cmp #VIC_SIZE+8 bcc __b3 + // *IRQ_STATUS = IRQ_RASTER lda #IRQ_RASTER sta IRQ_STATUS + // *RASTER = val stx RASTER + // if (val < *RASTER) ldy RASTER sty.z $ff cpx.z $ff bcc !__ea81+ jmp $ea81 !__ea81: + // irq_idx = 0 lda #0 sta.z irq_idx + // } jmp $ea81 __b3: + // SCREEN[idx + $3f8 - VIC_SIZE] = val tay txa sta SCREEN+-VIC_SIZE+$3f8,y jmp __b1 __b2: + // VIC_BASE[idx] = val tay txa sta VIC_BASE,y diff --git a/src/test/ref/irq-idx-problem.log b/src/test/ref/irq-idx-problem.log index 3c94e80b2..422eb7ae4 100644 --- a/src/test/ref/irq-idx-problem.log +++ b/src/test/ref/irq-idx-problem.log @@ -176,12 +176,12 @@ Alias (byte) table_driven_irq::val#0 = (byte) table_driven_irq::val#1 (byte) tab Alias (byte) table_driven_irq::idx#0 = (byte) table_driven_irq::idx#1 (byte) table_driven_irq::idx#2 (byte) table_driven_irq::idx#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) table_driven_irq::$0 [14] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE) goto table_driven_irq::@2 -Simple Condition (bool~) table_driven_irq::$1 [19] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE+(byte) 8) goto table_driven_irq::@3 -Simple Condition (bool~) table_driven_irq::$3 [29] if((byte) table_driven_irq::val#0>=*((const byte*) RASTER)) goto table_driven_irq::@return +Simple Condition (bool~) table_driven_irq::$1 [17] if((byte) table_driven_irq::idx#0<(const byte) VIC_SIZE+(byte) 8) goto table_driven_irq::@3 +Simple Condition (bool~) table_driven_irq::$3 [24] if((byte) table_driven_irq::val#0>=*((const byte*) RASTER)) goto table_driven_irq::@return Successful SSA optimization Pass2ConditionalJumpSimplification -if() condition always true - replacing block destination [32] if(true) goto table_driven_irq::@1 +if() condition always true - replacing block destination [27] if(true) goto table_driven_irq::@1 Successful SSA optimization Pass2ConstantIfs -De-inlining pointer[w] to *(pointer+w) [23] *((const byte*) SCREEN + (word~) table_driven_irq::$5) ← (byte) table_driven_irq::val#0 +De-inlining pointer[w] to *(pointer+w) [20] *((const byte*) SCREEN + (word~) table_driven_irq::$5) ← (byte) table_driven_irq::val#0 Successful SSA optimization Pass2DeInlineWordDerefIdx Consolidated constant in assignment table_driven_irq::$6 Successful SSA optimization Pass2ConstantAdditionElimination @@ -191,7 +191,7 @@ Consolidated constant in assignment table_driven_irq::$6 Successful SSA optimization Pass2ConstantAdditionElimination Alias (byte) table_driven_irq::idx#0 = (word~) table_driven_irq::$5 Successful SSA optimization Pass2AliasElimination -Converting *(pointer+n) to pointer[n] [18] *((byte*~) table_driven_irq::$6) ← (byte) table_driven_irq::val#0 -- *(SCREEN+-VIC_SIZE+$3f8 + table_driven_irq::idx#0) +Converting *(pointer+n) to pointer[n] [17] *((byte*~) table_driven_irq::$6) ← (byte) table_driven_irq::val#0 -- *(SCREEN+-VIC_SIZE+$3f8 + table_driven_irq::idx#0) Successful SSA optimization Pass2InlineDerefIdx Eliminating unused variable (byte*~) table_driven_irq::$6 and assignment [16] (byte*~) table_driven_irq::$6 ← (const byte*) SCREEN+-(const byte) VIC_SIZE+(word) $3f8 + (byte) table_driven_irq::idx#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/irq-kernel-minimal.asm b/src/test/ref/irq-kernel-minimal.asm index c22875df9..4544e6993 100644 --- a/src/test/ref/irq-kernel-minimal.asm +++ b/src/test/ref/irq-kernel-minimal.asm @@ -10,19 +10,26 @@ .const WHITE = 1 // Setup the IRQ routine main: { + // asm sei + // *KERNEL_IRQ = &irq lda #irq sta KERNEL_IRQ+1 + // asm cli + // } rts } // The Interrupt Handler irq: { + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // } jmp $ea31 } diff --git a/src/test/ref/irq-kernel.asm b/src/test/ref/irq-kernel.asm index 6c94a09d1..e97af5d28 100644 --- a/src/test/ref/irq-kernel.asm +++ b/src/test/ref/irq-kernel.asm @@ -14,35 +14,47 @@ .label CIA1_INTERRUPT = $dc0d .const CIA_INTERRUPT_CLEAR = $7f main: { + // asm sei + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *KERNEL_IRQ = &irq // Set the IRQ routine lda #irq sta KERNEL_IRQ+1 + // asm cli + // } rts } // Interrupt Routine irq: { + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } jmp $ea31 } diff --git a/src/test/ref/irq-local-var-overlap-problem.asm b/src/test/ref/irq-local-var-overlap-problem.asm index 00b23a32a..1de6b8411 100644 --- a/src/test/ref/irq-local-var-overlap-problem.asm +++ b/src/test/ref/irq-local-var-overlap-problem.asm @@ -16,24 +16,31 @@ main: { .label k = 4 .label j = 3 .label i = 2 + // asm sei + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=$7f // Set raster line to $0fd lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = $fd lda #$fd sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *KERNEL_IRQ = &irq // Set the IRQ routine lda #irq sta KERNEL_IRQ+1 + // asm cli b1: lda #0 @@ -45,20 +52,27 @@ main: { lda #0 sta.z k __b3: + // i+j lda.z i clc adc.z j + // i+j+k clc adc.z k + // *FGCOL = i+j+k sta FGCOL + // sub_main() jsr sub_main + // for( byte k: 0..10 ) inc.z k lda #$b cmp.z k bne __b3 + // for( byte j: 0..10 ) inc.z j cmp.z j bne __b2 + // for( byte i: 0..10 ) inc.z i cmp.z i bne __b1 @@ -73,29 +87,37 @@ sub_main: { __b2: ldy #0 __b3: + // i+j txa clc adc.z i + // i+j+k sty.z $ff clc adc.z $ff + // *BGCOL = i+j+k sta BGCOL + // for( byte k: 0..10 ) iny cpy #$b bne __b3 + // for( byte j: 0..10 ) inx cpx #$b bne __b2 + // for( byte i: 0..10 ) inc.z i lda #$b cmp.z i bne __b1 + // } rts } irq: { .label k = 8 .label j = 7 .label i = 6 + // (*BGCOL)++; inc BGCOL lda #0 sta.z i @@ -106,26 +128,36 @@ irq: { lda #0 sta.z k __b3: + // i+j lda.z i clc adc.z j + // i+j+k clc adc.z k + // *FGCOL = i+j+k sta FGCOL + // sub_irq() jsr sub_irq + // for( byte k: 0..10 ) inc.z k lda #$b cmp.z k bne __b3 + // for( byte j: 0..10 ) inc.z j cmp.z j bne __b2 + // for( byte i: 0..10 ) inc.z i cmp.z i bne __b1 + // *IRQ_STATUS = IRQ_RASTER lda #IRQ_RASTER sta IRQ_STATUS + // (*BGCOL)--; dec BGCOL + // } jmp $ea81 } sub_irq: { @@ -137,22 +169,29 @@ sub_irq: { __b2: ldy #0 __b3: + // i+j txa clc adc.z i + // i+j+k sty.z $ff clc adc.z $ff + // *BGCOL = i+j+k sta BGCOL + // for( byte k: 0..10 ) iny cpy #$b bne __b3 + // for( byte j: 0..10 ) inx cpx #$b bne __b2 + // for( byte i: 0..10 ) inc.z i lda #$b cmp.z i bne __b1 + // } rts } diff --git a/src/test/ref/irq-local-var-overlap-problem.log b/src/test/ref/irq-local-var-overlap-problem.log index 716a1efcc..489b3387f 100644 --- a/src/test/ref/irq-local-var-overlap-problem.log +++ b/src/test/ref/irq-local-var-overlap-problem.log @@ -404,18 +404,18 @@ Identical Phi Values (byte) irq::i#4 (byte) irq::i#7 Identical Phi Values (byte) sub_main::i#4 (byte) sub_main::i#6 Identical Phi Values (byte) sub_irq::i#4 (byte) sub_irq::i#6 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$3 [21] if((byte) main::k#1!=rangelast(0,$a)) goto main::@6 -Simple Condition (bool~) main::$4 [25] if((byte) main::j#1!=rangelast(0,$a)) goto main::@5 -Simple Condition (bool~) main::$5 [29] if((byte) main::i#1!=rangelast(0,$a)) goto main::@4 -Simple Condition (bool~) irq::$5 [45] if((byte) irq::k#1!=rangelast(0,$a)) goto irq::@3 -Simple Condition (bool~) irq::$6 [49] if((byte) irq::j#1!=rangelast(0,$a)) goto irq::@2 -Simple Condition (bool~) irq::$7 [53] if((byte) irq::i#1!=rangelast(0,$a)) goto irq::@1 -Simple Condition (bool~) sub_main::$2 [68] if((byte) sub_main::k#1!=rangelast(0,$a)) goto sub_main::@3 -Simple Condition (bool~) sub_main::$3 [72] if((byte) sub_main::j#1!=rangelast(0,$a)) goto sub_main::@2 -Simple Condition (bool~) sub_main::$4 [76] if((byte) sub_main::i#1!=rangelast(0,$a)) goto sub_main::@1 -Simple Condition (bool~) sub_irq::$2 [89] if((byte) sub_irq::k#1!=rangelast(0,$a)) goto sub_irq::@3 -Simple Condition (bool~) sub_irq::$3 [93] if((byte) sub_irq::j#1!=rangelast(0,$a)) goto sub_irq::@2 -Simple Condition (bool~) sub_irq::$4 [97] if((byte) sub_irq::i#1!=rangelast(0,$a)) goto sub_irq::@1 +Simple Condition (bool~) main::$3 [20] if((byte) main::k#1!=rangelast(0,$a)) goto main::@6 +Simple Condition (bool~) main::$4 [23] if((byte) main::j#1!=rangelast(0,$a)) goto main::@5 +Simple Condition (bool~) main::$5 [26] if((byte) main::i#1!=rangelast(0,$a)) goto main::@4 +Simple Condition (bool~) irq::$5 [41] if((byte) irq::k#1!=rangelast(0,$a)) goto irq::@3 +Simple Condition (bool~) irq::$6 [44] if((byte) irq::j#1!=rangelast(0,$a)) goto irq::@2 +Simple Condition (bool~) irq::$7 [47] if((byte) irq::i#1!=rangelast(0,$a)) goto irq::@1 +Simple Condition (bool~) sub_main::$2 [62] if((byte) sub_main::k#1!=rangelast(0,$a)) goto sub_main::@3 +Simple Condition (bool~) sub_main::$3 [65] if((byte) sub_main::j#1!=rangelast(0,$a)) goto sub_main::@2 +Simple Condition (bool~) sub_main::$4 [68] if((byte) sub_main::i#1!=rangelast(0,$a)) goto sub_main::@1 +Simple Condition (bool~) sub_irq::$2 [81] if((byte) sub_irq::k#1!=rangelast(0,$a)) goto sub_irq::@3 +Simple Condition (bool~) sub_irq::$3 [84] if((byte) sub_irq::j#1!=rangelast(0,$a)) goto sub_irq::@2 +Simple Condition (bool~) sub_irq::$4 [87] if((byte) sub_irq::i#1!=rangelast(0,$a)) goto sub_irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#0 = 0 @@ -432,30 +432,30 @@ Constant (const byte) sub_irq::k#0 = 0 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [7] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [19] main::k#1 ← ++ main::k#2 to ++ -Resolved ranged comparison value [21] if(main::k#1!=rangelast(0,$a)) goto main::@6 to (number) $b -Resolved ranged next value [23] main::j#1 ← ++ main::j#5 to ++ -Resolved ranged comparison value [25] if(main::j#1!=rangelast(0,$a)) goto main::@5 to (number) $b -Resolved ranged next value [27] main::i#1 ← ++ main::i#7 to ++ -Resolved ranged comparison value [29] if(main::i#1!=rangelast(0,$a)) goto main::@4 to (number) $b -Resolved ranged next value [43] irq::k#1 ← ++ irq::k#2 to ++ -Resolved ranged comparison value [45] if(irq::k#1!=rangelast(0,$a)) goto irq::@3 to (number) $b -Resolved ranged next value [47] irq::j#1 ← ++ irq::j#4 to ++ -Resolved ranged comparison value [49] if(irq::j#1!=rangelast(0,$a)) goto irq::@2 to (number) $b -Resolved ranged next value [51] irq::i#1 ← ++ irq::i#7 to ++ -Resolved ranged comparison value [53] if(irq::i#1!=rangelast(0,$a)) goto irq::@1 to (number) $b -Resolved ranged next value [66] sub_main::k#1 ← ++ sub_main::k#2 to ++ -Resolved ranged comparison value [68] if(sub_main::k#1!=rangelast(0,$a)) goto sub_main::@3 to (number) $b -Resolved ranged next value [70] sub_main::j#1 ← ++ sub_main::j#4 to ++ -Resolved ranged comparison value [72] if(sub_main::j#1!=rangelast(0,$a)) goto sub_main::@2 to (number) $b -Resolved ranged next value [74] sub_main::i#1 ← ++ sub_main::i#6 to ++ -Resolved ranged comparison value [76] if(sub_main::i#1!=rangelast(0,$a)) goto sub_main::@1 to (number) $b -Resolved ranged next value [87] sub_irq::k#1 ← ++ sub_irq::k#2 to ++ -Resolved ranged comparison value [89] if(sub_irq::k#1!=rangelast(0,$a)) goto sub_irq::@3 to (number) $b -Resolved ranged next value [91] sub_irq::j#1 ← ++ sub_irq::j#4 to ++ -Resolved ranged comparison value [93] if(sub_irq::j#1!=rangelast(0,$a)) goto sub_irq::@2 to (number) $b -Resolved ranged next value [95] sub_irq::i#1 ← ++ sub_irq::i#6 to ++ -Resolved ranged comparison value [97] if(sub_irq::i#1!=rangelast(0,$a)) goto sub_irq::@1 to (number) $b +Resolved ranged next value [18] main::k#1 ← ++ main::k#2 to ++ +Resolved ranged comparison value [20] if(main::k#1!=rangelast(0,$a)) goto main::@6 to (number) $b +Resolved ranged next value [21] main::j#1 ← ++ main::j#5 to ++ +Resolved ranged comparison value [23] if(main::j#1!=rangelast(0,$a)) goto main::@5 to (number) $b +Resolved ranged next value [24] main::i#1 ← ++ main::i#7 to ++ +Resolved ranged comparison value [26] if(main::i#1!=rangelast(0,$a)) goto main::@4 to (number) $b +Resolved ranged next value [39] irq::k#1 ← ++ irq::k#2 to ++ +Resolved ranged comparison value [41] if(irq::k#1!=rangelast(0,$a)) goto irq::@3 to (number) $b +Resolved ranged next value [42] irq::j#1 ← ++ irq::j#4 to ++ +Resolved ranged comparison value [44] if(irq::j#1!=rangelast(0,$a)) goto irq::@2 to (number) $b +Resolved ranged next value [45] irq::i#1 ← ++ irq::i#7 to ++ +Resolved ranged comparison value [47] if(irq::i#1!=rangelast(0,$a)) goto irq::@1 to (number) $b +Resolved ranged next value [60] sub_main::k#1 ← ++ sub_main::k#2 to ++ +Resolved ranged comparison value [62] if(sub_main::k#1!=rangelast(0,$a)) goto sub_main::@3 to (number) $b +Resolved ranged next value [63] sub_main::j#1 ← ++ sub_main::j#4 to ++ +Resolved ranged comparison value [65] if(sub_main::j#1!=rangelast(0,$a)) goto sub_main::@2 to (number) $b +Resolved ranged next value [66] sub_main::i#1 ← ++ sub_main::i#6 to ++ +Resolved ranged comparison value [68] if(sub_main::i#1!=rangelast(0,$a)) goto sub_main::@1 to (number) $b +Resolved ranged next value [79] sub_irq::k#1 ← ++ sub_irq::k#2 to ++ +Resolved ranged comparison value [81] if(sub_irq::k#1!=rangelast(0,$a)) goto sub_irq::@3 to (number) $b +Resolved ranged next value [82] sub_irq::j#1 ← ++ sub_irq::j#4 to ++ +Resolved ranged comparison value [84] if(sub_irq::j#1!=rangelast(0,$a)) goto sub_irq::@2 to (number) $b +Resolved ranged next value [85] sub_irq::i#1 ← ++ sub_irq::i#6 to ++ +Resolved ranged comparison value [87] if(sub_irq::i#1!=rangelast(0,$a)) goto sub_irq::@1 to (number) $b Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $b in if((byte) main::k#1!=(number) $b) goto main::@6 diff --git a/src/test/ref/irq-raster.asm b/src/test/ref/irq-raster.asm index 6d92e9c32..45a2b03e4 100644 --- a/src/test/ref/irq-raster.asm +++ b/src/test/ref/irq-raster.asm @@ -14,35 +14,47 @@ .label CIA1_INTERRUPT = $dc0d .const CIA_INTERRUPT_CLEAR = $7f main: { + // asm sei + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL |=$80 // Set raster line to $100 lda #$80 ora VIC_CONTROL sta VIC_CONTROL + // *RASTER = $00 lda #0 sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *KERNEL_IRQ = &irq // Set the IRQ routine lda #irq sta KERNEL_IRQ+1 + // asm cli + // } rts } // Interrupt Routine irq: { + // *BGCOL = WHITE lda #WHITE sta BGCOL + // *BGCOL = BLACK lda #BLACK sta BGCOL + // *IRQ_STATUS = IRQ_RASTER // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS + // } jmp $ea81 } diff --git a/src/test/ref/irq-volatile-bool-problem.asm b/src/test/ref/irq-volatile-bool-problem.asm index 78be03425..6589e534a 100644 --- a/src/test/ref/irq-volatile-bool-problem.asm +++ b/src/test/ref/irq-volatile-bool-problem.asm @@ -13,37 +13,50 @@ .label CIA1_INTERRUPT = $dc0d .const CIA_INTERRUPT_CLEAR = $7f main: { + // asm sei + // *CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR // Disable CIA 1 Timer IRQ lda #CIA_INTERRUPT_CLEAR sta CIA1_INTERRUPT + // *VIC_CONTROL &=$7f // Set raster line to $0fd lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = $fd lda #$fd sta RASTER + // *IRQ_ENABLE = IRQ_RASTER // Enable Raster Interrupt lda #IRQ_RASTER sta IRQ_ENABLE + // *KERNEL_IRQ = &irq // Set the IRQ routine lda #irq sta KERNEL_IRQ+1 + // asm cli __b1: + // if(*RASTER<20) lda RASTER cmp #$14 bcs __b1 jmp __b1 } irq: { + // (*BGCOL)++; inc BGCOL + // *IRQ_STATUS = IRQ_RASTER lda #IRQ_RASTER sta IRQ_STATUS + // if (*RASTER>50) lda RASTER cmp #$32+1 + // (*BGCOL)--; dec BGCOL + // } jmp $ea81 } diff --git a/src/test/ref/irq-volatile-bool-problem.log b/src/test/ref/irq-volatile-bool-problem.log index d0620aabe..709bdb953 100644 --- a/src/test/ref/irq-volatile-bool-problem.log +++ b/src/test/ref/irq-volatile-bool-problem.log @@ -113,12 +113,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [9] (bool~) main::$1 ← *((const byte*) RASTER) >= (byte) $14 from [8] (bool~) main::$0 ← *((const byte*) RASTER) < (byte) $14 Inversing boolean not [15] (bool~) irq::$2 ← *((const byte*) RASTER) <= (byte) $32 from [14] (bool~) irq::$1 ← *((const byte*) RASTER) > (byte) $32 Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) main::$1 [10] if(*((const byte*) RASTER)>=(byte) $14) goto main::@1 -Simple Condition (bool~) irq::$2 [16] if(*((const byte*) RASTER)<=(byte) $32) goto irq::@1 +Simple Condition (bool~) main::$1 [9] if(*((const byte*) RASTER)>=(byte) $14) goto main::@1 +Simple Condition (bool~) irq::$2 [14] if(*((const byte*) RASTER)<=(byte) $32) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification if() condition always true - replacing block destination [7] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Rewriting conditional comparison [16] if(*((const byte*) RASTER)<=(byte) $32) goto irq::@1 +Rewriting conditional comparison [14] if(*((const byte*) RASTER)<=(byte) $32) goto irq::@1 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $32+1 in if(*((const byte*) RASTER)<(byte) $32+(number) 1) goto irq::@1 diff --git a/src/test/ref/iterarray.asm b/src/test/ref/iterarray.asm index ea23aa03e..85d948d68 100644 --- a/src/test/ref/iterarray.asm +++ b/src/test/ref/iterarray.asm @@ -5,12 +5,17 @@ main: { .label buf = $1100 ldx #5 __b1: + // 2+i+2 txa clc adc #2+2 + // buf[i] = 2+i+2 sta buf,x + // i = i+1 inx + // while(i<10) cpx #$a bcc __b1 + // } rts } diff --git a/src/test/ref/iterarray.log b/src/test/ref/iterarray.log index cbeeb6242..247858b33 100644 --- a/src/test/ref/iterarray.log +++ b/src/test/ref/iterarray.log @@ -70,7 +70,7 @@ Inferred type updated to byte in (unumber~) main::$1 ← (byte~) main::$0 + (byt Inferred type updated to byte in (unumber~) main::$2 ← (byte) main::i#2 + (byte) 1 Alias (byte) main::i#1 = (byte~) main::$2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$3 [8] if((byte) main::i#1<(byte) $a) goto main::@1 +Simple Condition (bool~) main::$3 [7] if((byte) main::i#1<(byte) $a) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 5 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/kc-ka-string-encoding.asm b/src/test/ref/kc-ka-string-encoding.asm index 3ad65b8e7..e9490676f 100644 --- a/src/test/ref/kc-ka-string-encoding.asm +++ b/src/test/ref/kc-ka-string-encoding.asm @@ -2,11 +2,14 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // strTemp[2] = 'e' .encoding "petscii_mixed" lda #'e' sta strTemp+2 + // strTemp[3] = 0 lda #0 sta strTemp+3 + // asm tay loop: lda strTemp,y @@ -15,6 +18,7 @@ main: { iny jmp loop done: + // } rts } strTemp: .text "v=X" diff --git a/src/test/ref/keyboard-glitch.asm b/src/test/ref/keyboard-glitch.asm index efc624c1a..e95a6658a 100644 --- a/src/test/ref/keyboard-glitch.asm +++ b/src/test/ref/keyboard-glitch.asm @@ -22,39 +22,57 @@ .const KEY_SPACE = $3c .label SCREEN = $400 main: { + // *BORDERCOL = GREEN lda #GREEN sta BORDERCOL __b1: + // menu() jsr menu jmp __b1 } menu: { __b1: + // keyboard_key_pressed(KEY_C) ldx #KEY_C jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_C) + // if(keyboard_key_pressed(KEY_C)!=0) cmp #0 beq __b2 + // pressed() jsr pressed + // } rts __b2: + // keyboard_key_pressed(KEY_I) ldx #KEY_I jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_I) + // if(keyboard_key_pressed(KEY_I)!=0) cmp #0 beq __b3 + // *BORDERCOL = RED lda #RED sta BORDERCOL + // asm sei rts __b3: + // keyboard_key_pressed(KEY_E) ldx #KEY_E jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_E) + // if(keyboard_key_pressed(KEY_E)!=0) cmp #0 beq __b4 + // *BORDERCOL = GREEN lda #GREEN sta BORDERCOL + // asm cli rts __b4: + // (*SCREEN)++; inc SCREEN jmp __b1 } @@ -64,16 +82,21 @@ menu: { // Returns zero if the key is not pressed and a non-zero value if the key is currently pressed // keyboard_key_pressed(byte register(X) key) keyboard_key_pressed: { + // colidx = key&7 txa and #7 tay + // rowidx = key>>3 txa lsr lsr lsr + // keyboard_matrix_read(rowidx) tax jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask,y + // } rts } // Read a single row of the keyboard matrix @@ -83,21 +106,29 @@ keyboard_key_pressed: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask,x sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } pressed: { + // (*BGCOL)++; inc BGCOL __b1: + // keyboard_key_pressed(KEY_SPACE) ldx #KEY_SPACE jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // if(keyboard_key_pressed(KEY_SPACE)!=0) cmp #0 bne __breturn jmp __b1 __breturn: + // } rts } // Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7) diff --git a/src/test/ref/keyboard-glitch.log b/src/test/ref/keyboard-glitch.log index c63cb6237..6cee22071 100644 --- a/src/test/ref/keyboard-glitch.log +++ b/src/test/ref/keyboard-glitch.log @@ -327,21 +327,21 @@ Alias (byte) keyboard_key_pressed::return#10 = (byte) keyboard_key_pressed::retu Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) menu::$2 [35] if((byte~) menu::$0==(byte) 0) goto menu::@4 -Simple Condition (bool~) menu::$6 [43] if((byte~) menu::$4==(byte) 0) goto menu::@5 -Simple Condition (bool~) menu::$9 [53] if((byte~) menu::$7==(byte) 0) goto menu::@6 -Simple Condition (bool~) pressed::$3 [68] if((byte~) pressed::$1==(byte) 0) goto pressed::@1 +Simple Condition (bool~) menu::$2 [23] if((byte~) menu::$0==(byte) 0) goto menu::@4 +Simple Condition (bool~) menu::$6 [29] if((byte~) menu::$4==(byte) 0) goto menu::@5 +Simple Condition (bool~) menu::$9 [37] if((byte~) menu::$7==(byte) 0) goto menu::@6 +Simple Condition (bool~) pressed::$3 [50] if((byte~) pressed::$1==(byte) 0) goto pressed::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [68] if((byte~) pressed::$1!=(byte) 0) goto pressed::@return +Negating conditional jump and destination [50] if((byte~) pressed::$1!=(byte) 0) goto pressed::@return Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte) keyboard_key_pressed::key#0 = KEY_C Constant (const byte) keyboard_key_pressed::key#1 = KEY_I Constant (const byte) keyboard_key_pressed::key#2 = KEY_E Constant (const byte) keyboard_key_pressed::key#3 = KEY_SPACE Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [24] if(true) goto main::@2 -if() condition always true - replacing block destination [27] if(true) goto menu::@2 -if() condition always true - replacing block destination [60] if(true) goto pressed::@2 +if() condition always true - replacing block destination [14] if(true) goto main::@2 +if() condition always true - replacing block destination [17] if(true) goto menu::@2 +if() condition always true - replacing block destination [44] if(true) goto pressed::@2 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/kickasm-uses-prevent-deletion.asm b/src/test/ref/kickasm-uses-prevent-deletion.asm index 0c5d58f0f..96976222b 100644 --- a/src/test/ref/kickasm-uses-prevent-deletion.asm +++ b/src/test/ref/kickasm-uses-prevent-deletion.asm @@ -8,6 +8,7 @@ .const BLACK = 0 .const WHITE = 1 main: { + // kickasm sei lda #SCREEN)/$40 .const toD0181_return = (>(SCREEN&$3fff)*4)|(>BITMAP)/4&$f .label i = $12 + // asm // Disable normal interrupt sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Disable kernal & basic lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_IO lda #PROCPORT_RAM_IO sta PROCPORT + // *D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3 lda #VIC_BMM|VIC_DEN|VIC_RSEL|3 sta D011 + // *CIA2_PORT_A_DDR = %00000011 lda #3 sta CIA2_PORT_A_DDR + // *CIA2_PORT_A = toDd00(gfx) lda #vicSelectGfxBank1_toDd001_return sta CIA2_PORT_A + // *D018 = toD018(SCREEN, BITMAP) lda #toD0181_return sta D018 + // bitmap_init(BITMAP) jsr bitmap_init + // bitmap_clear() jsr bitmap_clear + // screen_fill(SCREEN, $10) jsr screen_fill lda #0 sta.z i __b1: + // point_init(i) jsr point_init + // bitmap_plot(x_start[i], y_start[i]) lda.z i asl tay @@ -63,14 +75,17 @@ main: { ldy.z i ldx y_start,y jsr bitmap_plot + // for( byte i : 0..SIZE-1) inc.z i lda #SIZE-1+1 cmp.z i bne __b1 __b2: + // while(*RASTER!=$ff) lda #$ff cmp RASTER bne __b2 + // (*BORDERCOL)++; inc BORDERCOL jmp __b2 } @@ -80,16 +95,19 @@ bitmap_plot: { .label __1 = $e .label x = $a .label plotter = $c + // (byte*) { bitmap_plot_yhi[y], bitmap_plot_ylo[y] } lda bitmap_plot_yhi,x sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter + // x & $fff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 + // plotter += ( x & $fff8 ) lda.z plotter clc adc.z __1 @@ -97,12 +115,15 @@ bitmap_plot: { lda.z plotter+1 adc.z __1+1 sta.z plotter+1 + // abs16s(y_diff)) lda.z abs16s2_return+1 cmp.z abs16s1_return+1 bcc __b1 @@ -172,6 +201,7 @@ point_init: { bcc __b1 !: __b2: + // x_start[point_idx]*$10 lda.z point_idx asl tax @@ -187,15 +217,18 @@ point_init: { rol.z __9+1 asl.z __9 rol.z __9+1 + // x_cur[point_idx] = x_start[point_idx]*$10 lda.z __9 sta x_cur,x lda.z __9+1 sta x_cur+1,x + // (word)y_start[point_idx] ldy.z point_idx lda y_start,y sta.z __10 lda #0 sta.z __10+1 + // ((word)y_start[point_idx])*$10 asl.z __11 rol.z __11+1 asl.z __11 @@ -204,38 +237,51 @@ point_init: { rol.z __11+1 asl.z __11 rol.z __11+1 + // y_cur[point_idx] = ((word)y_start[point_idx])*$10 lda.z __11 sta y_cur,x lda.z __11+1 sta y_cur+1,x + // delay[point_idx] = DELAY lda #DELAY sta delay,y + // } rts __b1: + // if(x_diff<0) // X is driver - abs(y/x) is < 1 lda.z x_diff+1 bmi __b4 + // x_add[point_idx] = $10 // x add = 1.0 lda #$10 ldy.z point_idx sta x_add,y __b5: + // divr16s(0, x_diff, y_diff) jsr divr16s + // divr16s(0, x_diff, y_diff) + // x_stepf = divr16s(0, x_diff, y_diff) + // >x_stepf lda.z x_stepf+1 + // (>x_stepf)/$10 lsr lsr lsr lsr + // y_add[point_idx] = (signed byte)((>x_stepf)/$10) ldy.z point_idx sta y_add,y jmp __b2 __b4: + // x_add[point_idx] = -$10 // x add = -1.0 lda #-$10 ldy.z point_idx sta x_add,y jmp __b5 abs16s2___b1: + // -w sec lda #0 sbc.z y_diff @@ -245,6 +291,7 @@ point_init: { sta.z abs16s2_return+1 jmp __b6 abs16s1___b1: + // -w sec lda #0 sbc.z x_diff @@ -267,16 +314,23 @@ divr16s: { .label return = $a .label divisor = 8 .label rem = 6 + // if(dividend<0 || rem<0) lda.z rem+1 bmi __b1 ldy #0 __b2: + // if(divisor<0) lda.z divisor+1 bmi __b3 __b4: + // divr16u(dividendu, divisoru, remu) jsr divr16u + // divr16u(dividendu, divisoru, remu) + // resultu = divr16u(dividendu, divisoru, remu) + // if(neg==0) cpy #0 beq __breturn + // return -(signed word)resultu; sec lda #0 sbc.z return @@ -285,8 +339,10 @@ divr16s: { sbc.z return+1 sta.z return+1 __breturn: + // } rts __b3: + // -divisor sec lda #0 sbc.z divisoru @@ -294,11 +350,13 @@ divr16s: { lda #0 sbc.z divisoru+1 sta.z divisoru+1 + // neg = neg ^ 1 tya eor #1 tay jmp __b4 __b1: + // -rem sec lda #0 sbc.z remu @@ -327,20 +385,28 @@ divr16u: { sta.z dividend sta.z dividend+1 __b1: + // rem = rem << 1 asl.z rem rol.z rem+1 + // >dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp.z divisor+1 bcc __b3 @@ -349,10 +415,12 @@ divr16u: { cmp.z divisor bcc __b3 !: + // quotient++; inc.z quotient bne !+ inc.z quotient+1 !: + // rem = rem - divisor lda.z rem sec sbc.z divisor @@ -361,9 +429,11 @@ divr16u: { sbc.z divisor+1 sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // } rts } // Fill the screen with a specific char @@ -381,26 +451,32 @@ screen_fill: { __b1: ldx #0 __b2: + // *screen++ = ch lda #ch ldy #0 sta (screen),y + // *screen++ = ch; inc.z screen bne !+ inc.z screen+1 !: + // for(byte x:0..39) inx cpx #$28 bne __b2 + // for( byte y: 0..24) inc.z y lda #$19 cmp.z y bne __b1 + // } rts } // Clear all graphics on the bitmap bitmap_clear: { .label bitmap = 6 .label y = $12 + // (byte*) { bitmap_plot_yhi[0], bitmap_plot_ylo[0] } lda bitmap_plot_ylo sta.z bitmap lda bitmap_plot_yhi @@ -410,20 +486,25 @@ bitmap_clear: { __b1: ldx #0 __b2: + // *bitmap++ = 0 lda #0 tay sta (bitmap),y + // *bitmap++ = 0; inc.z bitmap bne !+ inc.z bitmap+1 !: + // for( byte x: 0..199 ) inx cpx #$c8 bne __b2 + // for( byte y: 0..39 ) inc.z y lda #$28 cmp.z y bne __b1 + // } rts } bitmap_init: { @@ -432,12 +513,16 @@ bitmap_init: { ldx #0 lda #$80 __b1: + // bitmap_plot_bit[x] = bits sta bitmap_plot_bit,x + // bits >>= 1 lsr + // if(bits==0) cmp #0 bne __b2 lda #$80 __b2: + // for(byte x : 0..255) inx cpx #0 bne __b1 @@ -447,16 +532,24 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: + // y&$7 lda #7 sax.z __7 + // yoffs lda.z yoffs+1 + // bitmap_plot_yhi[y] = >yoffs sta bitmap_plot_yhi,x + // if((y&$7)==7) lda #7 cmp.z __7 bne __b4 + // yoffs = yoffs + 40*8 clc lda.z yoffs adc #<$28*8 @@ -465,9 +558,11 @@ bitmap_init: { adc #>$28*8 sta.z yoffs+1 __b4: + // for(byte y : 0..255) inx cpx #0 bne __b3 + // } rts } // The coordinates of the lines to animate diff --git a/src/test/ref/line-anim.log b/src/test/ref/line-anim.log index c9dad6914..10d394abb 100644 --- a/src/test/ref/line-anim.log +++ b/src/test/ref/line-anim.log @@ -1492,27 +1492,27 @@ Identified duplicate assignment right side [200] (byte~) point_init::$20 ← (by Identified duplicate assignment right side [204] (byte~) point_init::$21 ← (byte) point_init::point_idx#0 * (const byte) SIZEOF_WORD Identified duplicate assignment right side [265] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) divr16u::$4 [10] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [18] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [25] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) divr16s::$3 [59] if((signed word) divr16s::divisor#0<(signed byte) 0) goto divr16s::@3 -Simple Condition (bool~) divr16s::$5 [79] if((byte) divr16s::neg#4==(byte) 0) goto divr16s::@5 -Simple Condition (bool~) main::$7 [145] if((byte) main::i#1!=rangelast(0,SIZE-1)) goto main::@1 -Simple Condition (bool~) main::$8 [148] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@6 -Simple Condition (bool~) point_init::abs16s1_$0 [165] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::abs16s1_@1 -Simple Condition (bool~) point_init::abs16s2_$0 [180] if((signed word) point_init::y_diff#0<(signed byte) 0) goto point_init::abs16s2_@1 -Simple Condition (bool~) point_init::$8 [193] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 -Simple Condition (bool~) point_init::$12 [196] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::@7 -Simple Condition (bool~) screen_fill::$0 [234] if((byte) screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2 -Simple Condition (bool~) screen_fill::$1 [238] if((byte) screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1 -Simple Condition (bool~) bitmap_init::$1 [248] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 -Simple Condition (bool~) bitmap_init::$2 [252] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 -Simple Condition (bool~) bitmap_init::$9 [268] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 -Simple Condition (bool~) bitmap_init::$11 [272] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 -Simple Condition (bool~) bitmap_clear::$1 [288] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 -Simple Condition (bool~) bitmap_clear::$2 [292] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 +Simple Condition (bool~) divr16u::$4 [8] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [13] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [18] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) divr16s::$3 [40] if((signed word) divr16s::divisor#0<(signed byte) 0) goto divr16s::@3 +Simple Condition (bool~) divr16s::$5 [53] if((byte) divr16s::neg#4==(byte) 0) goto divr16s::@5 +Simple Condition (bool~) main::$7 [98] if((byte) main::i#1!=rangelast(0,SIZE-1)) goto main::@1 +Simple Condition (bool~) main::$8 [101] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@6 +Simple Condition (bool~) point_init::abs16s1_$0 [114] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::abs16s1_@1 +Simple Condition (bool~) point_init::abs16s2_$0 [120] if((signed word) point_init::y_diff#0<(signed byte) 0) goto point_init::abs16s2_@1 +Simple Condition (bool~) point_init::$8 [126] if((word) point_init::abs16s1_return#2>(word) point_init::abs16s2_return#2) goto point_init::@1 +Simple Condition (bool~) point_init::$12 [128] if((signed word) point_init::x_diff#1<(signed byte) 0) goto point_init::@7 +Simple Condition (bool~) screen_fill::$0 [160] if((byte) screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2 +Simple Condition (bool~) screen_fill::$1 [163] if((byte) screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1 +Simple Condition (bool~) bitmap_init::$1 [172] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2 +Simple Condition (bool~) bitmap_init::$2 [176] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 +Simple Condition (bool~) bitmap_init::$9 [188] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@6 +Simple Condition (bool~) bitmap_init::$11 [192] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 +Simple Condition (bool~) bitmap_clear::$1 [205] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 +Simple Condition (bool~) bitmap_clear::$2 [208] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting || if()-condition to two if()s [41] (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1 +Rewriting || if()-condition to two if()s [28] (bool~) divr16s::$2 ← (bool~) divr16s::$0 || (bool~) divr16s::$1 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const word) divr16u::quotient#0 = 0 Constant (const byte) divr16u::i#0 = 0 @@ -1543,28 +1543,28 @@ Constant (const word) main::vicSelectGfxBank1_toDd001_$0 = (word)main::vicSelect Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [146] if(true) goto main::@6 +if() condition always true - replacing block destination [99] if(true) goto main::@6 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [23] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [25] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [143] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [145] if(main::i#1!=rangelast(0,SIZE-1)) goto main::@1 to (const byte) SIZE-(byte) 1+(number) 1 -Resolved ranged next value [232] screen_fill::x#1 ← ++ screen_fill::x#2 to ++ -Resolved ranged comparison value [234] if(screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2 to (number) $28 -Resolved ranged next value [236] screen_fill::y#1 ← ++ screen_fill::y#4 to ++ -Resolved ranged comparison value [238] if(screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1 to (number) $19 -Resolved ranged next value [250] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ -Resolved ranged comparison value [252] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 -Resolved ranged next value [270] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ -Resolved ranged comparison value [272] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 -Resolved ranged next value [286] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ -Resolved ranged comparison value [288] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 -Resolved ranged next value [290] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ -Resolved ranged comparison value [292] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 +Resolved ranged next value [16] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [18] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [96] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [98] if(main::i#1!=rangelast(0,SIZE-1)) goto main::@1 to (const byte) SIZE-(byte) 1+(number) 1 +Resolved ranged next value [158] screen_fill::x#1 ← ++ screen_fill::x#2 to ++ +Resolved ranged comparison value [160] if(screen_fill::x#1!=rangelast(0,$27)) goto screen_fill::@2 to (number) $28 +Resolved ranged next value [161] screen_fill::y#1 ← ++ screen_fill::y#4 to ++ +Resolved ranged comparison value [163] if(screen_fill::y#1!=rangelast(0,$18)) goto screen_fill::@1 to (number) $19 +Resolved ranged next value [174] bitmap_init::x#1 ← ++ bitmap_init::x#2 to ++ +Resolved ranged comparison value [176] if(bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1 to (number) 0 +Resolved ranged next value [190] bitmap_init::y#1 ← ++ bitmap_init::y#2 to ++ +Resolved ranged comparison value [192] if(bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5 to (number) 0 +Resolved ranged next value [203] bitmap_clear::x#1 ← ++ bitmap_clear::x#2 to ++ +Resolved ranged comparison value [205] if(bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2 to (number) $c8 +Resolved ranged next value [206] bitmap_clear::y#1 ← ++ bitmap_clear::y#4 to ++ +Resolved ranged comparison value [208] if(bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1 to (number) $28 Simplifying constant evaluating to zero (word)(const signed word) divr16s::dividend#0 in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero bitmap_plot_yhi in [277] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_yhi + (byte) 0) w= *((const byte*) bitmap_plot_ylo + (byte) 0) -Simplifying expression containing zero bitmap_plot_ylo in [277] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_yhi) w= *((const byte*) bitmap_plot_ylo + (byte) 0) +Simplifying expression containing zero bitmap_plot_yhi in [195] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_yhi + (byte) 0) w= *((const byte*) bitmap_plot_ylo + (byte) 0) +Simplifying expression containing zero bitmap_plot_ylo in [195] (word~) bitmap_clear::$3 ← *((const byte*) bitmap_plot_yhi) w= *((const byte*) bitmap_plot_ylo + (byte) 0) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const word) divr16s::dividendu#0 Eliminating unused constant (const word) divr16s::remu#0 @@ -1609,7 +1609,7 @@ Alias (byte~) point_init::$20 = (byte~) point_init::$19 (byte~) point_init::$21 Alias (byte~) bitmap_init::$7 = (byte~) bitmap_init::$3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) divr16s::$0 [18] if((const signed word) divr16s::dividend#0<(signed byte) 0) goto divr16s::@1 -Simple Condition (bool~) divr16s::$1 [164] if((signed word) divr16s::rem#0<(signed byte) 0) goto divr16s::@1 +Simple Condition (bool~) divr16s::$1 [160] if((signed word) divr16s::rem#0<(signed byte) 0) goto divr16s::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [19] (signed word~) divr16s::$8 ← - (const signed word) divr16s::dividend#0 Constant right-side identified [48] (byte~) main::vicSelectGfxBank1_toDd001_$1 ← > (const word) main::vicSelectGfxBank1_toDd001_$0 diff --git a/src/test/ref/linegen.asm b/src/test/ref/linegen.asm index ee7b84e51..4af0b8884 100644 --- a/src/test/ref/linegen.asm +++ b/src/test/ref/linegen.asm @@ -9,6 +9,7 @@ .label print_char_cursor = 3 .label print_line_cursor = $b main: { + // lin16u_gen(557, 29793, lintab1, 20) lda #lintab1 @@ -22,6 +23,7 @@ main: { lda #>$7461 sta.z lin16u_gen.max+1 jsr lin16u_gen + // lin16u_gen(31179, 63361, lintab2, 20) lda #lintab2 @@ -35,6 +37,7 @@ main: { lda #>$f781 sta.z lin16u_gen.max+1 jsr lin16u_gen + // lin16u_gen(0, $6488, lintab3, 20) lda #lintab3 @@ -47,7 +50,9 @@ main: { lda #>$6488 sta.z lin16u_gen.max+1 jsr lin16u_gen + // print_cls() jsr print_cls + // print_str(" ") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -57,30 +62,36 @@ main: { lda #>str sta.z print_str.str+1 jsr print_str + // print_word(557) lda #<$22d sta.z print_word.w lda #>$22d sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(31179) lda #<$79cb sta.z print_word.w lda #>$79cb sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(0) lda #<0 sta.z print_word.w sta.z print_word.w+1 jsr print_word + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -88,56 +99,69 @@ main: { jsr print_ln ldx #0 __b1: + // for(byte i=0; i<20; i++) cpx #$14 bcc __b2 lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str(" ") lda #str sta.z print_str.str+1 jsr print_str + // print_word(29793) lda #<$7461 sta.z print_word.w lda #>$7461 sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(63361) lda #<$f781 sta.z print_word.w lda #>$f781 sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word($6488) lda #<$6488 sta.z print_word.w lda #>$6488 sta.z print_word.w+1 jsr print_word + // print_ln() jsr print_ln + // } rts __b2: + // print_byte(i) stx.z print_byte.b lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_byte(i) jsr print_byte + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(lintab1[i]) txa asl tay @@ -146,11 +170,13 @@ main: { lda lintab1+1,y sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(lintab2[i]) txa asl tay @@ -159,11 +185,13 @@ main: { lda lintab2+1,y sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(lintab3[i]) txa asl tay @@ -172,7 +200,9 @@ main: { lda lintab3+1,y sta.z print_word.w+1 jsr print_word + // print_ln() jsr print_ln + // for(byte i=0; i<20; i++) inx jmp __b1 lintab1: .fill 2*$14, 0 @@ -186,6 +216,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -193,6 +224,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a zero-terminated string @@ -250,15 +294,19 @@ print_char: { print_str: { .label str = 5 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -271,7 +319,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -286,17 +336,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$14-1 @@ -333,10 +389,13 @@ lin16u_gen: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(ampl, length-1, 0) + // stepi = divr16u(ampl, length-1, 0) lda.z divr16u.return sta.z stepi lda.z divr16u.return+1 sta.z stepi+1 + // divr16u(0, length-1, rem16u) lda #<$14-1 sta.z divr16u.divisor lda #>$14-1 @@ -345,6 +404,9 @@ lin16u_gen: { sta.z divr16u.dividend sta.z divr16u.dividend+1 jsr divr16u + // divr16u(0, length-1, rem16u) + // stepf = divr16u(0, length-1, rem16u) + // step = { stepi, stepf } lda.z stepi sta.z step+2 lda.z stepi+1 @@ -353,6 +415,7 @@ lin16u_gen: { sta.z step lda.z stepf+1 sta.z step+1 + // val = { min, 0 } lda #<0 sta.z val sta.z val+1 @@ -364,6 +427,7 @@ lin16u_gen: { sta.z i sta.z i+1 __b1: + // for(word i=0; i$14 bcc __b2 @@ -372,18 +436,22 @@ lin16u_gen: { cmp #<$14 bcc __b2 !: + // } rts __b2: + // >val lda.z val+2 sta.z __6 lda.z val+3 sta.z __6+1 + // *lintab = >val ldy #0 lda.z __6 sta (lintab),y iny lda.z __6+1 sta (lintab),y + // val = val + step lda.z val clc adc.z step @@ -397,6 +465,7 @@ lin16u_gen: { lda.z val+3 adc.z step+3 sta.z val+3 + // lintab++; lda #SIZEOF_WORD clc adc.z lintab @@ -404,6 +473,7 @@ lin16u_gen: { bcc !+ inc.z lintab+1 !: + // for(word i=0; idividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp.z divisor+1 bcc __b3 @@ -448,10 +526,12 @@ divr16u: { cmp.z divisor bcc __b3 !: + // quotient++; inc.z quotient bne !+ inc.z quotient+1 !: + // rem = rem - divisor lda.z rem sec sbc.z divisor @@ -460,9 +540,12 @@ divr16u: { sbc.z divisor+1 sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/linegen.log b/src/test/ref/linegen.log index f0da09498..39474f99f 100644 --- a/src/test/ref/linegen.log +++ b/src/test/ref/linegen.log @@ -1550,15 +1550,15 @@ Identical Phi Values (byte*) print_char_cursor#80 (byte*) print_char_cursor#2 Identical Phi Values (byte*) print_char_cursor#83 (byte*) print_line_cursor#1 Identical Phi Values (byte*) print_line_cursor#24 (byte*) print_line_cursor#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) memset::$1 [41] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [51] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [65] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [78] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#11) goto print_ln::@1 -Simple Condition (bool~) main::$18 [189] if((byte) main::i#10<(byte) $14) goto main::@2 -Simple Condition (bool~) lin16u_gen::$5 [291] if((word) lin16u_gen::i#2<(word) lin16u_gen::length#3) goto lin16u_gen::@2 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) memset::$1 [26] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [33] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [41] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [50] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#11) goto print_ln::@1 +Simple Condition (bool~) main::$18 [125] if((byte) main::i#10<(byte) $14) goto main::@2 +Simple Condition (bool~) lin16u_gen::$5 [195] if((word) lin16u_gen::i#2<(word) lin16u_gen::length#3) goto lin16u_gen::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -1604,13 +1604,13 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [41] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [26] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) main::str Consolidated constant strings into (const byte*) main::str1 Successful SSA optimization Pass2ConstantStringConsolidation -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 Eliminating unused variable - keeping the phi block (word) rem16u#22 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/literal-char-minus-number.asm b/src/test/ref/literal-char-minus-number.asm index 5330c67fc..e08ccbef1 100644 --- a/src/test/ref/literal-char-minus-number.asm +++ b/src/test/ref/literal-char-minus-number.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // *SCREEN = 'a' - 1 lda #'a'-1 sta SCREEN + // } rts } diff --git a/src/test/ref/literal-strings.asm b/src/test/ref/literal-strings.asm index f35d7f217..72be6aa8c 100644 --- a/src/test/ref/literal-strings.asm +++ b/src/test/ref/literal-strings.asm @@ -6,13 +6,17 @@ main: { ldx #0 __b1: + // SCREEN[i] = msg[i] lda msg,x sta SCREEN,x + // (SCREEN+40)[i] = msgz[i] lda msgz,x sta SCREEN+$28,x + // for( byte i:0..3) inx cpx #4 bne __b1 + // } rts } msgz: .text "cml" diff --git a/src/test/ref/literal-word-pointer-0.asm b/src/test/ref/literal-word-pointer-0.asm index 0cf4c1a6b..c57fddf5f 100644 --- a/src/test/ref/literal-word-pointer-0.asm +++ b/src/test/ref/literal-word-pointer-0.asm @@ -3,15 +3,19 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // print("qwe") jsr print + // } rts str: .text "qwe" .byte 0 } print: { + // *(char**)0x80 = (char*)str lda #main.str sta $80+1 + // } rts } diff --git a/src/test/ref/literals.asm b/src/test/ref/literals.asm index b1958899d..c352295f4 100644 --- a/src/test/ref/literals.asm +++ b/src/test/ref/literals.asm @@ -5,19 +5,25 @@ .const ch = 'a' .const num = 1 main: { + // SCREEN[0] = ch lda #ch sta SCREEN + // SCREEN[2] = num lda #num sta SCREEN+2 ldx #0 __b1: + // SCREEN[4+i] = str[i] lda str,x sta SCREEN+4,x + // SCREEN[9+i] = nums[i] lda nums,x sta SCREEN+9,x + // for(byte i : 0..3) inx cpx #4 bne __b1 + // } rts } str: .text "bcde" diff --git a/src/test/ref/liverange-call-problem.asm b/src/test/ref/liverange-call-problem.asm index 6c8e076f5..6d82aedd9 100644 --- a/src/test/ref/liverange-call-problem.asm +++ b/src/test/ref/liverange-call-problem.asm @@ -8,37 +8,48 @@ .label w2 = 2 main: { .label SCREEN = $400 + // incw1() lda #<0 sta.z w1 sta.z w1+1 jsr incw1 + // incw2() lda #<0 sta.z w2 sta.z w2+1 jsr incw2 + // incw1() jsr incw1 + // incw2() jsr incw2 + // SCREEN[0] = w1 lda.z w1 sta SCREEN lda.z w1+1 sta SCREEN+1 + // SCREEN[2] = w2 lda.z w2 sta SCREEN+2*SIZEOF_WORD lda.z w2+1 sta SCREEN+2*SIZEOF_WORD+1 + // } rts } incw2: { + // w2++; inc.z w2 bne !+ inc.z w2+1 !: + // } rts } incw1: { + // w1++; inc.z w1 bne !+ inc.z w1+1 !: + // } rts } diff --git a/src/test/ref/liverange-call-problem.log b/src/test/ref/liverange-call-problem.log index 991023466..ab233c845 100644 --- a/src/test/ref/liverange-call-problem.log +++ b/src/test/ref/liverange-call-problem.log @@ -176,8 +176,8 @@ Identical Phi Values (word) w2#2 (word) w2#11 Identical Phi Values (word) w1#13 (word) w1#10 Identical Phi Values (word) w2#12 (word) w2#2 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [15] (byte~) main::$4 ← (byte) 0 * (const byte) SIZEOF_WORD -Constant right-side identified [17] (byte~) main::$5 ← (byte) 2 * (const byte) SIZEOF_WORD +Constant right-side identified [11] (byte~) main::$4 ← (byte) 0 * (const byte) SIZEOF_WORD +Constant right-side identified [13] (byte~) main::$5 ← (byte) 2 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) w1#0 = 0 Constant (const word) w2#0 = 0 @@ -186,7 +186,7 @@ Constant (const byte) main::$5 = 2*SIZEOF_WORD Successful SSA optimization Pass2ConstantIdentification Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_WORD in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero main::SCREEN in [16] *((const word*) main::SCREEN + (const byte) main::$4) ← (word) w1#12 +Simplifying expression containing zero main::SCREEN in [12] *((const word*) main::SCREEN + (const byte) main::$4) ← (word) w1#12 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) main::$4 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/liverange-problem-0.asm b/src/test/ref/liverange-problem-0.asm index 08f5b1ad5..3f3c3d4f9 100644 --- a/src/test/ref/liverange-problem-0.asm +++ b/src/test/ref/liverange-problem-0.asm @@ -9,28 +9,38 @@ .label SCREEN_1 = 4 .label SCREEN_2 = 6 __b1: + // malloc() lda #<$400 sta.z MEM lda #>$400 sta.z MEM+1 jsr malloc + // malloc() lda.z malloc.return sta.z malloc.return_1 lda.z malloc.return+1 sta.z malloc.return_1+1 + // SCREEN_1 = malloc() + // malloc() jsr malloc + // malloc() + // SCREEN_2 = malloc() jsr main rts main: { + // *SCREEN_1 = 0 lda #0 tay sta (SCREEN_1),y + // *SCREEN_2 = 0 sta (SCREEN_2),y + // } rts } malloc: { .label return = 6 .label return_1 = 4 + // return ++MEM; inc.z MEM bne !+ inc.z MEM+1 @@ -39,5 +49,6 @@ malloc: { sta.z return lda.z MEM+1 sta.z return+1 + // } rts } diff --git a/src/test/ref/liverange.asm b/src/test/ref/liverange.asm index 1bd26d853..c3d12f124 100644 --- a/src/test/ref/liverange.asm +++ b/src/test/ref/liverange.asm @@ -4,24 +4,36 @@ main: { .label SCREEN = $400 .label a = 2 + // inci() ldy #0 jsr inci + // inci() + // a=a+inci() clc adc #4 sta.z a + // inci() jsr inci + // inci() + // a=a+inci() clc adc.z a tax + // *SCREEN = i sty SCREEN + // *(SCREEN+1) = a stx SCREEN+1 + // } rts } inci: { + // i+7 tya clc adc #7 tay + // return i; tya + // } rts } diff --git a/src/test/ref/liverange.log b/src/test/ref/liverange.log index b7bf4d1e0..9ddd6471c 100644 --- a/src/test/ref/liverange.log +++ b/src/test/ref/liverange.log @@ -145,7 +145,7 @@ Identical Phi Values (byte) i#1 (byte) i#11 Identical Phi Values (byte) i#2 (byte) i#11 Identical Phi Values (byte) i#12 (byte) i#2 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [18] (byte*~) main::$4 ← (const byte*) main::SCREEN + (byte) 1 +Constant right-side identified [14] (byte*~) main::$4 ← (const byte*) main::SCREEN + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) i#0 = 0 Constant (const byte) main::a#0 = 4 diff --git a/src/test/ref/local-string.asm b/src/test/ref/local-string.asm index d63508b48..3044fbd0b 100644 --- a/src/test/ref/local-string.asm +++ b/src/test/ref/local-string.asm @@ -6,13 +6,17 @@ main: { .label screen = $400 ldx #0 __b1: + // while(msg[i]) lda msg,x cmp #0 bne __b2 + // } rts __b2: + // screen[i++] = msg[i] lda msg,x sta screen,x + // screen[i++] = msg[i]; inx jmp __b1 msg: .text "message 2 " diff --git a/src/test/ref/localscope-loops.asm b/src/test/ref/localscope-loops.asm index 725c39bae..52c48dd74 100644 --- a/src/test/ref/localscope-loops.asm +++ b/src/test/ref/localscope-loops.asm @@ -6,17 +6,22 @@ main: { ldx #0 __b1: + // SCREEN[i] = 'a' lda #'a' sta SCREEN,x + // for (byte i: 0..5) inx cpx #6 bne __b1 ldx #0 __b2: + // SCREEN[40+i] = 'b' lda #'b' sta SCREEN+$28,x + // for (byte i: 0..5) inx cpx #6 bne __b2 + // } rts } diff --git a/src/test/ref/localscope-simple.asm b/src/test/ref/localscope-simple.asm index 5dede837b..b49fc6695 100644 --- a/src/test/ref/localscope-simple.asm +++ b/src/test/ref/localscope-simple.asm @@ -6,9 +6,11 @@ main: { .const i = 0 .const i1 = 1 + // *BGCOL = i lda #i sta BGCOL lda #i1 sta BGCOL + // } rts } diff --git a/src/test/ref/long-pointer-0.asm b/src/test/ref/long-pointer-0.asm index ff0e7a273..e4903bccc 100644 --- a/src/test/ref/long-pointer-0.asm +++ b/src/test/ref/long-pointer-0.asm @@ -5,6 +5,7 @@ main: { .const long_ptr_zp = $12345678 @@ -13,8 +14,10 @@ main: { sta.z long_ptr+2 lda #>$12345678>>$10 sta.z long_ptr+3 + // asm nop lda (long_ptr_zp),y sta.z $ff + // } rts } diff --git a/src/test/ref/long-pointer-1.asm b/src/test/ref/long-pointer-1.asm index 293d2f433..9cfc91851 100644 --- a/src/test/ref/long-pointer-1.asm +++ b/src/test/ref/long-pointer-1.asm @@ -5,6 +5,7 @@ main: { .const long_ptr_zp = long_ptr .label long_ptr = 2 + // long_ptr = 0x12345678 lda #<$12345678 sta.z long_ptr lda #>$12345678 @@ -13,8 +14,10 @@ main: { sta.z long_ptr+2 lda #>$12345678>>$10 sta.z long_ptr+3 + // asm nop lda (long_ptr_zp),y sta.z $ff + // } rts } diff --git a/src/test/ref/longbranch-interrupt-problem.asm b/src/test/ref/longbranch-interrupt-problem.asm index c2b9291d5..46687dddf 100644 --- a/src/test/ref/longbranch-interrupt-problem.asm +++ b/src/test/ref/longbranch-interrupt-problem.asm @@ -6,32 +6,41 @@ .label BGCOL = $d020 .label col = 2 __bbegin: + // col = 0 lda #0 sta.z col jsr main rts main: { + // *KERNEL_IRQ = &irq lda #irq sta KERNEL_IRQ+1 __b1: + // if(col>10) lda.z col cmp #$a+1 bcc __b1 + // col = 0 lda #0 sta.z col jmp __b1 } irq: { + // asm lda $dc0d + // *BGCOL = col lda.z col sta BGCOL + // if(col!=0) lda.z col cmp #0 bne !__ea81+ jmp $ea81 !__ea81: + // col++; inc.z col + // } jmp $ea81 } diff --git a/src/test/ref/longbranch-interrupt-problem.log b/src/test/ref/longbranch-interrupt-problem.log index 4fd2b8ad7..9d9eaeb2b 100644 --- a/src/test/ref/longbranch-interrupt-problem.log +++ b/src/test/ref/longbranch-interrupt-problem.log @@ -92,12 +92,12 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [4] (bool~) main::$1 ← (byte) col <= (byte) $a from [3] (bool~) main::$0 ← (byte) col > (byte) $a Inversing boolean not [11] (bool~) irq::$1 ← (byte) col == (byte) 0 from [10] (bool~) irq::$0 ← (byte) col != (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) main::$1 [5] if((byte) col<=(byte) $a) goto main::@1 -Simple Condition (bool~) irq::$1 [12] if((byte) col==(byte) 0) goto irq::@return +Simple Condition (bool~) main::$1 [4] if((byte) col<=(byte) $a) goto main::@1 +Simple Condition (bool~) irq::$1 [10] if((byte) col==(byte) 0) goto irq::@return Successful SSA optimization Pass2ConditionalJumpSimplification if() condition always true - replacing block destination [2] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Rewriting conditional comparison [5] if((byte) col<=(byte) $a) goto main::@1 +Rewriting conditional comparison [4] if((byte) col<=(byte) $a) goto main::@1 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $a+1 in if((byte) col<(byte) $a+(number) 1) goto main::@1 diff --git a/src/test/ref/longjump.asm b/src/test/ref/longjump.asm index 2db2ba10b..710095b7b 100644 --- a/src/test/ref/longjump.asm +++ b/src/test/ref/longjump.asm @@ -6,6 +6,7 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // asm nop nop nop @@ -262,12 +263,15 @@ main: { nop nop nop + // SCREEN[i] = i txa sta SCREEN,x + // for(byte i : 0..10) inx cpx #$b beq !__b1+ jmp __b1 !__b1: + // } rts } diff --git a/src/test/ref/longjump2.asm b/src/test/ref/longjump2.asm index d0178639a..9f9011119 100644 --- a/src/test/ref/longjump2.asm +++ b/src/test/ref/longjump2.asm @@ -3,14 +3,18 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // long1() jsr long1 + // long2() jsr long2 + // } rts } long2: { .label SCREEN = $400 ldx #0 __b1: + // asm nop nop nop @@ -267,19 +271,23 @@ long2: { nop nop nop + // SCREEN[i] = i txa sta SCREEN,x + // for(byte i : 0..10) inx cpx #$b beq !__b1+ jmp __b1 !__b1: + // } rts } long1: { .label SCREEN = $400 ldx #0 __b1: + // asm nop nop nop @@ -536,12 +544,15 @@ long1: { nop nop nop + // SCREEN[i] = i txa sta SCREEN,x + // for(byte i : 0..10) inx cpx #$b beq !__b1+ jmp __b1 !__b1: + // } rts } diff --git a/src/test/ref/loop-break-continue.asm b/src/test/ref/loop-break-continue.asm index 2341a9edc..562fecc1a 100644 --- a/src/test/ref/loop-break-continue.asm +++ b/src/test/ref/loop-break-continue.asm @@ -11,23 +11,29 @@ main: { sta.z screen+1 ldx #0 __b1: + // if(str[i]==0) lda str,x cmp #0 bne __b2 __breturn: + // } rts __b2: + // if(str[i]==' ') lda str,x cmp #' ' beq __b4 + // *screen++ = str[i] lda str,x ldy #0 sta (screen),y + // *screen++ = str[i]; inc.z screen bne !+ inc.z screen+1 !: __b4: + // for( byte i: 0..255) inx cpx #0 beq __breturn diff --git a/src/test/ref/loop-break-continue.log b/src/test/ref/loop-break-continue.log index 07faf550e..f087084de 100644 --- a/src/test/ref/loop-break-continue.log +++ b/src/test/ref/loop-break-continue.log @@ -98,18 +98,18 @@ Alias (byte*) main::screen#2 = (byte*) main::screen#3 (byte*) main::screen#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [5] if(*((const byte*) main::str + (byte) main::i#2)!=(byte) 0) goto main::@2 -Simple Condition (bool~) main::$3 [9] if(*((const byte*) main::str + (byte) main::i#2)!=(byte) ' ') goto main::@4 -Simple Condition (bool~) main::$4 [16] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 +Simple Condition (bool~) main::$1 [4] if(*((const byte*) main::str + (byte) main::i#2)!=(byte) 0) goto main::@2 +Simple Condition (bool~) main::$3 [6] if(*((const byte*) main::str + (byte) main::i#2)!=(byte) ' ') goto main::@4 +Simple Condition (bool~) main::$4 [12] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [9] if(*((const byte*) main::str + (byte) main::i#2)==(byte) ' ') goto main::@5 -Negating conditional jump and destination [16] if((byte) main::i#1==rangelast(0,$ff)) goto main::@return +Negating conditional jump and destination [6] if(*((const byte*) main::str + (byte) main::i#2)==(byte) ' ') goto main::@5 +Negating conditional jump and destination [12] if((byte) main::i#1==rangelast(0,$ff)) goto main::@return Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) main::screen#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [14] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [16] if(main::i#1==rangelast(0,$ff)) goto main::@return to (number) 0 +Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [12] if(main::i#1==rangelast(0,$ff)) goto main::@return to (number) 0 Adding number conversion cast (unumber) 0 in if((byte) main::i#1==(number) 0) goto main::@return Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 0 diff --git a/src/test/ref/loop-break-nested.asm b/src/test/ref/loop-break-nested.asm index ea119845b..c3780d5d1 100644 --- a/src/test/ref/loop-break-nested.asm +++ b/src/test/ref/loop-break-nested.asm @@ -9,6 +9,7 @@ main: { lda #>$400 sta.z line+1 __b1: + // for(byte* line = $400; line<$400+40*25;line+=40 ) lda.z line+1 cmp #>$400+$28*$19 bcc !+ @@ -17,23 +18,29 @@ main: { cmp #<$400+$28*$19 bcs __breturn !: + // if(*line=='a') ldy #0 lda (line),y cmp #'a' bne b1 __breturn: + // } rts b1: ldy #0 __b3: + // if(line[i]=='a') lda #'a' cmp (line),y beq __b5 + // line[i] = 'a' sta (line),y + // for( byte i: 0..39) iny cpy #$28 bne __b3 __b5: + // line+=40 lda #$28 clc adc.z line diff --git a/src/test/ref/loop-break-nested.log b/src/test/ref/loop-break-nested.log index 9b17c5193..a1843814f 100644 --- a/src/test/ref/loop-break-nested.log +++ b/src/test/ref/loop-break-nested.log @@ -115,18 +115,18 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) main::line#4 (byte*) main::line#2 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [3] if((byte*) main::line#2<(word)(number) $400+(number) $28*(number) $19) goto main::@2 -Simple Condition (bool~) main::$2 [7] if(*((byte*) main::line#2)!=(byte) 'a') goto main::@4 -Simple Condition (bool~) main::$4 [13] if(*((byte*) main::line#2 + (byte) main::i#2)!=(byte) 'a') goto main::@7 -Simple Condition (bool~) main::$5 [18] if((byte) main::i#1!=rangelast(0,$27)) goto main::@6 +Simple Condition (bool~) main::$2 [5] if(*((byte*) main::line#2)!=(byte) 'a') goto main::@4 +Simple Condition (bool~) main::$4 [9] if(*((byte*) main::line#2 + (byte) main::i#2)!=(byte) 'a') goto main::@7 +Simple Condition (bool~) main::$5 [13] if((byte) main::i#1!=rangelast(0,$27)) goto main::@6 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [3] if((byte*) main::line#2>=(word)(number) $400+(number) $28*(number) $19) goto main::@return -Negating conditional jump and destination [13] if(*((byte*) main::line#2 + (byte) main::i#2)==(byte) 'a') goto main::@8 +Negating conditional jump and destination [9] if(*((byte*) main::line#2 + (byte) main::i#2)==(byte) 'a') goto main::@8 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) main::line#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [16] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [18] if(main::i#1!=rangelast(0,$27)) goto main::@6 to (number) $28 +Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$27)) goto main::@6 to (number) $28 Adding number conversion cast (unumber) $28 in if((byte) main::i#1!=(number) $28) goto main::@6 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $28 diff --git a/src/test/ref/loop-break.asm b/src/test/ref/loop-break.asm index 5105a8462..d178802c0 100644 --- a/src/test/ref/loop-break.asm +++ b/src/test/ref/loop-break.asm @@ -6,14 +6,18 @@ main: { ldx #0 __b1: + // if(SCREEN[i]=='a') lda SCREEN,x cmp #'a' beq __breturn + // SCREEN[i] = 'a' lda #'a' sta SCREEN,x + // for( byte i: 0..40*6) inx cpx #$28*6+1 bne __b1 __breturn: + // } rts } diff --git a/src/test/ref/loop-break.log b/src/test/ref/loop-break.log index 2893bd9f0..bee036d75 100644 --- a/src/test/ref/loop-break.log +++ b/src/test/ref/loop-break.log @@ -59,15 +59,15 @@ Inversing boolean not [3] (bool~) main::$1 ← *((const byte*) SCREEN + (byte) m Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [4] if(*((const byte*) SCREEN + (byte) main::i#2)!=(byte) 'a') goto main::@2 -Simple Condition (bool~) main::$2 [9] if((byte) main::i#1!=rangelast(0,$28*6)) goto main::@1 +Simple Condition (bool~) main::$1 [3] if(*((const byte*) SCREEN + (byte) main::i#2)!=(byte) 'a') goto main::@2 +Simple Condition (bool~) main::$2 [7] if((byte) main::i#1!=rangelast(0,$28*6)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [4] if(*((const byte*) SCREEN + (byte) main::i#2)==(byte) 'a') goto main::@return +Negating conditional jump and destination [3] if(*((const byte*) SCREEN + (byte) main::i#2)==(byte) 'a') goto main::@return Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,$28*6)) goto main::@1 to (number) $28*(number) 6+(number) 1 +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$28*6)) goto main::@1 to (number) $28*(number) 6+(number) 1 Adding number conversion cast (unumber) $28*6+1 in if((byte) main::i#1!=(number) $28*(number) 6+(number) 1) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Inlining constant with var siblings (const byte) main::i#0 diff --git a/src/test/ref/loop-continue.asm b/src/test/ref/loop-continue.asm index 57704c3b4..e806bc642 100644 --- a/src/test/ref/loop-continue.asm +++ b/src/test/ref/loop-continue.asm @@ -6,13 +6,17 @@ main: { ldx #0 __b1: + // if(SCREEN[i]==' ') lda SCREEN,x cmp #' ' beq __b3 + // SCREEN[i]++; inc SCREEN,x __b3: + // for( byte i: 0..40*6) inx cpx #$28*6+1 bne __b1 + // } rts } diff --git a/src/test/ref/loop-continue.log b/src/test/ref/loop-continue.log index 919e1727a..1a3b7cd0c 100644 --- a/src/test/ref/loop-continue.log +++ b/src/test/ref/loop-continue.log @@ -65,15 +65,15 @@ Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [4] if(*((const byte*) SCREEN + (byte) main::i#2)!=(byte) ' ') goto main::@2 -Simple Condition (bool~) main::$3 [10] if((byte) main::i#1!=rangelast(0,$28*6)) goto main::@1 +Simple Condition (bool~) main::$1 [3] if(*((const byte*) SCREEN + (byte) main::i#2)!=(byte) ' ') goto main::@2 +Simple Condition (bool~) main::$3 [7] if((byte) main::i#1!=rangelast(0,$28*6)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [4] if(*((const byte*) SCREEN + (byte) main::i#2)==(byte) ' ') goto main::@3 +Negating conditional jump and destination [3] if(*((const byte*) SCREEN + (byte) main::i#2)==(byte) ' ') goto main::@3 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$28*6)) goto main::@1 to (number) $28*(number) 6+(number) 1 +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$28*6)) goto main::@1 to (number) $28*(number) 6+(number) 1 Adding number conversion cast (unumber) $28*6+1 in if((byte) main::i#1!=(number) $28*(number) 6+(number) 1) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Inlining constant with var siblings (const byte) main::i#0 diff --git a/src/test/ref/loop-for-continue.asm b/src/test/ref/loop-for-continue.asm index 272361d97..89c8e0256 100644 --- a/src/test/ref/loop-for-continue.asm +++ b/src/test/ref/loop-for-continue.asm @@ -7,18 +7,24 @@ main: { ldy #0 ldx #0 __b1: + // for( char i =0; MESSAGE[i]; i++) lda MESSAGE,x cmp #0 bne __b2 + // } rts __b2: + // if(MESSAGE[i]==' ') lda MESSAGE,x cmp #' ' beq __b4 + // SCREEN[idx++] = MESSAGE[i] lda MESSAGE,x sta SCREEN,y + // SCREEN[idx++] = MESSAGE[i]; iny __b4: + // for( char i =0; MESSAGE[i]; i++) inx jmp __b1 } diff --git a/src/test/ref/loop-for-continue.log b/src/test/ref/loop-for-continue.log index c7b1f7148..102f1c70b 100644 --- a/src/test/ref/loop-for-continue.log +++ b/src/test/ref/loop-for-continue.log @@ -95,9 +95,9 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#5 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$2 [4] if((byte) 0!=*((const byte*) MESSAGE + (byte) main::i#2)) goto main::@2 -Simple Condition (bool~) main::$1 [8] if(*((const byte*) MESSAGE + (byte) main::i#2)!=(byte) ' ') goto main::@4 +Simple Condition (bool~) main::$1 [6] if(*((const byte*) MESSAGE + (byte) main::i#2)!=(byte) ' ') goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [8] if(*((const byte*) MESSAGE + (byte) main::i#2)==(byte) ' ') goto main::@5 +Negating conditional jump and destination [6] if(*((const byte*) MESSAGE + (byte) main::i#2)==(byte) ' ') goto main::@5 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte) main::idx#0 = 0 Constant (const byte) main::i#0 = 0 diff --git a/src/test/ref/loop-for-empty-body.asm b/src/test/ref/loop-for-empty-body.asm index 6e6d15b64..71ef140ea 100644 --- a/src/test/ref/loop-for-empty-body.asm +++ b/src/test/ref/loop-for-empty-body.asm @@ -6,15 +6,20 @@ main: { ldx #0 __b1: + // for (; str[b] != 0; ++b) lda str,x cmp #0 bne __b2 + // '0'+b txa axs #-['0'] + // SCREEN[0] = '0'+b // Empty body stx SCREEN + // } rts __b2: + // for (; str[b] != 0; ++b) inx jmp __b1 } diff --git a/src/test/ref/loop-for-empty-body.log b/src/test/ref/loop-for-empty-body.log index e4735d7a4..8a6ac3e32 100644 --- a/src/test/ref/loop-for-empty-body.log +++ b/src/test/ref/loop-for-empty-body.log @@ -71,7 +71,7 @@ Simple Condition (bool~) main::$1 [3] if(*((const byte*) str + (byte) main::b#2) Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::b#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero SCREEN in [8] *((const byte*) SCREEN + (byte) 0) ← (byte~) main::$0 +Simplifying expression containing zero SCREEN in [6] *((const byte*) SCREEN + (byte) 0) ← (byte~) main::$0 Successful SSA optimization PassNSimplifyExpressionWithZero Inlining constant with var siblings (const byte) main::b#0 Constant inlined main::b#0 = (byte) 0 diff --git a/src/test/ref/loop-for-sideeffect.asm b/src/test/ref/loop-for-sideeffect.asm index e9c3bb344..843116832 100644 --- a/src/test/ref/loop-for-sideeffect.asm +++ b/src/test/ref/loop-for-sideeffect.asm @@ -7,15 +7,19 @@ main: { lda #7 __b1: + // for(i=7;i++<7;) tax inx cmp #7 bcc __b2 + // (SCREEN)[i] = 'x' // The condition-evaluation should increment i - even if when it is not met - x should end up in 0x0408 lda #'x' sta SCREEN,x + // } rts __b2: + // SCREEN[i] = i txa sta SCREEN,x txa diff --git a/src/test/ref/loop-memset-min.asm b/src/test/ref/loop-memset-min.asm index 67a370848..e4d1ad18f 100644 --- a/src/test/ref/loop-memset-min.asm +++ b/src/test/ref/loop-memset-min.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // memset(SCREEN, 'c', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -19,17 +21,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // while(dst!=end) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #SCREEN sta.z sc+1 __b1: + // for(byte* sc=SCREEN; sc!=SCREEN+1000; sc++) lda.z sc+1 cmp #>SCREEN+$3e8 bne __b2 lda.z sc cmp #ball_y[hit_check] lda ball_y+1,x + // screen[3] = >ball_y[hit_check] sta screen+3 + // } rts } scan_for_lowest: { @@ -28,12 +37,16 @@ scan_for_lowest: { sta.z height+1 ldx #0 __b1: + // for (char i=0;i<8;i++) cpx #8 bcc __b2 + // } rts __b2: + // ball_y[i]=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@4 +Simple Condition (bool~) scan_for_lowest::$0 [16] if((byte) scan_for_lowest::i#2<(byte) 8) goto scan_for_lowest::@2 +Simple Condition (bool~) scan_for_lowest::$2 [19] if(*((const signed word*) ball_y + (byte~) scan_for_lowest::$3)>=(signed word) scan_for_lowest::height#2) goto scan_for_lowest::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) scan_for_lowest::lowest#0 = $ff Constant (const signed word) scan_for_lowest::height#0 = $258 Constant (const byte) scan_for_lowest::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::screen in [5] *((const byte*) main::screen + (byte) 0) ← (byte) main::hit_check#0 +Simplifying expression containing zero main::screen in [3] *((const byte*) main::screen + (byte) 0) ← (byte) main::hit_check#0 Successful SSA optimization PassNSimplifyExpressionWithZero Alias (byte~) main::$4 = (byte~) main::$3 Successful SSA optimization Pass2AliasElimination diff --git a/src/test/ref/loophead-problem-3.asm b/src/test/ref/loophead-problem-3.asm index d6c838a40..914e69edf 100644 --- a/src/test/ref/loophead-problem-3.asm +++ b/src/test/ref/loophead-problem-3.asm @@ -8,15 +8,24 @@ main: { .label result = 2 .label kaputt = $a + // mul16u(4,123) jsr mul16u + // mul16u(4,123) + // result = mul16u(4,123) + // kaputt = kaputt lda.z kaputt+1 + // *BGCOL = >kaputt sta BGCOL + // } rts } // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word @@ -47,16 +56,21 @@ mul16u: { lda #>4 sta.z a+1 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -71,8 +85,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 diff --git a/src/test/ref/loophead-problem-3.log b/src/test/ref/loophead-problem-3.log index 0645baa68..33549823f 100644 --- a/src/test/ref/loophead-problem-3.log +++ b/src/test/ref/loophead-problem-3.log @@ -209,7 +209,7 @@ Identical Phi Values (word) mul16u::b#1 (word) mul16u::b#0 Identical Phi Values (word) mul16u::a#5 (word) mul16u::a#1 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) mul16u::$0 [5] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [10] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16u::$3 [8] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const dword) mul16u::res#0 = 0 Constant (const word) mul16u::a#1 = 4 diff --git a/src/test/ref/loophead-problem.asm b/src/test/ref/loophead-problem.asm index 71bff08cc..fac3594c5 100644 --- a/src/test/ref/loophead-problem.asm +++ b/src/test/ref/loophead-problem.asm @@ -8,22 +8,30 @@ .label screen = $400 // Offending unroll variable main: { + // screen[40] = opcode lda #'a' sta screen+$28 + // popup_selector() jsr popup_selector + // screen[41] = opcode sta screen+$29 + // } rts } popup_selector: { lda #'a' ldx #0 __b1: + // for (byte k = 0; k <= 2; k++) cpx #2+1 bcc __b2 + // } rts __b2: + // screen[k] = opcode lda #'b' sta screen,x + // for (byte k = 0; k <= 2; k++) inx jmp __b1 } diff --git a/src/test/ref/loophead-problem.log b/src/test/ref/loophead-problem.log index c9808c9d1..c83974f37 100644 --- a/src/test/ref/loophead-problem.log +++ b/src/test/ref/loophead-problem.log @@ -117,13 +117,13 @@ Identical Phi Values (byte) opcode#1 (byte) opcode#12 Identical Phi Values (byte) opcode#13 (byte) opcode#6 Identical Phi Values (byte) opcode#10 (byte) opcode#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) popup_selector::$0 [14] if((byte) popup_selector::k#2<=(byte) 2) goto popup_selector::@2 +Simple Condition (bool~) popup_selector::$0 [11] if((byte) popup_selector::k#2<=(byte) 2) goto popup_selector::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) opcode#0 = 'a' Constant (const byte) popup_selector::k#0 = 0 Constant (const byte) opcode#3 = 'b' Successful SSA optimization Pass2ConstantIdentification -Rewriting conditional comparison [14] if((byte) popup_selector::k#2<=(byte) 2) goto popup_selector::@2 +Rewriting conditional comparison [11] if((byte) popup_selector::k#2<=(byte) 2) goto popup_selector::@2 Adding number conversion cast (unumber) 2+1 in if((byte) popup_selector::k#2<(byte) 2+(number) 1) goto popup_selector::@2 Adding number conversion cast (unumber) 1 in if((byte) popup_selector::k#2<(unumber)(byte) 2+(number) 1) goto popup_selector::@2 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/loopmin.asm b/src/test/ref/loopmin.asm index e6f695e33..6a51da9e1 100644 --- a/src/test/ref/loopmin.asm +++ b/src/test/ref/loopmin.asm @@ -5,14 +5,19 @@ main: { lda #0 ldx #$a __b1: + // if(i>5) cpx #5+1 bcc __b2 + // s=s+i stx.z $ff clc adc.z $ff __b2: + // i--; dex + // while (i>0) cpx #0 bne __b1 + // } rts } diff --git a/src/test/ref/loopmin.log b/src/test/ref/loopmin.log index 9dc404049..43f7fe3b8 100644 --- a/src/test/ref/loopmin.log +++ b/src/test/ref/loopmin.log @@ -83,13 +83,13 @@ Alias (byte) main::s#1 = (byte~) main::$2 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [5] if((byte) main::i#2<=(byte) 5) goto main::@2 -Simple Condition (bool~) main::$3 [9] if((byte) main::i#1>(byte) 0) goto main::@1 +Simple Condition (bool~) main::$1 [4] if((byte) main::i#2<=(byte) 5) goto main::@2 +Simple Condition (bool~) main::$3 [8] if((byte) main::i#1>(byte) 0) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = $a Constant (const byte) main::s#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Rewriting conditional comparison [5] if((byte) main::i#2<=(byte) 5) goto main::@2 +Rewriting conditional comparison [4] if((byte) main::i#2<=(byte) 5) goto main::@2 Adding number conversion cast (unumber) 5+1 in if((byte) main::i#2<(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::i#2<(unumber)(byte) 5+(number) 1) goto main::@2 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/loopnest.asm b/src/test/ref/loopnest.asm index ab2174034..4a552bd98 100644 --- a/src/test/ref/loopnest.asm +++ b/src/test/ref/loopnest.asm @@ -5,18 +5,24 @@ main: { ldy #$64 __b1: + // nest() jsr nest + // while (--i>0) dey cpy #0 bne __b1 + // } rts } nest: { ldx #$64 __b1: + // *SCREEN = j stx SCREEN + // while (--j>0) dex cpx #0 bne __b1 + // } rts } diff --git a/src/test/ref/loopnest.log b/src/test/ref/loopnest.log index f1ccb236f..99a90e3c9 100644 --- a/src/test/ref/loopnest.log +++ b/src/test/ref/loopnest.log @@ -83,8 +83,8 @@ Finalized unsigned number type (byte) 0 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [6] if((byte) main::i#1>(byte) 0) goto main::@1 -Simple Condition (bool~) nest::$0 [13] if((byte) nest::j#1>(byte) 0) goto nest::@1 +Simple Condition (bool~) main::$1 [5] if((byte) main::i#1>(byte) 0) goto main::@1 +Simple Condition (bool~) nest::$0 [12] if((byte) nest::j#1>(byte) 0) goto nest::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = $64 Constant (const byte) nest::j#0 = $64 diff --git a/src/test/ref/loopnest2.asm b/src/test/ref/loopnest2.asm index 0ecdfddba..3c99cea31 100644 --- a/src/test/ref/loopnest2.asm +++ b/src/test/ref/loopnest2.asm @@ -11,13 +11,17 @@ main: { lda #$64 sta.z j __b2: + // nest1() jsr nest1 + // while (--j>0) dec.z j lda.z j bne __b2 + // while (--i>0) dec.z i lda.z i bne __b1 + // } rts } nest1: { @@ -27,14 +31,18 @@ nest1: { __b1: lda #$64 __b2: + // nest2() jsr nest2 + // while (--j>0) sec sbc #1 cmp #0 bne __b2 + // while (--i>0) dec.z i lda.z i bne __b1 + // } rts } nest2: { @@ -42,12 +50,16 @@ nest2: { __b1: ldy #$64 __b2: + // *SCREEN = j sty SCREEN + // while (--j>0) dey cpy #0 bne __b2 + // while (--i>0) dex cpx #0 bne __b1 + // } rts } diff --git a/src/test/ref/loopnest2.log b/src/test/ref/loopnest2.log index d1b0e4a6f..a1bb6105f 100644 --- a/src/test/ref/loopnest2.log +++ b/src/test/ref/loopnest2.log @@ -197,12 +197,12 @@ Identical Phi Values (byte) main::i#2 (byte) main::i#5 Identical Phi Values (byte) nest1::i#2 (byte) nest1::i#5 Identical Phi Values (byte) nest2::i#2 (byte) nest2::i#4 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [8] if((byte) main::j#1>(byte) 0) goto main::@2 -Simple Condition (bool~) main::$2 [12] if((byte) main::i#1>(byte) 0) goto main::@1 -Simple Condition (bool~) nest1::$1 [22] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 -Simple Condition (bool~) nest1::$2 [26] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 -Simple Condition (bool~) nest2::$0 [35] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 -Simple Condition (bool~) nest2::$1 [39] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 +Simple Condition (bool~) main::$1 [7] if((byte) main::j#1>(byte) 0) goto main::@2 +Simple Condition (bool~) main::$2 [10] if((byte) main::i#1>(byte) 0) goto main::@1 +Simple Condition (bool~) nest1::$1 [19] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 +Simple Condition (bool~) nest1::$2 [22] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 +Simple Condition (bool~) nest2::$0 [31] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 +Simple Condition (bool~) nest2::$1 [34] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = $64 Constant (const byte) main::j#0 = $64 diff --git a/src/test/ref/loopnest3.asm b/src/test/ref/loopnest3.asm index b8b88fef1..60e020eb2 100644 --- a/src/test/ref/loopnest3.asm +++ b/src/test/ref/loopnest3.asm @@ -5,25 +5,33 @@ main: { ldy #0 __b1: + // b(i) jsr b + // for(byte i:0..100) iny cpy #$65 bne __b1 + // } rts } // b(byte register(Y) i) b: { + // c(i) tya jsr c + // } rts } // c(byte register(A) i) c: { ldx #0 __b1: + // SCREEN[j] = i sta SCREEN,x + // for( byte j: 0..100) inx cpx #$65 bne __b1 + // } rts } diff --git a/src/test/ref/loopnest3.log b/src/test/ref/loopnest3.log index 821c4ee88..de86cdd62 100644 --- a/src/test/ref/loopnest3.log +++ b/src/test/ref/loopnest3.log @@ -104,16 +104,16 @@ Identical Phi Values (byte) b::i#1 (byte) b::i#0 Identical Phi Values (byte) c::i#2 (byte) c::i#0 Identical Phi Values (byte) c::i#1 (byte) c::i#2 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 -Simple Condition (bool~) c::$0 [19] if((byte) c::j#1!=rangelast(0,$64)) goto c::@1 +Simple Condition (bool~) main::$1 [6] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) c::$0 [18] if((byte) c::j#1!=rangelast(0,$64)) goto c::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) c::j#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 -Resolved ranged next value [17] c::j#1 ← ++ c::j#2 to ++ -Resolved ranged comparison value [19] if(c::j#1!=rangelast(0,$64)) goto c::@1 to (number) $65 +Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [16] c::j#1 ← ++ c::j#2 to ++ +Resolved ranged comparison value [18] if(c::j#1!=rangelast(0,$64)) goto c::@1 to (number) $65 Adding number conversion cast (unumber) $65 in if((byte) main::i#1!=(number) $65) goto main::@1 Adding number conversion cast (unumber) $65 in if((byte) c::j#1!=(number) $65) goto c::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/loopsplit.asm b/src/test/ref/loopsplit.asm index f41eb6254..249b16893 100644 --- a/src/test/ref/loopsplit.asm +++ b/src/test/ref/loopsplit.asm @@ -6,17 +6,23 @@ main: { ldy #0 ldx #$64 __b1: + // while(--i>0) dex cpx #0 bne __b2 + // *SCREEN = s sty SCREEN + // } rts __b2: + // if(i>50) cpx #$32+1 bcs __b4 + // s--; dey jmp __b1 __b4: + // s++; iny jmp __b1 } diff --git a/src/test/ref/loopsplit.log b/src/test/ref/loopsplit.log index 0877053ea..2a6ec35be 100644 --- a/src/test/ref/loopsplit.log +++ b/src/test/ref/loopsplit.log @@ -96,12 +96,12 @@ Alias (byte) main::i#1 = (byte) main::i#3 (byte) main::i#4 (byte) main::i#5 Alias (byte) main::s#3 = (byte) main::s#7 (byte) main::s#6 (byte) main::s#4 (byte) main::s#5 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [5] if((byte) main::i#1>(byte) 0) goto main::@2 -Simple Condition (bool~) main::$1 [8] if((byte) main::i#1>(byte) $32) goto main::@4 +Simple Condition (bool~) main::$1 [7] if((byte) main::i#1>(byte) $32) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = $64 Constant (const byte) main::s#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Rewriting conditional comparison [8] if((byte) main::i#1>(byte) $32) goto main::@4 +Rewriting conditional comparison [7] if((byte) main::i#1>(byte) $32) goto main::@4 Adding number conversion cast (unumber) $32+1 in if((byte) main::i#1>=(byte) $32+(number) 1) goto main::@4 Adding number conversion cast (unumber) 1 in if((byte) main::i#1>=(unumber)(byte) $32+(number) 1) goto main::@4 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/ma_coalesce_problem.asm b/src/test/ref/ma_coalesce_problem.asm index 7097ff172..0eeb6d1e4 100644 --- a/src/test/ref/ma_coalesce_problem.asm +++ b/src/test/ref/ma_coalesce_problem.asm @@ -6,26 +6,33 @@ .label SCREEN = $400 main: { __b1: + // c1a = c1A lda c1A sta c1a + // i = 0 lda #0 sta i __b2: + // for (char i = 0; i < 40; ++i) lda i cmp #$28 bcc __b3 + // c1A += 3 lax c1A axs #-[3] stx c1A jmp __b1 __b3: + // SCREEN[i] = SINTABLE[c1a] ldy c1a lda SINTABLE,y ldy i sta SCREEN,y + // c1a += 4 lax c1a axs #-[4] stx c1a + // for (char i = 0; i < 40; ++i) inc i jmp __b2 c1a: .byte 0 diff --git a/src/test/ref/malloc-0.asm b/src/test/ref/malloc-0.asm index 4b43cf6ed..2e4f089b7 100644 --- a/src/test/ref/malloc-0.asm +++ b/src/test/ref/malloc-0.asm @@ -6,17 +6,21 @@ .label HEAP_TOP = $a000 .label BYTES = malloc.return __b1: + // malloc(0x100) jsr malloc jsr main rts main: { ldx #0 __b1: + // BYTES[i] = i txa sta BYTES,x + // for( byte i: 0..255) inx cpx #0 bne __b1 + // } rts } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. diff --git a/src/test/ref/malloc-0.log b/src/test/ref/malloc-0.log index 51b93d3a9..285ff13b8 100644 --- a/src/test/ref/malloc-0.log +++ b/src/test/ref/malloc-0.log @@ -157,14 +157,14 @@ Identical Phi Values (byte*) heap_head#3 (byte*) heap_head#1 Identical Phi Values (byte*) BYTES#2 (byte*) BYTES#0 Identical Phi Values (byte*) BYTES#1 (byte*) BYTES#2 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$0 [24] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 +Simple Condition (bool~) main::$0 [18] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const word) malloc::size#0 = $100 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [22] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [24] if(main::i#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 +Resolved ranged next value [16] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [18] if(main::i#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 Eliminating unused variable (byte*) heap_head#1 and assignment [1] (byte*) heap_head#1 ← (byte*) malloc::mem#0 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) 0 in if((byte) main::i#1!=(number) 0) goto main::@1 diff --git a/src/test/ref/malloc-1.asm b/src/test/ref/malloc-1.asm index 344138bad..36193abb4 100644 --- a/src/test/ref/malloc-1.asm +++ b/src/test/ref/malloc-1.asm @@ -7,6 +7,7 @@ .label HEAP_TOP = $a000 .label WORDS = malloc.return __b1: + // malloc(0x200) jsr malloc jsr main rts @@ -18,12 +19,14 @@ main: { sta.z w+1 ldx #0 __b1: + // *w++ = i txa ldy #0 sta (w),y tya iny sta (w),y + // *w++ = i; lda #SIZEOF_WORD clc adc.z w @@ -31,9 +34,11 @@ main: { bcc !+ inc.z w+1 !: + // for( byte i: 0..255) inx cpx #0 bne __b1 + // } rts } // Allocates a block of size bytes of memory, returning a pointer to the beginning of the block. diff --git a/src/test/ref/malloc-1.log b/src/test/ref/malloc-1.log index 918d19255..a51d8dcf2 100644 --- a/src/test/ref/malloc-1.log +++ b/src/test/ref/malloc-1.log @@ -163,14 +163,14 @@ Identical Phi Values (word) malloc::size#1 (word) malloc::size#0 Identical Phi Values (byte*) heap_head#3 (byte*) heap_head#1 Identical Phi Values (word*) WORDS#1 (word*) WORDS#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$0 [26] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 +Simple Condition (bool~) main::$0 [20] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const word) malloc::size#0 = $200 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [24] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [26] if(main::i#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 +Resolved ranged next value [18] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [20] if(main::i#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 Eliminating unused variable (byte*) heap_head#1 and assignment [1] (byte*) heap_head#1 ← (byte*) malloc::mem#0 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) 0 in if((byte) main::i#1!=(number) 0) goto main::@1 diff --git a/src/test/ref/mem-alignment.asm b/src/test/ref/mem-alignment.asm index 00f498b3e..fde9eae7f 100644 --- a/src/test/ref/mem-alignment.asm +++ b/src/test/ref/mem-alignment.asm @@ -5,20 +5,26 @@ main: { ldx #0 __b1: + // bs[i] = i txa sta bs,x + // for( byte i: 0..255) inx cpx #0 bne __b1 ldy #0 ldx #$ff __b2: + // cs[i] = bs[j--] lda bs,x sta cs,y + // cs[i] = bs[j--]; dex + // for( byte i: 0..255) iny cpy #0 bne __b2 + // } rts .align $100 cs: .fill $100, 0 diff --git a/src/test/ref/memcpy-0.asm b/src/test/ref/memcpy-0.asm index 479da3418..b27a315ac 100644 --- a/src/test/ref/memcpy-0.asm +++ b/src/test/ref/memcpy-0.asm @@ -16,8 +16,10 @@ .label SCREEN_COPY = $2400 main: { .const toD0181_return = (>(SCREEN_COPY&$3fff)*4)|(>CHARSET)/4&$f + // *D018 = toD018(SCREEN_COPY, CHARSET) lda #toD0181_return sta D018 + // memcpy(SCREEN_COPY, SCREEN, 0x0400) lda #<$400 sta.z memcpy.num lda #>$400 @@ -31,9 +33,12 @@ main: { lda #>SCREEN sta.z memcpy.source+1 jsr memcpy + // asm sei + // *PROCPORT = PROCPORT_RAM_CHARROM lda #PROCPORT_RAM_CHARROM sta PROCPORT + // memcpy(CHARSET, CHARGEN, 0x0800) lda #<$800 sta.z memcpy.num lda #>$800 @@ -47,9 +52,12 @@ main: { lda #>CHARGEN sta.z memcpy.source+1 jsr memcpy + // *PROCPORT = PROCPORT_BASIC_KERNEL_IO lda #PROCPORT_BASIC_KERNEL_IO sta PROCPORT + // asm cli + // } rts } // Copy block of memory (forwards) @@ -62,6 +70,7 @@ memcpy: { .label source = 2 .label destination = 4 .label num = 6 + // src_end = (char*)source+num lda.z src_end clc adc.z source @@ -70,17 +79,21 @@ memcpy: { adc.z source+1 sta.z src_end+1 __b1: + // while(src!=src_end) lda.z src+1 cmp.z src_end+1 bne __b2 lda.z src cmp.z src_end bne __b2 + // } rts __b2: + // *dst++ = *src++ ldy #0 lda (src),y sta (dst),y + // *dst++ = *src++; inc.z dst bne !+ inc.z dst+1 diff --git a/src/test/ref/memcpy-0.log b/src/test/ref/memcpy-0.log index 24b3c0a1f..32daf1cdf 100644 --- a/src/test/ref/memcpy-0.log +++ b/src/test/ref/memcpy-0.log @@ -259,7 +259,7 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) memcpy::src_end#1 (byte*) memcpy::src_end#0 Identical Phi Values (void*) memcpy::destination#3 (void*) memcpy::destination#2 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memcpy::$2 [8] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 +Simple Condition (bool~) memcpy::$2 [7] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::toD0181_screen#0 = SCREEN_COPY Constant (const byte*) main::toD0181_gfx#0 = CHARSET diff --git a/src/test/ref/memcpy-1.asm b/src/test/ref/memcpy-1.asm index e11cf0bac..9ccb8f45e 100644 --- a/src/test/ref/memcpy-1.asm +++ b/src/test/ref/memcpy-1.asm @@ -19,9 +19,11 @@ main: { lda #>CAMELOT sta.z camelot+1 __b1: + // *sc++ = *camelot++ ldy #0 lda (camelot),y sta (sc),y + // *sc++ = *camelot++; inc.z sc bne !+ inc.z sc+1 @@ -30,6 +32,7 @@ main: { bne !+ inc.z camelot+1 !: + // for( char i: 0..6) inx cpx #7 bne __b1 @@ -43,9 +46,11 @@ main: { lda #>reigns_1 sta.z reigns+1 __b2: + // *sc2++ = *reigns++ ldy #0 lda (reigns),y sta (sc2),y + // *sc2++ = *reigns++; inc.z sc2 bne !+ inc.z sc2+1 @@ -54,9 +59,11 @@ main: { bne !+ inc.z reigns+1 !: + // for( char i: 0..5) inx cpx #6 bne __b2 + // memcpy(SCREEN+10, CAMELOT, 7) lda #<7 sta.z memcpy.num lda #>7 @@ -70,6 +77,7 @@ main: { lda #>CAMELOT sta.z memcpy.source+1 jsr memcpy + // memcpy(SCREEN+50, "rules", 5) lda #<5 sta.z memcpy.num lda #>5 @@ -83,6 +91,7 @@ main: { lda #>__5 sta.z memcpy.source+1 jsr memcpy + // } rts __5: .text "rules" .byte 0 @@ -99,6 +108,7 @@ memcpy: { .label source = 4 .label destination = 6 .label num = 8 + // src_end = (char*)source+num lda.z src_end clc adc.z source @@ -107,17 +117,21 @@ memcpy: { adc.z source+1 sta.z src_end+1 __b1: + // while(src!=src_end) lda.z src+1 cmp.z src_end+1 bne __b2 lda.z src cmp.z src_end bne __b2 + // } rts __b2: + // *dst++ = *src++ ldy #0 lda (src),y sta (dst),y + // *dst++ = *src++; inc.z dst bne !+ inc.z dst+1 diff --git a/src/test/ref/memcpy-1.log b/src/test/ref/memcpy-1.log index 22a898e08..c1b4247e1 100644 --- a/src/test/ref/memcpy-1.log +++ b/src/test/ref/memcpy-1.log @@ -232,9 +232,9 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte*) memcpy::src_end#1 (byte*) memcpy::src_end#0 Identical Phi Values (void*) memcpy::destination#3 (void*) memcpy::destination#2 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memcpy::$2 [8] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 -Simple Condition (bool~) main::$2 [27] if((byte) main::i#1!=rangelast(0,6)) goto main::@1 -Simple Condition (bool~) main::$3 [37] if((byte) main::i1#1!=rangelast(0,5)) goto main::@3 +Simple Condition (bool~) memcpy::$2 [7] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2 +Simple Condition (bool~) main::$2 [21] if((byte) main::i#1!=rangelast(0,6)) goto main::@1 +Simple Condition (bool~) main::$3 [31] if((byte) main::i1#1!=rangelast(0,5)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::sc#0 = SCREEN Constant (const byte*) main::camelot#0 = CAMELOT @@ -249,10 +249,10 @@ Constant (const void*) memcpy::destination#1 = (void*)SCREEN+$32 Constant (const void*) memcpy::source#1 = (void*)main::$5 Constant (const word) memcpy::num#1 = 5 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [25] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [27] if(main::i#1!=rangelast(0,6)) goto main::@1 to (number) 7 -Resolved ranged next value [35] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [37] if(main::i1#1!=rangelast(0,5)) goto main::@3 to (number) 6 +Resolved ranged next value [19] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [21] if(main::i#1!=rangelast(0,6)) goto main::@1 to (number) 7 +Resolved ranged next value [29] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [31] if(main::i1#1!=rangelast(0,5)) goto main::@3 to (number) 6 Eliminating unused variable (void*) memcpy::return#2 and assignment [24] (void*) memcpy::return#2 ← (void*) memcpy::destination#2 Eliminating unused variable (void*) memcpy::return#3 and assignment [26] (void*) memcpy::return#3 ← (void*) memcpy::destination#2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/memory-heap.asm b/src/test/ref/memory-heap.asm index 1c096a0ba..dd9abcd83 100644 --- a/src/test/ref/memory-heap.asm +++ b/src/test/ref/memory-heap.asm @@ -10,35 +10,47 @@ main: { .label screen = $400 .label buf1 = 4 .label buf2 = 6 + // malloc(100) lda #HEAP_TOP sta.z heap_head+1 jsr malloc + // malloc(100) lda.z malloc.mem sta.z buf1 lda.z malloc.mem+1 sta.z buf1+1 jsr malloc + // malloc(100) ldy #0 __b1: + // buf1[i] = i tya sta (buf1),y + // 255-i tya eor #$ff clc adc #$ff+1 + // buf2[i] = 255-i sta (buf2),y + // for(unsigned char i:0..99) iny cpy #$64 bne __b1 + // free(buf1) jsr free + // free(buf2) jsr free + // screen[0] = *buf1 ldy #0 lda (buf1),y sta screen + // screen[1] = *buf2 lda (buf2),y sta screen+1 + // } rts } // A block of memory previously allocated by a call to malloc is deallocated, making it available again for further allocations. @@ -50,6 +62,7 @@ free: { // The content of the newly allocated block of memory is not initialized, remaining with indeterminate values. malloc: { .label mem = 6 + // mem = heap_head-size lda.z heap_head sec sbc #<$64 @@ -57,9 +70,11 @@ malloc: { lda.z heap_head+1 sbc #>$64 sta.z mem+1 + // heap_head = mem lda.z mem sta.z heap_head lda.z mem+1 sta.z heap_head+1 + // } rts } diff --git a/src/test/ref/memory-heap.log b/src/test/ref/memory-heap.log index 2f2873629..6e1320c6f 100644 --- a/src/test/ref/memory-heap.log +++ b/src/test/ref/memory-heap.log @@ -260,16 +260,16 @@ Identical Phi Values (byte*) main::buf2#1 (byte*) main::buf2#0 Identical Phi Values (byte*) heap_head#11 (byte*) heap_head#10 Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#11 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$5 [33] if((byte) main::i#1!=rangelast(0,$63)) goto main::@1 +Simple Condition (bool~) main::$5 [27] if((byte) main::i#1!=rangelast(0,$63)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const word) malloc::size#0 = $64 Constant (const word) malloc::size#1 = $64 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [31] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [33] if(main::i#1!=rangelast(0,$63)) goto main::@1 to (number) $64 -Simplifying expression containing zero main::screen in [41] *((const byte*) main::screen + (byte) 0) ← *((byte*) main::buf1#0) +Resolved ranged next value [25] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [27] if(main::i#1!=rangelast(0,$63)) goto main::@1 to (number) $64 +Simplifying expression containing zero main::screen in [32] *((const byte*) main::screen + (byte) 0) ← *((byte*) main::buf1#0) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) free::ptr#0 and assignment [20] (void*) free::ptr#0 ← (void*)(byte*) main::buf1#0 Eliminating unused variable (void*) free::ptr#1 and assignment [22] (void*) free::ptr#1 ← (void*)(byte*) main::buf2#0 diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.asm b/src/test/ref/millfork-benchmarks/linkedlist-kc.asm index 4400f67ea..a22c530e9 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.asm +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.asm @@ -10,6 +10,7 @@ .label root = 2 .label Ticks_1 = $c __b1: + // last_time lda #<0 sta.z last_time sta.z last_time+1 @@ -18,6 +19,7 @@ __b1: main: { .label __5 = 8 .label i = 4 + // start() jsr start ldx #0 lda #<$400 @@ -25,6 +27,7 @@ main: { lda #>$400 sta.z print_char_cursor+1 __b1: + // init() jsr init lda #<0 sta.z root @@ -34,7 +37,9 @@ main: { sta.z i sta.z i+1 __b2: + // prepend(i) jsr prepend + // for(i : 0..2999) inc.z i bne !+ inc.z i+1 @@ -45,21 +50,29 @@ main: { lda.z i cmp #<$bb8 bne __b2 + // sum() jsr sum + // print_char((byte)sum()) lda.z __5 jsr print_char + // for(c : 0..4) inx cpx #5 bne __b1 + // end() jsr end + // } rts } end: { + // Ticks = last_time lda.z last_time sta.z Ticks lda.z last_time+1 sta.z Ticks+1 + // start() jsr start + // last_time -= Ticks lda.z last_time sec sbc.z Ticks @@ -67,12 +80,16 @@ end: { lda.z last_time+1 sbc.z Ticks+1 sta.z last_time+1 + // Ticks = last_time lda.z last_time sta.z Ticks_1 lda.z last_time+1 sta.z Ticks_1+1 + // print_word(Ticks) jsr print_word + // print_ln() jsr print_ln + // } rts } // Print a newline @@ -82,6 +99,7 @@ print_ln: { lda #>$400 sta.z print_line_cursor+1 __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -89,6 +107,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } start: { .label LAST_TIME = last_time + // asm jsr $ffde sta LAST_TIME stx LAST_TIME+1 + // } rts } sum: { .label current = 2 .label s = 8 .label return = 8 + // current = root lda #<0 sta.z s sta.z s+1 __b1: + // while (current) lda.z current+1 cmp #>0 bne __b2 lda.z current cmp #<0 bne __b2 + // } rts __b2: + // s += current->value ldy #OFFSET_STRUCT_NODE_VALUE clc lda.z s @@ -171,6 +208,7 @@ sum: { lda.z s+1 adc (current),y sta.z s+1 + // current = current->next ldy #0 lda (current),y pha @@ -185,28 +223,35 @@ sum: { prepend: { .label new = $e .label x = 4 + // alloc() jsr alloc + // new = alloc() + // new->next = root ldy #0 lda.z root sta (new),y iny lda.z root+1 sta (new),y + // new->value = x ldy #OFFSET_STRUCT_NODE_VALUE lda.z x sta (new),y iny lda.z x+1 sta (new),y + // root = new lda.z new sta.z root lda.z new+1 sta.z root+1 + // } rts } alloc: { .label __1 = $e .label return = $e + // heap + free_ lda.z free_ asl sta.z __1 @@ -222,10 +267,12 @@ alloc: { lda.z return+1 adc #>heap sta.z return+1 + // free_++; inc.z free_ bne !+ inc.z free_+1 !: + // } rts } init: { diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.log b/src/test/ref/millfork-benchmarks/linkedlist-kc.log index 1c20b87c5..5049a4d05 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.log +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.log @@ -954,10 +954,10 @@ Identical Phi Values (byte*) print_char_cursor#37 (byte*) print_char_cursor#10 Identical Phi Values (word) Ticks#22 (word) Ticks#0 Identical Phi Values (byte*) print_line_cursor#29 (byte*) print_char_cursor#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -Simple Condition (bool~) sum::$2 [117] if((struct node*)(word) 0!=(struct node*) sum::current#3) goto sum::@2 -Simple Condition (bool~) main::$4 [148] if((word) main::i#2!=rangelast(0,$bb7)) goto main::@2 -Simple Condition (bool~) main::$8 [161] if((byte) main::c#2!=rangelast(0,4)) goto main::@1 +Simple Condition (bool~) print_ln::$1 [5] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 +Simple Condition (bool~) sum::$2 [74] if((struct node*)(word) 0!=(struct node*) sum::current#3) goto sum::@2 +Simple Condition (bool~) main::$4 [95] if((word) main::i#2!=rangelast(0,$bb7)) goto main::@2 +Simple Condition (bool~) main::$8 [104] if((byte) main::c#2!=rangelast(0,4)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const word) Ticks#0 = 0 @@ -975,19 +975,19 @@ Constant (const byte) main::c#0 = 0 Constant (const byte) main::c#1 = 0 Constant (const word) main::i#1 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [146] main::i#2 ← ++ main::i#3 to ++ -Resolved ranged comparison value [148] if(main::i#2!=rangelast(0,$bb7)) goto main::@2 to (number) $bb8 -Resolved ranged next value [159] main::c#2 ← ++ main::c#8 to ++ -Resolved ranged comparison value [161] if(main::c#2!=rangelast(0,4)) goto main::@1 to (number) 5 -Converting *(pointer+n) to pointer[n] [102] *((struct node**~) prepend::$1) ← (struct node*) root#20 -- *((struct node**)prepend::new#1 + OFFSET_STRUCT_NODE_NEXT) -Converting *(pointer+n) to pointer[n] [104] *((word*~) prepend::$2) ← (word) prepend::x#0 -- *((word*)prepend::new#1 + OFFSET_STRUCT_NODE_VALUE) -Converting *(pointer+n) to pointer[n] [120] (word) sum::s#2 ← (word) sum::s#3 + *((word*~) sum::$0) -- *((word*)sum::current#3 + OFFSET_STRUCT_NODE_VALUE) -Converting *(pointer+n) to pointer[n] [122] (struct node*) sum::current#2 ← *((struct node**~) sum::$1) -- *((struct node**)sum::current#3 + OFFSET_STRUCT_NODE_NEXT) +Resolved ranged next value [93] main::i#2 ← ++ main::i#3 to ++ +Resolved ranged comparison value [95] if(main::i#2!=rangelast(0,$bb7)) goto main::@2 to (number) $bb8 +Resolved ranged next value [102] main::c#2 ← ++ main::c#8 to ++ +Resolved ranged comparison value [104] if(main::c#2!=rangelast(0,4)) goto main::@1 to (number) 5 +Converting *(pointer+n) to pointer[n] [62] *((struct node**~) prepend::$1) ← (struct node*) root#20 -- *((struct node**)prepend::new#1 + OFFSET_STRUCT_NODE_NEXT) +Converting *(pointer+n) to pointer[n] [64] *((word*~) prepend::$2) ← (word) prepend::x#0 -- *((word*)prepend::new#1 + OFFSET_STRUCT_NODE_VALUE) +Converting *(pointer+n) to pointer[n] [76] (word) sum::s#2 ← (word) sum::s#3 + *((word*~) sum::$0) -- *((word*)sum::current#3 + OFFSET_STRUCT_NODE_VALUE) +Converting *(pointer+n) to pointer[n] [78] (struct node*) sum::current#2 ← *((struct node**~) sum::$1) -- *((struct node**)sum::current#3 + OFFSET_STRUCT_NODE_NEXT) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (struct node**)prepend::new#1 in [101] (struct node**~) prepend::$1 ← (struct node**)(struct node*) prepend::new#1 + (const byte) OFFSET_STRUCT_NODE_NEXT -Simplifying expression containing zero (struct node**)prepend::new#1 in [102] *((struct node**)(struct node*) prepend::new#1 + (const byte) OFFSET_STRUCT_NODE_NEXT) ← (struct node*) root#20 -Simplifying expression containing zero (struct node**)sum::current#3 in [121] (struct node**~) sum::$1 ← (struct node**)(struct node*) sum::current#3 + (const byte) OFFSET_STRUCT_NODE_NEXT -Simplifying expression containing zero (struct node**)sum::current#3 in [122] (struct node*) sum::current#2 ← *((struct node**)(struct node*) sum::current#3 + (const byte) OFFSET_STRUCT_NODE_NEXT) +Simplifying expression containing zero (struct node**)prepend::new#1 in [61] (struct node**~) prepend::$1 ← (struct node**)(struct node*) prepend::new#1 + (const byte) OFFSET_STRUCT_NODE_NEXT +Simplifying expression containing zero (struct node**)prepend::new#1 in [62] *((struct node**)(struct node*) prepend::new#1 + (const byte) OFFSET_STRUCT_NODE_NEXT) ← (struct node*) root#20 +Simplifying expression containing zero (struct node**)sum::current#3 in [77] (struct node**~) sum::$1 ← (struct node**)(struct node*) sum::current#3 + (const byte) OFFSET_STRUCT_NODE_NEXT +Simplifying expression containing zero (struct node**)sum::current#3 in [78] (struct node*) sum::current#2 ← *((struct node**)(struct node*) sum::current#3 + (const byte) OFFSET_STRUCT_NODE_NEXT) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (struct node**~) prepend::$1 and assignment [40] (struct node**~) prepend::$1 ← (struct node**)(struct node*) prepend::new#1 Eliminating unused variable (word*~) prepend::$2 and assignment [42] (word*~) prepend::$2 ← (word*)(struct node*) prepend::new#1 + (const byte) OFFSET_STRUCT_NODE_VALUE diff --git a/src/test/ref/millfork-benchmarks/plasma-kc.asm b/src/test/ref/millfork-benchmarks/plasma-kc.asm index 7c9a7fe8a..00e3f15e3 100644 --- a/src/test/ref/millfork-benchmarks/plasma-kc.asm +++ b/src/test/ref/millfork-benchmarks/plasma-kc.asm @@ -16,9 +16,11 @@ .label Ticks = $10 .label Ticks_1 = $13 __b1: + // last_time lda #<0 sta.z last_time sta.z last_time+1 + // rand_seed sta.z rand_seed sta.z rand_seed+1 jsr main @@ -27,17 +29,24 @@ main: { .label block = $e .label v = $f .label count = 4 + // rand_seed = 6474 lda #<$194a sta.z rand_seed lda #>$194a sta.z rand_seed+1 + // makechar() jsr makechar + // start() jsr start + // block = *CIA2_PORT_A lda CIA2_PORT_A sta.z block + // tmp = block & 0xFC lda #$fc and.z block + // *CIA2_PORT_A = tmp sta CIA2_PORT_A + // v = *VIC_MEMORY lda VIC_MEMORY sta.z v lda #<$1f4 @@ -46,33 +55,43 @@ main: { sta.z count+1 /* Run the demo until a key was hit */ __b1: + // while (count) lda.z count+1 cmp #>0 bne __b2 lda.z count cmp #<0 bne __b2 + // *VIC_MEMORY = v lda.z v sta VIC_MEMORY + // *CIA2_PORT_A = block lda.z block sta CIA2_PORT_A + // end() jsr end + // } rts __b2: + // doplasma ((char*)SCREEN1) lda #SCREEN1 sta.z doplasma.scrn+1 jsr doplasma + // *VIC_MEMORY = PAGE1 lda #PAGE1 sta VIC_MEMORY + // doplasma ((char*)SCREEN2) lda #SCREEN2 sta.z doplasma.scrn+1 jsr doplasma + // *VIC_MEMORY = PAGE2 lda #PAGE2 sta VIC_MEMORY + // --count; lda.z count bne !+ dec.z count+1 @@ -96,6 +115,7 @@ doplasma: { sta.z c1a sta.z ii __b1: + // for (ii = 0; ii < 25; ++ii) lda.z ii cmp #$19 bcc __b2 @@ -106,19 +126,24 @@ doplasma: { lda #0 sta.z i __b3: + // for (i = 0; i < 40; ++i) lda.z i cmp #$28 bcc __b4 ldx #0 __b5: + // for (jj = 0; jj < 25; ++jj) cpx #$19 bcc b1 + // } rts b1: ldy #0 __b6: + // for (j = 0; j < 40; ++j) cpy #$28 bcc __b7 + // scrn += 40 lda #$28 clc adc.z scrn @@ -126,54 +151,71 @@ doplasma: { bcc !+ inc.z scrn+1 !: + // for (jj = 0; jj < 25; ++jj) inx jmp __b5 __b7: + // xbuf[j] + ybuf[jj] lda xbuf,y clc adc ybuf,x + // scrn[j] = (xbuf[j] + ybuf[jj]) sta (scrn),y + // for (j = 0; j < 40; ++j) iny jmp __b6 __b4: + // sinustable[c2a] + sinustable[c2b] ldy.z c2a lda sinustable,y ldy.z c2b clc adc sinustable,y + // xbuf[i] = (sinustable[c2a] + sinustable[c2b]) ldy.z i sta xbuf,y + // c2a += 3 lax.z c2a axs #-[3] stx.z c2a + // c2b += 7 lax.z c2b axs #-[7] stx.z c2b + // for (i = 0; i < 40; ++i) inc.z i jmp __b3 __b2: + // sinustable[c1a] + sinustable[c1b] ldy.z c1a lda sinustable,y ldy.z c1b clc adc sinustable,y + // ybuf[ii] = (sinustable[c1a] + sinustable[c1b]) ldy.z ii sta ybuf,y + // c1a += 4 lax.z c1a axs #-[4] stx.z c1a + // c1b += 9 lax.z c1b axs #-[9] stx.z c1b + // for (ii = 0; ii < 25; ++ii) inc.z ii jmp __b1 } end: { + // Ticks = last_time lda.z last_time sta.z Ticks lda.z last_time+1 sta.z Ticks+1 + // start() jsr start + // last_time -= Ticks lda.z last_time sec sbc.z Ticks @@ -181,12 +223,16 @@ end: { lda.z last_time+1 sbc.z Ticks+1 sta.z last_time+1 + // Ticks = last_time lda.z last_time sta.z Ticks_1 lda.z last_time+1 sta.z Ticks_1+1 + // print_word(Ticks) jsr print_word + // print_ln() jsr print_ln + // } rts } // Print a newline @@ -196,6 +242,7 @@ print_ln: { lda #>$400 sta.z print_line_cursor+1 __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -203,6 +250,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 tax lda #<$400 @@ -224,48 +274,61 @@ print_word: { lda #>$400 sta.z print_char_cursor+1 jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } start: { .label LAST_TIME = last_time + // asm jsr $ffde sta LAST_TIME stx LAST_TIME+1 + // rand_seed = 6474 lda #<$194a sta.z rand_seed lda #>$194a sta.z rand_seed+1 + // } rts } makechar: { @@ -281,6 +344,7 @@ makechar: { sta.z c sta.z c+1 __b1: + // for (c = 0; c < 0x100; ++c) lda.z c+1 cmp #>$100 bcc __b2 @@ -289,18 +353,23 @@ makechar: { cmp #<$100 bcc __b2 !: + // } rts __b2: + // (char)c lda.z c + // s = sinustable[(char)c] tay lda sinustable,y sta.z s lda #0 sta.z i __b3: + // for (i = 0; i < 8; ++i) lda.z i cmp #8 bcc b1 + // for (c = 0; c < 0x100; ++c) inc.z c bne !+ inc.z c+1 @@ -311,8 +380,10 @@ makechar: { sta.z b tay __b5: + // for (ii = 0; ii < 8; ++ii) cpy #8 bcc __b6 + // c<<3 lda.z c asl sta.z __8 @@ -323,6 +394,7 @@ makechar: { rol.z __8+1 asl.z __8 rol.z __8+1 + // (c<<3) + i lda.z i clc adc.z __9 @@ -330,6 +402,7 @@ makechar: { bcc !+ inc.z __9+1 !: + // ((char*)CHARSET) [(c<<3) + i] = b clc lda.z __10 adc # s) lda.z s cmp.z __5 bcs __b8 + // b |= bittab[ii] lda bittab,y ora.z b sta.z b __b8: + // for (ii = 0; ii < 8; ++ii) iny jmp __b5 } rand: { .label RAND_SEED = rand_seed + // asm ldx #8 lda RAND_SEED+0 __rand_loop: @@ -369,7 +449,9 @@ rand: { dex bne __rand_loop sta RAND_SEED+0 + // (char)rand_seed lda.z rand_seed + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/millfork-benchmarks/plasma-kc.log b/src/test/ref/millfork-benchmarks/plasma-kc.log index 03b15cc71..ac4e84b3a 100644 --- a/src/test/ref/millfork-benchmarks/plasma-kc.log +++ b/src/test/ref/millfork-benchmarks/plasma-kc.log @@ -1321,16 +1321,16 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (word) makechar::c#10 (word) makechar::c#3 Identical Phi Values (byte) makechar::s#6 (byte) makechar::s#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -Simple Condition (bool~) doplasma::$0 [100] if((byte) doplasma::ii#3<(byte) $19) goto doplasma::@2 -Simple Condition (bool~) doplasma::$2 [115] if((byte) doplasma::i#3<(byte) $28) goto doplasma::@8 -Simple Condition (bool~) doplasma::$4 [128] if((byte) doplasma::jj#3<(byte) $19) goto doplasma::@14 -Simple Condition (bool~) doplasma::$5 [133] if((byte) doplasma::j#3<(byte) $28) goto doplasma::@17 -Simple Condition (bool~) makechar::$0 [150] if((word) makechar::c#3<(word) $100) goto makechar::@2 -Simple Condition (bool~) makechar::$2 [157] if((byte) makechar::i#3<(byte) 8) goto makechar::@5 -Simple Condition (bool~) makechar::$3 [165] if((byte) makechar::ii#3<(byte) 8) goto makechar::@8 -Simple Condition (bool~) makechar::$7 [174] if((byte~) makechar::$5<=(byte) makechar::s#1) goto makechar::@10 -Simple Condition (bool~) main::$6 [203] if((byte) 0!=(word) main::count#2) goto main::@2 +Simple Condition (bool~) print_ln::$1 [5] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 +Simple Condition (bool~) doplasma::$0 [65] if((byte) doplasma::ii#3<(byte) $19) goto doplasma::@2 +Simple Condition (bool~) doplasma::$2 [76] if((byte) doplasma::i#3<(byte) $28) goto doplasma::@8 +Simple Condition (bool~) doplasma::$4 [87] if((byte) doplasma::jj#3<(byte) $19) goto doplasma::@14 +Simple Condition (bool~) doplasma::$5 [91] if((byte) doplasma::j#3<(byte) $28) goto doplasma::@17 +Simple Condition (bool~) makechar::$0 [106] if((word) makechar::c#3<(word) $100) goto makechar::@2 +Simple Condition (bool~) makechar::$2 [112] if((byte) makechar::i#3<(byte) 8) goto makechar::@5 +Simple Condition (bool~) makechar::$3 [118] if((byte) makechar::ii#3<(byte) 8) goto makechar::@8 +Simple Condition (bool~) makechar::$7 [124] if((byte~) makechar::$5<=(byte) makechar::s#1) goto makechar::@10 +Simple Condition (bool~) main::$6 [148] if((byte) 0!=(word) main::count#2) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const word) Ticks#0 = 0 @@ -1369,15 +1369,15 @@ Constant (const signed word) main::return#0 = 0 Successful SSA optimization Pass2ConstantIdentification Constant (const signed word) main::return#2 = main::return#0 Successful SSA optimization Pass2ConstantIdentification -De-inlining pointer[w] to *(pointer+w) [178] *((const byte*) CHARSET + (word~) makechar::$9) ← (byte) makechar::b#3 +De-inlining pointer[w] to *(pointer+w) [127] *((const byte*) CHARSET + (word~) makechar::$9) ← (byte) makechar::b#3 Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying constant evaluating to zero (byte)(word)(const byte*) SCREEN1>>(byte) $e^(byte) 3 in [198] (byte) main::tmp#2 ← (byte) main::tmp#1 | (byte)(word)(const byte*) SCREEN1>>(byte) $e^(byte) 3 +Simplifying constant evaluating to zero (byte)(word)(const byte*) SCREEN1>>(byte) $e^(byte) 3 in [143] (byte) main::tmp#2 ← (byte) main::tmp#1 | (byte)(word)(const byte*) SCREEN1>>(byte) $e^(byte) 3 Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero 3 in [108] (byte) doplasma::c1A#1 ← (const byte) doplasma::c1a#1 + (byte) 3 -Simplifying expression containing zero 5 in [109] (byte) doplasma::c1B#1 ← (const byte) doplasma::c1b#1 - (byte) 5 -Simplifying expression containing zero 2 in [123] (byte) doplasma::c2A#1 ← (const byte) doplasma::c2A#0 + (byte) 2 -Simplifying expression containing zero 3 in [124] (byte) doplasma::c2B#1 ← (const byte) doplasma::c2B#0 - (byte) 3 -Simplifying expression containing zero main::tmp#1 in [198] (byte) main::tmp#2 ← (byte) main::tmp#1 | (byte) 0 +Simplifying expression containing zero 3 in [71] (byte) doplasma::c1A#1 ← (const byte) doplasma::c1a#1 + (byte) 3 +Simplifying expression containing zero 5 in [72] (byte) doplasma::c1B#1 ← (const byte) doplasma::c1b#1 - (byte) 5 +Simplifying expression containing zero 2 in [82] (byte) doplasma::c2A#1 ← (const byte) doplasma::c2A#0 + (byte) 2 +Simplifying expression containing zero 3 in [83] (byte) doplasma::c2B#1 ← (const byte) doplasma::c2B#0 - (byte) 3 +Simplifying expression containing zero main::tmp#1 in [143] (byte) main::tmp#2 ← (byte) main::tmp#1 | (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) doplasma::c1A#1 and assignment [45] (byte) doplasma::c1A#1 ← (byte) 3 Eliminating unused variable (byte) doplasma::c1B#1 and assignment [46] (byte) doplasma::c1B#1 ← (byte) 5 diff --git a/src/test/ref/millfork-benchmarks/romsum-kc.asm b/src/test/ref/millfork-benchmarks/romsum-kc.asm index 54051fadd..c66a1d6e7 100644 --- a/src/test/ref/millfork-benchmarks/romsum-kc.asm +++ b/src/test/ref/millfork-benchmarks/romsum-kc.asm @@ -8,6 +8,7 @@ .label Ticks = $d .label Ticks_1 = $f __b1: + // last_time lda #<0 sta.z last_time sta.z last_time+1 @@ -15,6 +16,7 @@ __b1: rts main: { .label i = $d + // start() jsr start lda #<$400 sta.z print_line_cursor @@ -28,6 +30,7 @@ main: { sta.z i sta.z i+1 __b1: + // for(i=0;i<6;i++) lda.z i+1 cmp #>6 bcc __b2 @@ -36,12 +39,19 @@ main: { cmp #<6 bcc __b2 !: + // end() jsr end + // } rts __b2: + // sum() jsr sum + // sum() + // print_word_decimal(sum()) jsr print_word_decimal + // print_ln() jsr print_ln + // for(i=0;i<6;i++) inc.z i bne !+ inc.z i+1 @@ -55,6 +65,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -62,6 +73,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursordecimal_digits sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -128,23 +148,30 @@ utoa: { txa sta.z digit __b1: + // for( char digit=0; digit= digit_value) cpx #0 bne __b5 cmp.z value+1 @@ -162,10 +190,15 @@ utoa: { !: bcc __b5 __b4: + // for( char digit=0; digit= sub) lda.z sub+1 cmp.z value+1 bne !+ @@ -197,12 +231,16 @@ utoa_append: { beq __b2 !: bcc __b2 + // *buffer = DIGITS[digit] lda DIGITS,x ldy #0 sta (buffer),y + // } rts __b2: + // digit++; inx + // value -= sub lda.z value sec sbc.z sub @@ -226,22 +264,29 @@ sum: { tax /* doing it page-by-page is faster than doing just one huge loop */ __b1: + // for (page = 0; page < 0x20; page++) cpx #$20 bcc b1 + // } rts b1: ldy #0 __b2: + // tmp = p[i] lda (p),y + // s += tmp clc adc.z s sta.z s bcc !+ inc.z s+1 !: + // i++; iny + // while (i) cpy #0 bne __b2 + // p += 0x100 clc lda.z p adc #<$100 @@ -249,15 +294,19 @@ sum: { lda.z p+1 adc #>$100 sta.z p+1 + // for (page = 0; page < 0x20; page++) inx jmp __b1 } end: { + // Ticks = last_time lda.z last_time sta.z Ticks lda.z last_time+1 sta.z Ticks+1 + // start() jsr start + // last_time -= Ticks lda.z last_time sec sbc.z Ticks @@ -265,59 +314,76 @@ end: { lda.z last_time+1 sbc.z Ticks+1 sta.z last_time+1 + // Ticks = last_time lda.z last_time sta.z Ticks_1 lda.z last_time+1 sta.z Ticks_1+1 + // print_word(Ticks) jsr print_word + // print_ln() jsr print_ln + // } rts } // Print a word as HEX // print_word(word zp($f) w) print_word: { .label w = $f + // print_byte(>w) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda DIGITS,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda DIGITS,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } start: { .label LAST_TIME = last_time + // asm jsr $ffde sta LAST_TIME stx LAST_TIME+1 + // } rts } // The digits used for numbers diff --git a/src/test/ref/millfork-benchmarks/romsum-kc.log b/src/test/ref/millfork-benchmarks/romsum-kc.log index bc4958262..7dec16b76 100644 --- a/src/test/ref/millfork-benchmarks/romsum-kc.log +++ b/src/test/ref/millfork-benchmarks/romsum-kc.log @@ -1256,19 +1256,19 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#20 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) utoa::$0 [4] if((byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1 -Simple Condition (bool~) utoa::$1 [10] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 -Simple Condition (bool~) utoa::$2 [16] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 -Simple Condition (bool~) utoa::$3 [22] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 -Simple Condition (bool~) utoa::$6 [41] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19 -Simple Condition (bool~) utoa_append::$0 [71] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -Simple Condition (bool~) print_str::$0 [87] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [100] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#46) goto print_ln::@1 -Simple Condition (bool~) sum::$0 [188] if((byte) sum::page#3<(byte) $20) goto sum::@2 -Simple Condition (bool~) sum::$1 [198] if((byte) 0!=(byte) sum::i#2) goto sum::@4 -Simple Condition (bool~) main::$2 [212] if((word) main::i#3<(byte) 6) goto main::@2 +Simple Condition (bool~) utoa::$1 [8] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 +Simple Condition (bool~) utoa::$2 [12] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 +Simple Condition (bool~) utoa::$3 [16] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 +Simple Condition (bool~) utoa::$6 [33] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19 +Simple Condition (bool~) utoa_append::$0 [58] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 +Simple Condition (bool~) print_str::$0 [67] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [76] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#46) goto print_ln::@1 +Simple Condition (bool~) sum::$0 [134] if((byte) sum::page#3<(byte) $20) goto sum::@2 +Simple Condition (bool~) sum::$1 [141] if((byte) 0!=(byte) sum::i#2) goto sum::@4 +Simple Condition (bool~) main::$2 [151] if((word) main::i#3<(byte) 6) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [47] (bool~) utoa::$9 ← ! (bool~) utoa::$8 -Rewriting || if()-condition to two if()s [46] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7 +Rewriting ! if()-condition to reversed if() [38] (bool~) utoa::$9 ← ! (bool~) utoa::$8 +Rewriting || if()-condition to two if()s [37] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7 Successful SSA optimization Pass2ConditionalAndOrRewriting Warning! Adding boolean cast to non-boolean condition (byte) utoa::started#2 Constant (const byte) utoa::max_digits#0 = 0 @@ -1306,9 +1306,9 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const signed word) main::return#2 = main::return#0 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [4] if((const byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1 -if() condition always false - eliminating [10] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 -if() condition always false - eliminating [16] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 -if() condition always false - eliminating [22] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 +if() condition always false - eliminating [8] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 +if() condition always false - eliminating [12] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 +if() condition always false - eliminating [16] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) DIGITS Successful SSA optimization Pass2ConstantStringConsolidation diff --git a/src/test/ref/millfork-benchmarks/sieve-kc.asm b/src/test/ref/millfork-benchmarks/sieve-kc.asm index b30c590e6..d8dbdc3fa 100644 --- a/src/test/ref/millfork-benchmarks/sieve-kc.asm +++ b/src/test/ref/millfork-benchmarks/sieve-kc.asm @@ -9,32 +9,49 @@ .label Ticks = 8 .label Ticks_1 = $a __b1: + // last_time lda #<0 sta.z last_time sta.z last_time+1 jsr main rts main: { + // start() jsr start + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // round() jsr round + // end() jsr end + // } rts } end: { + // Ticks = last_time lda.z last_time sta.z Ticks lda.z last_time+1 sta.z Ticks+1 + // start() jsr start + // last_time -= Ticks lda.z last_time sec sbc.z Ticks @@ -42,12 +59,16 @@ end: { lda.z last_time+1 sbc.z Ticks+1 sta.z last_time+1 + // Ticks = last_time lda.z last_time sta.z Ticks_1 lda.z last_time+1 sta.z Ticks_1+1 + // print_word(Ticks) jsr print_word + // print_ln() jsr print_ln + // } rts } // Print a newline @@ -57,6 +78,7 @@ print_ln: { lda #>$400 sta.z print_line_cursor+1 __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -64,6 +86,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 tax lda #<$400 @@ -85,44 +110,56 @@ print_word: { lda #>$400 sta.z print_char_cursor+1 jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } start: { .label LAST_TIME = last_time + // asm jsr $ffde sta LAST_TIME stx LAST_TIME+1 + // } rts } round: { @@ -133,6 +170,7 @@ round: { lda #>Sieve sta.z p+1 __b1: + // for(char* p=Sieve;pSieve+COUNT bcc __b2 @@ -143,15 +181,20 @@ round: { !: ldx #2 __b3: + // while (I < SQRT_COUNT) cpx #SQRT_COUNT bcc __b4 + // } rts __b4: + // if (Sieve[I] == 0) lda Sieve,x cmp #0 bne __b5 + // I<<1 txa asl + // S = Sieve + I<<1 clc adc #Sieve+COUNT bcc __b7 @@ -168,12 +212,15 @@ round: { bcc __b7 !: __b5: + // ++I; inx jmp __b3 __b7: + // *S = 1 lda #1 ldy #0 sta (S),y + // S += I txa clc adc.z S @@ -183,9 +230,11 @@ round: { !: jmp __b6 __b2: + // *p = 0 lda #0 tay sta (p),y + // for(char* p=Sieve;p$400 sta.z print_char_cursor+1 __b2: + // while(*RASTER!=$ff) lda #$ff cmp RASTER bne __b2 + // (*BORDERCOL)++; inc BORDERCOL + // mulf16u(a, b) jsr mulf16u + // r = mulf16u(a, b) + // (*BORDERCOL)--; dec BORDERCOL + // print_dword(r) jsr print_dword + // print_set_screen(SCREEN) jsr print_set_screen lda #dw) lda.z dw+2 sta.z print_word.w lda.z dw+3 sta.z print_word.w+1 jsr print_word + // print_word(w) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Fast multiply two unsigned words to a double word result @@ -97,14 +121,17 @@ mulf16u: { .label memB = $fa .label memR = $fc .label return = $e + // *memA = a lda #main.a sta memA+1 + // *memB = b lda #main.b sta memB+1 + // asm lda memA sta sm1a+1 sta sm3a+1 @@ -197,6 +224,7 @@ mulf16u: { bcc !+ inc memR+3 !: + // return *memR; lda memR sta.z return lda memR+1 @@ -205,6 +233,7 @@ mulf16u: { sta.z return+2 lda memR+3 sta.z return+3 + // } rts } // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) @@ -235,6 +264,7 @@ mulf_init: { lda #>mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -253,63 +283,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -317,6 +368,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 diff --git a/src/test/ref/min-fmul-16.log b/src/test/ref/min-fmul-16.log index c35b8f0b3..63cbda90b 100644 --- a/src/test/ref/min-fmul-16.log +++ b/src/test/ref/min-fmul-16.log @@ -802,11 +802,11 @@ Identical Phi Values (byte*) print_char_cursor#17 (byte*) print_char_cursor#16 Identical Phi Values (byte*) print_screen#5 (byte*) print_screen#11 Identical Phi Values (byte*) print_line_cursor#5 (byte*) print_line_cursor#11 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [68] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) mulf_init::$0 [101] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [107] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [126] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [135] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) main::$1 [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) mulf_init::$0 [63] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [67] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [84] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [90] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const word) mulf16u::a#0 = main::a @@ -825,7 +825,7 @@ Constant (const byte) mulf_init::dir#1 = 1 Successful SSA optimization Pass2ConstantIdentification Constant (const byte*) print_screen#1 = print_set_screen::screen#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [65] if(true) goto main::@4 +if() condition always true - replacing block destination [38] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs Eliminating unused variable - keeping the phi block (byte*) print_screen#11 Eliminating unused variable - keeping the phi block (byte*) print_line_cursor#11 diff --git a/src/test/ref/mixed-array-0.asm b/src/test/ref/mixed-array-0.asm index 3e2175924..5f1071b36 100644 --- a/src/test/ref/mixed-array-0.asm +++ b/src/test/ref/mixed-array-0.asm @@ -4,12 +4,16 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[0] = msg[0] lda msg sta SCREEN + // SCREEN[1] = msg[1] lda msg+1 sta SCREEN+1 + // SCREEN[2] = msg[2] lda msg+2 sta SCREEN+2 + // } rts msg: .byte 1, 2, 3 } diff --git a/src/test/ref/mixed-array-1.asm b/src/test/ref/mixed-array-1.asm index 2d92feb78..4340a2f5b 100644 --- a/src/test/ref/mixed-array-1.asm +++ b/src/test/ref/mixed-array-1.asm @@ -4,12 +4,16 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[0] = msg[0] lda msg sta SCREEN + // SCREEN[1] = msg[1] lda msg+1 sta SCREEN+1 + // SCREEN[2] = msg[2] lda msg+2 sta SCREEN+2 + // } rts msg: .byte -1, 0, 1 } diff --git a/src/test/ref/modglobal.asm b/src/test/ref/modglobal.asm index 767c1a774..2158fbf69 100644 --- a/src/test/ref/modglobal.asm +++ b/src/test/ref/modglobal.asm @@ -4,25 +4,40 @@ .label SCREEN = $400 .label cnt = 2 main: { + // inccnt() ldx #0 ldy #0 txa jsr inccnt + // inccnt() + // SCREEN[0]=inccnt() sta SCREEN + // cnt++; lda.z cnt clc adc #1 + // inccnt() jsr inccnt + // inccnt() + // SCREEN[1]=inccnt() sta SCREEN+1 + // SCREEN[2]=cnt2 sty SCREEN+2 + // SCREEN[3]=cnt3 stx SCREEN+3 + // } rts } inccnt: { + // ++cnt; clc adc #1 sta.z cnt + // ++cnt2; iny + // ++cnt3; inx + // return cnt; + // } rts } diff --git a/src/test/ref/modglobal.log b/src/test/ref/modglobal.log index 3748a03e7..144e4ac92 100644 --- a/src/test/ref/modglobal.log +++ b/src/test/ref/modglobal.log @@ -214,7 +214,7 @@ Constant (const byte) cnt#0 = 0 Constant (const byte) cnt2#0 = 0 Constant (const byte) cnt3#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero SCREEN in [11] *((const byte*) SCREEN + (byte) 0) ← (byte~) main::$0 +Simplifying expression containing zero SCREEN in [8] *((const byte*) SCREEN + (byte) 0) ← (byte~) main::$0 Successful SSA optimization PassNSimplifyExpressionWithZero Inlining constant with var siblings (const byte) cnt#0 Inlining constant with var siblings (const byte) cnt2#0 diff --git a/src/test/ref/modglobalmin.asm b/src/test/ref/modglobalmin.asm index 1076512fb..5f35e8691 100644 --- a/src/test/ref/modglobalmin.asm +++ b/src/test/ref/modglobalmin.asm @@ -3,16 +3,25 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // inccnt() ldx #0 jsr inccnt + // SCREEN[0]=cnt++ stx SCREEN + // SCREEN[0]=cnt++; inx + // inccnt() jsr inccnt + // SCREEN[1]=++cnt; inx + // SCREEN[1]=++cnt stx SCREEN+1 + // } rts } inccnt: { + // ++cnt; inx + // } rts } diff --git a/src/test/ref/modglobalmin.log b/src/test/ref/modglobalmin.log index 3f366ecc5..5193f0ba5 100644 --- a/src/test/ref/modglobalmin.log +++ b/src/test/ref/modglobalmin.log @@ -104,7 +104,7 @@ Identical Phi Values (byte) cnt#14 (byte) cnt#11 Successful SSA optimization Pass2IdenticalPhiElimination Constant (const byte) cnt#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero SCREEN in [5] *((const byte*) SCREEN + (byte) 0) ← (byte) cnt#13 +Simplifying expression containing zero SCREEN in [4] *((const byte*) SCREEN + (byte) 0) ← (byte) cnt#13 Successful SSA optimization PassNSimplifyExpressionWithZero Inlining constant with var siblings (const byte) cnt#0 Constant inlined cnt#0 = (byte) 0 diff --git a/src/test/ref/mul8u-min.asm b/src/test/ref/mul8u-min.asm index d85d77632..d9dda7c76 100644 --- a/src/test/ref/mul8u-min.asm +++ b/src/test/ref/mul8u-min.asm @@ -13,9 +13,11 @@ main: { __b1: ldy #0 __b2: + // mul8u(a,b) ldx.z a tya jsr mul8u + // screen[i++] = mul8u(a,b) lda.z i asl tax @@ -23,14 +25,18 @@ main: { sta screen,x lda.z __0+1 sta screen+1,x + // screen[i++] = mul8u(a,b); inc.z i + // for (byte b: 0..5) iny cpy #6 bne __b2 + // for(byte a: 0..5) inc.z a lda #6 cmp.z a bne __b1 + // } rts } // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word @@ -39,20 +45,26 @@ mul8u: { .label mb = 6 .label res = 4 .label return = 4 + // mb = b sta.z mb lda #0 sta.z mb+1 sta.z res sta.z res+1 __b1: + // while(a!=0) cpx #0 bne __b2 + // } rts __b2: + // a&1 txa and #1 + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -61,9 +73,11 @@ mul8u: { adc.z mb+1 sta.z res+1 __b3: + // a = a>>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 diff --git a/src/test/ref/mul8u-min.log b/src/test/ref/mul8u-min.log index ac75de839..365ef17e3 100644 --- a/src/test/ref/mul8u-min.log +++ b/src/test/ref/mul8u-min.log @@ -238,19 +238,19 @@ Identical Phi Values (byte) mul8u::a#5 (byte) mul8u::a#1 Identical Phi Values (byte) main::a#2 (byte) main::a#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) mul8u::$0 [5] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [10] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) main::$1 [40] if((byte) main::b#1!=rangelast(0,5)) goto main::@2 -Simple Condition (bool~) main::$2 [44] if((byte) main::a#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) mul8u::$3 [8] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) main::$1 [29] if((byte) main::b#1!=rangelast(0,5)) goto main::@2 +Simple Condition (bool~) main::$2 [32] if((byte) main::a#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) mul8u::res#0 = 0 Constant (const byte) main::i#0 = 0 Constant (const byte) main::a#0 = 0 Constant (const byte) main::b#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [38] main::b#1 ← ++ main::b#2 to ++ -Resolved ranged comparison value [40] if(main::b#1!=rangelast(0,5)) goto main::@2 to (number) 6 -Resolved ranged next value [42] main::a#1 ← ++ main::a#4 to ++ -Resolved ranged comparison value [44] if(main::a#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [27] main::b#1 ← ++ main::b#2 to ++ +Resolved ranged comparison value [29] if(main::b#1!=rangelast(0,5)) goto main::@2 to (number) 6 +Resolved ranged next value [30] main::a#1 ← ++ main::a#4 to ++ +Resolved ranged comparison value [32] if(main::a#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::b#1!=(number) 6) goto main::@2 Adding number conversion cast (unumber) 6 in if((byte) main::a#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm index af08f5c6c..9a5b984e1 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm @@ -38,25 +38,34 @@ .label plex_free_next = 9 .label framedone = $a __b1: + // plex_show_idx=0 // The index in the PLEX tables of the next sprite to show lda #0 sta.z plex_show_idx + // plex_sprite_idx=0 // The index the next sprite to use for showing (sprites are used round-robin) sta.z plex_sprite_idx + // plex_sprite_msb=1 // The MSB bit of the next sprite to use for showing lda #1 sta.z plex_sprite_msb + // plex_free_next = 0 // The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown. lda #0 sta.z plex_free_next + // framedone = true lda #1 sta.z framedone jsr main rts main: { + // asm sei + // init() jsr init + // loop() jsr loop + // } rts } // The raster loop @@ -66,33 +75,45 @@ loop: { lda #0 sta.z sin_idx __b2: + // while(!framedone) lda.z framedone cmp #0 bne __b3 jmp __b2 __b3: + // *BORDERCOL = RED lda #RED sta BORDERCOL ldx.z sin_idx ldy #0 __b4: + // PLEX_YPOS[sy] = YSIN[y_idx] lda YSIN,x sta PLEX_YPOS,y + // y_idx += 8 txa axs #-[8] + // for(char sy: 0..PLEX_COUNT-1) iny cpy #PLEX_COUNT-1+1 bne __b4 + // sin_idx +=1 inc.z sin_idx + // (*BORDERCOL)++; inc BORDERCOL + // plexSort() jsr plexSort + // *BORDERCOL = GREEN lda #GREEN sta BORDERCOL + // framedone = false lda #0 sta.z framedone + // *VIC_CONTROL &=0x7f lda #$7f and VIC_CONTROL sta VIC_CONTROL + // *RASTER = 0x0 lda #0 sta RASTER jmp __b2 @@ -113,20 +134,26 @@ plexSort: { lda #0 sta.z m __b1: + // nxt_idx = PLEX_SORTED_IDX[m+1] ldy.z m lda PLEX_SORTED_IDX+1,y sta.z nxt_idx + // nxt_y = PLEX_YPOS[nxt_idx] tay lda PLEX_YPOS,y sta.z nxt_y + // if(nxt_yplex_irq sta KERNEL_IRQ+1 + // asm cli + // } rts } // Initialize the multiplexer data structures plexInit: { ldx #0 __b1: + // PLEX_SORTED_IDX[i] = i txa sta PLEX_SORTED_IDX,x + // for(char i: 0..PLEX_COUNT-1) inx cpx #PLEX_COUNT-1+1 bne __b1 + // } rts } plex_irq: { .label __4 = $d + // *BORDERCOL = WHITE lda #WHITE sta BORDERCOL __b3: + // plexShowSprite() jsr plexShowSprite + // return PLEX_FREE_YPOS[plex_free_next]; ldy.z plex_free_next ldx PLEX_FREE_YPOS,y + // *RASTER+2 lda RASTER clc adc #2 sta.z __4 + // while (plex_show_idx < PLEX_COUNT && rasterY < *RASTER+2) lda.z plex_show_idx cmp #PLEX_COUNT bcs __b4 cpx.z __4 bcc __b3 __b4: + // *IRQ_STATUS = IRQ_RASTER lda #IRQ_RASTER sta IRQ_STATUS + // if (plex_show_idxPLEX_XPOS[xpos_idx] lda PLEX_XPOS+1,x + // if(>PLEX_XPOS[xpos_idx]!=0) cmp #0 bne __b1 + // 0xff^plex_sprite_msb lda #$ff eor.z plex_sprite_msb + // *SPRITES_XMSB &= (0xff^plex_sprite_msb) and SPRITES_XMSB sta SPRITES_XMSB __b2: + // plex_sprite_idx+1 ldx.z plex_sprite_idx inx + // (plex_sprite_idx+1)&7 txa and #7 + // plex_sprite_idx = (plex_sprite_idx+1)&7 sta.z plex_sprite_idx + // plex_show_idx++; inc.z plex_show_idx + // plex_sprite_msb <<=1 asl.z plex_sprite_msb + // if(plex_sprite_msb==0) lda.z plex_sprite_msb cmp #0 bne __breturn + // plex_sprite_msb = 1 lda #1 sta.z plex_sprite_msb __breturn: + // } rts __b1: + // *SPRITES_XMSB |= plex_sprite_msb lda SPRITES_XMSB ora.z plex_sprite_msb sta SPRITES_XMSB diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log index 52cc46d8a..fab653210 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log @@ -856,20 +856,20 @@ Identical Phi Values (byte) plexSort::m#3 (byte) plexSort::m#2 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [73] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) plexInit::$1 [15] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 -Simple Condition (bool~) plexSort::$3 [26] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 -Simple Condition (bool~) plexSort::$8 [30] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 -Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [52] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 -Simple Condition (bool~) plexShowSprite::$4 [76] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 -Simple Condition (bool~) plexShowSprite::$8 [87] if((byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return -Simple Condition (bool~) init::$1 [117] if((byte) init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 -Simple Condition (bool~) init::$2 [125] if((byte) init::ss#1!=rangelast(0,7)) goto init::@3 -Simple Condition (bool~) plex_irq::$0 [159] if((byte) plex_show_idx<(const byte) PLEX_COUNT) goto plex_irq::@1 -Simple Condition (bool~) loop::$1 [180] if((byte) loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 +Simple Condition (bool~) plexInit::$1 [11] if((byte) plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 +Simple Condition (bool~) plexSort::$3 [19] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2 +Simple Condition (bool~) plexSort::$8 [23] if((byte) plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 +Simple Condition (bool~) plexSort::plexFreePrepare1_$0 [42] if((byte) plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 +Simple Condition (bool~) plexShowSprite::$4 [62] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1 +Simple Condition (bool~) plexShowSprite::$8 [72] if((byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return +Simple Condition (bool~) init::$1 [96] if((byte) init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 +Simple Condition (bool~) init::$2 [103] if((byte) init::ss#1!=rangelast(0,7)) goto init::@3 +Simple Condition (bool~) plex_irq::$0 [125] if((byte) plex_show_idx<(const byte) PLEX_COUNT) goto plex_irq::@1 +Simple Condition (bool~) loop::$1 [143] if((byte) loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting && if()-condition to two if()s [39] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 -Rewriting && if()-condition to two if()s [154] (bool~) plex_irq::$6 ← (bool~) plex_irq::$3 && (bool~) plex_irq::$5 -Rewriting ! if()-condition to reversed if() [169] (bool~) loop::$0 ← ! (bool) framedone +Rewriting && if()-condition to two if()s [30] (bool~) plexSort::$7 ← (bool~) plexSort::$5 && (bool~) plexSort::$6 +Rewriting && if()-condition to two if()s [121] (bool~) plex_irq::$6 ← (bool~) plex_irq::$3 && (bool~) plex_irq::$5 +Rewriting ! if()-condition to reversed if() [134] (bool~) loop::$0 ← ! (bool) framedone Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) PLEX_SCREEN_PTR#0 = (byte*)$400+$3f8 Constant (const byte) plexInit::i#0 = 0 @@ -883,20 +883,20 @@ Constant (const byte) plex_irq::rasterY#0 = 0 Constant (const byte) loop::sin_idx#0 = 0 Constant (const byte) loop::sy#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [167] if(true) goto loop::@4 +if() condition always true - replacing block destination [132] if(true) goto loop::@4 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [13] plexInit::i#1 ← ++ plexInit::i#2 to ++ -Resolved ranged comparison value [15] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [28] plexSort::m#1 ← ++ plexSort::m#2 to ++ -Resolved ranged comparison value [30] if(plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 to (const byte) PLEX_COUNT-(byte) 2+(number) 1 -Resolved ranged next value [50] plexSort::plexFreePrepare1_s#1 ← ++ plexSort::plexFreePrepare1_s#2 to ++ -Resolved ranged comparison value [52] if(plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 to (number) 8 -Resolved ranged next value [115] init::sx#1 ← ++ init::sx#2 to ++ -Resolved ranged comparison value [117] if(init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 -Resolved ranged next value [123] init::ss#1 ← ++ init::ss#2 to ++ -Resolved ranged comparison value [125] if(init::ss#1!=rangelast(0,7)) goto init::@3 to (number) 8 -Resolved ranged next value [178] loop::sy#1 ← ++ loop::sy#2 to ++ -Resolved ranged comparison value [180] if(loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [9] plexInit::i#1 ← ++ plexInit::i#2 to ++ +Resolved ranged comparison value [11] if(plexInit::i#1!=rangelast(0,PLEX_COUNT-1)) goto plexInit::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [21] plexSort::m#1 ← ++ plexSort::m#2 to ++ +Resolved ranged comparison value [23] if(plexSort::m#1!=rangelast(0,PLEX_COUNT-2)) goto plexSort::@1 to (const byte) PLEX_COUNT-(byte) 2+(number) 1 +Resolved ranged next value [40] plexSort::plexFreePrepare1_s#1 ← ++ plexSort::plexFreePrepare1_s#2 to ++ +Resolved ranged comparison value [42] if(plexSort::plexFreePrepare1_s#1!=rangelast(0,7)) goto plexSort::plexFreePrepare1_@1 to (number) 8 +Resolved ranged next value [94] init::sx#1 ← ++ init::sx#2 to ++ +Resolved ranged comparison value [96] if(init::sx#1!=rangelast(0,PLEX_COUNT-1)) goto init::@1 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 +Resolved ranged next value [101] init::ss#1 ← ++ init::ss#2 to ++ +Resolved ranged comparison value [103] if(init::ss#1!=rangelast(0,7)) goto init::@3 to (number) 8 +Resolved ranged next value [141] loop::sy#1 ← ++ loop::sy#2 to ++ +Resolved ranged comparison value [143] if(loop::sy#1!=rangelast(0,PLEX_COUNT-1)) goto loop::@10 to (const byte) PLEX_COUNT-(byte) 1+(number) 1 Eliminating unused variable (byte*) PLEX_SCREEN_PTR#1 and assignment [3] (byte*) PLEX_SCREEN_PTR#1 ← (const byte*) plexInit::screen#0 + (word) $3f8 Eliminating unused constant (const byte) plex_irq::rasterY#0 Successful SSA optimization PassNEliminateUnusedVars @@ -942,12 +942,12 @@ Successful SSA optimization Pass2AliasElimination Alias candidate removed (volatile)(byte) plex_free_next = (byte~) plexShowSprite::plexFreeAdd1_$2 Alias candidate removed (volatile)(byte) plex_sprite_idx = (byte~) plexShowSprite::$6 Simple Condition (bool~) plexSort::$5 [21] if((byte) plexSort::s#1!=(byte) $ff) goto plexSort::@8 -Simple Condition (bool~) plex_irq::$3 [93] if((byte) plex_show_idx<(const byte) PLEX_COUNT) goto plex_irq::@9 -Simple Condition (bool~) plexSort::$6 [116] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 -Simple Condition (bool~) plex_irq::$5 [117] if((byte) plex_irq::plexFreeNextYpos1_return#0<(byte~) plex_irq::$4) goto plex_irq::@3 +Simple Condition (bool~) plex_irq::$3 [92] if((byte) plex_show_idx<(const byte) PLEX_COUNT) goto plex_irq::@9 +Simple Condition (bool~) plexSort::$6 [115] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3 +Simple Condition (bool~) plex_irq::$5 [116] if((byte) plex_irq::plexFreeNextYpos1_return#0<(byte~) plex_irq::$4) goto plex_irq::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [21] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4 -Negating conditional jump and destination [93] if((byte) plex_show_idx>=(const byte) PLEX_COUNT) goto plex_irq::@4 +Negating conditional jump and destination [92] if((byte) plex_show_idx>=(const byte) PLEX_COUNT) goto plex_irq::@4 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Alias candidate removed (volatile)(byte) plex_free_next = (byte~) plexShowSprite::plexFreeAdd1_$2 Alias candidate removed (volatile)(byte) plex_sprite_idx = (byte~) plexShowSprite::$6 diff --git a/src/test/ref/multiply-2s.asm b/src/test/ref/multiply-2s.asm index 44e531fea..ae85a1e14 100644 --- a/src/test/ref/multiply-2s.asm +++ b/src/test/ref/multiply-2s.asm @@ -6,28 +6,40 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // (SCREEN+0*40)[i] = i*1 txa sta SCREEN,x + // i*2 txa asl + // (SCREEN+1*40)[i] = i*2 sta SCREEN+1*$28,x + // i*4 txa asl asl + // (SCREEN+2*40)[i] = i*4 sta SCREEN+2*$28,x + // i*8 txa asl asl asl + // (SCREEN+3*40)[i] = i*8 sta SCREEN+3*$28,x + // sb = -(signed byte)i txa eor #$ff clc adc #1 + // sb*2 asl + // (SCREEN+5*40)[i] = (byte)(sb*2) sta SCREEN+5*$28,x + // for(byte i: 0..10) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/multiply-2s.log b/src/test/ref/multiply-2s.log index 6be001e4d..6647d412a 100644 --- a/src/test/ref/multiply-2s.log +++ b/src/test/ref/multiply-2s.log @@ -102,12 +102,12 @@ Inferred type updated to byte in (unumber~) main::$3 ← (byte) main::i#2 * (byt Inferred type updated to signed byte in (snumber~) main::$6 ← (signed byte) main::sb#0 * (signed byte) 2 Alias (signed byte) main::sb#0 = (signed byte~) main::$5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$8 [18] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$8 [17] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [16] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [18] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [15] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [17] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Simplifying constant evaluating to zero (byte)(number) 0*(number) $28 in [3] *((const byte*) main::SCREEN+(byte)(number) 0*(number) $28 + (byte) main::i#2) ← (byte~) main::$0 Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero main::SCREEN in [3] *((const byte*) main::SCREEN+(byte) 0 + (byte) main::i#2) ← (byte~) main::$0 diff --git a/src/test/ref/multiply-ns.asm b/src/test/ref/multiply-ns.asm index d05f589bb..c0b52e762 100644 --- a/src/test/ref/multiply-ns.asm +++ b/src/test/ref/multiply-ns.asm @@ -8,30 +8,42 @@ main: { .label __18 = 3 ldx #0 __b1: + // (SCREEN+0*40)[i] = i*1 txa sta SCREEN,x + // i*2 txa asl sta.z __16 + // (SCREEN+1*40)[i] = i*2 sta SCREEN+1*$28,x + // i*3 txa clc adc.z __16 + // (SCREEN+2*40)[i] = i*3 sta SCREEN+2*$28,x + // i*4 txa asl asl sta.z __18 + // (SCREEN+3*40)[i] = i*4 sta SCREEN+3*$28,x + // i*5 txa clc adc.z __18 + // (SCREEN+4*40)[i] = i*5 sta SCREEN+4*$28,x + // i*6 txa clc adc.z __16 asl + // (SCREEN+5*40)[i] = i*6 sta SCREEN+5*$28,x + // i*7 txa clc adc.z __16 @@ -39,21 +51,29 @@ main: { stx.z $ff clc adc.z $ff + // (SCREEN+6*40)[i] = i*7 sta SCREEN+6*$28,x + // i*8 txa asl asl asl + // (SCREEN+7*40)[i] = i*8 sta SCREEN+7*$28,x + // i*9 stx.z $ff clc adc.z $ff + // (SCREEN+8*40)[i] = i*9 sta SCREEN+8*$28,x + // i*10 txa clc adc.z __18 asl + // (SCREEN+9*40)[i] = i*10 sta SCREEN+9*$28,x + // i*11 txa clc adc.z __18 @@ -61,13 +81,17 @@ main: { stx.z $ff clc adc.z $ff + // (SCREEN+10*40)[i] = i*11 sta SCREEN+$a*$28,x + // i*12 txa clc adc.z __16 asl asl + // (SCREEN+11*40)[i] = i*12 sta SCREEN+$b*$28,x + // i*13 txa clc adc.z __16 @@ -76,7 +100,9 @@ main: { stx.z $ff clc adc.z $ff + // (SCREEN+12*40)[i] = i*13 sta SCREEN+$c*$28,x + // i*14 txa clc adc.z __16 @@ -85,7 +111,9 @@ main: { clc adc.z $ff asl + // (SCREEN+13*40)[i] = i*14 sta SCREEN+$d*$28,x + // i*15 txa clc adc.z __16 @@ -97,11 +125,14 @@ main: { stx.z $ff clc adc.z $ff + // (SCREEN+14*40)[i] = i*15 sta SCREEN+$e*$28,x + // for(byte i: 0..17) inx cpx #$12 beq !__b1+ jmp __b1 !__b1: + // } rts } diff --git a/src/test/ref/nes-array.asm b/src/test/ref/nes-array.asm index 7fee49650..668e3fb6a 100644 --- a/src/test/ref/nes-array.asm +++ b/src/test/ref/nes-array.asm @@ -10,40 +10,50 @@ main: { .label y2 = 6 .label __0 = 2 .label __1 = 2 + // y1 = 0x1234 lda #<$1234 sta.z y1 lda #>$1234 sta.z y1+1 + // y2 = 0x1234 lda #<$1234 sta.z y2 lda #>$1234 sta.z y2+1 + // foo(1, &y1) lda #y1 sta.z foo.y+1 ldx #1 jsr foo + // foo(1, &y1) + // *SCREEN++ = foo(1, &y1) lda.z __0 sta SCREEN lda.z __0+1 sta SCREEN+1 + // foo(2, &y2) lda #y2 sta.z foo.y+1 ldx #2 jsr foo + // foo(2, &y2) + // *SCREEN++ = foo(2, &y2) lda.z __1 sta SCREEN+SIZEOF_SIGNED_WORD lda.z __1+1 sta SCREEN+SIZEOF_SIGNED_WORD+1 + // } rts } // foo(byte register(X) x, signed word* zp(2) y) foo: { .label return = 2 .label y = 2 + // wow[x] + *y txa asl tax @@ -58,6 +68,7 @@ foo: { sta.z return+1 pla sta.z return + // } rts } wow: .word $cafe, $babe, $1234, $5678 diff --git a/src/test/ref/nes-array.log b/src/test/ref/nes-array.log index 3729b89da..13ddbe52d 100644 --- a/src/test/ref/nes-array.log +++ b/src/test/ref/nes-array.log @@ -131,7 +131,7 @@ Constant (const signed word*) foo::y#0 = &main::y1 Constant (const byte) foo::x#1 = 2 Constant (const signed word*) foo::y#1 = &main::y2 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [24] *((signed word*) main::SCREEN#1) ← (signed word~) main::$1 -- *(main::SCREEN#0 + SIZEOF_SIGNED_WORD) +Converting *(pointer+n) to pointer[n] [19] *((signed word*) main::SCREEN#1) ← (signed word~) main::$1 -- *(main::SCREEN#0 + SIZEOF_SIGNED_WORD) Successful SSA optimization Pass2InlineDerefIdx Eliminating unused variable (signed word*) main::SCREEN#2 and assignment [15] (signed word*) main::SCREEN#2 ← (signed word*) main::SCREEN#1 + (const byte) SIZEOF_SIGNED_WORD Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/no-recursion-heavy.asm b/src/test/ref/no-recursion-heavy.asm index 591ddf6a4..2210d3057 100644 --- a/src/test/ref/no-recursion-heavy.asm +++ b/src/test/ref/no-recursion-heavy.asm @@ -12,86 +12,117 @@ main: { tax sta.z bb __b2: + // f0() jsr f0 + // ba++; inc.z ba jmp __b2 } f0: { + // if(ba==0) lda.z ba cmp #0 bne __b1 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b1: + // if(ba==1) lda #1 cmp.z ba bne __b2 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b2: + // if(ba==2) lda #2 cmp.z ba bne __b3 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b3: + // if(ba==3) lda #3 cmp.z ba bne __b4 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b4: + // if(ba==4) lda #4 cmp.z ba bne __b5 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b5: + // if(ba==5) lda #5 cmp.z ba bne __b6 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b6: + // if(ba==6) lda #6 cmp.z ba bne __b7 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b7: + // if(ba==7) lda #7 cmp.z ba bne __b8 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b8: + // if(ba==8) lda #8 cmp.z ba bne __b9 + // bb++; inc.z bb lda.z bb sta.z bb_1 + // fa() jsr fa __b9: + // if(ba==9) lda #9 cmp.z ba bne __breturn + // fa() lda #0 sta.z bb_1 jsr fa @@ -99,167 +130,239 @@ f0: { sta.z bb rts __breturn: + // } rts } fa: { + // if(bb==0) lda.z bb_1 cmp #0 bne __b1 + // bc++; inx stx.z bc + // fb() jsr fb __b1: + // if(bb==1) lda #1 cmp.z bb_1 bne __b2 + // bc++; inx stx.z bc + // fb() jsr fb __b2: + // if(bb==2) lda #2 cmp.z bb_1 bne __b3 + // bc++; inx stx.z bc + // fb() jsr fb __b3: + // if(bb==3) lda #3 cmp.z bb_1 bne __b4 + // bc++; inx stx.z bc + // fb() jsr fb __b4: + // if(bb==4) lda #4 cmp.z bb_1 bne __b5 + // bc++; inx stx.z bc + // fb() jsr fb __b5: + // if(bb==5) lda #5 cmp.z bb_1 bne __b6 + // bc++; inx stx.z bc + // fb() jsr fb __b6: + // if(bb==6) lda #6 cmp.z bb_1 bne __b7 + // bc++; inx stx.z bc + // fb() jsr fb __b7: + // if(bb==7) lda #7 cmp.z bb_1 bne __b8 + // bc++; inx stx.z bc + // fb() jsr fb __b8: + // if(bb==8) lda #8 cmp.z bb_1 bne __b9 + // bc++; inx stx.z bc + // fb() jsr fb __b9: + // if(bb==9) lda #9 cmp.z bb_1 bne __breturn + // fb() lda #0 sta.z bc jsr fb ldx #0 rts __breturn: + // } rts } fb: { + // if(bc==0) lda.z bc cmp #0 bne __b1 + // bd++; iny tya + // fc() jsr fc __b1: + // if(bc==1) lda #1 cmp.z bc bne __b2 + // bd++; iny tya + // fc() jsr fc __b2: + // if(bc==2) lda #2 cmp.z bc bne __b3 + // bd++; iny tya + // fc() jsr fc __b3: + // if(bc==3) lda #3 cmp.z bc bne __b4 + // bd++; iny tya + // fc() jsr fc __b4: + // if(bc==4) lda #4 cmp.z bc bne __b5 + // bd++; iny tya + // fc() jsr fc __b5: + // if(bc==5) lda #5 cmp.z bc bne __b6 + // bd++; iny tya + // fc() jsr fc __b6: + // if(bc==6) lda #6 cmp.z bc bne __b7 + // bd++; iny tya + // fc() jsr fc __b7: + // if(bc==7) lda #7 cmp.z bc bne __b8 + // bd++; iny tya + // fc() jsr fc __b8: + // if(bc==8) lda #8 cmp.z bc bne __b9 + // bd++; iny tya + // fc() jsr fc __b9: + // if(bc==9) lda #9 cmp.z bc bne __breturn + // fc() lda #0 jsr fc ldy #0 rts __breturn: + // } rts } fc: { + // if(bd==0) cmp #0 + // if(bd==1) cmp #1 + // if(bd==2) cmp #2 + // if(bd==3) cmp #3 + // if(bd==4) cmp #4 + // if(bd==5) cmp #5 + // if(bd==6) cmp #6 + // if(bd==7) cmp #7 + // if(bd==8) cmp #8 + // if(bd==9) cmp #9 + // } rts } diff --git a/src/test/ref/no-recursion-heavy.log b/src/test/ref/no-recursion-heavy.log index 0943cb709..44c6999c5 100644 --- a/src/test/ref/no-recursion-heavy.log +++ b/src/test/ref/no-recursion-heavy.log @@ -1830,46 +1830,46 @@ Identical Phi Values (byte) bc#25 (byte) bc#2 Identical Phi Values (byte) bd#36 (byte) bd#2 Identical Phi Values (byte) ba#16 (byte) ba#17 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) f0::$1 [23] if((byte) ba#17!=(byte) 0) goto f0::@1 -Simple Condition (bool~) f0::$3 [27] if((byte) ba#17!=(byte) 1) goto f0::@2 -Simple Condition (bool~) f0::$5 [37] if((byte) ba#17!=(byte) 2) goto f0::@3 -Simple Condition (bool~) f0::$7 [47] if((byte) ba#17!=(byte) 3) goto f0::@4 -Simple Condition (bool~) f0::$9 [57] if((byte) ba#17!=(byte) 4) goto f0::@5 -Simple Condition (bool~) f0::$11 [67] if((byte) ba#17!=(byte) 5) goto f0::@6 -Simple Condition (bool~) f0::$13 [77] if((byte) ba#17!=(byte) 6) goto f0::@7 -Simple Condition (bool~) f0::$15 [87] if((byte) ba#17!=(byte) 7) goto f0::@8 -Simple Condition (bool~) f0::$17 [97] if((byte) ba#17!=(byte) 8) goto f0::@9 -Simple Condition (bool~) f0::$19 [107] if((byte) ba#17!=(byte) 9) goto f0::@return -Simple Condition (bool~) fa::$1 [128] if((byte) bb#27!=(byte) 0) goto fa::@1 -Simple Condition (bool~) fa::$3 [132] if((byte) bb#27!=(byte) 1) goto fa::@2 -Simple Condition (bool~) fa::$5 [141] if((byte) bb#27!=(byte) 2) goto fa::@3 -Simple Condition (bool~) fa::$7 [150] if((byte) bb#27!=(byte) 3) goto fa::@4 -Simple Condition (bool~) fa::$9 [159] if((byte) bb#27!=(byte) 4) goto fa::@5 -Simple Condition (bool~) fa::$11 [168] if((byte) bb#27!=(byte) 5) goto fa::@6 -Simple Condition (bool~) fa::$13 [177] if((byte) bb#27!=(byte) 6) goto fa::@7 -Simple Condition (bool~) fa::$15 [186] if((byte) bb#27!=(byte) 7) goto fa::@8 -Simple Condition (bool~) fa::$17 [195] if((byte) bb#27!=(byte) 8) goto fa::@9 -Simple Condition (bool~) fa::$19 [204] if((byte) bb#27!=(byte) 9) goto fa::@return -Simple Condition (bool~) fb::$1 [222] if((byte) bc#113!=(byte) 0) goto fb::@1 -Simple Condition (bool~) fb::$3 [226] if((byte) bc#113!=(byte) 1) goto fb::@2 -Simple Condition (bool~) fb::$5 [234] if((byte) bc#113!=(byte) 2) goto fb::@3 -Simple Condition (bool~) fb::$7 [242] if((byte) bc#113!=(byte) 3) goto fb::@4 -Simple Condition (bool~) fb::$9 [250] if((byte) bc#113!=(byte) 4) goto fb::@5 -Simple Condition (bool~) fb::$11 [258] if((byte) bc#113!=(byte) 5) goto fb::@6 -Simple Condition (bool~) fb::$13 [266] if((byte) bc#113!=(byte) 6) goto fb::@7 -Simple Condition (bool~) fb::$15 [274] if((byte) bc#113!=(byte) 7) goto fb::@8 -Simple Condition (bool~) fb::$17 [282] if((byte) bc#113!=(byte) 8) goto fb::@9 -Simple Condition (bool~) fb::$19 [290] if((byte) bc#113!=(byte) 9) goto fb::@return -Simple Condition (bool~) fc::$1 [304] if((byte) bd#117!=(byte) 0) goto fc::@1 -Simple Condition (bool~) fc::$3 [308] if((byte) bd#117!=(byte) 1) goto fc::@2 -Simple Condition (bool~) fc::$5 [313] if((byte) bd#117!=(byte) 2) goto fc::@3 -Simple Condition (bool~) fc::$7 [318] if((byte) bd#117!=(byte) 3) goto fc::@4 -Simple Condition (bool~) fc::$9 [323] if((byte) bd#117!=(byte) 4) goto fc::@5 -Simple Condition (bool~) fc::$11 [328] if((byte) bd#117!=(byte) 5) goto fc::@6 -Simple Condition (bool~) fc::$13 [333] if((byte) bd#117!=(byte) 6) goto fc::@7 -Simple Condition (bool~) fc::$15 [338] if((byte) bd#117!=(byte) 7) goto fc::@8 -Simple Condition (bool~) fc::$17 [343] if((byte) bd#117!=(byte) 8) goto fc::@9 -Simple Condition (bool~) fc::$19 [348] if((byte) bd#117!=(byte) 9) goto fc::@return +Simple Condition (bool~) f0::$1 [13] if((byte) ba#17!=(byte) 0) goto f0::@1 +Simple Condition (bool~) f0::$3 [16] if((byte) ba#17!=(byte) 1) goto f0::@2 +Simple Condition (bool~) f0::$5 [22] if((byte) ba#17!=(byte) 2) goto f0::@3 +Simple Condition (bool~) f0::$7 [28] if((byte) ba#17!=(byte) 3) goto f0::@4 +Simple Condition (bool~) f0::$9 [34] if((byte) ba#17!=(byte) 4) goto f0::@5 +Simple Condition (bool~) f0::$11 [40] if((byte) ba#17!=(byte) 5) goto f0::@6 +Simple Condition (bool~) f0::$13 [46] if((byte) ba#17!=(byte) 6) goto f0::@7 +Simple Condition (bool~) f0::$15 [52] if((byte) ba#17!=(byte) 7) goto f0::@8 +Simple Condition (bool~) f0::$17 [58] if((byte) ba#17!=(byte) 8) goto f0::@9 +Simple Condition (bool~) f0::$19 [64] if((byte) ba#17!=(byte) 9) goto f0::@return +Simple Condition (bool~) fa::$1 [75] if((byte) bb#27!=(byte) 0) goto fa::@1 +Simple Condition (bool~) fa::$3 [78] if((byte) bb#27!=(byte) 1) goto fa::@2 +Simple Condition (bool~) fa::$5 [84] if((byte) bb#27!=(byte) 2) goto fa::@3 +Simple Condition (bool~) fa::$7 [90] if((byte) bb#27!=(byte) 3) goto fa::@4 +Simple Condition (bool~) fa::$9 [96] if((byte) bb#27!=(byte) 4) goto fa::@5 +Simple Condition (bool~) fa::$11 [102] if((byte) bb#27!=(byte) 5) goto fa::@6 +Simple Condition (bool~) fa::$13 [108] if((byte) bb#27!=(byte) 6) goto fa::@7 +Simple Condition (bool~) fa::$15 [114] if((byte) bb#27!=(byte) 7) goto fa::@8 +Simple Condition (bool~) fa::$17 [120] if((byte) bb#27!=(byte) 8) goto fa::@9 +Simple Condition (bool~) fa::$19 [126] if((byte) bb#27!=(byte) 9) goto fa::@return +Simple Condition (bool~) fb::$1 [137] if((byte) bc#113!=(byte) 0) goto fb::@1 +Simple Condition (bool~) fb::$3 [140] if((byte) bc#113!=(byte) 1) goto fb::@2 +Simple Condition (bool~) fb::$5 [145] if((byte) bc#113!=(byte) 2) goto fb::@3 +Simple Condition (bool~) fb::$7 [150] if((byte) bc#113!=(byte) 3) goto fb::@4 +Simple Condition (bool~) fb::$9 [155] if((byte) bc#113!=(byte) 4) goto fb::@5 +Simple Condition (bool~) fb::$11 [160] if((byte) bc#113!=(byte) 5) goto fb::@6 +Simple Condition (bool~) fb::$13 [165] if((byte) bc#113!=(byte) 6) goto fb::@7 +Simple Condition (bool~) fb::$15 [170] if((byte) bc#113!=(byte) 7) goto fb::@8 +Simple Condition (bool~) fb::$17 [175] if((byte) bc#113!=(byte) 8) goto fb::@9 +Simple Condition (bool~) fb::$19 [180] if((byte) bc#113!=(byte) 9) goto fb::@return +Simple Condition (bool~) fc::$1 [189] if((byte) bd#117!=(byte) 0) goto fc::@1 +Simple Condition (bool~) fc::$3 [191] if((byte) bd#117!=(byte) 1) goto fc::@2 +Simple Condition (bool~) fc::$5 [193] if((byte) bd#117!=(byte) 2) goto fc::@3 +Simple Condition (bool~) fc::$7 [195] if((byte) bd#117!=(byte) 3) goto fc::@4 +Simple Condition (bool~) fc::$9 [197] if((byte) bd#117!=(byte) 4) goto fc::@5 +Simple Condition (bool~) fc::$11 [199] if((byte) bd#117!=(byte) 5) goto fc::@6 +Simple Condition (bool~) fc::$13 [201] if((byte) bd#117!=(byte) 6) goto fc::@7 +Simple Condition (bool~) fc::$15 [203] if((byte) bd#117!=(byte) 7) goto fc::@8 +Simple Condition (bool~) fc::$17 [205] if((byte) bd#117!=(byte) 8) goto fc::@9 +Simple Condition (bool~) fc::$19 [207] if((byte) bd#117!=(byte) 9) goto fc::@return Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) ba#0 = 0 Constant (const byte) bb#0 = 0 diff --git a/src/test/ref/nomodify-3.asm b/src/test/ref/nomodify-3.asm index 5ad589971..9414615a0 100644 --- a/src/test/ref/nomodify-3.asm +++ b/src/test/ref/nomodify-3.asm @@ -5,12 +5,15 @@ .label SCREEN = $400 .label i = 2 __bbegin: + // i = 7 lda #7 sta.z i jsr main rts main: { + // SCREEN[0] = i lda.z i sta SCREEN + // } rts } diff --git a/src/test/ref/nomodify-4.asm b/src/test/ref/nomodify-4.asm index a6e5b75d0..9d5cfb3a0 100644 --- a/src/test/ref/nomodify-4.asm +++ b/src/test/ref/nomodify-4.asm @@ -4,14 +4,19 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // print('a') lda #'a' jsr print + // print('b') lda #'b' jsr print + // } rts } // print(byte register(A) c) print: { + // *SCREEN = c sta SCREEN + // } rts } diff --git a/src/test/ref/noop-cast-elimination.asm b/src/test/ref/noop-cast-elimination.asm index 4c4178891..c5d9958e5 100644 --- a/src/test/ref/noop-cast-elimination.asm +++ b/src/test/ref/noop-cast-elimination.asm @@ -11,6 +11,7 @@ main: { sta.z sw+1 ldx #0 __b1: + // sw += (signed byte)i txa sta.z $fe ora #$7f @@ -25,6 +26,7 @@ main: { lda.z sw+1 adc.z $ff sta.z sw+1 + // screen[i] = sw txa asl tay @@ -32,8 +34,10 @@ main: { sta screen,y lda.z sw+1 sta screen+1,y + // for( byte i: 0..10) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/norom-charset.asm b/src/test/ref/norom-charset.asm index 352e8421a..3167a8f51 100644 --- a/src/test/ref/norom-charset.asm +++ b/src/test/ref/norom-charset.asm @@ -15,13 +15,17 @@ main: { lda #0 sta.z c __b1: + // for(byte c=0;c!=4;c++) lda #4 cmp.z c bne __b2 + // *VIC_MEMORY = (byte)(((word)SCREEN/$40)|((word)CHARSET/$400)) lda #SCREEN/$40|CHARSET/$400 sta VIC_MEMORY + // } rts __b2: + // gen_char3(charset, charset_spec_row[c]) lda.z c asl tax @@ -30,6 +34,7 @@ main: { lda charset_spec_row+1,x sta.z gen_char3.spec+1 jsr gen_char3 + // charset = charset+8 lda #8 clc adc.z charset @@ -37,6 +42,7 @@ main: { bcc !+ inc.z charset+1 !: + // for(byte c=0;c!=4;c++) inc.z c jmp __b1 } @@ -53,29 +59,39 @@ gen_char3: { ldx #0 ldy #0 __b2: + // >spec lda.z spec+1 + // >spec&$80 and #$80 + // if((>spec&$80)!=0) cmp #0 beq __b3 + // b = b|1 tya ora #1 tay __b3: + // b = b*2 tya asl tay + // spec = spec*2 asl.z spec rol.z spec+1 + // for(byte c: 0..2 ) inx cpx #3 bne __b2 + // dst[r] = b tya ldy.z r sta (dst),y + // for(byte r : 0..4 ) inc.z r lda #5 cmp.z r bne __b1 + // } rts } // Stores chars as 15 bits (in 2 bytes) specifying the 3x5 diff --git a/src/test/ref/norom-charset.log b/src/test/ref/norom-charset.log index 681fb50c1..1713c01ac 100644 --- a/src/test/ref/norom-charset.log +++ b/src/test/ref/norom-charset.log @@ -297,14 +297,14 @@ Identical Phi Values (byte) gen_char3::r#2 (byte) gen_char3::r#6 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) gen_char3::dst#5 (byte*) gen_char3::dst#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$7 [5] if((byte) main::c#2!=(byte) 4) goto main::@2 -Simple Condition (bool~) gen_char3::$3 [33] if((byte~) gen_char3::$1==(byte) 0) goto gen_char3::@3 -Simple Condition (bool~) gen_char3::$7 [41] if((byte) gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 -Simple Condition (bool~) gen_char3::$8 [49] if((byte) gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 +Simple Condition (bool~) main::$7 [4] if((byte) main::c#2!=(byte) 4) goto main::@2 +Simple Condition (bool~) gen_char3::$3 [28] if((byte~) gen_char3::$1==(byte) 0) goto gen_char3::@3 +Simple Condition (bool~) gen_char3::$7 [34] if((byte) gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 +Simple Condition (bool~) gen_char3::$8 [39] if((byte) gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte*) main::charset#0 ← (const byte*) CHARSET + (byte) 8 -Constant right-side identified [15] (word~) main::$1 ← (word)(const byte*) SCREEN -Constant right-side identified [17] (word~) main::$3 ← (word)(const byte*) CHARSET +Constant right-side identified [11] (word~) main::$1 ← (word)(const byte*) SCREEN +Constant right-side identified [13] (word~) main::$3 ← (word)(const byte*) CHARSET Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) main::charset#0 = CHARSET+8 Constant (const byte) main::c#0 = 0 @@ -314,10 +314,10 @@ Constant (const byte) gen_char3::r#0 = 0 Constant (const byte) gen_char3::b#0 = 0 Constant (const byte) gen_char3::c#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [39] gen_char3::c#1 ← ++ gen_char3::c#2 to ++ -Resolved ranged comparison value [41] if(gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 to (number) 3 -Resolved ranged next value [47] gen_char3::r#1 ← ++ gen_char3::r#6 to ++ -Resolved ranged comparison value [49] if(gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 to (number) 5 +Resolved ranged next value [32] gen_char3::c#1 ← ++ gen_char3::c#2 to ++ +Resolved ranged comparison value [34] if(gen_char3::c#1!=rangelast(0,2)) goto gen_char3::@2 to (number) 3 +Resolved ranged next value [37] gen_char3::r#1 ← ++ gen_char3::r#6 to ++ +Resolved ranged comparison value [39] if(gen_char3::r#1!=rangelast(0,4)) goto gen_char3::@1 to (number) 5 Adding number conversion cast (unumber) 3 in if((byte) gen_char3::c#1!=(number) 3) goto gen_char3::@2 Adding number conversion cast (unumber) 5 in if((byte) gen_char3::r#1!=(number) 5) goto gen_char3::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/number-conversion.asm b/src/test/ref/number-conversion.asm index bd6e551c4..b6100cb70 100644 --- a/src/test/ref/number-conversion.asm +++ b/src/test/ref/number-conversion.asm @@ -14,149 +14,185 @@ .label SCREEN = $400 .label COLS = $d800 main: { + // assertType(typeid(12sb+12), typeid(signed byte)) ldx #0 lda #TYPEID_SIGNED_BYTE sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sb+130), typeid(signed word)) lda #TYPEID_SIGNED_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sb+33000), typeid(signed dword)) lda #TYPEID_SIGNED_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sw+12), typeid(signed word)) lda #TYPEID_SIGNED_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sw+130), typeid(signed word)) lda #TYPEID_SIGNED_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sw+100000), typeid(signed dword)) lda #TYPEID_SIGNED_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sd+12), typeid(signed dword)) lda #TYPEID_SIGNED_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sd+130), typeid(signed dword)) lda #TYPEID_SIGNED_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sd+100000), typeid(signed dword)) lda #TYPEID_SIGNED_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+12), typeid(unsigned byte)) ldx #$28 lda #TYPEID_BYTE sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+250), typeid(unsigned byte)) lda #TYPEID_BYTE sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+300), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+65534), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+66000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+12), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+130), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+66000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ud+12), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ud+130), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ud+66000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+3000000000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+-12), typeid(unsigned byte)) ldx #$50 lda #TYPEID_BYTE sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+-120), typeid(unsigned byte)) lda #TYPEID_BYTE sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+-250), typeid(unsigned byte)) lda #TYPEID_BYTE sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+-260), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+-65000), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ub+-66000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+-12), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+-130), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+-65000), typeid(unsigned word)) lda #TYPEID_WORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12uw+-66000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ud+-12), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ud+-130), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12ud+-66000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 tay jsr assertType + // assertType(typeid(12sb+-2100000000), typeid(unsigned dword)) lda #TYPEID_DWORD sta.z assertType.t2 ldy #TYPEID_SIGNED_DWORD jsr assertType + // } rts } // Check that the two passed type IDs are equal. @@ -165,17 +201,23 @@ main: { // assertType(byte register(Y) t1, byte zp(2) t2) assertType: { .label t2 = 2 + // if(t1==t2) tya cmp.z t2 beq __b1 + // COLS[idx] = RED lda #RED sta COLS,x __b2: + // SCREEN[idx++] = t1 tya sta SCREEN,x + // SCREEN[idx++] = t1; inx + // } rts __b1: + // COLS[idx] = GREEN lda #GREEN sta COLS,x jmp __b2 diff --git a/src/test/ref/number-conversion.log b/src/test/ref/number-conversion.log index 4513a52f7..ccdda185b 100644 --- a/src/test/ref/number-conversion.log +++ b/src/test/ref/number-conversion.log @@ -860,7 +860,7 @@ Identical Phi Values (byte) idx#36 (byte) idx#40 Identical Phi Values (byte) idx#37 (byte) idx#40 Identical Phi Values (byte) idx#42 (byte) idx#37 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) assertType::$0 [219] if((byte) assertType::t1#35==(byte) assertType::t2#35) goto assertType::@1 +Simple Condition (bool~) assertType::$0 [147] if((byte) assertType::t1#35==(byte) assertType::t2#35) goto assertType::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) idx#0 = 0 Constant (const byte) assertType::t1#0 = TYPEID_SIGNED_BYTE diff --git a/src/test/ref/number-inference-sum.asm b/src/test/ref/number-inference-sum.asm index 9715ba4f5..05d22eef0 100644 --- a/src/test/ref/number-inference-sum.asm +++ b/src/test/ref/number-inference-sum.asm @@ -10,11 +10,14 @@ main: { .const b1 = $fa .const b2 = b1+$fa .const w = b2+1 + // screen[0] = w lda #w sta screen+1 + // *bgcol = RED lda #RED sta bgcol + // } rts } diff --git a/src/test/ref/number-inference-sum.log b/src/test/ref/number-inference-sum.log index 61000a49a..f46c33bad 100644 --- a/src/test/ref/number-inference-sum.log +++ b/src/test/ref/number-inference-sum.log @@ -82,17 +82,17 @@ Successful SSA optimization Pass2UnaryNotSimplification Alias (byte) main::b2#0 = (byte~) main::$0 Alias (word) main::w#0 = (byte~) main::$1 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$3 [8] if((word) main::w#0<=(byte) $ff) goto main::@return +Simple Condition (bool~) main::$3 [5] if((word) main::w#0<=(byte) $ff) goto main::@return Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte) main::b2#0 ← (const byte) main::b1 + (byte) $fa -Constant right-side identified [4] (byte~) main::$4 ← (byte) 0 * (const byte) SIZEOF_WORD +Constant right-side identified [2] (byte~) main::$4 ← (byte) 0 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::b2#0 = main::b1+$fa Constant (const byte) main::$4 = 0*SIZEOF_WORD Successful SSA optimization Pass2ConstantIdentification Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_WORD in Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero main::screen in [5] *((const word*) main::screen + (const byte) main::$4) ← (word) main::w#0 +Simplifying expression containing zero main::screen in [3] *((const word*) main::screen + (const byte) main::$4) ← (word) main::w#0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) main::$4 Eliminating unused constant (const byte) SIZEOF_WORD diff --git a/src/test/ref/number-type.asm b/src/test/ref/number-type.asm index 8944e6dbf..53f6010ad 100644 --- a/src/test/ref/number-type.asm +++ b/src/test/ref/number-type.asm @@ -3,67 +3,97 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // testBytes() jsr testBytes + // testSBytes() jsr testSBytes + // } rts } testSBytes: { // Constant values resolvable to signed bytes .label SCREEN = $428 + // SCREEN[idx++] = -12 lda #-$c sta SCREEN + // SCREEN[idx++] = -6-6 lda #-6-6 sta SCREEN+1 + // SCREEN[idx++] = -18+6 lda #-$12+6 sta SCREEN+2 + // SCREEN[idx++] = -1812+1800 lda #-$714+$708 sta SCREEN+3 + // SCREEN[idx++] = -1-2-3-6 lda #-1-2-3-6 sta SCREEN+4 + // SCREEN[idx++] = -2*6 lda #-2*6 sta SCREEN+5 + // SCREEN[idx++] = -3<<2 lda #-3<<2 sta SCREEN+6 + // SCREEN[idx++] = -24>>1 lda #-$18>>1 sta SCREEN+7 + // SCREEN[idx++] = -4&-9 lda #-4&-9 sta SCREEN+8 + // SCREEN[idx++] = -0x10|-0xfc lda #-$10|-$fc sta SCREEN+9 + // SCREEN[idx++] = (-2-2)*(15/5) lda #(-2-2)*$f/5 sta SCREEN+$a + // SCREEN[idx++] = (signed byte)(4096-12) lda #$ff&$1000-$c sta SCREEN+$b + // } rts } testBytes: { // Constant values resolvable to bytes .label SCREEN = $400 + // SCREEN[idx++] = 12 lda #$c sta SCREEN + // SCREEN[idx++] = 6+6 lda #6+6 sta SCREEN+1 + // SCREEN[idx++] = 18-6 lda #$12-6 sta SCREEN+2 + // SCREEN[idx++] = 1812-1800 lda #$714-$708 sta SCREEN+3 + // SCREEN[idx++] = 1+2+3+6 lda #1+2+3+6 sta SCREEN+4 + // SCREEN[idx++] = 2*6 lda #2*6 sta SCREEN+5 + // SCREEN[idx++] = 3<<2 lda #3<<2 sta SCREEN+6 + // SCREEN[idx++] = 24>>1 lda #$18>>1 sta SCREEN+7 + // SCREEN[idx++] = 15&28 lda #$f&$1c sta SCREEN+8 + // SCREEN[idx++] = 4|8 lda #4|8 sta SCREEN+9 + // SCREEN[idx++] = 5^9 lda #5^9 sta SCREEN+$a + // SCREEN[idx++] = (2+2)*(15/5) lda #(2+2)*$f/5 sta SCREEN+$b + // SCREEN[idx++] = (byte)(4096+12) lda #$ff&$1000+$c sta SCREEN+$c + // } rts } diff --git a/src/test/ref/operator-lohi-problem-1.asm b/src/test/ref/operator-lohi-problem-1.asm index 02ecea630..edc79564c 100644 --- a/src/test/ref/operator-lohi-problem-1.asm +++ b/src/test/ref/operator-lohi-problem-1.asm @@ -9,9 +9,12 @@ .const DVAL = $20000 .label SCREEN = $400 main: { + // SCREEN[0] = <(word)(DVAL/$400) lda #(word)(DVAL/$400) lda #0 sta SCREEN+1 + // } rts } diff --git a/src/test/ref/operator-lohi-problem.asm b/src/test/ref/operator-lohi-problem.asm index 57d980a02..4eb0f2fc8 100644 --- a/src/test/ref/operator-lohi-problem.asm +++ b/src/test/ref/operator-lohi-problem.asm @@ -11,13 +11,18 @@ main: { .const dw = $2000 .const w1 = dw&$ffff .const w2 = dw+1&$ffff + // SCREEN[0] = w1 lda #>w1 sta SCREEN+1 + // SCREEN[3] = w2 lda #>w2 sta SCREEN+4 + // } rts } diff --git a/src/test/ref/operator-lohi-problem.log b/src/test/ref/operator-lohi-problem.log index 4fbee7b73..91d5cc289 100644 --- a/src/test/ref/operator-lohi-problem.log +++ b/src/test/ref/operator-lohi-problem.log @@ -78,12 +78,12 @@ Alias (word) main::w1#0 = (word~) main::$0 Alias (word) main::w2#0 = (word~) main::$2 Successful SSA optimization Pass2AliasElimination Constant right-side identified [0] (word) main::w1#0 ← < (const dword) main::dw -Constant right-side identified [2] (dword~) main::$1 ← (const dword) main::dw + (byte) 1 +Constant right-side identified [1] (dword~) main::$1 ← (const dword) main::dw + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) main::w1#0 = =(byte) 0) goto main::@3 -Simple Condition (bool~) main::$4 [10] if((byte) main::i#1!=rangelast(0,7)) goto main::@2 -Simple Condition (bool~) main::$1 [16] if((byte) main::temp#1>=(byte) 0) goto main::@return +Simple Condition (bool~) main::$3 [4] if(*((const byte*) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3 +Simple Condition (bool~) main::$4 [8] if((byte) main::i#1!=rangelast(0,7)) goto main::@2 +Simple Condition (bool~) main::$1 [11] if((byte) main::temp#1>=(byte) 0) goto main::@return Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::temp#0 = 0 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [5] if(*((const byte*) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3 -if() condition always true - replacing block destination [16] if((byte) main::temp#1>=(byte) 0) goto main::@return +if() condition always true - replacing block destination [4] if(*((const byte*) ball_active + (byte) main::i#2)>=(byte) 0) goto main::@3 +if() condition always true - replacing block destination [11] if((byte) main::temp#1>=(byte) 0) goto main::@return Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,7)) goto main::@2 to (number) 8 +Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,7)) goto main::@2 to (number) 8 Eliminating unused constant (const byte) main::temp#0 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@4 diff --git a/src/test/ref/overlap-allocation-2.asm b/src/test/ref/overlap-allocation-2.asm index b2f79fe24..03c1a1d2e 100644 --- a/src/test/ref/overlap-allocation-2.asm +++ b/src/test/ref/overlap-allocation-2.asm @@ -6,33 +6,43 @@ main: { ldy #0 __b1: + // line(i) tya tax jsr line + // for(byte i : 0..8) iny cpy #9 bne __b1 ldy #$a __b2: + // line(j) tya tax jsr line + // for(byte j : 10..18) iny cpy #$13 bne __b2 + // } rts } // line(byte register(X) l) line: { + // plot(l) jsr plot + // plot(l+20) txa axs #-[$14] jsr plot + // } rts } // plot(byte register(X) x) plot: { + // SCREEN[x] = '*' lda #'*' sta SCREEN,x + // } rts } diff --git a/src/test/ref/overlap-allocation-2.log b/src/test/ref/overlap-allocation-2.log index 3abc08017..56cd299c1 100644 --- a/src/test/ref/overlap-allocation-2.log +++ b/src/test/ref/overlap-allocation-2.log @@ -129,16 +129,16 @@ Alias (byte) main::j#2 = (byte) main::j#3 Alias (byte) line::l#2 = (byte) line::l#3 Alias (byte) plot::x#1 = (byte~) line::$1 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,8)) goto main::@1 -Simple Condition (bool~) main::$3 [15] if((byte) main::j#1!=rangelast($a,$12)) goto main::@3 +Simple Condition (bool~) main::$1 [6] if((byte) main::i#1!=rangelast(0,8)) goto main::@1 +Simple Condition (bool~) main::$3 [13] if((byte) main::j#1!=rangelast($a,$12)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#0 = $a Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,8)) goto main::@1 to (number) 9 -Resolved ranged next value [13] main::j#1 ← ++ main::j#2 to ++ -Resolved ranged comparison value [15] if(main::j#1!=rangelast($a,$12)) goto main::@3 to (number) $13 +Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,8)) goto main::@1 to (number) 9 +Resolved ranged next value [11] main::j#1 ← ++ main::j#2 to ++ +Resolved ranged comparison value [13] if(main::j#1!=rangelast($a,$12)) goto main::@3 to (number) $13 Adding number conversion cast (unumber) 9 in if((byte) main::i#1!=(number) 9) goto main::@1 Adding number conversion cast (unumber) $13 in if((byte) main::j#1!=(number) $13) goto main::@3 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/overlap-allocation.asm b/src/test/ref/overlap-allocation.asm index 9421e7cac..e9147d991 100644 --- a/src/test/ref/overlap-allocation.asm +++ b/src/test/ref/overlap-allocation.asm @@ -7,27 +7,36 @@ main: { ldx #0 __b1: + // plot(i) jsr plot + // for(byte i : 0..10) inx cpx #$b bne __b1 ldx #0 __b2: + // plot(j) jsr plot + // for(byte j : 0..10) inx cpx #$b bne __b2 ldx #0 __b3: + // plot(k) jsr plot + // for(byte k : 0..10) inx cpx #$b bne __b3 + // } rts } // plot(byte register(X) x) plot: { + // SCREEN[x] = '*' lda #'*' sta SCREEN,x + // } rts } diff --git a/src/test/ref/overlap-allocation.log b/src/test/ref/overlap-allocation.log index 09c141c0f..e019dcd3c 100644 --- a/src/test/ref/overlap-allocation.log +++ b/src/test/ref/overlap-allocation.log @@ -116,20 +116,20 @@ Alias (byte) main::i#2 = (byte) main::i#3 Alias (byte) main::j#2 = (byte) main::j#3 Alias (byte) main::k#2 = (byte) main::k#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 -Simple Condition (bool~) main::$3 [15] if((byte) main::j#1!=rangelast(0,$a)) goto main::@3 -Simple Condition (bool~) main::$5 [23] if((byte) main::k#1!=rangelast(0,$a)) goto main::@5 +Simple Condition (bool~) main::$1 [6] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$3 [13] if((byte) main::j#1!=rangelast(0,$a)) goto main::@3 +Simple Condition (bool~) main::$5 [20] if((byte) main::k#1!=rangelast(0,$a)) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::j#0 = 0 Constant (const byte) main::k#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b -Resolved ranged next value [13] main::j#1 ← ++ main::j#2 to ++ -Resolved ranged comparison value [15] if(main::j#1!=rangelast(0,$a)) goto main::@3 to (number) $b -Resolved ranged next value [21] main::k#1 ← ++ main::k#2 to ++ -Resolved ranged comparison value [23] if(main::k#1!=rangelast(0,$a)) goto main::@5 to (number) $b +Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [11] main::j#1 ← ++ main::j#2 to ++ +Resolved ranged comparison value [13] if(main::j#1!=rangelast(0,$a)) goto main::@3 to (number) $b +Resolved ranged next value [18] main::k#1 ← ++ main::k#2 to ++ +Resolved ranged comparison value [20] if(main::k#1!=rangelast(0,$a)) goto main::@5 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Adding number conversion cast (unumber) $b in if((byte) main::j#1!=(number) $b) goto main::@3 Adding number conversion cast (unumber) $b in if((byte) main::k#1!=(number) $b) goto main::@5 diff --git a/src/test/ref/parse-negated-struct-ref.asm b/src/test/ref/parse-negated-struct-ref.asm index a4bc8c929..528d55728 100644 --- a/src/test/ref/parse-negated-struct-ref.asm +++ b/src/test/ref/parse-negated-struct-ref.asm @@ -6,14 +6,18 @@ main: { .label SCREEN = $400 .label a = aa + // if(!a->b) lda #0 cmp a bne !a+ + // *SCREEN = 'a' lda #'a' sta SCREEN + // asm // ASMREL labels jmp !a+ !a: + // } rts } aa: .byte 1 diff --git a/src/test/ref/parse-negated-struct-ref.log b/src/test/ref/parse-negated-struct-ref.log index 1ffcb345b..2cf46a9b1 100644 --- a/src/test/ref/parse-negated-struct-ref.log +++ b/src/test/ref/parse-negated-struct-ref.log @@ -60,7 +60,7 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [2] (bool~) main::$0 ← (byte) 0 == *((byte*~) main::$2) from [1] (bool~) main::$3 ← (byte) 0 != *((byte*~) main::$2) Inversing boolean not [3] (bool~) main::$1 ← (byte) 0 != *((byte*~) main::$2) from [2] (bool~) main::$0 ← (byte) 0 == *((byte*~) main::$2) Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) main::$1 [4] if((byte) 0!=*((byte*~) main::$2)) goto main::@1 +Simple Condition (bool~) main::$1 [2] if((byte) 0!=*((byte*~) main::$2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (byte*~) main::$2 ← (byte*)(const struct A*) main::a + (const byte) OFFSET_STRUCT_A_B Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/plasma-center.asm b/src/test/ref/plasma-center.asm index e3ff4164e..e398ecffc 100644 --- a/src/test/ref/plasma-center.asm +++ b/src/test/ref/plasma-center.asm @@ -38,6 +38,7 @@ .label sin_offset_x = 2 .label sin_offset_y = $f __b1: + // malloc(1000) lda #<$3e8 sta.z malloc.size lda #>$3e8 @@ -47,6 +48,7 @@ __b1: lda #>HEAP_TOP sta.z heap_head+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_DIST lda.z malloc.mem+1 @@ -56,6 +58,7 @@ __b1: lda #>$3e8 sta.z malloc.size+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_ANGLE lda.z malloc.mem+1 @@ -65,17 +68,21 @@ __b1: main: { .const toD0181_return = (>(SCREEN1&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(SCREEN2&$3fff)*4)|(>CHARSET)/4&$f + // init_dist_screen(SCREEN_DIST) lda.z SCREEN_DIST sta.z init_dist_screen.screen lda.z SCREEN_DIST+1 sta.z init_dist_screen.screen+1 jsr init_dist_screen + // init_angle_screen(SCREEN_ANGLE) lda.z SCREEN_ANGLE sta.z init_angle_screen.screen lda.z SCREEN_ANGLE+1 sta.z init_angle_screen.screen+1 jsr init_angle_screen + // make_plasma_charset(CHARSET) jsr make_plasma_charset + // memset(COLS, BLACK, 1000) ldx #BLACK lda #SCREEN1 sta.z doplasma.screen+1 jsr doplasma + // *D018 = toD018(SCREEN1, CHARSET) lda #toD0181_return sta D018 + // doplasma(SCREEN2) lda #SCREEN2 sta.z doplasma.screen+1 jsr doplasma + // *D018 = toD018(SCREEN2, CHARSET) lda #toD0182_return sta D018 jmp __b2 @@ -112,14 +123,17 @@ doplasma: { .label sin_y = $10 .label screen = 7 .label y = $12 + // angle = SCREEN_ANGLE lda.z SCREEN_ANGLE sta.z angle lda.z SCREEN_ANGLE+1 sta.z angle+1 + // dist = SCREEN_DIST lda.z SCREEN_DIST sta.z dist lda.z SCREEN_DIST+1 sta.z dist+1 + // sin_x = SINTABLE+sin_offset_x lda.z sin_offset_x clc adc #SINTABLE adc #0 sta.z sin_x+1 + // sin_y = SINTABLE+sin_offset_y lda.z sin_offset_y clc adc #$3e8 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 lda.z dst cmp.z end bne __b3 + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -228,7 +258,9 @@ make_plasma_charset: { .label i = 2 .label c = 5 .label __16 = $10 + // sid_rnd_init() jsr sid_rnd_init + // print_cls() jsr print_cls lda #$100 bcc __b2 @@ -246,24 +279,32 @@ make_plasma_charset: { cmp #<$100 bcc __b2 !: + // } rts __b2: + // s) lda.z s cmp.z __7 bcs __b8 + // b |= bittab[ii] tya ora bittab,x tay __b8: + // for (char ii = 0; ii < 8; ++ii) inx jmp __b5 bittab: .byte 1, 2, 4, 8, $10, $20, $40, $80 @@ -322,39 +373,49 @@ make_plasma_charset: { // Get a random number from the SID voice 3, // Must be initialized with sid_rnd_init() sid_rnd: { + // return *SID_VOICE3_OSC; lda SID_VOICE3_OSC + // } rts } // Print a single char print_char: { .const ch = '.' + // *(print_char_cursor++) = ch lda #ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) ldx #' ' lda #print_line_cursor sta.z memset.str+1 jsr memset + // } rts } // Initialize SID voice 3 for random number generation sid_rnd_init: { + // *SID_VOICE3_FREQ = $ffff lda #<$ffff sta SID_VOICE3_FREQ lda #>$ffff sta SID_VOICE3_FREQ+1 + // *SID_VOICE3_CONTROL = SID_CONTROL_NOISE lda #SID_CONTROL_NOISE sta SID_VOICE3_CONTROL + // } rts } // Populates 1000 bytes (a screen) with values representing the angle to the center. @@ -372,6 +433,7 @@ init_angle_screen: { .label x = $12 .label xb = 2 .label y = $f + // screen_topline = screen+40*12 lda.z screen clc adc #<$28*$c @@ -379,6 +441,7 @@ init_angle_screen: { lda.z screen+1 adc #>$28*$c sta.z screen_topline+1 + // screen_bottomline = screen+40*12 clc lda.z screen_bottomline adc #<$28*$c @@ -394,9 +457,11 @@ init_angle_screen: { lda #0 sta.z x __b2: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b3 + // screen_topline -= 40 lda.z screen_topline sec sbc #<$28 @@ -404,6 +469,7 @@ init_angle_screen: { lda.z screen_topline+1 sbc #>$28 sta.z screen_topline+1 + // screen_bottomline += 40 lda #$28 clc adc.z screen_bottomline @@ -411,25 +477,35 @@ init_angle_screen: { bcc !+ inc.z screen_bottomline+1 !: + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b3: + // x*2 lda.z x asl + // 39-x*2 eor #$ff clc adc #$27+1 + // (word){ 39-x*2, 0 } ldy #0 sta.z xw+1 sty.z xw + // y*2 lda.z y asl + // (word){ y*2, 0 } sta.z yw+1 sty.z yw + // atan2_16(xw, yw) jsr atan2_16 + // angle_w = atan2_16(xw, yw) + // angle_w+0x0080 lda #$80 clc adc.z __11 @@ -437,23 +513,32 @@ init_angle_screen: { bcc !+ inc.z __11+1 !: + // ang_w = >(angle_w+0x0080) lda.z __11+1 sta.z ang_w + // screen_bottomline[xb] = ang_w ldy.z xb sta (screen_bottomline),y + // -ang_w eor #$ff clc adc #1 + // screen_topline[xb] = -ang_w sta (screen_topline),y + // 0x80+ang_w lda #$80 clc adc.z ang_w + // screen_topline[x] = 0x80+ang_w ldy.z x sta (screen_topline),y + // 0x80-ang_w lda #$80 sec sbc.z ang_w + // screen_bottomline[x] = 0x80-ang_w sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b2 @@ -473,6 +558,7 @@ atan2_16: { .label return = $10 .label x = $14 .label y = $16 + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -485,6 +571,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -502,15 +589,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -519,8 +610,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -529,6 +622,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -542,21 +636,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -564,6 +664,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -571,6 +672,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -582,6 +684,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -589,6 +692,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -596,6 +700,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -603,6 +708,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -615,6 +721,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -623,6 +730,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -631,6 +739,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -660,7 +769,9 @@ init_dist_screen: { .label ds = $16 .label x = $f .label xb = $12 + // init_squares() jsr init_squares + // screen_bottomline = screen+40*24 lda.z screen clc adc #<$28*$18 @@ -671,27 +782,34 @@ init_dist_screen: { lda #0 sta.z y __b1: + // y2 = y*2 lda.z y asl + // (y2>=24)?(y2-24):(24-y2) cmp #$18 bcs __b2 eor #$ff clc adc #$18+1 __b4: + // sqr(yd) jsr sqr + // sqr(yd) lda.z sqr.return sta.z sqr.return_1 lda.z sqr.return+1 sta.z sqr.return_1+1 + // yds = sqr(yd) lda #$27 sta.z xb lda #0 sta.z x __b5: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b6 + // screen_topline += 40 lda #$28 clc adc.z screen_topline @@ -699,6 +817,7 @@ init_dist_screen: { bcc !+ inc.z screen_topline+1 !: + // screen_bottomline -= 40 lda.z screen_bottomline sec sbc #<$28 @@ -706,21 +825,29 @@ init_dist_screen: { lda.z screen_bottomline+1 sbc #>$28 sta.z screen_bottomline+1 + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b6: + // x2 = x*2 lda.z x asl + // (x2>=39)?(x2-39):(39-x2) cmp #$27 bcs __b8 eor #$ff clc adc #$27+1 __b10: + // sqr(xd) jsr sqr + // sqr(xd) + // xds = sqr(xd) + // ds = xds+yds lda.z ds clc adc.z yds @@ -728,21 +855,30 @@ init_dist_screen: { lda.z ds+1 adc.z yds+1 sta.z ds+1 + // sqrt(ds) jsr sqrt + // d = sqrt(ds) + // screen_topline[x] = d ldy.z x sta (screen_topline),y + // screen_bottomline[x] = d sta (screen_bottomline),y + // screen_topline[xb] = d ldy.z xb sta (screen_topline),y + // screen_bottomline[xb] = d sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b5 __b8: + // (x2>=39)?(x2-39):(39-x2) sec sbc #$27 jmp __b10 __b2: + // (y2>=24)?(y2-24):(24-y2) sec sbc #$18 jmp __b4 @@ -756,11 +892,15 @@ sqrt: { .label __3 = 7 .label found = 7 .label val = $16 + // bsearch16u(val, SQUARES, NUM_SQUARES) lda.z SQUARES sta.z bsearch16u.items lda.z SQUARES+1 sta.z bsearch16u.items+1 jsr bsearch16u + // bsearch16u(val, SQUARES, NUM_SQUARES) + // found = bsearch16u(val, SQUARES, NUM_SQUARES) + // found-SQUARES lda.z __3 sec sbc.z SQUARES @@ -770,7 +910,9 @@ sqrt: { sta.z __3+1 lsr.z __1+1 ror.z __1 + // (byte)(found-SQUARES) lda.z __1 + // } rts } // Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. @@ -788,8 +930,10 @@ bsearch16u: { .label key = $16 ldx #NUM_SQUARES __b3: + // while (num > 0) cpx #0 bne __b4 + // *items<=key?items:items-1 ldy #1 lda (items),y cmp.z key+1 @@ -808,10 +952,13 @@ bsearch16u: { sbc #>1*SIZEOF_WORD sta.z __2+1 __b2: + // } rts __b4: + // num >> 1 txa lsr + // items + (num >> 1) asl clc adc.z items @@ -819,6 +966,7 @@ bsearch16u: { lda #0 adc.z items+1 sta.z pivot+1 + // result = (signed int)key-(signed int)*pivot sec lda.z key ldy #0 @@ -828,6 +976,7 @@ bsearch16u: { iny sbc (pivot),y sta.z result+1 + // if (result == 0) bne __b6 lda.z result bne __b6 @@ -837,12 +986,14 @@ bsearch16u: { sta.z return+1 rts __b6: + // if (result > 0) lda.z result+1 bmi __b7 bne !+ lda.z result beq __b7 !: + // items = pivot+1 lda #1*SIZEOF_WORD clc adc.z pivot @@ -850,8 +1001,10 @@ bsearch16u: { lda #0 adc.z pivot+1 sta.z items+1 + // num--; dex __b7: + // num >>= 1 txa lsr tax @@ -863,6 +1016,7 @@ bsearch16u: { sqr: { .label return = $16 .label return_1 = $14 + // return SQUARES[val]; asl tay lda (SQUARES),y @@ -870,6 +1024,7 @@ sqr: { iny lda (SQUARES),y sta.z return+1 + // } rts } // Initialize squares table @@ -877,11 +1032,14 @@ sqr: { init_squares: { .label squares = $10 .label sqr = $1a + // malloc(NUM_SQUARES*sizeof(word)) lda #NUM_SQUARES*SIZEOF_WORD sta.z malloc.size+1 jsr malloc + // malloc(NUM_SQUARES*sizeof(word)) + // squares = SQUARES lda.z SQUARES sta.z squares lda.z SQUARES+1 @@ -891,16 +1049,20 @@ init_squares: { sta.z sqr+1 tax __b1: + // for(byte i=0;i(byte) 0) goto bsearch16u::@7 -Simple Condition (bool~) bsearch16u::$12 [45] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 -Simple Condition (bool~) bsearch16u::$0 [48] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 -Simple Condition (bool~) bsearch16u::$14 [52] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$2 [90] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 -Simple Condition (bool~) atan2_16::$0 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [136] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [149] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [158] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [161] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [169] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [172] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [189] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [193] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) doplasma::$3 [347] if((byte) doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 -Simple Condition (bool~) doplasma::$4 [354] if((byte) doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 -Simple Condition (bool~) init_angle_screen::$2 [373] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [410] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 -Simple Condition (bool~) init_dist_screen::$3 [426] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$10 [445] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$12 [450] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 -Simple Condition (bool~) init_dist_screen::$21 [456] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 -Simple Condition (bool~) make_plasma_charset::$2 [500] if((word) make_plasma_charset::c#2<(word) $100) goto make_plasma_charset::@2 -Simple Condition (bool~) make_plasma_charset::$4 [507] if((byte) make_plasma_charset::i#2<(byte) 8) goto make_plasma_charset::@5 -Simple Condition (bool~) make_plasma_charset::$14 [515] if((byte~) make_plasma_charset::$12!=(byte) 0) goto make_plasma_charset::@19 -Simple Condition (bool~) make_plasma_charset::$5 [518] if((byte) make_plasma_charset::ii#2<(byte) 8) goto make_plasma_charset::@8 -Simple Condition (bool~) make_plasma_charset::$9 [527] if((byte~) make_plasma_charset::$7<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@10 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) bsearch16u::$5 [22] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 +Simple Condition (bool~) bsearch16u::$12 [30] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 +Simple Condition (bool~) bsearch16u::$0 [32] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 +Simple Condition (bool~) bsearch16u::$14 [34] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 +Simple Condition (bool~) init_squares::$2 [59] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 +Simple Condition (bool~) atan2_16::$0 [84] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [88] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [95] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [99] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [102] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [107] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [110] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [124] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [127] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) doplasma::$3 [223] if((byte) doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 +Simple Condition (bool~) doplasma::$4 [229] if((byte) doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 +Simple Condition (bool~) init_angle_screen::$2 [242] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [270] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_dist_screen::$3 [281] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$10 [293] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$12 [296] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 +Simple Condition (bool~) init_dist_screen::$21 [301] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) make_plasma_charset::$2 [328] if((word) make_plasma_charset::c#2<(word) $100) goto make_plasma_charset::@2 +Simple Condition (bool~) make_plasma_charset::$4 [334] if((byte) make_plasma_charset::i#2<(byte) 8) goto make_plasma_charset::@5 +Simple Condition (bool~) make_plasma_charset::$14 [339] if((byte~) make_plasma_charset::$12!=(byte) 0) goto make_plasma_charset::@19 +Simple Condition (bool~) make_plasma_charset::$5 [342] if((byte) make_plasma_charset::ii#2<(byte) 8) goto make_plasma_charset::@8 +Simple Condition (bool~) make_plasma_charset::$9 [348] if((byte~) make_plasma_charset::$7<=(byte) make_plasma_charset::s#0) goto make_plasma_charset::@10 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [189] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [124] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [61] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [68] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [39] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [42] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD @@ -3619,21 +3619,21 @@ Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Constant (const word) main::toD0182_$0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [272] if(true) goto main::@2 +if() condition always true - replacing block destination [176] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [187] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [189] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [345] doplasma::x#1 ← ++ doplasma::x#2 to ++ -Resolved ranged comparison value [347] if(doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 to (number) $28 -Resolved ranged next value [352] doplasma::y#1 ← ++ doplasma::y#4 to ++ -Resolved ranged comparison value [354] if(doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 to (number) $1a -Resolved ranged next value [408] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [410] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Resolved ranged next value [454] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ -Resolved ranged comparison value [456] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d -Rewriting conditional comparison [373] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Rewriting conditional comparison [445] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -De-inlining pointer[w] to *(pointer+w) [531] *((const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$11) ← (byte) make_plasma_charset::b#2 +Resolved ranged next value [122] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [124] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [221] doplasma::x#1 ← ++ doplasma::x#2 to ++ +Resolved ranged comparison value [223] if(doplasma::x#1!=rangelast(0,$27)) goto doplasma::@2 to (number) $28 +Resolved ranged next value [227] doplasma::y#1 ← ++ doplasma::y#4 to ++ +Resolved ranged comparison value [229] if(doplasma::y#1!=rangelast(0,$19)) goto doplasma::@1 to (number) $1a +Resolved ranged next value [268] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [270] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [299] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ +Resolved ranged comparison value [301] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d +Rewriting conditional comparison [242] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Rewriting conditional comparison [293] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +De-inlining pointer[w] to *(pointer+w) [351] *((const byte*) make_plasma_charset::charset#0 + (word~) make_plasma_charset::$11) ← (byte) make_plasma_charset::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx Eliminating unused variable (void*) memset::return#2 and assignment [104] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [125] (void*) memset::return#3 ← (void*) memset::str#3 diff --git a/src/test/ref/platform-asm6502.asm b/src/test/ref/platform-asm6502.asm index e085a00b4..57133140c 100644 --- a/src/test/ref/platform-asm6502.asm +++ b/src/test/ref/platform-asm6502.asm @@ -3,12 +3,16 @@ main: { ldx #0 __b1: + // for(char i=0;i<10;i++) cpx #$a bcc __b2 + // } rts __b2: + // TABLE[i] = i txa sta TABLE,x + // for(char i=0;i<10;i++) inx jmp __b1 } diff --git a/src/test/ref/plus-0.asm b/src/test/ref/plus-0.asm index 5570f60a2..d4397c1dd 100644 --- a/src/test/ref/plus-0.asm +++ b/src/test/ref/plus-0.asm @@ -3,18 +3,21 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // fill((byte*)$400,'a') ldx #'a' lda #<$400 sta.z fill.screen lda #>$400 sta.z fill.screen+1 jsr fill + // fill((byte*)$2000,'b') ldx #'b' lda #<$2000 sta.z fill.screen lda #>$2000 sta.z fill.screen+1 jsr fill + // } rts } // fill(byte* zp(2) screen, byte register(X) ch) @@ -24,8 +27,10 @@ fill: { .label __7 = 6 ldy #0 __b2: + // (screen+j*40)[i] = ch txa sta (screen),y + // screen+j*40 lda #1*$28 clc adc.z screen @@ -33,8 +38,10 @@ fill: { lda #0 adc.z screen+1 sta.z __5+1 + // (screen+j*40)[i] = ch txa sta (__5),y + // screen+j*40 lda #2*$28 clc adc.z screen @@ -42,10 +49,13 @@ fill: { lda #0 adc.z screen+1 sta.z __7+1 + // (screen+j*40)[i] = ch txa sta (__7),y + // for(byte i: 0..39) iny cpy #$28 bne __b2 + // } rts } diff --git a/src/test/ref/plus-0.log b/src/test/ref/plus-0.log index 8d6395856..31ba7d6e7 100644 --- a/src/test/ref/plus-0.log +++ b/src/test/ref/plus-0.log @@ -129,7 +129,7 @@ Identical Phi Values (byte*) fill::screen#3 (byte*) fill::screen#4 Identical Phi Values (byte) fill::ch#3 (byte) fill::ch#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) fill::$2 [17] unroll if((byte) fill::j#1!=rangelast(0,2)) goto fill::@2 -Simple Condition (bool~) fill::$3 [21] if((byte) fill::i#1!=rangelast(0,$27)) goto fill::@1 +Simple Condition (bool~) fill::$3 [20] if((byte) fill::i#1!=rangelast(0,$27)) goto fill::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) fill::screen#0 = (byte*) 1024 Constant (const byte) fill::ch#0 = 'a' @@ -140,8 +140,8 @@ Constant (const byte) fill::j#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [15] fill::j#1 ← ++ fill::j#2 to ++ Resolved ranged comparison value [17] unroll if(fill::j#1!=rangelast(0,2)) goto fill::@2 to (number) 3 -Resolved ranged next value [19] fill::i#1 ← ++ fill::i#4 to ++ -Resolved ranged comparison value [21] if(fill::i#1!=rangelast(0,$27)) goto fill::@1 to (number) $28 +Resolved ranged next value [18] fill::i#1 ← ++ fill::i#4 to ++ +Resolved ranged comparison value [20] if(fill::i#1!=rangelast(0,$27)) goto fill::@1 to (number) $28 Adding number conversion cast (unumber) 3 in unroll if((byte) fill::j#1!=(number) 3) goto fill::@2 Adding number conversion cast (unumber) $28 in if((byte) fill::i#1!=(number) $28) goto fill::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/pointer-anding.asm b/src/test/ref/pointer-anding.asm index 0b3b49984..479262b38 100644 --- a/src/test/ref/pointer-anding.asm +++ b/src/test/ref/pointer-anding.asm @@ -17,12 +17,14 @@ main: { lda #>$400 sta.z pos_ptr+1 __b1: + // *pos_ptr=(int)0x55AA ldy #0 lda #<$55aa sta (pos_ptr),y iny lda #>$55aa sta (pos_ptr),y + // *pos_ptr&(int)0xAA55 ldy #0 lda (pos_ptr),y and #<$aa55 @@ -31,22 +33,29 @@ main: { lda (pos_ptr),y and #>$aa55 sta.z __0+1 + // <(*pos_ptr&(int)0xAA55) lda.z __0 + // *vram_ptr++=<(*pos_ptr&(int)0xAA55) ldy #0 sta (vram_ptr),y + // *vram_ptr++=<(*pos_ptr&(int)0xAA55); inc.z vram_ptr bne !+ inc.z vram_ptr+1 !: + // >*pos_ptr ldy #1 lda (pos_ptr),y + // *vram_ptr++=>*pos_ptr // stores 0x00 ldy #0 sta (vram_ptr),y + // *vram_ptr++=>*pos_ptr; inc.z vram_ptr bne !+ inc.z vram_ptr+1 !: + // pos_ptr++; lda #SIZEOF_SIGNED_WORD clc adc.z pos_ptr @@ -54,8 +63,10 @@ main: { bcc !+ inc.z pos_ptr+1 !: + // for( char i:0..2) inx cpx #3 bne __b1 + // } rts } diff --git a/src/test/ref/pointer-cast-2.asm b/src/test/ref/pointer-cast-2.asm index 707ad795f..2f7ffae26 100644 --- a/src/test/ref/pointer-cast-2.asm +++ b/src/test/ref/pointer-cast-2.asm @@ -9,17 +9,24 @@ main: { .label ub_ptr = sb .label ub = 2 .label sb = 3 + // ub = 0xff lda #$ff sta.z ub + // *sb_ptr = 1 lda #1 sta.z sb_ptr + // *ub_screen = ub lda.z ub sta ub_screen + // sb = (signed byte)0x7f lda #$7f sta.z sb + // *ub_ptr = 1 lda #1 sta.z ub_ptr + // *sb_screen = sb lda.z sb sta sb_screen + // } rts } diff --git a/src/test/ref/pointer-cast-3.asm b/src/test/ref/pointer-cast-3.asm index 0d83bd1a8..6e8775bf8 100644 --- a/src/test/ref/pointer-cast-3.asm +++ b/src/test/ref/pointer-cast-3.asm @@ -5,7 +5,9 @@ main: { .label sb_screen = $400 .const sb = $ff + // *sb_screen = sb lda #sb sta sb_screen + // } rts } diff --git a/src/test/ref/pointer-cast-4.asm b/src/test/ref/pointer-cast-4.asm index 33ccae5e9..52ab60ff5 100644 --- a/src/test/ref/pointer-cast-4.asm +++ b/src/test/ref/pointer-cast-4.asm @@ -8,10 +8,12 @@ main: { .label __1 = 2 ldx #0 __b1: + // (word)i txa sta.z __1 lda #0 sta.z __1+1 + // wscreen[i] = (word)i txa asl tay @@ -19,8 +21,10 @@ main: { sta wscreen,y lda.z __1+1 sta wscreen+1,y + // for(byte i: 0..2) inx cpx #3 bne __b1 + // } rts } diff --git a/src/test/ref/pointer-cast-4.log b/src/test/ref/pointer-cast-4.log index e9cb6ff1f..d666b39b8 100644 --- a/src/test/ref/pointer-cast-4.log +++ b/src/test/ref/pointer-cast-4.log @@ -59,15 +59,15 @@ Simplifying constant pointer cast (byte*) 1024 Successful SSA optimization PassNCastSimplification Alias (word*) main::wscreen#0 = (word*~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 [9] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$2 [8] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [2] (word*) main::wscreen#0 ← (word*)(const byte*) main::bscreen Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#0 = 0 Constant (const word*) main::wscreen#0 = (word*)main::bscreen Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/pointer-cast.asm b/src/test/ref/pointer-cast.asm index a329612d7..997312907 100644 --- a/src/test/ref/pointer-cast.asm +++ b/src/test/ref/pointer-cast.asm @@ -13,53 +13,70 @@ .const uw = $3000 .const sw = -$3000 main: { + // *((byte*)ub_screen) = ub lda #ub sta ub_screen + // *((signed byte*)ub_screen+1) = sb lda #sb sta ub_screen+1 + // *((word*)ub_screen+1)= uw lda #uw sta ub_screen+1*SIZEOF_WORD+1 + // *((signed word*)ub_screen+2) = sw lda #sw sta ub_screen+2*SIZEOF_SIGNED_WORD+1 + // *((byte*)sb_screen) = ub lda #ub sta sb_screen + // *((signed byte*)sb_screen+1) = sb lda #sb sta sb_screen+1 + // *((word*)sb_screen+1)= uw lda #uw sta sb_screen+1*SIZEOF_WORD+1 + // *((signed word*)sb_screen+2) = sw lda #sw sta sb_screen+2*SIZEOF_SIGNED_WORD+1 + // *((byte*)uw_screen) = ub lda #ub sta uw_screen + // *((signed byte*)uw_screen+1) = sb lda #sb sta uw_screen+1 + // *((word*)uw_screen+1)= uw lda #uw sta uw_screen+1*SIZEOF_WORD+1 + // *((signed word*)uw_screen+2) = sw lda #sw sta uw_screen+2*SIZEOF_SIGNED_WORD+1 + // *((byte*)sw_screen) = ub lda #ub sta sw_screen + // *((signed byte*)sw_screen+1) = sb lda #sb sta sw_screen+1 + // *((word*)sw_screen+1)= uw lda #uw sta sw_screen+1*SIZEOF_WORD+1 + // *((signed word*)sw_screen+2) = sw lda #sw sta sw_screen+2*SIZEOF_SIGNED_WORD+1 + // } rts } diff --git a/src/test/ref/pointer-plus-0.asm b/src/test/ref/pointer-plus-0.asm index d54facc00..e85cb5887 100644 --- a/src/test/ref/pointer-plus-0.asm +++ b/src/test/ref/pointer-plus-0.asm @@ -6,22 +6,29 @@ main: { .label SCREEN = $400 .label __0 = 2 .label __2 = 2 + // first(msg1) lda #msg1 sta.z first.return+1 jsr first + // first(msg1) + // SCREEN[0] = *(first(msg1)+0) ldy #0 lda (__0),y sta SCREEN + // first(msg2) lda #msg2 sta.z first.return+1 jsr first + // first(msg2) + // SCREEN[1] = *(first(msg2)+0) ldy #0 lda (__2),y sta SCREEN+1 + // } rts } first: { diff --git a/src/test/ref/pointer-plus-0.log b/src/test/ref/pointer-plus-0.log index da1977980..9619cc1d9 100644 --- a/src/test/ref/pointer-plus-0.log +++ b/src/test/ref/pointer-plus-0.log @@ -111,15 +111,15 @@ Successful SSA optimization Pass2AliasElimination Constant (const byte*) first::msg#0 = msg1 Constant (const byte*) first::msg#1 = msg2 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [6] *((const byte*) main::SCREEN + (byte) 0) ← *((byte*~) main::$1) -- *(main::$0 + 0) -Converting *(pointer+n) to pointer[n] [13] *((const byte*) main::SCREEN + (byte) 1) ← *((byte*~) main::$3) -- *(main::$2 + 0) +Converting *(pointer+n) to pointer[n] [5] *((const byte*) main::SCREEN + (byte) 0) ← *((byte*~) main::$1) -- *(main::$0 + 0) +Converting *(pointer+n) to pointer[n] [11] *((const byte*) main::SCREEN + (byte) 1) ← *((byte*~) main::$3) -- *(main::$2 + 0) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero main::$0 in [5] (byte*~) main::$1 ← (byte*~) main::$0 + (byte) 0 -Simplifying expression containing zero main::$0 in [6] *((const byte*) main::SCREEN + (byte) 0) ← *((byte*~) main::$0 + (byte) 0) -Simplifying expression containing zero main::SCREEN in [6] *((const byte*) main::SCREEN + (byte) 0) ← *((byte*~) main::$0) -Simplifying expression containing zero main::$2 in [12] (byte*~) main::$3 ← (byte*~) main::$2 + (byte) 0 -Simplifying expression containing zero main::$2 in [13] *((const byte*) main::SCREEN + (byte) 1) ← *((byte*~) main::$2 + (byte) 0) -Simplifying expression containing zero first::msg#2 in [16] (byte*) first::return#2 ← (byte*) first::msg#2 + (byte) 0 +Simplifying expression containing zero main::$0 in [4] (byte*~) main::$1 ← (byte*~) main::$0 + (byte) 0 +Simplifying expression containing zero main::$0 in [5] *((const byte*) main::SCREEN + (byte) 0) ← *((byte*~) main::$0 + (byte) 0) +Simplifying expression containing zero main::SCREEN in [5] *((const byte*) main::SCREEN + (byte) 0) ← *((byte*~) main::$0) +Simplifying expression containing zero main::$2 in [10] (byte*~) main::$3 ← (byte*~) main::$2 + (byte) 0 +Simplifying expression containing zero main::$2 in [11] *((const byte*) main::SCREEN + (byte) 1) ← *((byte*~) main::$2 + (byte) 0) +Simplifying expression containing zero first::msg#2 in [14] (byte*) first::return#2 ← (byte*) first::msg#2 + (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*~) main::$1 and assignment [3] (byte*~) main::$1 ← (byte*~) main::$0 Eliminating unused variable (byte*~) main::$3 and assignment [8] (byte*~) main::$3 ← (byte*~) main::$2 diff --git a/src/test/ref/pointer-plus-signed-word.asm b/src/test/ref/pointer-plus-signed-word.asm index c467c49ce..140e8b57e 100644 --- a/src/test/ref/pointer-plus-signed-word.asm +++ b/src/test/ref/pointer-plus-signed-word.asm @@ -12,6 +12,7 @@ main: { lda #>-$a sta.z i+1 __b1: + // sc = SCREEN + i lda #SCREEN adc.z i+1 sta.z sc+1 + // (char)i lda.z i + // *sc = (char)i ldy #0 sta (sc),y + // for (signed word i : -10..10 ) inc.z i bne !+ inc.z i+1 @@ -32,5 +36,6 @@ main: { lda.z i cmp #<$b bne __b1 + // } rts } diff --git a/src/test/ref/pointer-plus-signed-word.log b/src/test/ref/pointer-plus-signed-word.log index f820ea32f..6f03b897e 100644 --- a/src/test/ref/pointer-plus-signed-word.log +++ b/src/test/ref/pointer-plus-signed-word.log @@ -52,12 +52,12 @@ Inlining cast (byte~) main::$1 ← (byte)(signed word) main::i#2 Successful SSA optimization Pass2InlineCast Alias (byte*) main::sc#0 = (byte*~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 [8] if((signed word) main::i#1!=rangelast(-$a,$a)) goto main::@1 +Simple Condition (bool~) main::$2 [7] if((signed word) main::i#1!=rangelast(-$a,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const signed word) main::i#0 = -$a Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [8] if(main::i#1!=rangelast(-$a,$a)) goto main::@1 to (number) $b +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(-$a,$a)) goto main::@1 to (number) $b Adding number conversion cast (snumber) $b in if((signed word) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/pointer-pointer-1.asm b/src/test/ref/pointer-pointer-1.asm index 44908f2e2..349f44656 100644 --- a/src/test/ref/pointer-pointer-1.asm +++ b/src/test/ref/pointer-pointer-1.asm @@ -7,12 +7,15 @@ main: { .label ppb = pb .label b = 2 .label pb = 3 + // b = 'a' lda #'a' sta.z b + // pb = &b lda #b sta.z pb+1 + // *SCREEN = **ppb ldy.z ppb sty.z $fe ldy.z ppb+1 @@ -20,5 +23,6 @@ main: { ldy #0 lda ($fe),y sta SCREEN + // } rts } diff --git a/src/test/ref/pointer-pointer-2.asm b/src/test/ref/pointer-pointer-2.asm index 37b2579b8..e2f8b2ea0 100644 --- a/src/test/ref/pointer-pointer-2.asm +++ b/src/test/ref/pointer-pointer-2.asm @@ -6,6 +6,7 @@ main: { .label text = 5 .label screen = 3 + // text lda #<0 sta.z text sta.z text+1 @@ -17,20 +18,26 @@ main: { txa sta.z textid __b1: + // nexttext(&text) jsr nexttext __b2: + // while(*text) ldy #0 lda (text),y cmp #0 bne __b3 + // for(byte i: 0..20) inx cpx #$15 bne __b1 + // } rts __b3: + // *screen++ = *text++ ldy #0 lda (text),y sta (screen),y + // *screen++ = *text++; inc.z screen bne !+ inc.z screen+1 @@ -44,17 +51,22 @@ main: { // Choose the next text to show - by updating the text pointer pointed to by the passed pointer to a pointer nexttext: { .label textp = main.text + // textid++&1 lda #1 and.z textid + // if((textid++&1)==0) inc.z textid cmp #0 beq __b1 + // *textp = text2 lda #text2 sta.z textp+1 + // } rts __b1: + // *textp = text1 lda #text1 diff --git a/src/test/ref/pointer-pointer-2.log b/src/test/ref/pointer-pointer-2.log index 19acba487..ba8cdb6e4 100644 --- a/src/test/ref/pointer-pointer-2.log +++ b/src/test/ref/pointer-pointer-2.log @@ -200,17 +200,17 @@ Identical Phi Values (byte) textid#8 (byte) textid#11 Identical Phi Values (byte**) nexttext::textp#1 (byte**) nexttext::textp#0 Identical Phi Values (byte) textid#10 (byte) textid#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$2 [11] if((byte) 0!=*((byte*) main::text)) goto main::@3 -Simple Condition (bool~) main::$1 [19] if((byte) main::i#1!=rangelast(0,$14)) goto main::@1 -Simple Condition (bool~) nexttext::$1 [28] if((byte~) nexttext::$0==(byte) 0) goto nexttext::@1 +Simple Condition (bool~) main::$2 [10] if((byte) 0!=*((byte*) main::text)) goto main::@3 +Simple Condition (bool~) main::$1 [16] if((byte) main::i#1!=rangelast(0,$14)) goto main::@1 +Simple Condition (bool~) nexttext::$1 [23] if((byte~) nexttext::$0==(byte) 0) goto nexttext::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Constant (const byte**) nexttext::textp#0 = &main::text Constant (const byte) textid#15 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [17] main::i#1 ← ++ main::i#5 to ++ -Resolved ranged comparison value [19] if(main::i#1!=rangelast(0,$14)) goto main::@1 to (number) $15 +Resolved ranged next value [14] main::i#1 ← ++ main::i#5 to ++ +Resolved ranged comparison value [16] if(main::i#1!=rangelast(0,$14)) goto main::@1 to (number) $15 Adding number conversion cast (unumber) $15 in if((byte) main::i#1!=(number) $15) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $15 diff --git a/src/test/ref/pointer-pointer-3.asm b/src/test/ref/pointer-pointer-3.asm index ca26873a8..d34a4c72f 100644 --- a/src/test/ref/pointer-pointer-3.asm +++ b/src/test/ref/pointer-pointer-3.asm @@ -6,6 +6,7 @@ .label screen2 = $400+$28 .label screen = 4 __bbegin: + // screen = $400 lda #<$400 sta.z screen lda #>$400 @@ -13,30 +14,37 @@ __bbegin: jsr main rts main: { + // setscreen(&screen, screen1) lda #screen1 sta.z setscreen.val+1 jsr setscreen + // screen[0] = 'a' lda #'a' ldy #0 sta (screen),y + // setscreen(&screen, screen2) lda #screen2 sta.z setscreen.val+1 jsr setscreen + // screen[0] = 'a' lda #'a' ldy #0 sta (screen),y + // } rts } // setscreen(byte* zp(2) val) setscreen: { .label val = 2 + // *screen = val lda.z val sta.z screen lda.z val+1 sta.z screen+1 + // } rts } diff --git a/src/test/ref/pointer-void-0.asm b/src/test/ref/pointer-void-0.asm index c72ed5a56..8d8e60e76 100644 --- a/src/test/ref/pointer-void-0.asm +++ b/src/test/ref/pointer-void-0.asm @@ -8,11 +8,14 @@ main: { .label vp = wp .label bp = vp .label w = 2 + // w = 1234 lda #<$4d2 sta.z w lda #>$4d2 sta.z w+1 + // *SCREEN = *bp lda.z bp sta SCREEN + // } rts } diff --git a/src/test/ref/pointer-void-1.asm b/src/test/ref/pointer-void-1.asm index 1f6dad05e..2b6a42d35 100644 --- a/src/test/ref/pointer-void-1.asm +++ b/src/test/ref/pointer-void-1.asm @@ -10,6 +10,7 @@ main: { .label d = 4 .label w = 8 .label b = $a + // d = 0x12345678 lda #<$12345678 sta.z d lda #>$12345678 @@ -18,36 +19,45 @@ main: { sta.z d+2 lda #>$12345678>>$10 sta.z d+3 + // w = 0x1234 lda #<$1234 sta.z w lda #>$1234 sta.z w+1 + // b = 0x12 lda #$12 sta.z b + // print(vb) ldx #0 lda #vb sta.z print.ptr+1 jsr print + // print(vw) lda #vw sta.z print.ptr+1 jsr print + // print(vd) lda #vd sta.z print.ptr+1 jsr print + // } rts } // print(void* zp(2) ptr) print: { .label ptr = 2 + // SCREEN[idx++] = *((byte*)ptr) ldy #0 lda (ptr),y sta SCREEN,x + // SCREEN[idx++] = *((byte*)ptr); inx + // } rts } diff --git a/src/test/ref/pointer-void-2.asm b/src/test/ref/pointer-void-2.asm index c360a50d0..448274728 100644 --- a/src/test/ref/pointer-void-2.asm +++ b/src/test/ref/pointer-void-2.asm @@ -7,6 +7,7 @@ main: { .label d = 4 .label w = 8 .label b = $a + // d = 0x12345678 lda #<$12345678 sta.z d lda #>$12345678 @@ -15,36 +16,45 @@ main: { sta.z d+2 lda #>$12345678>>$10 sta.z d+3 + // w = 0x1234 lda #<$1234 sta.z w lda #>$1234 sta.z w+1 + // b = 0x12 lda #$12 sta.z b + // print(&b) ldx #0 lda #b sta.z print.ptr+1 jsr print + // print(&w) lda #w sta.z print.ptr+1 jsr print + // print(&d) lda #d sta.z print.ptr+1 jsr print + // } rts } // print(void* zp(2) ptr) print: { .label ptr = 2 + // SCREEN[idx++] = *((byte*)ptr) ldy #0 lda (ptr),y sta SCREEN,x + // SCREEN[idx++] = *((byte*)ptr); inx + // } rts } diff --git a/src/test/ref/pointer-void-3.asm b/src/test/ref/pointer-void-3.asm index 647e34230..4ff66cb82 100644 --- a/src/test/ref/pointer-void-3.asm +++ b/src/test/ref/pointer-void-3.asm @@ -7,37 +7,48 @@ main: { .label buf1 = 4 .label buf2 = 6 + // malloc() lda #<$c000 sta.z heap_head lda #>$c000 sta.z heap_head+1 jsr malloc + // malloc() lda.z malloc.return_1 sta.z malloc.return lda.z malloc.return_1+1 sta.z malloc.return+1 jsr malloc + // malloc() + // *buf1 = 'a' lda #'a' ldy #0 sta (buf1),y + // *buf2 = 'b' lda #'b' sta (buf2),y + // SCREEN[0] = *buf1 lda (buf1),y sta SCREEN + // SCREEN[1] = *buf2 lda (buf2),y sta SCREEN+1 + // } rts } malloc: { .label return = 4 .label return_1 = 6 + // heap_head++; inc.z heap_head bne !+ inc.z heap_head+1 !: + // return heap_head; lda.z heap_head sta.z return_1 lda.z heap_head+1 sta.z return_1+1 + // } rts } diff --git a/src/test/ref/pointer-void-3.log b/src/test/ref/pointer-void-3.log index 285c51563..e8a2a46ab 100644 --- a/src/test/ref/pointer-void-3.log +++ b/src/test/ref/pointer-void-3.log @@ -140,7 +140,7 @@ Identical Phi Values (byte*) heap_head#12 (byte*) heap_head#1 Successful SSA optimization Pass2IdenticalPhiElimination Constant (const byte*) heap_head#14 = (byte*) 49152 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero SCREEN in [15] *((const byte*) SCREEN + (byte) 0) ← *((byte*) main::buf1#0) +Simplifying expression containing zero SCREEN in [13] *((const byte*) SCREEN + (byte) 0) ← *((byte*) main::buf1#0) Successful SSA optimization PassNSimplifyExpressionWithZero Inlining Noop Cast [3] (byte*) main::buf1#0 ← (byte*)(void*~) main::$0 keeping main::buf1#0 Inlining Noop Cast [7] (byte*) main::buf2#0 ← (byte*)(void*~) main::$1 keeping main::buf2#0 diff --git a/src/test/ref/print-problem.asm b/src/test/ref/print-problem.asm index 92966574a..7e22577bc 100644 --- a/src/test/ref/print-problem.asm +++ b/src/test/ref/print-problem.asm @@ -3,16 +3,24 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // ln() lda #$40 jsr ln + // ln() jsr ln + // ln() jsr ln + // *SCREEN = ch sta SCREEN + // *(SCREEN+40) = line sta SCREEN+$28 + // } rts } ln: { + // line + $2 clc adc #2 + // } rts } diff --git a/src/test/ref/print-problem.log b/src/test/ref/print-problem.log index 69389e375..d352e2a70 100644 --- a/src/test/ref/print-problem.log +++ b/src/test/ref/print-problem.log @@ -160,7 +160,7 @@ Identical Phi Values (byte) ch#12 (byte) line#13 Identical Phi Values (byte) line#14 (byte) line#10 Identical Phi Values (byte) ch#15 (byte) ch#12 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [18] (byte*~) main::$3 ← (const byte*) SCREEN + (byte) $28 +Constant right-side identified [11] (byte*~) main::$3 ← (const byte*) SCREEN + (byte) $28 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) line#0 = $40 Constant (const byte*) main::$3 = SCREEN+$28 diff --git a/src/test/ref/printmsg.asm b/src/test/ref/printmsg.asm index 8c3e806bc..46c79f8d6 100644 --- a/src/test/ref/printmsg.asm +++ b/src/test/ref/printmsg.asm @@ -4,6 +4,7 @@ .label print_char_cursor = 6 .label print_line_cursor = 2 main: { + // print_str(msg) lda #<$400 sta.z print_char_cursor lda #>$400 @@ -13,6 +14,7 @@ main: { lda #>msg sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -22,27 +24,33 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str(msg2) lda #msg2 sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str(msg3) lda #msg3 sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln + // } rts } // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -50,6 +58,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor$1234 pha lda #<$1234 @@ -21,10 +22,12 @@ main: { sta.z __0 pla sta.z __0+1 + // SCREEN[0] = plus(0x1234, 0x2345) lda.z __0 sta SCREEN lda.z __0+1 sta SCREEN+1 + // } rts } // plus(word zp(2) a, word zp(4) b) @@ -45,6 +48,7 @@ plus: { sta.z b lda STACK_BASE+OFFSET_STACK_B+1,x sta.z b+1 + // return a+b; lda.z return clc adc.z b @@ -52,6 +56,7 @@ plus: { lda.z return+1 adc.z b+1 sta.z return+1 + // } tsx lda.z return sta STACK_BASE+OFFSET_STACK_RETURN,x diff --git a/src/test/ref/procedure-callingconvention-stack-3.asm b/src/test/ref/procedure-callingconvention-stack-3.asm index 976a15eac..8d3074646 100644 --- a/src/test/ref/procedure-callingconvention-stack-3.asm +++ b/src/test/ref/procedure-callingconvention-stack-3.asm @@ -9,6 +9,7 @@ .const STACK_BASE = $103 main: { .label __0 = 2 + // plus('0', 7) lda #>'0' pha lda #<'0' @@ -24,10 +25,12 @@ main: { sta.z __0 pla sta.z __0+1 + // SCREEN[0] = plus('0', 7) lda.z __0 sta SCREEN lda.z __0+1 sta SCREEN+1 + // } rts } // plus(word zp(2) a, word zp(4) b) @@ -48,6 +51,7 @@ plus: { sta.z b lda STACK_BASE+OFFSET_STACK_B+1,x sta.z b+1 + // return a+b; lda.z return clc adc.z b @@ -55,6 +59,7 @@ plus: { lda.z return+1 adc.z b+1 sta.z return+1 + // } tsx lda.z return sta STACK_BASE+OFFSET_STACK_RETURN,x diff --git a/src/test/ref/procedure-callingconvention-stack-4.asm b/src/test/ref/procedure-callingconvention-stack-4.asm index 45c42f43f..2cc0cf5ac 100644 --- a/src/test/ref/procedure-callingconvention-stack-4.asm +++ b/src/test/ref/procedure-callingconvention-stack-4.asm @@ -8,9 +8,11 @@ main: { ldy #0 __b1: + // v = a+1 tya tax inx + // w = plus('0', v) lda #'0' pha txa @@ -18,13 +20,17 @@ main: { jsr plus pla pla + // w+a sty.z $ff clc adc.z $ff + // SCREEN[i] = w+a sta SCREEN + // for(char a:0..1) iny cpy #2 bne __b1 + // } rts } // plus(byte zp(2) a, byte register(A) b) @@ -38,8 +44,10 @@ plus: { sta.z a tsx lda STACK_BASE+OFFSET_STACK_B,x + // return a+b; clc adc.z a + // } tsx sta STACK_BASE+OFFSET_STACK_RETURN,x rts diff --git a/src/test/ref/procedure-callingconvention-stack-4.log b/src/test/ref/procedure-callingconvention-stack-4.log index 825a4ff3f..926eaa5e4 100644 --- a/src/test/ref/procedure-callingconvention-stack-4.log +++ b/src/test/ref/procedure-callingconvention-stack-4.log @@ -117,14 +117,14 @@ Identical Phi Values (byte) i#8 (byte) i#0 Identical Phi Values (byte) i#1 (byte) i#8 Identical Phi Values (byte) i#3 (byte) i#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$3 [12] if((byte) main::a#1!=rangelast(0,1)) goto main::@1 +Simple Condition (bool~) main::$3 [10] if((byte) main::a#1!=rangelast(0,1)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) i#0 = 0 Constant (const byte) main::a#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [10] main::a#1 ← ++ main::a#2 to ++ -Resolved ranged comparison value [12] if(main::a#1!=rangelast(0,1)) goto main::@1 to (number) 2 -Simplifying expression containing zero SCREEN in [9] *((const byte*) SCREEN + (const byte) i#0) ← (byte~) main::$2 +Resolved ranged next value [8] main::a#1 ← ++ main::a#2 to ++ +Resolved ranged comparison value [10] if(main::a#1!=rangelast(0,1)) goto main::@1 to (number) 2 +Simplifying expression containing zero SCREEN in [7] *((const byte*) SCREEN + (const byte) i#0) ← (byte~) main::$2 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) i#2 and assignment [11] (byte) i#2 ← ++ (byte) i#6 Eliminating unused constant (const byte) i#0 diff --git a/src/test/ref/procedure-callingconvention-stack-5.asm b/src/test/ref/procedure-callingconvention-stack-5.asm index 1f3e2859f..36670d832 100644 --- a/src/test/ref/procedure-callingconvention-stack-5.asm +++ b/src/test/ref/procedure-callingconvention-stack-5.asm @@ -10,6 +10,7 @@ main: { .label __0 = 2 .label __1 = 4 + // next() pha pha jsr next @@ -17,10 +18,12 @@ main: { sta.z __0 pla sta.z __0+1 + // SCREEN[0] = next() lda.z __0 sta SCREEN lda.z __0+1 sta SCREEN+1 + // next() pha pha jsr next @@ -28,15 +31,19 @@ main: { sta.z __1 pla sta.z __1+1 + // SCREEN[1] = next() lda.z __1 sta SCREEN+1*SIZEOF_SIGNED_WORD lda.z __1+1 sta SCREEN+1*SIZEOF_SIGNED_WORD+1 + // } rts } next: { .const OFFSET_STACK_RETURN = 0 .label return = 2 + // return current++; + // } tsx lda.z return sta STACK_BASE+OFFSET_STACK_RETURN,x diff --git a/src/test/ref/processor-port-test.asm b/src/test/ref/processor-port-test.asm index 674c4241c..9170d7db2 100644 --- a/src/test/ref/processor-port-test.asm +++ b/src/test/ref/processor-port-test.asm @@ -26,26 +26,37 @@ .label print_char_cursor = 4 .label print_line_cursor = 8 main: { + // asm // Avoid interrupts sei + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Write recognizable values into memory lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_RAM_ALL lda #PROCPORT_RAM_ALL sta PROCPORT + // *BASIC_ROM = $a0 lda #$a0 sta BASIC_ROM + // *KERNAL_ROM = $e0 lda #$e0 sta KERNAL_ROM + // *IO_RAM = $d0 lda #$d0 sta IO_RAM + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_BASIC_KERNEL_IO lda #PROCPORT_BASIC_KERNEL_IO sta PROCPORT + // *IO_RAM = $dd lda #$dd sta IO_RAM + // print_cls() jsr print_cls + // print_str("ddr port ddr2 $00 $01 $a000 $d000 $e000") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -55,149 +66,177 @@ main: { lda #>str sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 sta.z print_line_cursor+1 jsr print_ln + // testProcport(PROCPORT_DDR_MEMORY_MASK, PROCPORT_RAM_ALL, PROCPORT_DDR_MEMORY_MASK) lda #PROCPORT_DDR_MEMORY_MASK sta.z testProcport.ddr2 lda #PROCPORT_RAM_ALL sta.z testProcport.port ldx #PROCPORT_DDR_MEMORY_MASK jsr testProcport + // testProcport(PROCPORT_DDR_MEMORY_MASK, PROCPORT_RAM_IO, PROCPORT_DDR_MEMORY_MASK) lda #PROCPORT_DDR_MEMORY_MASK sta.z testProcport.ddr2 lda #PROCPORT_RAM_IO sta.z testProcport.port ldx #PROCPORT_DDR_MEMORY_MASK jsr testProcport + // testProcport(PROCPORT_DDR_MEMORY_MASK, PROCPORT_RAM_CHARROM, PROCPORT_DDR_MEMORY_MASK) lda #PROCPORT_DDR_MEMORY_MASK sta.z testProcport.ddr2 lda #PROCPORT_RAM_CHARROM sta.z testProcport.port ldx #PROCPORT_DDR_MEMORY_MASK jsr testProcport + // testProcport(PROCPORT_DDR_MEMORY_MASK, PROCPORT_KERNEL_IO, PROCPORT_DDR_MEMORY_MASK) lda #PROCPORT_DDR_MEMORY_MASK sta.z testProcport.ddr2 lda #PROCPORT_KERNEL_IO sta.z testProcport.port ldx #PROCPORT_DDR_MEMORY_MASK jsr testProcport + // testProcport(PROCPORT_DDR_MEMORY_MASK, PROCPORT_BASIC_KERNEL_IO, PROCPORT_DDR_MEMORY_MASK) lda #PROCPORT_DDR_MEMORY_MASK sta.z testProcport.ddr2 lda #PROCPORT_BASIC_KERNEL_IO sta.z testProcport.port ldx #PROCPORT_DDR_MEMORY_MASK jsr testProcport + // testProcport($00, $00, $00) lda #0 sta.z testProcport.ddr2 sta.z testProcport.port tax jsr testProcport + // testProcport($ff, $00, $00) lda #0 sta.z testProcport.ddr2 sta.z testProcport.port ldx #$ff jsr testProcport + // testProcport($ff, $ff, $00) lda #0 sta.z testProcport.ddr2 lda #$ff sta.z testProcport.port tax jsr testProcport + // testProcport($ff, $00, $ff) lda #$ff sta.z testProcport.ddr2 lda #0 sta.z testProcport.port ldx #$ff jsr testProcport + // testProcport($ff, $55, $ff) lda #$ff sta.z testProcport.ddr2 lda #$55 sta.z testProcport.port ldx #$ff jsr testProcport + // testProcport($ff, $aa, $ff) lda #$ff sta.z testProcport.ddr2 lda #$aa sta.z testProcport.port ldx #$ff jsr testProcport + // testProcport($ff, $ff, $ff) lda #$ff sta.z testProcport.ddr2 sta.z testProcport.port tax jsr testProcport + // testProcport($55, $00, $55) lda #$55 sta.z testProcport.ddr2 lda #0 sta.z testProcport.port ldx #$55 jsr testProcport + // testProcport($55, $55, $55) lda #$55 sta.z testProcport.ddr2 sta.z testProcport.port tax jsr testProcport + // testProcport($55, $ff, $55) lda #$55 sta.z testProcport.ddr2 lda #$ff sta.z testProcport.port ldx #$55 jsr testProcport + // testProcport($aa, $00, $aa) lda #$aa sta.z testProcport.ddr2 lda #0 sta.z testProcport.port ldx #$aa jsr testProcport + // testProcport($aa, $ff, $aa) lda #$aa sta.z testProcport.ddr2 lda #$ff sta.z testProcport.port ldx #$aa jsr testProcport + // testProcport($aa, $aa, $aa) lda #$aa sta.z testProcport.ddr2 sta.z testProcport.port tax jsr testProcport + // testProcport($ff, $d0, $00) lda #0 sta.z testProcport.ddr2 lda #$d0 sta.z testProcport.port ldx #$ff jsr testProcport + // testProcport($ff, $55, $55) lda #$55 sta.z testProcport.ddr2 sta.z testProcport.port ldx #$ff jsr testProcport + // testProcport($17, $15, $15) lda #$15 sta.z testProcport.ddr2 sta.z testProcport.port ldx #$17 jsr testProcport + // testProcport($17, $15, $17) lda #$17 sta.z testProcport.ddr2 lda #$15 sta.z testProcport.port ldx #$17 jsr testProcport + // testProcport($17, $17, $17) lda #$17 sta.z testProcport.ddr2 sta.z testProcport.port tax jsr testProcport + // asm // Enable interrupts cli + // *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK // Return to normal settings lda #PROCPORT_DDR_MEMORY_MASK sta PROCPORT_DDR + // *PROCPORT = PROCPORT_BASIC_KERNEL_IO lda #PROCPORT_BASIC_KERNEL_IO sta PROCPORT __b1: + // (*(SCREEN+999))++; inc SCREEN+$3e7 jmp __b1 str: .text "ddr port ddr2 $00 $01 $a000 $d000 $e000" @@ -207,75 +246,98 @@ main: { testProcport: { .label port = 2 .label ddr2 = 3 + // *PROCPORT_DDR = $ff lda #$ff sta PROCPORT_DDR + // *PROCPORT = $00 lda #0 sta PROCPORT + // *PROCPORT_DDR = ddr stx PROCPORT_DDR + // *PROCPORT = port lda.z port sta PROCPORT + // *PROCPORT_DDR = ddr2 lda.z ddr2 sta PROCPORT_DDR lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str(" ") lda #str sta.z print_str.str+1 jsr print_str + // print_byte(ddr) jsr print_byte + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_byte(port) ldx.z port jsr print_byte + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_byte(ddr2) ldx.z ddr2 jsr print_byte + // print_str(" ") lda #str3 sta.z print_str.str+1 jsr print_str + // print_byte(*PROCPORT_DDR) ldx PROCPORT_DDR jsr print_byte + // print_str(" ") lda #str3 sta.z print_str.str+1 jsr print_str + // print_byte(*PROCPORT) ldx PROCPORT jsr print_byte + // print_str(" ") lda #str5 sta.z print_str.str+1 jsr print_str + // print_byte(*BASIC_ROM) ldx BASIC_ROM jsr print_byte + // print_str(" ") lda #str5 sta.z print_str.str+1 jsr print_str + // print_byte(*IO_RAM) ldx IO_RAM jsr print_byte + // print_str(" ") lda #str5 sta.z print_str.str+1 jsr print_str + // print_byte(*KERNAL_ROM) ldx KERNAL_ROM jsr print_byte + // print_ln() jsr print_ln + // } rts str: .text " " .byte 0 @@ -289,6 +351,7 @@ testProcport: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -296,6 +359,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a zero-terminated string @@ -339,15 +412,19 @@ print_char: { print_str: { .label str = 6 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -360,7 +437,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -375,17 +454,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$400 sta.z screen+1 + // **pscreen = 'a' lda #'a' ldy.z pscreen sty.z $fe @@ -16,10 +18,12 @@ main: { sty.z $ff ldy #0 sta ($fe),y + // (*pscreen)++; inc.z pscreen bne !+ inc.z pscreen+1 !: + // **pscreen = 'b' lda #'b' ldy.z pscreen sty.z $fe @@ -27,5 +31,6 @@ main: { sty.z $ff ldy #0 sta ($fe),y + // } rts } diff --git a/src/test/ref/ptrptr-optimize-1.asm b/src/test/ref/ptrptr-optimize-1.asm index 7fb23630c..b319ed27f 100644 --- a/src/test/ref/ptrptr-optimize-1.asm +++ b/src/test/ref/ptrptr-optimize-1.asm @@ -5,27 +5,34 @@ main: { .label pscreen = screen .label screen = 2 + // screen = 0x400 lda #<$400 sta.z screen lda #>$400 sta.z screen+1 + // sub('a',pscreen) lda #'a' jsr sub + // sub('b',pscreen) lda #'b' jsr sub + // } rts } // sub(byte register(A) ch) sub: { + // *(*dst)++ = ch ldy.z main.pscreen sty.z $fe ldy.z main.pscreen+1 sty.z $ff ldy #0 sta ($fe),y + // *(*dst)++ = ch; inc.z main.pscreen bne !+ inc.z main.pscreen+1 !: + // } rts } diff --git a/src/test/ref/ptrptr-optimize-2.asm b/src/test/ref/ptrptr-optimize-2.asm index 6219f5801..ac6f7899b 100644 --- a/src/test/ref/ptrptr-optimize-2.asm +++ b/src/test/ref/ptrptr-optimize-2.asm @@ -5,27 +5,34 @@ .pc = $80d "Program" main: { .label screen = 2 + // screen = 0x400 lda #<$400 sta.z screen lda #>$400 sta.z screen+1 + // sub('a',&screen) lda #'a' jsr sub + // sub('b',&screen) lda #'b' jsr sub + // } rts } // sub(byte register(A) ch) sub: { + // *(*dst)++ = ch ldy.z main.screen sty.z $fe ldy.z main.screen+1 sty.z $ff ldy #0 sta ($fe),y + // *(*dst)++ = ch; inc.z main.screen bne !+ inc.z main.screen+1 !: + // } rts } diff --git a/src/test/ref/ptrtest.asm b/src/test/ref/ptrtest.asm index 1c4a6f144..d64067b10 100644 --- a/src/test/ref/ptrtest.asm +++ b/src/test/ref/ptrtest.asm @@ -3,10 +3,15 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // lvalue() jsr lvalue + // rvalue() jsr rvalue + // rvaluevar() jsr rvaluevar + // lvaluevar() jsr lvaluevar + // } rts } lvaluevar: { @@ -19,17 +24,22 @@ lvaluevar: { sta.z screen+1 ldx #2 __b1: + // while(i<10) cpx #$a bcc __b2 + // } rts __b2: + // *screen = b lda #b ldy #0 sta (screen),y + // screen++; inc.z screen bne !+ inc.z screen+1 !: + // i++; inx jmp __b1 } @@ -43,18 +53,24 @@ rvaluevar: { sta.z screen+1 ldx #2 __b1: + // while(i<10) cpx #$a bcc __b2 + // *screen2 = b sty screen2 + // } rts __b2: + // b = *screen ldy #0 lda (screen),y tay + // screen++; inc.z screen bne !+ inc.z screen+1 !: + // i++; inx jmp __b1 } @@ -62,36 +78,48 @@ rvalue: { // A constant pointer .label SCREEN = $400 .label screen2 = $400 + // b = SCREEN[1] // RValue constant array pointer constant index lda SCREEN+1 ldx #2 __b1: + // while(i<10) cpx #$a bcc __b2 + // *screen2 = b sta screen2 + // } rts __b2: + // b = SCREEN[i++] lda SCREEN,x + // b = SCREEN[i++]; inx jmp __b1 } lvalue: { // A constant pointer .label SCREEN = $400 + // *SCREEN = 1 // LValue constant pointer dereference lda #1 sta SCREEN + // SCREEN[1] = 2 // LValue constant array constant indexing lda #2 sta SCREEN+1 tax __b1: + // while(i<10) cpx #$a bcc __b2 + // } rts __b2: + // SCREEN[i++] = 3 lda #3 sta SCREEN,x + // SCREEN[i++] = 3; inx jmp __b1 } diff --git a/src/test/ref/ptrtest.log b/src/test/ref/ptrtest.log index 0ec9eec10..a093a11f8 100644 --- a/src/test/ref/ptrtest.log +++ b/src/test/ref/ptrtest.log @@ -274,9 +274,9 @@ Alias (byte) rvaluevar::i#2 = (byte) rvaluevar::i#3 Alias (byte) rvaluevar::b#2 = (byte) rvaluevar::b#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) lvalue::$0 [10] if((byte) lvalue::i#2<(byte) $a) goto lvalue::@2 -Simple Condition (bool~) rvalue::$0 [20] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 -Simple Condition (bool~) lvaluevar::$0 [31] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 -Simple Condition (bool~) rvaluevar::$0 [42] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 +Simple Condition (bool~) rvalue::$0 [19] if((byte) rvalue::i#2<(byte) $a) goto rvalue::@2 +Simple Condition (bool~) lvaluevar::$0 [28] if((byte) lvaluevar::i#2<(byte) $a) goto lvaluevar::@2 +Simple Condition (bool~) rvaluevar::$0 [38] if((byte) rvaluevar::i#2<(byte) $a) goto rvaluevar::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) lvalue::i#0 = 2 Constant (const byte) rvalue::i#0 = 2 diff --git a/src/test/ref/ptrtestmin.asm b/src/test/ref/ptrtestmin.asm index 25be94012..106e3162b 100644 --- a/src/test/ref/ptrtestmin.asm +++ b/src/test/ref/ptrtestmin.asm @@ -8,12 +8,17 @@ main: { lda #0 ldx #2 __b1: + // while(i<10) cpx #$a bcc __b2 + // SCREEN[999] = b sta SCREEN+$3e7 + // } rts __b2: + // b = SCREEN[i++] lda SCREEN,x + // b = SCREEN[i++]; inx jmp __b1 } diff --git a/src/test/ref/ptrtestmin.log b/src/test/ref/ptrtestmin.log index 4e8fd68ec..855c3cd46 100644 --- a/src/test/ref/ptrtestmin.log +++ b/src/test/ref/ptrtestmin.log @@ -77,7 +77,7 @@ Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::b#0 = 0 Constant (const byte) main::i#0 = 2 Successful SSA optimization Pass2ConstantIdentification -De-inlining pointer[w] to *(pointer+w) [9] *((const byte*) main::SCREEN + (word) $3e7) ← (byte) main::b#2 +De-inlining pointer[w] to *(pointer+w) [7] *((const byte*) main::SCREEN + (word) $3e7) ← (byte) main::b#2 Successful SSA optimization Pass2DeInlineWordDerefIdx Constant right-side identified [4] (byte*~) main::$1 ← (const byte*) main::SCREEN + (word) $3e7 Successful SSA optimization Pass2ConstantRValueConsolidation diff --git a/src/test/ref/register-0.asm b/src/test/ref/register-0.asm index 1c2f799df..280783acd 100644 --- a/src/test/ref/register-0.asm +++ b/src/test/ref/register-0.asm @@ -6,25 +6,33 @@ .label SCREEN = $400 .label idx = 3 __b1: + // idx lda #0 sta.z idx jsr main rts main: { + // print('c') lda #'c' jsr print + // print('m') lda #'m' jsr print + // print('l') lda #'l' jsr print + // } rts } // print(byte register(A) ch) print: { + // kickasm // Force usage of ch + // asm ldx idx sta SCREEN,x inc idx + // } rts } diff --git a/src/test/ref/reserve-zp-global.asm b/src/test/ref/reserve-zp-global.asm index 21c9c373b..9714c2932 100644 --- a/src/test/ref/reserve-zp-global.asm +++ b/src/test/ref/reserve-zp-global.asm @@ -5,21 +5,28 @@ main: { .label SCREEN = $400 .label i = 4 + // for( volatile byte i : 0..2) lda #0 sta.z i __b1: + // sub1(i) lda.z i jsr sub1 + // SCREEN[i] = sub1(i) ldy.z i sta SCREEN,y + // for( volatile byte i : 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } // sub1(byte register(A) i) sub1: { + // i+i asl + // } rts } diff --git a/src/test/ref/reserve-zp-global.log b/src/test/ref/reserve-zp-global.log index 440c71ba9..f7d07e7fb 100644 --- a/src/test/ref/reserve-zp-global.log +++ b/src/test/ref/reserve-zp-global.log @@ -78,10 +78,10 @@ Alias (byte) sub1::return#1 = (byte~) sub1::$0 (byte) sub1::return#4 (byte) sub1 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) sub1::i#1 (byte) sub1::i#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [9] if((byte) main::i!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Resolved ranged next value [7] main::i ← ++ main::i to ++ -Resolved ranged comparison value [9] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [6] main::i ← ++ main::i to ++ +Resolved ranged comparison value [8] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::i!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/reserve-zp-procedure-1.asm b/src/test/ref/reserve-zp-procedure-1.asm index 5c2d86b99..fd13bb486 100644 --- a/src/test/ref/reserve-zp-procedure-1.asm +++ b/src/test/ref/reserve-zp-procedure-1.asm @@ -5,21 +5,28 @@ main: { .label SCREEN = $400 .label i = 5 + // for( volatile byte i : 0..2) lda #0 sta.z i __b1: + // sub1(i) lda.z i jsr sub1 + // SCREEN[i] = sub1(i) ldy.z i sta SCREEN,y + // for( volatile byte i : 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } // sub1(byte register(A) i) sub1: { + // i+i asl + // } rts } diff --git a/src/test/ref/reserve-zp-procedure-1.log b/src/test/ref/reserve-zp-procedure-1.log index 9045d1c56..556c6101b 100644 --- a/src/test/ref/reserve-zp-procedure-1.log +++ b/src/test/ref/reserve-zp-procedure-1.log @@ -78,10 +78,10 @@ Alias (byte) sub1::return#1 = (byte~) sub1::$0 (byte) sub1::return#4 (byte) sub1 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) sub1::i#1 (byte) sub1::i#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [9] if((byte) main::i!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Resolved ranged next value [7] main::i ← ++ main::i to ++ -Resolved ranged comparison value [9] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [6] main::i ← ++ main::i to ++ +Resolved ranged comparison value [8] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::i!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/reserve-zp-procedure-2.asm b/src/test/ref/reserve-zp-procedure-2.asm index 37f14dc4d..acda45c43 100644 --- a/src/test/ref/reserve-zp-procedure-2.asm +++ b/src/test/ref/reserve-zp-procedure-2.asm @@ -5,34 +5,46 @@ main: { .label SCREEN = $400 .label i = 8 + // for( volatile byte i : 0..2) lda #0 sta.z i __b1: + // sub1(i) lda.z i jsr sub1 + // SCREEN[i] = sub1(i) ldy.z i sta SCREEN,y + // sub2(i) ldx.z i jsr sub2 + // (SCREEN+40)[i] = sub2(i) ldy.z i sta SCREEN+$28,y + // for( volatile byte i : 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } // sub2(byte register(X) i) sub2: { + // i+i txa asl + // i+i+i stx.z $ff clc adc.z $ff + // } rts } // sub1(byte register(A) i) sub1: { + // i+i asl + // } rts } diff --git a/src/test/ref/reserve-zp-procedure-2.log b/src/test/ref/reserve-zp-procedure-2.log index 9bbf9b033..f38707664 100644 --- a/src/test/ref/reserve-zp-procedure-2.log +++ b/src/test/ref/reserve-zp-procedure-2.log @@ -124,10 +124,10 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) sub1::i#1 (byte) sub1::i#0 Identical Phi Values (byte) sub2::i#1 (byte) sub2::i#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$2 [15] if((byte) main::i!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$2 [13] if((byte) main::i!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Resolved ranged next value [13] main::i ← ++ main::i to ++ -Resolved ranged comparison value [15] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [11] main::i ← ++ main::i to ++ +Resolved ranged comparison value [13] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::i!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/reserve-zp-procedure-3.asm b/src/test/ref/reserve-zp-procedure-3.asm index 5c2d86b99..fd13bb486 100644 --- a/src/test/ref/reserve-zp-procedure-3.asm +++ b/src/test/ref/reserve-zp-procedure-3.asm @@ -5,21 +5,28 @@ main: { .label SCREEN = $400 .label i = 5 + // for( volatile byte i : 0..2) lda #0 sta.z i __b1: + // sub1(i) lda.z i jsr sub1 + // SCREEN[i] = sub1(i) ldy.z i sta SCREEN,y + // for( volatile byte i : 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } // sub1(byte register(A) i) sub1: { + // i+i asl + // } rts } diff --git a/src/test/ref/reserve-zp-procedure-3.log b/src/test/ref/reserve-zp-procedure-3.log index f86cb393c..54e6270f2 100644 --- a/src/test/ref/reserve-zp-procedure-3.log +++ b/src/test/ref/reserve-zp-procedure-3.log @@ -79,10 +79,10 @@ Alias (byte) sub1::return#1 = (byte~) sub1::$0 (byte) sub1::return#4 (byte) sub1 Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) sub1::i#1 (byte) sub1::i#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [9] if((byte) main::i!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Resolved ranged next value [7] main::i ← ++ main::i to ++ -Resolved ranged comparison value [9] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [6] main::i ← ++ main::i to ++ +Resolved ranged comparison value [8] if(main::i!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::i!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/robozzle64-label-problem.asm b/src/test/ref/robozzle64-label-problem.asm index cde6955b5..b7867a0ef 100644 --- a/src/test/ref/robozzle64-label-problem.asm +++ b/src/test/ref/robozzle64-label-problem.asm @@ -14,22 +14,31 @@ main: { lda #0 sta.z y __b1: + // mul8u(y,40) ldx.z y jsr mul8u + // mul8u(y,40) + // z1 = mul8u(y,40) + // *screen++ = z1 ldy #0 lda.z z1 sta (screen),y iny lda.z z1+1 sta (screen),y + // mul8u(y,40) ldx.z y jsr mul8u + // mul8u(y,40) + // z2 = mul8u(y,40) + // *screen++ = z2 ldy #SIZEOF_WORD lda.z z2 sta (screen),y iny lda.z z2+1 sta (screen),y + // *screen++ = z2; lda #SIZEOF_WORD+SIZEOF_WORD clc adc.z screen @@ -37,10 +46,12 @@ main: { bcc !+ inc.z screen+1 !: + // for( byte y: 0..5) inc.z y lda #6 cmp.z y bne __b1 + // } rts } // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word @@ -57,14 +68,19 @@ mul8u: { sta.z res sta.z res+1 __b1: + // while(a!=0) cpx #0 bne __b2 + // } rts __b2: + // a&1 txa and #1 + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -73,9 +89,11 @@ mul8u: { adc.z mb+1 sta.z res+1 __b3: + // a = a>>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 diff --git a/src/test/ref/robozzle64-label-problem.log b/src/test/ref/robozzle64-label-problem.log index 69f1a7f64..f482ff29b 100644 --- a/src/test/ref/robozzle64-label-problem.log +++ b/src/test/ref/robozzle64-label-problem.log @@ -244,8 +244,8 @@ Alias (byte) mul8u::a#3 = (byte) mul8u::a#5 Alias (word) mul8u::mb#2 = (word) mul8u::mb#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) mul8u::$0 [5] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [10] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) main::$2 [47] if((byte) main::y#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) mul8u::$3 [8] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) main::$2 [33] if((byte) main::y#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) mul8u::res#0 = 0 Constant (const word*) main::screen#0 = (word*) 1024 @@ -253,9 +253,9 @@ Constant (const byte) main::y#0 = 0 Constant (const byte) mul8u::b#0 = $28 Constant (const byte) mul8u::b#1 = $28 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [45] main::y#1 ← ++ main::y#2 to ++ -Resolved ranged comparison value [47] if(main::y#1!=rangelast(0,5)) goto main::@1 to (number) 6 -Converting *(pointer+n) to pointer[n] [43] *((word*) main::screen#1) ← (word) main::z2#0 -- *(main::screen#3 + SIZEOF_WORD) +Resolved ranged next value [31] main::y#1 ← ++ main::y#2 to ++ +Resolved ranged comparison value [33] if(main::y#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Converting *(pointer+n) to pointer[n] [29] *((word*) main::screen#1) ← (word) main::z2#0 -- *(main::screen#3 + SIZEOF_WORD) Successful SSA optimization Pass2InlineDerefIdx Adding number conversion cast (unumber) 6 in if((byte) main::y#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/roll-sprite-msb.asm b/src/test/ref/roll-sprite-msb.asm index cecbd3e76..76bfc3c3d 100644 --- a/src/test/ref/roll-sprite-msb.asm +++ b/src/test/ref/roll-sprite-msb.asm @@ -13,8 +13,10 @@ main: { sta.z xpos+1 ldx #0 __b1: + // position_sprite(s, xpos, 50) stx.z position_sprite.spriteno jsr position_sprite + // xpos += 10 lda #$a clc adc.z xpos @@ -22,9 +24,11 @@ main: { bcc !+ inc.z xpos+1 !: + // for(byte s: 0..7) inx cpx #8 bne __b1 + // } rts } // position_sprite(byte zp(4) spriteno, word zp(2) x) @@ -32,13 +36,18 @@ position_sprite: { .const y = $32 .label spriteno = 4 .label x = 2 + // spriteno * 2 lda.z spriteno asl tay + // SPRITES_YPOS[spriteno * 2] = y lda #y sta SPRITES_YPOS,y + // 255) lda.z x+1 bne __b1 lda.z x @@ -46,6 +55,7 @@ position_sprite: { beq !+ bcs __b1 !: + // 1 << spriteno lda #1 ldy.z spriteno cpy #0 @@ -55,11 +65,15 @@ position_sprite: { dey bne !- !e: + // (1 << spriteno) ^ $ff eor #$ff + // *SPRITES_XMSB &= (1 << spriteno) ^ $ff and SPRITES_XMSB sta SPRITES_XMSB + // } rts __b1: + // 1 << spriteno lda #1 ldy.z spriteno cpy #0 @@ -69,6 +83,7 @@ position_sprite: { dey bne !- !e: + // *SPRITES_XMSB |= 1 << spriteno ora SPRITES_XMSB sta SPRITES_XMSB rts diff --git a/src/test/ref/roll-sprite-msb.log b/src/test/ref/roll-sprite-msb.log index 67d99883b..d3aca69d1 100644 --- a/src/test/ref/roll-sprite-msb.log +++ b/src/test/ref/roll-sprite-msb.log @@ -169,15 +169,15 @@ Identical Phi Values (word) position_sprite::x#1 (word) position_sprite::x#0 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [16] (byte~) position_sprite::$1 ← (byte) position_sprite::spriteno#0 * (byte) 2 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) main::$1 [11] if((byte) main::s#1!=rangelast(0,7)) goto main::@1 -Simple Condition (bool~) position_sprite::$3 [20] if((word) position_sprite::x#0>(byte) $ff) goto position_sprite::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::s#1!=rangelast(0,7)) goto main::@1 +Simple Condition (bool~) position_sprite::$3 [19] if((word) position_sprite::x#0>(byte) $ff) goto position_sprite::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) main::xpos#0 = $c8 Constant (const byte) main::s#0 = 0 Constant (const byte) position_sprite::y#0 = $32 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::s#1 ← ++ main::s#2 to ++ -Resolved ranged comparison value [11] if(main::s#1!=rangelast(0,7)) goto main::@1 to (number) 8 +Resolved ranged next value [8] main::s#1 ← ++ main::s#2 to ++ +Resolved ranged comparison value [10] if(main::s#1!=rangelast(0,7)) goto main::@1 to (number) 8 Adding number conversion cast (unumber) 8 in if((byte) main::s#1!=(number) 8) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 8 diff --git a/src/test/ref/roll-variable.asm b/src/test/ref/roll-variable.asm index 70be48b90..be6d60639 100644 --- a/src/test/ref/roll-variable.asm +++ b/src/test/ref/roll-variable.asm @@ -8,6 +8,7 @@ main: { lda #0 sta.z b __b1: + // $55 << b lda #$55 ldy.z b cpy #0 @@ -17,11 +18,14 @@ main: { dey bne !- !e: + // screen[b] = $55 << b ldy.z b sta screen,y + // for( byte b: 0..7) inc.z b lda #8 cmp.z b bne __b1 + // } rts } diff --git a/src/test/ref/runtime-unused-procedure.asm b/src/test/ref/runtime-unused-procedure.asm index 75f93c1e5..d79432f0c 100644 --- a/src/test/ref/runtime-unused-procedure.asm +++ b/src/test/ref/runtime-unused-procedure.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" .label screen = $400 main: { + // screen[0] = 'a' lda #'a' sta screen + // } rts } diff --git a/src/test/ref/runtime-unused-procedure.log b/src/test/ref/runtime-unused-procedure.log index 4f7d2a324..de78c07a1 100644 --- a/src/test/ref/runtime-unused-procedure.log +++ b/src/test/ref/runtime-unused-procedure.log @@ -88,10 +88,10 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [2] (bool~) main::$1 ← (const byte) call == (byte) 0 from [1] (bool~) main::$0 ← (const byte) call != (byte) 0 Inversing boolean not [8] (bool~) proc::$1 ← *((const byte*) screen + (byte) 1) == (byte) 0 from [7] (bool~) proc::$0 ← *((const byte*) screen + (byte) 1) != (byte) 0 Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) main::$1 [3] if((const byte) call==(byte) 0) goto main::@return -Simple Condition (bool~) proc::$1 [9] if(*((const byte*) screen + (byte) 1)==(byte) 0) goto proc::@return +Simple Condition (bool~) main::$1 [2] if((const byte) call==(byte) 0) goto main::@return +Simple Condition (bool~) proc::$1 [7] if(*((const byte*) screen + (byte) 1)==(byte) 0) goto proc::@return Successful SSA optimization Pass2ConditionalJumpSimplification -if() condition always true - replacing block destination [3] if((const byte) call==(byte) 0) goto main::@return +if() condition always true - replacing block destination [2] if((const byte) call==(byte) 0) goto main::@return Successful SSA optimization Pass2ConstantIfs Simplifying expression containing zero screen in [0] *((const byte*) screen + (byte) 0) ← (byte) 'a' Successful SSA optimization PassNSimplifyExpressionWithZero diff --git a/src/test/ref/sandbox-ternary-error.asm b/src/test/ref/sandbox-ternary-error.asm index f1eaa278e..ef9972ab9 100644 --- a/src/test/ref/sandbox-ternary-error.asm +++ b/src/test/ref/sandbox-ternary-error.asm @@ -6,8 +6,10 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c') cpx #0 beq b1 + // (b == 1) ? 'b' : 'c' cpx #1 beq __b4 lda #'c' @@ -18,9 +20,12 @@ main: { b1: lda #'a' __b3: + // *SCREEN = (b == 0) ? 'a' : ((b == 1) ? 'b' : 'c') sta SCREEN + // for ( byte b: 0..2 ) inx cpx #3 bne __b1 + // } rts } diff --git a/src/test/ref/sandbox-ternary-error.log b/src/test/ref/sandbox-ternary-error.log index 96c113a69..2fe434437 100644 --- a/src/test/ref/sandbox-ternary-error.log +++ b/src/test/ref/sandbox-ternary-error.log @@ -110,16 +110,16 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::b#2 = (byte) main::b#4 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [3] if((byte) main::b#2==(byte) 0) goto main::@2 -Simple Condition (bool~) main::$1 [8] if((byte) main::b#2==(byte) 1) goto main::@5 -Simple Condition (bool~) main::$8 [19] if((byte) main::b#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$1 [6] if((byte) main::b#2==(byte) 1) goto main::@5 +Simple Condition (bool~) main::$8 [14] if((byte) main::b#1!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::b#0 = 0 Constant (const byte) main::$6 = 'a' Constant (const byte) main::$3 = 'b' Constant (const byte) main::$2 = 'c' Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [17] main::b#1 ← ++ main::b#2 to ++ -Resolved ranged comparison value [19] if(main::b#1!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [12] main::b#1 ← ++ main::b#2 to ++ +Resolved ranged comparison value [14] if(main::b#1!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::b#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/sandbox.asm b/src/test/ref/sandbox.asm index e6fe3b98d..b242a5a2a 100644 --- a/src/test/ref/sandbox.asm +++ b/src/test/ref/sandbox.asm @@ -18,8 +18,10 @@ main: { // test performance of 'div16u(10)' // test performance of 'div10' .label u = 2 + // *VICBANK = 23 lda #$17 sta VICBANK + // *zp1 = 0 lda #0 sta zp1 sta.z v @@ -29,9 +31,11 @@ main: { lda #>$6e85 sta.z u+1 __b1: + // for (*zp1 = 0; *zp1 < 10; ++*zp1) lda zp1 cmp #$a bcc __b2 + // *zp1 = 0 lda #0 sta zp1 lda #<$6e85 @@ -39,31 +43,41 @@ main: { lda #>$6e85 sta.z u+1 __b7: + // for (*zp1 = 0; *zp1 < 10; ++*zp1) lda zp1 cmp #$a bcc __b8 + // } rts __b8: + // *TIMEHI = 0 lda #0 sta TIMEHI + // *TIMELO = 0 sta TIMELO + // *zp2 = 0 sta zp2 __b9: + // for (*zp2 = 0; *zp2 < 200; ++*zp2) lda zp2 cmp #$c8 bcc __b10 + // (word)*TIMEHI lda TIMEHI sta.z __12 lda #0 sta.z __12+1 + // (word)*TIMEHI << 8 lda.z __13 sta.z __13+1 lda #0 sta.z __13 + // (word)*TIMELO lda TIMELO sta.z __14 lda #0 sta.z __14+1 + // myprintf(strTemp, "200 DIV10 : %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO) lda.z myprintf.w3 clc adc.z __14 @@ -76,7 +90,9 @@ main: { lda #>str1 sta.z myprintf.str+1 jsr myprintf + // Print() jsr Print + // u -= 1234 lda.z u sec sbc #<$4d2 @@ -84,33 +100,45 @@ main: { lda.z u+1 sbc #>$4d2 sta.z u+1 + // for (*zp1 = 0; *zp1 < 10; ++*zp1) inc zp1 jmp __b7 __b10: + // div10(u) jsr div10 + // v = div10(u) + // for (*zp2 = 0; *zp2 < 200; ++*zp2) inc zp2 jmp __b9 __b2: + // *TIMEHI = 0 lda #0 sta TIMEHI + // *TIMELO = 0 sta TIMELO + // *zp2 = 0 sta zp2 __b4: + // for (*zp2 = 0; *zp2 < 200; ++*zp2) lda zp2 cmp #$c8 bcc __b5 + // (word)*TIMEHI lda TIMEHI sta.z __3 lda #0 sta.z __3+1 + // (word)*TIMEHI << 8 lda.z __4 sta.z __4+1 lda #0 sta.z __4 + // (word)*TIMELO lda TIMELO sta.z __5 lda #0 sta.z __5+1 + // myprintf(strTemp, "200 DIV16U: %5d,%4d IN %04d FRAMESm", u, v, ((word)*TIMEHI << 8) + (word)*TIMELO) lda.z myprintf.w3 clc adc.z __5 @@ -123,7 +151,9 @@ main: { lda #>str sta.z myprintf.str+1 jsr myprintf + // Print() jsr Print + // u -= 1234 lda.z u sec sbc #<$4d2 @@ -131,10 +161,14 @@ main: { lda.z u+1 sbc #>$4d2 sta.z u+1 + // for (*zp1 = 0; *zp1 < 10; ++*zp1) inc zp1 jmp __b1 __b5: + // div16u(u, 10) jsr div16u + // v = div16u(u, 10) + // for (*zp2 = 0; *zp2 < 200; ++*zp2) inc zp2 jmp __b4 str: .text "200 DIV16U: %5d,%4d IN %04d FRAMESm" @@ -151,11 +185,14 @@ div16u: { .label divisor = $a .label return = 4 .label dividend = 2 + // divr16u(dividend, divisor, 0) lda.z dividend sta.z divr16u.dividend lda.z dividend+1 sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend, divisor, 0) + // } rts } // Performs division on two 16 bit unsigned words and an initial remainder @@ -175,20 +212,28 @@ divr16u: { sta.z rem sta.z rem+1 __b1: + // rem = rem << 1 asl.z rem rol.z rem+1 + // >dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>div16u.divisor bcc __b3 @@ -197,10 +242,12 @@ divr16u: { cmp #div16u.divisor sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // } rts } Print: { + // asm // can this assembly be placed in a separate file and call it from the C code here? ldy #0 loop: @@ -224,6 +274,7 @@ Print: { iny jmp loop done: + // } rts } // myprintf(byte* zp(6) str, word zp(2) w1, word zp(4) w2, word zp($17) w3) @@ -251,34 +302,42 @@ myprintf: { sta.z bLen sta.z bFormat __b1: + // for (; *str != 0; ++str) ldy #0 lda (str),y cmp #0 bne __b2 + // dst[bLen] = 0 tya ldy.z bLen sta strTemp,y + // } rts __b2: + // b = *str ldy #0 lda (str),y tax + // if (bFormat != 0) lda.z bFormat cmp #0 bne !__b4+ jmp __b4 !__b4: + // if (b == '0') cpx #'0' bne __b5 lda #1 sta.z bLeadZero __b32: + // for (; *str != 0; ++str) inc.z str bne !+ inc.z str+1 !: jmp __b1 __b5: + // if (b >= '1' && b <= '9') cpx #'1' bcc __b6 cpx #'9' @@ -289,18 +348,22 @@ myprintf: { jmp __b28 !__b28: __b6: + // if (b == '-') cpx #'-' bne __b7 lda #1 sta.z bTrailing jmp __b32 __b7: + // if (b == 'c') cpx #'c' bne !__b8+ jmp __b8 !__b8: + // if (b == 'd') cpx #'d' beq __b9 + // if (b == 'x' || b == 'X') cpx #'x' beq __b31 cpx #'X' @@ -310,13 +373,17 @@ myprintf: { sta.z bFormat jmp __b32 __b31: + // (byte)w lda.z w + // (byte)w >> 4 lsr lsr lsr lsr + // b = ((byte)w >> 4) & 0xF ldx #$f axs #0 + // b < 10 ? '0' : 0x57 cpx #$a bcc __b10 lda #$57 @@ -324,15 +391,21 @@ myprintf: { __b10: lda #'0' __b11: + // (b < 10 ? '0' : 0x57) + b stx.z $ff clc adc.z $ff + // dst[bLen++] = (b < 10 ? '0' : 0x57) + b ldy.z bLen sta strTemp,y + // dst[bLen++] = (b < 10 ? '0' : 0x57) + b; iny + // (byte)w lda.z w + // b = (byte)w & 0xF ldx #$f axs #0 + // b < 10 ? '0' : 0x57 cpx #$a bcc __b12 lda #$57 @@ -340,14 +413,18 @@ myprintf: { __b12: lda #'0' __b13: + // (b < 10 ? '0' : 0x57) + b stx.z $ff clc adc.z $ff + // dst[bLen++] = (b < 10 ? '0' : 0x57) + b sta strTemp,y + // dst[bLen++] = (b < 10 ? '0' : 0x57) + b; iny sty.z bLen jmp b1 __b9: + // utoa(w, buf6) lda.z w sta.z utoa.value lda.z w+1 @@ -356,10 +433,12 @@ myprintf: { lda #1 sta.z b __b14: + // while(buf6[b] != 0) ldy.z b lda buf6,y cmp #0 bne __b15 + // if (bTrailing == 0 && bDigits > b) lda.z bTrailing cmp #0 bne b2 @@ -367,14 +446,17 @@ myprintf: { cmp.z bDigits bcs b2 __b18: + // for (; bDigits > b; --bDigits) lda.z b cmp.z bDigits bcc __b19 b2: ldx #0 __b22: + // for (digit = 0; digit < b; ++digit) cpx.z b bcc __b23 + // if (bTrailing != 0 && bDigits > b) lda.z bTrailing cmp #0 beq b1 @@ -384,25 +466,33 @@ myprintf: { jmp b1 !b1: __b25: + // for (; bDigits > b; --bDigits) lda.z b cmp.z bDigits bcc __b26 jmp b1 __b26: + // dst[bLen++] = ' ' lda #' ' ldy.z bLen sta strTemp,y + // dst[bLen++] = ' '; inc.z bLen + // for (; bDigits > b; --bDigits) dec.z bDigits jmp __b25 __b23: + // dst[bLen++] = buf6[digit] lda buf6,x ldy.z bLen sta strTemp,y + // dst[bLen++] = buf6[digit]; inc.z bLen + // for (digit = 0; digit < b; ++digit) inx jmp __b22 __b19: + // (bLeadZero == 0) ? ' ' : '0' lda.z bLeadZero cmp #0 beq __b20 @@ -411,34 +501,45 @@ myprintf: { __b20: lda #' ' __b21: + // dst[bLen++] = (bLeadZero == 0) ? ' ' : '0' ldy.z bLen sta strTemp,y + // dst[bLen++] = (bLeadZero == 0) ? ' ' : '0'; inc.z bLen + // for (; bDigits > b; --bDigits) dec.z bDigits jmp __b18 __b15: + // ++b; inc.z b jmp __b14 __b8: + // (byte)w lda.z w + // dst[bLen++] = (byte)w // "switch" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/170 ldy.z bLen sta strTemp,y + // dst[bLen++] = (byte)w; inc.z bLen jmp b1 __b28: + // bDigits = b - '0' txa axs #'0' stx.z bDigits jmp __b32 __b4: + // if (b == '%') cpx #'%' bne __b33 + // if (bArg == 0) // default format //w = (bArg == 0) ? w1 : ((bArg == 1) ? w2 : w3); -- "?" is the normal way, but error "sequence does not contain all blocks" -- https://gitlab.com/camelot/kickc/issues/185 [FIXED] lda.z bArg cmp #0 beq __b34 + // if (bArg == 1) lda #1 cmp.z bArg beq __b35 @@ -447,6 +548,7 @@ myprintf: { lda.z w3+1 sta.z w+1 __b36: + // ++bArg; inc.z bArg lda #0 sta.z bLeadZero @@ -470,17 +572,21 @@ myprintf: { sta.z w+1 jmp __b36 __b33: + // if (b >= 0x41 && b <= 0x5A) cpx #$41 bcc b4 cpx #$5a+1 bcs b4 + // b += 0x20 txa axs #-[$20] b4: + // dst[bLen++] = b // swap 0x41 / 0x61 when in lower case mode ldy.z bLen txa sta strTemp,y + // dst[bLen++] = b; inc.z bLen jmp __b32 buf6: .fill 6, 0 @@ -489,6 +595,7 @@ myprintf: { utoa: { .label value = $11 .label dst = $13 + // if (bStarted == 1 || value >= 10000) lda.z value+1 cmp #>$2710 bcc !+ @@ -507,6 +614,7 @@ utoa: { sta.z dst+1 ldx #0 __b1: + // if (bStarted == 1 || value >= 1000) cpx #1 beq __b6 lda.z value+1 @@ -518,6 +626,7 @@ utoa: { bcs __b6 !: __b2: + // if (bStarted == 1 || value >= 100) cpx #1 beq __b7 lda.z value+1 @@ -527,6 +636,7 @@ utoa: { bcs __b7 !: __b3: + // if (bStarted == 1 || value >= 10) cpx #1 beq __b8 lda.z value+1 @@ -536,36 +646,50 @@ utoa: { bcs __b8 !: __b4: + // (byte)value lda.z value + // '0' + (byte)value clc adc #'0' + // *dst++ = '0' + (byte)value ldy #0 sta (dst),y + // *dst++ = '0' + (byte)value; inc.z dst bne !+ inc.z dst+1 !: + // *dst = 0 lda #0 tay sta (dst),y + // } rts __b8: + // append(dst++, value, 10) lda #<$a sta.z append.sub lda #>$a sta.z append.sub+1 jsr append + // append(dst++, value, 10) + // value = append(dst++, value, 10) + // value = append(dst++, value, 10); inc.z dst bne !+ inc.z dst+1 !: jmp __b4 __b7: + // append(dst++, value, 100) lda #<$64 sta.z append.sub lda #>$64 sta.z append.sub+1 jsr append + // append(dst++, value, 100) + // value = append(dst++, value, 100) + // value = append(dst++, value, 100); inc.z dst bne !+ inc.z dst+1 @@ -573,11 +697,15 @@ utoa: { ldx #1 jmp __b3 __b6: + // append(dst++, value, 1000) lda #<$3e8 sta.z append.sub lda #>$3e8 sta.z append.sub+1 jsr append + // append(dst++, value, 1000) + // value = append(dst++, value, 1000) + // value = append(dst++, value, 1000); inc.z dst bne !+ inc.z dst+1 @@ -585,6 +713,7 @@ utoa: { ldx #1 jmp __b2 __b5: + // append(dst++, value, 10000) lda #<$2710 sta.z append.sub lda #>$2710 @@ -594,6 +723,8 @@ utoa: { lda #>myprintf.buf6 sta.z append.dst+1 jsr append + // append(dst++, value, 10000) + // value = append(dst++, value, 10000) lda #myprintf.buf6+1 @@ -608,10 +739,12 @@ append: { .label return = $11 .label dst = $13 .label sub = $15 + // *dst = '0' lda #'0' ldy #0 sta (dst),y __b1: + // while (value >= sub) lda.z sub+1 cmp.z value+1 bne !+ @@ -620,13 +753,16 @@ append: { beq __b2 !: bcc __b2 + // } rts __b2: + // ++*dst; ldy #0 lda (dst),y clc adc #1 sta (dst),y + // value -= sub lda.z value sec sbc.z sub @@ -648,22 +784,26 @@ div10: { .label val_3 = 4 .label return = 4 .label val_4 = 2 + // val >> 1 lda.z val_4+1 lsr sta.z __0+1 lda.z val_4 ror sta.z __0 + // val = (val >> 1) + 1 inc.z val bne !+ inc.z val+1 !: + // val << 1 lda.z val asl sta.z __2 lda.z val+1 rol sta.z __2+1 + // val += val << 1 lda.z val_1 clc adc.z val @@ -671,6 +811,7 @@ div10: { lda.z val_1+1 adc.z val+1 sta.z val_1+1 + // val >> 4 lsr sta.z __3+1 lda.z val_1 @@ -682,6 +823,7 @@ div10: { ror.z __3 lsr.z __3+1 ror.z __3 + // val += val >> 4 lda.z val_2 clc adc.z val_1 @@ -689,9 +831,11 @@ div10: { lda.z val_2+1 adc.z val_1+1 sta.z val_2+1 + // val >> 8 sta.z __4 lda #0 sta.z __4+1 + // val += val >> 8 lda.z val_3 clc adc.z val_2 @@ -699,6 +843,7 @@ div10: { lda.z val_3+1 adc.z val_2+1 sta.z val_3+1 + // val >> 4 lsr.z return+1 ror.z return lsr.z return+1 @@ -707,6 +852,7 @@ div10: { ror.z return lsr.z return+1 ror.z return + // } rts } // "char buf16[16]" is the normal way -- not supported -- https://gitlab.com/camelot/kickc/issues/162 diff --git a/src/test/ref/sandbox.log b/src/test/ref/sandbox.log index 4963f1b79..41ef84745 100644 --- a/src/test/ref/sandbox.log +++ b/src/test/ref/sandbox.log @@ -3006,49 +3006,49 @@ Identical Phi Values (word) myprintf::w1#10 (word) myprintf::w1#7 Identical Phi Values (word) myprintf::w2#11 (word) myprintf::w2#8 Identical Phi Values (word) myprintf::w3#11 (word) myprintf::w3#8 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) divr16u::$4 [10] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [18] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [25] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) append::$0 [51] if((word) append::value#5>=(word) append::sub#6) goto append::@2 -Simple Condition (bool~) myprintf::$0 [148] if(*((byte*) myprintf::str#10)!=(byte) 0) goto myprintf::@2 -Simple Condition (bool~) myprintf::$2 [153] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@4 -Simple Condition (bool~) myprintf::$52 [160] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@67 -Simple Condition (bool~) myprintf::$4 [164] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@5 -Simple Condition (bool~) myprintf::$11 [178] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@7 -Simple Condition (bool~) myprintf::$12 [184] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@8 -Simple Condition (bool~) myprintf::$13 [193] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@9 -Simple Condition (bool~) myprintf::$21 [212] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@11 -Simple Condition (bool~) myprintf::$28 [225] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@14 -Simple Condition (bool~) myprintf::$34 [236] if(*((const byte*) myprintf::buf6 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@22 -Simple Condition (bool~) myprintf::$39 [249] if((byte) myprintf::bDigits#12>(byte) myprintf::b#17) goto myprintf::@30 -Simple Condition (bool~) myprintf::$40 [252] if((byte) myprintf::bLeadZero#11==(byte) 0) goto myprintf::@32 -Simple Condition (bool~) myprintf::$44 [263] if((byte) myprintf::digit#3<(byte) myprintf::b#17) goto myprintf::@41 -Simple Condition (bool~) myprintf::$49 [276] if((byte) myprintf::bDigits#10>(byte) myprintf::b#17) goto myprintf::@49 -Simple Condition (bool~) myprintf::$53 [295] if((byte) myprintf::bArg#10==(byte) 0) goto myprintf::@68 -Simple Condition (bool~) myprintf::$54 [300] if((byte) myprintf::bArg#10==(byte) 1) goto myprintf::@69 -Simple Condition (bool~) main::$0 [339] if(*((const byte*) zp1)<(byte) $a) goto main::@2 -Simple Condition (bool~) main::$1 [349] if(*((const byte*) zp2)<(byte) $c8) goto main::@5 -Simple Condition (bool~) main::$9 [378] if(*((const byte*) zp1)<(byte) $a) goto main::@14 -Simple Condition (bool~) main::$10 [386] if(*((const byte*) zp2)<(byte) $c8) goto main::@17 +Simple Condition (bool~) divr16u::$4 [8] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [13] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [18] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) append::$0 [34] if((word) append::value#5>=(word) append::sub#6) goto append::@2 +Simple Condition (bool~) myprintf::$0 [114] if(*((byte*) myprintf::str#10)!=(byte) 0) goto myprintf::@2 +Simple Condition (bool~) myprintf::$2 [117] if((byte) myprintf::bFormat#10==(byte) 0) goto myprintf::@4 +Simple Condition (bool~) myprintf::$52 [120] if((byte) myprintf::b#1!=(byte) '%') goto myprintf::@67 +Simple Condition (bool~) myprintf::$4 [122] if((byte) myprintf::b#1!=(byte) '0') goto myprintf::@5 +Simple Condition (bool~) myprintf::$11 [132] if((byte) myprintf::b#1!=(byte) '-') goto myprintf::@7 +Simple Condition (bool~) myprintf::$12 [135] if((byte) myprintf::b#1==(byte) 'c') goto myprintf::@8 +Simple Condition (bool~) myprintf::$13 [141] if((byte) myprintf::b#1==(byte) 'd') goto myprintf::@9 +Simple Condition (bool~) myprintf::$21 [155] if((byte) myprintf::b#15<(byte) $a) goto myprintf::@11 +Simple Condition (bool~) myprintf::$28 [165] if((byte) myprintf::b#16<(byte) $a) goto myprintf::@14 +Simple Condition (bool~) myprintf::$34 [174] if(*((const byte*) myprintf::buf6 + (byte) myprintf::b#17)!=(byte) 0) goto myprintf::@22 +Simple Condition (bool~) myprintf::$39 [185] if((byte) myprintf::bDigits#12>(byte) myprintf::b#17) goto myprintf::@30 +Simple Condition (bool~) myprintf::$40 [187] if((byte) myprintf::bLeadZero#11==(byte) 0) goto myprintf::@32 +Simple Condition (bool~) myprintf::$44 [196] if((byte) myprintf::digit#3<(byte) myprintf::b#17) goto myprintf::@41 +Simple Condition (bool~) myprintf::$49 [207] if((byte) myprintf::bDigits#10>(byte) myprintf::b#17) goto myprintf::@49 +Simple Condition (bool~) myprintf::$53 [223] if((byte) myprintf::bArg#10==(byte) 0) goto myprintf::@68 +Simple Condition (bool~) myprintf::$54 [225] if((byte) myprintf::bArg#10==(byte) 1) goto myprintf::@69 +Simple Condition (bool~) main::$0 [253] if(*((const byte*) zp1)<(byte) $a) goto main::@2 +Simple Condition (bool~) main::$1 [261] if(*((const byte*) zp2)<(byte) $c8) goto main::@5 +Simple Condition (bool~) main::$9 [283] if(*((const byte*) zp1)<(byte) $a) goto main::@14 +Simple Condition (bool~) main::$10 [290] if(*((const byte*) zp2)<(byte) $c8) goto main::@17 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [65] (bool~) utoa::$3 ← ! (bool~) utoa::$2 -Rewriting || if()-condition to two if()s [64] (bool~) utoa::$2 ← (bool~) utoa::$0 || (bool~) utoa::$1 -Rewriting ! if()-condition to reversed if() [71] (bool~) utoa::$7 ← ! (bool~) utoa::$6 -Rewriting || if()-condition to two if()s [70] (bool~) utoa::$6 ← (bool~) utoa::$4 || (bool~) utoa::$5 -Rewriting ! if()-condition to reversed if() [88] (bool~) utoa::$11 ← ! (bool~) utoa::$10 -Rewriting || if()-condition to two if()s [87] (bool~) utoa::$10 ← (bool~) utoa::$8 || (bool~) utoa::$9 -Rewriting ! if()-condition to reversed if() [105] (bool~) utoa::$15 ← ! (bool~) utoa::$14 -Rewriting || if()-condition to two if()s [104] (bool~) utoa::$14 ← (bool~) utoa::$12 || (bool~) utoa::$13 -Rewriting ! if()-condition to reversed if() [169] (bool~) myprintf::$8 ← ! (bool~) myprintf::$7 -Rewriting && if()-condition to two if()s [168] (bool~) myprintf::$7 ← (bool~) myprintf::$5 && (bool~) myprintf::$6 -Rewriting ! if()-condition to reversed if() [204] (bool~) myprintf::$17 ← ! (bool~) myprintf::$16 -Rewriting || if()-condition to two if()s [203] (bool~) myprintf::$16 ← (bool~) myprintf::$14 || (bool~) myprintf::$15 -Rewriting ! if()-condition to reversed if() [243] (bool~) myprintf::$38 ← ! (bool~) myprintf::$37 -Rewriting && if()-condition to two if()s [242] (bool~) myprintf::$37 ← (bool~) myprintf::$35 && (bool~) myprintf::$36 -Rewriting ! if()-condition to reversed if() [272] (bool~) myprintf::$48 ← ! (bool~) myprintf::$47 -Rewriting && if()-condition to two if()s [271] (bool~) myprintf::$47 ← (bool~) myprintf::$45 && (bool~) myprintf::$46 -Rewriting ! if()-condition to reversed if() [287] (bool~) myprintf::$58 ← ! (bool~) myprintf::$57 -Rewriting && if()-condition to two if()s [286] (bool~) myprintf::$57 ← (bool~) myprintf::$55 && (bool~) myprintf::$56 +Rewriting ! if()-condition to reversed if() [43] (bool~) utoa::$3 ← ! (bool~) utoa::$2 +Rewriting || if()-condition to two if()s [42] (bool~) utoa::$2 ← (bool~) utoa::$0 || (bool~) utoa::$1 +Rewriting ! if()-condition to reversed if() [49] (bool~) utoa::$7 ← ! (bool~) utoa::$6 +Rewriting || if()-condition to two if()s [48] (bool~) utoa::$6 ← (bool~) utoa::$4 || (bool~) utoa::$5 +Rewriting ! if()-condition to reversed if() [63] (bool~) utoa::$11 ← ! (bool~) utoa::$10 +Rewriting || if()-condition to two if()s [62] (bool~) utoa::$10 ← (bool~) utoa::$8 || (bool~) utoa::$9 +Rewriting ! if()-condition to reversed if() [77] (bool~) utoa::$15 ← ! (bool~) utoa::$14 +Rewriting || if()-condition to two if()s [76] (bool~) utoa::$14 ← (bool~) utoa::$12 || (bool~) utoa::$13 +Rewriting ! if()-condition to reversed if() [126] (bool~) myprintf::$8 ← ! (bool~) myprintf::$7 +Rewriting && if()-condition to two if()s [125] (bool~) myprintf::$7 ← (bool~) myprintf::$5 && (bool~) myprintf::$6 +Rewriting ! if()-condition to reversed if() [149] (bool~) myprintf::$17 ← ! (bool~) myprintf::$16 +Rewriting || if()-condition to two if()s [148] (bool~) myprintf::$16 ← (bool~) myprintf::$14 || (bool~) myprintf::$15 +Rewriting ! if()-condition to reversed if() [179] (bool~) myprintf::$38 ← ! (bool~) myprintf::$37 +Rewriting && if()-condition to two if()s [178] (bool~) myprintf::$37 ← (bool~) myprintf::$35 && (bool~) myprintf::$36 +Rewriting ! if()-condition to reversed if() [203] (bool~) myprintf::$48 ← ! (bool~) myprintf::$47 +Rewriting && if()-condition to two if()s [202] (bool~) myprintf::$47 ← (bool~) myprintf::$45 && (bool~) myprintf::$46 +Rewriting ! if()-condition to reversed if() [216] (bool~) myprintf::$58 ← ! (bool~) myprintf::$57 +Rewriting && if()-condition to two if()s [215] (bool~) myprintf::$57 ← (bool~) myprintf::$55 && (bool~) myprintf::$56 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const word) divr16u::quotient#0 = 0 Constant (const byte) divr16u::i#0 = 0 @@ -3102,8 +3102,8 @@ Constant (const word) divr16u::divisor#0 = div16u::divisor#0 Constant (const byte*) append::dst#0 = utoa::dst#5 Constant (const signed word) main::return#2 = main::return#0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [23] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [25] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [16] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [18] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 Eliminating unused variable (byte) myprintf::return#2 and assignment [187] (byte) myprintf::return#2 ← (byte) myprintf::bLen#10 Eliminating unused variable (byte) myprintf::return#3 and assignment [210] (byte) myprintf::return#3 ← (byte) myprintf::bLen#10 Eliminating unused constant (const byte) utoa::bStarted#4 diff --git a/src/test/ref/scan-desire-problem.asm b/src/test/ref/scan-desire-problem.asm index 9bc74d543..14e8ac7ae 100644 --- a/src/test/ref/scan-desire-problem.asm +++ b/src/test/ref/scan-desire-problem.asm @@ -29,10 +29,12 @@ main: { .label y = 3 .label x = 2 + // init() jsr init lda #0 sta.z x __b1: + // for (byte x = 0; x < 16; x++ ) lda.z x cmp #$10 bcc b1 @@ -42,20 +44,26 @@ main: { lda #0 sta.z y __b2: + // for (byte y = 0; y < 9; y++) lda.z y cmp #9 bcc __b3 + // for (byte x = 0; x < 16; x++ ) inc.z x jmp __b1 __b3: + // z = x+y lda.z x clc adc.z y + // tile = level_address[z] tay lda level_address,y + // draw_block(tile,x,y,YELLOW) ldy.z x ldx.z y jsr draw_block + // for (byte y = 0; y < 9; y++) inc.z y jmp __b2 } @@ -73,19 +81,26 @@ draw_block: { .label __16 = $11 .label __17 = $13 .label __18 = $15 + // tileno = tileno << 2 asl asl sta.z tileno + // x1 = x << 1 tya asl sta.z x1 lda #0 rol sta.z x1+1 + // y = y << 1 txa asl + // mul8u(y,40) tax jsr mul8u + // mul8u(y,40) + // z = mul8u(y,40) + // z = z + x1 lda.z z_1 clc adc.z z @@ -93,8 +108,10 @@ draw_block: { lda.z z_1+1 adc.z z+1 sta.z z_1+1 + // drawtile = tileset[tileno] ldy.z tileno ldx tileset,y + // screen[z] = drawtile lda.z z_1 clc adc #>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 } init: { .const toD0181_return = (>(screen&$3fff)*4)|(>charset)/4&$f + // init_sprites() jsr init_sprites + // memset(screen, 0, 1000) ldx #0 lda #screen sta.z memset.str+1 jsr memset + // memset(colors, BLACK, 1000) ldx #BLACK lda #colors sta.z memset.str+1 jsr memset + // *D018 = toD018(screen, charset) lda #toD0181_return sta D018 + // asm lda #$5b sta $d011 + // *BORDERCOL = BLACK lda #BLACK sta BORDERCOL + // *BGCOL1 = BLACK sta BGCOL1 + // *BGCOL2 = RED lda #RED sta BGCOL2 + // *BGCOL3 = BLUE lda #BLUE sta BGCOL3 + // *BGCOL4 = GREEN lda #GREEN sta BGCOL4 + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -244,6 +287,7 @@ memset: { .label end = $15 .label dst = 4 .label str = 4 + // end = (char*)str + num lda.z str clc adc #<$3e8 @@ -252,17 +296,21 @@ memset: { adc #>$3e8 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 lda.z dst cmp.z end bne __b3 + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -270,16 +318,23 @@ memset: { jmp __b2 } init_sprites: { + // *SPRITES_ENABLE = %00000001 lda #1 sta SPRITES_ENABLE + // *SPRITES_EXPAND_X = 0 // one sprite enabled lda #0 sta SPRITES_EXPAND_X + // *SPRITES_EXPAND_Y = 0 sta SPRITES_EXPAND_Y + // *SPRITES_XMSB = 0 sta SPRITES_XMSB + // *SPRITES_COLS = WHITE lda #WHITE sta SPRITES_COLS + // *SPRITES_MC = 0 lda #0 sta SPRITES_MC + // } rts } diff --git a/src/test/ref/scan-desire-problem.log b/src/test/ref/scan-desire-problem.log index e304b7beb..acdd90c0b 100644 --- a/src/test/ref/scan-desire-problem.log +++ b/src/test/ref/scan-desire-problem.log @@ -739,12 +739,12 @@ Identical Phi Values (byte) draw_block::y#2 (byte) draw_block::y#0 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (void*) memset::return#0 (void*) memset::str#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) mul8u::$0 [25] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [30] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) main::$1 [48] if((byte) main::x#2<(byte) $10) goto main::@2 -Simple Condition (bool~) main::$2 [53] if((byte) main::y#2<(byte) 9) goto main::@5 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) mul8u::$0 [18] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [21] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) main::$1 [31] if((byte) main::x#2<(byte) $10) goto main::@2 +Simple Condition (bool~) main::$2 [35] if((byte) main::y#2<(byte) 9) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) mul8u::res#0 = 0 Constant (const byte) main::x#0 = 0 @@ -764,16 +764,16 @@ Constant (const word) mul8u::mb#0 = (word)mul8u::b#0 Constant (const word) init::toD0181_$0 = (word)init::toD0181_screen#0 Constant (const word) init::toD0181_$4 = (word)init::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [67] if(true) goto main::@13 +if() condition always true - replacing block destination [45] if(true) goto main::@13 Successful SSA optimization Pass2ConstantIfs -De-inlining pointer[w] to *(pointer+w) [129] *((const byte*) screen + (word) draw_block::z#1) ← (byte) draw_block::drawtile#0 -De-inlining pointer[w] to *(pointer+w) [130] *((const byte*) colors + (word) draw_block::z#1) ← (const byte) YELLOW -De-inlining pointer[w] to *(pointer+w) [132] *((const byte*) screen + (word~) draw_block::$5) ← (byte) 1 -De-inlining pointer[w] to *(pointer+w) [134] *((const byte*) colors + (word~) draw_block::$6) ← (const byte) YELLOW -De-inlining pointer[w] to *(pointer+w) [136] *((const byte*) screen + (word~) draw_block::$7) ← (byte) 2 -De-inlining pointer[w] to *(pointer+w) [138] *((const byte*) colors + (word~) draw_block::$8) ← (const byte) YELLOW -De-inlining pointer[w] to *(pointer+w) [140] *((const byte*) screen + (word~) draw_block::$9) ← (byte) 3 -De-inlining pointer[w] to *(pointer+w) [142] *((const byte*) colors + (word~) draw_block::$10) ← (const byte) YELLOW +De-inlining pointer[w] to *(pointer+w) [95] *((const byte*) screen + (word) draw_block::z#1) ← (byte) draw_block::drawtile#0 +De-inlining pointer[w] to *(pointer+w) [96] *((const byte*) colors + (word) draw_block::z#1) ← (const byte) YELLOW +De-inlining pointer[w] to *(pointer+w) [98] *((const byte*) screen + (word~) draw_block::$5) ← (byte) 1 +De-inlining pointer[w] to *(pointer+w) [100] *((const byte*) colors + (word~) draw_block::$6) ← (const byte) YELLOW +De-inlining pointer[w] to *(pointer+w) [102] *((const byte*) screen + (word~) draw_block::$7) ← (byte) 2 +De-inlining pointer[w] to *(pointer+w) [104] *((const byte*) colors + (word~) draw_block::$8) ← (const byte) YELLOW +De-inlining pointer[w] to *(pointer+w) [106] *((const byte*) screen + (word~) draw_block::$9) ← (byte) 3 +De-inlining pointer[w] to *(pointer+w) [108] *((const byte*) colors + (word~) draw_block::$10) ← (const byte) YELLOW Successful SSA optimization Pass2DeInlineWordDerefIdx Eliminating unused variable (void*) memset::return#2 and assignment [35] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [37] (void*) memset::return#3 ← (void*) memset::str#3 diff --git a/src/test/ref/screen-center-angle.asm b/src/test/ref/screen-center-angle.asm index 6011d767d..574bb32a6 100644 --- a/src/test/ref/screen-center-angle.asm +++ b/src/test/ref/screen-center-angle.asm @@ -28,12 +28,18 @@ main: { .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f .label __4 = $12 .label cyclecount = $12 + // init_font_hex(CHARSET) jsr init_font_hex + // *D018 = toD018(SCREEN, CHARSET) lda #toD0181_return sta D018 + // clock_start() jsr clock_start + // init_angle_screen(SCREEN) jsr init_angle_screen + // clock() jsr clock + // cyclecount = clock()-CLOCKS_PER_INIT lda.z cyclecount sec sbc #CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 + // print_dword_at(cyclecount, BASE_SCREEN) jsr print_dword_at + // *D018 = toD018(BASE_SCREEN, BASE_CHARSET) lda #toD0182_return sta D018 + // } rts } // Print a dword as HEX at a specific position // print_dword_at(dword zp($12) dw) print_dword_at: { .label dw = $12 + // print_word_at(>dw, at) lda.z dw+2 sta.z print_word_at.w lda.z dw+3 @@ -65,6 +75,7 @@ print_dword_at: { lda #>main.BASE_SCREEN sta.z print_word_at.at+1 jsr print_word_at + // print_word_at(main.BASE_SCREEN+4 sta.z print_word_at.at+1 jsr print_word_at + // } rts } // Print a word as HEX at a specific position @@ -81,9 +93,11 @@ print_dword_at: { print_word_at: { .label w = 2 .label at = 4 + // print_byte_at(>w, at) lda.z w+1 sta.z print_byte_at.b jsr print_byte_at + // print_byte_at(>4 lda.z b lsr lsr lsr lsr + // print_char_at(print_hextab[b>>4], at) tay ldx print_hextab,y lda.z at @@ -113,9 +130,11 @@ print_byte_at: { lda.z at+1 sta.z print_char_at.at+1 jsr print_char_at + // b&$f lda #$f and.z b tay + // print_char_at(print_hextab[b&$f], at+1) lda.z at clc adc #1 @@ -125,21 +144,25 @@ print_byte_at: { sta.z print_char_at.at+1 ldx print_hextab,y jsr print_char_at + // } rts } // Print a single char // print_char_at(byte register(X) ch, byte* zp(6) at) print_char_at: { .label at = 6 + // *(at) = ch txa ldy #0 sta (at),y + // } rts } // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = $12 + // 0xffffffff - *CIA2_TIMER_AB lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -153,6 +176,7 @@ clock: { lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 + // } rts } // Populates 1000 bytes (a screen) with values representing the angle to the center. @@ -184,9 +208,11 @@ init_angle_screen: { lda #0 sta.z x __b2: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b3 + // screen_topline -= 40 lda.z screen_topline sec sbc #<$28 @@ -194,6 +220,7 @@ init_angle_screen: { lda.z screen_topline+1 sbc #>$28 sta.z screen_topline+1 + // screen_bottomline += 40 lda #$28 clc adc.z screen_bottomline @@ -201,25 +228,35 @@ init_angle_screen: { bcc !+ inc.z screen_bottomline+1 !: + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b3: + // x*2 lda.z x asl + // 39-x*2 eor #$ff clc adc #$27+1 + // (word){ 39-x*2, 0 } ldy #0 sta.z xw+1 sty.z xw + // y*2 lda.z y asl + // (word){ y*2, 0 } sta.z yw+1 sty.z yw + // atan2_16(xw, yw) jsr atan2_16 + // angle_w = atan2_16(xw, yw) + // angle_w+0x0080 lda #$80 clc adc.z __11 @@ -227,23 +264,32 @@ init_angle_screen: { bcc !+ inc.z __11+1 !: + // ang_w = >(angle_w+0x0080) lda.z __11+1 sta.z ang_w + // screen_bottomline[xb] = ang_w ldy.z xb sta (screen_bottomline),y + // -ang_w eor #$ff clc adc #1 + // screen_topline[xb] = -ang_w sta (screen_topline),y + // 0x80+ang_w lda #$80 clc adc.z ang_w + // screen_topline[x] = 0x80+ang_w ldy.z x sta (screen_topline),y + // 0x80-ang_w lda #$80 sec sbc.z ang_w + // screen_bottomline[x] = 0x80-ang_w sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b2 @@ -263,6 +309,7 @@ atan2_16: { .label return = $d .label x = $16 .label y = $18 + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -275,6 +322,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -292,15 +340,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -309,8 +361,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -319,6 +373,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -332,21 +387,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -354,6 +415,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -361,6 +423,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -372,6 +435,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -379,6 +443,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -386,6 +451,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -393,6 +459,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -405,6 +472,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -413,6 +481,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -421,6 +490,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -440,11 +510,14 @@ atan2_16: { // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2_TIMER_A_CONTROL + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_AB = 0xffffffff lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -453,10 +526,13 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL + // } rts } // Make charset from proto chars @@ -487,6 +563,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -494,6 +571,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -502,22 +580,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -525,6 +612,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -532,10 +620,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -543,10 +633,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/screen-center-angle.log b/src/test/ref/screen-center-angle.log index 05911f25a..c41a23f1e 100644 --- a/src/test/ref/screen-center-angle.log +++ b/src/test/ref/screen-center-angle.log @@ -1474,21 +1474,21 @@ Identical Phi Values (signed word) atan2_16::x#4 (signed word) atan2_16::x#17 Identical Phi Values (signed word) atan2_16::y#4 (signed word) atan2_16::y#19 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) init_font_hex::$3 [19] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [29] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [34] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) atan2_16::$0 [38] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [47] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [60] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [69] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [72] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [80] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [83] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [100] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [104] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) init_angle_screen::$2 [228] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [265] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_font_hex::$4 [28] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [32] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) atan2_16::$0 [36] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [40] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [47] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [51] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [54] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [59] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [62] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [76] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [79] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) init_angle_screen::$2 [167] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [195] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [100] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [76] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte*) init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant (const byte) init_font_hex::c#0 = 0 @@ -1517,24 +1517,24 @@ Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [17] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [27] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [29] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [32] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [34] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [98] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [100] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [263] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [265] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Rewriting conditional comparison [228] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [121] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [122] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Resolved ranged next value [26] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [30] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [74] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [193] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [195] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Rewriting conditional comparison [167] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [86] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [87] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero init_font_hex::charset#2 in [8] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [122] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [124] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [125] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [87] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [89] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [90] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [125] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [90] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [15] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 Eliminating unused constant (const byte) CIA_TIMER_CONTROL_STOP diff --git a/src/test/ref/screen-center-distance.asm b/src/test/ref/screen-center-distance.asm index aae54c446..11f354f67 100644 --- a/src/test/ref/screen-center-distance.asm +++ b/src/test/ref/screen-center-distance.asm @@ -33,12 +33,18 @@ main: { .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f .label __4 = $d .label cyclecount = $d + // init_font_hex(CHARSET) jsr init_font_hex + // *D018 = toD018(SCREEN, CHARSET) lda #toD0181_return sta D018 + // clock_start() jsr clock_start + // init_dist_screen(SCREEN) jsr init_dist_screen + // clock() jsr clock + // cyclecount = clock()-CLOCKS_PER_INIT lda.z cyclecount sec sbc #CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 + // print_dword_at(cyclecount, BASE_SCREEN) jsr print_dword_at + // *D018 = toD018(BASE_SCREEN, BASE_CHARSET) lda #toD0182_return sta D018 + // } rts } // Print a dword as HEX at a specific position // print_dword_at(dword zp($d) dw) print_dword_at: { .label dw = $d + // print_word_at(>dw, at) lda.z dw+2 sta.z print_word_at.w lda.z dw+3 @@ -70,6 +80,7 @@ print_dword_at: { lda #>main.BASE_SCREEN sta.z print_word_at.at+1 jsr print_word_at + // print_word_at(main.BASE_SCREEN+4 sta.z print_word_at.at+1 jsr print_word_at + // } rts } // Print a word as HEX at a specific position @@ -86,9 +98,11 @@ print_dword_at: { print_word_at: { .label w = 4 .label at = 9 + // print_byte_at(>w, at) lda.z w+1 sta.z print_byte_at.b jsr print_byte_at + // print_byte_at(>4 lda.z b lsr lsr lsr lsr + // print_char_at(print_hextab[b>>4], at) tay ldx print_hextab,y lda.z at @@ -118,9 +135,11 @@ print_byte_at: { lda.z at+1 sta.z print_char_at.at+1 jsr print_char_at + // b&$f lda #$f and.z b tay + // print_char_at(print_hextab[b&$f], at+1) lda.z at clc adc #1 @@ -130,21 +149,25 @@ print_byte_at: { sta.z print_char_at.at+1 ldx print_hextab,y jsr print_char_at + // } rts } // Print a single char // print_char_at(byte register(X) ch, byte* zp(2) at) print_char_at: { .label at = 2 + // *(at) = ch txa ldy #0 sta (at),y + // } rts } // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = $d + // 0xffffffff - *CIA2_TIMER_AB lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -158,6 +181,7 @@ clock: { lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 + // } rts } // Populates 1000 bytes (a screen) with values representing the distance to the center. @@ -171,6 +195,7 @@ init_dist_screen: { .label ds = $13 .label x = 6 .label xb = $b + // init_squares() jsr init_squares lda #=24)?(y2-24):(24-y2) cmp #$18 bcs __b2 eor #$ff clc adc #$18+1 __b4: + // sqr(yd) jsr sqr + // sqr(yd) lda.z sqr.return sta.z sqr.return_1 lda.z sqr.return+1 sta.z sqr.return_1+1 + // yds = sqr(yd) lda #$27 sta.z xb lda #0 sta.z x __b5: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b6 + // screen_topline += 40 lda #$28 clc adc.z screen_topline @@ -211,6 +243,7 @@ init_dist_screen: { bcc !+ inc.z screen_topline+1 !: + // screen_bottomline -= 40 lda.z screen_bottomline sec sbc #<$28 @@ -218,21 +251,29 @@ init_dist_screen: { lda.z screen_bottomline+1 sbc #>$28 sta.z screen_bottomline+1 + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b6: + // x2 = x*2 lda.z x asl + // (x2>=39)?(x2-39):(39-x2) cmp #$27 bcs __b8 eor #$ff clc adc #$27+1 __b10: + // sqr(xd) jsr sqr + // sqr(xd) + // xds = sqr(xd) + // ds = xds+yds lda.z ds clc adc.z yds @@ -240,21 +281,30 @@ init_dist_screen: { lda.z ds+1 adc.z yds+1 sta.z ds+1 + // sqrt(ds) jsr sqrt + // d = sqrt(ds) + // screen_topline[x] = d ldy.z x sta (screen_topline),y + // screen_bottomline[x] = d sta (screen_bottomline),y + // screen_topline[xb] = d ldy.z xb sta (screen_topline),y + // screen_bottomline[xb] = d sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b5 __b8: + // (x2>=39)?(x2-39):(39-x2) sec sbc #$27 jmp __b10 __b2: + // (y2>=24)?(y2-24):(24-y2) sec sbc #$18 jmp __b4 @@ -268,7 +318,11 @@ sqrt: { .label __3 = 2 .label found = 2 .label val = $13 + // bsearch16u(val, SQUARES, NUM_SQUARES) jsr bsearch16u + // bsearch16u(val, SQUARES, NUM_SQUARES) + // found = bsearch16u(val, SQUARES, NUM_SQUARES) + // found-SQUARES lda.z __3 sec sbc # 0) cpx #0 bne __b4 + // *items<=key?items:items-1 ldy #1 lda (items),y cmp.z key+1 @@ -320,10 +378,13 @@ bsearch16u: { sbc #>1*SIZEOF_WORD sta.z __2+1 __b2: + // } rts __b4: + // num >> 1 txa lsr + // items + (num >> 1) asl clc adc.z items @@ -331,6 +392,7 @@ bsearch16u: { lda #0 adc.z items+1 sta.z pivot+1 + // result = (signed int)key-(signed int)*pivot sec lda.z key ldy #0 @@ -340,6 +402,7 @@ bsearch16u: { iny sbc (pivot),y sta.z result+1 + // if (result == 0) bne __b6 lda.z result bne __b6 @@ -349,12 +412,14 @@ bsearch16u: { sta.z return+1 rts __b6: + // if (result > 0) lda.z result+1 bmi __b7 bne !+ lda.z result beq __b7 !: + // items = pivot+1 lda #1*SIZEOF_WORD clc adc.z pivot @@ -362,8 +427,10 @@ bsearch16u: { lda #0 adc.z pivot+1 sta.z items+1 + // num--; dex __b7: + // num >>= 1 txa lsr tax @@ -375,12 +442,14 @@ bsearch16u: { sqr: { .label return = $13 .label return_1 = $11 + // return SQUARES[val]; asl tay lda SQUARES,y sta.z return lda SQUARES+1,y sta.z return+1 + // } rts } // Initialize squares table @@ -388,6 +457,7 @@ sqr: { init_squares: { .label squares = 9 .label sqr = 4 + // malloc(NUM_SQUARES*sizeof(word)) jsr malloc lda #$ffffffff @@ -452,10 +534,13 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL + // } rts } // Make charset from proto chars @@ -486,6 +571,7 @@ init_font_hex: { lda #>FONT_HEX_PROTO sta.z proto_lo+1 __b2: + // charset[idx++] = 0 lda #0 tay sta (charset),y @@ -493,6 +579,7 @@ init_font_hex: { sta.z idx ldx #0 __b3: + // proto_hi[i]<<4 txa tay lda (proto_hi),y @@ -501,22 +588,31 @@ init_font_hex: { asl asl sta.z __0 + // proto_lo[i]<<1 txa tay lda (proto_lo),y asl + // proto_hi[i]<<4 | proto_lo[i]<<1 ora.z __0 + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 ldy.z idx sta (charset),y + // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; inc.z idx + // for( byte i: 0..4) inx cpx #5 bne __b3 + // charset[idx++] = 0 lda #0 ldy.z idx sta (charset),y + // charset[idx++] = 0; iny + // charset[idx++] = 0 sta (charset),y + // proto_lo += 5 lda #5 clc adc.z proto_lo @@ -524,6 +620,7 @@ init_font_hex: { bcc !+ inc.z proto_lo+1 !: + // charset += 8 lda #8 clc adc.z charset @@ -531,10 +628,12 @@ init_font_hex: { bcc !+ inc.z charset+1 !: + // for( byte c: 0..15 ) inc.z c1 lda #$10 cmp.z c1 bne __b2 + // proto_hi += 5 lda #5 clc adc.z proto_hi @@ -542,10 +641,12 @@ init_font_hex: { bcc !+ inc.z proto_hi+1 !: + // for( byte c: 0..15 ) inc.z c lda #$10 cmp.z c bne __b1 + // } rts } // Bit patterns for symbols 0-f (3x5 pixels) used in font hex diff --git a/src/test/ref/screen-center-distance.log b/src/test/ref/screen-center-distance.log index 563dd78d8..3e62b5017 100644 --- a/src/test/ref/screen-center-distance.log +++ b/src/test/ref/screen-center-distance.log @@ -1902,21 +1902,21 @@ Identical Phi Values (word*) SQUARES#19 (word*) SQUARES#1 Identical Phi Values (byte) NUM_SQUARES#26 (byte) NUM_SQUARES#3 Identical Phi Values (byte*) heap_head#33 (byte*) heap_head#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) bsearch16u::$5 [13] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 -Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 -Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 -Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$2 [70] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 -Simple Condition (bool~) init_font_hex::$3 [124] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 -Simple Condition (bool~) init_font_hex::$4 [134] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 -Simple Condition (bool~) init_font_hex::$5 [139] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 -Simple Condition (bool~) init_dist_screen::$3 [268] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$10 [287] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$12 [292] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 -Simple Condition (bool~) init_dist_screen::$21 [298] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) bsearch16u::$5 [9] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 +Simple Condition (bool~) bsearch16u::$12 [17] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 +Simple Condition (bool~) bsearch16u::$0 [19] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 +Simple Condition (bool~) bsearch16u::$14 [21] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 +Simple Condition (bool~) init_squares::$2 [46] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 +Simple Condition (bool~) init_font_hex::$3 [88] if((byte) init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 +Simple Condition (bool~) init_font_hex::$4 [97] if((byte) init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 +Simple Condition (bool~) init_font_hex::$5 [101] if((byte) init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 +Simple Condition (bool~) init_dist_screen::$3 [188] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$10 [200] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$12 [203] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 +Simple Condition (bool~) init_dist_screen::$21 [208] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [26] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [29] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD @@ -1950,24 +1950,24 @@ Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Constant (const word) main::toD0182_$0 = (word)main::toD0182_screen#0 Constant (const word) main::toD0182_$4 = (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [122] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ -Resolved ranged comparison value [124] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 -Resolved ranged next value [132] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ -Resolved ranged comparison value [134] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 -Resolved ranged next value [137] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ -Resolved ranged comparison value [139] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 -Resolved ranged next value [296] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ -Resolved ranged comparison value [298] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d -Rewriting conditional comparison [287] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [146] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [147] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Resolved ranged next value [86] init_font_hex::i#1 ← ++ init_font_hex::i#2 to ++ +Resolved ranged comparison value [88] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to (number) 5 +Resolved ranged next value [95] init_font_hex::c1#1 ← ++ init_font_hex::c1#4 to ++ +Resolved ranged comparison value [97] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to (number) $10 +Resolved ranged next value [99] init_font_hex::c#1 ← ++ init_font_hex::c#6 to ++ +Resolved ranged comparison value [101] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to (number) $10 +Resolved ranged next value [206] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ +Resolved ranged comparison value [208] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d +Rewriting conditional comparison [200] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [105] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [106] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero init_font_hex::charset#2 in [113] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [147] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [149] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [150] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying expression containing zero init_font_hex::charset#2 in [77] *((byte*) init_font_hex::charset#2 + (const byte) init_font_hex::idx#0) ← (byte) 0 +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [106] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [108] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [109] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [150] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [109] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*) heap_head#1 and assignment [1] (byte*) heap_head#1 ← (byte*) malloc::mem#0 Eliminating unused variable (byte) init_font_hex::idx#4 and assignment [66] (byte) init_font_hex::idx#4 ← ++ (byte) init_font_hex::idx#3 diff --git a/src/test/ref/screen-show-spiral-buckets.asm b/src/test/ref/screen-show-spiral-buckets.asm index 31be7c8b7..382196fd4 100644 --- a/src/test/ref/screen-show-spiral-buckets.asm +++ b/src/test/ref/screen-show-spiral-buckets.asm @@ -33,6 +33,7 @@ .label BUCKETS = $12 .label BUCKET_IDX = $18 __b1: + // malloc(1000) lda #<$3e8 sta.z malloc.size lda #>$3e8 @@ -42,6 +43,7 @@ __b1: lda #>HEAP_TOP sta.z heap_head+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_DIST lda.z malloc.mem+1 @@ -51,33 +53,40 @@ __b1: lda #>$3e8 sta.z malloc.size+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_ANGLE lda.z malloc.mem+1 sta.z SCREEN_ANGLE+1 + // malloc(NUM_BUCKETS*sizeof(byte)) lda #NUM_BUCKETS*SIZEOF_BYTE sta.z malloc.size+1 jsr malloc + // malloc(NUM_BUCKETS*sizeof(byte)) lda.z malloc.mem sta.z BUCKET_SIZES lda.z malloc.mem+1 sta.z BUCKET_SIZES+1 + // malloc(NUM_BUCKETS*sizeof(word*)) lda #NUM_BUCKETS*SIZEOF_POINTER sta.z malloc.size+1 jsr malloc + // malloc(NUM_BUCKETS*sizeof(word*)) lda.z malloc.mem sta.z BUCKETS lda.z malloc.mem+1 sta.z BUCKETS+1 + // malloc(NUM_BUCKETS*sizeof(byte)) lda #NUM_BUCKETS*SIZEOF_BYTE sta.z malloc.size+1 jsr malloc + // malloc(NUM_BUCKETS*sizeof(byte)) lda.z malloc.mem sta.z BUCKET_IDX lda.z malloc.mem+1 @@ -97,25 +106,32 @@ main: { .label fill1 = 8 .label min_offset = 8 .label min_offset_1 = $a + // asm sei + // init_dist_screen(SCREEN_DIST) lda.z SCREEN_DIST sta.z init_dist_screen.screen lda.z SCREEN_DIST+1 sta.z init_dist_screen.screen+1 jsr init_dist_screen + // init_angle_screen(SCREEN_ANGLE) lda.z SCREEN_ANGLE sta.z init_angle_screen.screen lda.z SCREEN_ANGLE+1 sta.z init_angle_screen.screen+1 jsr init_angle_screen + // init_buckets(SCREEN_DIST) jsr init_buckets lda #0 sta.z bucket_idx __b2: + // while (*RASTER!=0xff) lda #$ff cmp RASTER bne __b2 + // (*BORDERCOL)++; inc BORDERCOL + // bucket = BUCKETS[bucket_idx] lda.z bucket_idx asl tay @@ -124,9 +140,11 @@ main: { iny lda (BUCKETS),y sta.z bucket+1 + // bucket_size = BUCKET_SIZES[bucket_idx] ldy.z bucket_idx lda (BUCKET_SIZES),y sta.z bucket_size + // if(bucket_size>0) cmp #0 beq __b4 lda #$ff @@ -137,8 +155,10 @@ main: { sta.z min_offset+1 ldx #0 __b5: + // for( byte i=0;i$ffff beq __b4 !: + // fill = SCREEN_FILL+min_offset clc lda.z fill1 adc #SCREEN_FILL sta.z fill1+1 + // *fill = FILL_CHAR lda #FILL_CHAR ldy #0 sta (fill1),y + // (*BORDERCOL)--; dec BORDERCOL jmp __b2 __b4: + // bucket_idx++; inc.z bucket_idx + // if(bucket_idx==NUM_BUCKETS) lda #NUM_BUCKETS cmp.z bucket_idx bne __b12 + // (*BORDERCOL)--; dec BORDERCOL __b14: + // (*(COLS+999))++; inc COLS+$3e7 jmp __b14 __b12: + // (*BORDERCOL)--; dec BORDERCOL jmp __b2 __b6: + // offset = bucket[i] txa asl tay @@ -179,6 +208,7 @@ main: { iny lda (bucket),y sta.z offset+1 + // fill = SCREEN_FILL+offset lda.z offset clc adc #SCREEN_FILL sta.z fill+1 + // if(*fill!=FILL_CHAR) lda #FILL_CHAR ldy #0 cmp (fill),y beq __b18 + // angle = SCREEN_ANGLE+offset lda.z SCREEN_ANGLE clc adc.z offset @@ -197,15 +229,18 @@ main: { lda.z SCREEN_ANGLE+1 adc.z offset+1 sta.z angle+1 + // if(*angle<=min_angle) lda (angle),y cmp.z min_angle beq !+ bcs __b17 !: + // min_angle = *angle ldy #0 lda (angle),y sta.z min_angle __b8: + // for( byte i=0;i$28*$c sta.z screen_topline+1 + // screen_bottomline = screen+40*12 clc lda.z screen_bottomline adc #<$28*$c @@ -461,9 +521,11 @@ init_angle_screen: { lda #0 sta.z x __b2: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b3 + // screen_topline -= 40 lda.z screen_topline sec sbc #<$28 @@ -471,6 +533,7 @@ init_angle_screen: { lda.z screen_topline+1 sbc #>$28 sta.z screen_topline+1 + // screen_bottomline += 40 lda #$28 clc adc.z screen_bottomline @@ -478,25 +541,35 @@ init_angle_screen: { bcc !+ inc.z screen_bottomline+1 !: + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b3: + // x*2 lda.z x asl + // 39-x*2 eor #$ff clc adc #$27+1 + // (word){ 39-x*2, 0 } ldy #0 sta.z xw+1 sty.z xw + // y*2 lda.z y asl + // (word){ y*2, 0 } sta.z yw+1 sty.z yw + // atan2_16(xw, yw) jsr atan2_16 + // angle_w = atan2_16(xw, yw) + // angle_w+0x0080 lda #$80 clc adc.z __11 @@ -504,23 +577,32 @@ init_angle_screen: { bcc !+ inc.z __11+1 !: + // ang_w = >(angle_w+0x0080) lda.z __11+1 sta.z ang_w + // screen_bottomline[xb] = ang_w ldy.z xb sta (screen_bottomline),y + // -ang_w eor #$ff clc adc #1 + // screen_topline[xb] = -ang_w sta (screen_topline),y + // 0x80+ang_w lda #$80 clc adc.z ang_w + // screen_topline[x] = 0x80+ang_w ldy.z x sta (screen_topline),y + // 0x80-ang_w lda #$80 sec sbc.z ang_w + // screen_bottomline[x] = 0x80-ang_w sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b2 @@ -540,6 +622,7 @@ atan2_16: { .label return = $a .label x = $20 .label y = $22 + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -552,6 +635,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -569,15 +653,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -586,8 +674,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -596,6 +686,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -609,21 +700,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -631,6 +728,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -638,6 +736,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -649,6 +748,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -656,6 +756,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -663,6 +764,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -670,6 +772,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -682,6 +785,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -690,6 +794,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -698,6 +803,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -728,7 +834,9 @@ init_dist_screen: { .label ds = $1e .label x = $1b .label xb = $1a + // init_squares() jsr init_squares + // screen_bottomline = screen+40*24 lda.z screen clc adc #<$28*$18 @@ -739,27 +847,34 @@ init_dist_screen: { lda #0 sta.z y __b1: + // y2 = y*2 lda.z y asl + // (y2>=24)?(y2-24):(24-y2) cmp #$18 bcs __b2 eor #$ff clc adc #$18+1 __b4: + // sqr(yd) jsr sqr + // sqr(yd) lda.z sqr.return sta.z sqr.return_1 lda.z sqr.return+1 sta.z sqr.return_1+1 + // yds = sqr(yd) lda #$27 sta.z xb lda #0 sta.z x __b5: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b6 + // screen_topline += 40 lda #$28 clc adc.z screen_topline @@ -767,6 +882,7 @@ init_dist_screen: { bcc !+ inc.z screen_topline+1 !: + // screen_bottomline -= 40 lda.z screen_bottomline sec sbc #<$28 @@ -774,21 +890,29 @@ init_dist_screen: { lda.z screen_bottomline+1 sbc #>$28 sta.z screen_bottomline+1 + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b6: + // x2 = x*2 lda.z x asl + // (x2>=39)?(x2-39):(39-x2) cmp #$27 bcs __b8 eor #$ff clc adc #$27+1 __b10: + // sqr(xd) jsr sqr + // sqr(xd) + // xds = sqr(xd) + // ds = xds+yds lda.z ds clc adc.z yds @@ -796,21 +920,30 @@ init_dist_screen: { lda.z ds+1 adc.z yds+1 sta.z ds+1 + // sqrt(ds) jsr sqrt + // d = sqrt(ds) + // screen_topline[x] = d ldy.z x sta (screen_topline),y + // screen_bottomline[x] = d sta (screen_bottomline),y + // screen_topline[xb] = d ldy.z xb sta (screen_topline),y + // screen_bottomline[xb] = d sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b5 __b8: + // (x2>=39)?(x2-39):(39-x2) sec sbc #$27 jmp __b10 __b2: + // (y2>=24)?(y2-24):(24-y2) sec sbc #$18 jmp __b4 @@ -824,11 +957,15 @@ sqrt: { .label __3 = $c .label found = $c .label val = $1e + // bsearch16u(val, SQUARES, NUM_SQUARES) lda.z SQUARES sta.z bsearch16u.items lda.z SQUARES+1 sta.z bsearch16u.items+1 jsr bsearch16u + // bsearch16u(val, SQUARES, NUM_SQUARES) + // found = bsearch16u(val, SQUARES, NUM_SQUARES) + // found-SQUARES lda.z __3 sec sbc.z SQUARES @@ -838,7 +975,9 @@ sqrt: { sta.z __3+1 lsr.z __1+1 ror.z __1 + // (byte)(found-SQUARES) lda.z __1 + // } rts } // Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. @@ -856,8 +995,10 @@ bsearch16u: { .label key = $1e ldx #NUM_SQUARES __b3: + // while (num > 0) cpx #0 bne __b4 + // *items<=key?items:items-1 ldy #1 lda (items),y cmp.z key+1 @@ -876,10 +1017,13 @@ bsearch16u: { sbc #>1*SIZEOF_WORD sta.z __2+1 __b2: + // } rts __b4: + // num >> 1 txa lsr + // items + (num >> 1) asl clc adc.z items @@ -887,6 +1031,7 @@ bsearch16u: { lda #0 adc.z items+1 sta.z pivot+1 + // result = (signed int)key-(signed int)*pivot sec lda.z key ldy #0 @@ -896,6 +1041,7 @@ bsearch16u: { iny sbc (pivot),y sta.z result+1 + // if (result == 0) bne __b6 lda.z result bne __b6 @@ -905,12 +1051,14 @@ bsearch16u: { sta.z return+1 rts __b6: + // if (result > 0) lda.z result+1 bmi __b7 bne !+ lda.z result beq __b7 !: + // items = pivot+1 lda #1*SIZEOF_WORD clc adc.z pivot @@ -918,8 +1066,10 @@ bsearch16u: { lda #0 adc.z pivot+1 sta.z items+1 + // num--; dex __b7: + // num >>= 1 txa lsr tax @@ -931,6 +1081,7 @@ bsearch16u: { sqr: { .label return = $1e .label return_1 = $1c + // return SQUARES[val]; asl tay lda (SQUARES),y @@ -938,6 +1089,7 @@ sqr: { iny lda (SQUARES),y sta.z return+1 + // } rts } // Initialize squares table @@ -945,11 +1097,14 @@ sqr: { init_squares: { .label squares = $14 .label sqr = $1c + // malloc(NUM_SQUARES*sizeof(word)) lda #NUM_SQUARES*SIZEOF_WORD sta.z malloc.size+1 jsr malloc + // malloc(NUM_SQUARES*sizeof(word)) + // squares = SQUARES lda.z SQUARES sta.z squares lda.z SQUARES+1 @@ -959,16 +1114,20 @@ init_squares: { sta.z sqr+1 tax __b1: + // for(byte i=0;i(byte) 0) goto bsearch16u::@7 -Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 -Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 -Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$2 [70] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 -Simple Condition (bool~) atan2_16::$0 [107] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [116] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [129] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [138] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [141] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [152] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [169] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [173] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$3 [241] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) main::$6 [249] if((byte) main::bucket_size#0<=(byte) 0) goto main::@7 -Simple Condition (bool~) main::$19 [254] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS) goto main::@21 -Simple Condition (bool~) main::$7 [261] if((byte) main::i#2<(byte) main::bucket_size#0) goto main::@9 -Simple Condition (bool~) main::$10 [269] if(*((byte*) main::fill#0)==(const byte) FILL_CHAR) goto main::@11 -Simple Condition (bool~) main::$15 [273] if((word) main::min_offset#2==(word) $ffff) goto main::@7 -Simple Condition (bool~) main::$13 [281] if(*((byte*) main::angle#0)>(byte) main::min_angle#2) goto main::@11 -Simple Condition (bool~) init_buckets::$0 [309] if((byte) init_buckets::i#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@1 -Simple Condition (bool~) init_buckets::$2 [318] if((word) init_buckets::i1#1!=rangelast(0,$3e7)) goto init_buckets::@3 -Simple Condition (bool~) init_buckets::$5 [333] if((word) init_buckets::i2#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@5 -Simple Condition (bool~) init_buckets::$6 [340] if((byte) init_buckets::i3#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@7 -Simple Condition (bool~) init_buckets::$11 [356] if((word) init_buckets::i4#1!=rangelast(0,$3e7)) goto init_buckets::@9 -Simple Condition (bool~) init_angle_screen::$2 [371] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [408] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 -Simple Condition (bool~) init_dist_screen::$3 [424] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$10 [443] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$12 [448] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 -Simple Condition (bool~) init_dist_screen::$21 [454] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) bsearch16u::$5 [9] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 +Simple Condition (bool~) bsearch16u::$12 [17] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 +Simple Condition (bool~) bsearch16u::$0 [19] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 +Simple Condition (bool~) bsearch16u::$14 [21] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 +Simple Condition (bool~) init_squares::$2 [46] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 +Simple Condition (bool~) atan2_16::$0 [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [75] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [82] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [86] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [89] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [94] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [97] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [111] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [114] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$3 [164] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) main::$6 [170] if((byte) main::bucket_size#0<=(byte) 0) goto main::@7 +Simple Condition (bool~) main::$19 [174] if((byte) main::bucket_idx#1!=(const byte) NUM_BUCKETS) goto main::@21 +Simple Condition (bool~) main::$7 [180] if((byte) main::i#2<(byte) main::bucket_size#0) goto main::@9 +Simple Condition (bool~) main::$10 [185] if(*((byte*) main::fill#0)==(const byte) FILL_CHAR) goto main::@11 +Simple Condition (bool~) main::$15 [187] if((word) main::min_offset#2==(word) $ffff) goto main::@7 +Simple Condition (bool~) main::$13 [192] if(*((byte*) main::angle#0)>(byte) main::min_angle#2) goto main::@11 +Simple Condition (bool~) init_buckets::$0 [209] if((byte) init_buckets::i#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@1 +Simple Condition (bool~) init_buckets::$2 [216] if((word) init_buckets::i1#1!=rangelast(0,$3e7)) goto init_buckets::@3 +Simple Condition (bool~) init_buckets::$5 [228] if((word) init_buckets::i2#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@5 +Simple Condition (bool~) init_buckets::$6 [234] if((byte) init_buckets::i3#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@7 +Simple Condition (bool~) init_buckets::$11 [248] if((word) init_buckets::i4#1!=rangelast(0,$3e7)) goto init_buckets::@9 +Simple Condition (bool~) init_angle_screen::$2 [259] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [287] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_dist_screen::$3 [298] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$10 [310] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$12 [313] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 +Simple Condition (bool~) init_dist_screen::$21 [318] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [169] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [111] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [26] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [29] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD @@ -3127,30 +3127,30 @@ Constant (const byte) init_dist_screen::xb#0 = $27 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) bsearch16u::num#2 = NUM_SQUARES#3 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [238] if(true) goto main::@4 -if() condition always true - replacing block destination [295] if(true) goto main::@29 +if() condition always true - replacing block destination [161] if(true) goto main::@4 +if() condition always true - replacing block destination [200] if(true) goto main::@29 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [167] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [169] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [307] init_buckets::i#1 ← ++ init_buckets::i#2 to ++ -Resolved ranged comparison value [309] if(init_buckets::i#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@1 to (const byte) NUM_BUCKETS-(byte) 1+(number) 1 -Resolved ranged next value [316] init_buckets::i1#1 ← ++ init_buckets::i1#2 to ++ -Resolved ranged comparison value [318] if(init_buckets::i1#1!=rangelast(0,$3e7)) goto init_buckets::@3 to (number) $3e8 -Resolved ranged next value [331] init_buckets::i2#1 ← ++ init_buckets::i2#2 to ++ -Resolved ranged comparison value [333] if(init_buckets::i2#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@5 to (const byte) NUM_BUCKETS-(byte) 1+(number) 1 -Resolved ranged next value [338] init_buckets::i3#1 ← ++ init_buckets::i3#2 to ++ -Resolved ranged comparison value [340] if(init_buckets::i3#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@7 to (const byte) NUM_BUCKETS-(byte) 1+(number) 1 -Resolved ranged next value [354] init_buckets::i4#1 ← ++ init_buckets::i4#2 to ++ -Resolved ranged comparison value [356] if(init_buckets::i4#1!=rangelast(0,$3e7)) goto init_buckets::@9 to (number) $3e8 -Resolved ranged next value [406] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [408] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Resolved ranged next value [452] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ -Resolved ranged comparison value [454] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d -Rewriting conditional comparison [371] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Rewriting conditional comparison [443] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -De-inlining pointer[w] to *(pointer+w) [322] (word) malloc::size#6 ← *((byte*) BUCKET_SIZES#0 + (word) init_buckets::i2#2) * (const byte) SIZEOF_POINTER -De-inlining pointer[w] to *(pointer+w) [330] *((word**) BUCKETS#0 + (word~) init_buckets::$12) ← (word*)(void*~) init_buckets::$4 -De-inlining pointer[w] to *(pointer+w) [348] (word*) init_buckets::bucket#0 ← *((word**) BUCKETS#0 + (word~) init_buckets::$13) +Resolved ranged next value [109] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [111] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [207] init_buckets::i#1 ← ++ init_buckets::i#2 to ++ +Resolved ranged comparison value [209] if(init_buckets::i#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@1 to (const byte) NUM_BUCKETS-(byte) 1+(number) 1 +Resolved ranged next value [214] init_buckets::i1#1 ← ++ init_buckets::i1#2 to ++ +Resolved ranged comparison value [216] if(init_buckets::i1#1!=rangelast(0,$3e7)) goto init_buckets::@3 to (number) $3e8 +Resolved ranged next value [226] init_buckets::i2#1 ← ++ init_buckets::i2#2 to ++ +Resolved ranged comparison value [228] if(init_buckets::i2#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@5 to (const byte) NUM_BUCKETS-(byte) 1+(number) 1 +Resolved ranged next value [232] init_buckets::i3#1 ← ++ init_buckets::i3#2 to ++ +Resolved ranged comparison value [234] if(init_buckets::i3#1!=rangelast(0,NUM_BUCKETS-1)) goto init_buckets::@7 to (const byte) NUM_BUCKETS-(byte) 1+(number) 1 +Resolved ranged next value [246] init_buckets::i4#1 ← ++ init_buckets::i4#2 to ++ +Resolved ranged comparison value [248] if(init_buckets::i4#1!=rangelast(0,$3e7)) goto init_buckets::@9 to (number) $3e8 +Resolved ranged next value [285] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [287] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [316] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ +Resolved ranged comparison value [318] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d +Rewriting conditional comparison [259] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Rewriting conditional comparison [310] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +De-inlining pointer[w] to *(pointer+w) [219] (word) malloc::size#6 ← *((byte*) BUCKET_SIZES#0 + (word) init_buckets::i2#2) * (const byte) SIZEOF_POINTER +De-inlining pointer[w] to *(pointer+w) [225] *((word**) BUCKETS#0 + (word~) init_buckets::$12) ← (word*)(void*~) init_buckets::$4 +De-inlining pointer[w] to *(pointer+w) [240] (word*) init_buckets::bucket#0 ← *((word**) BUCKETS#0 + (word~) init_buckets::$13) Successful SSA optimization Pass2DeInlineWordDerefIdx Eliminating unused constant (const byte) NUM_SQUARES#0 Eliminating unused constant (const word*) SQUARES#0 diff --git a/src/test/ref/screen-show-spiral.asm b/src/test/ref/screen-show-spiral.asm index 4c5c5dc20..ac958773f 100644 --- a/src/test/ref/screen-show-spiral.asm +++ b/src/test/ref/screen-show-spiral.asm @@ -21,6 +21,7 @@ .label SCREEN_DIST = $b .label SCREEN_ANGLE = $d __b1: + // malloc(1000) lda #<$3e8 sta.z malloc.size lda #>$3e8 @@ -30,6 +31,7 @@ __b1: lda #>HEAP_TOP sta.z heap_head+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_DIST lda.z malloc.mem+1 @@ -39,6 +41,7 @@ __b1: lda #>$3e8 sta.z malloc.size+1 jsr malloc + // malloc(1000) lda.z malloc.mem sta.z SCREEN_ANGLE lda.z malloc.mem+1 @@ -53,22 +56,26 @@ main: { .label min_dist_angle = $16 .label min_dist_angle_1 = $1a .label min_fill = $18 + // init_dist_screen(SCREEN_DIST) lda.z SCREEN_DIST sta.z init_dist_screen.screen lda.z SCREEN_DIST+1 sta.z init_dist_screen.screen+1 jsr init_dist_screen + // init_angle_screen(SCREEN_ANGLE) lda.z SCREEN_ANGLE sta.z init_angle_screen.screen lda.z SCREEN_ANGLE+1 sta.z init_angle_screen.screen+1 jsr init_angle_screen __b1: + // dist = SCREEN_DIST // Find the minimum dist/angle that is not already filled lda.z SCREEN_DIST sta.z dist lda.z SCREEN_DIST+1 sta.z dist+1 + // angle = SCREEN_ANGLE lda.z SCREEN_ANGLE sta.z angle lda.z SCREEN_ANGLE+1 @@ -86,14 +93,17 @@ main: { lda #>SCREEN_FILL sta.z fill+1 __b2: + // if(*fill!=FILL_CHAR) lda #FILL_CHAR ldy #0 cmp (fill),y beq __b10 + // dist_angle = { *dist, *angle } lda (angle),y sta.z dist_angle lda (dist),y sta.z dist_angle+1 + // if(dist_angleSCREEN_FILL+$3e8 bcc __b9 @@ -127,14 +141,17 @@ main: { cmp #$ffff bne __b7 lda.z min_dist_angle_1 cmp #<$ffff bne __b7 + // } rts __b7: + // *min_fill = FILL_CHAR // Fill the found location lda #FILL_CHAR ldy #0 @@ -174,6 +191,7 @@ init_angle_screen: { .label x = 5 .label xb = 6 .label y = 2 + // screen_topline = screen+40*12 lda.z screen clc adc #<$28*$c @@ -181,6 +199,7 @@ init_angle_screen: { lda.z screen+1 adc #>$28*$c sta.z screen_topline+1 + // screen_bottomline = screen+40*12 clc lda.z screen_bottomline adc #<$28*$c @@ -196,9 +215,11 @@ init_angle_screen: { lda #0 sta.z x __b2: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b3 + // screen_topline -= 40 lda.z screen_topline sec sbc #<$28 @@ -206,6 +227,7 @@ init_angle_screen: { lda.z screen_topline+1 sbc #>$28 sta.z screen_topline+1 + // screen_bottomline += 40 lda #$28 clc adc.z screen_bottomline @@ -213,25 +235,35 @@ init_angle_screen: { bcc !+ inc.z screen_bottomline+1 !: + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b3: + // x*2 lda.z x asl + // 39-x*2 eor #$ff clc adc #$27+1 + // (word){ 39-x*2, 0 } ldy #0 sta.z xw+1 sty.z xw + // y*2 lda.z y asl + // (word){ y*2, 0 } sta.z yw+1 sty.z yw + // atan2_16(xw, yw) jsr atan2_16 + // angle_w = atan2_16(xw, yw) + // angle_w+0x0080 lda #$80 clc adc.z __11 @@ -239,23 +271,32 @@ init_angle_screen: { bcc !+ inc.z __11+1 !: + // ang_w = >(angle_w+0x0080) lda.z __11+1 sta.z ang_w + // screen_bottomline[xb] = ang_w ldy.z xb sta (screen_bottomline),y + // -ang_w eor #$ff clc adc #1 + // screen_topline[xb] = -ang_w sta (screen_topline),y + // 0x80+ang_w lda #$80 clc adc.z ang_w + // screen_topline[x] = 0x80+ang_w ldy.z x sta (screen_topline),y + // 0x80-ang_w lda #$80 sec sbc.z ang_w + // screen_bottomline[x] = 0x80-ang_w sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b2 @@ -275,6 +316,7 @@ atan2_16: { .label return = $18 .label x = $f .label y = $11 + // (y>=0)?y:-y lda.z y+1 bmi !__b1+ jmp __b1 @@ -287,6 +329,7 @@ atan2_16: { sbc.z y+1 sta.z __2+1 __b3: + // (x>=0)?x:-x lda.z x+1 bmi !__b4+ jmp __b4 @@ -304,15 +347,19 @@ atan2_16: { sta.z angle+1 tax __b10: + // if(yi==0) lda.z yi+1 bne __b11 lda.z yi bne __b11 __b12: + // angle /=2 lsr.z angle+1 ror.z angle + // if(x<0) lda.z x+1 bpl __b7 + // angle = 0x8000-angle sec lda #<$8000 sbc.z angle @@ -321,8 +368,10 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b7: + // if(y<0) lda.z y+1 bpl __b8 + // angle = -angle sec lda #0 sbc.z angle @@ -331,6 +380,7 @@ atan2_16: { sbc.z angle+1 sta.z angle+1 __b8: + // } rts __b11: txa @@ -344,21 +394,27 @@ atan2_16: { lda.z yi+1 sta.z yd+1 __b13: + // while(shift>=2) cpy #2 bcs __b14 + // if(shift) cpy #0 beq __b17 + // xd >>= 1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd __b17: + // if(yi>=0) lda.z yi+1 bpl __b18 + // xi -= yd lda.z xi sec sbc.z yd @@ -366,6 +422,7 @@ atan2_16: { lda.z xi+1 sbc.z yd+1 sta.z xi+1 + // yi += xd lda.z yi clc adc.z xd @@ -373,6 +430,7 @@ atan2_16: { lda.z yi+1 adc.z xd+1 sta.z yi+1 + // angle -= CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -384,6 +442,7 @@ atan2_16: { sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 __b19: + // for( byte i: 0..CORDIC_ITERATIONS_16-1) inx cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ @@ -391,6 +450,7 @@ atan2_16: { !__b12: jmp __b10 __b18: + // xi += yd lda.z xi clc adc.z yd @@ -398,6 +458,7 @@ atan2_16: { lda.z xi+1 adc.z yd+1 sta.z xi+1 + // yi -= xd lda.z yi sec sbc.z xd @@ -405,6 +466,7 @@ atan2_16: { lda.z yi+1 sbc.z xd+1 sta.z yi+1 + // angle += CORDIC_ATAN2_ANGLES_16[i] txa asl tay @@ -417,6 +479,7 @@ atan2_16: { sta.z angle+1 jmp __b19 __b14: + // xd >>= 2 lda.z xd+1 cmp #$80 ror.z xd+1 @@ -425,6 +488,7 @@ atan2_16: { cmp #$80 ror.z xd+1 ror.z xd + // yd >>= 2 lda.z yd+1 cmp #$80 ror.z yd+1 @@ -433,6 +497,7 @@ atan2_16: { cmp #$80 ror.z yd+1 ror.z yd + // shift -=2 dey dey jmp __b13 @@ -462,7 +527,9 @@ init_dist_screen: { .label ds = $16 .label x = 5 .label xb = 6 + // init_squares() jsr init_squares + // screen_bottomline = screen+40*24 lda.z screen clc adc #<$28*$18 @@ -473,27 +540,34 @@ init_dist_screen: { lda #0 sta.z y __b1: + // y2 = y*2 lda.z y asl + // (y2>=24)?(y2-24):(24-y2) cmp #$18 bcs __b2 eor #$ff clc adc #$18+1 __b4: + // sqr(yd) jsr sqr + // sqr(yd) lda.z sqr.return sta.z sqr.return_1 lda.z sqr.return+1 sta.z sqr.return_1+1 + // yds = sqr(yd) lda #$27 sta.z xb lda #0 sta.z x __b5: + // for( byte x=0,xb=39; x<=19; x++, xb--) lda.z x cmp #$13+1 bcc __b6 + // screen_topline += 40 lda #$28 clc adc.z screen_topline @@ -501,6 +575,7 @@ init_dist_screen: { bcc !+ inc.z screen_topline+1 !: + // screen_bottomline -= 40 lda.z screen_bottomline sec sbc #<$28 @@ -508,21 +583,29 @@ init_dist_screen: { lda.z screen_bottomline+1 sbc #>$28 sta.z screen_bottomline+1 + // for(byte y: 0..12) inc.z y lda #$d cmp.z y bne __b1 + // } rts __b6: + // x2 = x*2 lda.z x asl + // (x2>=39)?(x2-39):(39-x2) cmp #$27 bcs __b8 eor #$ff clc adc #$27+1 __b10: + // sqr(xd) jsr sqr + // sqr(xd) + // xds = sqr(xd) + // ds = xds+yds lda.z ds clc adc.z yds @@ -530,21 +613,30 @@ init_dist_screen: { lda.z ds+1 adc.z yds+1 sta.z ds+1 + // sqrt(ds) jsr sqrt + // d = sqrt(ds) + // screen_topline[x] = d ldy.z x sta (screen_topline),y + // screen_bottomline[x] = d sta (screen_bottomline),y + // screen_topline[xb] = d ldy.z xb sta (screen_topline),y + // screen_bottomline[xb] = d sta (screen_bottomline),y + // for( byte x=0,xb=39; x<=19; x++, xb--) inc.z x dec.z xb jmp __b5 __b8: + // (x2>=39)?(x2-39):(39-x2) sec sbc #$27 jmp __b10 __b2: + // (y2>=24)?(y2-24):(24-y2) sec sbc #$18 jmp __b4 @@ -558,11 +650,15 @@ sqrt: { .label __3 = 9 .label found = 9 .label val = $16 + // bsearch16u(val, SQUARES, NUM_SQUARES) lda.z SQUARES sta.z bsearch16u.items lda.z SQUARES+1 sta.z bsearch16u.items+1 jsr bsearch16u + // bsearch16u(val, SQUARES, NUM_SQUARES) + // found = bsearch16u(val, SQUARES, NUM_SQUARES) + // found-SQUARES lda.z __3 sec sbc.z SQUARES @@ -572,7 +668,9 @@ sqrt: { sta.z __3+1 lsr.z __1+1 ror.z __1 + // (byte)(found-SQUARES) lda.z __1 + // } rts } // Searches an array of nitems unsigned words, the initial member of which is pointed to by base, for a member that matches the value key. @@ -590,8 +688,10 @@ bsearch16u: { .label key = $16 ldx #NUM_SQUARES __b3: + // while (num > 0) cpx #0 bne __b4 + // *items<=key?items:items-1 ldy #1 lda (items),y cmp.z key+1 @@ -610,10 +710,13 @@ bsearch16u: { sbc #>1*SIZEOF_WORD sta.z __2+1 __b2: + // } rts __b4: + // num >> 1 txa lsr + // items + (num >> 1) asl clc adc.z items @@ -621,6 +724,7 @@ bsearch16u: { lda #0 adc.z items+1 sta.z pivot+1 + // result = (signed int)key-(signed int)*pivot sec lda.z key ldy #0 @@ -630,6 +734,7 @@ bsearch16u: { iny sbc (pivot),y sta.z result+1 + // if (result == 0) bne __b6 lda.z result bne __b6 @@ -639,12 +744,14 @@ bsearch16u: { sta.z return+1 rts __b6: + // if (result > 0) lda.z result+1 bmi __b7 bne !+ lda.z result beq __b7 !: + // items = pivot+1 lda #1*SIZEOF_WORD clc adc.z pivot @@ -652,8 +759,10 @@ bsearch16u: { lda #0 adc.z pivot+1 sta.z items+1 + // num--; dex __b7: + // num >>= 1 txa lsr tax @@ -665,6 +774,7 @@ bsearch16u: { sqr: { .label return = $16 .label return_1 = $14 + // return SQUARES[val]; asl tay lda (SQUARES),y @@ -672,6 +782,7 @@ sqr: { iny lda (SQUARES),y sta.z return+1 + // } rts } // Initialize squares table @@ -679,11 +790,14 @@ sqr: { init_squares: { .label squares = 9 .label sqr = 7 + // malloc(NUM_SQUARES*sizeof(word)) lda #NUM_SQUARES*SIZEOF_WORD sta.z malloc.size+1 jsr malloc + // malloc(NUM_SQUARES*sizeof(word)) + // squares = SQUARES lda.z SQUARES sta.z squares lda.z SQUARES+1 @@ -693,16 +807,20 @@ init_squares: { sta.z sqr+1 tax __b1: + // for(byte i=0;i(byte) 0) goto bsearch16u::@7 -Simple Condition (bool~) bsearch16u::$12 [25] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 -Simple Condition (bool~) bsearch16u::$0 [28] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 -Simple Condition (bool~) bsearch16u::$14 [32] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 -Simple Condition (bool~) init_squares::$2 [70] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 -Simple Condition (bool~) atan2_16::$0 [107] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 -Simple Condition (bool~) atan2_16::$5 [116] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 -Simple Condition (bool~) atan2_16::$17 [129] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 -Simple Condition (bool~) atan2_16::$11 [138] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 -Simple Condition (bool~) atan2_16::$18 [141] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 -Simple Condition (bool~) atan2_16::$19 [149] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 -Simple Condition (bool~) atan2_16::$20 [152] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 -Simple Condition (bool~) atan2_16::$21 [169] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 -Simple Condition (bool~) atan2_16::$14 [173] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 -Simple Condition (bool~) main::$3 [221] if(*((byte*) main::fill#2)==(const byte) FILL_CHAR) goto main::@5 -Simple Condition (bool~) main::$6 [227] if((byte*) main::fill#1<(const byte*) SCREEN_FILL+(word) $3e8) goto main::@4 -Simple Condition (bool~) main::$5 [233] if((word) main::dist_angle#0>=(word) main::min_dist_angle#2) goto main::@5 -Simple Condition (bool~) main::$8 [240] if((word) main::min_dist_angle#3!=(word) $ffff) goto main::@12 -Simple Condition (bool~) init_angle_screen::$2 [259] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Simple Condition (bool~) init_angle_screen::$16 [296] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 -Simple Condition (bool~) init_dist_screen::$3 [312] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 -Simple Condition (bool~) init_dist_screen::$10 [331] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 -Simple Condition (bool~) init_dist_screen::$12 [336] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 -Simple Condition (bool~) init_dist_screen::$21 [342] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 +Simple Condition (bool~) bsearch16u::$5 [9] if((byte) bsearch16u::num#3>(byte) 0) goto bsearch16u::@7 +Simple Condition (bool~) bsearch16u::$12 [17] if((signed word) bsearch16u::result#0!=(signed byte) 0) goto bsearch16u::@9 +Simple Condition (bool~) bsearch16u::$0 [19] if(*((word*) bsearch16u::items#2)<=(word) bsearch16u::key#0) goto bsearch16u::@1 +Simple Condition (bool~) bsearch16u::$14 [21] if((signed word) bsearch16u::result#0<=(signed byte) 0) goto bsearch16u::@10 +Simple Condition (bool~) init_squares::$2 [46] if((byte) init_squares::i#2<(byte) NUM_SQUARES#3) goto init_squares::@2 +Simple Condition (bool~) atan2_16::$0 [71] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@1 +Simple Condition (bool~) atan2_16::$5 [75] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@4 +Simple Condition (bool~) atan2_16::$17 [82] if((signed word) atan2_16::yi#3!=(signed byte) 0) goto atan2_16::@16 +Simple Condition (bool~) atan2_16::$11 [86] if((signed word) atan2_16::x#0>=(signed byte) 0) goto atan2_16::@7 +Simple Condition (bool~) atan2_16::$18 [89] if((byte) atan2_16::shift#2>=(byte) 2) goto atan2_16::@19 +Simple Condition (bool~) atan2_16::$19 [94] if((byte) 0==(byte) atan2_16::shift#2) goto atan2_16::@25 +Simple Condition (bool~) atan2_16::$20 [97] if((signed word) atan2_16::yi#3>=(signed byte) 0) goto atan2_16::@26 +Simple Condition (bool~) atan2_16::$21 [111] if((byte) atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@15 +Simple Condition (bool~) atan2_16::$14 [114] if((signed word) atan2_16::y#0>=(signed byte) 0) goto atan2_16::@8 +Simple Condition (bool~) main::$3 [146] if(*((byte*) main::fill#2)==(const byte) FILL_CHAR) goto main::@5 +Simple Condition (bool~) main::$6 [152] if((byte*) main::fill#1<(const byte*) SCREEN_FILL+(word) $3e8) goto main::@4 +Simple Condition (bool~) main::$5 [155] if((word) main::dist_angle#0>=(word) main::min_dist_angle#2) goto main::@5 +Simple Condition (bool~) main::$8 [157] if((word) main::min_dist_angle#3!=(word) $ffff) goto main::@12 +Simple Condition (bool~) init_angle_screen::$2 [170] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Simple Condition (bool~) init_angle_screen::$16 [198] if((byte) init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 +Simple Condition (bool~) init_dist_screen::$3 [209] if((byte) init_dist_screen::y2#0>=(byte) $18) goto init_dist_screen::@2 +Simple Condition (bool~) init_dist_screen::$10 [221] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +Simple Condition (bool~) init_dist_screen::$12 [224] if((byte) init_dist_screen::x2#0>=(byte) $27) goto init_dist_screen::@8 +Simple Condition (bool~) init_dist_screen::$21 [229] if((byte) init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [169] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 +Negating conditional jump and destination [111] if((byte) atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement -Constant right-side identified [41] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD -Constant right-side identified [48] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [26] (byte~) bsearch16u::$17 ← (byte) 1 * (const byte) SIZEOF_WORD +Constant right-side identified [29] (byte~) bsearch16u::$18 ← (byte) 1 * (const byte) SIZEOF_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) heap_head#0 = HEAP_TOP Constant (const byte) bsearch16u::$17 = 1*SIZEOF_WORD @@ -2375,16 +2375,16 @@ Constant (const byte) init_dist_screen::xb#0 = $27 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) bsearch16u::num#2 = NUM_SQUARES#3 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [211] if(true) goto main::@2 +if() condition always true - replacing block destination [138] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [167] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ -Resolved ranged comparison value [169] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 -Resolved ranged next value [294] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ -Resolved ranged comparison value [296] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d -Resolved ranged next value [340] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ -Resolved ranged comparison value [342] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d -Rewriting conditional comparison [259] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 -Rewriting conditional comparison [331] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 +Resolved ranged next value [109] atan2_16::i#1 ← ++ atan2_16::i#2 to ++ +Resolved ranged comparison value [111] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@17 to (const byte) CORDIC_ITERATIONS_16-(byte) 1+(number) 1 +Resolved ranged next value [196] init_angle_screen::y#1 ← ++ init_angle_screen::y#5 to ++ +Resolved ranged comparison value [198] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to (number) $d +Resolved ranged next value [227] init_dist_screen::y#1 ← ++ init_dist_screen::y#10 to ++ +Resolved ranged comparison value [229] if(init_dist_screen::y#1!=rangelast(0,$c)) goto init_dist_screen::@1 to (number) $d +Rewriting conditional comparison [170] if((byte) init_angle_screen::x#2<=(byte) $13) goto init_angle_screen::@3 +Rewriting conditional comparison [221] if((byte) init_dist_screen::x#2<=(byte) $13) goto init_dist_screen::@6 Eliminating unused constant (const byte) NUM_SQUARES#0 Eliminating unused constant (const word*) SQUARES#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/scroll-clobber.asm b/src/test/ref/scroll-clobber.asm index 4f1dfed97..63d8038ec 100644 --- a/src/test/ref/scroll-clobber.asm +++ b/src/test/ref/scroll-clobber.asm @@ -10,20 +10,26 @@ main: { lda #>TEXT sta.z nxt+1 __b1: + // c = *nxt ldy #0 lda (nxt),y tay + // if(c==0) cpy #0 bne __b2 + // c = *nxt ldy TEXT lda #TEXT sta.z nxt+1 __b2: + // SCREEN[++i] = c; inx + // SCREEN[++i] = c tya sta SCREEN,x + // nxt++; inc.z nxt bne !+ inc.z nxt+1 diff --git a/src/test/ref/scroll-clobber.log b/src/test/ref/scroll-clobber.log index dd59f5104..b4ae45972 100644 --- a/src/test/ref/scroll-clobber.log +++ b/src/test/ref/scroll-clobber.log @@ -87,13 +87,13 @@ Alias (byte) main::i#3 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [6] if((byte) main::c#0!=(byte) 0) goto main::@2 +Simple Condition (bool~) main::$1 [5] if((byte) main::c#0!=(byte) 0) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::nxt#0 = TEXT Constant (const byte) main::i#0 = 0 Constant (const byte*) main::nxt#2 = TEXT Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [11] if(true) goto main::@1 +if() condition always true - replacing block destination [10] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/scrollbig-clobber.asm b/src/test/ref/scrollbig-clobber.asm index e5b254f3f..2e151a195 100644 --- a/src/test/ref/scrollbig-clobber.asm +++ b/src/test/ref/scrollbig-clobber.asm @@ -11,31 +11,40 @@ main: { lda #>TEXT sta.z nxt+1 __b1: + // next_char() jsr next_char tya + // SCREEN[i] = next_char() sta SCREEN,x + // for( byte i: 0..255) inx cpx #0 bne __b1 + // } rts } // Find the next char of the text next_char: { + // c = *nxt ldy #0 lda (nxt),y tay + // if(c==0) cpy #0 bne __b1 + // c = *nxt ldy TEXT lda #TEXT sta.z nxt+1 __b1: + // nxt++; inc.z nxt bne !+ inc.z nxt+1 !: + // } rts } TEXT: .text "cml " diff --git a/src/test/ref/scrollbig-clobber.log b/src/test/ref/scrollbig-clobber.log index 69bc19efc..6451ef317 100644 --- a/src/test/ref/scrollbig-clobber.log +++ b/src/test/ref/scrollbig-clobber.log @@ -148,15 +148,15 @@ Identical Phi Values (byte*) nxt#0 (byte*) nxt#11 Identical Phi Values (byte*) nxt#9 (byte*) nxt#13 Identical Phi Values (byte*) nxt#12 (byte*) nxt#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [11] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 -Simple Condition (bool~) next_char::$1 [20] if((byte) next_char::c#0!=(byte) 0) goto next_char::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::i#1!=rangelast(0,$ff)) goto main::@1 +Simple Condition (bool~) next_char::$1 [16] if((byte) next_char::c#0!=(byte) 0) goto next_char::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte*) nxt#14 = TEXT Constant (const byte*) nxt#4 = TEXT Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 +Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$ff)) goto main::@1 to (number) 0 Adding number conversion cast (unumber) 0 in if((byte) main::i#1!=(number) 0) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 0 diff --git a/src/test/ref/semi-struct-1.asm b/src/test/ref/semi-struct-1.asm index 9c3e831f9..1900e1268 100644 --- a/src/test/ref/semi-struct-1.asm +++ b/src/test/ref/semi-struct-1.asm @@ -16,14 +16,18 @@ .label print_line_cursor = 4 // Initialize some points and print them main: { + // init_points() jsr init_points + // print_points() jsr print_points + // } rts } // Print points print_points: { .label point = 7 .label i = 6 + // print_cls() jsr print_cls lda #<$400 sta.z print_line_cursor @@ -36,9 +40,11 @@ print_points: { lda #0 sta.z i __b1: + // idx*SIZEOF_POINT lda.z i asl tay + // points+idx*SIZEOF_POINT tya clc adc #points adc #0 sta.z point+1 + // print_byte(*pointXpos(point)) ldx points,y jsr print_byte + // print_str(" ") jsr print_str + // print_byte(*pointYpos(point)) ldy #1 lda (point),y tax jsr print_byte + // print_ln() jsr print_ln + // for(byte i: 0..NUM_POINTS-1) inc.z i lda #NUM_POINTS-1+1 cmp.z i bne __b7 + // } rts __b7: lda.z print_line_cursor @@ -71,6 +83,7 @@ print_points: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -78,6 +91,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a zero-terminated string @@ -125,15 +148,19 @@ print_str: { lda #>print_points.str sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -146,7 +173,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -161,17 +190,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #points adc #0 sta.z getPoint1_return+1 + // *pointXpos(point) = pos lda.z pos sta points,y + // pos +=10 lda #$a clc adc.z pos + // *pointYpos(point) = pos ldy #1 sta (getPoint1_return),y + // pos +=10 clc adc #$a sta.z pos + // for(byte i: 0..NUM_POINTS-1) inx cpx #NUM_POINTS-1+1 bne __b1 + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/semi-struct-1.log b/src/test/ref/semi-struct-1.log index c18c2a02c..3bfae5535 100644 --- a/src/test/ref/semi-struct-1.log +++ b/src/test/ref/semi-struct-1.log @@ -1006,12 +1006,12 @@ Identical Phi Values (byte*) print_char_cursor#20 (byte*) print_char_cursor#12 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [26] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [39] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#29) goto print_ln::@1 -Simple Condition (bool~) init_points::$3 [127] if((byte) init_points::i#1!=rangelast(0,NUM_POINTS-1)) goto init_points::@1 -Simple Condition (bool~) print_points::$8 [182] if((byte) print_points::i#1!=rangelast(0,NUM_POINTS-1)) goto print_points::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#29) goto print_ln::@1 +Simple Condition (bool~) init_points::$3 [67] if((byte) init_points::i#1!=rangelast(0,NUM_POINTS-1)) goto init_points::@1 +Simple Condition (bool~) print_points::$8 [91] if((byte) print_points::i#1!=rangelast(0,NUM_POINTS-1)) goto print_points::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -1027,21 +1027,21 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [125] init_points::i#1 ← ++ init_points::i#10 to ++ -Resolved ranged comparison value [127] if(init_points::i#1!=rangelast(0,NUM_POINTS-1)) goto init_points::@1 to (const byte) NUM_POINTS-(byte) 1+(number) 1 -Resolved ranged next value [180] print_points::i#1 ← ++ print_points::i#10 to ++ -Resolved ranged comparison value [182] if(print_points::i#1!=rangelast(0,NUM_POINTS-1)) goto print_points::@1 to (const byte) NUM_POINTS-(byte) 1+(number) 1 -Converting *(pointer+n) to pointer[n] [112] *((byte*) init_points::pointXpos1_return#0) ← (byte) init_points::pos#10 -- *(init_points::getPoint1_return#0 + 0) -Converting *(pointer+n) to pointer[n] [123] *((byte*) init_points::pointYpos1_return#0) ← (byte) init_points::pos#1 -- *(init_points::getPoint1_return#0 + 1) -Converting *(pointer+n) to pointer[n] [155] (byte) print_byte::b#0 ← *((byte*) print_points::pointXpos1_return#0) -- *(print_points::point#0 + 0) -Converting *(pointer+n) to pointer[n] [172] (byte) print_byte::b#1 ← *((byte*) print_points::pointYpos1_return#0) -- *(print_points::point#0 + 1) +Resolved ranged next value [65] init_points::i#1 ← ++ init_points::i#10 to ++ +Resolved ranged comparison value [67] if(init_points::i#1!=rangelast(0,NUM_POINTS-1)) goto init_points::@1 to (const byte) NUM_POINTS-(byte) 1+(number) 1 +Resolved ranged next value [89] print_points::i#1 ← ++ print_points::i#10 to ++ +Resolved ranged comparison value [91] if(print_points::i#1!=rangelast(0,NUM_POINTS-1)) goto print_points::@1 to (const byte) NUM_POINTS-(byte) 1+(number) 1 +Converting *(pointer+n) to pointer[n] [60] *((byte*) init_points::pointXpos1_return#0) ← (byte) init_points::pos#10 -- *(init_points::getPoint1_return#0 + 0) +Converting *(pointer+n) to pointer[n] [63] *((byte*) init_points::pointYpos1_return#0) ← (byte) init_points::pos#1 -- *(init_points::getPoint1_return#0 + 1) +Converting *(pointer+n) to pointer[n] [77] (byte) print_byte::b#0 ← *((byte*) print_points::pointXpos1_return#0) -- *(print_points::point#0 + 0) +Converting *(pointer+n) to pointer[n] [84] (byte) print_byte::b#1 ← *((byte*) print_points::pointYpos1_return#0) -- *(print_points::point#0 + 1) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero init_points::getPoint1_return#0 in [105] (byte*) init_points::pointXpos1_return#0 ← (byte*) init_points::getPoint1_return#0 + (byte) 0 -Simplifying expression containing zero init_points::getPoint1_return#0 in [112] *((byte*) init_points::getPoint1_return#0 + (byte) 0) ← (byte) init_points::pos#10 -Simplifying expression containing zero print_points::point#0 in [148] (byte*) print_points::pointXpos1_return#0 ← (byte*) print_points::point#0 + (byte) 0 -Simplifying expression containing zero print_points::point#0 in [155] (byte) print_byte::b#0 ← *((byte*) print_points::point#0 + (byte) 0) +Simplifying expression containing zero init_points::getPoint1_return#0 in [59] (byte*) init_points::pointXpos1_return#0 ← (byte*) init_points::getPoint1_return#0 + (byte) 0 +Simplifying expression containing zero init_points::getPoint1_return#0 in [60] *((byte*) init_points::getPoint1_return#0 + (byte) 0) ← (byte) init_points::pos#10 +Simplifying expression containing zero print_points::point#0 in [76] (byte*) print_points::pointXpos1_return#0 ← (byte*) print_points::point#0 + (byte) 0 +Simplifying expression containing zero print_points::point#0 in [77] (byte) print_byte::b#0 ← *((byte*) print_points::point#0 + (byte) 0) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*) init_points::pointXpos1_return#0 and assignment [36] (byte*) init_points::pointXpos1_return#0 ← (byte*) init_points::getPoint1_return#0 Eliminating unused variable (byte*) init_points::pointYpos1_return#0 and assignment [39] (byte*) init_points::pointYpos1_return#0 ← (byte*) init_points::getPoint1_return#0 + (byte) 1 diff --git a/src/test/ref/semi-struct-2.asm b/src/test/ref/semi-struct-2.asm index 0422551dc..619f2aa88 100644 --- a/src/test/ref/semi-struct-2.asm +++ b/src/test/ref/semi-struct-2.asm @@ -44,13 +44,17 @@ main: { .label fileEntry2___0 = 6 .label entry1 = 2 .label entry2 = 6 + // keyboard_init() jsr keyboard_init + // mul8u(idx, SIZEOF_ENTRY) ldx #fileEntry1_idx jsr mul8u + // mul8u(idx, SIZEOF_ENTRY) lda.z mul8u.return sta.z fileEntry1___0 lda.z mul8u.return+1 sta.z fileEntry1___0+1 + // files+mul8u(idx, SIZEOF_ENTRY) clc lda.z entry1 adc #files sta.z entry1+1 + // mul8u(idx, SIZEOF_ENTRY) ldx #fileEntry2_idx jsr mul8u + // mul8u(idx, SIZEOF_ENTRY) + // files+mul8u(idx, SIZEOF_ENTRY) clc lda.z entry2 adc #files sta.z entry2+1 + // initEntry(entry1,0x00) lda.z entry1 sta.z initEntry.entry lda.z entry1+1 sta.z initEntry.entry+1 ldx #0 jsr initEntry + // initEntry(entry2,0x11) lda.z entry2 sta.z initEntry.entry lda.z entry2+1 sta.z initEntry.entry+1 ldx #$11 jsr initEntry + // print_cls() jsr print_cls + // print_str("** entry 1 **") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -89,6 +100,7 @@ main: { lda #>str sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor_1 lda #>$400 @@ -102,7 +114,9 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_ln() jsr print_ln + // printEntry(entry1) jsr printEntry lda.z print_line_cursor sta.z print_line_cursor_1 @@ -112,21 +126,28 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("- press space -") lda #str1 sta.z print_str.str+1 jsr print_str __b1: + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // while(keyboard_key_pressed(KEY_SPACE)==0) cmp #0 beq __b1 + // print_cls() jsr print_cls + // print_str("** entry 2 **") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -136,6 +157,7 @@ main: { lda #>str2 sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor_1 lda #>$400 @@ -149,7 +171,9 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_ln() jsr print_ln + // printEntry(entry2) lda.z entry2 sta.z printEntry.entry lda.z entry2+1 @@ -163,21 +187,28 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("- press space -") lda #str1 sta.z print_str.str+1 jsr print_str __b3: + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // while(keyboard_key_pressed(KEY_SPACE)==0) cmp #0 beq __b3 + // print_cls() jsr print_cls + // } rts str: .text "** entry 1 **" .byte 0 @@ -188,7 +219,9 @@ main: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -203,17 +236,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #>3 + // keyboard_matrix_read(rowidx) jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask+colidx + // } rts } // Read a single row of the keyboard matrix @@ -237,10 +277,13 @@ keyboard_key_pressed: { // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Print a zero-terminated string @@ -248,15 +291,19 @@ keyboard_matrix_read: { print_str: { .label str = $a __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -270,6 +317,7 @@ print_str: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor_1 @@ -277,6 +325,7 @@ print_ln: { lda #0 adc.z print_line_cursor_1+1 sta.z print_line_cursor+1 + // while (print_line_cursorstr @@ -311,16 +362,19 @@ printEntry: { iny lda (entry),y sta.z print_word.w+1 + // print_word((word)*entryBufDisk(entry)) jsr print_word lda.z print_line_cursor sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("bufedit ") lda #str1 @@ -332,21 +386,25 @@ printEntry: { iny lda (entry),y sta.z print_word.w+1 + // print_word((word)*entryBufEdit(entry)) jsr print_word lda.z print_line_cursor sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("tslen ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_word(*entryTsLen(entry)) ldy #4 lda (entry),y sta.z print_word.w @@ -358,11 +416,13 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("tsorder ") lda #str3 @@ -374,21 +434,25 @@ printEntry: { iny lda (entry),y sta.z print_word.w+1 + // print_word((word)*entryTsOrder(entry)) jsr print_word lda.z print_line_cursor sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("tlastlink ") lda #str4 sta.z print_str.str+1 jsr print_str + // print_byte(*entryTLastLink(entry)) ldy #8 lda (entry),y tax @@ -397,16 +461,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("slastlink ") lda #str5 sta.z print_str.str+1 jsr print_str + // print_byte(*entrySLastLink(entry)) ldy #9 lda (entry),y tax @@ -415,16 +482,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("bflag ") lda #str6 sta.z print_str.str+1 jsr print_str + // print_byte(*entryBFlag(entry)) ldy #$a lda (entry),y tax @@ -433,16 +503,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("berror ") lda #str7 sta.z print_str.str+1 jsr print_str + // print_byte(*entryBError(entry)) ldy #$b lda (entry),y tax @@ -451,16 +524,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("ucross ") lda #str8 sta.z print_str.str+1 jsr print_str + // print_word(*entryUCross(entry)) ldy #$c lda (entry),y sta.z print_word.w @@ -472,16 +548,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("baddrlo ") lda #str9 sta.z print_str.str+1 jsr print_str + // print_byte(*entryBAddrLo(entry)) ldy #$e lda (entry),y tax @@ -490,16 +569,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("baddrhi ") lda #str10 sta.z print_str.str+1 jsr print_str + // print_byte(*entryBAddrHi(entry)) ldy #$f lda (entry),y tax @@ -508,16 +590,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("thi ") lda #str11 sta.z print_str.str+1 jsr print_str + // print_byte(*entryTHi(entry)) ldy #$10 lda (entry),y tax @@ -526,16 +611,19 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("tlo ") lda #str12 sta.z print_str.str+1 jsr print_str + // print_byte(*entryTLo(entry)) ldy #$11 lda (entry),y tax @@ -544,7 +632,9 @@ printEntry: { sta.z print_line_cursor_1 lda.z print_line_cursor+1 sta.z print_line_cursor_1+1 + // print_ln() jsr print_ln + // } rts str: .text "bufdisk " .byte 0 @@ -576,41 +666,52 @@ printEntry: { // Print a byte as HEX // print_byte(byte register(X) b) print_byte: { + // b>>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a word as HEX // print_word(word zp($a) w) print_word: { .label w = $a + // print_byte(>w) lda.z w+1 tax jsr print_byte + // print_byte($1111 adc #0 sta.z __1+1 + // *entryBufDisk(entry) = 0x1111+n ldy #0 lda.z __1 sta (entry),y iny lda.z __1+1 sta (entry),y + // 0x2222+n txa clc adc #<$2222 @@ -643,12 +747,14 @@ initEntry: { lda #>$2222 adc #0 sta.z __3+1 + // *entryBufEdit(entry) = 0x2222+n ldy #2 lda.z __3 sta (entry),y iny lda.z __3+1 sta (entry),y + // 0x3333+n txa clc adc #<$3333 @@ -656,12 +762,14 @@ initEntry: { lda #>$3333 adc #0 sta.z __5+1 + // *entryTsLen(entry) = 0x3333+n ldy #4 lda.z __5 sta (entry),y iny lda.z __5+1 sta (entry),y + // 0x4444+n txa clc adc #<$4444 @@ -669,32 +777,42 @@ initEntry: { lda #>$4444 adc #0 sta.z __7+1 + // *entryTsOrder(entry) = 0x4444+n ldy #6 lda.z __7 sta (entry),y iny lda.z __7+1 sta (entry),y + // 0x55+n txa clc adc #$55 + // *entryTLastLink(entry) = 0x55+n ldy #8 sta (entry),y + // 0x66+n txa clc adc #$66 + // *entrySLastLink(entry) = 0x66+n ldy #9 sta (entry),y + // 0x77+n txa clc adc #$77 + // *entryBFlag(entry) = 0x77+n ldy #$a sta (entry),y + // 0x88+n txa clc adc #$88 + // *entryBError(entry) = 0x88+n ldy #$b sta (entry),y + // 0x9999+n txa clc adc #<$9999 @@ -702,32 +820,42 @@ initEntry: { lda #>$9999 adc #0 sta.z __17+1 + // *entryUCross(entry) = 0x9999+n ldy #$c lda.z __17 sta (entry),y iny lda.z __17+1 sta (entry),y + // 0xaa+n txa clc adc #$aa + // *entryBAddrLo(entry) = 0xaa+n ldy #$e sta (entry),y + // 0xbb+n txa clc adc #$bb + // *entryBAddrHi(entry) = 0xbb+n ldy #$f sta (entry),y + // 0xcc+n txa clc adc #$cc + // *entryTHi(entry) = 0xcc+n ldy #$10 sta (entry),y + // 0xdd+n txa clc adc #$dd + // *entryTLo(entry) = 0xdd+n ldy #$11 sta (entry),y + // } rts } // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word @@ -744,14 +872,19 @@ mul8u: { sta.z res sta.z res+1 __b1: + // while(a!=0) cpx #0 bne __b2 + // } rts __b2: + // a&1 txa and #1 + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -760,21 +893,26 @@ mul8u: { adc.z mb+1 sta.z res+1 __b3: + // a = a>>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 } // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { + // *CIA1_PORT_A_DDR = $ff // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR + // *CIA1_PORT_B_DDR = $00 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/semi-struct-2.log b/src/test/ref/semi-struct-2.log index 10c528752..7bbb5bf3e 100644 --- a/src/test/ref/semi-struct-2.log +++ b/src/test/ref/semi-struct-2.log @@ -3565,13 +3565,13 @@ Identical Phi Values (byte*) print_char_cursor#149 (byte*) print_line_cursor#1 Identical Phi Values (byte*) print_line_cursor#102 (byte*) print_line_cursor#1 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) mul8u::$0 [5] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [10] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) memset::$1 [27] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [37] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [50] if((byte) 0!=*((byte*) print_str::str#18)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [63] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#143) goto print_ln::@1 -Simple Condition (bool~) main::$21 [220] if((byte~) main::$20==(byte) 0) goto main::@1 -Simple Condition (bool~) main::$23 [258] if((byte~) main::$22==(byte) 0) goto main::@7 +Simple Condition (bool~) mul8u::$3 [8] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) memset::$1 [16] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [23] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [31] if((byte) 0!=*((byte*) print_str::str#18)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [40] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#143) goto print_ln::@1 +Simple Condition (bool~) main::$21 [132] if((byte~) main::$20==(byte) 0) goto main::@1 +Simple Condition (bool~) main::$23 [156] if((byte~) main::$22==(byte) 0) goto main::@7 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) mul8u::res#0 = 0 Constant (const byte*) print_line_cursor#0 = (byte*) 1024 @@ -3611,41 +3611,41 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [27] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [16] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) main::str1 Successful SSA optimization Pass2ConstantStringConsolidation -Converting *(pointer+n) to pointer[n] [279] *((byte**) initEntry::entryBufDisk1_return#0) ← (byte*)(word~) initEntry::$1 -- *((byte**)initEntry::entry#10 + 0) -Converting *(pointer+n) to pointer[n] [290] *((byte**) initEntry::entryBufEdit1_return#0) ← (byte*)(word~) initEntry::$3 -- *((byte**)initEntry::entry#10 + 2) -Converting *(pointer+n) to pointer[n] [301] *((word*) initEntry::entryTsLen1_return#0) ← (word~) initEntry::$5 -- *((word*)initEntry::entry#10 + 4) -Converting *(pointer+n) to pointer[n] [312] *((word**) initEntry::entryTsOrder1_return#0) ← (word*)(word~) initEntry::$7 -- *((word**)initEntry::entry#10 + 6) -Converting *(pointer+n) to pointer[n] [323] *((byte*) initEntry::entryTLastLink1_return#0) ← (byte~) initEntry::$9 -- *(initEntry::entry#10 + 8) -Converting *(pointer+n) to pointer[n] [334] *((byte*) initEntry::entrySLastLink1_return#0) ← (byte~) initEntry::$11 -- *(initEntry::entry#10 + 9) -Converting *(pointer+n) to pointer[n] [345] *((byte*) initEntry::entryBFlag1_return#0) ← (byte~) initEntry::$13 -- *(initEntry::entry#10 + $a) -Converting *(pointer+n) to pointer[n] [355] *((byte*) initEntry::entryBError1_return#0) ← (byte~) initEntry::$15 -- *(initEntry::entry#10 + $b) -Converting *(pointer+n) to pointer[n] [366] *((word*) initEntry::entryUCross1_return#0) ← (word~) initEntry::$17 -- *((word*)initEntry::entry#10 + $c) -Converting *(pointer+n) to pointer[n] [377] *((byte*) initEntry::entryBAddrLo1_return#0) ← (byte~) initEntry::$19 -- *(initEntry::entry#10 + $e) -Converting *(pointer+n) to pointer[n] [388] *((byte*) initEntry::entryBAddrHi1_return#0) ← (byte~) initEntry::$21 -- *(initEntry::entry#10 + $f) -Converting *(pointer+n) to pointer[n] [399] *((byte*) initEntry::entryTHi1_return#0) ← (byte~) initEntry::$23 -- *(initEntry::entry#10 + $10) -Converting *(pointer+n) to pointer[n] [410] *((byte*) initEntry::entryTLo1_return#0) ← (byte~) initEntry::$25 -- *(initEntry::entry#10 + $11) -Converting *(pointer+n) to pointer[n] [426] (word) print_word::w#0 ← (word)*((byte**) printEntry::entryBufDisk1_return#0) -- *((byte**)printEntry::entry#10 + 0) -Converting *(pointer+n) to pointer[n] [448] (word) print_word::w#1 ← (word)*((byte**) printEntry::entryBufEdit1_return#0) -- *((byte**)printEntry::entry#10 + 2) -Converting *(pointer+n) to pointer[n] [470] (word) print_word::w#2 ← *((word*) printEntry::entryTsLen1_return#0) -- *((word*)printEntry::entry#10 + 4) -Converting *(pointer+n) to pointer[n] [491] (word) print_word::w#3 ← (word)*((word**) printEntry::entryTsOrder1_return#0) -- *((word**)printEntry::entry#10 + 6) -Converting *(pointer+n) to pointer[n] [513] (byte) print_byte::b#2 ← *((byte*) printEntry::entryTLastLink1_return#0) -- *(printEntry::entry#10 + 8) -Converting *(pointer+n) to pointer[n] [534] (byte) print_byte::b#3 ← *((byte*) printEntry::entrySLastLink1_return#0) -- *(printEntry::entry#10 + 9) -Converting *(pointer+n) to pointer[n] [555] (byte) print_byte::b#4 ← *((byte*) printEntry::entryBFlag1_return#0) -- *(printEntry::entry#10 + $a) -Converting *(pointer+n) to pointer[n] [575] (byte) print_byte::b#5 ← *((byte*) printEntry::entryBError1_return#0) -- *(printEntry::entry#10 + $b) -Converting *(pointer+n) to pointer[n] [596] (word) print_word::w#4 ← *((word*) printEntry::entryUCross1_return#0) -- *((word*)printEntry::entry#10 + $c) -Converting *(pointer+n) to pointer[n] [617] (byte) print_byte::b#6 ← *((byte*) printEntry::entryBAddrLo1_return#0) -- *(printEntry::entry#10 + $e) -Converting *(pointer+n) to pointer[n] [638] (byte) print_byte::b#7 ← *((byte*) printEntry::entryBAddrHi1_return#0) -- *(printEntry::entry#10 + $f) -Converting *(pointer+n) to pointer[n] [659] (byte) print_byte::b#8 ← *((byte*) printEntry::entryTHi1_return#0) -- *(printEntry::entry#10 + $10) -Converting *(pointer+n) to pointer[n] [680] (byte) print_byte::b#9 ← *((byte*) printEntry::entryTLo1_return#0) -- *(printEntry::entry#10 + $11) +Converting *(pointer+n) to pointer[n] [164] *((byte**) initEntry::entryBufDisk1_return#0) ← (byte*)(word~) initEntry::$1 -- *((byte**)initEntry::entry#10 + 0) +Converting *(pointer+n) to pointer[n] [168] *((byte**) initEntry::entryBufEdit1_return#0) ← (byte*)(word~) initEntry::$3 -- *((byte**)initEntry::entry#10 + 2) +Converting *(pointer+n) to pointer[n] [172] *((word*) initEntry::entryTsLen1_return#0) ← (word~) initEntry::$5 -- *((word*)initEntry::entry#10 + 4) +Converting *(pointer+n) to pointer[n] [176] *((word**) initEntry::entryTsOrder1_return#0) ← (word*)(word~) initEntry::$7 -- *((word**)initEntry::entry#10 + 6) +Converting *(pointer+n) to pointer[n] [179] *((byte*) initEntry::entryTLastLink1_return#0) ← (byte~) initEntry::$9 -- *(initEntry::entry#10 + 8) +Converting *(pointer+n) to pointer[n] [182] *((byte*) initEntry::entrySLastLink1_return#0) ← (byte~) initEntry::$11 -- *(initEntry::entry#10 + 9) +Converting *(pointer+n) to pointer[n] [185] *((byte*) initEntry::entryBFlag1_return#0) ← (byte~) initEntry::$13 -- *(initEntry::entry#10 + $a) +Converting *(pointer+n) to pointer[n] [188] *((byte*) initEntry::entryBError1_return#0) ← (byte~) initEntry::$15 -- *(initEntry::entry#10 + $b) +Converting *(pointer+n) to pointer[n] [192] *((word*) initEntry::entryUCross1_return#0) ← (word~) initEntry::$17 -- *((word*)initEntry::entry#10 + $c) +Converting *(pointer+n) to pointer[n] [195] *((byte*) initEntry::entryBAddrLo1_return#0) ← (byte~) initEntry::$19 -- *(initEntry::entry#10 + $e) +Converting *(pointer+n) to pointer[n] [198] *((byte*) initEntry::entryBAddrHi1_return#0) ← (byte~) initEntry::$21 -- *(initEntry::entry#10 + $f) +Converting *(pointer+n) to pointer[n] [201] *((byte*) initEntry::entryTHi1_return#0) ← (byte~) initEntry::$23 -- *(initEntry::entry#10 + $10) +Converting *(pointer+n) to pointer[n] [204] *((byte*) initEntry::entryTLo1_return#0) ← (byte~) initEntry::$25 -- *(initEntry::entry#10 + $11) +Converting *(pointer+n) to pointer[n] [212] (word) print_word::w#0 ← (word)*((byte**) printEntry::entryBufDisk1_return#0) -- *((byte**)printEntry::entry#10 + 0) +Converting *(pointer+n) to pointer[n] [222] (word) print_word::w#1 ← (word)*((byte**) printEntry::entryBufEdit1_return#0) -- *((byte**)printEntry::entry#10 + 2) +Converting *(pointer+n) to pointer[n] [232] (word) print_word::w#2 ← *((word*) printEntry::entryTsLen1_return#0) -- *((word*)printEntry::entry#10 + 4) +Converting *(pointer+n) to pointer[n] [242] (word) print_word::w#3 ← (word)*((word**) printEntry::entryTsOrder1_return#0) -- *((word**)printEntry::entry#10 + 6) +Converting *(pointer+n) to pointer[n] [251] (byte) print_byte::b#2 ← *((byte*) printEntry::entryTLastLink1_return#0) -- *(printEntry::entry#10 + 8) +Converting *(pointer+n) to pointer[n] [260] (byte) print_byte::b#3 ← *((byte*) printEntry::entrySLastLink1_return#0) -- *(printEntry::entry#10 + 9) +Converting *(pointer+n) to pointer[n] [269] (byte) print_byte::b#4 ← *((byte*) printEntry::entryBFlag1_return#0) -- *(printEntry::entry#10 + $a) +Converting *(pointer+n) to pointer[n] [278] (byte) print_byte::b#5 ← *((byte*) printEntry::entryBError1_return#0) -- *(printEntry::entry#10 + $b) +Converting *(pointer+n) to pointer[n] [288] (word) print_word::w#4 ← *((word*) printEntry::entryUCross1_return#0) -- *((word*)printEntry::entry#10 + $c) +Converting *(pointer+n) to pointer[n] [297] (byte) print_byte::b#6 ← *((byte*) printEntry::entryBAddrLo1_return#0) -- *(printEntry::entry#10 + $e) +Converting *(pointer+n) to pointer[n] [306] (byte) print_byte::b#7 ← *((byte*) printEntry::entryBAddrHi1_return#0) -- *(printEntry::entry#10 + $f) +Converting *(pointer+n) to pointer[n] [315] (byte) print_byte::b#8 ← *((byte*) printEntry::entryTHi1_return#0) -- *(printEntry::entry#10 + $10) +Converting *(pointer+n) to pointer[n] [324] (byte) print_byte::b#9 ← *((byte*) printEntry::entryTLo1_return#0) -- *(printEntry::entry#10 + $11) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero initEntry::entry#10 in [271] (byte*~) initEntry::entryBufDisk1_$0 ← (byte*) initEntry::entry#10 + (byte) 0 -Simplifying expression containing zero (byte**)initEntry::entry#10 in [279] *((byte**)(byte*) initEntry::entry#10 + (byte) 0) ← (byte*)(word~) initEntry::$1 -Simplifying expression containing zero printEntry::entry#10 in [419] (byte*~) printEntry::entryBufDisk1_$0 ← (byte*) printEntry::entry#10 + (byte) 0 -Simplifying expression containing zero (byte**)printEntry::entry#10 in [426] (word) print_word::w#0 ← (word)*((byte**)(byte*) printEntry::entry#10 + (byte) 0) +Simplifying expression containing zero initEntry::entry#10 in [161] (byte*~) initEntry::entryBufDisk1_$0 ← (byte*) initEntry::entry#10 + (byte) 0 +Simplifying expression containing zero (byte**)initEntry::entry#10 in [164] *((byte**)(byte*) initEntry::entry#10 + (byte) 0) ← (byte*)(word~) initEntry::$1 +Simplifying expression containing zero printEntry::entry#10 in [210] (byte*~) printEntry::entryBufDisk1_$0 ← (byte*) printEntry::entry#10 + (byte) 0 +Simplifying expression containing zero (byte**)printEntry::entry#10 in [212] (word) print_word::w#0 ← (word)*((byte**)(byte*) printEntry::entry#10 + (byte) 0) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte**) initEntry::entryBufDisk1_return#0 and assignment [105] (byte**) initEntry::entryBufDisk1_return#0 ← (byte**)(byte*~) initEntry::entryBufDisk1_$0 Eliminating unused variable (byte**) initEntry::entryBufEdit1_return#0 and assignment [109] (byte**) initEntry::entryBufEdit1_return#0 ← (byte**)(byte*~) initEntry::entryBufEdit1_$0 diff --git a/src/test/ref/sequence-locality-0.asm b/src/test/ref/sequence-locality-0.asm index fc26540da..68dbd4f12 100644 --- a/src/test/ref/sequence-locality-0.asm +++ b/src/test/ref/sequence-locality-0.asm @@ -7,21 +7,29 @@ main: { ldy #0 ldx #0 __b1: + // if(i>5) cpx #5+1 bcs __b2 + // i-5 txa sec sbc #5 + // screen[idx++] = i-5 sta screen,y + // screen[idx++] = i-5; iny __b3: + // for(byte i: 0..10) inx cpx #$b bne __b1 + // } rts __b2: + // screen[idx++] = i txa sta screen,y + // screen[idx++] = i; iny jmp __b3 } diff --git a/src/test/ref/sequence-locality-0.log b/src/test/ref/sequence-locality-0.log index d6b8e8e68..dcec5d237 100644 --- a/src/test/ref/sequence-locality-0.log +++ b/src/test/ref/sequence-locality-0.log @@ -95,13 +95,13 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#5 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [4] if((byte) main::i#2>(byte) 5) goto main::@2 -Simple Condition (bool~) main::$2 [15] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$2 [13] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::idx#0 = 0 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [13] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [15] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Rewriting conditional comparison [4] if((byte) main::i#2>(byte) 5) goto main::@2 Adding number conversion cast (unumber) 5+1 in if((byte) main::i#2>=(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::i#2>=(unumber)(byte) 5+(number) 1) goto main::@2 diff --git a/src/test/ref/sequence-locality-1.asm b/src/test/ref/sequence-locality-1.asm index 52cf1385b..8393e34af 100644 --- a/src/test/ref/sequence-locality-1.asm +++ b/src/test/ref/sequence-locality-1.asm @@ -7,16 +7,22 @@ main: { ldx #0 ldy #0 __b1: + // if(i>5) cpy #5+1 bcc __b4 + // j += i tya asl __b2: + // screen[idx++] = j sta screen,x + // screen[idx++] = j; inx + // for(byte i: 0..10) iny cpy #$b bne __b1 + // } rts __b4: tya diff --git a/src/test/ref/sequence-locality-1.log b/src/test/ref/sequence-locality-1.log index 59663c174..90e466129 100644 --- a/src/test/ref/sequence-locality-1.log +++ b/src/test/ref/sequence-locality-1.log @@ -90,15 +90,15 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::idx#2 = (byte) main::idx#3 Alias (byte) main::i#3 = (byte) main::j#0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [6] if((byte) main::i#3<=(byte) 5) goto main::@2 -Simple Condition (bool~) main::$2 [12] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [4] if((byte) main::i#3<=(byte) 5) goto main::@2 +Simple Condition (bool~) main::$2 [10] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::idx#0 = 0 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [10] main::i#1 ← ++ main::i#3 to ++ -Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b -Rewriting conditional comparison [6] if((byte) main::i#3<=(byte) 5) goto main::@2 +Resolved ranged next value [8] main::i#1 ← ++ main::i#3 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Rewriting conditional comparison [4] if((byte) main::i#3<=(byte) 5) goto main::@2 Adding number conversion cast (unumber) 5+1 in if((byte) main::i#3<(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) 1 in if((byte) main::i#3<(unumber)(byte) 5+(number) 1) goto main::@2 Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 diff --git a/src/test/ref/sieve-min.asm b/src/test/ref/sieve-min.asm index 1f8e57a7b..f1865902c 100644 --- a/src/test/ref/sieve-min.asm +++ b/src/test/ref/sieve-min.asm @@ -15,6 +15,7 @@ main: { .label s = 6 .label i_1 = 2 .label __16 = $c + // memset(sieve, 0, COUNT) jsr memset lda #2 sta.z i+1 __b1: + // while (i < SQRT_COUNT) lda.z i+1 cmp #>SQRT_COUNT bcc __b2 @@ -42,6 +44,7 @@ main: { lda #>2 sta.z i_1+1 __b7: + // for (i = 2; i < 0x04c7; ++i) lda.z i_1+1 cmp #>$4c7 bcc __b8 @@ -51,9 +54,11 @@ main: { bcc __b8 !: __b11: + // (*(SCREEN+999))++; inc SCREEN+$3e7 jmp __b11 __b8: + // if (!sieve[i]) lda.z i_1 clc adc #sieve sta.z s+1 __b4: + // while (j < COUNT) lda.z j+1 cmp #>COUNT bcc __b5 @@ -102,19 +114,23 @@ main: { bcc __b5 !: __b3: + // i++; inc.z i bne !+ inc.z i+1 !: + // sieve_i++; inc.z sieve_i bne !+ inc.z sieve_i+1 !: jmp __b1 __b5: + // *s = 1 lda #1 ldy #0 sta (s),y + // s += i lda.z s clc adc.z i @@ -122,6 +138,7 @@ main: { lda.z s+1 adc.z i+1 sta.z s+1 + // j += i lda.z j clc adc.z i @@ -134,41 +151,52 @@ main: { // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a word as HEX // print_word(word zp(2) w) print_word: { .label w = 2 + // print_byte(>w) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -182,17 +210,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$400 @@ -58,6 +61,7 @@ main: { lda #>str sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -67,17 +71,21 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("between 2 and ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word_decimal(COUNT) lda #COUNT sta.z print_word_decimal.w+1 jsr print_word_decimal + // print_ln() jsr print_ln + // memset(sieve, 0, COUNT) ldx #0 lda #COUNT sta.z memset.num+1 jsr memset + // clock_start() jsr clock_start lda #2 sta.z i+1 __b1: + // while (i < SQRT_COUNT) lda.z i+1 cmp #>SQRT_COUNT bcs !__b2+ @@ -110,7 +120,9 @@ main: { jmp __b2 !__b2: !: + // clock() jsr clock + // cyclecount = clock()-CLOCKS_PER_INIT lda.z cyclecount sec sbc #CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 + // div32u16u(cyclecount, (unsigned int)(CLOCKS_PER_SEC/100)) jsr div32u16u + // sec100s = (unsigned int)div32u16u(cyclecount, (unsigned int)(CLOCKS_PER_SEC/100)) lda.z __12 sta.z sec100s lda.z __12+1 @@ -133,24 +147,30 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("100ths seconds used: ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_word_decimal(sec100s) jsr print_word_decimal + // print_str(" cycles: ") lda #str3 sta.z print_str.str+1 jsr print_str + // print_dword_decimal(cyclecount) jsr print_dword_decimal + // print_ln() jsr print_ln lda #<2 sta.z i_1 lda #>2 sta.z i_1+1 __b8: + // for (i = 2; i < 1300; ++i) lda.z i_1+1 cmp #>$514 bcc __b9 @@ -163,15 +183,18 @@ main: { sta.z print_char_cursor lda.z print_char_cursor_1+1 sta.z print_char_cursor+1 + // print_str("...") lda #str4 sta.z print_str.str+1 jsr print_str __b13: + // (*(SCREEN+999))++; inc SCREEN+$3e7 jmp __b13 __b9: + // if (!sieve[i]) lda.z i_1 clc adc #sieve sta.z s+1 __b5: + // while (j < COUNT) lda.z j+1 cmp #>COUNT bcc __b6 @@ -223,19 +254,23 @@ main: { bcc __b6 !: __b4: + // i++; inc.z i bne !+ inc.z i+1 !: + // sieve_i++; inc.z sieve_i bne !+ inc.z sieve_i+1 !: jmp __b1 __b6: + // *s = 1 lda #1 ldy #0 sta (s),y + // s += i lda.z s clc adc.z i @@ -243,6 +278,7 @@ main: { lda.z s+1 adc.z i+1 sta.z s+1 + // j += i lda.z j clc adc.z i @@ -265,9 +301,11 @@ main: { // Print a single char print_char: { .const ch = ' ' + // *(print_char_cursor++) = ch lda #ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; lda.z print_char_cursor clc adc #1 @@ -275,22 +313,26 @@ print_char: { lda.z print_char_cursor+1 adc #0 sta.z print_char_cursor_1+1 + // } rts } // Print a word as DECIMAL // print_word_decimal(word zp($d) w) print_word_decimal: { .label w = $d + // utoa(w, decimal_digits, DECIMAL) lda.z w sta.z utoa.value lda.z w+1 sta.z utoa.value+1 jsr utoa + // print_str(decimal_digits) lda #decimal_digits sta.z print_str.str+1 jsr print_str + // } rts } // Print a zero-terminated string @@ -298,15 +340,19 @@ print_word_decimal: { print_str: { .label str = $f __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -337,23 +383,30 @@ utoa: { txa sta.z digit __b1: + // for( char digit=0; digit= digit_value) cpx #0 bne __b5 cmp.z value+1 @@ -371,10 +425,15 @@ utoa: { !: bcc __b5 __b4: + // for( char digit=0; digit= sub) lda.z sub+1 cmp.z value+1 bne !+ @@ -406,12 +466,16 @@ utoa_append: { beq __b2 !: bcc __b2 + // *buffer = DIGITS[digit] lda DIGITS,x ldy #0 sta (buffer),y + // } rts __b2: + // digit++; inx + // value -= sub lda.z value sec sbc.z sub @@ -424,6 +488,7 @@ utoa_append: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -431,6 +496,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursordecimal_digits_long sta.z print_str.str+1 jsr print_str + // } rts } // Converts unsigned number value to a string representing it in RADIX format. @@ -473,23 +543,30 @@ ultoa: { txa sta.z digit __b1: + // for( char digit=0; digit= digit_value) cpx #0 bne __b5 lda.z value+3 @@ -521,10 +599,15 @@ ultoa: { bcs __b5 !: __b4: + // for( char digit=0; digit= sub) lda.z value+3 cmp.z sub+3 bcc !+ @@ -564,12 +648,16 @@ ultoa_append: { cmp.z sub bcs __b2 !: + // *buffer = DIGITS[digit] lda DIGITS,x ldy #0 sta (buffer),y + // } rts __b2: + // digit++; inx + // value -= sub lda.z value sec sbc.z sub @@ -594,6 +682,7 @@ div32u16u: { .label quotient_lo = $13 .label return = $15 .label dividend = 9 + // divr16u(>dividend, divisor, 0) lda.z dividend+2 sta.z divr16u.dividend lda.z dividend+3 @@ -602,15 +691,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>div32u16u.divisor bcc __b3 @@ -658,10 +762,12 @@ divr16u: { cmp #div32u16u.divisor sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = 9 + // 0xffffffff - *CIA2_TIMER_AB lda #<$ffffffff sec sbc CIA2_TIMER_AB @@ -692,16 +802,20 @@ clock: { lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 + // } rts } // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2_TIMER_A_CONTROL + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_AB = 0xffffffff lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff @@ -710,10 +824,13 @@ clock_start: { sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 + // *CIA2_TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2_TIMER_B_CONTROL + // *CIA2_TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES lda #CIA_TIMER_CONTROL_START sta CIA2_TIMER_A_CONTROL + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -723,11 +840,13 @@ memset: { .label dst = $11 .label num = $f .label str = $11 + // if(num>0) lda.z num bne !+ lda.z num+1 beq __breturn !: + // end = (char*)str + num lda.z end clc adc.z str @@ -736,6 +855,7 @@ memset: { adc.z str+1 sta.z end+1 __b2: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp.z end+1 bne __b3 @@ -743,11 +863,14 @@ memset: { cmp.z end bne __b3 __breturn: + // } rts __b3: + // *dst = c txa ldy #0 sta (dst),y + // for(char* dst = str; dst!=end; dst++) inc.z dst bne !+ inc.z dst+1 @@ -756,6 +879,7 @@ memset: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) ldx #' ' lda #<$400 sta.z memset.str @@ -766,6 +890,7 @@ print_cls: { lda #>$3e8 sta.z memset.num+1 jsr memset + // } rts } // The digits used for numbers diff --git a/src/test/ref/sieve.log b/src/test/ref/sieve.log index ff5cbd376..d4ecb71a5 100644 --- a/src/test/ref/sieve.log +++ b/src/test/ref/sieve.log @@ -2500,42 +2500,42 @@ Identical Phi Values (word) rem16u#17 (word) rem16u#0 Identical Phi Values (byte*) print_char_cursor#61 (byte*) print_line_cursor#1 Identical Phi Values (byte*) print_line_cursor#25 (byte*) print_line_cursor#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) memset::$1 [3] if((word) memset::num#2<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [13] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) divr16u::$4 [42] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [50] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [57] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) utoa::$0 [101] if((byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1 -Simple Condition (bool~) utoa::$1 [107] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 -Simple Condition (bool~) utoa::$2 [113] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 -Simple Condition (bool~) utoa::$3 [119] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 -Simple Condition (bool~) utoa::$6 [138] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19 -Simple Condition (bool~) utoa_append::$0 [168] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 -Simple Condition (bool~) ultoa::$0 [182] if((byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1 -Simple Condition (bool~) ultoa::$1 [188] if((byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2 -Simple Condition (bool~) ultoa::$2 [194] if((byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3 -Simple Condition (bool~) ultoa::$3 [200] if((byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4 -Simple Condition (bool~) ultoa::$6 [219] if((byte) ultoa::digit#2<(byte~) ultoa::$5) goto ultoa::@19 -Simple Condition (bool~) ultoa_append::$0 [249] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 -Simple Condition (bool~) print_str::$0 [266] if((byte) 0!=*((byte*) print_str::str#8)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [279] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 -Simple Condition (bool~) main::$20 [387] if((word) main::i#12<(const byte) SQRT_COUNT) goto main::@2 -Simple Condition (bool~) main::$22 [392] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 -Simple Condition (bool~) main::$25 [440] if((word) main::j#2<(const word) COUNT) goto main::@6 -Simple Condition (bool~) main::$26 [447] if((word) main::i#10<(word) $514) goto main::@16 -Simple Condition (bool~) main::$28 [452] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#2<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) divr16u::$4 [30] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [35] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [40] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) utoa::$0 [66] if((byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1 +Simple Condition (bool~) utoa::$1 [70] if((byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 +Simple Condition (bool~) utoa::$2 [74] if((byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 +Simple Condition (bool~) utoa::$3 [78] if((byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 +Simple Condition (bool~) utoa::$6 [95] if((byte) utoa::digit#2<(byte~) utoa::$5) goto utoa::@19 +Simple Condition (bool~) utoa_append::$0 [120] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2 +Simple Condition (bool~) ultoa::$0 [129] if((byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1 +Simple Condition (bool~) ultoa::$1 [133] if((byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2 +Simple Condition (bool~) ultoa::$2 [137] if((byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3 +Simple Condition (bool~) ultoa::$3 [141] if((byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4 +Simple Condition (bool~) ultoa::$6 [158] if((byte) ultoa::digit#2<(byte~) ultoa::$5) goto ultoa::@19 +Simple Condition (bool~) ultoa_append::$0 [183] if((dword) ultoa_append::value#2>=(dword) ultoa_append::sub#0) goto ultoa_append::@2 +Simple Condition (bool~) print_str::$0 [192] if((byte) 0!=*((byte*) print_str::str#8)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [201] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#2) goto print_ln::@1 +Simple Condition (bool~) main::$20 [270] if((word) main::i#12<(const byte) SQRT_COUNT) goto main::@2 +Simple Condition (bool~) main::$22 [272] if((byte) 0!=*((byte*) main::sieve_i#2)) goto main::@4 +Simple Condition (bool~) main::$25 [306] if((word) main::j#2<(const word) COUNT) goto main::@6 +Simple Condition (bool~) main::$26 [312] if((word) main::i#10<(word) $514) goto main::@16 +Simple Condition (bool~) main::$28 [314] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [144] (bool~) utoa::$9 ← ! (bool~) utoa::$8 -Rewriting || if()-condition to two if()s [143] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7 -Rewriting ! if()-condition to reversed if() [225] (bool~) ultoa::$9 ← ! (bool~) ultoa::$8 -Rewriting || if()-condition to two if()s [224] (bool~) ultoa::$8 ← (byte) ultoa::started#2 || (bool~) ultoa::$7 +Rewriting ! if()-condition to reversed if() [100] (bool~) utoa::$9 ← ! (bool~) utoa::$8 +Rewriting || if()-condition to two if()s [99] (bool~) utoa::$8 ← (byte) utoa::started#2 || (bool~) utoa::$7 +Rewriting ! if()-condition to reversed if() [163] (bool~) ultoa::$9 ← ! (bool~) ultoa::$8 +Rewriting || if()-condition to two if()s [162] (bool~) ultoa::$8 ← (byte) ultoa::started#2 || (bool~) ultoa::$7 Successful SSA optimization Pass2ConditionalAndOrRewriting Warning! Adding boolean cast to non-boolean condition (byte) utoa::started#2 Warning! Adding boolean cast to non-boolean condition (byte) ultoa::started#2 -Rewriting array member address-of to pointer addition [383] (byte*) main::sieve_i#0 ← (const byte*) sieve + (word) main::i#0 -Rewriting array member address-of to pointer addition [436] (byte*) main::s#0 ← (const byte*) sieve + (word) main::j#0 +Rewriting array member address-of to pointer addition [267] (byte*) main::sieve_i#0 ← (const byte*) sieve + (word) main::i#0 +Rewriting array member address-of to pointer addition [303] (byte*) main::s#0 ← (const byte*) sieve + (word) main::j#0 Successful SSA optimization PassNArrayElementAddressOfRewriting -Constant right-side identified [374] (void*) memset::str#1 ← (void*)(const byte*) sieve +Constant right-side identified [260] (void*) memset::str#1 ← (void*)(const byte*) sieve Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2600,28 +2600,28 @@ Constant (const void*) memset::str#0 = (void*)print_line_cursor#0 Constant (const word) main::toD0181_$0 = (word)main::toD0181_screen#0 Constant (const word) main::toD0181_$4 = (word)main::toD0181_gfx#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [101] if((const byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1 -if() condition always false - eliminating [107] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 -if() condition always false - eliminating [113] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 -if() condition always false - eliminating [119] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 -if() condition always true - replacing block destination [182] if((const byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1 -if() condition always false - eliminating [188] if((const byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2 -if() condition always false - eliminating [194] if((const byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3 -if() condition always false - eliminating [200] if((const byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4 -if() condition always true - replacing block destination [470] if(true) goto main::@24 +if() condition always true - replacing block destination [66] if((const byte) utoa::radix#0==(const byte) DECIMAL) goto utoa::@1 +if() condition always false - eliminating [70] if((const byte) utoa::radix#0==(const byte) HEXADECIMAL) goto utoa::@2 +if() condition always false - eliminating [74] if((const byte) utoa::radix#0==(const byte) OCTAL) goto utoa::@3 +if() condition always false - eliminating [78] if((const byte) utoa::radix#0==(const byte) BINARY) goto utoa::@4 +if() condition always true - replacing block destination [129] if((const byte) ultoa::radix#0==(const byte) DECIMAL) goto ultoa::@1 +if() condition always false - eliminating [133] if((const byte) ultoa::radix#0==(const byte) HEXADECIMAL) goto ultoa::@2 +if() condition always false - eliminating [137] if((const byte) ultoa::radix#0==(const byte) OCTAL) goto ultoa::@3 +if() condition always false - eliminating [141] if((const byte) ultoa::radix#0==(const byte) BINARY) goto ultoa::@4 +if() condition always true - replacing block destination [327] if(true) goto main::@24 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [55] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [57] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -De-inlining pointer[w] to *(pointer+w) [452] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18 +Resolved ranged next value [38] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [40] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +De-inlining pointer[w] to *(pointer+w) [314] if((byte) 0!=*((const byte*) sieve + (word) main::i#10)) goto main::@18 Successful SSA optimization Pass2DeInlineWordDerefIdx -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [25] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES -Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [26] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES in [15] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying constant evaluating to zero (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS in [16] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_STOP|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero -Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [26] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [28] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [29] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES +Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [16] *((const byte*) CIA2_TIMER_B_CONTROL) ← (byte) 0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [18] *((const byte*) CIA2_TIMER_B_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A +Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [19] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS|(const byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero -Simplifying expression containing zero CIA_TIMER_CONTROL_START in [29] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS +Simplifying expression containing zero CIA_TIMER_CONTROL_START in [19] *((const byte*) CIA2_TIMER_A_CONTROL) ← (const byte) CIA_TIMER_CONTROL_START|(const byte) CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (void*) memset::return#2 and assignment [144] (void*) memset::return#2 ← (void*) memset::str#3 Eliminating unused variable (void*) memset::return#3 and assignment [161] (void*) memset::return#3 ← (void*) memset::str#3 diff --git a/src/test/ref/signed-bytes.asm b/src/test/ref/signed-bytes.asm index 24dc76e14..18dc81217 100644 --- a/src/test/ref/signed-bytes.asm +++ b/src/test/ref/signed-bytes.asm @@ -6,6 +6,7 @@ main: { ldy #0 ldx #-$7f __b1: + // while(i<127) txa sec sbc #$7f @@ -13,11 +14,15 @@ main: { eor #$80 !: bmi __b2 + // } rts __b2: + // screen[j] = (byte)i txa sta screen,y + // i++; inx + // j++; iny jmp __b1 } diff --git a/src/test/ref/signed-char-comparison.asm b/src/test/ref/signed-char-comparison.asm index e0306dd22..fedcad0cd 100644 --- a/src/test/ref/signed-char-comparison.asm +++ b/src/test/ref/signed-char-comparison.asm @@ -7,14 +7,18 @@ main: { ldx #-$80 __b1: + // debug(dy) jsr debug + // for(signed char dy:-128..127) inx cpx #-$80 bne __b1 + // } rts } // debug(signed byte register(X) dy) debug: { + // if (dy > -120) txa sec sbc #-$78 @@ -23,8 +27,10 @@ debug: { eor #$80 !: bmi __breturn + // SCREEN[i] = 10 lda #$a sta SCREEN,x __breturn: + // } rts } diff --git a/src/test/ref/signed-char-comparison.log b/src/test/ref/signed-char-comparison.log index 59b94fd88..e29a4bbe5 100644 --- a/src/test/ref/signed-char-comparison.log +++ b/src/test/ref/signed-char-comparison.log @@ -98,13 +98,13 @@ Alias (byte) debug::i#0 = (byte~) debug::$0 (byte) debug::i#1 Successful SSA optimization Pass2AliasElimination Identical Phi Values (signed byte) debug::dy#1 (signed byte) debug::dy#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [7] if((signed byte) main::dy#1!=rangelast(-$80,$7f)) goto main::@1 -Simple Condition (bool~) debug::$2 [14] if((signed byte) debug::dy#0<=(signed byte) -$78) goto debug::@return +Simple Condition (bool~) main::$1 [6] if((signed byte) main::dy#1!=rangelast(-$80,$7f)) goto main::@1 +Simple Condition (bool~) debug::$2 [11] if((signed byte) debug::dy#0<=(signed byte) -$78) goto debug::@return Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const signed byte) main::dy#0 = -$80 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [5] main::dy#1 ← ++ main::dy#2 to ++ -Resolved ranged comparison value [7] if(main::dy#1!=rangelast(-$80,$7f)) goto main::@1 to (number) -$80 +Resolved ranged next value [4] main::dy#1 ← ++ main::dy#2 to ++ +Resolved ranged comparison value [6] if(main::dy#1!=rangelast(-$80,$7f)) goto main::@1 to (number) -$80 Adding number conversion cast (snumber) -$80 in if((signed byte) main::dy#1!=(number) -$80) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast -$80 diff --git a/src/test/ref/signed-indexed-subtract.asm b/src/test/ref/signed-indexed-subtract.asm index 40306b4e5..386dd3973 100644 --- a/src/test/ref/signed-indexed-subtract.asm +++ b/src/test/ref/signed-indexed-subtract.asm @@ -7,18 +7,23 @@ main: { ldy #0 __b1: + // sub(i, $80) tya ldx #$80 jsr sub + // sub(i, $40) tya ldx #$40 jsr sub + // sub(i, $40) tya ldx #$40 jsr sub + // for(byte i: 0..8) iny cpy #9 bne __b1 + // print_cls() jsr print_cls lda #<$400 sta.z print_line_cursor @@ -30,6 +35,7 @@ main: { sta.z print_char_cursor+1 ldx #0 __b3: + // print_sword(words[j]) txa asl tay @@ -38,10 +44,13 @@ main: { lda words+1,y sta.z print_sword.w+1 jsr print_sword + // print_ln() jsr print_ln + // for(byte j: 0..8) inx cpx #9 bne __b9 + // } rts __b9: lda.z print_line_cursor @@ -53,6 +62,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -60,6 +70,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -152,17 +183,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$4d2 sta.z w1+1 __b1: + // w1 = w1 - 41 lda.z w1 sec sbc #$29 @@ -18,6 +19,7 @@ main: { lda.z w1+1 sbc #>$29 sta.z w1+1 + // screen[i] = w1 txa asl tay @@ -25,8 +27,10 @@ main: { sta screen,y lda.z w1+1 sta screen+1,y + // for( byte i: 0..10 ) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/signed-word-minus-byte-2.log b/src/test/ref/signed-word-minus-byte-2.log index 424b527cb..fb0f0f9ae 100644 --- a/src/test/ref/signed-word-minus-byte-2.log +++ b/src/test/ref/signed-word-minus-byte-2.log @@ -65,13 +65,13 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to signed word in (snumber~) main::$0 ← (signed word) main::w1#2 - (signed byte) $29 Alias (signed word) main::w1#1 = (signed word~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [9] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const signed word) main::w1#0 = $4d2 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/signed-words.asm b/src/test/ref/signed-words.asm index 9ee7ebddd..24d1976b3 100644 --- a/src/test/ref/signed-words.asm +++ b/src/test/ref/signed-words.asm @@ -23,6 +23,7 @@ .label ypos = 8 .label xvel = $a main: { + // init() jsr init lda #<$64 sta.z yvel_init @@ -42,9 +43,11 @@ main: { lda #>$64 sta.z yvel_1+1 __b1: + // while (*RASTER!=$ff) lda #$ff cmp RASTER bne __b1 + // anim() jsr anim jmp __b1 } @@ -53,8 +56,10 @@ anim: { .label __7 = $e .label sprite_x = $c .label sprite_y = $e + // if(ypos<0) lda.z ypos+1 bpl __b1 + // xvel = -xvel sec lda #0 sbc.z xvel @@ -62,6 +67,7 @@ anim: { lda #0 sbc.z xvel+1 sta.z xvel+1 + // yvel_init = yvel_init-10 lda.z yvel_init sec sbc #$a @@ -69,6 +75,7 @@ anim: { lda.z yvel_init+1 sbc #>$a sta.z yvel_init+1 + // if(yvel_init<-200) lda.z yvel_init cmp #<-$c8 lda.z yvel_init+1 @@ -92,6 +99,7 @@ anim: { sta.z xpos sta.z xpos+1 __b1: + // yvel + g clc lda.z yvel_1 adc #g sta.z yvel_1+1 + // xpos + xvel lda.z xpos clc adc.z xvel @@ -106,6 +115,7 @@ anim: { lda.z xpos+1 adc.z xvel+1 sta.z xpos+1 + // ypos + yvel lda.z ypos clc adc.z yvel_1 @@ -113,6 +123,7 @@ anim: { lda.z ypos+1 adc.z yvel_1+1 sta.z ypos+1 + // xpos>>7 lda.z xpos sta.z $ff lda.z xpos+1 @@ -126,6 +137,7 @@ anim: { rol.z $ff rol.z __5 rol.z __5+1 + // sprite_x = xpos>>7 + 160 clc lda.z sprite_x adc #<$a0 @@ -133,6 +145,7 @@ anim: { lda.z sprite_x+1 adc #>$a0 sta.z sprite_x+1 + // ypos>>5 lda.z ypos sta.z $ff lda.z ypos+1 @@ -152,6 +165,7 @@ anim: { rol.z $ff rol.z __7 rol.z __7+1 + // sprite_y = 230 - ypos>>5 lda #<$e6 sec sbc.z sprite_y @@ -159,27 +173,41 @@ anim: { lda #>$e6 sbc.z sprite_y+1 sta.z sprite_y+1 + // (byte)sprite_x lda.z sprite_x + // SPRITES_XPOS[0] = (byte)sprite_x sta SPRITES_XPOS + // (byte)sprite_y lda.z sprite_y + // SPRITES_YPOS[0] = (byte)sprite_y sta SPRITES_YPOS + // >sprite_x lda.z sprite_x+1 + // *SPRITES_XMSB = >sprite_x sta SPRITES_XMSB + // } rts } // Fill and show a sprite, clear the screen init: { .label sc = $a + // *SPRITES_ENABLE = %00000001 lda #1 sta SPRITES_ENABLE + // *SPRITES_EXPAND_X = 0 lda #0 sta SPRITES_EXPAND_X + // *SPRITES_EXPAND_Y = 0 sta SPRITES_EXPAND_Y + // SPRITES_XPOS[0] = 100 lda #$64 sta SPRITES_XPOS + // SPRITES_YPOS[0] = 100 sta SPRITES_YPOS + // SPRITES_COLS[0] = WHITE lda #WHITE sta SPRITES_COLS + // SPRITES_PTR[0] = (byte)(SPRITE/$40) lda #SPRITE/$40 sta SPRITES_PTR lda #SCREEN sta.z sc+1 __b1: + // for(byte* sc=SCREEN; sc!=SCREEN+1000; sc++ ) lda.z sc+1 cmp #>SCREEN+$3e8 bne __b2 @@ -195,16 +224,21 @@ init: { bne __b2 ldx #0 __b3: + // SPRITE[i] = $ff lda #$ff sta SPRITE,x + // for(byte i : 0..63) inx cpx #$40 bne __b3 + // } rts __b2: + // *sc = ' ' lda #' ' ldy #0 sta (sc),y + // for(byte* sc=SCREEN; sc!=SCREEN+1000; sc++ ) inc.z sc bne !+ inc.z sc+1 diff --git a/src/test/ref/signed-words.log b/src/test/ref/signed-words.log index caae50330..bee748d12 100644 --- a/src/test/ref/signed-words.log +++ b/src/test/ref/signed-words.log @@ -564,11 +564,11 @@ Identical Phi Values (signed word) ypos#12 (signed word) ypos#0 Identical Phi Values (signed word) xvel#11 (signed word) xvel#0 Identical Phi Values (signed word) yvel_init#12 (signed word) yvel_init#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [5] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 -Simple Condition (bool~) init::$0 [32] if((byte*) init::sc#2!=(const byte*) SCREEN+(word) $3e8) goto init::@2 -Simple Condition (bool~) init::$1 [41] if((byte) init::i#1!=rangelast(0,$3f)) goto init::@7 -Simple Condition (bool~) anim::$1 [51] if((signed word) ypos#13>=(signed byte) 0) goto anim::@1 -Simple Condition (bool~) anim::$15 [80] if((signed word) yvel_init#3>=(signed word) -$c8) goto anim::@4 +Simple Condition (bool~) main::$1 [4] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2 +Simple Condition (bool~) init::$0 [19] if((byte*) init::sc#2!=(const byte*) SCREEN+(word) $3e8) goto init::@2 +Simple Condition (bool~) init::$1 [27] if((byte) init::i#1!=rangelast(0,$3f)) goto init::@7 +Simple Condition (bool~) anim::$1 [35] if((signed word) ypos#13>=(signed byte) 0) goto anim::@1 +Simple Condition (bool~) anim::$15 [55] if((signed word) yvel_init#3>=(signed word) -$c8) goto anim::@4 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) init::sc#0 = SCREEN Constant (const byte) init::i#0 = 0 @@ -580,16 +580,16 @@ Constant (const signed word) xpos#14 = 0 Constant (const signed word) ypos#14 = 0 Constant (const signed word) yvel_init#4 = $c8 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [14] if(true) goto main::@2 +if() condition always true - replacing block destination [7] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [39] init::i#1 ← ++ init::i#2 to ++ -Resolved ranged comparison value [41] if(init::i#1!=rangelast(0,$3f)) goto init::@7 to (number) $40 -Simplifying expression containing zero SPRITES_XPOS in [25] *((const byte*) SPRITES_XPOS + (byte) 0) ← (byte) $64 -Simplifying expression containing zero SPRITES_YPOS in [26] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte) $64 -Simplifying expression containing zero SPRITES_COLS in [27] *((const byte*) SPRITES_COLS + (byte) 0) ← (const byte) WHITE -Simplifying expression containing zero SPRITES_PTR in [28] *((const byte*) SPRITES_PTR + (byte) 0) ← (byte)(const byte*) SPRITE/(byte) $40 -Simplifying expression containing zero SPRITES_XPOS in [66] *((const byte*) SPRITES_XPOS + (byte) 0) ← (byte~) anim::$9 -Simplifying expression containing zero SPRITES_YPOS in [68] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte~) anim::$10 +Resolved ranged next value [25] init::i#1 ← ++ init::i#2 to ++ +Resolved ranged comparison value [27] if(init::i#1!=rangelast(0,$3f)) goto init::@7 to (number) $40 +Simplifying expression containing zero SPRITES_XPOS in [12] *((const byte*) SPRITES_XPOS + (byte) 0) ← (byte) $64 +Simplifying expression containing zero SPRITES_YPOS in [13] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte) $64 +Simplifying expression containing zero SPRITES_COLS in [14] *((const byte*) SPRITES_COLS + (byte) 0) ← (const byte) WHITE +Simplifying expression containing zero SPRITES_PTR in [15] *((const byte*) SPRITES_PTR + (byte) 0) ← (byte)(const byte*) SPRITE/(byte) $40 +Simplifying expression containing zero SPRITES_XPOS in [45] *((const byte*) SPRITES_XPOS + (byte) 0) ← (byte~) anim::$9 +Simplifying expression containing zero SPRITES_YPOS in [47] *((const byte*) SPRITES_YPOS + (byte) 0) ← (byte~) anim::$10 Successful SSA optimization PassNSimplifyExpressionWithZero Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/simple-loop.asm b/src/test/ref/simple-loop.asm index d7d057ebf..578f6fe52 100644 --- a/src/test/ref/simple-loop.asm +++ b/src/test/ref/simple-loop.asm @@ -5,14 +5,19 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // for( unsigned char i = 0; i<128; i+=2) cpx #$80 bcc __b2 + // } rts __b2: + // SCREEN[i] = 'a' lda #'a' sta SCREEN,x + // (*(unsigned char*)0xD020)=0 lda #0 sta $d020 + // i+=2 inx inx jmp __b1 diff --git a/src/test/ref/sinus-basic.asm b/src/test/ref/sinus-basic.asm index d1988ab49..80454ddfb 100644 --- a/src/test/ref/sinus-basic.asm +++ b/src/test/ref/sinus-basic.asm @@ -9,12 +9,15 @@ main: { .label f_2pi = $e2e5 .label i = 2 + // setFAC(1275) lda #<$4fb sta.z setFAC.prepareMEM1_mem lda #>$4fb sta.z setFAC.prepareMEM1_mem+1 jsr setFAC + // divFACby10() jsr divFACby10 + // setMEMtoFAC(f_127) lda #f_127 @@ -31,41 +34,54 @@ main: { lda #1 sta.z i __b1: + // setFAC((word)i) lda.z i sta.z setFAC.w lda #0 sta.z setFAC.w+1 jsr setFAC + // mulFACbyMEM(f_2pi) lda #f_2pi sta.z mulFACbyMEM.mem+1 jsr mulFACbyMEM + // setMEMtoFAC(f_i) lda #f_i sta.z setMEMtoFAC.mem+1 jsr setMEMtoFAC + // setFAC(25) lda #<$19 sta.z setFAC.prepareMEM1_mem lda #>$19 sta.z setFAC.prepareMEM1_mem+1 jsr setFAC + // divMEMbyFAC(f_i) jsr divMEMbyFAC + // sinFAC() jsr sinFAC + // mulFACbyMEM(f_127) lda #f_127 sta.z mulFACbyMEM.mem+1 jsr mulFACbyMEM + // addMEMtoFAC(f_127) jsr addMEMtoFAC + // getFAC() jsr getFAC + // print_word(getFAC()) jsr print_word + // print_ln() jsr print_ln + // for(byte i : 1..25) inc.z i lda #$1a cmp.z i bne __b15 + // } rts __b15: lda.z print_line_cursor @@ -79,6 +95,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -86,6 +103,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // word = FAC @@ -141,14 +171,17 @@ print_char: { // Destroys the value in the FAC in the process getFAC: { .label return = 7 + // asm // Load FAC (floating point accumulator) integer part into word register Y,A jsr $b1aa sty memLo sta memHi + // w = { *memHi, *memLo } tya sta.z return lda memHi sta.z return+1 + // } rts } // FAC = MEM+FAC @@ -156,13 +189,17 @@ getFAC: { // Reads 5 bytes from memory addMEMtoFAC: { .const prepareMEM1_mem = main.f_127 + // *memLo = mem lda #>prepareMEM1_mem sta memHi + // asm lda memLo ldy memHi jsr $b867 + // } rts } // FAC = MEM*FAC @@ -171,20 +208,28 @@ addMEMtoFAC: { // mulFACbyMEM(byte* zp(7) mem) mulFACbyMEM: { .label mem = 7 + // mem lda.z mem+1 + // *memHi = >mem sta memHi + // asm lda memLo ldy memHi jsr $ba28 + // } rts } // FAC = sin(FAC) // Set FAC to sinus of the FAC - sin(FAC) // Sinus is calculated on radians (0-2*PI) sinFAC: { + // asm jsr $e26b + // } rts } // FAC = MEM/FAC @@ -192,13 +237,17 @@ sinFAC: { // Reads 5 bytes from memory divMEMbyFAC: { .const prepareMEM1_mem = main.f_i + // *memLo = mem lda #>prepareMEM1_mem sta memHi + // asm lda memLo ldy memHi jsr $bb0f + // } rts } // FAC = word @@ -207,13 +256,19 @@ divMEMbyFAC: { setFAC: { .label prepareMEM1_mem = 7 .label w = 7 + // mem lda.z prepareMEM1_mem+1 + // *memHi = >mem sta memHi + // asm // Load word register Y,A into FAC (floating point accumulator) ldy memLo jsr $b391 + // } rts } // MEM = FAC @@ -222,19 +277,27 @@ setFAC: { // setMEMtoFAC(byte* zp(7) mem) setMEMtoFAC: { .label mem = 7 + // mem lda.z mem+1 + // *memHi = >mem sta memHi + // asm ldx memLo tay jsr $bbd4 + // } rts } // FAC = FAC/10 // Set FAC to FAC divided by 10 divFACby10: { + // asm jsr $bafe + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/sinus-basic.log b/src/test/ref/sinus-basic.log index f77bdb226..2c8e8ccad 100644 --- a/src/test/ref/sinus-basic.log +++ b/src/test/ref/sinus-basic.log @@ -782,8 +782,8 @@ Identical Phi Values (byte*) print_char_cursor#12 (byte*) print_line_cursor#1 Identical Phi Values (byte*) print_char_cursor#14 (byte*) print_char_cursor#12 Identical Phi Values (byte*) print_line_cursor#11 (byte*) print_line_cursor#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 -Simple Condition (bool~) main::$15 [158] if((byte) main::i#1!=rangelast(1,$19)) goto main::@1 +Simple Condition (bool~) print_ln::$1 [5] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#10) goto print_ln::@1 +Simple Condition (bool~) main::$15 [107] if((byte) main::i#1!=rangelast(1,$19)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const word) setFAC::w#0 = $4fb @@ -799,8 +799,8 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const word) addMEMtoFAC::prepareMEM1_mem#0 = (word)addMEMtoFAC::mem#0 Constant (const word) divMEMbyFAC::prepareMEM1_mem#0 = (word)divMEMbyFAC::mem#0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [156] main::i#1 ← ++ main::i#10 to ++ -Resolved ranged comparison value [158] if(main::i#1!=rangelast(1,$19)) goto main::@1 to (number) $1a +Resolved ranged next value [105] main::i#1 ← ++ main::i#10 to ++ +Resolved ranged comparison value [107] if(main::i#1!=rangelast(1,$19)) goto main::@1 to (number) $1a Adding number conversion cast (unumber) $1a in if((byte) main::i#1!=(number) $1a) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $1a diff --git a/src/test/ref/sinusgen16.asm b/src/test/ref/sinusgen16.asm index 6e04d2663..cf35cead4 100644 --- a/src/test/ref/sinusgen16.asm +++ b/src/test/ref/sinusgen16.asm @@ -17,7 +17,9 @@ main: { .label wavelength = $78 .label sw = 8 .label st1 = $10 + // sin16s_gen(sintab1, wavelength) jsr sin16s_gen + // print_cls() jsr print_cls lda #sintab1 sta.z st1+1 __b1: + // for(signed word* st1 = sintab1; st1sintab1+wavelength*SIZEOF_SIGNED_WORD bcc __b2 @@ -36,27 +39,34 @@ main: { cmp #=0) bmi __b3 + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str __b3: + // print_sword(sw) jsr print_sword + // print_str(" ") lda #str sta.z print_str.str+1 jsr print_str + // for(signed word* st1 = sintab1; st1w) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -175,17 +208,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #main.sintab1 @@ -221,6 +261,7 @@ sin16s_gen: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; imain.wavelength bcc __b2 @@ -229,8 +270,10 @@ sin16s_gen: { cmp #= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -305,6 +353,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -339,6 +389,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -387,26 +441,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) + // x2 = mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return sta.z x2 lda.z mulu16_sel.return+1 sta.z x2+1 + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -414,22 +477,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -438,6 +508,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -445,8 +516,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -455,6 +528,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -467,11 +541,13 @@ mulu16_sel: { .label v2 = $12 .label return = $1c .label return_1 = $10 + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2)<0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -534,8 +618,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -548,6 +634,7 @@ div32u16u: { .label quotient_hi = $1e .label quotient_lo = $1c .label return = $14 + // divr16u(>dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -556,15 +643,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>main.wavelength bcc __b3 @@ -612,10 +714,12 @@ divr16u: { cmp #main.wavelength sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/sinusgen16.log b/src/test/ref/sinusgen16.log index c3782b59d..54613a945 100644 --- a/src/test/ref/sinusgen16.log +++ b/src/test/ref/sinusgen16.log @@ -1736,24 +1736,24 @@ Identical Phi Values (byte*) print_char_cursor#47 (byte*) print_char_cursor#13 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_char_cursor#49 (byte*) print_char_cursor#13 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [71] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [76] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) sin16s_gen::$1 [103] if((word) sin16s_gen::i#2<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@2 -Simple Condition (bool~) sin16s::$1 [122] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [126] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) memset::$1 [214] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [224] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [238] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2 -Simple Condition (bool~) print_sword::$0 [248] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -Simple Condition (bool~) main::$3 [332] if((signed word*) main::st1#2<(signed word*~) main::$2) goto main::@2 -Simple Condition (bool~) main::$5 [337] if((signed word) main::sw#0<(signed byte) 0) goto main::@4 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) sin16s_gen::$1 [66] if((word) sin16s_gen::i#2<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@2 +Simple Condition (bool~) sin16s::$1 [79] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [82] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [123] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) memset::$1 [140] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [147] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [155] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2 +Simple Condition (bool~) print_sword::$0 [162] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) main::$3 [216] if((signed word*) main::st1#2<(signed word*~) main::$2) goto main::@2 +Simple Condition (bool~) main::$5 [219] if((signed word) main::sw#0<(signed byte) 0) goto main::@4 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [152] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [329] (word~) main::$9 ← (const word) main::wavelength * (const byte) SIZEOF_SIGNED_WORD +Constant right-side identified [101] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [213] (word~) main::$9 ← (const word) main::wavelength * (const byte) SIZEOF_SIGNED_WORD Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -1792,10 +1792,10 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [214] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [140] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 Eliminating unused constant (const void*) memset::return#2 Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/sinusgen16b.asm b/src/test/ref/sinusgen16b.asm index 8a96f1fc1..e8e24e359 100644 --- a/src/test/ref/sinusgen16b.asm +++ b/src/test/ref/sinusgen16b.asm @@ -22,8 +22,11 @@ main: { .label sw = $19 .label st1 = 3 .label st2 = $b + // sin16s_gen(sintab1, wavelength) jsr sin16s_gen + // sin16s_genb(sintab2, wavelength) jsr sin16s_genb + // print_cls() jsr print_cls ldx #0 lda #sintab1 sta.z st1+1 __b1: + // sw = *st1 - *st2 ldy #0 sec lda (st1),y @@ -48,19 +52,24 @@ main: { lda (st1),y sbc (st2),y sta.z sw+1 + // if(sw>=0) bmi __b2 + // print_str(" ") lda #str1 sta.z print_str.str+1 jsr print_str __b2: + // print_sword(sw) jsr print_sword + // print_str(" ") lda #str sta.z print_str.str+1 jsr print_str + // st1++; lda #SIZEOF_SIGNED_WORD clc adc.z st1 @@ -68,6 +77,7 @@ main: { bcc !+ inc.z st1+1 !: + // st2++; lda #SIZEOF_SIGNED_WORD clc adc.z st2 @@ -75,9 +85,11 @@ main: { bcc !+ inc.z st2+1 !: + // for( byte i: 0..119) inx cpx #$78 bne __b1 + // } rts sintab1: .fill 2*$78, 0 sintab2: .fill 2*$78, 0 @@ -91,15 +103,19 @@ main: { print_str: { .label str = $11 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -114,16 +130,22 @@ print_str: { // print_sword(signed word zp($19) w) print_sword: { .label w = $19 + // if(w<0) lda.z w+1 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_word((word)w) jsr print_word + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // w = -w sec lda #0 sbc.z w @@ -136,48 +158,61 @@ print_sword: { // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a word as HEX // print_word(word zp($19) w) print_word: { .label w = $19 + // print_byte(>w) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -192,17 +227,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #main.sintab2 @@ -238,6 +280,7 @@ sin16s_genb: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; imain.wavelength bcc __b2 @@ -246,19 +289,23 @@ sin16s_genb: { cmp #x) lda.z x+2 sta.z sin16sb.x lda.z x+3 sta.z sin16sb.x+1 jsr sin16sb + // *sintab++ = sin16sb(>x) ldy #0 lda.z __3 sta (sintab),y iny lda.z __3+1 sta (sintab),y + // *sintab++ = sin16sb(>x); lda #SIZEOF_SIGNED_WORD clc adc.z sintab @@ -266,6 +313,7 @@ sin16s_genb: { bcc !+ inc.z sintab+1 !: + // x = x + step lda.z x clc adc.z step @@ -279,6 +327,7 @@ sin16s_genb: { lda.z x+3 adc.z step+3 sta.z x+3 + // for( word i=0; i= PI_u4f12 ) lda.z x+1 cmp #>PI_u4f12 bcc b1 @@ -309,6 +359,7 @@ sin16sb: { cmp #= PI_HALF_u4f12 ) lda.z x+1 cmp #>PI_HALF_u4f12 bcc __b2 @@ -329,6 +381,7 @@ sin16sb: { cmp #$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -380,22 +444,29 @@ sin16sb: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return_1 sta.z mulu16_sel.return lda.z mulu16_sel.return_1+1 sta.z mulu16_sel.return+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5/$10 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -404,6 +475,7 @@ sin16sb: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -411,8 +483,10 @@ sin16sb: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -421,6 +495,7 @@ sin16sb: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -433,11 +508,13 @@ mulu16_sel: { .label v2 = 5 .label return = 3 .label return_1 = $17 + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2)<0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -500,8 +585,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -514,6 +601,7 @@ div32u16u: { .label quotient_hi = $19 .label quotient_lo = $17 .label return = $13 + // divr16u(>dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -522,15 +610,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>main.wavelength bcc __b3 @@ -578,10 +681,12 @@ divr16u: { cmp #main.wavelength sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Generate signed (large) word sinus table - on the full -$7fff - $7fff range @@ -607,7 +715,10 @@ sin16s_gen: { // Iterate over the table .label x = 7 .label i = $19 + // div32u16u(PI2_u4f28, wavelength) jsr div32u16u + // div32u16u(PI2_u4f28, wavelength) + // step = div32u16u(PI2_u4f28, wavelength) lda #main.sintab1 @@ -624,6 +735,7 @@ sin16s_gen: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; imain.wavelength bcc __b2 @@ -632,8 +744,10 @@ sin16s_gen: { cmp #= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -708,6 +827,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -742,6 +863,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -790,26 +915,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return_1 sta.z mulu16_sel.return lda.z mulu16_sel.return_1+1 sta.z mulu16_sel.return+1 + // x2 = mulu16_sel(x1, x1, 0) + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return_1 sta.z mulu16_sel.return lda.z mulu16_sel.return_1+1 sta.z mulu16_sel.return+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -817,22 +951,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return_1 sta.z mulu16_sel.return lda.z mulu16_sel.return_1+1 sta.z mulu16_sel.return+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -841,6 +982,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -848,8 +990,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -858,6 +1002,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/sinusgen16b.log b/src/test/ref/sinusgen16b.log index 1e9cebb70..510ef3c46 100644 --- a/src/test/ref/sinusgen16b.log +++ b/src/test/ref/sinusgen16b.log @@ -2230,28 +2230,28 @@ Identical Phi Values (byte*) print_char_cursor#47 (byte*) print_char_cursor#13 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_char_cursor#49 (byte*) print_char_cursor#13 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul16u::$0 [71] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [76] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) sin16s_gen::$1 [103] if((word) sin16s_gen::i#2<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@2 -Simple Condition (bool~) sin16s::$1 [122] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [126] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [185] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) sin16s_genb::$1 [224] if((word) sin16s_genb::i#2<(word) sin16s_genb::wavelength#0) goto sin16s_genb::@2 -Simple Condition (bool~) sin16sb::$1 [244] if((word) sin16sb::x#0<(const word) PI_u4f12) goto sin16sb::@1 -Simple Condition (bool~) sin16sb::$3 [248] if((word) sin16sb::x#4<(const word) PI_HALF_u4f12) goto sin16sb::@2 -Simple Condition (bool~) sin16sb::$15 [306] if((byte) sin16sb::isUpper#2==(byte) 0) goto sin16sb::@3 -Simple Condition (bool~) memset::$1 [322] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [332] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [346] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2 -Simple Condition (bool~) print_sword::$0 [356] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -Simple Condition (bool~) main::$5 [448] if((signed word) main::sw#0<(signed byte) 0) goto main::@2 -Simple Condition (bool~) main::$9 [462] if((byte) main::i#1!=rangelast(0,$77)) goto main::@1 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#6<(word) divr16u::divisor#6) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul16u::$0 [46] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [49] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) sin16s_gen::$1 [66] if((word) sin16s_gen::i#2<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@2 +Simple Condition (bool~) sin16s::$1 [79] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [82] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [123] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) sin16s_genb::$1 [149] if((word) sin16s_genb::i#2<(word) sin16s_genb::wavelength#0) goto sin16s_genb::@2 +Simple Condition (bool~) sin16sb::$1 [162] if((word) sin16sb::x#0<(const word) PI_u4f12) goto sin16sb::@1 +Simple Condition (bool~) sin16sb::$3 [165] if((word) sin16sb::x#4<(const word) PI_HALF_u4f12) goto sin16sb::@2 +Simple Condition (bool~) sin16sb::$15 [205] if((byte) sin16sb::isUpper#2==(byte) 0) goto sin16sb::@3 +Simple Condition (bool~) memset::$1 [213] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [220] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [228] if((byte) 0!=*((byte*) print_str::str#3)) goto print_str::@2 +Simple Condition (bool~) print_sword::$0 [235] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) main::$5 [294] if((signed word) main::sw#0<(signed byte) 0) goto main::@2 +Simple Condition (bool~) main::$9 [306] if((byte) main::i#1!=rangelast(0,$77)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [152] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 -Constant right-side identified [273] (word) mulu16_sel::v2#7 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [101] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [183] (word) mulu16_sel::v2#7 ← (unumber)(number) $10000/(number) 6 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2303,12 +2303,12 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [322] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [213] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [460] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [462] if(main::i#1!=rangelast(0,$77)) goto main::@1 to (number) $78 +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [304] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [306] if(main::i#1!=rangelast(0,$77)) goto main::@1 to (number) $78 Eliminating unused variable - keeping the phi block (word) rem16u#26 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/sinusgen8.asm b/src/test/ref/sinusgen8.asm index ba57bc622..e030e1e29 100644 --- a/src/test/ref/sinusgen8.asm +++ b/src/test/ref/sinusgen8.asm @@ -11,7 +11,9 @@ .label print_line_cursor = $400 .label print_char_cursor = 2 main: { + // sin8s_gen(sintab2, wavelength) jsr sin8s_gen + // print_cls() jsr print_cls lda #main.str sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -64,16 +75,22 @@ print_str: { // print_sbyte(signed byte zp(4) b) print_sbyte: { .label b = 4 + // if(b<0) lda.z b bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_byte((byte)b) jsr print_byte + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // b = -b lda.z b eor #$ff clc @@ -84,36 +101,46 @@ print_sbyte: { // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a byte as HEX // print_byte(byte zp(4) b) print_byte: { .label b = 4 + // b>>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -128,17 +155,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #sintab2 @@ -168,6 +202,7 @@ sin8s_gen: { sta.z i+1 // u[4.12] __b1: + // for( word i=0; iwavelength bcc __b2 @@ -176,19 +211,24 @@ sin8s_gen: { cmp #= PI_u4f12 ) lda.z x+1 cmp #>PI_u4f12 bcc b1 @@ -224,6 +266,7 @@ sin8s: { cmp #= PI_HALF_u4f12 ) lda.z x+1 cmp #>PI_HALF_u4f12 bcc __b2 @@ -246,6 +290,7 @@ sin8s: { cmp #x<<3 lda.z __4+1 sta.z x1 + // mulu8_sel(x1, x1, 0) tax tay lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x1, x1, 0) + // x2 = mulu8_sel(x1, x1, 0) + // mulu8_sel(x2, x1, 1) tax ldy.z x1 lda #1 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x2, x1, 1) + // x3 = mulu8_sel(x2, x1, 1) sta.z x3 + // mulu8_sel(x3, DIV_6, 1) tax lda #1 sta.z mulu8_sel.select ldy #DIV_6 jsr mulu8_sel + // mulu8_sel(x3, DIV_6, 1) + // x3_6 = mulu8_sel(x3, DIV_6, 1) + // usinx = x1 - x3_6 eor #$ff sec adc.z x1 sta.z usinx + // mulu8_sel(x3, x1, 0) ldx.z x3 ldy.z x1 lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x3, x1, 0) + // x4 = mulu8_sel(x3, x1, 0) + // mulu8_sel(x4, x1, 0) tax ldy.z x1 lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x4, x1, 0) + // x5 = mulu8_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr lsr lsr lsr + // usinx = usinx + x5_128 clc adc.z usinx tax + // if(usinx>=128) cpx #$80 bcc __b3 + // usinx--; dex __b3: + // if(isUpper!=0) lda.z isUpper cmp #0 beq __b14 + // sinx = -(signed byte)usinx txa eor #$ff clc adc #1 + // } rts __b14: txa @@ -322,8 +392,10 @@ mulu8_sel: { .label __0 = 6 .label __1 = 6 .label select = 5 + // mul8u(v1, v2) tya jsr mul8u + // mul8u(v1, v2)<>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 @@ -376,7 +458,10 @@ mul8u: { // Implemented using simple binary division div16u: { .label return = $e + // divr16u(dividend, divisor, 0) jsr divr16u + // divr16u(dividend, divisor, 0) + // } rts } // Performs division on two 16 bit unsigned words and an initial remainder @@ -401,20 +486,28 @@ divr16u: { sta.z rem sta.z rem+1 __b1: + // rem = rem << 1 asl.z rem rol.z rem+1 + // >dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>wavelength bcc __b3 @@ -423,10 +516,12 @@ divr16u: { cmp #wavelength sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/sinusgen8.log b/src/test/ref/sinusgen8.log index 6a621d3cb..a10b0f0e8 100644 --- a/src/test/ref/sinusgen8.log +++ b/src/test/ref/sinusgen8.log @@ -1499,21 +1499,21 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 Identical Phi Values (byte*) print_char_cursor#39 (byte*) print_char_cursor#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) divr16u::$4 [10] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [18] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [25] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul8u::$0 [52] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [57] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) sin8s_gen::$1 [83] if((word) sin8s_gen::i#2<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@2 -Simple Condition (bool~) sin8s::$1 [100] if((word) sin8s::x#0<(const word) PI_u4f12) goto sin8s::@1 -Simple Condition (bool~) sin8s::$3 [104] if((word) sin8s::x#4<(const word) PI_HALF_u4f12) goto sin8s::@2 -Simple Condition (bool~) sin8s::$15 [161] if((byte) sin8s::usinx#1<(byte) $80) goto sin8s::@3 -Simple Condition (bool~) sin8s::$18 [170] if((byte) sin8s::isUpper#10==(byte) 0) goto sin8s::@4 -Simple Condition (bool~) memset::$1 [198] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [208] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [221] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -Simple Condition (bool~) print_sbyte::$0 [231] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 -Simple Condition (bool~) main::$6 [310] if((byte) main::i#1!=rangelast(0,$bf)) goto main::@1 +Simple Condition (bool~) divr16u::$4 [8] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [13] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [18] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul8u::$0 [35] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [38] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) sin8s_gen::$1 [54] if((word) sin8s_gen::i#2<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@2 +Simple Condition (bool~) sin8s::$1 [67] if((word) sin8s::x#0<(const word) PI_u4f12) goto sin8s::@1 +Simple Condition (bool~) sin8s::$3 [70] if((word) sin8s::x#4<(const word) PI_HALF_u4f12) goto sin8s::@2 +Simple Condition (bool~) sin8s::$15 [110] if((byte) sin8s::usinx#1<(byte) $80) goto sin8s::@3 +Simple Condition (bool~) sin8s::$18 [115] if((byte) sin8s::isUpper#10==(byte) 0) goto sin8s::@4 +Simple Condition (bool~) memset::$1 [132] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [139] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [147] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_sbyte::$0 [154] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 +Simple Condition (bool~) main::$6 [206] if((byte) main::i#1!=rangelast(0,$bf)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) divr16u::quotient#0 = 0 Constant (const byte) divr16u::i#0 = 0 @@ -1549,12 +1549,12 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [198] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [132] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [23] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [25] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [308] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [310] if(main::i#1!=rangelast(0,$bf)) goto main::@1 to (number) $c0 +Resolved ranged next value [16] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [18] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [204] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [206] if(main::i#1!=rangelast(0,$bf)) goto main::@1 to (number) $c0 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 diff --git a/src/test/ref/sinusgen8b.asm b/src/test/ref/sinusgen8b.asm index 1fbabfb7e..8b9e5ac5d 100644 --- a/src/test/ref/sinusgen8b.asm +++ b/src/test/ref/sinusgen8b.asm @@ -25,8 +25,11 @@ main: { .label __11 = $14 .label sb = $13 .label sw = $14 + // sin8s_gen(sintabb, wavelength) jsr sin8s_gen + // sin16s_gen(sintabw, wavelength) jsr sin16s_gen + // print_cls() jsr print_cls lda #sintabw sta.z __4+1 + // sw = *(sintabw+(word)i) ldy #0 lda (sw),y pha @@ -57,16 +64,22 @@ main: { sta.z sw+1 pla sta.z sw + // >sw lda.z sw+1 + // sd = sb-(signed byte)>sw eor #$ff sec adc.z sb + // print_sbyte(sd) sta.z print_sbyte.b jsr print_sbyte + // print_str(" ") jsr print_str + // for(byte i: 0..191) inx cpx #$c0 bne __b1 + // } rts sintabb: .fill $c0, 0 sintabw: .fill 2*$c0, 0 @@ -82,15 +95,19 @@ print_str: { lda #>main.str sta.z str+1 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -105,16 +122,22 @@ print_str: { // print_sbyte(signed byte zp($10) b) print_sbyte: { .label b = $10 + // if(b<0) lda.z b bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_byte((byte)b) jsr print_byte + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // b = -b lda.z b eor #$ff clc @@ -125,36 +148,46 @@ print_sbyte: { // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a byte as HEX // print_byte(byte zp($10) b) print_byte: { .label b = $10 + // b>>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -169,17 +202,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #main.sintabw @@ -215,6 +255,7 @@ sin16s_gen: { sta.z i+1 // u[4.28] __b1: + // for( word i=0; imain.wavelength bcc __b2 @@ -223,8 +264,10 @@ sin16s_gen: { cmp #= PI_u4f28 ) lda.z x+3 cmp #>PI_u4f28>>$10 bcc b1 @@ -299,6 +347,7 @@ sin16s: { cmp #= PI_HALF_u4f28 ) lda.z x+3 cmp #>PI_HALF_u4f28>>$10 bcc __b2 @@ -333,6 +383,7 @@ sin16s: { cmp #x<<3 lda.z __4+2 sta.z x1 lda.z __4+3 sta.z x1+1 + // mulu16_sel(x1, x1, 0) lda.z x1 sta.z mulu16_sel.v1 lda.z x1+1 @@ -381,26 +435,35 @@ sin16s: { sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x1, x1, 0) + // x2 = mulu16_sel(x1, x1, 0) lda.z mulu16_sel.return sta.z x2 lda.z mulu16_sel.return+1 sta.z x2+1 + // mulu16_sel(x2, x1, 1) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #1 jsr mulu16_sel + // mulu16_sel(x2, x1, 1) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x3 = mulu16_sel(x2, x1, 1) + // mulu16_sel(x3, $10000/6, 1) ldx #1 lda #<$10000/6 sta.z mulu16_sel.v2 lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel + // mulu16_sel(x3, $10000/6, 1) + // x3_6 = mulu16_sel(x3, $10000/6, 1) + // usinx = x1 - x3_6 lda.z x1 sec sbc.z x3_6 @@ -408,22 +471,29 @@ sin16s: { lda.z x1+1 sbc.z x3_6+1 sta.z usinx+1 + // mulu16_sel(x3, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x3, x1, 0) lda.z mulu16_sel.return sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 + // x4 = mulu16_sel(x3, x1, 0) + // mulu16_sel(x4, x1, 0) lda.z x1 sta.z mulu16_sel.v2 lda.z x1+1 sta.z mulu16_sel.v2+1 ldx #0 jsr mulu16_sel + // mulu16_sel(x4, x1, 0) + // x5 = mulu16_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr.z x5_128+1 ror.z x5_128 lsr.z x5_128+1 @@ -432,6 +502,7 @@ sin16s: { ror.z x5_128 lsr.z x5_128+1 ror.z x5_128 + // usinx = usinx + x5_128 lda.z usinx clc adc.z x5_128 @@ -439,8 +510,10 @@ sin16s: { lda.z usinx+1 adc.z x5_128+1 sta.z usinx+1 + // if(isUpper!=0) cpy #0 beq __b3 + // sinx = -(signed word)usinx sec lda #0 sbc.z sinx @@ -449,6 +522,7 @@ sin16s: { sbc.z sinx+1 sta.z sinx+1 __b3: + // } rts } // Calculate val*val for two unsigned word values - the result is 16 selected bits of the 32-bit result. @@ -461,11 +535,13 @@ mulu16_sel: { .label v2 = $e .label return = $20 .label return_1 = $c + // mul16u(v1, v2) lda.z v1 sta.z mul16u.a lda.z v1+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(v1, v2)<0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -528,8 +612,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -542,6 +628,7 @@ div32u16u: { .label quotient_hi = $20 .label quotient_lo = $c .label return = $16 + // divr16u(>dividend, divisor, 0) lda #>$10 sta.z divr16u.dividend lda #>PI2_u4f28>>$10 @@ -550,15 +637,21 @@ div32u16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(>dividend, divisor, 0) + // quotient_hi = divr16u(>dividend, divisor, 0) lda.z divr16u.return sta.z quotient_hi lda.z divr16u.return+1 sta.z quotient_hi+1 + // divr16u(PI2_u4f28&$ffff sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>main.wavelength bcc __b3 @@ -606,10 +708,12 @@ divr16u: { cmp #main.wavelength sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } // Generate signed byte sinus table - on the full -$7f - $7f range @@ -634,7 +741,10 @@ sin8s_gen: { // Iterate over the table .label x = $20 .label i = $e + // div16u(PI2_u4f12, wavelength) jsr div16u + // div16u(PI2_u4f12, wavelength) + // step = div16u(PI2_u4f12, wavelength) lda #main.sintabb @@ -646,6 +756,7 @@ sin8s_gen: { sta.z i+1 // u[4.12] __b1: + // for( word i=0; imain.wavelength bcc __b2 @@ -654,19 +765,24 @@ sin8s_gen: { cmp #= PI_u4f12 ) lda.z x+1 cmp #>PI_u4f12 bcc b1 @@ -702,6 +820,7 @@ sin8s: { cmp #= PI_HALF_u4f12 ) lda.z x+1 cmp #>PI_HALF_u4f12 bcc __b2 @@ -724,6 +844,7 @@ sin8s: { cmp #x<<3 lda.z __4+1 sta.z x1 + // mulu8_sel(x1, x1, 0) tax tay lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x1, x1, 0) + // x2 = mulu8_sel(x1, x1, 0) + // mulu8_sel(x2, x1, 1) tax ldy.z x1 lda #1 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x2, x1, 1) + // x3 = mulu8_sel(x2, x1, 1) sta.z x3 + // mulu8_sel(x3, DIV_6, 1) tax lda #1 sta.z mulu8_sel.select ldy #DIV_6 jsr mulu8_sel + // mulu8_sel(x3, DIV_6, 1) + // x3_6 = mulu8_sel(x3, DIV_6, 1) + // usinx = x1 - x3_6 eor #$ff sec adc.z x1 sta.z usinx + // mulu8_sel(x3, x1, 0) ldx.z x3 ldy.z x1 lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x3, x1, 0) + // x4 = mulu8_sel(x3, x1, 0) + // mulu8_sel(x4, x1, 0) tax ldy.z x1 lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x4, x1, 0) + // x5 = mulu8_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr lsr lsr lsr + // usinx = usinx + x5_128 clc adc.z usinx tax + // if(usinx>=128) cpx #$80 bcc __b3 + // usinx--; dex __b3: + // if(isUpper!=0) lda.z isUpper cmp #0 beq __b14 + // sinx = -(signed byte)usinx txa eor #$ff clc adc #1 + // } rts __b14: txa @@ -800,8 +946,10 @@ mulu8_sel: { .label __0 = $11 .label __1 = $11 .label select = $13 + // mul8u(v1, v2) tya jsr mul8u + // mul8u(v1, v2)<>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 @@ -854,6 +1012,7 @@ mul8u: { // Implemented using simple binary division div16u: { .label return = $c + // divr16u(dividend, divisor, 0) lda #PI2_u4f12 @@ -862,6 +1021,8 @@ div16u: { sta.z divr16u.rem sta.z divr16u.rem+1 jsr divr16u + // divr16u(dividend, divisor, 0) + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/sinusgen8b.log b/src/test/ref/sinusgen8b.log index a2b4d7238..df6ddbaed 100644 --- a/src/test/ref/sinusgen8b.log +++ b/src/test/ref/sinusgen8b.log @@ -2345,29 +2345,29 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (void*) memset::return#0 (void*) memset::str#0 Identical Phi Values (byte*) print_char_cursor#39 (byte*) print_char_cursor#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) divr16u::$4 [11] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 -Simple Condition (bool~) divr16u::$9 [19] if((word) divr16u::rem#7<(word) divr16u::divisor#7) goto divr16u::@3 -Simple Condition (bool~) divr16u::$11 [26] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 -Simple Condition (bool~) mul8u::$0 [85] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [90] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) mul16u::$0 [109] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 -Simple Condition (bool~) mul16u::$3 [114] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 -Simple Condition (bool~) sin16s_gen::$1 [141] if((word) sin16s_gen::i#2<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@2 -Simple Condition (bool~) sin8s_gen::$1 [169] if((word) sin8s_gen::i#2<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@2 -Simple Condition (bool~) sin16s::$1 [188] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 -Simple Condition (bool~) sin16s::$3 [192] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 -Simple Condition (bool~) sin16s::$16 [251] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 -Simple Condition (bool~) sin8s::$1 [268] if((word) sin8s::x#0<(const word) PI_u4f12) goto sin8s::@1 -Simple Condition (bool~) sin8s::$3 [272] if((word) sin8s::x#4<(const word) PI_HALF_u4f12) goto sin8s::@2 -Simple Condition (bool~) sin8s::$15 [329] if((byte) sin8s::usinx#1<(byte) $80) goto sin8s::@3 -Simple Condition (bool~) sin8s::$18 [338] if((byte) sin8s::isUpper#10==(byte) 0) goto sin8s::@4 -Simple Condition (bool~) memset::$1 [379] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [389] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [403] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -Simple Condition (bool~) print_sbyte::$0 [413] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 -Simple Condition (bool~) main::$10 [504] if((byte) main::i#1!=rangelast(0,$bf)) goto main::@1 +Simple Condition (bool~) divr16u::$4 [9] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [14] if((word) divr16u::rem#7<(word) divr16u::divisor#7) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [19] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul8u::$0 [55] if((byte) mul8u::a#2!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [58] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) mul16u::$0 [69] if((word) mul16u::a#2!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [72] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) sin16s_gen::$1 [89] if((word) sin16s_gen::i#2<(word) sin16s_gen::wavelength#0) goto sin16s_gen::@2 +Simple Condition (bool~) sin8s_gen::$1 [110] if((word) sin8s_gen::i#2<(word) sin8s_gen::wavelength#0) goto sin8s_gen::@2 +Simple Condition (bool~) sin16s::$1 [123] if((dword) sin16s::x#0<(const dword) PI_u4f28) goto sin16s::@1 +Simple Condition (bool~) sin16s::$3 [126] if((dword) sin16s::x#4<(const dword) PI_HALF_u4f28) goto sin16s::@2 +Simple Condition (bool~) sin16s::$16 [167] if((byte) sin16s::isUpper#2==(byte) 0) goto sin16s::@3 +Simple Condition (bool~) sin8s::$1 [176] if((word) sin8s::x#0<(const word) PI_u4f12) goto sin8s::@1 +Simple Condition (bool~) sin8s::$3 [179] if((word) sin8s::x#4<(const word) PI_HALF_u4f12) goto sin8s::@2 +Simple Condition (bool~) sin8s::$15 [219] if((byte) sin8s::usinx#1<(byte) $80) goto sin8s::@3 +Simple Condition (bool~) sin8s::$18 [224] if((byte) sin8s::isUpper#10==(byte) 0) goto sin8s::@4 +Simple Condition (bool~) memset::$1 [250] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [257] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [265] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_sbyte::$0 [272] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 +Simple Condition (bool~) main::$10 [335] if((byte) main::i#1!=rangelast(0,$bf)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [218] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 +Constant right-side identified [145] (word) mulu16_sel::v2#2 ← (unumber)(number) $10000/(number) 6 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const word) rem16u#0 = 0 Constant (const word) divr16u::quotient#0 = 0 @@ -2422,12 +2422,12 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [379] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [250] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [24] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [26] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 -Resolved ranged next value [502] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [504] if(main::i#1!=rangelast(0,$bf)) goto main::@1 to (number) $c0 +Resolved ranged next value [17] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [19] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [333] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [335] if(main::i#1!=rangelast(0,$bf)) goto main::@1 to (number) $c0 Eliminating unused constant (const void*) memset::return#2 Eliminating unused constant (const word) rem16u#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/sinusgenscale8.asm b/src/test/ref/sinusgenscale8.asm index a5277dd3f..68dec516a 100644 --- a/src/test/ref/sinusgenscale8.asm +++ b/src/test/ref/sinusgenscale8.asm @@ -11,8 +11,11 @@ .label print_line_cursor = 2 main: { .label tabsize = $14 + // print_cls() jsr print_cls + // sin8u_table(sintab, tabsize, 10, 255) jsr sin8u_table + // } rts sintab: .fill $14, 0 } @@ -35,7 +38,11 @@ sin8u_table: { // Iterate over the table .label x = $d .label i = $b + // div16u(PI2_u4f12, tabsize) jsr div16u + // div16u(PI2_u4f12, tabsize) + // step = div16u(PI2_u4f12, tabsize) + // print_str("step:") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -45,43 +52,53 @@ sin8u_table: { lda #>str sta.z print_str.str+1 jsr print_str + // print_word(step) lda.z step sta.z print_word.w lda.z step+1 sta.z print_word.w+1 jsr print_word + // print_str(" min:") lda #str1 sta.z print_str.str+1 jsr print_str + // print_byte(min) lda #min sta.z print_byte.b jsr print_byte + // print_str(" max:") lda #str2 sta.z print_str.str+1 jsr print_str + // print_byte(max) lda #max sta.z print_byte.b jsr print_byte + // print_str(" ampl:") lda #str3 sta.z print_str.str+1 jsr print_str + // print_byte(amplitude) lda #amplitude sta.z print_byte.b jsr print_byte + // print_str(" mid:") lda #str4 sta.z print_str.str+1 jsr print_str + // print_byte(mid) lda #mid sta.z print_byte.b jsr print_byte + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -98,6 +115,7 @@ sin8u_table: { sta.z i+1 // u[4.12] __b1: + // for( word i=0; imain.tabsize bcc __b2 @@ -106,22 +124,31 @@ sin8u_table: { cmp #sinx_sc lda.z sinx_sc+1 + // sinx_tr = mid+>sinx_sc tax axs #-[mid] + // *sintab++ = sinx_tr txa ldy #0 sta (sintab),y + // *sintab++ = sinx_tr; inc.z sintab bne !+ inc.z sintab+1 @@ -130,42 +157,52 @@ sin8u_table: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("x: ") lda #str5 sta.z print_str.str+1 jsr print_str + // print_word(x) lda.z x sta.z print_word.w lda.z x+1 sta.z print_word.w+1 jsr print_word + // print_str(" sin: ") lda #str6 sta.z print_str.str+1 jsr print_str + // print_sbyte(sinx) lda.z sinx sta.z print_sbyte.b jsr print_sbyte + // print_str(" scaled: ") lda #str7 sta.z print_str.str+1 jsr print_str + // print_sword(sinx_sc) lda.z sinx_sc sta.z print_sword.w lda.z sinx_sc+1 sta.z print_sword.w+1 jsr print_sword + // print_str(" trans: ") lda #str8 sta.z print_str.str+1 jsr print_str + // print_byte(sinx_tr) stx.z print_byte.b jsr print_byte + // print_ln() jsr print_ln + // x = x + step lda.z x clc adc.z step @@ -173,6 +210,7 @@ sin8u_table: { lda.z x+1 adc.z step+1 sta.z x+1 + // for( word i=0; i>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a zero-terminated string @@ -252,15 +301,19 @@ print_char: { print_str: { .label str = 4 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -275,16 +328,22 @@ print_str: { // print_sword(signed word zp(4) w) print_sword: { .label w = 4 + // if(w<0) lda.z w+1 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_word((word)w) jsr print_word + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // w = -w sec lda #0 sbc.z w @@ -298,28 +357,37 @@ print_sword: { // print_word(word zp(4) w) print_word: { .label w = 4 + // print_byte(>w) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(m lda.z m+1 + // >m = (>m)-(byte)b sec sbc #b sta.z m+1 __b1: + // } rts } // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word @@ -352,20 +427,26 @@ mul8u: { .label mb = 6 .label res = 9 .label return = 9 + // mb = b sta.z mb lda #0 sta.z mb+1 sta.z res sta.z res+1 __b1: + // while(a!=0) cpx #0 bne __b2 + // } rts __b2: + // a&1 txa and #1 + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -374,9 +455,11 @@ mul8u: { adc.z mb+1 sta.z res+1 __b3: + // a = a>>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 @@ -395,6 +478,7 @@ sin8s: { .label usinx = $16 // Move x1 into the range 0-PI/2 using sinus mirror symmetries .label isUpper = 8 + // if(x >= PI_u4f12 ) lda.z x+1 cmp #>PI_u4f12 bcc b1 @@ -403,6 +487,7 @@ sin8s: { cmp #= PI_HALF_u4f12 ) lda.z x+1 cmp #>PI_HALF_u4f12 bcc __b2 @@ -425,6 +511,7 @@ sin8s: { cmp #x<<3 lda.z __4+1 sta.z x1 + // mulu8_sel(x1, x1, 0) tax tay lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x1, x1, 0) + // x2 = mulu8_sel(x1, x1, 0) + // mulu8_sel(x2, x1, 1) tax ldy.z x1 lda #1 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x2, x1, 1) + // x3 = mulu8_sel(x2, x1, 1) sta.z x3 + // mulu8_sel(x3, DIV_6, 1) tax lda #1 sta.z mulu8_sel.select ldy #DIV_6 jsr mulu8_sel + // mulu8_sel(x3, DIV_6, 1) + // x3_6 = mulu8_sel(x3, DIV_6, 1) + // usinx = x1 - x3_6 eor #$ff sec adc.z x1 sta.z usinx + // mulu8_sel(x3, x1, 0) ldx.z x3 ldy.z x1 lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x3, x1, 0) + // x4 = mulu8_sel(x3, x1, 0) + // mulu8_sel(x4, x1, 0) tax ldy.z x1 lda #0 sta.z mulu8_sel.select jsr mulu8_sel + // mulu8_sel(x4, x1, 0) + // x5 = mulu8_sel(x4, x1, 0) + // x5_128 = x5>>4 lsr lsr lsr lsr + // usinx = usinx + x5_128 clc adc.z usinx tax + // if(usinx>=128) cpx #$80 bcc __b3 + // usinx--; dex __b3: + // if(isUpper!=0) lda.z isUpper cmp #0 beq __b14 + // sinx = -(signed byte)usinx txa eor #$ff clc adc #1 + // } rts __b14: txa @@ -501,8 +613,11 @@ mulu8_sel: { .label __0 = 9 .label __1 = 9 .label select = $13 + // mul8u(v1, v2) tya jsr mul8u + // mul8u(v1, v2) + // mul8u(v1, v2)<dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp #>main.tabsize bcc __b3 @@ -567,10 +695,12 @@ divr16u: { cmp #main.tabsize sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -601,17 +735,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(signed byte) 0) goto mul8su::@1 -Simple Condition (bool~) sin8s::$1 [100] if((word) sin8s::x#2<(const word) PI_u4f12) goto sin8s::@1 -Simple Condition (bool~) sin8s::$3 [104] if((word) sin8s::x#4<(const word) PI_HALF_u4f12) goto sin8s::@2 -Simple Condition (bool~) sin8s::$15 [161] if((byte) sin8s::usinx#1<(byte) $80) goto sin8s::@3 -Simple Condition (bool~) sin8s::$18 [170] if((byte) sin8s::isUpper#10==(byte) 0) goto sin8s::@4 -Simple Condition (bool~) memset::$1 [198] if((word) memset::num#0<=(byte) 0) goto memset::@1 -Simple Condition (bool~) memset::$4 [208] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 -Simple Condition (bool~) print_str::$0 [221] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [234] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#19) goto print_ln::@1 -Simple Condition (bool~) print_sword::$0 [243] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -Simple Condition (bool~) print_sbyte::$0 [267] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 -Simple Condition (bool~) sin8u_table::$18 [418] if((word) sin8u_table::i#10<(word) sin8u_table::tabsize#0) goto sin8u_table::@2 +Simple Condition (bool~) divr16u::$4 [8] if((byte~) divr16u::$2==(byte) 0) goto divr16u::@2 +Simple Condition (bool~) divr16u::$9 [13] if((word) divr16u::rem#5<(word) divr16u::divisor#0) goto divr16u::@3 +Simple Condition (bool~) divr16u::$11 [18] if((byte) divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 +Simple Condition (bool~) mul8u::$0 [35] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [38] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) mul8su::$4 [50] if((signed byte) mul8su::a#0>=(signed byte) 0) goto mul8su::@1 +Simple Condition (bool~) sin8s::$1 [60] if((word) sin8s::x#2<(const word) PI_u4f12) goto sin8s::@1 +Simple Condition (bool~) sin8s::$3 [63] if((word) sin8s::x#4<(const word) PI_HALF_u4f12) goto sin8s::@2 +Simple Condition (bool~) sin8s::$15 [103] if((byte) sin8s::usinx#1<(byte) $80) goto sin8s::@3 +Simple Condition (bool~) sin8s::$18 [108] if((byte) sin8s::isUpper#10==(byte) 0) goto sin8s::@4 +Simple Condition (bool~) memset::$1 [125] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [132] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [140] if((byte) 0!=*((byte*) print_str::str#10)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [149] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#19) goto print_ln::@1 +Simple Condition (bool~) print_sword::$0 [153] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) print_sbyte::$0 [168] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1 +Simple Condition (bool~) sin8u_table::$18 [268] if((word) sin8u_table::i#10<(word) sin8u_table::tabsize#0) goto sin8u_table::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) divr16u::quotient#0 = 0 Constant (const byte) divr16u::i#0 = 0 @@ -2547,10 +2547,10 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [198] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [125] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [23] divr16u::i#1 ← ++ divr16u::i#2 to ++ -Resolved ranged comparison value [25] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 +Resolved ranged next value [16] divr16u::i#1 ← ++ divr16u::i#2 to ++ +Resolved ranged comparison value [18] if(divr16u::i#1!=rangelast(0,$f)) goto divr16u::@1 to (number) $10 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $10 in if((byte) divr16u::i#1!=(number) $10) goto divr16u::@1 diff --git a/src/test/ref/sizeof-arrays.asm b/src/test/ref/sizeof-arrays.asm index 4c5d48e5a..c255a751d 100644 --- a/src/test/ref/sizeof-arrays.asm +++ b/src/test/ref/sizeof-arrays.asm @@ -7,17 +7,24 @@ .const SIZEOF_WORD = 2 main: { .const sz = 7 + // SCREEN[idx++] = '0'+sizeof(ba)/sizeof(byte) lda #'0'+3*SIZEOF_BYTE/SIZEOF_BYTE sta SCREEN + // SCREEN[idx++] = '0'+sizeof(wa)/sizeof(word) lda #'0'+3*SIZEOF_WORD/SIZEOF_WORD sta SCREEN+1 + // SCREEN[idx++] = '0'+sizeof(bb)/sizeof(byte) lda #'0'+(sz+2)*SIZEOF_BYTE/SIZEOF_BYTE sta SCREEN+2 + // SCREEN[idx++] = '0'+sizeof(wb)/sizeof(word) lda #'0'+4*SIZEOF_WORD/SIZEOF_WORD sta SCREEN+3 + // SCREEN[idx++] = '0'+sizeof(sa)/sizeof(byte) lda #'0'+8*SIZEOF_BYTE/SIZEOF_BYTE sta SCREEN+4 + // SCREEN[idx++] = '0'+sizeof(sb)/sizeof(byte) lda #'0'+4*SIZEOF_BYTE/SIZEOF_BYTE sta SCREEN+5 + // } rts } diff --git a/src/test/ref/sizeof-expr.asm b/src/test/ref/sizeof-expr.asm index e6ef2fff0..6e4052106 100644 --- a/src/test/ref/sizeof-expr.asm +++ b/src/test/ref/sizeof-expr.asm @@ -8,18 +8,27 @@ .const SIZEOF_WORD = 2 .const SIZEOF_POINTER = 2 main: { + // SCREEN[idx++] = '0'+sizeof(0) lda #'0'+SIZEOF_NUMBER sta SCREEN + // SCREEN[idx++] = '0'+sizeof(idx) lda #'0'+SIZEOF_BYTE sta SCREEN+1 + // SCREEN[idx++] = '0'+sizeof(b) sta SCREEN+2 + // SCREEN[idx++] = '0'+sizeof(b*2) lda #'0'+SIZEOF_NUMBER sta SCREEN+3 + // SCREEN[idx++] = '0'+sizeof($43ff) sta SCREEN+5 + // SCREEN[idx++] = '0'+sizeof(w) lda #'0'+SIZEOF_WORD sta SCREEN+6 + // SCREEN[idx++] = '0'+sizeof(bp) lda #'0'+SIZEOF_POINTER sta SCREEN+8 + // SCREEN[idx++] = '0'+sizeof(wp) sta SCREEN+9 + // } rts } diff --git a/src/test/ref/sizeof-struct.asm b/src/test/ref/sizeof-struct.asm index 099e54e55..5d32dbfad 100644 --- a/src/test/ref/sizeof-struct.asm +++ b/src/test/ref/sizeof-struct.asm @@ -9,22 +9,31 @@ main: { // Struct Arrays .const NUM_POINTS = 4 .const NUM_CIRCLES = NUM_POINTS-1 + // SCREEN[idx++] = '0'+sizeof(struct Point) // Struct Types lda #'0'+SIZEOF_STRUCT_POINT sta SCREEN + // SCREEN[idx++] = '0'+sizeof(struct Circle) lda #'0'+SIZEOF_STRUCT_CIRCLE sta SCREEN+1 + // SCREEN[idx++] = '0'+sizeof(p) lda #'0'+SIZEOF_STRUCT_POINT sta SCREEN+3 + // SCREEN[idx++] = '0'+sizeof(c) lda #'0'+SIZEOF_STRUCT_CIRCLE sta SCREEN+4 + // SCREEN[idx++] = '0'+sizeof(points) lda #'0'+NUM_POINTS*SIZEOF_STRUCT_POINT sta SCREEN+6 + // SCREEN[idx++] = '0'+sizeof(points)/sizeof(struct Point) lda #'0'+NUM_POINTS*SIZEOF_STRUCT_POINT/SIZEOF_STRUCT_POINT sta SCREEN+7 + // SCREEN[idx++] = '0'+sizeof(circles) lda #'0'+NUM_CIRCLES*SIZEOF_STRUCT_CIRCLE sta SCREEN+8 + // SCREEN[idx++] = '0'+sizeof(circles)/sizeof(struct Circle) lda #'0'+NUM_CIRCLES*SIZEOF_STRUCT_CIRCLE/SIZEOF_STRUCT_CIRCLE sta SCREEN+9 + // } rts } diff --git a/src/test/ref/sizeof-types.asm b/src/test/ref/sizeof-types.asm index 453026e5b..715e14293 100644 --- a/src/test/ref/sizeof-types.asm +++ b/src/test/ref/sizeof-types.asm @@ -12,43 +12,65 @@ .const SIZEOF_DWORD = 4 .const SIZEOF_SIGNED_DWORD = 4 main: { + // SCREEN[idx++] = '0'+sizeof(void) lda #'0' sta SCREEN + // SCREEN[idx++] = '0'+sizeof(byte) lda #'0'+SIZEOF_BYTE sta SCREEN+2 + // SCREEN[idx++] = '0'+sizeof(signed byte) lda #'0'+SIZEOF_SIGNED_BYTE sta SCREEN+3 + // SCREEN[idx++] = '0'+sizeof(unsigned char) lda #'0'+SIZEOF_BYTE sta SCREEN+4 + // SCREEN[idx++] = '0'+sizeof(signed char) lda #'0'+SIZEOF_SIGNED_BYTE sta SCREEN+5 + // SCREEN[idx++] = '0'+sizeof(bool) lda #'0'+SIZEOF_BOOL sta SCREEN+6 + // SCREEN[idx++] = '0'+sizeof(word) lda #'0'+SIZEOF_WORD sta SCREEN+8 + // SCREEN[idx++] = '0'+sizeof(signed word) lda #'0'+SIZEOF_SIGNED_WORD sta SCREEN+9 + // SCREEN[idx++] = '0'+sizeof(unsigned int) lda #'0'+SIZEOF_WORD sta SCREEN+$a + // SCREEN[idx++] = '0'+sizeof(signed int) lda #'0'+SIZEOF_SIGNED_WORD sta SCREEN+$b + // SCREEN[idx++] = '0'+sizeof(unsigned short) lda #'0'+SIZEOF_WORD sta SCREEN+$c + // SCREEN[idx++] = '0'+sizeof(signed short) lda #'0'+SIZEOF_SIGNED_WORD sta SCREEN+$d + // SCREEN[idx++] = '0'+sizeof(byte*) lda #'0'+SIZEOF_POINTER sta SCREEN+$f + // SCREEN[idx++] = '0'+sizeof(word*) sta SCREEN+$10 + // SCREEN[idx++] = '0'+sizeof(int**) sta SCREEN+$11 + // SCREEN[idx++] = '0'+sizeof(int***) sta SCREEN+$12 + // SCREEN[idx++] = '0'+sizeof(byte[]) sta SCREEN+$13 + // SCREEN[idx++] = '0'+sizeof(dword) lda #'0'+SIZEOF_DWORD sta SCREEN+$15 + // SCREEN[idx++] = '0'+sizeof(signed dword) lda #'0'+SIZEOF_SIGNED_DWORD sta SCREEN+$16 + // SCREEN[idx++] = '0'+sizeof(unsigned long) lda #'0'+SIZEOF_DWORD sta SCREEN+$17 + // SCREEN[idx++] = '0'+sizeof(signed long) lda #'0'+SIZEOF_SIGNED_DWORD sta SCREEN+$18 + // } rts } diff --git a/src/test/ref/sqr-delta.asm b/src/test/ref/sqr-delta.asm index a755a2218..ff281d254 100644 --- a/src/test/ref/sqr-delta.asm +++ b/src/test/ref/sqr-delta.asm @@ -4,7 +4,10 @@ .label SCREEN = $400 main: { .label __0 = 6 + // ifunc(8) jsr ifunc + // ifunc(8) + // SCREEN[0] = ifunc(8) lda.z __0 sta SCREEN lda.z __0+1 @@ -13,6 +16,7 @@ main: { sta SCREEN+2 lda.z __0+3 sta SCREEN+3 + // } rts } ifunc: { @@ -46,6 +50,7 @@ ifunc: { lda #>1>>$10 sta.z xsqr+3 __b1: + // while(xsqr <=a) lda.z xsqr+3 cmp #>a+1>>$10 bcc __b2 @@ -62,6 +67,7 @@ ifunc: { cmp #5) cmp #0 beq __b3 cpy #5+1 bcc __b2 __b3: + // c++; inx __b2: + // SCREEN[i] = c txa sta SCREEN,y + // for(byte i: 0..10) iny cpy #$b bne __b1 + // } rts } diff --git a/src/test/ref/statement-sequence-1.log b/src/test/ref/statement-sequence-1.log index 95300bb0a..b8f358f57 100644 --- a/src/test/ref/statement-sequence-1.log +++ b/src/test/ref/statement-sequence-1.log @@ -97,15 +97,15 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$6 [14] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$6 [13] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [8] (bool~) main::$5 ← ! (bool~) main::$4 -Rewriting || if()-condition to two if()s [7] (bool~) main::$4 ← (bool~) main::$2 || (bool~) main::$3 +Rewriting ! if()-condition to reversed if() [7] (bool~) main::$5 ← ! (bool~) main::$4 +Rewriting || if()-condition to two if()s [6] (bool~) main::$4 ← (bool~) main::$2 || (bool~) main::$3 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [12] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [14] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/static-register-optimization-problem.asm b/src/test/ref/static-register-optimization-problem.asm index e56246e41..6b5c2cb07 100644 --- a/src/test/ref/static-register-optimization-problem.asm +++ b/src/test/ref/static-register-optimization-problem.asm @@ -15,6 +15,7 @@ main: { sta.z i sta.z i+1 __b1: + // for(int i=0;i<10;i++) lda.z i+1 bmi __b2 cmp #>$a @@ -24,10 +25,13 @@ main: { cmp #<$a bcc __b2 !: + // } rts __b2: + // $400 sta.z screen+1 jsr print + // print(rex2) jsr print + // print("rex") jsr print + // } rts rex1: .text "rex" .byte 0 @@ -23,15 +27,19 @@ print: { lda #>main.rex1 sta.z string+1 __b1: + // while(*string) ldy #0 lda (string),y cmp #0 bne __b2 + // } rts __b2: + // *screen++ = *string++ ldy #0 lda (string),y sta (screen),y + // *screen++ = *string++; inc.z screen bne !+ inc.z screen+1 diff --git a/src/test/ref/string-const-consolidation-noroot.log b/src/test/ref/string-const-consolidation-noroot.log index acc79b4d8..aa9f161b6 100644 --- a/src/test/ref/string-const-consolidation-noroot.log +++ b/src/test/ref/string-const-consolidation-noroot.log @@ -139,7 +139,7 @@ Identical Phi Values (byte*) screen#2 (byte*) screen#12 Identical Phi Values (byte*) screen#10 (byte*) screen#12 Identical Phi Values (byte*) screen#14 (byte*) screen#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print::$0 [20] if((byte) 0!=*((byte*) print::string#4)) goto print::@2 +Simple Condition (bool~) print::$0 [15] if((byte) 0!=*((byte*) print::string#4)) goto print::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) screen#0 = (byte*) 1024 Constant (const byte*) print::string#0 = main::rex1 diff --git a/src/test/ref/string-const-consolidation.asm b/src/test/ref/string-const-consolidation.asm index 759f3d2bf..630c37367 100644 --- a/src/test/ref/string-const-consolidation.asm +++ b/src/test/ref/string-const-consolidation.asm @@ -4,13 +4,17 @@ .pc = $80d "Program" .label screen = 2 main: { + // print(rex1) lda #<$400 sta.z screen lda #>$400 sta.z screen+1 jsr print + // print(rex2) jsr print + // print("rex") jsr print + // } rts } // print(byte* zp(4) string) @@ -21,15 +25,19 @@ print: { lda #>rex1 sta.z string+1 __b1: + // while(*string) ldy #0 lda (string),y cmp #0 bne __b2 + // } rts __b2: + // *screen++ = *string++ ldy #0 lda (string),y sta (screen),y + // *screen++ = *string++; inc.z screen bne !+ inc.z screen+1 diff --git a/src/test/ref/string-const-consolidation.log b/src/test/ref/string-const-consolidation.log index 55f48b984..aa1cc52cd 100644 --- a/src/test/ref/string-const-consolidation.log +++ b/src/test/ref/string-const-consolidation.log @@ -139,7 +139,7 @@ Identical Phi Values (byte*) screen#2 (byte*) screen#12 Identical Phi Values (byte*) screen#10 (byte*) screen#12 Identical Phi Values (byte*) screen#14 (byte*) screen#10 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print::$0 [20] if((byte) 0!=*((byte*) print::string#4)) goto print::@2 +Simple Condition (bool~) print::$0 [15] if((byte) 0!=*((byte*) print::string#4)) goto print::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) screen#0 = (byte*) 1024 Constant (const byte*) print::string#0 = rex1 diff --git a/src/test/ref/string-encoding-literals.asm b/src/test/ref/string-encoding-literals.asm index 2a3afc3b8..9688995bd 100644 --- a/src/test/ref/string-encoding-literals.asm +++ b/src/test/ref/string-encoding-literals.asm @@ -6,23 +6,32 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // (SCREEN+40*0)[i] = petscii_mixed[i] lda petscii_mixed,x sta SCREEN,x + // (SCREEN+40*1)[i] = petscii_upper[i] lda petscii_upper,x sta SCREEN+$28*1,x + // (SCREEN+40*2)[i] = petscii_standard[i] lda petscii_standard,x sta SCREEN+$28*2,x + // (SCREEN+40*3)[i] = screencode_mixed[i] lda screencode_mixed,x sta SCREEN+$28*3,x + // (SCREEN+40*4)[i] = screencode_upper[i] lda screencode_upper,x sta SCREEN+$28*4,x + // (SCREEN+40*5)[i] = screencode_standard[i] lda screencode_standard,x sta SCREEN+$28*5,x + // (SCREEN+40*6)[i] = standard[i] lda standard,x sta SCREEN+$28*6,x + // for( byte i: 0..5 ) inx cpx #6 bne __b1 + // } rts } .encoding "petscii_mixed" diff --git a/src/test/ref/string-encoding-pragma.asm b/src/test/ref/string-encoding-pragma.asm index 87726f958..4ff5f5a6f 100644 --- a/src/test/ref/string-encoding-pragma.asm +++ b/src/test/ref/string-encoding-pragma.asm @@ -6,21 +6,29 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // (SCREEN+40*2)[i] = screencode_mixed1[i] lda screencode_mixed1,x sta SCREEN+$28*2,x + // (SCREEN+40*0)[i] = petscii_mixed1[i] lda petscii_mixed1,x sta SCREEN,x + // (SCREEN+40*1)[i] = petscii_mixed2[i] lda petscii_mixed2,x sta SCREEN+$28*1,x + // (SCREEN+40*2)[i] = screencode_mixed2[i] lda screencode_mixed2,x sta SCREEN+$28*2,x + // (SCREEN+40*4)[i] = screencode_upper[i] lda screencode_upper,x sta SCREEN+$28*4,x + // (SCREEN+40*3)[i] = screencode_mixed3[i] lda screencode_mixed3,x sta SCREEN+$28*3,x + // for( char i: 0..5 ) inx cpx #6 bne __b1 + // } rts } // Default encoding (screencode_mixed) diff --git a/src/test/ref/string-escapes-0.asm b/src/test/ref/string-escapes-0.asm index 4dfe44754..9ec8499f0 100644 --- a/src/test/ref/string-escapes-0.asm +++ b/src/test/ref/string-escapes-0.asm @@ -6,13 +6,17 @@ main: { ldx #0 __b1: + // while(MESSAGE[i]) lda MESSAGE,x cmp #0 bne __b2 + // } rts __b2: + // SCREEN[i] = MESSAGE[i++] lda MESSAGE,x sta SCREEN,x + // SCREEN[i] = MESSAGE[i++]; inx jmp __b1 } diff --git a/src/test/ref/string-escapes-1.asm b/src/test/ref/string-escapes-1.asm index df7926fda..a17e1983e 100644 --- a/src/test/ref/string-escapes-1.asm +++ b/src/test/ref/string-escapes-1.asm @@ -19,29 +19,39 @@ main: { lda #>MESSAGE sta.z msg+1 __b1: + // while(*msg) ldy #0 lda (msg),y cmp #0 bne __b2 + // } rts __b2: + // case '\n': + // line += 0x28; + // cursor = line; + // break; lda #'\n' ldy #0 cmp (msg),y beq __b3 + // *cursor++ = *msg lda (msg),y sta (cursor),y + // *cursor++ = *msg; inc.z cursor bne !+ inc.z cursor+1 !: __b5: + // msg++; inc.z msg bne !+ inc.z msg+1 !: jmp __b1 __b3: + // line += 0x28 lda #$28 clc adc.z line diff --git a/src/test/ref/string-escapes-1.log b/src/test/ref/string-escapes-1.log index c873169d5..99ccd11b7 100644 --- a/src/test/ref/string-escapes-1.log +++ b/src/test/ref/string-escapes-1.log @@ -119,7 +119,7 @@ Alias (byte*) main::cursor#1 = (byte*) main::line#1 Successful SSA optimization Pass2AliasElimination Alias (byte*) main::msg#2 = (byte*) main::msg#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 [5] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 +Simple Condition (bool~) main::$0 [4] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::cursor#0 = (byte*) 1024 Constant (const byte*) main::msg#0 = MESSAGE diff --git a/src/test/ref/string-escapes-2.asm b/src/test/ref/string-escapes-2.asm index ba88b7181..488c1b70f 100644 --- a/src/test/ref/string-escapes-2.asm +++ b/src/test/ref/string-escapes-2.asm @@ -8,22 +8,29 @@ main: { lda #0 sta.z i __b1: + // while(MESSAGE[i]) lda #0 ldy.z i cmp MESSAGE,y bne __b2 + // } rts __b2: + // chrout(MESSAGE[i++]) ldy.z i lda MESSAGE,y jsr chrout + // chrout(MESSAGE[i++]); inc.z i jmp __b1 } // chrout(byte register(A) c) chrout: { + // *memA = c sta memA + // asm jsr $ffd2 + // } rts } .encoding "petscii_mixed" diff --git a/src/test/ref/string-escapes-3.asm b/src/test/ref/string-escapes-3.asm index db8e90eb2..775588bc1 100644 --- a/src/test/ref/string-escapes-3.asm +++ b/src/test/ref/string-escapes-3.asm @@ -20,31 +20,42 @@ main: { lda #>MESSAGE sta.z msg+1 __b1: + // while(*msg) ldy #0 lda (msg),y cmp #0 bne __b2 + // } rts __b2: + // case '\n': + // line += 0x28; + // cursor = line; + // break; .encoding "petscii_mixed" lda #'\n' ldy #0 cmp (msg),y beq __b3 + // *msg & 0x3f lda #$3f and (msg),y + // *cursor++ = *msg & 0x3f sta (cursor),y + // *cursor++ = *msg & 0x3f; inc.z cursor bne !+ inc.z cursor+1 !: __b5: + // msg++; inc.z msg bne !+ inc.z msg+1 !: jmp __b1 __b3: + // line += 0x28 lda #$28 clc adc.z line diff --git a/src/test/ref/string-escapes-3.log b/src/test/ref/string-escapes-3.log index 966970f4e..0d8df6068 100644 --- a/src/test/ref/string-escapes-3.log +++ b/src/test/ref/string-escapes-3.log @@ -126,7 +126,7 @@ Alias (byte*) main::cursor#1 = (byte*) main::line#1 Successful SSA optimization Pass2AliasElimination Alias (byte*) main::msg#2 = (byte*) main::msg#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [5] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 +Simple Condition (bool~) main::$1 [4] if((byte) 0!=*((byte*) main::msg#2)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::cursor#0 = (byte*) 1024 Constant (const byte*) main::msg#0 = MESSAGE diff --git a/src/test/ref/string-pointer-problem.asm b/src/test/ref/string-pointer-problem.asm index e82562d59..222037c96 100644 --- a/src/test/ref/string-pointer-problem.asm +++ b/src/test/ref/string-pointer-problem.asm @@ -5,7 +5,9 @@ .pc = $80d "Program" .label process_name = $400 main: { + // set_process_name("keyboard") jsr set_process_name + // } rts name: .text "keyboard" .byte 0 @@ -18,6 +20,7 @@ set_process_name: { sta.z j sta.z j+1 __b1: + // for(signed int j = 0; j < 17; j++) lda.z j+1 bmi __b2 cmp #>$11 @@ -27,8 +30,10 @@ set_process_name: { cmp #<$11 bcc __b2 !: + // } rts __b2: + // process_name[j]=name[j] lda #msg1 sta.z strip.dest+1 jsr strip + // print(msg1) lda #<$400 sta.z screen lda #>$400 @@ -19,26 +21,31 @@ main: { lda #>msg1 sta.z print.msg+1 jsr print + // strip(msg2, 'y') ldx #'y' lda #msg2 sta.z strip.dest+1 jsr strip + // print(msg2) lda #msg2 sta.z print.msg+1 jsr print + // } rts } // print(byte* zp(4) msg) print: { .label msg = 4 __b1: + // *screen++ = *msg++ ldy #0 lda (msg),y sta (screen),y + // *screen++ = *msg++; inc.z screen bne !+ inc.z screen+1 @@ -47,10 +54,12 @@ print: { bne !+ inc.z msg+1 !: + // while(*msg!=0) ldy #0 lda (msg),y cmp #0 bne __b1 + // } rts } // strip(byte* zp(8) p, byte register(X) c) @@ -63,17 +72,21 @@ strip: { lda.z dest+1 sta.z p_1+1 __b1: + // if(*p!=c) txa ldy #0 cmp (p_1),y beq __b2 + // *dest++=*p lda (p_1),y sta (dest),y + // *dest++=*p; inc.z dest bne !+ inc.z dest+1 !: __b2: + // while(*p++!=0) lda.z p_1 clc adc #1 @@ -85,6 +98,7 @@ strip: { lda (p_1),y cmp #0 bne __b4 + // } rts __b4: lda.z p diff --git a/src/test/ref/strip.log b/src/test/ref/strip.log index 2e2200887..c17805e8d 100644 --- a/src/test/ref/strip.log +++ b/src/test/ref/strip.log @@ -210,9 +210,9 @@ Identical Phi Values (byte*) screen#1 (byte*) screen#11 Identical Phi Values (byte) strip::c#2 (byte) strip::c#3 Identical Phi Values (byte*) screen#12 (byte*) screen#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) strip::$1 [25] if(*((byte*) strip::p#4)==(byte) strip::c#3) goto strip::@2 -Simple Condition (bool~) strip::$2 [29] if(*((byte*) strip::p#4)!=(byte) 0) goto strip::@1 -Simple Condition (bool~) print::$0 [41] if(*((byte*) print::msg#2)!=(byte) 0) goto print::@1 +Simple Condition (bool~) strip::$1 [17] if(*((byte*) strip::p#4)==(byte) strip::c#3) goto strip::@2 +Simple Condition (bool~) strip::$2 [21] if(*((byte*) strip::p#4)!=(byte) 0) goto strip::@1 +Simple Condition (bool~) print::$0 [32] if(*((byte*) print::msg#2)!=(byte) 0) goto print::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) strip::p#0 = msg1 Constant (const byte) strip::c#0 = ' ' diff --git a/src/test/ref/struct-0.asm b/src/test/ref/struct-0.asm index 06fe9fab7..1b92cc3a6 100644 --- a/src/test/ref/struct-0.asm +++ b/src/test/ref/struct-0.asm @@ -6,14 +6,19 @@ .const SIZEOF_STRUCT_POINT = 2 main: { .label SCREEN = $400 + // point.x = 2 lda #2 sta point + // point.y = 3 lda #3 sta point+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = point.x lda point sta SCREEN + // SCREEN[1] = point.y lda point+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } point: .fill SIZEOF_STRUCT_POINT, 0 diff --git a/src/test/ref/struct-1.asm b/src/test/ref/struct-1.asm index 0c72a4439..9e2010f16 100644 --- a/src/test/ref/struct-1.asm +++ b/src/test/ref/struct-1.asm @@ -6,17 +6,24 @@ .const SIZEOF_STRUCT_POINT = 2 main: { .label SCREEN = $400 + // point1.x = 2 lda #2 sta point1 + // point1.y = 3 lda #3 sta point1+OFFSET_STRUCT_POINT_Y + // point2.x = point1.y sta point2 + // point2.y = point1.x lda point1 sta point2+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = point2.x lda point2 sta SCREEN + // SCREEN[1] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } point1: .fill SIZEOF_STRUCT_POINT, 0 diff --git a/src/test/ref/struct-10.asm b/src/test/ref/struct-10.asm index 651da41bf..d8c92605b 100644 --- a/src/test/ref/struct-10.asm +++ b/src/test/ref/struct-10.asm @@ -5,14 +5,17 @@ .const SIZEOF_WORD = 2 main: { .label SCREEN = $400 + // SCREEN[0] = info.values[1] lda RADIX_DECIMAL_VALUES+1*SIZEOF_WORD sta SCREEN lda RADIX_DECIMAL_VALUES+1*SIZEOF_WORD+1 sta SCREEN+1 + // SCREEN[1] = RADIX_DECIMAL_VALUES[1] lda RADIX_DECIMAL_VALUES+1*SIZEOF_WORD sta SCREEN+1*SIZEOF_WORD lda RADIX_DECIMAL_VALUES+1*SIZEOF_WORD+1 sta SCREEN+1*SIZEOF_WORD+1 + // } rts } RADIX_DECIMAL_VALUES: .word $2710, $3e8, $64, $a diff --git a/src/test/ref/struct-11.asm b/src/test/ref/struct-11.asm index 4ea021e14..8d41e85b3 100644 --- a/src/test/ref/struct-11.asm +++ b/src/test/ref/struct-11.asm @@ -5,6 +5,7 @@ .label SCREEN = $400 .const OFFSET_STRUCT_PERSON_NAME = 1 main: { + // print_person(jesper) ldx jesper lda #henriette+OFFSET_STRUCT_PERSON_NAME sta.z print_person.person_name+1 jsr print_person + // } rts } // print_person(byte register(X) person_id, byte* zp(2) person_name) print_person: { .label person_name = 2 + // SCREEN[idx++] = DIGIT[person.id] lda DIGIT,x sta SCREEN,y + // SCREEN[idx++] = DIGIT[person.id]; tya tax inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx ldy #0 __b1: + // for(byte i=0; person.name[i]; i++) lda (person_name),y cmp #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; txa tay iny + // } rts __b2: + // SCREEN[idx++] = person.name[i] lda (person_name),y sta SCREEN,x + // SCREEN[idx++] = person.name[i]; inx + // for(byte i=0; person.name[i]; i++) iny jmp __b1 } diff --git a/src/test/ref/struct-11.log b/src/test/ref/struct-11.log index 37a140eb2..94863bbc0 100644 --- a/src/test/ref/struct-11.log +++ b/src/test/ref/struct-11.log @@ -179,7 +179,7 @@ Identical Phi Values (byte) idx#1 (byte) idx#16 Identical Phi Values (byte*) print_person::person_name#2 (byte*) print_person::person_name#4 Identical Phi Values (byte) idx#17 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_person::$0 [23] if((byte) 0!=*((byte*) print_person::person_name#4 + (byte) print_person::i#2)) goto print_person::@2 +Simple Condition (bool~) print_person::$0 [19] if((byte) 0!=*((byte*) print_person::person_name#4 + (byte) print_person::i#2)) goto print_person::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_person::person_name#0 = (byte*)&jesper+OFFSET_STRUCT_PERSON_NAME Constant (const byte*) print_person::person_name#1 = (byte*)&henriette+OFFSET_STRUCT_PERSON_NAME @@ -187,7 +187,7 @@ Constant (const byte) idx#20 = 0 Constant (const byte) print_person::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification Simplifying expression containing zero (byte*)&jesper in [1] (byte) print_person::person_id#0 ← *((byte*)&(struct Person) jesper+(const byte) OFFSET_STRUCT_PERSON_ID) -Simplifying expression containing zero (byte*)&henriette in [6] (byte) print_person::person_id#1 ← *((byte*)&(struct Person) henriette+(const byte) OFFSET_STRUCT_PERSON_ID) +Simplifying expression containing zero (byte*)&henriette in [5] (byte) print_person::person_id#1 ← *((byte*)&(struct Person) henriette+(const byte) OFFSET_STRUCT_PERSON_ID) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) OFFSET_STRUCT_PERSON_ID Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/struct-11b.asm b/src/test/ref/struct-11b.asm index 9d832e80b..b888c1bfc 100644 --- a/src/test/ref/struct-11b.asm +++ b/src/test/ref/struct-11b.asm @@ -4,17 +4,20 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // print_person(jesper_id, jesper_initials) ldx #0 lda #jesper_initials sta.z print_person.person_initials+1 jsr print_person + // print_person(henry_id, henry_initials) lda #henry_initials sta.z print_person.person_initials+1 jsr print_person + // } rts } // print_person(byte* zp(2) person_initials) @@ -22,17 +25,24 @@ print_person: { .label person_initials = 2 ldy #0 __b1: + // for(byte i=0; person_initials[i]; i++) lda (person_initials),y cmp #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // } rts __b2: + // SCREEN[idx++] = person_initials[i] lda (person_initials),y sta SCREEN,x + // SCREEN[idx++] = person_initials[i]; inx + // for(byte i=0; person_initials[i]; i++) iny jmp __b1 } diff --git a/src/test/ref/struct-11b.log b/src/test/ref/struct-11b.log index 4e2747394..64f8e6516 100644 --- a/src/test/ref/struct-11b.log +++ b/src/test/ref/struct-11b.log @@ -155,7 +155,7 @@ Identical Phi Values (byte) idx#1 (byte) idx#13 Identical Phi Values (byte*) print_person::person_initials#2 (byte*) print_person::person_initials#4 Identical Phi Values (byte) idx#14 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_person::$0 [19] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 +Simple Condition (bool~) print_person::$0 [15] if((byte) 0!=*((byte*) print_person::person_initials#4 + (byte) print_person::i#2)) goto print_person::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const dword) print_person::person_id#0 = jesper_id Constant (const byte*) print_person::person_initials#0 = jesper_initials diff --git a/src/test/ref/struct-12.asm b/src/test/ref/struct-12.asm index 4dd0b2d85..022a71180 100644 --- a/src/test/ref/struct-12.asm +++ b/src/test/ref/struct-12.asm @@ -8,12 +8,14 @@ main: { .const jesper_id = 4 .const henriette_id = 7 + // jesper = { 4, "jesper" } ldy #$40 !: lda __0-1,y sta jesper_name-1,y dey bne !- + // print_person(jesper) lda #jesper_name @@ -22,18 +24,21 @@ main: { sta.z idx ldx #jesper_id jsr print_person + // henriette = { 7, "henriette" } ldy #$40 !: lda __1-1,y sta henriette_name-1,y dey bne !- + // print_person(henriette) lda #henriette_name sta.z print_person.person_name+1 ldx #henriette_id jsr print_person + // } rts jesper_name: .fill $40, 0 henriette_name: .fill $40, 0 @@ -41,28 +46,39 @@ main: { // print_person(byte register(X) person_id, byte* zp(3) person_name) print_person: { .label person_name = 3 + // SCREEN[idx++] = DIGIT[person.id] lda DIGIT,x ldy.z idx sta SCREEN,y + // SCREEN[idx++] = DIGIT[person.id]; ldx.z idx inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx ldy #0 __b1: + // for(byte i=0; person.name[i]; i++) lda (person_name),y cmp #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx stx.z idx + // } rts __b2: + // SCREEN[idx++] = person.name[i] lda (person_name),y sta SCREEN,x + // SCREEN[idx++] = person.name[i]; inx + // for(byte i=0; person.name[i]; i++) iny jmp __b1 } diff --git a/src/test/ref/struct-12.log b/src/test/ref/struct-12.log index 21037b714..13f22cd8b 100644 --- a/src/test/ref/struct-12.log +++ b/src/test/ref/struct-12.log @@ -197,7 +197,7 @@ Identical Phi Values (byte) idx#1 (byte) idx#16 Identical Phi Values (byte*) print_person::person_name#2 (byte*) print_person::person_name#4 Identical Phi Values (byte) idx#17 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_person::$0 [25] if((byte) 0!=*((byte*) print_person::person_name#4 + (byte) print_person::i#2)) goto print_person::@2 +Simple Condition (bool~) print_person::$0 [21] if((byte) 0!=*((byte*) print_person::person_name#4 + (byte) print_person::i#2)) goto print_person::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) print_person::person_id#0 = main::jesper_id Constant (const byte*) print_person::person_name#0 = main::jesper_name diff --git a/src/test/ref/struct-13.asm b/src/test/ref/struct-13.asm index fe47c3352..9a76d5f6c 100644 --- a/src/test/ref/struct-13.asm +++ b/src/test/ref/struct-13.asm @@ -6,14 +6,19 @@ .const OFFSET_STRUCT_POINT_Y = 1 .const SIZEOF_STRUCT_POINT = 2 main: { + // point.x = 2 lda #2 sta point + // point.y = 3 lda #3 sta point+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = point.x lda point sta SCREEN + // SCREEN[1] = point.y lda point+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } point: .fill SIZEOF_STRUCT_POINT, 0 diff --git a/src/test/ref/struct-14.asm b/src/test/ref/struct-14.asm index e1adbb497..2c8be5469 100644 --- a/src/test/ref/struct-14.asm +++ b/src/test/ref/struct-14.asm @@ -5,14 +5,19 @@ .label SCREEN = $400 .const OFFSET_STRUCT_POINT_Y = 1 main: { + // points[0].x = 2 lda #2 sta points + // points[0].y = 3 lda #3 sta points+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = points[0].x lda points sta SCREEN + // SCREEN[1] = points[0].y lda points+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } points: .fill 2*1, 0 diff --git a/src/test/ref/struct-15.asm b/src/test/ref/struct-15.asm index 629c28b4a..bc2eaca7c 100644 --- a/src/test/ref/struct-15.asm +++ b/src/test/ref/struct-15.asm @@ -8,25 +8,32 @@ main: { .label point1 = 2 .label point2 = 4 + // point1 ldy #SIZEOF_STRUCT_POINT lda #0 !: dey sta point1,y bne !- + // point1.x = 2 lda #2 sta.z point1 + // point1.y = 3 lda #3 sta point1+OFFSET_STRUCT_POINT_Y + // point2 = point1 ldy #SIZEOF_STRUCT_POINT !: lda point1-1,y sta point2-1,y dey bne !- + // SCREEN[0] = point2.x lda.z point2 sta SCREEN + // SCREEN[1] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-16.asm b/src/test/ref/struct-16.asm index 83135dffa..270a7f26e 100644 --- a/src/test/ref/struct-16.asm +++ b/src/test/ref/struct-16.asm @@ -7,16 +7,20 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label point1 = 2 + // point1 = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta point1-1,y dey bne !- + // SCREEN[0] = point1.x lda.z point1 sta SCREEN + // SCREEN[1] = point1.y lda point1+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-17.asm b/src/test/ref/struct-17.asm index 69a061e8e..53118b6e4 100644 --- a/src/test/ref/struct-17.asm +++ b/src/test/ref/struct-17.asm @@ -8,27 +8,37 @@ .const OFFSET_STRUCT_VECTOR_Q = 2 main: { .label v = 2 + // v ldy #SIZEOF_STRUCT_VECTOR lda #0 !: dey sta v,y bne !- + // v.p.x = 2 lda #2 sta.z v + // v.p.y = 3 lda #3 sta v+OFFSET_STRUCT_POINT_Y + // v.q.x = 4 lda #4 sta v+OFFSET_STRUCT_VECTOR_Q + // v.q.y = 5 lda #5 sta v+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = v.p.x lda.z v sta SCREEN + // SCREEN[1] = v.p.y lda v+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = v.q.x lda v+OFFSET_STRUCT_VECTOR_Q sta SCREEN+2 + // SCREEN[3] = v.q.y lda v+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } diff --git a/src/test/ref/struct-18.asm b/src/test/ref/struct-18.asm index 24fe24d46..7de3bca18 100644 --- a/src/test/ref/struct-18.asm +++ b/src/test/ref/struct-18.asm @@ -8,20 +8,26 @@ .const OFFSET_STRUCT_VECTOR_Q = 2 main: { .label v = 2 + // v = { {2, 3}, {4, 5} } ldy #SIZEOF_STRUCT_VECTOR !: lda __0-1,y sta v-1,y dey bne !- + // SCREEN[0] = v.p.x lda.z v sta SCREEN + // SCREEN[1] = v.p.y lda v+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = v.q.x lda v+OFFSET_STRUCT_VECTOR_Q sta SCREEN+2 + // SCREEN[3] = v.q.y lda v+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } __0: .byte 2, 3, 4, 5 diff --git a/src/test/ref/struct-19.asm b/src/test/ref/struct-19.asm index 8fae9dc33..6242ac48d 100644 --- a/src/test/ref/struct-19.asm +++ b/src/test/ref/struct-19.asm @@ -11,44 +11,54 @@ main: { .label v = 2 .label p1 = 6 .label p2 = 8 + // v ldy #SIZEOF_STRUCT_VECTOR lda #0 !: dey sta v,y bne !- + // p1 = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta p1-1,y dey bne !- + // p2 = { 4, 5 } ldy #SIZEOF_STRUCT_POINT !: lda __1-1,y sta p2-1,y dey bne !- + // v.p = p1 ldy #SIZEOF_STRUCT_POINT !: lda p1-1,y sta v-1,y dey bne !- + // v.q = p2 ldy #SIZEOF_STRUCT_POINT !: lda p2-1,y sta v+OFFSET_STRUCT_VECTOR_Q-1,y dey bne !- + // SCREEN[0] = v.p.x lda.z v sta SCREEN + // SCREEN[1] = v.p.y lda v+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = v.q.x lda v+OFFSET_STRUCT_VECTOR_Q sta SCREEN+2 + // SCREEN[3] = v.q.y lda v+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-2.asm b/src/test/ref/struct-2.asm index 37a528521..eb07e63aa 100644 --- a/src/test/ref/struct-2.asm +++ b/src/test/ref/struct-2.asm @@ -6,26 +6,35 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label SCREEN = $400 + // point1.x = 2 lda #2 sta point1 + // point1.y = 3 lda #3 sta point1+OFFSET_STRUCT_POINT_Y + // point2 = point1 ldy #SIZEOF_STRUCT_POINT !: lda point1-1,y sta point2-1,y dey bne !- + // point2.x = 4 lda #4 sta point2 + // SCREEN[0] = point1.x lda point1 sta SCREEN + // SCREEN[1] = point1.y lda point1+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = point2.x lda point2 sta SCREEN+2 + // SCREEN[3] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } point1: .fill SIZEOF_STRUCT_POINT, 0 diff --git a/src/test/ref/struct-20.asm b/src/test/ref/struct-20.asm index 20258aaaf..0d32aa9ad 100644 --- a/src/test/ref/struct-20.asm +++ b/src/test/ref/struct-20.asm @@ -10,18 +10,21 @@ main: { .label p1 = 2 .label p2 = 4 .label v = 6 + // p1 = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta p1-1,y dey bne !- + // p2 = { 4, 5 } ldy #SIZEOF_STRUCT_POINT !: lda __1-1,y sta p2-1,y dey bne !- + // v = { p1, p2 } ldy #SIZEOF_STRUCT_POINT !: lda p1-1,y @@ -34,14 +37,19 @@ main: { sta v+OFFSET_STRUCT_VECTOR_Q-1,y dey bne !- + // SCREEN[0] = v.p.x lda.z v sta SCREEN + // SCREEN[1] = v.p.y lda v+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = v.q.x lda v+OFFSET_STRUCT_VECTOR_Q sta SCREEN+2 + // SCREEN[3] = v.q.y lda v+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-21.asm b/src/test/ref/struct-21.asm index 85d9a0378..c0a003e3d 100644 --- a/src/test/ref/struct-21.asm +++ b/src/test/ref/struct-21.asm @@ -8,16 +8,20 @@ main: { .label ptr = point1 .label point1 = 2 + // point1 = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta point1-1,y dey bne !- + // SCREEN[0] = ptr->x lda.z ptr sta SCREEN + // SCREEN[1] = ptr->y lda ptr+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-22.asm b/src/test/ref/struct-22.asm index bd7e88207..a7d078b61 100644 --- a/src/test/ref/struct-22.asm +++ b/src/test/ref/struct-22.asm @@ -8,30 +8,38 @@ main: { .label point1 = 2 .label point2 = 4 + // point1 = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta point1-1,y dey bne !- + // point2 = { 4, 5 } ldy #SIZEOF_STRUCT_POINT !: lda __1-1,y sta point2-1,y dey bne !- + // print(point1) lda.z point1 ldx point1+OFFSET_STRUCT_POINT_Y jsr print + // print(point2) lda.z point2 ldx point2+OFFSET_STRUCT_POINT_Y jsr print + // } rts } // print(byte register(A) p_x, byte register(X) p_y) print: { + // SCREEN[0] = p.x sta SCREEN + // SCREEN[1] = p.y stx SCREEN+1 + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-23.asm b/src/test/ref/struct-23.asm index 972786e08..f3e8b1e8c 100644 --- a/src/test/ref/struct-23.asm +++ b/src/test/ref/struct-23.asm @@ -7,24 +7,35 @@ main: { .label point1 = 2 .label point2 = 4 + // getPoint(2, 3) lda #3 ldx #2 jsr getPoint + // getPoint(2, 3) + // point1 = getPoint(2, 3) stx.z point1 sta point1+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = point1.x txa sta SCREEN + // SCREEN[1] = point1.y lda point1+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // getPoint(4, 5) lda #5 ldx #4 jsr getPoint + // getPoint(4, 5) + // point2 = getPoint(4, 5) stx.z point2 sta point2+OFFSET_STRUCT_POINT_Y + // SCREEN[2] = point2.x txa sta SCREEN+2 + // SCREEN[3] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } getPoint: { diff --git a/src/test/ref/struct-23.log b/src/test/ref/struct-23.log index f1c387883..a0d676364 100644 --- a/src/test/ref/struct-23.log +++ b/src/test/ref/struct-23.log @@ -203,18 +203,18 @@ Alias (byte) getPoint::return_y#1 = (byte) getPoint::return_y#5 Alias (byte) getPoint::return_x#2 = (byte) getPoint::p_x#0 (byte) getPoint::x#2 (byte) getPoint::return_x#6 (byte) getPoint::return_x#3 Alias (byte) getPoint::return_y#2 = (byte) getPoint::p_y#0 (byte) getPoint::y#2 (byte) getPoint::return_y#6 (byte) getPoint::return_y#3 Successful SSA optimization Pass2AliasElimination -Removing C-classic struct-unwound assignment [10] (struct Point) main::point1 ← struct-unwound {*((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)} -Removing C-classic struct-unwound assignment [23] (struct Point) main::point2 ← struct-unwound {*((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)} +Removing C-classic struct-unwound assignment [9] (struct Point) main::point1 ← struct-unwound {*((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_Y)} +Removing C-classic struct-unwound assignment [21] (struct Point) main::point2 ← struct-unwound {*((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X), *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_Y)} Constant (const byte) getPoint::x#0 = 2 Constant (const byte) getPoint::y#0 = 3 Constant (const byte) getPoint::x#1 = 4 Constant (const byte) getPoint::y#1 = 5 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero (byte*)&main::point1 in [8] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x -Simplifying expression containing zero (byte*)&main::point1 in [11] *((const byte*) SCREEN + (byte) 0) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) -Simplifying expression containing zero SCREEN in [11] *((const byte*) SCREEN + (byte) 0) ← *((byte*)&(struct Point) main::point1) -Simplifying expression containing zero (byte*)&main::point2 in [21] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$1_x -Simplifying expression containing zero (byte*)&main::point2 in [24] *((const byte*) SCREEN + (byte) 2) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) +Simplifying expression containing zero (byte*)&main::point1 in [7] *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x +Simplifying expression containing zero (byte*)&main::point1 in [10] *((const byte*) SCREEN + (byte) 0) ← *((byte*)&(struct Point) main::point1+(const byte) OFFSET_STRUCT_POINT_X) +Simplifying expression containing zero SCREEN in [10] *((const byte*) SCREEN + (byte) 0) ← *((byte*)&(struct Point) main::point1) +Simplifying expression containing zero (byte*)&main::point2 in [19] *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$1_x +Simplifying expression containing zero (byte*)&main::point2 in [22] *((const byte*) SCREEN + (byte) 2) ← *((byte*)&(struct Point) main::point2+(const byte) OFFSET_STRUCT_POINT_X) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (struct Point) getPoint::return#0 and assignment [20] (struct Point) getPoint::return#0 ← struct-unwound {(byte) getPoint::return_x#2, (byte) getPoint::return_y#2} Eliminating unused variable (struct Point) getPoint::return#1 and assignment [21] (struct Point) getPoint::return#1 ← struct-unwound {(byte) getPoint::return_x#2, (byte) getPoint::return_y#2} diff --git a/src/test/ref/struct-24.asm b/src/test/ref/struct-24.asm index dd767c39f..da07f6fe5 100644 --- a/src/test/ref/struct-24.asm +++ b/src/test/ref/struct-24.asm @@ -7,23 +7,31 @@ .const OFFSET_STRUCT_POINT_INITIALS = 1 main: { .label point1 = 2 + // point1 ldy #SIZEOF_STRUCT_POINT lda #0 !: dey sta point1,y bne !- + // point1.x = 2 lda #2 sta.z point1 + // point1.initials[0] = 'j' lda #'j' sta point1+OFFSET_STRUCT_POINT_INITIALS + // point1.initials[1] = 'g' lda #'g' sta point1+OFFSET_STRUCT_POINT_INITIALS+1 + // SCREEN[0] = point1.x lda.z point1 sta SCREEN + // SCREEN[1] = point1.initials[0] lda point1+OFFSET_STRUCT_POINT_INITIALS sta SCREEN+1 + // SCREEN[2] = point1.initials[1] lda point1+OFFSET_STRUCT_POINT_INITIALS+1 sta SCREEN+2 + // } rts } diff --git a/src/test/ref/struct-25.asm b/src/test/ref/struct-25.asm index 2ff179a69..05d266619 100644 --- a/src/test/ref/struct-25.asm +++ b/src/test/ref/struct-25.asm @@ -5,7 +5,9 @@ .label SCREEN = $400 .const SIZEOF_STRUCT_POINT = 4 main: { + // SCREEN[0] = sizeof(struct Point) lda #SIZEOF_STRUCT_POINT sta SCREEN + // } rts } diff --git a/src/test/ref/struct-26.asm b/src/test/ref/struct-26.asm index f6bde1be8..1d53d27e9 100644 --- a/src/test/ref/struct-26.asm +++ b/src/test/ref/struct-26.asm @@ -8,29 +8,38 @@ main: { .label point1 = 2 .label point2 = 5 + // point1 ldy #SIZEOF_STRUCT_POINT lda #0 !: dey sta point1,y bne !- + // point1.x = 2 lda #2 sta.z point1 + // point1.initials[0] = 'j' lda #'j' sta point1+OFFSET_STRUCT_POINT_INITIALS + // point1.initials[1] = 'g' lda #'g' sta point1+OFFSET_STRUCT_POINT_INITIALS+1 + // point2 = point1 ldy #SIZEOF_STRUCT_POINT !: lda point1-1,y sta point2-1,y dey bne !- + // SCREEN[0] = point2.x lda.z point2 sta SCREEN + // SCREEN[1] = point2.initials[0] lda point2+OFFSET_STRUCT_POINT_INITIALS sta SCREEN+1 + // SCREEN[2] = point2.initials[1] lda point2+OFFSET_STRUCT_POINT_INITIALS+1 sta SCREEN+2 + // } rts } diff --git a/src/test/ref/struct-27.asm b/src/test/ref/struct-27.asm index 478733232..7ccd96c9d 100644 --- a/src/test/ref/struct-27.asm +++ b/src/test/ref/struct-27.asm @@ -7,18 +7,23 @@ .const OFFSET_STRUCT_POINT_INITIALS = 1 main: { .label point1 = 2 + // point1 = { 2, "jg" } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta point1-1,y dey bne !- + // SCREEN[0] = point1.x lda.z point1 sta SCREEN + // SCREEN[1] = point1.initials[0] lda point1+OFFSET_STRUCT_POINT_INITIALS sta SCREEN+1 + // SCREEN[2] = point1.initials[1] lda point1+OFFSET_STRUCT_POINT_INITIALS+1 sta SCREEN+2 + // } rts } __0: .byte 2 diff --git a/src/test/ref/struct-28.asm b/src/test/ref/struct-28.asm index ea398f6c5..c93bb82a3 100644 --- a/src/test/ref/struct-28.asm +++ b/src/test/ref/struct-28.asm @@ -7,18 +7,23 @@ .const OFFSET_STRUCT_POINT_INITIALS = 1 main: { .label point1 = 2 + // point1 = { 2, { 'j', 'g' } } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta point1-1,y dey bne !- + // SCREEN[0] = point1.x lda.z point1 sta SCREEN + // SCREEN[1] = point1.initials[0] lda point1+OFFSET_STRUCT_POINT_INITIALS sta SCREEN+1 + // SCREEN[2] = point1.initials[1] lda point1+OFFSET_STRUCT_POINT_INITIALS+1 sta SCREEN+2 + // } rts } __0: .byte 2, 'j', 'g' diff --git a/src/test/ref/struct-29.asm b/src/test/ref/struct-29.asm index 0debc1306..29087d860 100644 --- a/src/test/ref/struct-29.asm +++ b/src/test/ref/struct-29.asm @@ -5,12 +5,16 @@ .label SCREEN = $400 .const OFFSET_STRUCT_POINT_INITIALS = 1 main: { + // SCREEN[0] = point1.x lda point1 sta SCREEN + // SCREEN[1] = point1.initials[0] lda point1+OFFSET_STRUCT_POINT_INITIALS sta SCREEN+1 + // SCREEN[2] = point1.initials[1] lda point1+OFFSET_STRUCT_POINT_INITIALS+1 sta SCREEN+2 + // } rts } point1: .byte 2, 'j', 'g' diff --git a/src/test/ref/struct-3.asm b/src/test/ref/struct-3.asm index 8dca00250..d11bb3b54 100644 --- a/src/test/ref/struct-3.asm +++ b/src/test/ref/struct-3.asm @@ -5,19 +5,27 @@ .label SCREEN = $400 main: { .label p1_y = 4 + // print(p1) ldx #0 lda #1 jsr print + // print(p1) lda #2 jsr print + // } rts } // print(byte register(A) p_x) print: { + // SCREEN[idx++] = p.x sta SCREEN,x + // SCREEN[idx++] = p.x; inx + // SCREEN[idx++] = p.y lda #main.p1_y sta SCREEN,x + // SCREEN[idx++] = p.y; inx + // } rts } diff --git a/src/test/ref/struct-30.asm b/src/test/ref/struct-30.asm index 6ccae1877..94ffc943c 100644 --- a/src/test/ref/struct-30.asm +++ b/src/test/ref/struct-30.asm @@ -5,18 +5,23 @@ .label SCREEN = $400 main: { .const point1_x = 2 + // point1 = { 2, "jg" } ldy #3 !: lda __0-1,y sta point1_initials-1,y dey bne !- + // SCREEN[0] = point1.x lda #point1_x sta SCREEN + // SCREEN[1] = point1.initials[0] lda point1_initials sta SCREEN+1 + // SCREEN[2] = point1.initials[1] lda point1_initials+1 sta SCREEN+2 + // } rts point1_initials: .fill 3, 0 } diff --git a/src/test/ref/struct-31.asm b/src/test/ref/struct-31.asm index 3e1499337..0b4424e5b 100644 --- a/src/test/ref/struct-31.asm +++ b/src/test/ref/struct-31.asm @@ -6,9 +6,12 @@ main: { .const point1_x = 2 .const point1_y = 3 + // SCREEN[0] = point1.x lda #point1_x sta SCREEN + // SCREEN[1] = point1.y lda #point1_y sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-32.asm b/src/test/ref/struct-32.asm index 82c352534..1a8d8cd9f 100644 --- a/src/test/ref/struct-32.asm +++ b/src/test/ref/struct-32.asm @@ -8,25 +8,32 @@ main: { .label point1 = 2 .label point2 = 4 + // point1 ldy #SIZEOF_STRUCT_POINT lda #0 !: dey sta point1,y bne !- + // point1.x = 2 lda #2 sta.z point1 + // point1.y = 3 lda #3 sta point1+OFFSET_STRUCT_POINT_Y + // point2 = point1 ldy #SIZEOF_STRUCT_POINT !: lda point1-1,y sta point2-1,y dey bne !- + // SCREEN[0] = point2.x lda.z point2 sta SCREEN + // SCREEN[1] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-33.asm b/src/test/ref/struct-33.asm index fe47c3352..9a76d5f6c 100644 --- a/src/test/ref/struct-33.asm +++ b/src/test/ref/struct-33.asm @@ -6,14 +6,19 @@ .const OFFSET_STRUCT_POINT_Y = 1 .const SIZEOF_STRUCT_POINT = 2 main: { + // point.x = 2 lda #2 sta point + // point.y = 3 lda #3 sta point+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = point.x lda point sta SCREEN + // SCREEN[1] = point.y lda point+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } point: .fill SIZEOF_STRUCT_POINT, 0 diff --git a/src/test/ref/struct-34.asm b/src/test/ref/struct-34.asm index f7f2e5110..f09704c82 100644 --- a/src/test/ref/struct-34.asm +++ b/src/test/ref/struct-34.asm @@ -6,9 +6,12 @@ .const point_x = 2 .const point_y = 3 main: { + // SCREEN[0] = point.x lda #point_x sta SCREEN + // SCREEN[1] = point.y lda #point_y sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-35.asm b/src/test/ref/struct-35.asm index 6e1c8a015..9e42f1764 100644 --- a/src/test/ref/struct-35.asm +++ b/src/test/ref/struct-35.asm @@ -7,16 +7,20 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label p2 = point2 + // *p2 = point1 ldy #SIZEOF_STRUCT_POINT !: lda point1-1,y sta p2-1,y dey bne !- + // SCREEN[0] = point2.x lda point2 sta SCREEN + // SCREEN[1] = point2.y lda point2+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } point1: .byte 2, 3 diff --git a/src/test/ref/struct-36.asm b/src/test/ref/struct-36.asm index 36e27b5d6..0d46e8073 100644 --- a/src/test/ref/struct-36.asm +++ b/src/test/ref/struct-36.asm @@ -5,12 +5,16 @@ .label SCREEN = $400 .const OFFSET_STRUCT_POINT_INITIALS = 1 main: { + // SCREEN[0] = point1.x lda point1 sta SCREEN + // SCREEN[1] = point1.initials[0] lda point1+OFFSET_STRUCT_POINT_INITIALS sta SCREEN+1 + // SCREEN[2] = point1.initials[1] lda point1+OFFSET_STRUCT_POINT_INITIALS+1 sta SCREEN+2 + // } rts } point1: .byte 2 diff --git a/src/test/ref/struct-37.asm b/src/test/ref/struct-37.asm index 7b7b0479d..26f7d409b 100644 --- a/src/test/ref/struct-37.asm +++ b/src/test/ref/struct-37.asm @@ -15,6 +15,7 @@ main: { sta.z j tax __b1: + // to = letter_c[i].to txa asl asl @@ -26,17 +27,23 @@ main: { sta.z to_x lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y,y sta.z to_y + // SCREEN[j++] = to.x lda.z to_x ldy.z j sta SCREEN,y + // SCREEN[j++] = to.x; iny + // SCREEN[j++] = to.y lda.z to_y sta SCREEN,y + // SCREEN[j++] = to.y; iny sty.z j + // for( byte i: 0..2) inx cpx #3 bne __b1 + // } rts } // True type letter c diff --git a/src/test/ref/struct-38.asm b/src/test/ref/struct-38.asm index 6aa8e0033..68bfdae4c 100644 --- a/src/test/ref/struct-38.asm +++ b/src/test/ref/struct-38.asm @@ -15,6 +15,7 @@ main: { sta.z j tax __b1: + // to = letter_c[i].to txa asl asl @@ -31,6 +32,7 @@ main: { sta.z to_y lda letter_c+OFFSET_STRUCT_SEGMENT_TO+OFFSET_STRUCT_SPLINEVECTOR16_Y+1,y sta.z to_y+1 + // SCREEN[j++] = to.x lda.z j asl tay @@ -38,7 +40,9 @@ main: { sta SCREEN,y lda.z to_x+1 sta SCREEN+1,y + // SCREEN[j++] = to.x; inc.z j + // SCREEN[j++] = to.y lda.z j asl tay @@ -46,10 +50,13 @@ main: { sta SCREEN,y lda.z to_y+1 sta SCREEN+1,y + // SCREEN[j++] = to.y; inc.z j + // for( byte i: 0..2) inx cpx #3 bne __b1 + // } rts } // True type letter c diff --git a/src/test/ref/struct-39.asm b/src/test/ref/struct-39.asm index 41a5b1e1e..689548339 100644 --- a/src/test/ref/struct-39.asm +++ b/src/test/ref/struct-39.asm @@ -16,6 +16,7 @@ main: { sta.z j sta.z i __b1: + // to = letter_c[i].to lda.z i asl asl @@ -31,6 +32,7 @@ main: { iny cpy #SIZEOF_STRUCT_VECTOR bne !- + // SCREEN[j++] = to.x lda.z j asl tay @@ -38,8 +40,10 @@ main: { sta SCREEN,y lda.z to+1 sta SCREEN+1,y + // SCREEN[j++] = to.x; ldx.z j inx + // SCREEN[j++] = to.y txa asl tay @@ -47,12 +51,15 @@ main: { sta SCREEN,y lda to+OFFSET_STRUCT_VECTOR_Y+1 sta SCREEN+1,y + // SCREEN[j++] = to.y; inx stx.z j + // for( byte i: 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } // True type letter c diff --git a/src/test/ref/struct-4.asm b/src/test/ref/struct-4.asm index be787edda..80c820ade 100644 --- a/src/test/ref/struct-4.asm +++ b/src/test/ref/struct-4.asm @@ -7,9 +7,12 @@ main: { .const x = 2 .const y = 3 .const p_y = y+1 + // SCREEN[0] = p.x lda #x sta SCREEN + // SCREEN[1] = p.y lda #p_y sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-4.log b/src/test/ref/struct-4.log index 23df953ae..0f66f9f40 100644 --- a/src/test/ref/struct-4.log +++ b/src/test/ref/struct-4.log @@ -71,7 +71,7 @@ Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::p_y#0 = main::y+1 Constant (const byte) main::p_x#0 = main::x Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::SCREEN in [3] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::p_x#0 +Simplifying expression containing zero main::SCREEN in [2] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::p_x#0 Successful SSA optimization PassNSimplifyExpressionWithZero Constant inlined main::p_x#0 = (const byte) main::x Successful SSA optimization Pass2ConstantInlining diff --git a/src/test/ref/struct-40.asm b/src/test/ref/struct-40.asm index 286465ba6..a16aafe43 100644 --- a/src/test/ref/struct-40.asm +++ b/src/test/ref/struct-40.asm @@ -12,37 +12,54 @@ main: { .const v3_q_y = 7 .const v4_q_x = 8 .const v4_q_y = 9 + // SCREEN[idx++] = v1.p.x lda #v1_p_x sta SCREEN + // SCREEN[idx++] = v1.p.y lda #v1_p_y sta SCREEN+1 + // SCREEN[idx++] = v1.q.x lda #v1_q_x sta SCREEN+2 + // SCREEN[idx++] = v1.q.y lda #v1_q_y sta SCREEN+3 + // SCREEN[idx++] = v2.p.x lda #v1_p_x sta SCREEN+4 + // SCREEN[idx++] = v2.p.y lda #v1_p_y sta SCREEN+5 + // SCREEN[idx++] = v2.q.x lda #v1_q_x sta SCREEN+6 + // SCREEN[idx++] = v2.q.y lda #v1_q_y sta SCREEN+7 + // SCREEN[idx++] = v3.p.x lda #v1_p_x sta SCREEN+8 + // SCREEN[idx++] = v3.p.y lda #v1_p_y sta SCREEN+9 + // SCREEN[idx++] = v3.q.x lda #v3_q_x sta SCREEN+$a + // SCREEN[idx++] = v3.q.y lda #v3_q_y sta SCREEN+$b + // SCREEN[idx++] = v4.p.x lda #v1_p_x sta SCREEN+$c + // SCREEN[idx++] = v4.p.y lda #v1_p_y sta SCREEN+$d + // SCREEN[idx++] = v4.q.x lda #v4_q_x sta SCREEN+$e + // SCREEN[idx++] = v4.q.y lda #v4_q_y sta SCREEN+$f + // } rts } diff --git a/src/test/ref/struct-41.asm b/src/test/ref/struct-41.asm index 54e3e2f17..f282d916e 100644 --- a/src/test/ref/struct-41.asm +++ b/src/test/ref/struct-41.asm @@ -17,6 +17,7 @@ main: { .label v2 = 2 .label v3 = 6 .label v4 = $a + // v2 = v1 lda #v1_p_x sta.z v2 lda #v1_p_y @@ -25,6 +26,7 @@ main: { sta v2+OFFSET_STRUCT_VECTOR_Q lda #v1_q_y sta v2+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y + // v3 = { v2.p, {6, 7} } ldy #SIZEOF_STRUCT_POINT !: lda v2-1,y @@ -37,52 +39,75 @@ main: { sta v3+OFFSET_STRUCT_VECTOR_Q-1,y dey bne !- + // v4 = v3 ldy #SIZEOF_STRUCT_VECTOR !: lda v3-1,y sta v4-1,y dey bne !- + // v5 = { {v4.p.x, v4.p.y }, {8, 9} } ldy.z v4 ldx v4+OFFSET_STRUCT_POINT_Y + // SCREEN[idx++] = v1.p.x lda #v1_p_x sta SCREEN + // SCREEN[idx++] = v1.p.y lda #v1_p_y sta SCREEN+1 + // SCREEN[idx++] = v1.q.x lda #v1_q_x sta SCREEN+2 + // SCREEN[idx++] = v1.q.y lda #v1_q_y sta SCREEN+3 + // SCREEN[idx++] = v2.p.x lda.z v2 sta SCREEN+4 + // SCREEN[idx++] = v2.p.y lda v2+OFFSET_STRUCT_POINT_Y sta SCREEN+5 + // SCREEN[idx++] = v2.q.x lda v2+OFFSET_STRUCT_VECTOR_Q sta SCREEN+6 + // SCREEN[idx++] = v2.q.y lda v2+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+7 + // SCREEN[idx++] = v3.p.x lda.z v3 sta SCREEN+8 + // SCREEN[idx++] = v3.p.y lda v3+OFFSET_STRUCT_POINT_Y sta SCREEN+9 + // SCREEN[idx++] = v3.q.x lda v3+OFFSET_STRUCT_VECTOR_Q sta SCREEN+$a + // SCREEN[idx++] = v3.q.y lda v3+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+$b + // SCREEN[idx++] = v4.p.x tya sta SCREEN+$c + // SCREEN[idx++] = v4.p.y txa sta SCREEN+$d + // SCREEN[idx++] = v4.q.x lda v4+OFFSET_STRUCT_VECTOR_Q sta SCREEN+$e + // SCREEN[idx++] = v4.q.y lda v4+OFFSET_STRUCT_VECTOR_Q+OFFSET_STRUCT_POINT_Y sta SCREEN+$f + // SCREEN[idx++] = v5.p.x sty SCREEN+$10 + // SCREEN[idx++] = v5.p.y stx SCREEN+$11 + // SCREEN[idx++] = v5.q.x lda #v5_q_x sta SCREEN+$12 + // SCREEN[idx++] = v5.q.y lda #v5_q_y sta SCREEN+$13 + // } rts } __0: .byte 6, 7 diff --git a/src/test/ref/struct-42.asm b/src/test/ref/struct-42.asm index e85df2433..2da7adc5e 100644 --- a/src/test/ref/struct-42.asm +++ b/src/test/ref/struct-42.asm @@ -10,6 +10,7 @@ main: { lda #0 sta.z i __b1: + // points[i] = { 2, 3 } lda.z i asl tax @@ -21,14 +22,18 @@ main: { iny cpy #SIZEOF_STRUCT_POINT bne !- + // for( char i: 0..2) inc.z i lda #3 cmp.z i bne __b1 + // SCREEN[0] = points[2].x lda points+2*SIZEOF_STRUCT_POINT sta SCREEN + // SCREEN[1] = points[2].y lda points+OFFSET_STRUCT_POINT_Y+2*SIZEOF_STRUCT_POINT sta SCREEN+1 + // } rts } points: .fill 2*3, 0 diff --git a/src/test/ref/struct-5.asm b/src/test/ref/struct-5.asm index be5881974..d63e45a4e 100644 --- a/src/test/ref/struct-5.asm +++ b/src/test/ref/struct-5.asm @@ -4,11 +4,15 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // point() jsr point + // SCREEN[0] = q.x lda #point.p_x sta SCREEN + // SCREEN[1] = q.y lda #point.p_y sta SCREEN+1 + // } rts } point: { diff --git a/src/test/ref/struct-5.log b/src/test/ref/struct-5.log index af1935c32..82979dada 100644 --- a/src/test/ref/struct-5.log +++ b/src/test/ref/struct-5.log @@ -151,7 +151,7 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::q_x#1 = point::return_x#0 Constant (const byte) main::q_y#1 = point::return_y#0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::SCREEN in [10] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::q_x#1 +Simplifying expression containing zero main::SCREEN in [7] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::q_x#1 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (struct Point) point::return#0 and assignment [4] (struct Point) point::return#0 ← struct-unwound {(const byte) point::return_x#1, (const byte) point::return_y#1} Eliminating unused variable (struct Point) point::return#1 and assignment [5] (struct Point) point::return#1 ← struct-unwound {(const byte) point::return_x#1, (const byte) point::return_y#1} diff --git a/src/test/ref/struct-6.asm b/src/test/ref/struct-6.asm index 092d482d8..0da76ab68 100644 --- a/src/test/ref/struct-6.asm +++ b/src/test/ref/struct-6.asm @@ -7,11 +7,15 @@ main: { .const p_x = $a .const p_y = $a .const c_radius = 5 + // SCREEN[0] = c.center.x lda #p_x sta SCREEN + // SCREEN[1] = c.center.y lda #p_y sta SCREEN+1 + // SCREEN[2] = c.radius lda #c_radius sta SCREEN+2 + // } rts } diff --git a/src/test/ref/struct-7.asm b/src/test/ref/struct-7.asm index 301d4c44e..24d5c9f49 100644 --- a/src/test/ref/struct-7.asm +++ b/src/test/ref/struct-7.asm @@ -10,17 +10,24 @@ main: { .const t_c1_center_y = 2 .const t_c2_center_x = 4 .const t_c2_center_y = 5 + // SCREEN[0] = t.c1.center.x lda #t_c1_center_x sta SCREEN + // SCREEN[1] = t.c1.center.y lda #t_c1_center_y sta SCREEN+1 + // SCREEN[2] = t.c1.radius lda #t_c1_radius sta SCREEN+2 + // SCREEN[3] = t.c2.center.x lda #t_c2_center_x sta SCREEN+3 + // SCREEN[4] = t.c2.center.y lda #t_c2_center_y sta SCREEN+4 + // SCREEN[5] = t.c2.radius lda #t_c2_radius sta SCREEN+5 + // } rts } diff --git a/src/test/ref/struct-8.asm b/src/test/ref/struct-8.asm index a58191e46..9791e1971 100644 --- a/src/test/ref/struct-8.asm +++ b/src/test/ref/struct-8.asm @@ -7,11 +7,15 @@ main: { .const p_x = $a .const p_y = $a .const c_radius = 5 + // SCREEN[0] = point.x lda #p_x sta SCREEN + // SCREEN[1] = point.y lda #p_y sta SCREEN+1 + // SCREEN[1] = c.radius lda #c_radius sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-8.log b/src/test/ref/struct-8.log index e6cf6f8e2..852bccc95 100644 --- a/src/test/ref/struct-8.log +++ b/src/test/ref/struct-8.log @@ -96,7 +96,7 @@ Successful SSA optimization Pass2AliasElimination Constant (const byte) main::point_x#0 = main::p_x Constant (const byte) main::point_y#0 = main::p_y Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero main::SCREEN in [4] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::point_x#0 +Simplifying expression containing zero main::SCREEN in [2] *((const byte*) main::SCREEN + (byte) 0) ← (const byte) main::point_x#0 Successful SSA optimization PassNSimplifyExpressionWithZero Constant inlined main::point_y#0 = (const byte) main::p_y Constant inlined main::point_x#0 = (const byte) main::p_x diff --git a/src/test/ref/struct-9.asm b/src/test/ref/struct-9.asm index 72f1123a9..a7c4ee1c6 100644 --- a/src/test/ref/struct-9.asm +++ b/src/test/ref/struct-9.asm @@ -7,11 +7,15 @@ main: { .const p_x = $a .const p_y = $a .const c_radius = $c + // SCREEN[0] = c.center.x lda #p_x sta SCREEN + // SCREEN[1] = c.center.y lda #p_y sta SCREEN+1 + // SCREEN[2] = c.radius lda #c_radius sta SCREEN+2 + // } rts } diff --git a/src/test/ref/struct-pos-fill.asm b/src/test/ref/struct-pos-fill.asm index 904ecadb6..c217d5402 100644 --- a/src/test/ref/struct-pos-fill.asm +++ b/src/test/ref/struct-pos-fill.asm @@ -17,33 +17,44 @@ main: { sta.z x sta.z line __b1: + // for (line=0;line<8;++line) lda.z line cmp #8 bcc __b2 + // } rts __b2: + // ++x; inc.z x ldy #0 __b3: + // for (row=0;row<8;++row) cpy #8 bcc __b4 + // y+=YSPACE lax.z y axs #-[YSPACE] stx.z y + // for (line=0;line<8;++line) inc.z line jmp __b1 __b4: + // p[idx].y=y lda.z idx asl tax lda.z y sta p+OFFSET_STRUCT_POS_Y,x + // p[idx].x=x lda.z x sta p,x + // ++idx; inc.z idx + // x+=XSPACE lax.z x axs #-[XSPACE] stx.z x + // for (row=0;row<8;++row) iny jmp __b3 } diff --git a/src/test/ref/struct-pos-fill.log b/src/test/ref/struct-pos-fill.log index c41e4120c..1fa706fa9 100644 --- a/src/test/ref/struct-pos-fill.log +++ b/src/test/ref/struct-pos-fill.log @@ -264,7 +264,7 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [19] (byte~) main::$3 ← (byte) idx#11 * (const byte) SIZEOF_STRUCT_POS Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition (bool~) main::$0 [9] if((byte) line#11<(byte) 8) goto main::@2 -Simple Condition (bool~) main::$1 [15] if((byte) row#12<(byte) 8) goto main::@5 +Simple Condition (bool~) main::$1 [14] if((byte) row#12<(byte) 8) goto main::@5 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) idx#0 = 0 Constant (const byte) line#0 = 0 @@ -274,7 +274,7 @@ Constant (const byte) y#0 = 0 Constant (const byte) line#1 = 0 Constant (const byte) row#1 = 0 Successful SSA optimization Pass2ConstantIdentification -Simplifying expression containing zero (byte*)p in [20] *((byte*)(const struct pos*) p+(const byte) OFFSET_STRUCT_POS_X + (byte~) main::$3) ← (byte) x#10 +Simplifying expression containing zero (byte*)p in [18] *((byte*)(const struct pos*) p+(const byte) OFFSET_STRUCT_POS_X + (byte~) main::$3) ← (byte) x#10 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable - keeping the phi block (byte) row#3 Eliminating unused constant (const byte) OFFSET_STRUCT_POS_X diff --git a/src/test/ref/struct-ptr-0.asm b/src/test/ref/struct-ptr-0.asm index 203862924..d1a977b29 100644 --- a/src/test/ref/struct-ptr-0.asm +++ b/src/test/ref/struct-ptr-0.asm @@ -8,33 +8,41 @@ main: { .label __4 = 2 ldx #0 __b1: + // points[i].x = i txa asl sta.z __4 tay txa sta points,y + // i+1 txa tay iny + // points[i].y = i+1 tya ldy.z __4 sta points+OFFSET_STRUCT_POINT_Y,y + // for( byte i: 0..4) inx cpx #5 bne __b1 ldy #0 __b2: + // SCREEN[i] = points[i].x tya asl tax lda points,x sta SCREEN,y + // (SCREEN+40)[i] = points[i].y lda points+OFFSET_STRUCT_POINT_Y,x sta SCREEN+$28,y + // for( byte i: 0..4) iny cpy #5 bne __b2 + // } rts } points: .fill 2*4, 0 diff --git a/src/test/ref/struct-ptr-1.asm b/src/test/ref/struct-ptr-1.asm index e4eba635f..eaf7a4121 100644 --- a/src/test/ref/struct-ptr-1.asm +++ b/src/test/ref/struct-ptr-1.asm @@ -7,32 +7,42 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // i*SIZEOF_POINT txa asl tay + // *((byte*)points+OFFS_X+i*SIZEOF_POINT) = i txa sta points,y + // i+4 txa clc adc #4 + // *((byte*)points+OFFS_Y+i*SIZEOF_POINT) = i+4 // points[i].x = i; sta points+OFFS_Y,y + // for( byte i: 0..3) inx cpx #4 bne __b1 ldy #0 __b2: + // i*SIZEOF_POINT tya asl tax + // SCREEN[i] = *((byte*)points+OFFS_X+i*SIZEOF_POINT) lda points,x sta SCREEN,y + // (SCREEN+40)[i] = *((byte*)points+OFFS_Y+i*SIZEOF_POINT) // SCREEN[i] = points[i].x; lda points+OFFS_Y,x sta SCREEN+$28,y + // for( byte i: 0..3) iny cpy #4 bne __b2 + // } rts } points: .fill 2*4, 0 diff --git a/src/test/ref/struct-ptr-10.asm b/src/test/ref/struct-ptr-10.asm index b16542887..371d0bfdc 100644 --- a/src/test/ref/struct-ptr-10.asm +++ b/src/test/ref/struct-ptr-10.asm @@ -18,8 +18,10 @@ main: { sta.z i sta.z i+1 __b1: + // (byte)i lda.z i tax + // points[i] = { 2, (byte)i } asl sta.z __3 lda.z i+1 @@ -44,6 +46,7 @@ main: { sta.z __6+1 txa sta (__6),y + // for( word i: 0..499) inc.z i bne !+ inc.z i+1 @@ -58,6 +61,7 @@ main: { sta.z i1 sta.z i1+1 __b2: + // SCREEN[i] = points[i] lda.z i1 asl sta.z __4 @@ -85,6 +89,7 @@ main: { iny cpy #SIZEOF_STRUCT_POINT bne !- + // for( word i: 0..499) inc.z i1 bne !+ inc.z i1+1 @@ -95,6 +100,7 @@ main: { lda.z i1 cmp #<$1f4 bne __b2 + // } rts } points: .fill 2*$1f4, 0 diff --git a/src/test/ref/struct-ptr-11.asm b/src/test/ref/struct-ptr-11.asm index 9153d594d..03ff369a9 100644 --- a/src/test/ref/struct-ptr-11.asm +++ b/src/test/ref/struct-ptr-11.asm @@ -11,11 +11,13 @@ main: { .label i1 = 2 ldx #0 __b1: + // -(signed byte)i txa eor #$ff clc adc #1 sta.z __2 + // points[i] = { (signed byte)i, -(signed byte)i, (signed byte)i } txa asl stx.z $ff @@ -28,12 +30,14 @@ main: { sta points+OFFSET_STRUCT_POINT_Y,y txa sta points+OFFSET_STRUCT_POINT_Z,y + // for( byte i: 0..3) inx cpx #4 bne __b1 lda #0 sta.z i1 __b2: + // SCREEN[i] = points[i] lda.z i1 asl clc @@ -46,10 +50,12 @@ main: { iny dex bne !- + // for( byte i: 0..3) inc.z i1 lda #4 cmp.z i1 bne __b2 + // } rts } points: .fill 3*4, 0 diff --git a/src/test/ref/struct-ptr-12-ref.asm b/src/test/ref/struct-ptr-12-ref.asm index 618494a61..64db3d755 100644 --- a/src/test/ref/struct-ptr-12-ref.asm +++ b/src/test/ref/struct-ptr-12-ref.asm @@ -6,13 +6,19 @@ main: { .label SCREEN = $400 .label q = p .label p = 2 + // p = { 2, 3 } lda #<2*$100+3 sta.z p lda #>2*$100+3 sta.z p+1 + // <*q lda.z q + // SCREEN[0] = <*q sta SCREEN + // >*q lda.z q+1 + // SCREEN[1] = >*q sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-ptr-12.asm b/src/test/ref/struct-ptr-12.asm index 67b14e70e..d8bf32cb7 100644 --- a/src/test/ref/struct-ptr-12.asm +++ b/src/test/ref/struct-ptr-12.asm @@ -8,16 +8,20 @@ main: { .label SCREEN = $400 .label q = p .label p = 2 + // p = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta p-1,y dey bne !- + // SCREEN[0] = q->x lda.z q sta SCREEN + // SCREEN[1] = q->y lda q+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-ptr-13.asm b/src/test/ref/struct-ptr-13.asm index 0a8abe241..600683f0c 100644 --- a/src/test/ref/struct-ptr-13.asm +++ b/src/test/ref/struct-ptr-13.asm @@ -6,17 +6,22 @@ .label points = $1000 main: { .label SCREEN = $400 + // points->x += 5 lda #5 clc adc points sta points + // points->y += 5 lda #5 clc adc points+OFFSET_STRUCT_POINT_Y sta points+OFFSET_STRUCT_POINT_Y + // SCREEN[0] = points->x lda points sta SCREEN + // SCREEN[1] = points->y lda points+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } diff --git a/src/test/ref/struct-ptr-14.asm b/src/test/ref/struct-ptr-14.asm index 175283e76..56ed72cf8 100644 --- a/src/test/ref/struct-ptr-14.asm +++ b/src/test/ref/struct-ptr-14.asm @@ -8,24 +8,32 @@ main: { .label SCREEN = $400 .label q = p .label p = 2 + // p = { 2, 3 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta p-1,y dey bne !- + // set(q) jsr set + // SCREEN[0] = q->x lda.z q sta SCREEN + // SCREEN[1] = q->y lda q+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // } rts } set: { + // ptr->x = 4 lda #4 sta.z main.q + // ptr->y = 5 lda #5 sta main.q+OFFSET_STRUCT_POINT_Y + // } rts } __0: .byte 2, 3 diff --git a/src/test/ref/struct-ptr-15.asm b/src/test/ref/struct-ptr-15.asm index 7801f7ff1..51a42b72e 100644 --- a/src/test/ref/struct-ptr-15.asm +++ b/src/test/ref/struct-ptr-15.asm @@ -11,16 +11,22 @@ main: { .label x = 5 .label ptr = 2 .label i = 4 + // circles[0].center.x = 2 lda #2 sta circles+OFFSET_STRUCT_CIRCLE_CENTER + // circles[0].center.y = 3 lda #3 sta circles+OFFSET_STRUCT_CIRCLE_CENTER+OFFSET_STRUCT_POINT_Y + // circles[0].radius = 5 lda #5 sta circles + // circles[1].center.x = 8 lda #8 sta circles+OFFSET_STRUCT_CIRCLE_CENTER+1*SIZEOF_STRUCT_CIRCLE + // circles[1].center.y = 9 lda #9 sta circles+OFFSET_STRUCT_CIRCLE_CENTER+OFFSET_STRUCT_POINT_Y+1*SIZEOF_STRUCT_CIRCLE + // circles[1].radius = 15 lda #$f sta circles+1*SIZEOF_STRUCT_CIRCLE lda #0 @@ -31,9 +37,11 @@ main: { lda #>circles sta.z ptr+1 __b1: + // x = ptr->center.x ldy #OFFSET_STRUCT_CIRCLE_CENTER lda (ptr),y sta.z x + // y = ptr->center.y tya clc adc.z ptr @@ -44,12 +52,17 @@ main: { ldy #OFFSET_STRUCT_POINT_Y lda (__9),y tay + // SCREEN[idx++] = x lda.z x sta SCREEN,x + // SCREEN[idx++] = x; inx + // SCREEN[idx++] = y tya sta SCREEN,x + // SCREEN[idx++] = y; inx + // ptr++; lda #SIZEOF_STRUCT_CIRCLE clc adc.z ptr @@ -57,10 +70,12 @@ main: { bcc !+ inc.z ptr+1 !: + // for(byte i:0..1) inc.z i lda #2 cmp.z i bne __b1 + // } rts } circles: .fill 3*2, 0 diff --git a/src/test/ref/struct-ptr-16.asm b/src/test/ref/struct-ptr-16.asm index bd622cb95..2895a17b4 100644 --- a/src/test/ref/struct-ptr-16.asm +++ b/src/test/ref/struct-ptr-16.asm @@ -10,18 +10,24 @@ main: { .label __1_x = 2 .label __1_y = 3 + // get(0) lda #0 jsr get + // get(0) lda.z get.return_y + // *SCREEN = get(0) stx SCREEN sta SCREEN+OFFSET_STRUCT_POINT_Y ldy #1 __b1: + // get(i) tya jsr get + // get(i) lda.z get.return_y stx.z __1_x sta.z __1_y + // SCREEN[i] = get(i) tya asl tax @@ -29,28 +35,36 @@ main: { sta SCREEN,x lda.z __1_y sta SCREEN+OFFSET_STRUCT_POINT_Y,x + // for ( char i: 1..2) iny cpy #3 bne __b1 + // } rts } // get(byte register(A) i) get: { .label return_y = 2 + // if(i==0) cmp #0 beq __b1 + // if(i==1) cmp #1 beq __b2 + // return *p2; ldx p2 lda p2+OFFSET_STRUCT_POINT_Y sta.z return_y + // } rts __b2: + // return *p1; ldx p1 lda p1+OFFSET_STRUCT_POINT_Y sta.z return_y rts __b1: + // return *p0; ldx p0 lda p0+OFFSET_STRUCT_POINT_Y sta.z return_y diff --git a/src/test/ref/struct-ptr-16.log b/src/test/ref/struct-ptr-16.log index 76f05efac..13d1fed94 100644 --- a/src/test/ref/struct-ptr-16.log +++ b/src/test/ref/struct-ptr-16.log @@ -242,16 +242,16 @@ Alias (byte) get::i#2 = (byte) get::i#3 Alias (byte) get::return_x#5 = (byte) get::return_x#8 Alias (byte) get::return_y#5 = (byte) get::return_y#8 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 [23] if((byte) main::i#1!=rangelast(1,2)) goto main::@1 -Simple Condition (bool~) get::$0 [27] if((byte) get::i#2==(byte) 0) goto get::@1 -Simple Condition (bool~) get::$1 [35] if((byte) get::i#2==(byte) 1) goto get::@2 +Simple Condition (bool~) main::$2 [21] if((byte) main::i#1!=rangelast(1,2)) goto main::@1 +Simple Condition (bool~) get::$0 [25] if((byte) get::i#2==(byte) 0) goto get::@1 +Simple Condition (bool~) get::$1 [32] if((byte) get::i#2==(byte) 1) goto get::@2 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [28] (byte*~) get::$2 ← (byte*)(const struct Point*) p0 + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [30] (byte*~) get::$3 ← (byte*)(const struct Point*) p0 + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [36] (byte*~) get::$4 ← (byte*)(const struct Point*) p1 + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [38] (byte*~) get::$5 ← (byte*)(const struct Point*) p1 + (const byte) OFFSET_STRUCT_POINT_Y -Constant right-side identified [41] (byte*~) get::$6 ← (byte*)(const struct Point*) p2 + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [43] (byte*~) get::$7 ← (byte*)(const struct Point*) p2 + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [26] (byte*~) get::$2 ← (byte*)(const struct Point*) p0 + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [28] (byte*~) get::$3 ← (byte*)(const struct Point*) p0 + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [33] (byte*~) get::$4 ← (byte*)(const struct Point*) p1 + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [35] (byte*~) get::$5 ← (byte*)(const struct Point*) p1 + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [38] (byte*~) get::$6 ← (byte*)(const struct Point*) p2 + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [40] (byte*~) get::$7 ← (byte*)(const struct Point*) p2 + (const byte) OFFSET_STRUCT_POINT_Y Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) get::i#0 = 0 Constant (const byte) main::i#0 = 1 @@ -262,13 +262,13 @@ Constant (const byte*) get::$5 = (byte*)p1+OFFSET_STRUCT_POINT_Y Constant (const byte*) get::$6 = (byte*)p2+OFFSET_STRUCT_POINT_X Constant (const byte*) get::$7 = (byte*)p2+OFFSET_STRUCT_POINT_Y Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [21] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [23] if(main::i#1!=rangelast(1,2)) goto main::@1 to (number) 3 +Resolved ranged next value [19] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [21] if(main::i#1!=rangelast(1,2)) goto main::@1 to (number) 3 Simplifying expression containing zero (byte*)p0 in Simplifying expression containing zero (byte*)p1 in Simplifying expression containing zero (byte*)p2 in -Simplifying expression containing zero (byte*)SCREEN in [7] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x -Simplifying expression containing zero (byte*)SCREEN in [19] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$3) ← (byte~) main::$1_x +Simplifying expression containing zero (byte*)SCREEN in [6] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x +Simplifying expression containing zero (byte*)SCREEN in [17] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$3) ← (byte~) main::$1_x Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (struct Point) get::return#0 and assignment [24] (struct Point) get::return#0 ← struct-unwound {(byte) get::return_x#2, (byte) get::return_y#2} Eliminating unused variable (struct Point) get::return#1 and assignment [28] (struct Point) get::return#1 ← struct-unwound {(byte) get::return_x#3, (byte) get::return_y#3} diff --git a/src/test/ref/struct-ptr-17.asm b/src/test/ref/struct-ptr-17.asm index d281eb767..0315272b9 100644 --- a/src/test/ref/struct-ptr-17.asm +++ b/src/test/ref/struct-ptr-17.asm @@ -6,16 +6,22 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label __1_x = 2 + // get(0) lda #0 jsr get + // get(0) + // *SCREEN = get(0) sta SCREEN lda #get.p_y sta SCREEN+OFFSET_STRUCT_POINT_Y ldy #1 __b1: + // get(i) tya jsr get + // get(i) sta.z __1_x + // SCREEN[i] = get(i) tya asl tax @@ -23,9 +29,11 @@ main: { sta SCREEN,x lda #get.p_y sta SCREEN+OFFSET_STRUCT_POINT_Y,x + // for ( char i: 1..2) iny cpy #3 bne __b1 + // } rts } // get(byte register(A) i) diff --git a/src/test/ref/struct-ptr-17.log b/src/test/ref/struct-ptr-17.log index a1a50de79..a0188a9ba 100644 --- a/src/test/ref/struct-ptr-17.log +++ b/src/test/ref/struct-ptr-17.log @@ -181,7 +181,7 @@ Alias (byte) main::i#2 = (byte) main::i#3 Alias (byte) get::return_x#2 = (byte) get::p_x#0 (byte) get::i#2 (byte) get::return_x#6 (byte) get::return_x#3 Alias (byte) get::return_y#2 = (byte) get::return_y#6 (byte) get::return_y#3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$2 [23] if((byte) main::i#1!=rangelast(1,2)) goto main::@1 +Simple Condition (bool~) main::$2 [21] if((byte) main::i#1!=rangelast(1,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) get::i#0 = 0 Constant (const byte) main::i#0 = 1 @@ -193,10 +193,10 @@ Successful SSA optimization Pass2ConstantIdentification Constant (const byte) main::$0_y = get::return_y#0 Constant (const byte) main::$1_y = get::return_y#1 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [21] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [23] if(main::i#1!=rangelast(1,2)) goto main::@1 to (number) 3 -Simplifying expression containing zero (byte*)SCREEN in [7] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x -Simplifying expression containing zero (byte*)SCREEN in [19] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$3) ← (byte~) main::$1_x +Resolved ranged next value [19] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [21] if(main::i#1!=rangelast(1,2)) goto main::@1 to (number) 3 +Simplifying expression containing zero (byte*)SCREEN in [6] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X) ← (byte~) main::$0_x +Simplifying expression containing zero (byte*)SCREEN in [17] *((byte*)(const struct Point*) SCREEN+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$3) ← (byte~) main::$1_x Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (struct Point) get::return#0 and assignment [17] (struct Point) get::return#0 ← struct-unwound {(byte) get::return_x#2, (const byte) get::return_y#2} Eliminating unused variable (struct Point) get::return#1 and assignment [18] (struct Point) get::return#1 ← struct-unwound {(byte) get::return_x#2, (const byte) get::return_y#2} diff --git a/src/test/ref/struct-ptr-18.asm b/src/test/ref/struct-ptr-18.asm index 93ca7119e..5c10c63dc 100644 --- a/src/test/ref/struct-ptr-18.asm +++ b/src/test/ref/struct-ptr-18.asm @@ -7,12 +7,14 @@ .const OFFSET_STRUCT_POINT_Y = 1 .label idx = 2 main: { + // points[0] = { 1, 2 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta points-1,y dey bne !- + // points[1] = { 3, 4 } ldy #SIZEOF_STRUCT_POINT !: lda __1-1,y @@ -23,6 +25,7 @@ main: { sta.z idx tax __b1: + // print(points[i]) txa asl tay @@ -31,23 +34,30 @@ main: { lda points+OFFSET_STRUCT_POINT_Y,y sta.z print.p_y jsr print + // for ( char i: 0..1) inx cpx #2 bne __b1 + // } rts } // print(byte zp(3) p_x, byte zp(4) p_y) print: { .label p_x = 3 .label p_y = 4 + // SCREEN[idx++] = p.x lda.z p_x ldy.z idx sta SCREEN,y + // SCREEN[idx++] = p.x; iny + // SCREEN[idx++] = p.y lda.z p_y sta SCREEN,y + // SCREEN[idx++] = p.y; iny sty.z idx + // } rts } points: .fill 2*2, 0 diff --git a/src/test/ref/struct-ptr-18.log b/src/test/ref/struct-ptr-18.log index e7bb7dda7..229910823 100644 --- a/src/test/ref/struct-ptr-18.log +++ b/src/test/ref/struct-ptr-18.log @@ -156,7 +156,7 @@ Identical Phi Values (byte) idx#9 (byte) idx#12 Identical Phi Values (byte) print::p_y#1 (byte) print::p_y#0 Identical Phi Values (byte) idx#11 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [16] if((byte) main::i#1!=rangelast(0,1)) goto main::@1 +Simple Condition (bool~) main::$1 [15] if((byte) main::i#1!=rangelast(0,1)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [2] (byte~) main::$2 ← (byte) 0 * (const byte) SIZEOF_STRUCT_POINT Constant right-side identified [4] (byte~) main::$3 ← (byte) 1 * (const byte) SIZEOF_STRUCT_POINT @@ -166,8 +166,8 @@ Constant (const byte) main::$2 = 0*SIZEOF_STRUCT_POINT Constant (const byte) main::$3 = 1*SIZEOF_STRUCT_POINT Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [14] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [16] if(main::i#1!=rangelast(0,1)) goto main::@1 to (number) 2 +Resolved ranged next value [13] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [15] if(main::i#1!=rangelast(0,1)) goto main::@1 to (number) 2 Simplifying constant evaluating to zero (byte) 0*(const byte) SIZEOF_STRUCT_POINT in Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero points in [3] *((const struct Point*) points + (const byte) main::$2) ← memcpy(*(&(const struct Point) $0), struct Point, (const byte) SIZEOF_STRUCT_POINT) diff --git a/src/test/ref/struct-ptr-19.asm b/src/test/ref/struct-ptr-19.asm index b36cb9c89..4101c023a 100644 --- a/src/test/ref/struct-ptr-19.asm +++ b/src/test/ref/struct-ptr-19.asm @@ -9,32 +9,41 @@ main: { .label ptr = point .label point = 3 + // point = { 1, 2 } ldy #SIZEOF_STRUCT_POINT !: lda __0-1,y sta point-1,y dey bne !- + // print(point) ldy.z point ldx point+OFFSET_STRUCT_POINT_Y lda #0 sta.z idx jsr print + // print(*ptr) ldy.z ptr ldx ptr+OFFSET_STRUCT_POINT_Y jsr print + // } rts } // print(byte register(Y) p_x, byte register(X) p_y) print: { + // SCREEN[idx++] = p.x tya ldy.z idx sta SCREEN,y + // SCREEN[idx++] = p.x; iny + // SCREEN[idx++] = p.y txa sta SCREEN,y + // SCREEN[idx++] = p.y; iny sty.z idx + // } rts } __0: .byte 1, 2 diff --git a/src/test/ref/struct-ptr-19.log b/src/test/ref/struct-ptr-19.log index 8958e933a..174864c32 100644 --- a/src/test/ref/struct-ptr-19.log +++ b/src/test/ref/struct-ptr-19.log @@ -132,8 +132,8 @@ Identical Phi Values (byte) idx#10 (byte) idx#12 Identical Phi Values (byte) idx#13 (byte) idx#10 Successful SSA optimization Pass2IdenticalPhiElimination Removing C-classic struct-unwound assignment [3] (struct Point) main::point ← struct-unwound {*(&(struct Point) main::point)} -Constant right-side identified [9] (byte*~) main::$2 ← (byte*)(const struct Point*) main::ptr + (const byte) OFFSET_STRUCT_POINT_X -Constant right-side identified [10] (byte*~) main::$3 ← (byte*)(const struct Point*) main::ptr + (const byte) OFFSET_STRUCT_POINT_Y +Constant right-side identified [8] (byte*~) main::$2 ← (byte*)(const struct Point*) main::ptr + (const byte) OFFSET_STRUCT_POINT_X +Constant right-side identified [9] (byte*~) main::$3 ← (byte*)(const struct Point*) main::ptr + (const byte) OFFSET_STRUCT_POINT_Y Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) idx#0 = 0 Constant (const byte*) main::$2 = (byte*)main::ptr+OFFSET_STRUCT_POINT_X diff --git a/src/test/ref/struct-ptr-2.asm b/src/test/ref/struct-ptr-2.asm index 4b0d51b16..9d315f114 100644 --- a/src/test/ref/struct-ptr-2.asm +++ b/src/test/ref/struct-ptr-2.asm @@ -9,9 +9,11 @@ main: { .label point_i1 = 4 ldx #0 __b1: + // points+i txa asl tay + // point_i = points+i tya clc adc #points adc #0 sta.z point_i+1 + // *((byte*)point_i+OFFS_X) = i txa sta points,y + // i+4 txa clc adc #4 + // *((byte*)point_i+OFFS_Y) = i+4 // points[i].x = i; ldy #OFFS_Y sta (point_i),y + // for( byte i: 0..3) inx cpx #4 bne __b1 ldx #0 __b2: + // points+i txa asl tay + // point_i = points+i tya clc adc #points adc #0 sta.z point_i1+1 + // SCREEN[i] = *((byte*)point_i+OFFS_X) lda points,y sta SCREEN,x + // (SCREEN+40)[i] = *((byte*)point_i+OFFS_Y) // SCREEN[i] = points[i].x; ldy #OFFS_Y lda (point_i1),y sta SCREEN+$28,x + // for( byte i: 0..3) inx cpx #4 bne __b2 + // } rts } points: .fill 2*4, 0 diff --git a/src/test/ref/struct-ptr-2.log b/src/test/ref/struct-ptr-2.log index 0d892dd3c..5966d6a73 100644 --- a/src/test/ref/struct-ptr-2.log +++ b/src/test/ref/struct-ptr-2.log @@ -119,25 +119,25 @@ Inferred type updated to byte in (unumber~) main::$5 ← (byte) main::i#2 + (byt Alias (struct Point*) main::point_i#0 = (struct Point*~) main::$0 Alias (struct Point*) main::point_i1#0 = (struct Point*~) main::$7 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$6 [14] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 -Simple Condition (bool~) main::$12 [28] if((byte) main::i1#1!=rangelast(0,3)) goto main::@3 +Simple Condition (bool~) main::$6 [13] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 +Simple Condition (bool~) main::$12 [26] if((byte) main::i1#1!=rangelast(0,3)) goto main::@3 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::i1#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [12] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [14] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4 -Resolved ranged next value [26] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [28] if(main::i1#1!=rangelast(0,3)) goto main::@3 to (number) 4 -Converting *(pointer+n) to pointer[n] [7] *((byte*~) main::$2) ← (byte) main::i#2 -- *(main::$1 + OFFS_X) -Converting *(pointer+n) to pointer[n] [11] *((byte*~) main::$4) ← (byte~) main::$5 -- *(main::$3 + OFFS_Y) -Converting *(pointer+n) to pointer[n] [22] *((const byte*) main::SCREEN + (byte) main::i1#2) ← *((byte*~) main::$9) -- *(main::$8 + OFFS_X) -Converting *(pointer+n) to pointer[n] [25] *((const byte*) main::SCREEN+(byte) $28 + (byte) main::i1#2) ← *((byte*~) main::$11) -- *(main::$10 + OFFS_Y) +Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4 +Resolved ranged next value [24] main::i1#1 ← ++ main::i1#2 to ++ +Resolved ranged comparison value [26] if(main::i1#1!=rangelast(0,3)) goto main::@3 to (number) 4 +Converting *(pointer+n) to pointer[n] [6] *((byte*~) main::$2) ← (byte) main::i#2 -- *(main::$1 + OFFS_X) +Converting *(pointer+n) to pointer[n] [10] *((byte*~) main::$4) ← (byte~) main::$5 -- *(main::$3 + OFFS_Y) +Converting *(pointer+n) to pointer[n] [20] *((const byte*) main::SCREEN + (byte) main::i1#2) ← *((byte*~) main::$9) -- *(main::$8 + OFFS_X) +Converting *(pointer+n) to pointer[n] [23] *((const byte*) main::SCREEN+(byte) $28 + (byte) main::i1#2) ← *((byte*~) main::$11) -- *(main::$10 + OFFS_Y) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero main::$1 in [6] (byte*~) main::$2 ← (byte*~) main::$1 + (const byte) OFFS_X -Simplifying expression containing zero main::$1 in [7] *((byte*~) main::$1 + (const byte) OFFS_X) ← (byte) main::i#2 -Simplifying expression containing zero main::$8 in [21] (byte*~) main::$9 ← (byte*~) main::$8 + (const byte) OFFS_X -Simplifying expression containing zero main::$8 in [22] *((const byte*) main::SCREEN + (byte) main::i1#2) ← *((byte*~) main::$8 + (const byte) OFFS_X) +Simplifying expression containing zero main::$1 in [5] (byte*~) main::$2 ← (byte*~) main::$1 + (const byte) OFFS_X +Simplifying expression containing zero main::$1 in [6] *((byte*~) main::$1 + (const byte) OFFS_X) ← (byte) main::i#2 +Simplifying expression containing zero main::$8 in [19] (byte*~) main::$9 ← (byte*~) main::$8 + (const byte) OFFS_X +Simplifying expression containing zero main::$8 in [20] *((const byte*) main::SCREEN + (byte) main::i1#2) ← *((byte*~) main::$8 + (const byte) OFFS_X) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*~) main::$2 and assignment [4] (byte*~) main::$2 ← (byte*~) main::$1 Eliminating unused variable (byte*~) main::$4 and assignment [7] (byte*~) main::$4 ← (byte*~) main::$3 + (const byte) OFFS_Y diff --git a/src/test/ref/struct-ptr-20.asm b/src/test/ref/struct-ptr-20.asm index 530e7e38b..c18a4a864 100644 --- a/src/test/ref/struct-ptr-20.asm +++ b/src/test/ref/struct-ptr-20.asm @@ -14,6 +14,7 @@ main: { lda #>settings sta.z setting+1 __b1: + // for(struct Setting* setting = settings; settingsettings+len*SIZEOF_STRUCT_SETTING bcc __b2 @@ -22,17 +23,22 @@ main: { cmp #off) ldy #0 lda (setting),y cmp #0 bne __b3 + // SCREEN[idx++] = setting->id ldy #OFFSET_STRUCT_SETTING_ID lda (setting),y sta SCREEN,x + // SCREEN[idx++] = setting->id; inx __b3: + // for(struct Setting* setting = settings; settinglen;i++) cpx settings bcc __b2 + // } rts __b2: + // SCREEN[i] = setting->buf[i] txa asl tay @@ -23,6 +26,7 @@ main: { iny lda ($fe),y sta SCREEN,y + // for( char i=0;ilen;i++) inx jmp __b1 } diff --git a/src/test/ref/struct-ptr-21.log b/src/test/ref/struct-ptr-21.log index a6525a31d..e8cc5a049 100644 --- a/src/test/ref/struct-ptr-21.log +++ b/src/test/ref/struct-ptr-21.log @@ -90,7 +90,7 @@ Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [4] if((byte) main::i#2<*((byte*~) main::$2)) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [2] (byte*~) main::$2 ← (byte*)(const struct Setting*) main::setting + (const byte) OFFSET_STRUCT_SETTING_LEN -Constant right-side identified [7] (word**~) main::$3 ← (word**)(const struct Setting*) main::setting + (const byte) OFFSET_STRUCT_SETTING_BUF +Constant right-side identified [6] (word**~) main::$3 ← (word**)(const struct Setting*) main::setting + (const byte) OFFSET_STRUCT_SETTING_BUF Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#0 = 0 Constant (const byte*) main::$2 = (byte*)main::setting+OFFSET_STRUCT_SETTING_LEN diff --git a/src/test/ref/struct-ptr-22.asm b/src/test/ref/struct-ptr-22.asm index 5dfd8b54d..8fc855fa6 100644 --- a/src/test/ref/struct-ptr-22.asm +++ b/src/test/ref/struct-ptr-22.asm @@ -7,10 +7,12 @@ .label print_line_cursor = 4 main: { .label __0 = 6 + // file->bufEdit = 0x4000 lda #<$4000 sta files lda #>$4000 sta files+1 + // file->bufEdit[3] = 0xAA lda #$aa ldy #3 ldx files @@ -18,15 +20,19 @@ main: { ldx files+1 stx.z $ff sta ($fe),y + // (char *)file->bufEdit lda files sta.z __0 lda files+1 sta.z __0+1 + // ((char *)file->bufEdit)[4] = 0xCC // writes address 0x0000 (wrong!) lda #$cc ldy #4 sta (__0),y + // print_cls() jsr print_cls + // print_str("$0000=") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -36,8 +42,10 @@ main: { lda #>str sta.z print_str.str+1 jsr print_str + // print_byte(*(char *)0x0000) ldx 0 jsr print_byte + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -47,14 +55,18 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("$4004=") lda #str1 sta.z print_str.str+1 jsr print_str + // print_byte(*(char *)0x4004) ldx $4004 jsr print_byte + // print_ln() jsr print_ln + // } rts str: .text "$0000=" .byte 0 @@ -64,6 +76,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -71,6 +84,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a zero-terminated string @@ -114,15 +137,19 @@ print_char: { print_str: { .label str = 2 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -135,7 +162,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -150,17 +179,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #persons sta.z print_person.person+1 jsr print_person + // print_person(person) lda #person sta.z print_person.person+1 jsr print_person + // } rts } // print_person(struct Person* zp(2) person) @@ -25,19 +28,27 @@ print_person: { .label __3 = 4 .label __4 = 2 .label person = 2 + // '0'+person->id lda #'0' clc ldy #0 adc (person),y + // SCREEN[idx++] = '0'+person->id sta SCREEN,x + // SCREEN[idx++] = '0'+person->id; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // SCREEN[idx++] = person->initials[0] ldy #OFFSET_STRUCT_PERSON_INITIALS lda (person),y sta SCREEN,x + // SCREEN[idx++] = person->initials[0]; inx + // SCREEN[idx++] = person->initials[1] tya clc adc.z person @@ -48,7 +59,9 @@ print_person: { ldy #1 lda (__3),y sta SCREEN,x + // SCREEN[idx++] = person->initials[1]; inx + // SCREEN[idx++] = person->initials[2] lda #OFFSET_STRUCT_PERSON_INITIALS clc adc.z __4 @@ -59,10 +72,14 @@ print_person: { ldy #2 lda (__4),y sta SCREEN,x + // SCREEN[idx++] = person->initials[2]; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // } rts } persons: .byte 1 diff --git a/src/test/ref/struct-ptr-23.log b/src/test/ref/struct-ptr-23.log index 606b40df3..78eaad983 100644 --- a/src/test/ref/struct-ptr-23.log +++ b/src/test/ref/struct-ptr-23.log @@ -162,11 +162,11 @@ Constant (const byte) idx#19 = 0 Successful SSA optimization Pass2ConstantIdentification Constant (const struct Person*) print_person::person#0 = main::person#0 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [17] (byte~) print_person::$0 ← (byte) '0' + *((byte*~) print_person::$1) -- *((byte*)print_person::person#2 + OFFSET_STRUCT_PERSON_ID) +Converting *(pointer+n) to pointer[n] [13] (byte~) print_person::$0 ← (byte) '0' + *((byte*~) print_person::$1) -- *((byte*)print_person::person#2 + OFFSET_STRUCT_PERSON_ID) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (byte*)print_person::person#2 in [16] (byte*~) print_person::$1 ← (byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID -Simplifying expression containing zero (byte*)print_person::person#2 in [17] (byte~) print_person::$0 ← (byte) '0' + *((byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID) -Simplifying expression containing zero print_person::$2 in [23] *((const byte*) SCREEN + (byte) idx#5) ← *((byte*~) print_person::$2 + (byte) 0) +Simplifying expression containing zero (byte*)print_person::person#2 in [12] (byte*~) print_person::$1 ← (byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID +Simplifying expression containing zero (byte*)print_person::person#2 in [13] (byte~) print_person::$0 ← (byte) '0' + *((byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID) +Simplifying expression containing zero print_person::$2 in [19] *((const byte*) SCREEN + (byte) idx#5) ← *((byte*~) print_person::$2 + (byte) 0) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*~) print_person::$1 and assignment [6] (byte*~) print_person::$1 ← (byte*)(struct Person*) print_person::person#2 Eliminating unused constant (const byte) OFFSET_STRUCT_PERSON_ID diff --git a/src/test/ref/struct-ptr-24.asm b/src/test/ref/struct-ptr-24.asm index 5df13674d..fbdf23fc1 100644 --- a/src/test/ref/struct-ptr-24.asm +++ b/src/test/ref/struct-ptr-24.asm @@ -10,15 +10,19 @@ main: { sta.z file sta.z file+1 __b1: + // while(file != filesEnd) lda.z file+1 cmp #>filesEnd bne __b2 lda.z file cmp #dir bne __breturn lda.z file cmp #(byte*) fileCur#0) goto main::@2 -Simple Condition (bool~) main::$5 [15] if((byte*) fileCur#6>=(byte*) fileTop#11) goto main::@return +Simple Condition (bool~) main::$1 [4] if((byte*) fileTop#0!=(const byte*) filesEnd) goto main::@1 +Simple Condition (bool~) main::$3 [7] if((const byte*) file>(byte*) fileCur#0) goto main::@2 +Simple Condition (bool~) main::$5 [11] if((byte*) fileCur#6>=(byte*) fileTop#11) goto main::@return Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) fileCur#0 = (byte*) 0 Constant (const byte*) fileTop#0 = (byte*) 0 Successful SSA optimization Pass2ConstantIdentification Removing PHI-reference to removed block (main) in block main::@1 -if() condition always false - eliminating [5] if((const byte*) fileTop#0!=(const byte*) filesEnd) goto main::@1 +if() condition always false - eliminating [4] if((const byte*) fileTop#0!=(const byte*) filesEnd) goto main::@1 Removing PHI-reference to removed block (main::@1) in block main::@2 -if() condition always false - eliminating [9] if((const byte*) file>(const byte*) fileCur#0) goto main::@2 +if() condition always false - eliminating [7] if((const byte*) file>(const byte*) fileCur#0) goto main::@2 Successful SSA optimization Pass2ConstantIfs Eliminating unused variable - keeping the phi block (byte*) fileCur#3 Eliminating unused constant (const byte*) filesEnd @@ -159,13 +159,13 @@ Successful SSA optimization PassNEliminateUnusedVars Alias (byte*) fileTop#1 = (byte*) fileTop#11 Alias (byte*) fileCur#1 = (byte*) fileCur#6 Successful SSA optimization Pass2AliasElimination -Constant right-side identified [1] (byte*) fileTop#1 ← -- (const byte*) fileTop#0 -Constant right-side identified [4] (byte*) fileCur#1 ← -- (const byte*) fileCur#0 +Constant right-side identified [0] (byte*) fileTop#1 ← -- (const byte*) fileTop#0 +Constant right-side identified [2] (byte*) fileCur#1 ← -- (const byte*) fileCur#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) fileTop#1 = --fileTop#0 Constant (const byte*) fileCur#1 = --fileCur#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [3] if((const byte*) fileCur#1>=(const byte*) fileTop#1) goto main::@return +if() condition always true - replacing block destination [1] if((const byte*) fileCur#1>=(const byte*) fileTop#1) goto main::@return Successful SSA optimization Pass2ConstantIfs Eliminating unused constant (const byte*) fileTop#1 Eliminating unused constant (const byte*) fileCur#1 diff --git a/src/test/ref/struct-ptr-26.asm b/src/test/ref/struct-ptr-26.asm index d724074fc..e3cbc5c39 100644 --- a/src/test/ref/struct-ptr-26.asm +++ b/src/test/ref/struct-ptr-26.asm @@ -5,10 +5,12 @@ main: { .label file = $4000 .label uSize = 4 + // file->bufEdit = 4 lda #<4 sta file lda #>4 sta file+1 + // uSize = *ptrw ldy #$1e lda file sta.z $fe @@ -19,13 +21,16 @@ main: { iny lda ($fe),y sta.z uSize+1 + // print_word(uSize) jsr print_word + // } rts } // Print a word as HEX // print_word(word zp(4) w) print_word: { .label w = 4 + // print_byte(>w) lda.z w+1 tax lda #<$400 @@ -33,37 +38,47 @@ print_word: { lda #>$400 sta.z print_char_cursor+1 jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } print_hextab: .text "0123456789abcdef" diff --git a/src/test/ref/struct-ptr-26.log b/src/test/ref/struct-ptr-26.log index 22f631beb..d6bbd6d34 100644 --- a/src/test/ref/struct-ptr-26.log +++ b/src/test/ref/struct-ptr-26.log @@ -299,18 +299,18 @@ Constant (const struct fileentry*) main::file#0 = (struct fileentry*) 0 Constant (const word) main::uSize#0 = 0 Constant (const struct fileentry*) main::file#1 = (struct fileentry*) 16384 Successful SSA optimization Pass2ConstantIdentification -Constant value identified (byte**)main::file#1 in [41] (byte**~) main::$3 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT -Constant value identified (byte**)main::file#1 in [43] (byte**~) main::$4 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT +Constant value identified (byte**)main::file#1 in [27] (byte**~) main::$3 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT +Constant value identified (byte**)main::file#1 in [29] (byte**~) main::$4 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT Successful SSA optimization Pass2ConstantValues -Converting *(pointer+n) to pointer[n] [42] *((byte**~) main::$3) ← (byte*) 4 -- *((byte**)main::file#1 + OFFSET_STRUCT_FILEENTRY_BUFEDIT) -Converting *(pointer+n) to pointer[n] [44] (byte*~) main::$0 ← *((byte**~) main::$4) + (byte) $1e -- *((byte**)main::file#1 + OFFSET_STRUCT_FILEENTRY_BUFEDIT) -Converting *(pointer+n) to pointer[n] [47] (word) main::uSize#1 ← *((word*) main::ptrw#0) -- *((word*)*((byte**)main::file#1 + OFFSET_STRUCT_FILEENTRY_BUFEDIT) + $1e) +Converting *(pointer+n) to pointer[n] [28] *((byte**~) main::$3) ← (byte*) 4 -- *((byte**)main::file#1 + OFFSET_STRUCT_FILEENTRY_BUFEDIT) +Converting *(pointer+n) to pointer[n] [30] (byte*~) main::$0 ← *((byte**~) main::$4) + (byte) $1e -- *((byte**)main::file#1 + OFFSET_STRUCT_FILEENTRY_BUFEDIT) +Converting *(pointer+n) to pointer[n] [32] (word) main::uSize#1 ← *((word*) main::ptrw#0) -- *((word*)*((byte**)main::file#1 + OFFSET_STRUCT_FILEENTRY_BUFEDIT) + $1e) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (byte**)main::file#1 in [41] (byte**~) main::$3 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT -Simplifying expression containing zero (byte**)main::file#1 in [42] *((byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT) ← (byte*) 4 -Simplifying expression containing zero (byte**)main::file#1 in [43] (byte**~) main::$4 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT -Simplifying expression containing zero (byte**)main::file#1 in [44] (byte*~) main::$0 ← *((byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT) + (byte) $1e -Simplifying expression containing zero (byte**)main::file#1 in [47] (word) main::uSize#1 ← *((word*)*((byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT) + (byte) $1e) +Simplifying expression containing zero (byte**)main::file#1 in [27] (byte**~) main::$3 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT +Simplifying expression containing zero (byte**)main::file#1 in [28] *((byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT) ← (byte*) 4 +Simplifying expression containing zero (byte**)main::file#1 in [29] (byte**~) main::$4 ← (byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT +Simplifying expression containing zero (byte**)main::file#1 in [30] (byte*~) main::$0 ← *((byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT) + (byte) $1e +Simplifying expression containing zero (byte**)main::file#1 in [32] (word) main::uSize#1 ← *((word*)*((byte**)(const struct fileentry*) main::file#1 + (const byte) OFFSET_STRUCT_FILEENTRY_BUFEDIT) + (byte) $1e) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte**~) main::$3 and assignment [17] (byte**~) main::$3 ← (byte**)(const struct fileentry*) main::file#1 Eliminating unused variable (byte**~) main::$4 and assignment [19] (byte**~) main::$4 ← (byte**)(const struct fileentry*) main::file#1 diff --git a/src/test/ref/struct-ptr-28.asm b/src/test/ref/struct-ptr-28.asm index 7944c57f7..02a9b19b4 100644 --- a/src/test/ref/struct-ptr-28.asm +++ b/src/test/ref/struct-ptr-28.asm @@ -10,29 +10,34 @@ main: { .label jesper = 8 .label henriette = $19 + // jesper = { 4, "jesper" } ldy #SIZEOF_STRUCT_PERSON !: lda __0-1,y sta jesper-1,y dey bne !- + // print_person(&jesper) ldx #0 lda #jesper sta.z print_person.person+1 jsr print_person + // henriette = { 7, "henriette" } ldy #SIZEOF_STRUCT_PERSON !: lda __1-1,y sta henriette-1,y dey bne !- + // print_person(&henriette) lda #henriette sta.z print_person.person+1 jsr print_person + // } rts } // print_person(struct Person* zp(2) person) @@ -40,17 +45,22 @@ print_person: { .label __1 = 4 .label __2 = 6 .label person = 2 + // SCREEN[idx++] = DIGIT[person->id] ldy #0 lda (person),y tay lda DIGIT,y sta SCREEN,x + // SCREEN[idx++] = DIGIT[person->id]; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx ldy #0 __b1: + // for(byte i=0; person->name[i]; i++) lda #OFFSET_STRUCT_PERSON_NAME clc adc.z person @@ -61,11 +71,15 @@ print_person: { lda (__1),y cmp #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // } rts __b2: + // SCREEN[idx++] = person->name[i] lda #OFFSET_STRUCT_PERSON_NAME clc adc.z person @@ -75,7 +89,9 @@ print_person: { sta.z __2+1 lda (__2),y sta SCREEN,x + // SCREEN[idx++] = person->name[i]; inx + // for(byte i=0; person->name[i]; i++) iny jmp __b1 } diff --git a/src/test/ref/struct-ptr-28.log b/src/test/ref/struct-ptr-28.log index c38e40bf4..433a9bb2c 100644 --- a/src/test/ref/struct-ptr-28.log +++ b/src/test/ref/struct-ptr-28.log @@ -182,19 +182,19 @@ Identical Phi Values (byte) idx#1 (byte) idx#16 Identical Phi Values (struct Person*) print_person::person#3 (struct Person*) print_person::person#2 Identical Phi Values (byte) idx#17 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_person::$3 [27] if((byte) 0!=*((byte*~) print_person::$1 + (byte) print_person::i#2)) goto print_person::@2 +Simple Condition (bool~) print_person::$3 [23] if((byte) 0!=*((byte*~) print_person::$1 + (byte) print_person::i#2)) goto print_person::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Removing C-classic struct-unwound assignment [2] (struct Person) main::jesper ← struct-unwound {*(&(struct Person) main::jesper)} -Removing C-classic struct-unwound assignment [8] (struct Person) main::henriette ← struct-unwound {*(&(struct Person) main::henriette)} +Removing C-classic struct-unwound assignment [7] (struct Person) main::henriette ← struct-unwound {*(&(struct Person) main::henriette)} Constant (const struct Person*) print_person::person#0 = &main::jesper Constant (const struct Person*) print_person::person#1 = &main::henriette Constant (const byte) idx#20 = 0 Constant (const byte) print_person::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [19] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*~) print_person::$0)) -- *((byte*)print_person::person#2 + OFFSET_STRUCT_PERSON_ID) +Converting *(pointer+n) to pointer[n] [15] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*~) print_person::$0)) -- *((byte*)print_person::person#2 + OFFSET_STRUCT_PERSON_ID) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (byte*)print_person::person#2 in [18] (byte*~) print_person::$0 ← (byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID -Simplifying expression containing zero (byte*)print_person::person#2 in [19] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID)) +Simplifying expression containing zero (byte*)print_person::person#2 in [14] (byte*~) print_person::$0 ← (byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID +Simplifying expression containing zero (byte*)print_person::person#2 in [15] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID)) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*~) print_person::$0 and assignment [6] (byte*~) print_person::$0 ← (byte*)(struct Person*) print_person::person#2 Eliminating unused constant (const byte) OFFSET_STRUCT_PERSON_ID diff --git a/src/test/ref/struct-ptr-3.asm b/src/test/ref/struct-ptr-3.asm index 08470c4b6..03239ce3f 100644 --- a/src/test/ref/struct-ptr-3.asm +++ b/src/test/ref/struct-ptr-3.asm @@ -6,13 +6,18 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label SCREEN = $400 + // SCREEN[0] = (*points).x lda $1000 sta SCREEN + // SCREEN[1] = (*points).y lda $1000+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = (*points).x lda $1000+SIZEOF_STRUCT_POINT sta SCREEN+2 + // SCREEN[3] = (*points).y lda $1000+SIZEOF_STRUCT_POINT+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } diff --git a/src/test/ref/struct-ptr-30.asm b/src/test/ref/struct-ptr-30.asm index 12f504754..bb50ae1f6 100644 --- a/src/test/ref/struct-ptr-30.asm +++ b/src/test/ref/struct-ptr-30.asm @@ -11,6 +11,7 @@ main: { sta.z idx tax __b1: + // print(points[i]) txa asl stx.z $ff @@ -24,29 +25,42 @@ main: { lda points+OFFSET_STRUCT_POINT_Y+1,y sta.z print.p_y+1 jsr print + // for ( char i: 0..3) inx cpx #4 bne __b1 + // } rts } // print(byte zp(3) p_x, signed word zp(4) p_y) print: { .label p_x = 3 .label p_y = 4 + // SCREEN[idx++] = p.x lda.z p_x ldy.z idx sta SCREEN,y + // SCREEN[idx++] = p.x; iny + // p.y lda.z p_y+1 + // SCREEN[idx++] = >p.y sta SCREEN,y + // SCREEN[idx++] = >p.y; iny + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,y + // SCREEN[idx++] = ' '; iny sty.z idx + // } rts } points: .byte 1 diff --git a/src/test/ref/struct-ptr-30.log b/src/test/ref/struct-ptr-30.log index de57d9b08..45458446a 100644 --- a/src/test/ref/struct-ptr-30.log +++ b/src/test/ref/struct-ptr-30.log @@ -143,13 +143,13 @@ Identical Phi Values (byte) idx#11 (byte) idx#14 Identical Phi Values (signed word) print::p_y#1 (signed word) print::p_y#0 Identical Phi Values (byte) idx#13 (byte) idx#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [11] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 +Simple Condition (bool~) main::$1 [10] if((byte) main::i#1!=rangelast(0,3)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) idx#15 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4 +Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,3)) goto main::@1 to (number) 4 Simplifying expression containing zero (byte*)points in [4] (byte) print::p_x#0 ← *((byte*)(const struct Point*) points+(const byte) OFFSET_STRUCT_POINT_X + (byte~) main::$2) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) OFFSET_STRUCT_POINT_X diff --git a/src/test/ref/struct-ptr-31.asm b/src/test/ref/struct-ptr-31.asm index a235919ce..a5a8406de 100644 --- a/src/test/ref/struct-ptr-31.asm +++ b/src/test/ref/struct-ptr-31.asm @@ -6,17 +6,20 @@ .const SIZEOF_STRUCT_PERSON = $11 .const OFFSET_STRUCT_PERSON_NAME = 1 main: { + // print_person(persons) ldx #0 lda #persons sta.z print_person.person+1 jsr print_person + // print_person(persons+1) lda #persons+1*SIZEOF_STRUCT_PERSON sta.z print_person.person+1 jsr print_person + // } rts } // print_person(struct Person* zp(2) person) @@ -24,17 +27,22 @@ print_person: { .label __1 = 4 .label __2 = 6 .label person = 2 + // SCREEN[idx++] = DIGIT[person->id] ldy #0 lda (person),y tay lda DIGIT,y sta SCREEN,x + // SCREEN[idx++] = DIGIT[person->id]; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx ldy #0 __b1: + // for(byte i=0; person->name[i]; i++) lda #OFFSET_STRUCT_PERSON_NAME clc adc.z person @@ -45,11 +53,15 @@ print_person: { lda (__1),y cmp #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // } rts __b2: + // SCREEN[idx++] = person->name[i] lda #OFFSET_STRUCT_PERSON_NAME clc adc.z person @@ -59,7 +71,9 @@ print_person: { sta.z __2+1 lda (__2),y sta SCREEN,x + // SCREEN[idx++] = person->name[i]; inx + // for(byte i=0; person->name[i]; i++) iny jmp __b1 } diff --git a/src/test/ref/struct-ptr-31.log b/src/test/ref/struct-ptr-31.log index 910240e63..3924d6cd4 100644 --- a/src/test/ref/struct-ptr-31.log +++ b/src/test/ref/struct-ptr-31.log @@ -176,17 +176,17 @@ Identical Phi Values (byte) idx#1 (byte) idx#16 Identical Phi Values (struct Person*) print_person::person#3 (struct Person*) print_person::person#2 Identical Phi Values (byte) idx#17 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_person::$3 [23] if((byte) 0!=*((byte*~) print_person::$1 + (byte) print_person::i#2)) goto print_person::@2 +Simple Condition (bool~) print_person::$3 [19] if((byte) 0!=*((byte*~) print_person::$1 + (byte) print_person::i#2)) goto print_person::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const struct Person*) print_person::person#0 = persons Constant (const struct Person*) print_person::person#1 = persons+1*SIZEOF_STRUCT_PERSON Constant (const byte) idx#20 = 0 Constant (const byte) print_person::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Converting *(pointer+n) to pointer[n] [15] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*~) print_person::$0)) -- *((byte*)print_person::person#2 + OFFSET_STRUCT_PERSON_ID) +Converting *(pointer+n) to pointer[n] [11] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*~) print_person::$0)) -- *((byte*)print_person::person#2 + OFFSET_STRUCT_PERSON_ID) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (byte*)print_person::person#2 in [14] (byte*~) print_person::$0 ← (byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID -Simplifying expression containing zero (byte*)print_person::person#2 in [15] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID)) +Simplifying expression containing zero (byte*)print_person::person#2 in [10] (byte*~) print_person::$0 ← (byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID +Simplifying expression containing zero (byte*)print_person::person#2 in [11] *((const byte*) SCREEN + (byte) idx#13) ← *((const byte*) DIGIT + *((byte*)(struct Person*) print_person::person#2 + (const byte) OFFSET_STRUCT_PERSON_ID)) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*~) print_person::$0 and assignment [4] (byte*~) print_person::$0 ← (byte*)(struct Person*) print_person::person#2 Eliminating unused constant (const byte) OFFSET_STRUCT_PERSON_ID diff --git a/src/test/ref/struct-ptr-32.asm b/src/test/ref/struct-ptr-32.asm index 72e97cac4..dfa1952fe 100644 --- a/src/test/ref/struct-ptr-32.asm +++ b/src/test/ref/struct-ptr-32.asm @@ -8,26 +8,35 @@ main: { .label SCREEN = $400 .label person = persons+SIZEOF_STRUCT_PERSON + // persons[0].id = 7 lda #7 sta persons + // persons[1].id = 9 lda #9 sta persons+1*SIZEOF_STRUCT_PERSON + // persons[0].name[8] = 'a' lda #'a' sta persons+OFFSET_STRUCT_PERSON_NAME+8 + // persons[1].name[8] = 'b' lda #'b' sta persons+OFFSET_STRUCT_PERSON_NAME+1*SIZEOF_STRUCT_PERSON+8 + // persons[0].age = 321 lda #<$141 sta persons+OFFSET_STRUCT_PERSON_AGE lda #>$141 sta persons+OFFSET_STRUCT_PERSON_AGE+1 + // persons[1].age = 123 lda #0 sta persons+OFFSET_STRUCT_PERSON_AGE+1*SIZEOF_STRUCT_PERSON+1 lda #<$7b sta persons+OFFSET_STRUCT_PERSON_AGE+1*SIZEOF_STRUCT_PERSON + // SCREEN[0] = person->name[8] lda persons+OFFSET_STRUCT_PERSON_NAME+8 sta SCREEN + // SCREEN[1] = person->name[8] lda person+OFFSET_STRUCT_PERSON_NAME+8 sta SCREEN+1 + // } rts } persons: .fill $10*2, 0 diff --git a/src/test/ref/struct-ptr-33.asm b/src/test/ref/struct-ptr-33.asm index 2be75ffaf..c3fd8349b 100644 --- a/src/test/ref/struct-ptr-33.asm +++ b/src/test/ref/struct-ptr-33.asm @@ -7,10 +7,13 @@ main: { .label SCREEN = $400 .label person = persons+SIZEOF_STRUCT_PERSON + // SCREEN[0] = person->name[2] lda persons+OFFSET_STRUCT_PERSON_NAME+2 sta SCREEN + // SCREEN[1] = person->name[2] lda person+OFFSET_STRUCT_PERSON_NAME+2 sta SCREEN+1 + // } rts } persons: .byte 7 diff --git a/src/test/ref/struct-ptr-34.asm b/src/test/ref/struct-ptr-34.asm index decf1e950..6afd00832 100644 --- a/src/test/ref/struct-ptr-34.asm +++ b/src/test/ref/struct-ptr-34.asm @@ -7,12 +7,14 @@ main: { .const jesper_id = 4 .const henriette_id = 7 + // jesper = { 4, "jesper" } ldy #$10 !: lda __0-1,y sta jesper_name-1,y dey bne !- + // print_person(jesper) lda #jesper_name @@ -21,18 +23,21 @@ main: { sta.z idx ldx #jesper_id jsr print_person + // henriette = { 7, "henriette" } ldy #$10 !: lda __1-1,y sta henriette_name-1,y dey bne !- + // print_person(henriette) lda #henriette_name sta.z print_person.person_name+1 ldx #henriette_id jsr print_person + // } rts jesper_name: .fill $10, 0 henriette_name: .fill $10, 0 @@ -40,28 +45,39 @@ main: { // print_person(byte register(X) person_id, byte* zp(3) person_name) print_person: { .label person_name = 3 + // SCREEN[idx++] = DIGIT[person.id] lda DIGIT,x ldy.z idx sta SCREEN,y + // SCREEN[idx++] = DIGIT[person.id]; ldx.z idx inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx ldy #0 __b1: + // for(byte i=0; person.name[i]; i++) lda (person_name),y cmp #0 bne __b2 + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx stx.z idx + // } rts __b2: + // SCREEN[idx++] = person.name[i] lda (person_name),y sta SCREEN,x + // SCREEN[idx++] = person.name[i]; inx + // for(byte i=0; person.name[i]; i++) iny jmp __b1 } diff --git a/src/test/ref/struct-ptr-34.log b/src/test/ref/struct-ptr-34.log index 2ce155d89..aadf2f468 100644 --- a/src/test/ref/struct-ptr-34.log +++ b/src/test/ref/struct-ptr-34.log @@ -197,7 +197,7 @@ Identical Phi Values (byte) idx#1 (byte) idx#16 Identical Phi Values (byte*) print_person::person_name#2 (byte*) print_person::person_name#4 Identical Phi Values (byte) idx#17 (byte) idx#1 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_person::$0 [25] if((byte) 0!=*((byte*) print_person::person_name#4 + (byte) print_person::i#2)) goto print_person::@2 +Simple Condition (bool~) print_person::$0 [21] if((byte) 0!=*((byte*) print_person::person_name#4 + (byte) print_person::i#2)) goto print_person::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) print_person::person_id#0 = main::jesper_id Constant (const byte*) print_person::person_name#0 = main::jesper_name diff --git a/src/test/ref/struct-ptr-4.asm b/src/test/ref/struct-ptr-4.asm index 057ab9bcb..a9d7c01ae 100644 --- a/src/test/ref/struct-ptr-4.asm +++ b/src/test/ref/struct-ptr-4.asm @@ -19,14 +19,18 @@ main: { lda #>POINTS sta.z points+1 __b1: + // (*points).x = i txa ldy #0 sta (points),y + // i+5 txa clc adc #5 + // (*points).y = i+5 ldy #OFFSET_STRUCT_POINT_Y sta (points),y + // points++; lda #SIZEOF_STRUCT_POINT clc adc.z points @@ -34,6 +38,7 @@ main: { bcc !+ inc.z points+1 !: + // for( byte i: 0..3) inx cpx #4 bne __b1 @@ -45,17 +50,24 @@ main: { lda #>POINTS sta.z points_1+1 __b2: + // SCREEN[idx++] = (*points).x ldy #0 lda (points_1),y sta SCREEN,x + // SCREEN[idx++] = (*points).x; inx + // SCREEN[idx++] = (*points).y ldy #OFFSET_STRUCT_POINT_Y lda (points_1),y sta SCREEN,x + // SCREEN[idx++] = (*points).y; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // points++; lda #SIZEOF_STRUCT_POINT clc adc.z points_1 @@ -63,9 +75,11 @@ main: { bcc !+ inc.z points_1+1 !: + // for( byte i: 0..3) inc.z i1 lda #4 cmp.z i1 bne __b2 + // } rts } diff --git a/src/test/ref/struct-ptr-5.asm b/src/test/ref/struct-ptr-5.asm index 65b092adb..6fc12b63f 100644 --- a/src/test/ref/struct-ptr-5.asm +++ b/src/test/ref/struct-ptr-5.asm @@ -11,21 +11,27 @@ main: { .label entry1 = ENTRIES+1*SIZEOF_STRUCT_ENTRY .label entry2 = ENTRIES+2*SIZEOF_STRUCT_ENTRY .label entry = 2 + // entry0->next = entry2 lda #entry2 sta ENTRIES+OFFSET_STRUCT_ENTRY_NEXT+1 + // entry0->value = 1 lda #1 sta ENTRIES + // entry2->next = entry1 lda #entry1 sta entry2+OFFSET_STRUCT_ENTRY_NEXT+1 + // entry2->value = 2 lda #2 sta entry2 + // entry1->next = 0 lda #<0 sta entry1+OFFSET_STRUCT_ENTRY_NEXT sta entry1+OFFSET_STRUCT_ENTRY_NEXT+1 + // entry1->value = 3 lda #3 sta entry1 ldx #0 @@ -34,31 +40,45 @@ main: { lda #>ENTRIES sta.z entry+1 __b1: + // while(entry) lda.z entry+1 cmp #>0 bne __b2 lda.z entry cmp #<0 bne __b2 + // } rts __b2: + // '0'+entry->value lda #'0' clc ldy #0 adc (entry),y + // SCREEN[idx++] = '0'+entry->value sta SCREEN,x + // SCREEN[idx++] = '0'+entry->value; inx + // next ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y + // SCREEN[idx++] = next sta SCREEN,x + // SCREEN[idx++] = next; inx + // >entry->next ldy #OFFSET_STRUCT_ENTRY_NEXT+1 lda (entry),y + // SCREEN[idx++] = >entry->next sta SCREEN,x + // SCREEN[idx++] = >entry->next; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // entry = entry->next ldy #OFFSET_STRUCT_ENTRY_NEXT lda (entry),y pha diff --git a/src/test/ref/struct-ptr-5.log b/src/test/ref/struct-ptr-5.log index b8fff5127..559056cc6 100644 --- a/src/test/ref/struct-ptr-5.log +++ b/src/test/ref/struct-ptr-5.log @@ -171,10 +171,10 @@ Alias (struct Entry*) main::entry2#0 = (struct Entry*~) main::$1 Alias (struct Entry*) main::entry#2 = (struct Entry*) main::entry#3 Alias (byte) main::idx#5 = (byte) main::idx#6 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$17 [23] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 +Simple Condition (bool~) main::$17 [21] if((struct Entry*)(word) 0!=(struct Entry*) main::entry#2) goto main::@2 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [1] (byte~) main::$5 ← (byte) 1 * (const byte) SIZEOF_STRUCT_ENTRY -Constant right-side identified [4] (byte~) main::$6 ← (byte) 2 * (const byte) SIZEOF_STRUCT_ENTRY +Constant right-side identified [3] (byte~) main::$6 ← (byte) 2 * (const byte) SIZEOF_STRUCT_ENTRY Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const struct Entry*) main::entry0#0 = ENTRIES Constant (const byte) main::$5 = 1*SIZEOF_STRUCT_ENTRY @@ -182,28 +182,28 @@ Constant (const byte) main::$6 = 2*SIZEOF_STRUCT_ENTRY Constant (const byte) main::idx#0 = 0 Constant (const struct Entry*) main::entry#0 = ENTRIES Successful SSA optimization Pass2ConstantIdentification -Constant value identified (struct Entry**)main::entry0#0 in [7] (struct Entry**~) main::$7 ← (struct Entry**)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT -Constant value identified (byte*)main::entry0#0 in [9] (byte*~) main::$8 ← (byte*)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE +Constant value identified (struct Entry**)main::entry0#0 in [5] (struct Entry**~) main::$7 ← (struct Entry**)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT +Constant value identified (byte*)main::entry0#0 in [7] (byte*~) main::$8 ← (byte*)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE Successful SSA optimization Pass2ConstantValues -Converting *(pointer+n) to pointer[n] [8] *((struct Entry**~) main::$7) ← (struct Entry*) main::entry2#0 -- *((struct Entry**)main::entry0#0 + OFFSET_STRUCT_ENTRY_NEXT) -Converting *(pointer+n) to pointer[n] [10] *((byte*~) main::$8) ← (byte) 1 -- *((byte*)main::entry0#0 + OFFSET_STRUCT_ENTRY_VALUE) -Converting *(pointer+n) to pointer[n] [12] *((struct Entry**~) main::$9) ← (struct Entry*) main::entry1#0 -- *((struct Entry**)main::entry2#0 + OFFSET_STRUCT_ENTRY_NEXT) -Converting *(pointer+n) to pointer[n] [14] *((byte*~) main::$10) ← (byte) 2 -- *((byte*)main::entry2#0 + OFFSET_STRUCT_ENTRY_VALUE) -Converting *(pointer+n) to pointer[n] [16] *((struct Entry**~) main::$11) ← (struct Entry*) 0 -- *((struct Entry**)main::entry1#0 + OFFSET_STRUCT_ENTRY_NEXT) -Converting *(pointer+n) to pointer[n] [18] *((byte*~) main::$12) ← (byte) 3 -- *((byte*)main::entry1#0 + OFFSET_STRUCT_ENTRY_VALUE) -Converting *(pointer+n) to pointer[n] [26] (byte~) main::$2 ← (byte) '0' + *((byte*~) main::$13) -- *((byte*)main::entry#2 + OFFSET_STRUCT_ENTRY_VALUE) -Converting *(pointer+n) to pointer[n] [30] (byte~) main::$3 ← < *((struct Entry**~) main::$14) -- *((struct Entry**)main::entry#2 + OFFSET_STRUCT_ENTRY_NEXT) -Converting *(pointer+n) to pointer[n] [34] (byte~) main::$4 ← > *((struct Entry**~) main::$15) -- *((struct Entry**)main::entry#2 + OFFSET_STRUCT_ENTRY_NEXT) -Converting *(pointer+n) to pointer[n] [40] (struct Entry*) main::entry#1 ← *((struct Entry**~) main::$16) -- *((struct Entry**)main::entry#2 + OFFSET_STRUCT_ENTRY_NEXT) +Converting *(pointer+n) to pointer[n] [6] *((struct Entry**~) main::$7) ← (struct Entry*) main::entry2#0 -- *((struct Entry**)main::entry0#0 + OFFSET_STRUCT_ENTRY_NEXT) +Converting *(pointer+n) to pointer[n] [8] *((byte*~) main::$8) ← (byte) 1 -- *((byte*)main::entry0#0 + OFFSET_STRUCT_ENTRY_VALUE) +Converting *(pointer+n) to pointer[n] [10] *((struct Entry**~) main::$9) ← (struct Entry*) main::entry1#0 -- *((struct Entry**)main::entry2#0 + OFFSET_STRUCT_ENTRY_NEXT) +Converting *(pointer+n) to pointer[n] [12] *((byte*~) main::$10) ← (byte) 2 -- *((byte*)main::entry2#0 + OFFSET_STRUCT_ENTRY_VALUE) +Converting *(pointer+n) to pointer[n] [14] *((struct Entry**~) main::$11) ← (struct Entry*) 0 -- *((struct Entry**)main::entry1#0 + OFFSET_STRUCT_ENTRY_NEXT) +Converting *(pointer+n) to pointer[n] [16] *((byte*~) main::$12) ← (byte) 3 -- *((byte*)main::entry1#0 + OFFSET_STRUCT_ENTRY_VALUE) +Converting *(pointer+n) to pointer[n] [23] (byte~) main::$2 ← (byte) '0' + *((byte*~) main::$13) -- *((byte*)main::entry#2 + OFFSET_STRUCT_ENTRY_VALUE) +Converting *(pointer+n) to pointer[n] [27] (byte~) main::$3 ← < *((struct Entry**~) main::$14) -- *((struct Entry**)main::entry#2 + OFFSET_STRUCT_ENTRY_NEXT) +Converting *(pointer+n) to pointer[n] [31] (byte~) main::$4 ← > *((struct Entry**~) main::$15) -- *((struct Entry**)main::entry#2 + OFFSET_STRUCT_ENTRY_NEXT) +Converting *(pointer+n) to pointer[n] [37] (struct Entry*) main::entry#1 ← *((struct Entry**~) main::$16) -- *((struct Entry**)main::entry#2 + OFFSET_STRUCT_ENTRY_NEXT) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (byte*)main::entry0#0 in [9] (byte*~) main::$8 ← (byte*)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE -Simplifying expression containing zero (byte*)main::entry0#0 in [10] *((byte*)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) ← (byte) 1 -Simplifying expression containing zero (byte*)main::entry2#0 in [13] (byte*~) main::$10 ← (byte*)(struct Entry*) main::entry2#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE -Simplifying expression containing zero (byte*)main::entry2#0 in [14] *((byte*)(struct Entry*) main::entry2#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) ← (byte) 2 -Simplifying expression containing zero (byte*)main::entry1#0 in [17] (byte*~) main::$12 ← (byte*)(struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE -Simplifying expression containing zero (byte*)main::entry1#0 in [18] *((byte*)(struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) ← (byte) 3 -Simplifying expression containing zero (byte*)main::entry#2 in [25] (byte*~) main::$13 ← (byte*)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_VALUE -Simplifying expression containing zero (byte*)main::entry#2 in [26] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) +Simplifying expression containing zero (byte*)main::entry0#0 in [7] (byte*~) main::$8 ← (byte*)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE +Simplifying expression containing zero (byte*)main::entry0#0 in [8] *((byte*)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) ← (byte) 1 +Simplifying expression containing zero (byte*)main::entry2#0 in [11] (byte*~) main::$10 ← (byte*)(struct Entry*) main::entry2#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE +Simplifying expression containing zero (byte*)main::entry2#0 in [12] *((byte*)(struct Entry*) main::entry2#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) ← (byte) 2 +Simplifying expression containing zero (byte*)main::entry1#0 in [15] (byte*~) main::$12 ← (byte*)(struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE +Simplifying expression containing zero (byte*)main::entry1#0 in [16] *((byte*)(struct Entry*) main::entry1#0 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) ← (byte) 3 +Simplifying expression containing zero (byte*)main::entry#2 in [22] (byte*~) main::$13 ← (byte*)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_VALUE +Simplifying expression containing zero (byte*)main::entry#2 in [23] (byte~) main::$2 ← (byte) '0' + *((byte*)(struct Entry*) main::entry#2 + (const byte) OFFSET_STRUCT_ENTRY_VALUE) Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (struct Entry**~) main::$7 and assignment [2] (struct Entry**~) main::$7 ← (struct Entry**)(const struct Entry*) main::entry0#0 + (const byte) OFFSET_STRUCT_ENTRY_NEXT Eliminating unused variable (byte*~) main::$8 and assignment [4] (byte*~) main::$8 ← (byte*)(const struct Entry*) main::entry0#0 diff --git a/src/test/ref/struct-ptr-6.asm b/src/test/ref/struct-ptr-6.asm index 6aafd6d78..93f231747 100644 --- a/src/test/ref/struct-ptr-6.asm +++ b/src/test/ref/struct-ptr-6.asm @@ -6,13 +6,18 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label SCREEN = $400 + // SCREEN[0] = points->x lda $1000 sta SCREEN + // SCREEN[1] = points->y lda $1000+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[2] = points->x lda $1000+SIZEOF_STRUCT_POINT sta SCREEN+2 + // SCREEN[3] = points->y lda $1000+SIZEOF_STRUCT_POINT+OFFSET_STRUCT_POINT_Y sta SCREEN+3 + // } rts } diff --git a/src/test/ref/struct-ptr-7.asm b/src/test/ref/struct-ptr-7.asm index ded40c789..0e2b64a3d 100644 --- a/src/test/ref/struct-ptr-7.asm +++ b/src/test/ref/struct-ptr-7.asm @@ -6,22 +6,31 @@ .const OFFSET_STRUCT_POINT_Y = 1 main: { .label SCREEN = $400 + // points[0].x = 2 lda #2 sta points + // points[0].y = 3 lda #3 sta points+OFFSET_STRUCT_POINT_Y + // points[1].x = 5 lda #5 sta points+1*SIZEOF_STRUCT_POINT + // points[1].y = 6 lda #6 sta points+OFFSET_STRUCT_POINT_Y+1*SIZEOF_STRUCT_POINT + // SCREEN[0] = points[0].x lda points sta SCREEN + // SCREEN[1] = points[0].y lda points+OFFSET_STRUCT_POINT_Y sta SCREEN+1 + // SCREEN[3] = points[1].x lda points+1*SIZEOF_STRUCT_POINT sta SCREEN+3 + // SCREEN[4] = points[1].y lda points+OFFSET_STRUCT_POINT_Y+1*SIZEOF_STRUCT_POINT sta SCREEN+4 + // } rts } points: .fill 2*2, 0 diff --git a/src/test/ref/struct-ptr-8.asm b/src/test/ref/struct-ptr-8.asm index 11da00c97..51d682cfb 100644 --- a/src/test/ref/struct-ptr-8.asm +++ b/src/test/ref/struct-ptr-8.asm @@ -10,17 +10,22 @@ main: { lda #0 sta.z i __b1: + // 2+i lax.z i axs #-[2] + // points[i].x = 2+i lda.z i asl tay txa sta points,y + // 3+i lda #3 clc adc.z i + // points[i].y = 3+i sta points+OFFSET_STRUCT_POINT_Y,y + // for( byte i: 0..1) inc.z i lda #2 cmp.z i @@ -29,22 +34,30 @@ main: { txa sta.z i1 __b2: + // SCREEN[idx++] = points[i].x lda.z i1 asl tay lda points,y sta SCREEN,x + // SCREEN[idx++] = points[i].x; inx + // SCREEN[idx++] = points[i].y lda points+OFFSET_STRUCT_POINT_Y,y sta SCREEN,x + // SCREEN[idx++] = points[i].y; inx + // SCREEN[idx++] = ' ' lda #' ' sta SCREEN,x + // SCREEN[idx++] = ' '; inx + // for( byte i: 0..1) inc.z i1 lda #2 cmp.z i1 bne __b2 + // } rts } points: .fill 2*2, 0 diff --git a/src/test/ref/struct-ptr-9.asm b/src/test/ref/struct-ptr-9.asm index 1b338e07f..2ed5eb862 100644 --- a/src/test/ref/struct-ptr-9.asm +++ b/src/test/ref/struct-ptr-9.asm @@ -9,6 +9,7 @@ main: { .label i1 = 2 ldy #0 __b1: + // points[i] = { 2, i } tya asl tax @@ -16,12 +17,14 @@ main: { sta points,x tya sta points+OFFSET_STRUCT_POINT_Y,x + // for( byte i: 0..1) iny cpy #2 bne __b1 lda #0 sta.z i1 __b2: + // SCREEN[i] = points[i] lda.z i1 asl ldx #SIZEOF_STRUCT_POINT @@ -32,10 +35,12 @@ main: { iny dex bne !- + // for( byte i: 0..1) inc.z i1 lda #2 cmp.z i1 bne __b2 + // } rts } points: .fill 2*2, 0 diff --git a/src/test/ref/subexpr-optimize-0.asm b/src/test/ref/subexpr-optimize-0.asm index 585e6a38c..dd07ce97d 100644 --- a/src/test/ref/subexpr-optimize-0.asm +++ b/src/test/ref/subexpr-optimize-0.asm @@ -12,24 +12,31 @@ main: { sta.z screen+1 ldx #0 __b1: + // i*2 txa asl sta.z __1 + // *screen++ = i*2 ldy #0 sta (screen),y + // *screen++ = i*2; inc.z screen bne !+ inc.z screen+1 !: + // *screen++ = i*2 lda.z __1 ldy #0 sta (screen),y + // *screen++ = i*2; inc.z screen bne !+ inc.z screen+1 !: + // for( byte i: 0..2) inx cpx #3 bne __b1 + // } rts } diff --git a/src/test/ref/subexpr-optimize-1.asm b/src/test/ref/subexpr-optimize-1.asm index d07aa5afa..b0feb073f 100644 --- a/src/test/ref/subexpr-optimize-1.asm +++ b/src/test/ref/subexpr-optimize-1.asm @@ -6,16 +6,22 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // SCREEN[i] = SCREEN[i+1] lda SCREEN+1,x sta SCREEN,x + // (SCREEN+40)[i] = (SCREEN+40)[i+1] lda SCREEN+$28+1,x sta SCREEN+$28,x + // (SCREEN+80)[i] = (SCREEN+80)[i+1] lda SCREEN+$50+1,x sta SCREEN+$50,x + // (SCREEN+120)[i] = (SCREEN+120)[i+1] lda SCREEN+$78+1,x sta SCREEN+$78,x + // for(byte i: 0..38) inx cpx #$27 bne __b1 + // } rts } diff --git a/src/test/ref/subexpr-optimize-2.asm b/src/test/ref/subexpr-optimize-2.asm index 2765e2178..b84023c49 100644 --- a/src/test/ref/subexpr-optimize-2.asm +++ b/src/test/ref/subexpr-optimize-2.asm @@ -12,29 +12,39 @@ main: { lda #0 sta.z i __b1: + // i+1 lda.z i clc adc #1 + // (i+1)*2 asl + // *screen++ = (i+1)*2 ldy #0 sta (screen),y + // *screen++ = (i+1)*2; inc.z screen bne !+ inc.z screen+1 !: + // i+1 lda.z i clc adc #1 + // (i+1)*2 asl + // *screen++ = (i+1)*2 ldy #0 sta (screen),y + // *screen++ = (i+1)*2; inc.z screen bne !+ inc.z screen+1 !: + // for( byte i: 0..2) inc.z i lda #3 cmp.z i bne __b1 + // } rts } diff --git a/src/test/ref/subexpr-optimize-3.asm b/src/test/ref/subexpr-optimize-3.asm index d77ada773..8be8f0a7b 100644 --- a/src/test/ref/subexpr-optimize-3.asm +++ b/src/test/ref/subexpr-optimize-3.asm @@ -11,33 +11,44 @@ main: { sta.z screen+1 ldx #0 __b1: + // i*2 txa asl sta.z __3 + // i*2+i txa clc adc.z __3 + // i*2+i+3 clc adc #3 + // *screen++ = i*2+i+3 ldy #0 sta (screen),y + // *screen++ = i*2+i+3; inc.z screen bne !+ inc.z screen+1 !: + // i*2+i txa clc adc.z __3 + // i*2+i+3 clc adc #3 + // *screen++ = i*2+i+3 ldy #0 sta (screen),y + // *screen++ = i*2+i+3; inc.z screen bne !+ inc.z screen+1 !: + // for( byte i: 0..2) inx cpx #3 bne __b1 + // } rts } diff --git a/src/test/ref/subexpr-optimize-4.asm b/src/test/ref/subexpr-optimize-4.asm index 643346fb5..6cf842721 100644 --- a/src/test/ref/subexpr-optimize-4.asm +++ b/src/test/ref/subexpr-optimize-4.asm @@ -10,39 +10,50 @@ main: { sta.z screen+1 ldx #0 __b1: + // i&1 txa and #1 + // (i&1)?i+3:i*4 cmp #0 bne __b2 txa asl asl __b4: + // *screen++ = (i&1)?i+3:i*4 ldy #0 sta (screen),y + // *screen++ = (i&1)?i+3:i*4; inc.z screen bne !+ inc.z screen+1 !: + // i&1 txa and #1 + // (i&1)?i+3:i*4 cmp #0 bne __b5 txa asl asl __b7: + // *screen++ = (i&1)?i+3:i*4 ldy #0 sta (screen),y + // *screen++ = (i&1)?i+3:i*4; inc.z screen bne !+ inc.z screen+1 !: + // for( byte i: 0..2) inx cpx #3 bne __b1 + // } rts __b5: + // (i&1)?i+3:i*4 txa clc adc #3 diff --git a/src/test/ref/subexpr-optimize-4.log b/src/test/ref/subexpr-optimize-4.log index 9300ad163..e9cc09fd6 100644 --- a/src/test/ref/subexpr-optimize-4.log +++ b/src/test/ref/subexpr-optimize-4.log @@ -197,14 +197,14 @@ Alias (byte) main::i#2 = (byte) main::i#5 (byte) main::i#8 Alias (byte*) main::screen#1 = (byte*) main::screen#4 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$13 [5] if((byte) 0!=(byte~) main::$0) goto main::@2 -Simple Condition (bool~) main::$14 [17] if((byte) 0!=(byte~) main::$6) goto main::@5 -Simple Condition (bool~) main::$12 [29] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) main::$14 [13] if((byte) 0!=(byte~) main::$6) goto main::@5 +Simple Condition (bool~) main::$12 [21] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::screen#0 = (byte*) 1024 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [27] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [29] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [19] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [21] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 Adding number conversion cast (unumber) 3 in if((byte) main::i#1!=(number) 3) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 3 diff --git a/src/test/ref/summin.asm b/src/test/ref/summin.asm index 4ee303c5b..3c0559799 100644 --- a/src/test/ref/summin.asm +++ b/src/test/ref/summin.asm @@ -5,30 +5,45 @@ main: { .label s1 = 2 .label s3 = 3 + // sum(1,2) lda #2 ldy #1 jsr sum + // sum(1,2) + // s1=sum(1,2) sta.z s1 + // sum(3,4) lda #4 ldy #3 jsr sum + // sum(3,4) + // s2=sum(3,4) tax + // sum(9,13) lda #$d ldy #9 jsr sum + // sum(9,13) + // s3=sum(9,13) sta.z s3 + // s1+s2 txa clc adc.z s1 + // s4=s1+s2+s3 clc adc.z s3 + // *screen = s4 sta screen + // } rts } // sum(byte register(Y) a, byte register(A) b) sum: { + // a+b sty.z $ff clc adc.z $ff + // } rts } diff --git a/src/test/ref/switch-0.asm b/src/test/ref/switch-0.asm index 5bad29445..cf33286bf 100644 --- a/src/test/ref/switch-0.asm +++ b/src/test/ref/switch-0.asm @@ -7,33 +7,50 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // case 1: + // // A simple case with a break + // SCREEN[i] = '1'; + // break; cpx #1 beq __b2 + // case 2: cpx #2 beq __b3 + // case 3: + // // A case with fall-through + // SCREEN[i] = '3'; // A case with no body cpx #3 beq __b3 + // case 4: + // SCREEN[i] = '4'; + // break; cpx #4 beq __b4 + // SCREEN[i] = 'd' // No case for 0 & 5 lda #'d' sta SCREEN,x __b6: + // for(char i:0..5) inx cpx #6 bne __b1 + // } rts __b4: + // SCREEN[i] = '4' lda #'4' sta SCREEN,x jmp __b6 __b3: + // SCREEN[i] = '3' // A case with fall-through lda #'3' sta SCREEN,x jmp __b4 __b2: + // SCREEN[i] = '1' // A simple case with a break lda #'1' sta SCREEN,x diff --git a/src/test/ref/switch-0.log b/src/test/ref/switch-0.log index 9e88c9576..a46869b1f 100644 --- a/src/test/ref/switch-0.log +++ b/src/test/ref/switch-0.log @@ -117,12 +117,12 @@ Alias (byte) main::i#2 = (byte) main::i#8 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#10 = (byte) main::i#2 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 [20] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) main::$0 [12] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [18] main::i#1 ← ++ main::i#10 to ++ -Resolved ranged comparison value [20] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [10] main::i#1 ← ++ main::i#10 to ++ +Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::i#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 6 diff --git a/src/test/ref/switch-1.asm b/src/test/ref/switch-1.asm index 5dd85fdd0..9c3fc49fd 100644 --- a/src/test/ref/switch-1.asm +++ b/src/test/ref/switch-1.asm @@ -7,21 +7,30 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // case 1: cpx #1 beq __b2 + // case 4: + // SCREEN[i] = '1'; + // break; cpx #4 beq __b2 + // SCREEN[i] = 'a' // No case for 0 & 5 lda #'a' sta SCREEN,x __b5: + // for(char i:0..5) inx cpx #6 bne __b1 + // } rts __b2: + // SCREEN[i] = '1' lda #'1' sta SCREEN,x + // SCREEN[i] |= 0x80 // Invert the screen character lda #$80 ora SCREEN,x diff --git a/src/test/ref/switch-1.log b/src/test/ref/switch-1.log index 69d175738..34608255e 100644 --- a/src/test/ref/switch-1.log +++ b/src/test/ref/switch-1.log @@ -94,12 +94,12 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#7 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$0 [14] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) main::$0 [9] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [12] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [14] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [7] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [9] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::i#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 6 diff --git a/src/test/ref/switch-2.asm b/src/test/ref/switch-2.asm index 18e6e02b7..3b841b7fe 100644 --- a/src/test/ref/switch-2.asm +++ b/src/test/ref/switch-2.asm @@ -5,7 +5,9 @@ main: { .label SCREEN = $400 .const b = 1 + // SCREEN[0] = b lda #b sta SCREEN + // } rts } diff --git a/src/test/ref/switch-4.asm b/src/test/ref/switch-4.asm index e64b1e644..994e755f5 100644 --- a/src/test/ref/switch-4.asm +++ b/src/test/ref/switch-4.asm @@ -7,18 +7,26 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // case 1: cpx #1 beq __b2 + // case 4: + // SCREEN[i] = '0'+i; + // break; cpx #4 bne __b3 __b2: + // '0'+i txa clc adc #'0' + // SCREEN[i] = '0'+i sta SCREEN,x __b3: + // for(char i:0..5) inx cpx #6 bne __b1 + // } rts } diff --git a/src/test/ref/switch-4.log b/src/test/ref/switch-4.log index 4d25cf7f9..fd83ad3cc 100644 --- a/src/test/ref/switch-4.log +++ b/src/test/ref/switch-4.log @@ -81,14 +81,14 @@ Alias (byte) main::i#2 = (byte) main::i#4 Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#5 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [11] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) main::$1 [8] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Negating conditional jump and destination [4] if((byte) main::i#2!=(byte) 4) goto main::@7 +Negating conditional jump and destination [3] if((byte) main::i#2!=(byte) 4) goto main::@7 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::i#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 6 diff --git a/src/test/ref/ternary-1.asm b/src/test/ref/ternary-1.asm index ee6a4e35e..3a2fed935 100644 --- a/src/test/ref/ternary-1.asm +++ b/src/test/ref/ternary-1.asm @@ -6,6 +6,7 @@ main: { .label SCREEN = $400 ldx #0 __b1: + // i<5?'a':'b' cpx #5 bcc __b2 lda #'b' @@ -13,9 +14,12 @@ main: { __b2: lda #'a' __b3: + // SCREEN[i] = i<5?'a':'b' sta SCREEN,x + // for( byte i: 0..9) inx cpx #$a bne __b1 + // } rts } diff --git a/src/test/ref/ternary-1.log b/src/test/ref/ternary-1.log index 07a02dae0..82fedb50e 100644 --- a/src/test/ref/ternary-1.log +++ b/src/test/ref/ternary-1.log @@ -78,14 +78,14 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [3] if((byte) main::i#2<(byte) 5) goto main::@2 -Simple Condition (bool~) main::$4 [12] if((byte) main::i#1!=rangelast(0,9)) goto main::@1 +Simple Condition (bool~) main::$4 [10] if((byte) main::i#1!=rangelast(0,9)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::$2 = 'a' Constant (const byte) main::$1 = 'b' Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,9)) goto main::@1 to (number) $a +Resolved ranged next value [8] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [10] if(main::i#1!=rangelast(0,9)) goto main::@1 to (number) $a Adding number conversion cast (unumber) $a in if((byte) main::i#1!=(number) $a) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $a diff --git a/src/test/ref/ternary-2.asm b/src/test/ref/ternary-2.asm index 4bef7809a..fe24191c5 100644 --- a/src/test/ref/ternary-2.asm +++ b/src/test/ref/ternary-2.asm @@ -4,9 +4,12 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[0] = true?'a':'b' lda #'a' sta SCREEN + // SCREEN[1] = false?'a':'b' lda #'b' sta SCREEN+1 + // } rts } diff --git a/src/test/ref/ternary-3.asm b/src/test/ref/ternary-3.asm index 5060f0928..45fce3103 100644 --- a/src/test/ref/ternary-3.asm +++ b/src/test/ref/ternary-3.asm @@ -6,39 +6,54 @@ main: { .label SCREEN = $400 ldy #0 __b1: + // cond(i) jsr cond + // cond(i)?m1(i):m2(i) cmp #0 bne __b2 + // m2(i) jsr m2 + // cond(i)?m1(i):m2(i) __b4: + // SCREEN[i] = cond(i)?m1(i):m2(i) sta SCREEN,y + // for( byte i: 0..9) iny cpy #$a bne __b1 + // } rts __b2: + // m1(i) jsr m1 + // cond(i)?m1(i):m2(i) jmp __b4 } // m1(byte register(Y) i) m1: { + // 5+i tya clc adc #5 + // } rts } // m2(byte register(Y) i) m2: { + // 10+i tya clc adc #$a + // } rts } // cond(byte register(Y) b) cond: { + // b<5 cpy #5 lda #0 rol eor #1 + // } rts } diff --git a/src/test/ref/ternary-3.log b/src/test/ref/ternary-3.log index 66105786b..64f7212d5 100644 --- a/src/test/ref/ternary-3.log +++ b/src/test/ref/ternary-3.log @@ -208,12 +208,12 @@ Identical Phi Values (byte) cond::b#1 (byte) cond::b#0 Identical Phi Values (byte) m1::i#1 (byte) m1::i#0 Identical Phi Values (byte) m2::i#1 (byte) m2::i#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$6 [26] if((byte) main::i#1!=rangelast(0,9)) goto main::@1 +Simple Condition (bool~) main::$6 [19] if((byte) main::i#1!=rangelast(0,9)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [24] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [26] if(main::i#1!=rangelast(0,9)) goto main::@1 to (number) $a +Resolved ranged next value [17] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [19] if(main::i#1!=rangelast(0,9)) goto main::@1 to (number) $a Adding number conversion cast (unumber) $a in if((byte) main::i#1!=(number) $a) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $a diff --git a/src/test/ref/ternary-inference.asm b/src/test/ref/ternary-inference.asm index 55bf77a0f..82ff3fb84 100644 --- a/src/test/ref/ternary-inference.asm +++ b/src/test/ref/ternary-inference.asm @@ -6,6 +6,7 @@ main: { .label screen = $400 ldx #0 __b1: + // i<5?0x57:'0' cpx #5 bcc __b2 lda #'0' @@ -13,12 +14,16 @@ main: { __b2: lda #$57 __b3: + // (i<5?0x57:'0')+i stx.z $ff clc adc.z $ff + // screen[i] = (i<5?0x57:'0')+i sta screen,x + // for(byte i: 0..10) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/ternary-inference.log b/src/test/ref/ternary-inference.log index c6d2527ee..8ec87f42f 100644 --- a/src/test/ref/ternary-inference.log +++ b/src/test/ref/ternary-inference.log @@ -95,14 +95,14 @@ Successful SSA optimization Pass2AliasElimination Alias (byte) main::i#2 = (byte) main::i#3 Successful SSA optimization Pass2AliasElimination Simple Condition (bool~) main::$0 [3] if((byte) main::i#2<(byte) 5) goto main::@2 -Simple Condition (bool~) main::$5 [13] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$5 [11] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::$2 = $57 Constant (const byte) main::$1 = '0' Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [9] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [11] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/test-comments-block.asm b/src/test/ref/test-comments-block.asm index 6b1e53f4d..8bae4813b 100644 --- a/src/test/ref/test-comments-block.asm +++ b/src/test/ref/test-comments-block.asm @@ -14,14 +14,19 @@ main: { ldx #0 // Do some sums __b1: + // sum(a, b) txa jsr sum + // SCREEN[i++] = sum(a, b) // Output the result on the screen sta SCREEN,y + // SCREEN[i++] = sum(a, b); iny + // for(byte b: 0..10 ) inx cpx #$b bne __b1 + // } rts } /** Adds up two bytes and returns the result @@ -31,7 +36,9 @@ main: { */ // sum(byte register(A) b) sum: { + // a+b clc adc #a + // } rts } diff --git a/src/test/ref/test-comments-block.log b/src/test/ref/test-comments-block.log index 2f950e944..eda750f37 100644 --- a/src/test/ref/test-comments-block.log +++ b/src/test/ref/test-comments-block.log @@ -106,14 +106,14 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) sum::a#1 (byte) sum::a#0 Identical Phi Values (byte) sum::b#1 (byte) sum::b#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [13] if((byte) main::b#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [12] if((byte) main::b#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::b#0 = 0 Constant (const byte) sum::a#0 = a Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [11] main::b#1 ← ++ main::b#2 to ++ -Resolved ranged comparison value [13] if(main::b#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [10] main::b#1 ← ++ main::b#2 to ++ +Resolved ranged comparison value [12] if(main::b#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::b#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/test-comments-loop.asm b/src/test/ref/test-comments-loop.asm index dc8ee489b..26c1827d4 100644 --- a/src/test/ref/test-comments-loop.asm +++ b/src/test/ref/test-comments-loop.asm @@ -6,10 +6,13 @@ main: { ldx #0 // Do some sums __b1: + // SCREEN[b] = 'a' lda #'a' sta SCREEN,x + // for(byte b: 0..10 ) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/test-comments-single.asm b/src/test/ref/test-comments-single.asm index ee521faa9..c83780d50 100644 --- a/src/test/ref/test-comments-single.asm +++ b/src/test/ref/test-comments-single.asm @@ -13,14 +13,19 @@ main: { ldx #0 // Do some sums __b1: + // sum(a, b) txa jsr sum + // SCREEN[i++] = sum(a, b) // Output the result on the screen sta SCREEN,y + // SCREEN[i++] = sum(a, b); iny + // for(byte b: 0..10 ) inx cpx #$b bne __b1 + // } rts } // Adds up two bytes and returns the result @@ -29,7 +34,9 @@ main: { // Returns the sum pf the two bytes // sum(byte register(A) b) sum: { + // a+b clc adc #a + // } rts } diff --git a/src/test/ref/test-comments-single.log b/src/test/ref/test-comments-single.log index 55288c2b8..2adfa668d 100644 --- a/src/test/ref/test-comments-single.log +++ b/src/test/ref/test-comments-single.log @@ -106,14 +106,14 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) sum::a#1 (byte) sum::a#0 Identical Phi Values (byte) sum::b#1 (byte) sum::b#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [13] if((byte) main::b#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [12] if((byte) main::b#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const byte) main::b#0 = 0 Constant (const byte) sum::a#0 = a Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [11] main::b#1 ← ++ main::b#2 to ++ -Resolved ranged comparison value [13] if(main::b#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [10] main::b#1 ← ++ main::b#2 to ++ +Resolved ranged comparison value [12] if(main::b#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::b#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/test-comments-usage.asm b/src/test/ref/test-comments-usage.asm index 36c76227d..633137b83 100644 --- a/src/test/ref/test-comments-usage.asm +++ b/src/test/ref/test-comments-usage.asm @@ -5,7 +5,9 @@ .label SCREEN = $400 // The program entry point main: { + // *SCREEN = 'a' lda #'a' sta SCREEN + // } rts } diff --git a/src/test/ref/test-comparisons-sword.asm b/src/test/ref/test-comparisons-sword.asm index ff574d7b3..cd58f1837 100644 --- a/src/test/ref/test-comparisons-sword.asm +++ b/src/test/ref/test-comparisons-sword.asm @@ -20,6 +20,7 @@ main: { .label s = 4 .label j = 3 .label i = 2 + // print_cls() jsr print_cls lda #<$400 sta.z print_line_cursor @@ -34,6 +35,7 @@ main: { lda #0 sta.z i __b1: + // w1 = swords[i] lda.z i asl tay @@ -44,6 +46,7 @@ main: { lda #0 sta.z j __b2: + // w2 = swords[j] lda.z j asl tay @@ -53,15 +56,18 @@ main: { sta.z w2+1 ldx #0 __b3: + // compare(w1,w2,op) lda.z w1 sta.z compare.w1 lda.z w1+1 sta.z compare.w1+1 jsr compare + // if(++s==3) inc.z s lda #3 cmp.z s bne __b4 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor @@ -70,13 +76,16 @@ main: { lda #0 sta.z s __b4: + // for( byte op: 0..5 ) inx cpx #6 bne __b3 + // for( byte j: 0..2) inc.z j lda #3 cmp.z j bne __b2 + // for( byte i: 0..2) inc.z i cmp.z i bne __b1 @@ -87,6 +96,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -94,6 +104,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor=w2) lda.z w1 cmp.z w2 lda.z w1+1 @@ -207,6 +233,7 @@ compare: { sta.z ops+1 jmp __b6 __b3: + // if(w1>w2) lda.z w2 cmp.z w1 lda.z w2+1 @@ -228,6 +255,7 @@ compare: { sta.z ops+1 jmp __b6 __b2: + // if(w1<=w2) lda.z w2 cmp.z w1 lda.z w2+1 @@ -250,6 +278,7 @@ compare: { sta.z ops+1 jmp __b6 __b1: + // if(w1w) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a zero-terminated string @@ -353,15 +399,19 @@ print_byte: { print_str: { .label str = 5 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -374,7 +424,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -389,17 +441,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(signed word) compare::w2#0) goto compare::@34 -Simple Condition (bool~) compare::$1 [178] if((byte) compare::op#0==(const byte) LE) goto compare::@2 -Simple Condition (bool~) compare::$20 [182] if((signed word) compare::w1#0>(signed word) compare::w2#0) goto compare::@33 -Simple Condition (bool~) compare::$2 [185] if((byte) compare::op#0==(const byte) GT) goto compare::@3 -Simple Condition (bool~) compare::$18 [189] if((signed word) compare::w1#0<=(signed word) compare::w2#0) goto compare::@32 -Simple Condition (bool~) compare::$3 [192] if((byte) compare::op#0==(const byte) GE) goto compare::@4 -Simple Condition (bool~) compare::$16 [196] if((signed word) compare::w1#0<(signed word) compare::w2#0) goto compare::@31 -Simple Condition (bool~) compare::$4 [199] if((byte) compare::op#0==(const byte) EQ) goto compare::@5 -Simple Condition (bool~) compare::$14 [203] if((signed word) compare::w1#0!=(signed word) compare::w2#0) goto compare::@30 -Simple Condition (bool~) compare::$6 [207] if((byte) compare::op#0!=(const byte) NE) goto compare::@11 -Simple Condition (bool~) compare::$12 [211] if((signed word) compare::w1#0==(signed word) compare::w2#0) goto compare::@29 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#15) goto print_ln::@1 +Simple Condition (bool~) print_sword::$0 [30] if((signed word) print_sword::w#3<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) main::$3 [93] if((byte) main::s#1!=(byte) 3) goto main::@4 +Simple Condition (bool~) main::$5 [97] if((byte) main::op#1!=rangelast(0,5)) goto main::@3 +Simple Condition (bool~) main::$6 [103] if((byte) main::j#1!=rangelast(0,2)) goto main::@2 +Simple Condition (bool~) main::$7 [106] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) compare::$0 [114] if((byte) compare::op#0==(const byte) LT) goto compare::@1 +Simple Condition (bool~) compare::$22 [116] if((signed word) compare::w1#0>=(signed word) compare::w2#0) goto compare::@34 +Simple Condition (bool~) compare::$1 [118] if((byte) compare::op#0==(const byte) LE) goto compare::@2 +Simple Condition (bool~) compare::$20 [120] if((signed word) compare::w1#0>(signed word) compare::w2#0) goto compare::@33 +Simple Condition (bool~) compare::$2 [122] if((byte) compare::op#0==(const byte) GT) goto compare::@3 +Simple Condition (bool~) compare::$18 [124] if((signed word) compare::w1#0<=(signed word) compare::w2#0) goto compare::@32 +Simple Condition (bool~) compare::$3 [126] if((byte) compare::op#0==(const byte) GE) goto compare::@4 +Simple Condition (bool~) compare::$16 [128] if((signed word) compare::w1#0<(signed word) compare::w2#0) goto compare::@31 +Simple Condition (bool~) compare::$4 [130] if((byte) compare::op#0==(const byte) EQ) goto compare::@5 +Simple Condition (bool~) compare::$14 [132] if((signed word) compare::w1#0!=(signed word) compare::w2#0) goto compare::@30 +Simple Condition (bool~) compare::$6 [134] if((byte) compare::op#0!=(const byte) NE) goto compare::@11 +Simple Condition (bool~) compare::$12 [136] if((signed word) compare::w1#0==(signed word) compare::w2#0) goto compare::@29 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) print_char::ch#0 = '-' @@ -1450,15 +1450,15 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [162] if(true) goto main::@9 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [108] if(true) goto main::@9 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [144] main::op#1 ← ++ main::op#2 to ++ -Resolved ranged comparison value [146] if(main::op#1!=rangelast(0,5)) goto main::@3 to (number) 6 -Resolved ranged next value [154] main::j#1 ← ++ main::j#2 to ++ -Resolved ranged comparison value [156] if(main::j#1!=rangelast(0,2)) goto main::@2 to (number) 3 -Resolved ranged next value [158] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [160] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [95] main::op#1 ← ++ main::op#2 to ++ +Resolved ranged comparison value [97] if(main::op#1!=rangelast(0,5)) goto main::@3 to (number) 6 +Resolved ranged next value [101] main::j#1 ← ++ main::j#2 to ++ +Resolved ranged comparison value [103] if(main::j#1!=rangelast(0,2)) goto main::@2 to (number) 3 +Resolved ranged next value [104] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [106] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/test-comparisons-word.asm b/src/test/ref/test-comparisons-word.asm index 920a84518..db0fd48ec 100644 --- a/src/test/ref/test-comparisons-word.asm +++ b/src/test/ref/test-comparisons-word.asm @@ -13,6 +13,7 @@ main: { .label s = 4 .label j = 3 .label i = 2 + // print_cls() jsr print_cls lda #<$400 sta.z print_line_cursor @@ -27,6 +28,7 @@ main: { lda #0 sta.z i __b1: + // w1 = words[i] lda.z i asl tay @@ -37,6 +39,7 @@ main: { lda #0 sta.z j __b2: + // w2 = words[j] lda.z j asl tay @@ -46,15 +49,18 @@ main: { sta.z w2+1 ldx #0 __b3: + // compare(w1,w2,op) lda.z w1 sta.z compare.w1 lda.z w1+1 sta.z compare.w1+1 jsr compare + // if(++s==3) inc.z s lda #3 cmp.z s bne __b4 + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor @@ -63,13 +69,16 @@ main: { lda #0 sta.z s __b4: + // for( byte op: 0..5 ) inx cpx #6 bne __b3 + // for( byte j: 0..2) inc.z j lda #3 cmp.z j bne __b2 + // for( byte i: 0..2) inc.z i cmp.z i bne __b1 @@ -80,6 +89,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -87,6 +97,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor=w2) lda.z w1+1 cmp.z w2+1 bcc b4 @@ -201,6 +228,7 @@ compare: { sta.z ops+1 jmp __b6 __b3: + // if(w1>w2) lda.z w1+1 cmp.z w2+1 bne !+ @@ -222,6 +250,7 @@ compare: { sta.z ops+1 jmp __b6 __b2: + // if(w1<=w2) lda.z w2+1 cmp.z w1+1 bcc b6 @@ -243,6 +272,7 @@ compare: { sta.z ops+1 jmp __b6 __b1: + // if(w1w) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a zero-terminated string @@ -323,15 +364,19 @@ print_byte: { print_str: { .label str = 5 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -344,7 +389,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -359,17 +406,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(word) compare::w2#0) goto compare::@34 -Simple Condition (bool~) compare::$1 [154] if((byte) compare::op#0==(byte) 1) goto compare::@2 -Simple Condition (bool~) compare::$21 [158] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@33 -Simple Condition (bool~) compare::$2 [161] if((byte) compare::op#0==(byte) 2) goto compare::@3 -Simple Condition (bool~) compare::$19 [165] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@32 -Simple Condition (bool~) compare::$3 [168] if((byte) compare::op#0==(byte) 3) goto compare::@4 -Simple Condition (bool~) compare::$17 [172] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@31 -Simple Condition (bool~) compare::$4 [175] if((byte) compare::op#0==(byte) 4) goto compare::@5 -Simple Condition (bool~) compare::$15 [179] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@30 -Simple Condition (bool~) compare::$6 [183] if((byte) compare::op#0!=(byte) 5) goto compare::@11 -Simple Condition (bool~) compare::$13 [187] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@29 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#11) goto print_ln::@1 +Simple Condition (bool~) main::$3 [78] if((byte) main::s#1!=(byte) 3) goto main::@4 +Simple Condition (bool~) main::$5 [82] if((byte) main::op#1!=rangelast(0,5)) goto main::@3 +Simple Condition (bool~) main::$6 [88] if((byte) main::j#1!=rangelast(0,2)) goto main::@2 +Simple Condition (bool~) main::$7 [91] if((byte) main::i#1!=rangelast(0,2)) goto main::@1 +Simple Condition (bool~) compare::$0 [99] if((byte) compare::op#0==(byte) 0) goto compare::@1 +Simple Condition (bool~) compare::$23 [101] if((word) compare::w1#0>=(word) compare::w2#0) goto compare::@34 +Simple Condition (bool~) compare::$1 [103] if((byte) compare::op#0==(byte) 1) goto compare::@2 +Simple Condition (bool~) compare::$21 [105] if((word) compare::w1#0>(word) compare::w2#0) goto compare::@33 +Simple Condition (bool~) compare::$2 [107] if((byte) compare::op#0==(byte) 2) goto compare::@3 +Simple Condition (bool~) compare::$19 [109] if((word) compare::w1#0<=(word) compare::w2#0) goto compare::@32 +Simple Condition (bool~) compare::$3 [111] if((byte) compare::op#0==(byte) 3) goto compare::@4 +Simple Condition (bool~) compare::$17 [113] if((word) compare::w1#0<(word) compare::w2#0) goto compare::@31 +Simple Condition (bool~) compare::$4 [115] if((byte) compare::op#0==(byte) 4) goto compare::@5 +Simple Condition (bool~) compare::$15 [117] if((word) compare::w1#0!=(word) compare::w2#0) goto compare::@30 +Simple Condition (bool~) compare::$6 [119] if((byte) compare::op#0!=(byte) 5) goto compare::@11 +Simple Condition (bool~) compare::$13 [121] if((word) compare::w1#0==(word) compare::w2#0) goto compare::@29 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -1370,15 +1370,15 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [138] if(true) goto main::@9 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [93] if(true) goto main::@9 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [120] main::op#1 ← ++ main::op#2 to ++ -Resolved ranged comparison value [122] if(main::op#1!=rangelast(0,5)) goto main::@3 to (number) 6 -Resolved ranged next value [130] main::j#1 ← ++ main::j#2 to ++ -Resolved ranged comparison value [132] if(main::j#1!=rangelast(0,2)) goto main::@2 to (number) 3 -Resolved ranged next value [134] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [136] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 +Resolved ranged next value [80] main::op#1 ← ++ main::op#2 to ++ +Resolved ranged comparison value [82] if(main::op#1!=rangelast(0,5)) goto main::@3 to (number) 6 +Resolved ranged next value [86] main::j#1 ← ++ main::j#2 to ++ +Resolved ranged comparison value [88] if(main::j#1!=rangelast(0,2)) goto main::@2 to (number) 3 +Resolved ranged next value [89] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [91] if(main::i#1!=rangelast(0,2)) goto main::@1 to (number) 3 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return diff --git a/src/test/ref/test-comparisons.asm b/src/test/ref/test-comparisons.asm index 80c8e5f42..c2638daa9 100644 --- a/src/test/ref/test-comparisons.asm +++ b/src/test/ref/test-comparisons.asm @@ -7,6 +7,7 @@ main: { .label b = $c .label a = 2 .label i = 3 + // print_cls() jsr print_cls lda #<$400 sta.z print_line_cursor @@ -21,10 +22,12 @@ main: { lda #7 sta.z a __b1: + // b = $ce-a lda #$ce sec sbc.z a sta.z b + // if(aop sta.z printu.op+1 jsr printu + // if(a<$37) lda.z a cmp #$37 bcs b2 @@ -48,6 +53,7 @@ main: { b2: ldx #'-' __b3: + // printu(a, "< ", $37, r) lda #$37 sta.z printu.b lda #op sta.z printu.op+1 jsr printu + // if(aop sta.z printu.op+1 jsr printu + // if(aop sta.z printu.op+1 jsr printu + // print_ln() jsr print_ln + // if(a>b) lda.z b cmp.z a bcs b5 @@ -96,17 +108,20 @@ main: { b5: ldx #'-' __b6: + // printu(a, "> ", b, r) lda.z b sta.z printu.b lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // printu(a, "> ", b, r) lda #op4 sta.z printu.op+1 jsr printu + // if(a>$37) lda.z a cmp #$37+1 bcc b6 @@ -115,6 +130,7 @@ main: { b6: ldx #'-' __b7: + // printu(a, "> ", $37, r) lda #$37 sta.z printu.b lda #op4 sta.z printu.op+1 jsr printu + // if(a>cs[i]) ldy.z i lda cs,y cmp.z a @@ -131,6 +148,7 @@ main: { b7: ldx #'-' __b8: + // printu(a, "> ", cs[i], r) ldy.z i lda cs,y sta.z printu.b @@ -139,6 +157,7 @@ main: { lda #>op4 sta.z printu.op+1 jsr printu + // if(a>a) lda.z a cmp.z a bcs b8 @@ -147,6 +166,7 @@ main: { b8: ldx #'-' __b9: + // printu(a, "> ", a, r) lda.z a sta.z printu.b lda #op4 sta.z printu.op+1 jsr printu + // print_ln() jsr print_ln + // if(a<=b) lda.z b cmp.z a bcc b9 @@ -163,17 +185,20 @@ main: { b9: ldx #'-' __b10: + // printu(a, "<=", b, r) lda.z b sta.z printu.b lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // printu(a, "<=", b, r) lda #op8 sta.z printu.op+1 jsr printu + // if(a<=$37) lda.z a cmp #$37+1 bcs b10 @@ -182,6 +207,7 @@ main: { b10: ldx #'-' __b11: + // printu(a, "<=", $37, r) lda #$37 sta.z printu.b lda #op8 sta.z printu.op+1 jsr printu + // if(a<=cs[i]) ldy.z i lda cs,y cmp.z a @@ -198,6 +225,7 @@ main: { b11: ldx #'-' __b12: + // printu(a, "<=", cs[i], r) ldy.z i lda cs,y sta.z printu.b @@ -206,6 +234,7 @@ main: { lda #>op8 sta.z printu.op+1 jsr printu + // if(a<=a) lda.z a cmp.z a bcc b12 @@ -214,6 +243,7 @@ main: { b12: ldx #'-' __b13: + // printu(a, "<=", a, r) lda.z a sta.z printu.b lda #op8 sta.z printu.op+1 jsr printu + // print_ln() jsr print_ln + // if(a>=b) lda.z a cmp.z b bcc b13 @@ -230,17 +262,20 @@ main: { b13: ldx #'-' __b14: + // printu(a, ">=", b, r) lda.z b sta.z printu.b lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // printu(a, ">=", b, r) lda #op12 sta.z printu.op+1 jsr printu + // if(a>=$37) lda.z a cmp #$37 bcc b14 @@ -249,6 +284,7 @@ main: { b14: ldx #'-' __b15: + // printu(a, ">=", $37, r) lda #$37 sta.z printu.b lda #op12 sta.z printu.op+1 jsr printu + // if(a>=cs[i]) lda.z a ldy.z i cmp cs,y @@ -265,6 +302,7 @@ main: { b15: ldx #'-' __b16: + // printu(a, ">=", cs[i], r) ldy.z i lda cs,y sta.z printu.b @@ -273,6 +311,7 @@ main: { lda #>op12 sta.z printu.op+1 jsr printu + // if(a>=a) lda.z a cmp.z a bcc b16 @@ -281,6 +320,7 @@ main: { b16: ldx #'-' __b17: + // printu(a, ">=", a, r) lda.z a sta.z printu.b lda #op12 sta.z printu.op+1 jsr printu + // print_ln() jsr print_ln + // if(a==b) lda.z a cmp.z b bne b17 @@ -297,17 +339,20 @@ main: { b17: ldx #'-' __b18: + // printu(a, "==", b, r) lda.z b sta.z printu.b lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // printu(a, "==", b, r) lda #op16 sta.z printu.op+1 jsr printu + // if(a==$37) lda #$37 cmp.z a bne b18 @@ -316,6 +361,7 @@ main: { b18: ldx #'-' __b19: + // printu(a, "==", $37, r) lda #$37 sta.z printu.b lda #op16 sta.z printu.op+1 jsr printu + // if(a==cs[i]) lda.z a ldy.z i cmp cs,y @@ -332,6 +379,7 @@ main: { b19: ldx #'-' __b20: + // printu(a, "==", cs[i], r) ldy.z i lda cs,y sta.z printu.b @@ -340,6 +388,7 @@ main: { lda #>op16 sta.z printu.op+1 jsr printu + // if(a==a) lda.z a cmp.z a bne b20 @@ -348,6 +397,7 @@ main: { b20: ldx #'-' __b21: + // printu(a, "==", a, r) lda.z a sta.z printu.b lda #op16 sta.z printu.op+1 jsr printu + // print_ln() jsr print_ln + // a=a+$30 lax.z a axs #-[$30] stx.z a + // for( byte i : 0..4 ) inc.z i lda #5 cmp.z i @@ -386,6 +439,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -393,6 +447,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursor>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a zero-terminated string @@ -458,15 +529,19 @@ print_byte: { print_str: { .label str = 4 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -479,7 +554,9 @@ print_str: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -494,17 +571,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(byte) main::b#0) goto main::@2 -Simple Condition (bool~) main::$6 [105] if((byte) main::a#10>=(byte) $37) goto main::@3 -Simple Condition (bool~) main::$9 [119] if((byte) main::a#10>=*((const byte*) main::cs + (byte) main::i#10)) goto main::@4 -Simple Condition (bool~) main::$12 [133] if((byte) main::a#10>=(byte) main::a#10) goto main::@5 -Simple Condition (bool~) main::$16 [151] if((byte) main::a#10<=(byte) main::b#0) goto main::@6 -Simple Condition (bool~) main::$19 [165] if((byte) main::a#10<=(byte) $37) goto main::@7 -Simple Condition (bool~) main::$22 [179] if((byte) main::a#10<=*((const byte*) main::cs + (byte) main::i#10)) goto main::@8 -Simple Condition (bool~) main::$25 [193] if((byte) main::a#10<=(byte) main::a#10) goto main::@9 -Simple Condition (bool~) main::$29 [211] if((byte) main::a#10>(byte) main::b#0) goto main::@10 -Simple Condition (bool~) main::$32 [225] if((byte) main::a#10>(byte) $37) goto main::@11 -Simple Condition (bool~) main::$35 [239] if((byte) main::a#10>*((const byte*) main::cs + (byte) main::i#10)) goto main::@12 -Simple Condition (bool~) main::$38 [253] if((byte) main::a#10>(byte) main::a#10) goto main::@13 -Simple Condition (bool~) main::$42 [271] if((byte) main::a#10<(byte) main::b#0) goto main::@14 -Simple Condition (bool~) main::$45 [285] if((byte) main::a#10<(byte) $37) goto main::@15 -Simple Condition (bool~) main::$48 [299] if((byte) main::a#10<*((const byte*) main::cs + (byte) main::i#10)) goto main::@16 -Simple Condition (bool~) main::$51 [313] if((byte) main::a#10<(byte) main::a#10) goto main::@17 -Simple Condition (bool~) main::$55 [331] if((byte) main::a#10!=(byte) main::b#0) goto main::@18 -Simple Condition (bool~) main::$58 [345] if((byte) main::a#10!=(byte) $37) goto main::@19 -Simple Condition (bool~) main::$61 [359] if((byte) main::a#10!=*((const byte*) main::cs + (byte) main::i#10)) goto main::@20 -Simple Condition (bool~) main::$64 [373] if((byte) main::a#10!=(byte) main::a#10) goto main::@21 -Simple Condition (bool~) main::$68 [392] if((byte) main::i#1!=rangelast(0,4)) goto main::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#55) goto print_ln::@1 +Simple Condition (bool~) main::$3 [59] if((byte) main::a#10>=(byte) main::b#0) goto main::@2 +Simple Condition (bool~) main::$6 [69] if((byte) main::a#10>=(byte) $37) goto main::@3 +Simple Condition (bool~) main::$9 [80] if((byte) main::a#10>=*((const byte*) main::cs + (byte) main::i#10)) goto main::@4 +Simple Condition (bool~) main::$12 [91] if((byte) main::a#10>=(byte) main::a#10) goto main::@5 +Simple Condition (bool~) main::$16 [104] if((byte) main::a#10<=(byte) main::b#0) goto main::@6 +Simple Condition (bool~) main::$19 [115] if((byte) main::a#10<=(byte) $37) goto main::@7 +Simple Condition (bool~) main::$22 [126] if((byte) main::a#10<=*((const byte*) main::cs + (byte) main::i#10)) goto main::@8 +Simple Condition (bool~) main::$25 [137] if((byte) main::a#10<=(byte) main::a#10) goto main::@9 +Simple Condition (bool~) main::$29 [150] if((byte) main::a#10>(byte) main::b#0) goto main::@10 +Simple Condition (bool~) main::$32 [161] if((byte) main::a#10>(byte) $37) goto main::@11 +Simple Condition (bool~) main::$35 [172] if((byte) main::a#10>*((const byte*) main::cs + (byte) main::i#10)) goto main::@12 +Simple Condition (bool~) main::$38 [183] if((byte) main::a#10>(byte) main::a#10) goto main::@13 +Simple Condition (bool~) main::$42 [196] if((byte) main::a#10<(byte) main::b#0) goto main::@14 +Simple Condition (bool~) main::$45 [207] if((byte) main::a#10<(byte) $37) goto main::@15 +Simple Condition (bool~) main::$48 [218] if((byte) main::a#10<*((const byte*) main::cs + (byte) main::i#10)) goto main::@16 +Simple Condition (bool~) main::$51 [229] if((byte) main::a#10<(byte) main::a#10) goto main::@17 +Simple Condition (bool~) main::$55 [242] if((byte) main::a#10!=(byte) main::b#0) goto main::@18 +Simple Condition (bool~) main::$58 [253] if((byte) main::a#10!=(byte) $37) goto main::@19 +Simple Condition (bool~) main::$61 [264] if((byte) main::a#10!=*((const byte*) main::cs + (byte) main::i#10)) goto main::@20 +Simple Condition (bool~) main::$64 [275] if((byte) main::a#10!=(byte) main::a#10) goto main::@21 +Simple Condition (bool~) main::$68 [289] if((byte) main::i#1!=rangelast(0,4)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) memset::c#0 = ' ' @@ -2306,8 +2306,8 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 -if() condition always true - replacing block destination [396] if(true) goto main::@43 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always true - replacing block destination [292] if(true) goto main::@43 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) main::op Consolidated constant strings into (const byte*) main::op4 @@ -2315,10 +2315,10 @@ Consolidated constant strings into (const byte*) main::op8 Consolidated constant strings into (const byte*) main::op12 Consolidated constant strings into (const byte*) main::op16 Successful SSA optimization Pass2ConstantStringConsolidation -Resolved ranged next value [390] main::i#1 ← ++ main::i#10 to ++ -Resolved ranged comparison value [392] if(main::i#1!=rangelast(0,4)) goto main::@1 to (number) 5 -Rewriting conditional comparison [165] if((byte) main::a#10<=(byte) $37) goto main::@7 -Rewriting conditional comparison [225] if((byte) main::a#10>(byte) $37) goto main::@11 +Resolved ranged next value [287] main::i#1 ← ++ main::i#10 to ++ +Resolved ranged comparison value [289] if(main::i#1!=rangelast(0,4)) goto main::@1 to (number) 5 +Rewriting conditional comparison [115] if((byte) main::a#10<=(byte) $37) goto main::@7 +Rewriting conditional comparison [161] if((byte) main::a#10>(byte) $37) goto main::@11 Eliminating unused constant (const void*) memset::return#2 Eliminating unused constant (const byte) main::r#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/test-division.asm b/src/test/ref/test-division.asm index e29bc5e15..4124e5433 100644 --- a/src/test/ref/test-division.asm +++ b/src/test/ref/test-division.asm @@ -9,11 +9,17 @@ // Remainder after signed 16 bit division .label rem16s = $b main: { + // print_cls() jsr print_cls + // test_8u() jsr test_8u + // test_16u() jsr test_16u + // test_8s() jsr test_8s + // test_16s() jsr test_16s + // } rts } test_16s: { @@ -24,6 +30,7 @@ test_16s: { lda #0 sta.z i __b1: + // dividend = dividends[i] lda.z i asl tax @@ -31,51 +38,65 @@ test_16s: { sta.z dividend lda dividends+1,x sta.z dividend+1 + // divisor = divisors[i] lda divisors,x sta.z divisor lda divisors+1,x sta.z divisor+1 + // div16s(dividend, divisor) jsr div16s + // res = div16s(dividend, divisor) + // print_sword(dividend) lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_sword(dividend) jsr print_sword + // print_str(" / ") lda #str sta.z print_str.str+1 jsr print_str + // print_sword(divisor) lda.z divisor sta.z print_sword.w lda.z divisor+1 sta.z print_sword.w+1 jsr print_sword + // print_str(" = ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_sword(res) lda.z res sta.z print_sword.w lda.z res+1 sta.z print_sword.w+1 jsr print_sword + // print_str(" ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_sword(rem16s) lda.z rem16s sta.z print_sword.w lda.z rem16s+1 sta.z print_sword.w+1 jsr print_sword + // print_ln() jsr print_ln + // for( byte i: 0..5) inc.z i lda #6 cmp.z i bne __b1 + // } rts dividends: .word $7fff, $7fff, -$7fff, -$7fff, $7fff, -$7fff divisors: .word 5, -7, $b, -$d, -$11, $13 @@ -83,6 +104,7 @@ test_16s: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -90,6 +112,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a zero-terminated string @@ -170,15 +211,19 @@ print_byte: { print_str: { .label str = 3 __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -200,6 +245,7 @@ div16s: { .label return = 9 .label dividend = 3 .label divisor = $11 + // divr16s(dividend, divisor, 0) lda.z dividend sta.z divr16s.dividend lda.z dividend+1 @@ -209,6 +255,7 @@ div16s: { lda.z divisor+1 sta.z divr16s.divisor+1 jsr divr16s + // } rts } // Perform division on two signed 16-bit numbers with an initial remainder. @@ -225,16 +272,24 @@ divr16s: { .label return = 9 .label dividend = 5 .label divisor = 7 + // if(dividend<0 || rem<0) lda.z dividend+1 bmi __b1 ldy #0 __b2: + // if(divisor<0) lda.z divisor+1 bmi __b3 __b4: + // divr16u(dividendu, divisoru, remu) jsr divr16u + // divr16u(dividendu, divisoru, remu) + // resultu = divr16u(dividendu, divisoru, remu) + // if(neg==0) cpy #0 beq __breturn + // (signed word)rem16u + // rem16s = -(signed word)rem16u sec lda #0 sbc.z rem16s @@ -242,6 +297,7 @@ divr16s: { lda #0 sbc.z rem16s+1 sta.z rem16s+1 + // return -(signed word)resultu; sec lda #0 sbc.z return @@ -250,8 +306,10 @@ divr16s: { sbc.z return+1 sta.z return+1 __breturn: + // } rts __b3: + // -divisor sec lda #0 sbc.z divisoru @@ -259,11 +317,13 @@ divr16s: { lda #0 sbc.z divisoru+1 sta.z divisoru+1 + // neg = neg ^ 1 tya eor #1 tay jmp __b4 __b1: + // -dividend sec lda #0 sbc.z dividendu @@ -292,20 +352,28 @@ divr16u: { sta.z rem sta.z rem+1 __b1: + // rem = rem << 1 asl.z rem rol.z rem+1 + // >dividend lda.z dividend+1 + // >dividend & $80 and #$80 + // if( (>dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 lda #1 ora.z rem sta.z rem __b2: + // dividend = dividend << 1 asl.z dividend rol.z dividend+1 + // quotient = quotient << 1 asl.z quotient rol.z quotient+1 + // if(rem>=divisor) lda.z rem+1 cmp.z divisor+1 bcc __b3 @@ -314,10 +382,12 @@ divr16u: { cmp.z divisor bcc __b3 !: + // quotient++; inc.z quotient bne !+ inc.z quotient+1 !: + // rem = rem - divisor lda.z rem sec sbc.z divisor @@ -326,9 +396,12 @@ divr16u: { sbc.z divisor+1 sta.z rem+1 __b3: + // for( byte i : 0..15) inx cpx #$10 bne __b1 + // rem16u = rem + // } rts } test_8s: { @@ -339,48 +412,63 @@ test_8s: { lda #0 sta.z i __b1: + // dividend = dividends[i] ldy.z i lda dividends,y sta.z dividend + // divisor = divisors[i] lda divisors,y sta.z divisor + // div8s(dividend, divisor) ldy.z dividend tax jsr div8s + // res = div8s(dividend, divisor) sta.z res + // print_sbyte(dividend) lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_sbyte(dividend) jsr print_sbyte + // print_str(" / ") lda #str sta.z print_str.str+1 jsr print_str + // print_sbyte(divisor) lda.z divisor sta.z print_sbyte.b jsr print_sbyte + // print_str(" = ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_sbyte(res) lda.z res sta.z print_sbyte.b jsr print_sbyte + // print_str(" ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_sbyte(rem8s) stx.z print_sbyte.b jsr print_sbyte + // print_ln() jsr print_ln + // for( byte i: 0..5 ) inc.z i lda #6 cmp.z i bne __b1 + // } rts dividends: .byte $7f, -$7f, -$7f, $7f, $7f, $7f divisors: .byte 5, 7, -$b, -$d, $11, $13 @@ -389,16 +477,22 @@ test_8s: { // print_sbyte(signed byte zp(2) b) print_sbyte: { .label b = 2 + // if(b<0) lda.z b bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_byte((byte)b) jsr print_byte + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // b = -b lda.z b eor #$ff clc @@ -415,44 +509,57 @@ print_sbyte: { // div8s(signed byte register(Y) dividend, signed byte register(X) divisor) div8s: { .label neg = $e + // if(dividend<0) cpy #0 bmi __b1 lda #0 sta.z neg __b2: + // if(divisor<0) cpx #0 bmi __b3 __b4: + // div8u(dividendu, divisoru) tya jsr div8u + // div8u(dividendu, divisoru) + // resultu = div8u(dividendu, divisoru) tay + // if(neg==0) lda.z neg cmp #0 beq __b5 + // (signed byte)rem8u txa + // rem8s = -(signed byte)rem8u eor #$ff clc adc #1 tax + // return -(signed byte)resultu; tya eor #$ff clc adc #1 + // } rts __b5: tya rts __b3: + // -divisor txa eor #$ff clc adc #1 tax + // neg = neg ^ 1 lda #1 eor.z neg sta.z neg jmp __b4 __b1: + // -dividend tya eor #$ff clc @@ -468,10 +575,13 @@ div8s: { // Implemented using simple binary division // div8u(byte register(A) dividend, byte register(X) divisor) div8u: { + // divr8u(dividend, divisor, 0) sta.z divr8u.dividend stx.z divr8u.divisor jsr divr8u + // divr8u(dividend, divisor, 0) lda.z divr8u.return + // } rts } // Performs division on two 8 bit unsigned bytes and an initial remainder @@ -489,32 +599,44 @@ divr8u: { sta.z quotient tay __b1: + // rem = rem << 1 tya asl tay + // dividend & $80 lda #$80 and.z dividend + // if( (dividend & $80) != 0 ) cmp #0 beq __b2 + // rem = rem | 1 tya ora #1 tay __b2: + // dividend = dividend << 1 asl.z dividend + // quotient = quotient << 1 asl.z quotient + // if(rem>=divisor) cpy.z divisor bcc __b3 + // quotient++; inc.z quotient + // rem = rem - divisor tya sec sbc.z divisor tay __b3: + // for( byte i : 0..7) inx cpx #8 bne __b1 + // rem8u = rem tya tax + // } rts } test_16u: { @@ -525,6 +647,7 @@ test_16u: { lda #0 sta.z i __b1: + // dividend = dividends[i] lda.z i asl tax @@ -532,51 +655,65 @@ test_16u: { sta.z dividend lda dividends+1,x sta.z dividend+1 + // divisor = divisors[i] lda divisors,x sta.z divisor lda divisors+1,x sta.z divisor+1 + // div16u(dividend, divisor) jsr div16u + // res = div16u(dividend, divisor) + // print_word(dividend) lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_word(dividend) jsr print_word + // print_str(" / ") lda #str sta.z print_str.str+1 jsr print_str + // print_word(divisor) lda.z divisor sta.z print_word.w lda.z divisor+1 sta.z print_word.w+1 jsr print_word + // print_str(" = ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(res) lda.z res sta.z print_word.w lda.z res+1 sta.z print_word.w+1 jsr print_word + // print_str(" ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_word(rem16u) lda.z rem16u sta.z print_word.w lda.z rem16u+1 sta.z print_word.w+1 jsr print_word + // print_ln() jsr print_ln + // for( byte i : 0..5) inc.z i lda #6 cmp.z i bne __b1 + // } rts dividends: .word $ffff, $ffff, $ffff, $ffff, $ffff, $ffff divisors: .word 5, 7, $b, $d, $11, $13 @@ -590,11 +727,14 @@ div16u: { .label return = 9 .label dividend = 3 .label divisor = 7 + // divr16u(dividend, divisor, 0) lda.z dividend sta.z divr16u.dividend lda.z dividend+1 sta.z divr16u.dividend+1 jsr divr16u + // divr16u(dividend, divisor, 0) + // } rts } test_8u: { @@ -613,44 +753,59 @@ test_8u: { lda #0 sta.z i __b1: + // dividend = dividends[i] ldy.z i lda dividends,y sta.z dividend + // divisor = divisors[i] lda divisors,y sta.z divisor + // div8u(dividend, divisor) lda.z dividend ldx.z divisor jsr div8u + // div8u(dividend, divisor) + // res = div8u(dividend, divisor) sta.z res + // print_byte(dividend) jsr print_byte + // print_str(" / ") lda #str sta.z print_str.str+1 jsr print_str + // print_byte(divisor) lda.z divisor sta.z print_byte.b jsr print_byte + // print_str(" = ") lda #str1 sta.z print_str.str+1 jsr print_str + // print_byte(res) lda.z res sta.z print_byte.b jsr print_byte + // print_str(" ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_byte(rem8u) stx.z print_byte.b jsr print_byte + // print_ln() jsr print_ln + // for( byte i: 0..5 ) inc.z i lda #6 cmp.z i bne __b11 + // } rts __b11: lda.z print_line_cursor @@ -663,7 +818,9 @@ test_8u: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -678,17 +835,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #irq sta KERNEL_IRQ+1 __b1: + // (*FGCOL)++; inc FGCOL jmp __b1 } irq: { + // (*BGCOL)++; inc BGCOL + // asm lda $dc0d + // } jmp $ea81 } diff --git a/src/test/ref/test-interrupt-volatile-write.asm b/src/test/ref/test-interrupt-volatile-write.asm index 8e8071d43..6d492d83b 100644 --- a/src/test/ref/test-interrupt-volatile-write.asm +++ b/src/test/ref/test-interrupt-volatile-write.asm @@ -7,35 +7,45 @@ .label BGCOL = $d020 .label col = 2 __bbegin: + // col = 0 lda #0 sta.z col jsr main rts main: { + // *KERNEL_IRQ = &irq lda #irq sta KERNEL_IRQ+1 __b1: + // if(col>10) lda.z col cmp #$a+1 bcc __b1 + // col = 0 lda #0 sta.z col jmp __b1 } irq: { + // asm lda $dc0d + // *BGCOL = col lda.z col sta BGCOL + // if(col!=0) lda.z col cmp #0 bne __b1 + // col += 2 clc adc #2 sta.z col + // } jmp $ea81 __b1: + // col++; inc.z col jmp $ea81 } diff --git a/src/test/ref/test-interrupt-volatile-write.log b/src/test/ref/test-interrupt-volatile-write.log index 20aca08c9..01cdae326 100644 --- a/src/test/ref/test-interrupt-volatile-write.log +++ b/src/test/ref/test-interrupt-volatile-write.log @@ -97,12 +97,12 @@ Finalized unsigned number type (byte) 2 Successful SSA optimization PassNFinalizeNumberTypeConversions Inversing boolean not [4] (bool~) main::$1 ← (byte) col <= (byte) $a from [3] (bool~) main::$0 ← (byte) col > (byte) $a Successful SSA optimization Pass2UnaryNotSimplification -Simple Condition (bool~) main::$1 [5] if((byte) col<=(byte) $a) goto main::@1 -Simple Condition (bool~) irq::$0 [11] if((byte) col!=(byte) 0) goto irq::@1 +Simple Condition (bool~) main::$1 [4] if((byte) col<=(byte) $a) goto main::@1 +Simple Condition (bool~) irq::$0 [10] if((byte) col!=(byte) 0) goto irq::@1 Successful SSA optimization Pass2ConditionalJumpSimplification if() condition always true - replacing block destination [2] if(true) goto main::@2 Successful SSA optimization Pass2ConstantIfs -Rewriting conditional comparison [5] if((byte) col<=(byte) $a) goto main::@1 +Rewriting conditional comparison [4] if((byte) col<=(byte) $a) goto main::@1 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) $a+1 in if((byte) col<(byte) $a+(number) 1) goto main::@1 diff --git a/src/test/ref/test-interrupt-volatile.asm b/src/test/ref/test-interrupt-volatile.asm index 490749960..506bfa91f 100644 --- a/src/test/ref/test-interrupt-volatile.asm +++ b/src/test/ref/test-interrupt-volatile.asm @@ -5,22 +5,28 @@ .label BGCOL = $d020 .label col = 2 __bbegin: + // col = 0 lda #0 sta.z col jsr main rts main: { + // *KERNEL_IRQ = &irq lda #irq sta KERNEL_IRQ+1 __b1: + // col++; inc.z col jmp __b1 } irq: { + // asm lda $dc0d + // *BGCOL = col lda.z col sta BGCOL + // } jmp $ea81 } diff --git a/src/test/ref/test-interrupt.asm b/src/test/ref/test-interrupt.asm index 38baddd76..c2673359f 100644 --- a/src/test/ref/test-interrupt.asm +++ b/src/test/ref/test-interrupt.asm @@ -5,16 +5,21 @@ .label BGCOL = $d020 .label FGCOL = $d021 main: { + // *KERNEL_IRQ = &irq lda #irq sta KERNEL_IRQ+1 __b1: + // (*FGCOL)++; inc FGCOL jmp __b1 } irq: { + // (*BGCOL)++; inc BGCOL + // asm lda $dc0d + // } jmp $ea81 } diff --git a/src/test/ref/test-kasm-pc.asm b/src/test/ref/test-kasm-pc.asm index 7c24e0584..a8f96394d 100644 --- a/src/test/ref/test-kasm-pc.asm +++ b/src/test/ref/test-kasm-pc.asm @@ -3,12 +3,15 @@ :BasicUpstart(main) .pc = $80d "Program" .label TABLE = $2000 + // kickasm main: { .label BORDERCOL = $d020 ldx #0 __b2: + // *BORDERCOL = TABLE[i++] lda TABLE,x sta BORDERCOL + // *BORDERCOL = TABLE[i++]; inx jmp __b2 } diff --git a/src/test/ref/test-kasm.asm b/src/test/ref/test-kasm.asm index 9ba9858f5..4498edbbe 100644 --- a/src/test/ref/test-kasm.asm +++ b/src/test/ref/test-kasm.asm @@ -2,10 +2,12 @@ .pc = $801 "Basic" :BasicUpstart(main) .pc = $80d "Program" + // kickasm .byte 1, 2, 3 main: { __b1: + // kickasm inc $d020 jmp __b1 diff --git a/src/test/ref/test-keyboard-space.asm b/src/test/ref/test-keyboard-space.asm index 511bfb863..a67cc6008 100644 --- a/src/test/ref/test-keyboard-space.asm +++ b/src/test/ref/test-keyboard-space.asm @@ -16,18 +16,25 @@ .const BLUE = 6 .const KEY_SPACE = $3c main: { + // keyboard_init() jsr keyboard_init __b1: + // while (*RASTER!=$ff) lda #$ff cmp RASTER bne __b1 + // keyboard_key_pressed(KEY_SPACE) jsr keyboard_key_pressed + // keyboard_key_pressed(KEY_SPACE) + // if(keyboard_key_pressed(KEY_SPACE)!=0) cmp #0 bne __b4 + // *BGCOL = BLUE lda #BLUE sta BGCOL jmp __b1 __b4: + // *BGCOL = GREEN lda #GREEN sta BGCOL jmp __b1 @@ -39,8 +46,11 @@ main: { keyboard_key_pressed: { .const colidx = KEY_SPACE&7 .label rowidx = KEY_SPACE>>3 + // keyboard_matrix_read(rowidx) jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] and keyboard_matrix_col_bitmask+colidx + // } rts } // Read a single row of the keyboard matrix @@ -49,20 +59,26 @@ keyboard_key_pressed: { // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { + // *CIA1_PORT_A_DDR = $ff // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR + // *CIA1_PORT_B_DDR = $00 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR + // } rts } // Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7) diff --git a/src/test/ref/test-keyboard-space.log b/src/test/ref/test-keyboard-space.log index 22d277e95..a2d625ac6 100644 --- a/src/test/ref/test-keyboard-space.log +++ b/src/test/ref/test-keyboard-space.log @@ -219,12 +219,12 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) keyboard_matrix_read::rowid#1 (byte) keyboard_matrix_read::rowid#0 Identical Phi Values (byte) keyboard_key_pressed::key#1 (byte) keyboard_key_pressed::key#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [29] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 -Simple Condition (bool~) main::$3 [36] if((byte~) main::$2!=(byte) 0) goto main::@8 +Simple Condition (bool~) main::$1 [19] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@4 +Simple Condition (bool~) main::$3 [25] if((byte~) main::$2!=(byte) 0) goto main::@8 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) keyboard_key_pressed::key#0 = KEY_SPACE Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [27] if(true) goto main::@4 +if() condition always true - replacing block destination [17] if(true) goto main::@4 Successful SSA optimization Pass2ConstantIfs Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks diff --git a/src/test/ref/test-keyboard.asm b/src/test/ref/test-keyboard.asm index 4dba55739..584820a3f 100644 --- a/src/test/ref/test-keyboard.asm +++ b/src/test/ref/test-keyboard.asm @@ -72,6 +72,7 @@ main: { sta.z sc+1 // Clear screen __b1: + // for(byte* sc = $400; sc<$400+1000;sc++) lda.z sc+1 cmp #>$400+$3e8 bcs !__b2+ @@ -84,8 +85,10 @@ main: { jmp __b2 !__b2: !: + // keyboard_init() jsr keyboard_init __b4: + // while (*RASTER!=$ff) lda #$ff cmp RASTER bne __b4 @@ -97,24 +100,33 @@ main: { sta.z row // Read & print keyboard matrix __b5: + // keyboard_matrix_read(row) ldy.z row jsr keyboard_matrix_read + // keyboard_matrix_read(row) + // row_pressed_bits = keyboard_matrix_read(row) tax ldy #0 __b6: + // row_pressed_bits & $80 txa and #$80 + // if( (row_pressed_bits & $80) != 0) cmp #0 bne __b7 + // screen[col] = '0' lda #'0' sta (screen),y __b8: + // row_pressed_bits = row_pressed_bits * 2 txa asl tax + // for(byte col : 0..7) iny cpy #8 bne __b6 + // screen = screen + 40 lda #$28 clc adc.z screen @@ -122,10 +134,12 @@ main: { bcc !+ inc.z screen+1 !: + // for(byte row : 0..7) inc.z row lda #8 cmp.z row bne __b5 + // screen = screen + 40 lda #$28 clc adc.z screen @@ -137,42 +151,56 @@ main: { txa sta.z ch __b12: + // keyboard_get_keycode(ch) ldy.z ch jsr keyboard_get_keycode + // key = keyboard_get_keycode(ch) + // if(key!=$3f) cmp #$3f beq __b13 + // keyboard_key_pressed(key) tay jsr keyboard_key_pressed + // if(keyboard_key_pressed(key)!=0) cmp #0 beq __b13 + // screen[i++] = ch txa tay lda.z ch sta (screen),y + // screen[i++] = ch; inx __b13: + // for( byte ch : 0..$3f ) inc.z ch lda #$40 cmp.z ch bne __b12 b1: // Add some spaces + // screen[i++] = ' ' txa tay lda #' ' sta (screen),y + // screen[i++] = ' '; inx + // while (i<5) cpx #5 bcc b1 jmp __b4 __b7: + // screen[col] = '1' lda #'1' sta (screen),y jmp __b8 __b2: + // *sc = ' ' lda #' ' ldy #0 sta (sc),y + // for(byte* sc = $400; sc<$400+1000;sc++) inc.z sc bne !+ inc.z sc+1 @@ -186,17 +214,23 @@ main: { // keyboard_key_pressed(byte register(Y) key) keyboard_key_pressed: { .label colidx = 7 + // colidx = key&7 tya and #7 sta.z colidx + // rowidx = key>>3 tya lsr lsr lsr + // keyboard_matrix_read(rowidx) tay jsr keyboard_matrix_read + // keyboard_matrix_read(rowidx) + // keyboard_matrix_read(rowidx) & keyboard_matrix_col_bitmask[colidx] ldy.z colidx and keyboard_matrix_col_bitmask,y + // } rts } // Read a single row of the keyboard matrix @@ -206,10 +240,13 @@ keyboard_key_pressed: { // leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(Y) rowid) keyboard_matrix_read: { + // *CIA1_PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask,y sta CIA1_PORT_A + // ~*CIA1_PORT_B lda CIA1_PORT_B eor #$ff + // } rts } // Get the keycode corresponding to a specific screen code character @@ -218,17 +255,22 @@ keyboard_matrix_read: { // If there is no non-shifted key representing the char $3f is returned (representing RUN/STOP) . // keyboard_get_keycode(byte register(Y) ch) keyboard_get_keycode: { + // return keyboard_char_keycodes[ch]; lda keyboard_char_keycodes,y + // } rts } // Initialize keyboard reading by setting CIA#$ Data Direction Registers keyboard_init: { + // *CIA1_PORT_A_DDR = $ff // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1_PORT_A_DDR + // *CIA1_PORT_B_DDR = $00 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1_PORT_B_DDR + // } rts } // Keycodes for each screen code character from $00-$3f. diff --git a/src/test/ref/test-keyboard.log b/src/test/ref/test-keyboard.log index 6c5ebb668..fb8c9d03a 100644 --- a/src/test/ref/test-keyboard.log +++ b/src/test/ref/test-keyboard.log @@ -585,15 +585,15 @@ Identical Phi Values (byte) main::row#3 (byte) main::row#2 Identical Phi Values (byte*) main::screen#11 (byte*) main::screen#2 Identical Phi Values (byte*) main::screen#8 (byte*) main::screen#11 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [34] if((byte*) main::sc#2<(word)(number) $400+(number) $3e8) goto main::@2 -Simple Condition (bool~) main::$2 [41] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@10 -Simple Condition (bool~) main::$5 [55] if((byte~) main::$4!=(byte) 0) goto main::@14 -Simple Condition (bool~) main::$7 [65] if((byte) main::col#1!=rangelast(0,7)) goto main::@13 -Simple Condition (bool~) main::$9 [71] if((byte) main::row#1!=rangelast(0,7)) goto main::@12 -Simple Condition (bool~) main::$13 [86] if((byte) main::key#0==(byte) $3f) goto main::@21 -Simple Condition (bool~) main::$17 [90] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@20 -Simple Condition (bool~) main::$16 [99] if((byte~) main::$14==(byte) 0) goto main::@21 -Simple Condition (bool~) main::$18 [107] if((byte) main::i#2<(byte) 5) goto main::@26 +Simple Condition (bool~) main::$1 [22] if((byte*) main::sc#2<(word)(number) $400+(number) $3e8) goto main::@2 +Simple Condition (bool~) main::$2 [28] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@10 +Simple Condition (bool~) main::$5 [40] if((byte~) main::$4!=(byte) 0) goto main::@14 +Simple Condition (bool~) main::$7 [46] if((byte) main::col#1!=rangelast(0,7)) goto main::@13 +Simple Condition (bool~) main::$9 [50] if((byte) main::row#1!=rangelast(0,7)) goto main::@12 +Simple Condition (bool~) main::$13 [60] if((byte) main::key#0==(byte) $3f) goto main::@21 +Simple Condition (bool~) main::$17 [64] if((byte) main::ch#1!=rangelast(0,$3f)) goto main::@20 +Simple Condition (bool~) main::$16 [70] if((byte~) main::$14==(byte) 0) goto main::@21 +Simple Condition (bool~) main::$18 [77] if((byte) main::i#2<(byte) 5) goto main::@26 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) main::sc#0 = (byte*) 1024 Constant (const byte*) main::screen#0 = (byte*) 1024 @@ -602,14 +602,14 @@ Constant (const byte) main::col#0 = 0 Constant (const byte) main::i#0 = 0 Constant (const byte) main::ch#0 = 0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [39] if(true) goto main::@10 +if() condition always true - replacing block destination [26] if(true) goto main::@10 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [63] main::col#1 ← ++ main::col#2 to ++ -Resolved ranged comparison value [65] if(main::col#1!=rangelast(0,7)) goto main::@13 to (number) 8 -Resolved ranged next value [69] main::row#1 ← ++ main::row#2 to ++ -Resolved ranged comparison value [71] if(main::row#1!=rangelast(0,7)) goto main::@12 to (number) 8 -Resolved ranged next value [88] main::ch#1 ← ++ main::ch#2 to ++ -Resolved ranged comparison value [90] if(main::ch#1!=rangelast(0,$3f)) goto main::@20 to (number) $40 +Resolved ranged next value [44] main::col#1 ← ++ main::col#2 to ++ +Resolved ranged comparison value [46] if(main::col#1!=rangelast(0,7)) goto main::@13 to (number) 8 +Resolved ranged next value [48] main::row#1 ← ++ main::row#2 to ++ +Resolved ranged comparison value [50] if(main::row#1!=rangelast(0,7)) goto main::@12 to (number) 8 +Resolved ranged next value [62] main::ch#1 ← ++ main::ch#2 to ++ +Resolved ranged comparison value [64] if(main::ch#1!=rangelast(0,$3f)) goto main::@20 to (number) $40 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks Adding number conversion cast (unumber) 8 in if((byte) main::col#1!=(number) 8) goto main::@13 diff --git a/src/test/ref/test-lohiconst.asm b/src/test/ref/test-lohiconst.asm index 5492226b6..4480d95e1 100644 --- a/src/test/ref/test-lohiconst.asm +++ b/src/test/ref/test-lohiconst.asm @@ -5,13 +5,18 @@ .const PI_u4f28 = $3243f6a9 main: { .label SCREEN = $400 + // SCREEN[0] = > > PI_u4f28 lda #>PI_u4f28>>$10 sta SCREEN + // SCREEN[1] = < > PI_u4f28 lda #>$10 sta SCREEN+1 + // SCREEN[2] = > < PI_u4f28 lda #>PI_u4f28&$ffff sta SCREEN+2 + // SCREEN[3] = < < PI_u4f28 lda #$12345678>>$10 sta.z dw+3 __b1: + // for( dword dw = $12345678; dw != $12345690; dw++ ) lda.z dw+3 cmp #>$12345690>>$10 bne __b2 @@ -46,12 +48,15 @@ main: { lda.z dw cmp #<$12345690 bne __b2 + // } rts __b2: + // >dw lda.z dw+2 sta.z __3 lda.z dw+3 sta.z __3+1 + // >dw2 = (>dw) + $1111 clc lda.z __32 adc #<$1111 @@ -67,10 +72,12 @@ main: { sta.z dw2+2 lda.z __32+1 sta.z dw2+3 + // dw2) lda.z dw2+2 sta.z print_word.w lda.z dw2+3 sta.z print_word.w+1 jsr print_word + // print_char(' ') lda #' ' jsr print_char + // print_word(dw2 lda.z dw2+2 sta.z __16 lda.z dw2+3 sta.z __16+1 + // print_byte(> >dw2) tax jsr print_byte + // print_char(' ') lda #' ' jsr print_char + // >dw2 lda.z dw2+2 sta.z __20 lda.z dw2+3 sta.z __20+1 + // print_byte(< >dw2) lda.z __20 tax jsr print_byte + // print_char(' ') lda #' ' jsr print_char + // >4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a word as HEX // print_word(word zp($e) w) print_word: { .label w = $e + // print_byte(>w) lda.z w+1 tax jsr print_byte + // print_byte(dw) lda.z dw+2 sta.z print_word.w lda.z dw+3 @@ -223,17 +264,22 @@ print_dword: { sta.z print_char_cursor lda.z print_char_cursor_1+1 sta.z print_char_cursor+1 + // print_word(>dw) jsr print_word + // print_word(str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #-$7fff sta.z a+1 __b1: + // print_str(".") lda #str @@ -44,6 +51,7 @@ mul16s_compare: { jsr print_str ldy #0 __b2: + // a=a+3371 clc lda.z a adc #<$d2b @@ -51,6 +59,7 @@ mul16s_compare: { lda.z a+1 adc #>$d2b sta.z a+1 + // b=b+4093 clc lda.z b adc #<$ffd @@ -58,9 +67,16 @@ mul16s_compare: { lda.z b+1 adc #>$ffd sta.z b+1 + // muls16s(a, b) jsr muls16s + // ms = muls16s(a, b) + // mul16s(a,b) jsr mul16s + // mn = mul16s(a,b) + // mulf16s(a,b) jsr mulf16s + // mf = mulf16s(a,b) + // if(ms!=mf) lda.z ms cmp.z mf bne !+ @@ -79,6 +95,7 @@ mul16s_compare: { b1: ldx #1 __b3: + // if(ms!=mn) lda.z ms cmp.z mn bne !+ @@ -94,32 +111,41 @@ mul16s_compare: { !: ldx #0 __b4: + // if(ok==0) cpx #0 bne __b5 + // *BGCOL = 2 lda #2 sta BGCOL + // mul16s_error(a,b, ms, mn, mf) jsr mul16s_error + // } rts __b5: + // for(byte j: 0..15) iny cpy #$10 bne __b2 + // for(byte i: 0..15) inc.z i lda #$10 cmp.z i beq !__b1+ jmp __b1 !__b1: + // print_ln() jsr print_ln lda.z print_line_cursor sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("signed word multiply results match!") lda #str1 sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln rts str1: .text "signed word multiply results match!" @@ -128,6 +154,7 @@ mul16s_compare: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -135,6 +162,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorstr sta.z print_str.str+1 jsr print_str + // print_sword(a) jsr print_sword + // print_str("*") lda #str1 sta.z print_str.str+1 jsr print_str + // print_sword(b) lda.z b sta.z print_sword.w lda.z b+1 sta.z print_sword.w+1 jsr print_sword + // print_str(" slow:") lda #str2 sta.z print_str.str+1 jsr print_str + // print_sdword(ms) jsr print_sdword + // print_str(" / normal:") lda #str3 sta.z print_str.str+1 jsr print_str + // print_sdword(mn) lda.z mn sta.z print_sdword.dw lda.z mn+1 @@ -212,11 +253,13 @@ mul16s_error: { lda.z mn+3 sta.z print_sdword.dw+3 jsr print_sdword + // print_str(" / fast:") lda #str4 sta.z print_str.str+1 jsr print_str + // print_sdword(mf) lda.z mf sta.z print_sdword.dw lda.z mf+1 @@ -226,7 +269,9 @@ mul16s_error: { lda.z mf+3 sta.z print_sdword.dw+3 jsr print_sdword + // print_ln() jsr print_ln + // } rts str: .text "signed word multiply mismatch " .byte 0 @@ -235,16 +280,22 @@ mul16s_error: { // print_sdword(signed dword zp(2) dw) print_sdword: { .label dw = 2 + // if(dw<0) lda.z dw+3 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_dword((dword)dw) jsr print_dword + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // dw = -dw sec lda.z dw eor #$ff @@ -267,73 +318,93 @@ print_sdword: { // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a dword as HEX // print_dword(dword zp(2) dw) print_dword: { .label dw = 2 + // print_word(>dw) lda.z dw+2 sta.z print_word.w lda.z dw+3 sta.z print_word.w+1 jsr print_word + // print_word(w) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a signed word as HEX // print_sword(signed word zp($e) w) print_sword: { .label w = $e + // if(w<0) lda.z w+1 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_word((word)w) jsr print_word + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // w = -w sec lda #0 sbc.z w @@ -355,6 +426,7 @@ mulf16s: { .label return = $a .label a = $e .label b = $10 + // mulf16u((word)a, (word)b) lda.z a sta.z mulf16u.a lda.z a+1 @@ -364,12 +436,17 @@ mulf16s: { lda.z b+1 sta.z mulf16u.b+1 jsr mulf16u + // mulf16u((word)a, (word)b) + // m = mulf16u((word)a, (word)b) + // if(a<0) lda.z a+1 bpl __b1 + // >m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc.z b @@ -382,12 +459,15 @@ mulf16s: { lda.z __16+1 sta.z m+3 __b1: + // if(b<0) lda.z b+1 bpl __b2 + // >m lda.z m+2 sta.z __13 lda.z m+3 sta.z __13+1 + // >m = (>m)-(word)a lda.z __17 sec sbc.z a @@ -400,6 +480,8 @@ mulf16s: { lda.z __17+1 sta.z m+3 __b2: + // (signed dword)m + // } rts } // Fast multiply two unsigned words to a double word result @@ -412,14 +494,17 @@ mulf16u: { .label return = $a .label a = $18 .label b = $1a + // *memA = a lda.z a sta memA lda.z a+1 sta memA+1 + // *memB = b lda.z b sta memB lda.z b+1 sta memB+1 + // asm lda memA sta sm1a+1 sta sm3a+1 @@ -512,6 +597,7 @@ mulf16u: { bcc !+ inc memR+3 !: + // return *memR; lda memR sta.z return lda memR+1 @@ -520,6 +606,7 @@ mulf16u: { sta.z return+2 lda memR+3 sta.z return+3 + // } rts } // Multiply of two signed words to a signed double word @@ -534,6 +621,7 @@ mul16s: { .label return = 6 .label a = $e .label b = $10 + // mul16u((word)a, (word) b) lda.z a sta.z mul16u.a lda.z a+1 @@ -543,12 +631,17 @@ mul16s: { lda.z b+1 sta.z mul16u.b+1 jsr mul16u + // mul16u((word)a, (word) b) + // m = mul16u((word)a, (word) b) + // if(a<0) lda.z a+1 bpl __b1 + // >m lda.z m+2 sta.z __9 lda.z m+3 sta.z __9+1 + // >m = (>m)-(word)b lda.z __16 sec sbc.z b @@ -561,12 +654,15 @@ mul16s: { lda.z __16+1 sta.z m+3 __b1: + // if(b<0) lda.z b+1 bpl __b2 + // >m lda.z m+2 sta.z __13 lda.z m+3 sta.z __13+1 + // >m = (>m)-(word)a lda.z __17 sec sbc.z a @@ -579,6 +675,8 @@ mul16s: { lda.z __17+1 sta.z m+3 __b2: + // (signed dword)m + // } rts } // Perform binary multiplication of two unsigned 16-bit words into a 32-bit unsigned double word @@ -589,6 +687,7 @@ mul16u: { .label res = 6 .label b = $1a .label return = 6 + // mb = b lda.z b sta.z mb lda.z b+1 @@ -603,16 +702,21 @@ mul16u: { lda #>0>>$10 sta.z res+3 __b1: + // while(a!=0) lda.z a bne __b2 lda.z a+1 bne __b2 + // } rts __b2: + // a&1 lda #1 and.z a + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -627,8 +731,10 @@ mul16u: { adc.z mb+3 sta.z res+3 __b3: + // a = a>>1 lsr.z a+1 ror.z a + // mb = mb<<1 asl.z mb rol.z mb+1 rol.z mb+2 @@ -645,8 +751,10 @@ muls16s: { .label i = $1a .label a = $e .label b = $10 + // if(a<0) lda.z a+1 bmi b3 + // if (a>0) bmi b2 bne !+ lda.z a @@ -663,6 +771,7 @@ muls16s: { sta.z j sta.z j+1 __b3: + // for(signed word j = 0; j!=a; j++) lda.z j+1 cmp.z a+1 bne __b4 @@ -678,8 +787,10 @@ muls16s: { sta.z return+2 lda #>0>>$10 sta.z return+3 + // } rts __b4: + // m = m + b lda.z b+1 ora #$7f bmi !+ @@ -699,6 +810,7 @@ muls16s: { lda.z m+3 adc.z $ff sta.z m+3 + // for(signed word j = 0; j!=a; j++) inc.z j bne !+ inc.z j+1 @@ -716,6 +828,7 @@ muls16s: { sta.z i sta.z i+1 __b5: + // for(signed word i = 0; i!=a; i--) lda.z i+1 cmp.z a+1 bne __b6 @@ -724,6 +837,7 @@ muls16s: { bne __b6 rts __b6: + // m = m - b lda.z b+1 ora #$7f bmi !+ @@ -743,6 +857,7 @@ muls16s: { lda.z m+3 sbc.z $ff sta.z m+3 + // for(signed word i = 0; i!=a; i--) lda.z i bne !+ dec.z i+1 @@ -769,6 +884,7 @@ mul16u_compare: { lda #>$400 sta.z print_char_cursor+1 __b1: + // print_str(".") lda #str @@ -776,6 +892,7 @@ mul16u_compare: { jsr print_str ldy #0 __b2: + // a=a+3371 clc lda.z a adc #<$d2b @@ -783,6 +900,7 @@ mul16u_compare: { lda.z a+1 adc #>$d2b sta.z a+1 + // b=b+4093 clc lda.z b adc #<$ffd @@ -790,13 +908,22 @@ mul16u_compare: { lda.z b+1 adc #>$ffd sta.z b+1 + // muls16u(a, b) jsr muls16u + // ms = muls16u(a, b) + // mul16u(a,b) lda.z a sta.z mul16u.a lda.z a+1 sta.z mul16u.a+1 jsr mul16u + // mul16u(a,b) + // mn = mul16u(a,b) + // mulf16u(a,b) jsr mulf16u + // mulf16u(a,b) + // mf = mulf16u(a,b) + // if(ms!=mf) lda.z ms cmp.z mf bne !+ @@ -815,6 +942,7 @@ mul16u_compare: { b1: ldx #1 __b3: + // if(ms!=mn) lda.z ms cmp.z mn bne !+ @@ -830,26 +958,33 @@ mul16u_compare: { !: ldx #0 __b4: + // if(ok==0) cpx #0 bne __b5 + // *BGCOL = 2 lda #2 sta BGCOL + // mul16u_error(a,b, ms, mn, mf) lda.z a sta.z mul16u_error.a lda.z a+1 sta.z mul16u_error.a+1 jsr mul16u_error + // } rts __b5: + // for(byte j: 0..15) iny cpy #$10 bne __b2 + // for(byte i: 0..15) inc.z i lda #$10 cmp.z i beq !__b1+ jmp __b1 !__b1: + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -859,11 +994,13 @@ mul16u_compare: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("word multiply results match!") lda #str1 sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln rts str1: .text "word multiply results match!" @@ -876,33 +1013,41 @@ mul16u_error: { .label ms = 2 .label mn = 6 .label mf = $a + // print_str("multiply mismatch ") lda #str sta.z print_str.str+1 jsr print_str + // print_word(a) jsr print_word + // print_str("*") lda #str1 sta.z print_str.str+1 jsr print_str + // print_word(b) lda.z b sta.z print_word.w lda.z b+1 sta.z print_word.w+1 jsr print_word + // print_str(" slow:") lda #str2 sta.z print_str.str+1 jsr print_str + // print_dword(ms) jsr print_dword + // print_str(" / normal:") lda #str3 sta.z print_str.str+1 jsr print_str + // print_dword(mn) lda.z mn sta.z print_dword.dw lda.z mn+1 @@ -912,11 +1057,13 @@ mul16u_error: { lda.z mn+3 sta.z print_dword.dw+3 jsr print_dword + // print_str(" / fast:") lda #str4 sta.z print_str.str+1 jsr print_str + // print_dword(mf) lda.z mf sta.z print_dword.dw lda.z mf+1 @@ -926,11 +1073,13 @@ mul16u_error: { lda.z mf+3 sta.z print_dword.dw+3 jsr print_dword + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 sta.z print_line_cursor+1 jsr print_ln + // } rts str: .text "multiply mismatch " .byte 0 @@ -944,6 +1093,7 @@ muls16u: { .label i = $e .label a = $18 .label b = $1a + // if(a!=0) lda.z a bne !+ lda.z a+1 @@ -960,6 +1110,7 @@ muls16u: { sta.z i sta.z i+1 __b2: + // for(word i = 0; i!=a; i++) lda.z i+1 cmp.z a+1 bne __b3 @@ -975,8 +1126,10 @@ muls16u: { sta.z return+2 lda #>0>>$10 sta.z return+3 + // } rts __b3: + // m = m + b lda.z m clc adc.z b @@ -990,6 +1143,7 @@ muls16u: { lda.z m+3 adc #0 sta.z m+3 + // for(word i = 0; i!=a; i++) inc.z i bne !+ inc.z i+1 @@ -1024,6 +1178,7 @@ mulf_init: { lda #>mulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -1042,63 +1197,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -1106,6 +1282,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 @@ -1114,7 +1291,9 @@ mulf_init: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -1129,17 +1308,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(signed byte) 0) goto mul16s::@1 -Simple Condition (bool~) mul16s::$6 [195] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 -Simple Condition (bool~) mulf_init::$0 [221] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [227] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [246] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [255] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf16s::$4 [283] if((signed word) mulf16s::a#0>=(signed byte) 0) goto mulf16s::@1 -Simple Condition (bool~) mulf16s::$6 [287] if((signed word) mulf16s::b#0>=(signed byte) 0) goto mulf16s::@2 -Simple Condition (bool~) muls16u::$1 [330] if((word) muls16u::a#0==(byte) 0) goto muls16u::@1 -Simple Condition (bool~) muls16u::$2 [337] if((word) muls16u::i#2!=(word) muls16u::a#0) goto muls16u::@5 -Simple Condition (bool~) muls16s::$0 [348] if((signed word) muls16s::a#0<(signed byte) 0) goto muls16s::@1 -Simple Condition (bool~) muls16s::$2 [354] if((signed word) muls16s::a#0<=(signed byte) 0) goto muls16s::@3 -Simple Condition (bool~) muls16s::$3 [359] if((signed word) muls16s::j#2!=(signed word) muls16s::a#0) goto muls16s::@9 -Simple Condition (bool~) muls16s::$5 [368] if((signed word) muls16s::i#2!=(signed word) muls16s::a#0) goto muls16s::@15 -Simple Condition (bool~) mul16u_compare::$10 [415] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3 -Simple Condition (bool~) mul16u_compare::$12 [419] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@4 -Simple Condition (bool~) mul16u_compare::$14 [425] if((byte) mul16u_compare::ok#3!=(byte) 0) goto mul16u_compare::@5 -Simple Condition (bool~) mul16u_compare::$16 [431] if((byte) mul16u_compare::j#1!=rangelast(0,$f)) goto mul16u_compare::@2 -Simple Condition (bool~) mul16u_compare::$17 [450] if((byte) mul16u_compare::i#1!=rangelast(0,$f)) goto mul16u_compare::@1 -Simple Condition (bool~) mul16s_compare::$10 [552] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mf#0) goto mul16s_compare::@3 -Simple Condition (bool~) mul16s_compare::$12 [556] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mn#0) goto mul16s_compare::@4 -Simple Condition (bool~) mul16s_compare::$14 [562] if((byte) mul16s_compare::ok#3!=(byte) 0) goto mul16s_compare::@5 -Simple Condition (bool~) mul16s_compare::$16 [568] if((byte) mul16s_compare::j#1!=rangelast(0,$f)) goto mul16s_compare::@2 -Simple Condition (bool~) mul16s_compare::$17 [587] if((byte) mul16s_compare::i#1!=rangelast(0,$f)) goto mul16s_compare::@1 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#15)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#133) goto print_ln::@1 +Simple Condition (bool~) print_sword::$0 [30] if((signed word) print_sword::w#3<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) print_sdword::$0 [61] if((signed dword) print_sdword::dw#4<(signed byte) 0) goto print_sdword::@1 +Simple Condition (bool~) mul16u::$0 [100] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2 +Simple Condition (bool~) mul16u::$3 [103] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@4 +Simple Condition (bool~) mul16s::$4 [116] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1 +Simple Condition (bool~) mul16s::$6 [119] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2 +Simple Condition (bool~) mulf_init::$0 [138] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [142] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [159] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [165] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf16s::$4 [185] if((signed word) mulf16s::a#0>=(signed byte) 0) goto mulf16s::@1 +Simple Condition (bool~) mulf16s::$6 [188] if((signed word) mulf16s::b#0>=(signed byte) 0) goto mulf16s::@2 +Simple Condition (bool~) muls16u::$1 [213] if((word) muls16u::a#0==(byte) 0) goto muls16u::@1 +Simple Condition (bool~) muls16u::$2 [218] if((word) muls16u::i#2!=(word) muls16u::a#0) goto muls16u::@5 +Simple Condition (bool~) muls16s::$0 [225] if((signed word) muls16s::a#0<(signed byte) 0) goto muls16s::@1 +Simple Condition (bool~) muls16s::$2 [228] if((signed word) muls16s::a#0<=(signed byte) 0) goto muls16s::@3 +Simple Condition (bool~) muls16s::$3 [232] if((signed word) muls16s::j#2!=(signed word) muls16s::a#0) goto muls16s::@9 +Simple Condition (bool~) muls16s::$5 [238] if((signed word) muls16s::i#2!=(signed word) muls16s::a#0) goto muls16s::@15 +Simple Condition (bool~) mul16u_compare::$10 [271] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3 +Simple Condition (bool~) mul16u_compare::$12 [274] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@4 +Simple Condition (bool~) mul16u_compare::$14 [278] if((byte) mul16u_compare::ok#3!=(byte) 0) goto mul16u_compare::@5 +Simple Condition (bool~) mul16u_compare::$16 [282] if((byte) mul16u_compare::j#1!=rangelast(0,$f)) goto mul16u_compare::@2 +Simple Condition (bool~) mul16u_compare::$17 [295] if((byte) mul16u_compare::i#1!=rangelast(0,$f)) goto mul16u_compare::@1 +Simple Condition (bool~) mul16s_compare::$10 [366] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mf#0) goto mul16s_compare::@3 +Simple Condition (bool~) mul16s_compare::$12 [369] if((signed dword) mul16s_compare::ms#0==(signed dword) mul16s_compare::mn#0) goto mul16s_compare::@4 +Simple Condition (bool~) mul16s_compare::$14 [373] if((byte) mul16s_compare::ok#3!=(byte) 0) goto mul16s_compare::@5 +Simple Condition (bool~) mul16s_compare::$16 [377] if((byte) mul16s_compare::j#1!=rangelast(0,$f)) goto mul16s_compare::@2 +Simple Condition (bool~) mul16s_compare::$17 [390] if((byte) mul16s_compare::i#1!=rangelast(0,$f)) goto mul16s_compare::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) print_char::ch#0 = '-' @@ -3441,7 +3441,7 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) str Consolidated constant strings into (const byte*) str1 @@ -3449,14 +3449,14 @@ Consolidated constant strings into (const byte*) str2 Consolidated constant strings into (const byte*) str3 Consolidated constant strings into (const byte*) str4 Successful SSA optimization Pass2ConstantStringConsolidation -Resolved ranged next value [429] mul16u_compare::j#1 ← ++ mul16u_compare::j#10 to ++ -Resolved ranged comparison value [431] if(mul16u_compare::j#1!=rangelast(0,$f)) goto mul16u_compare::@2 to (number) $10 -Resolved ranged next value [448] mul16u_compare::i#1 ← ++ mul16u_compare::i#12 to ++ -Resolved ranged comparison value [450] if(mul16u_compare::i#1!=rangelast(0,$f)) goto mul16u_compare::@1 to (number) $10 -Resolved ranged next value [566] mul16s_compare::j#1 ← ++ mul16s_compare::j#10 to ++ -Resolved ranged comparison value [568] if(mul16s_compare::j#1!=rangelast(0,$f)) goto mul16s_compare::@2 to (number) $10 -Resolved ranged next value [585] mul16s_compare::i#1 ← ++ mul16s_compare::i#12 to ++ -Resolved ranged comparison value [587] if(mul16s_compare::i#1!=rangelast(0,$f)) goto mul16s_compare::@1 to (number) $10 +Resolved ranged next value [280] mul16u_compare::j#1 ← ++ mul16u_compare::j#10 to ++ +Resolved ranged comparison value [282] if(mul16u_compare::j#1!=rangelast(0,$f)) goto mul16u_compare::@2 to (number) $10 +Resolved ranged next value [293] mul16u_compare::i#1 ← ++ mul16u_compare::i#12 to ++ +Resolved ranged comparison value [295] if(mul16u_compare::i#1!=rangelast(0,$f)) goto mul16u_compare::@1 to (number) $10 +Resolved ranged next value [375] mul16s_compare::j#1 ← ++ mul16s_compare::j#10 to ++ +Resolved ranged comparison value [377] if(mul16s_compare::j#1!=rangelast(0,$f)) goto mul16s_compare::@2 to (number) $10 +Resolved ranged next value [388] mul16s_compare::i#1 ← ++ mul16s_compare::i#12 to ++ +Resolved ranged comparison value [390] if(mul16s_compare::i#1!=rangelast(0,$f)) goto mul16s_compare::@1 to (number) $10 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) $10 in if((byte) mul16u_compare::j#1!=(number) $10) goto mul16u_compare::@2 diff --git a/src/test/ref/test-multiply-8bit.asm b/src/test/ref/test-multiply-8bit.asm index 581293851..7f77f2351 100644 --- a/src/test/ref/test-multiply-8bit.asm +++ b/src/test/ref/test-multiply-8bit.asm @@ -6,14 +6,22 @@ .label print_char_cursor = 6 .label print_line_cursor = 2 main: { + // *BGCOL = 5 lda #5 sta BGCOL + // print_cls() jsr print_cls + // mulf_init() jsr mulf_init + // mulf_init_asm() jsr mulf_init_asm + // mulf_tables_cmp() jsr mulf_tables_cmp + // mul8u_compare() jsr mul8u_compare + // mul8s_compare() jsr mul8s_compare + // } rts } // Perform all possible signed byte multiplications (slow and fast) and compare the results @@ -26,6 +34,7 @@ mul8s_compare: { lda #-$80 sta.z a __b1: + // for(signed byte a = -128; a!=-128; a++) lda #-$80 cmp.z a bne b1 @@ -33,30 +42,43 @@ mul8s_compare: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("signed multiply results match!") lda #str sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln + // } rts b1: lda #-$80 sta.z b __b3: + // for(signed byte b = -128; b!=-128; b++) lda #-$80 cmp.z b bne __b4 + // for(signed byte a = -128; a!=-128; a++) inc.z a jmp __b1 __b4: + // muls8s(a, b) ldx.z b jsr muls8s + // ms = muls8s(a, b) + // mulf8s(a,b) lda.z a ldx.z b jsr mulf8s + // mulf8s(a,b) + // mf = mulf8s(a,b) + // mul8s(a,b) ldy.z b jsr mul8s + // mn = mul8s(a,b) + // if(ms!=mf) lda.z ms cmp.z mf bne !+ @@ -69,6 +91,7 @@ mul8s_compare: { b2: ldx #1 __b6: + // if(ms!=mn) lda.z ms cmp.z mn bne !+ @@ -78,14 +101,18 @@ mul8s_compare: { !: ldx #0 __b7: + // if(ok==0) cpx #0 bne __b8 + // *BGCOL = 2 lda #2 sta BGCOL + // mul8s_error(a,b, ms, mn, mf) ldx.z a jsr mul8s_error rts __b8: + // for(signed byte b = -128; b!=-128; b++) inc.z b jmp __b3 str: .text "signed multiply results match!" @@ -101,46 +128,58 @@ mul8s_error: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str("signed multiply mismatch ") lda #str sta.z print_str.str+1 jsr print_str + // print_sbyte(a) jsr print_sbyte + // print_str("*") lda #str1 sta.z print_str.str+1 jsr print_str + // print_sbyte(b) ldx.z b jsr print_sbyte + // print_str(" slow:") lda #str2 sta.z print_str.str+1 jsr print_str + // print_sword(ms) jsr print_sword + // print_str(" / normal:") lda #str3 sta.z print_str.str+1 jsr print_str + // print_sword(mn) lda.z mn sta.z print_sword.w lda.z mn+1 sta.z print_sword.w+1 jsr print_sword + // print_str(" / fast:") lda #str4 sta.z print_str.str+1 jsr print_str + // print_sword(mf) lda.z mf sta.z print_sword.w lda.z mf+1 sta.z print_sword.w+1 jsr print_sword + // print_ln() jsr print_ln + // } rts str: .text "signed multiply mismatch " .byte 0 @@ -148,6 +187,7 @@ mul8s_error: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -155,6 +195,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 tax jsr print_byte + // print_byte(>4 txa lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f axs #0 + // print_char(print_hextab[b&$f]) lda print_hextab,x jsr print_char + // } rts } // Print a zero-terminated string @@ -233,15 +292,19 @@ print_byte: { print_str: { .label str = $d __b1: + // while(*str) ldy #0 lda (str),y cmp #0 bne __b2 + // } rts __b2: + // *(print_char_cursor++) = *(str++) ldy #0 lda (str),y sta (print_char_cursor),y + // *(print_char_cursor++) = *(str++); inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 @@ -255,16 +318,22 @@ print_str: { // Print a signed byte as HEX // print_sbyte(signed byte register(X) b) print_sbyte: { + // if(b<0) cpx #0 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_byte((byte)b) jsr print_byte + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // b = -b txa eor #$ff clc @@ -278,25 +347,35 @@ print_sbyte: { mul8s: { .label m = 8 .label a = $c + // mul8u((byte)a, (byte) b) ldx.z a tya jsr mul8u + // mul8u((byte)a, (byte) b) + // m = mul8u((byte)a, (byte) b) + // if(a<0) lda.z a cmp #0 bpl __b1 + // >m lda.z m+1 + // >m = (>m)-(byte)b sty.z $ff sec sbc.z $ff sta.z m+1 __b1: + // if(b<0) cpy #0 bpl __b2 + // >m lda.z m+1 + // >m = (>m)-(byte)a sec sbc.z a sta.z m+1 __b2: + // } rts } // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word @@ -305,20 +384,26 @@ mul8u: { .label mb = $d .label res = 8 .label return = 8 + // mb = b sta.z mb lda #0 sta.z mb+1 sta.z res sta.z res+1 __b1: + // while(a!=0) cpx #0 bne __b2 + // } rts __b2: + // a&1 txa and #1 + // if( (a&1) != 0) cmp #0 beq __b3 + // res = res + mb lda.z res clc adc.z mb @@ -327,9 +412,11 @@ mul8u: { adc.z mb+1 sta.z res+1 __b3: + // a = a>>1 txa lsr tax + // mb = mb<<1 asl.z mb rol.z mb+1 jmp __b1 @@ -338,9 +425,12 @@ mul8u: { // mulf8s(signed byte register(A) a, signed byte register(X) b) mulf8s: { .label return = $a + // mulf8u_prepare((byte)a) jsr mulf8u_prepare + // mulf8s_prepared(b) stx.z mulf8s_prepared.b jsr mulf8s_prepared + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -350,24 +440,34 @@ mulf8s_prepared: { .label memA = $fd .label m = $a .label b = $f + // mulf8u_prepared((byte) b) ldx.z b jsr mulf8u_prepared + // mulf8u_prepared((byte) b) + // m = mulf8u_prepared((byte) b) + // if(*memA<0) lda memA cmp #0 bpl __b1 + // >m lda.z m+1 + // >m = (>m)-(byte)b sec sbc.z b sta.z m+1 __b1: + // if(b<0) lda.z b cmp #0 bpl __b2 + // >m lda.z m+1 + // >m = (>m)-(byte)*memA sec sbc memA sta.z m+1 __b2: + // } rts } // Calculate fast multiply with a prepared unsigned byte to a word result @@ -377,7 +477,9 @@ mulf8u_prepared: { .label resL = $fe .label memB = $ff .label return = $a + // *memB = b stx memB + // asm sec sm1: lda mulf_sqr1_lo,x @@ -389,22 +491,27 @@ mulf8u_prepared: { sm4: sbc mulf_sqr2_hi,x sta memB + // return { *memB, *resL }; lda resL sta.z return lda memB sta.z return+1 + // } rts } // Prepare for fast multiply with an unsigned byte to a word result // mulf8u_prepare(byte register(A) a) mulf8u_prepare: { .label memA = $fd + // *memA = a sta memA + // asm sta mulf8u_prepared.sm1+1 sta mulf8u_prepared.sm3+1 eor #$ff sta mulf8u_prepared.sm2+1 sta mulf8u_prepared.sm4+1 + // } rts } // Slow multiplication of signed bytes @@ -414,8 +521,10 @@ muls8s: { .label m = 4 .label return = 4 .label a = $c + // if(a<0) lda.z a bmi b3 + // if (a>0) cmp #1 bmi b2 lda #<0 @@ -423,6 +532,7 @@ muls8s: { sta.z m+1 tay __b3: + // for(signed byte j = 0; j!=a; j++) cpy.z a bne __b4 rts @@ -430,8 +540,10 @@ muls8s: { lda #<0 sta.z return sta.z return+1 + // } rts __b4: + // m = m + b txa sta.z $fe ora #$7f @@ -446,6 +558,7 @@ muls8s: { lda.z m+1 adc.z $ff sta.z m+1 + // for(signed byte j = 0; j!=a; j++) iny jmp __b3 b3: @@ -454,10 +567,12 @@ muls8s: { sta.z m+1 tay __b5: + // for(signed byte i = 0; i!=a; i--) cpy.z a bne __b6 rts __b6: + // m = m - b txa sta.z $fe ora #$7f @@ -472,6 +587,7 @@ muls8s: { lda.z m+1 sbc.z $ff sta.z m+1 + // for(signed byte i = 0; i!=a; i--) dey jmp __b5 } @@ -488,14 +604,22 @@ mul8u_compare: { lda #0 sta.z b __b2: + // muls8u(a, b) ldx.z b jsr muls8u + // ms = muls8u(a, b) + // mulf8u(a,b) lda.z a ldx.z b jsr mulf8u + // mf = mulf8u(a,b) + // mul8u(a,b) ldx.z a lda.z b jsr mul8u + // mul8u(a,b) + // mn = mul8u(a,b) + // if(ms!=mf) lda.z ms cmp.z mf bne !+ @@ -508,6 +632,7 @@ mul8u_compare: { b1: ldx #1 __b3: + // if(ms!=mn) lda.z ms cmp.z mn bne !+ @@ -517,27 +642,35 @@ mul8u_compare: { !: ldx #0 __b4: + // if(ok==0) cpx #0 bne __b5 + // *BGCOL = 2 lda #2 sta BGCOL + // mul8u_error(a,b, ms, mn, mf) ldx.z a jsr mul8u_error + // } rts __b5: + // for(byte b: 0..255) inc.z b lda.z b cmp #0 bne __b2 + // for(byte a: 0..255) inc.z a lda.z a cmp #0 bne __b1 + // print_str("multiply results match!") lda #str sta.z print_str.str+1 jsr print_str + // print_ln() jsr print_ln rts str: .text "multiply results match!" @@ -549,46 +682,58 @@ mul8u_error: { .label ms = 4 .label mn = 8 .label mf = $a + // print_str("multiply mismatch ") lda #str sta.z print_str.str+1 jsr print_str + // print_byte(a) jsr print_byte + // print_str("*") lda #str1 sta.z print_str.str+1 jsr print_str + // print_byte(b) ldx.z b jsr print_byte + // print_str(" slow:") lda #str2 sta.z print_str.str+1 jsr print_str + // print_word(ms) jsr print_word + // print_str(" / normal:") lda #str3 sta.z print_str.str+1 jsr print_str + // print_word(mn) lda.z mn sta.z print_word.w lda.z mn+1 sta.z print_word.w+1 jsr print_word + // print_str(" / fast:") lda #str4 sta.z print_str.str+1 jsr print_str + // print_word(mf) lda.z mf sta.z print_word.w lda.z mf+1 sta.z print_word.w+1 jsr print_word + // print_ln() jsr print_ln + // } rts str: .text "multiply mismatch " .byte 0 @@ -597,8 +742,12 @@ mul8u_error: { // mulf8u(byte register(A) a, byte register(X) b) mulf8u: { .label return = $a + // mulf8u_prepare(a) jsr mulf8u_prepare + // mulf8u_prepared(b) jsr mulf8u_prepared + // mulf8u_prepared(b) + // } rts } // Slow multiplication of unsigned bytes @@ -608,6 +757,7 @@ muls8u: { .label return = 4 .label m = 4 .label a = $c + // if(a!=0) lda.z a cmp #0 beq b1 @@ -616,6 +766,7 @@ muls8u: { sta.z m+1 tay __b2: + // for(byte i = 0; i!=a; i++) cpy.z a bne __b3 rts @@ -623,8 +774,10 @@ muls8u: { lda #<0 sta.z return sta.z return+1 + // } rts __b3: + // m = m + b txa clc adc.z m @@ -632,6 +785,7 @@ muls8u: { bcc !+ inc.z m+1 !: + // for(byte i = 0; i!=a; i++) iny jmp __b2 } @@ -649,6 +803,7 @@ mulf_tables_cmp: { lda #>mulf_sqr1_lo sta.z kc_sqr+1 __b1: + // for( byte* kc_sqr=mulf_sqr1_lo; kc_sqrmulf_sqr1_lo+$200*4 bcc __b2 @@ -657,6 +812,7 @@ mulf_tables_cmp: { cmp #$400 @@ -666,6 +822,7 @@ mulf_tables_cmp: { lda #>str sta.z print_str.str+1 jsr print_str + // print_ln() lda #<$400 sta.z print_line_cursor lda #>$400 @@ -675,14 +832,18 @@ mulf_tables_cmp: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // } rts __b2: + // if(*kc_sqr != *asm_sqr) ldy #0 lda (kc_sqr),y cmp (asm_sqr),y beq __b4 + // *BGCOL = 2 lda #2 sta BGCOL + // print_str("multiply table mismatch at ") lda #<$400 sta.z print_char_cursor lda #>$400 @@ -692,12 +853,15 @@ mulf_tables_cmp: { lda #>str1 sta.z print_str.str+1 jsr print_str + // print_word((word)asm_sqr) jsr print_word + // print_str(" / ") lda #str2 sta.z print_str.str+1 jsr print_str + // print_word((word)kc_sqr) lda.z kc_sqr sta.z print_word.w lda.z kc_sqr+1 @@ -709,10 +873,12 @@ mulf_tables_cmp: { sta.z print_line_cursor+1 rts __b4: + // asm_sqr++; inc.z asm_sqr bne !+ inc.z asm_sqr+1 !: + // for( byte* kc_sqr=mulf_sqr1_lo; kc_sqrmulf_sqr1_lo+1 sta.z sqr1_lo+1 __b1: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) lda.z sqr1_lo+1 cmp #>mulf_sqr1_lo+$200 bne __b2 @@ -824,63 +997,84 @@ mulf_init: { lda #>mulf_sqr2_lo sta.z sqr2_lo+1 __b5: + // for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) lda.z sqr2_lo+1 cmp #>mulf_sqr2_lo+$1ff bne __b6 lda.z sqr2_lo cmp #sqr lda.z sqr+1 + // *sqr1_hi++ = >sqr sta (sqr1_hi),y + // *sqr1_hi++ = >sqr; inc.z sqr1_hi bne !+ inc.z sqr1_hi+1 !: + // sqr = sqr + x_2 txa clc adc.z sqr @@ -888,6 +1082,7 @@ mulf_init: { bcc !+ inc.z sqr+1 !: + // for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) inc.z sqr1_lo bne !+ inc.z sqr1_lo+1 @@ -896,7 +1091,9 @@ mulf_init: { } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -911,17 +1108,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #=(signed byte) 0) goto mul8s::@1 -Simple Condition (bool~) mul8s::$6 [181] if((signed byte) mul8s::b#0>=(signed byte) 0) goto mul8s::@2 -Simple Condition (bool~) mulf_init::$0 [207] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 -Simple Condition (bool~) mulf_init::$3 [213] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 -Simple Condition (bool~) mulf_init::$7 [232] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 -Simple Condition (bool~) mulf_init::$10 [241] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 -Simple Condition (bool~) mulf8s_prepared::$3 [284] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 -Simple Condition (bool~) mulf8s_prepared::$5 [288] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 -Simple Condition (bool~) muls8u::$1 [354] if((byte) muls8u::a#0==(byte) 0) goto muls8u::@1 -Simple Condition (bool~) muls8u::$2 [361] if((byte) muls8u::i#2!=(byte) muls8u::a#0) goto muls8u::@5 -Simple Condition (bool~) muls8s::$0 [372] if((signed byte) muls8s::a#0<(signed byte) 0) goto muls8s::@1 -Simple Condition (bool~) muls8s::$2 [378] if((signed byte) muls8s::a#0<=(signed byte) 0) goto muls8s::@3 -Simple Condition (bool~) muls8s::$3 [383] if((signed byte) muls8s::j#2!=(signed byte) muls8s::a#0) goto muls8s::@9 -Simple Condition (bool~) muls8s::$5 [392] if((signed byte) muls8s::i#2!=(signed byte) muls8s::a#0) goto muls8s::@15 -Simple Condition (bool~) mulf_tables_cmp::$2 [411] if((byte*) mulf_tables_cmp::kc_sqr#2<(const byte*) mulf_sqr1_lo+(word)(number) $200*(number) 4) goto mulf_tables_cmp::@2 -Simple Condition (bool~) mulf_tables_cmp::$4 [415] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@4 -Simple Condition (bool~) mul8u_compare::$6 [481] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mf#0) goto mul8u_compare::@3 -Simple Condition (bool~) mul8u_compare::$8 [485] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mn#0) goto mul8u_compare::@4 -Simple Condition (bool~) mul8u_compare::$10 [491] if((byte) mul8u_compare::ok#3!=(byte) 0) goto mul8u_compare::@5 -Simple Condition (bool~) mul8u_compare::$12 [497] if((byte) mul8u_compare::b#1!=rangelast(0,$ff)) goto mul8u_compare::@2 -Simple Condition (bool~) mul8u_compare::$13 [516] if((byte) mul8u_compare::a#1!=rangelast(0,$ff)) goto mul8u_compare::@1 -Simple Condition (bool~) mul8s_compare::$2 [579] if((signed byte) mul8s_compare::a#10!=(signed byte) -$80) goto mul8s_compare::@2 -Simple Condition (bool~) mul8s_compare::$3 [593] if((signed byte) mul8s_compare::b#10!=(signed byte) -$80) goto mul8s_compare::@5 -Simple Condition (bool~) mul8s_compare::$8 [619] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mf#0) goto mul8s_compare::@7 -Simple Condition (bool~) mul8s_compare::$10 [625] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mn#0) goto mul8s_compare::@8 -Simple Condition (bool~) mul8s_compare::$12 [631] if((byte) mul8s_compare::ok#3!=(byte) 0) goto mul8s_compare::@9 +Simple Condition (bool~) memset::$1 [2] if((word) memset::num#0<=(byte) 0) goto memset::@1 +Simple Condition (bool~) memset::$4 [9] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@5 +Simple Condition (bool~) print_str::$0 [17] if((byte) 0!=*((byte*) print_str::str#16)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#135) goto print_ln::@1 +Simple Condition (bool~) print_sword::$0 [30] if((signed word) print_sword::w#4<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) print_sbyte::$0 [45] if((signed byte) print_sbyte::b#3<(signed byte) 0) goto print_sbyte::@1 +Simple Condition (bool~) mul8u::$0 [92] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [95] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) mul8s::$4 [108] if((signed byte) mul8s::a#0>=(signed byte) 0) goto mul8s::@1 +Simple Condition (bool~) mul8s::$6 [111] if((signed byte) mul8s::b#0>=(signed byte) 0) goto mul8s::@2 +Simple Condition (bool~) mulf_init::$0 [130] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2 +Simple Condition (bool~) mulf_init::$3 [134] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@4 +Simple Condition (bool~) mulf_init::$7 [151] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@10 +Simple Condition (bool~) mulf_init::$10 [157] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@12 +Simple Condition (bool~) mulf8s_prepared::$3 [187] if(*((const signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1 +Simple Condition (bool~) mulf8s_prepared::$5 [190] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2 +Simple Condition (bool~) muls8u::$1 [226] if((byte) muls8u::a#0==(byte) 0) goto muls8u::@1 +Simple Condition (bool~) muls8u::$2 [231] if((byte) muls8u::i#2!=(byte) muls8u::a#0) goto muls8u::@5 +Simple Condition (bool~) muls8s::$0 [238] if((signed byte) muls8s::a#0<(signed byte) 0) goto muls8s::@1 +Simple Condition (bool~) muls8s::$2 [241] if((signed byte) muls8s::a#0<=(signed byte) 0) goto muls8s::@3 +Simple Condition (bool~) muls8s::$3 [245] if((signed byte) muls8s::j#2!=(signed byte) muls8s::a#0) goto muls8s::@9 +Simple Condition (bool~) muls8s::$5 [251] if((signed byte) muls8s::i#2!=(signed byte) muls8s::a#0) goto muls8s::@15 +Simple Condition (bool~) mulf_tables_cmp::$2 [266] if((byte*) mulf_tables_cmp::kc_sqr#2<(const byte*) mulf_sqr1_lo+(word)(number) $200*(number) 4) goto mulf_tables_cmp::@2 +Simple Condition (bool~) mulf_tables_cmp::$4 [268] if(*((byte*) mulf_tables_cmp::kc_sqr#2)==*((byte*) mulf_tables_cmp::asm_sqr#2)) goto mulf_tables_cmp::@4 +Simple Condition (bool~) mul8u_compare::$6 [313] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mf#0) goto mul8u_compare::@3 +Simple Condition (bool~) mul8u_compare::$8 [316] if((word) mul8u_compare::ms#0==(word) mul8u_compare::mn#0) goto mul8u_compare::@4 +Simple Condition (bool~) mul8u_compare::$10 [320] if((byte) mul8u_compare::ok#3!=(byte) 0) goto mul8u_compare::@5 +Simple Condition (bool~) mul8u_compare::$12 [324] if((byte) mul8u_compare::b#1!=rangelast(0,$ff)) goto mul8u_compare::@2 +Simple Condition (bool~) mul8u_compare::$13 [337] if((byte) mul8u_compare::a#1!=rangelast(0,$ff)) goto mul8u_compare::@1 +Simple Condition (bool~) mul8s_compare::$2 [381] if((signed byte) mul8s_compare::a#10!=(signed byte) -$80) goto mul8s_compare::@2 +Simple Condition (bool~) mul8s_compare::$3 [390] if((signed byte) mul8s_compare::b#10!=(signed byte) -$80) goto mul8s_compare::@5 +Simple Condition (bool~) mul8s_compare::$8 [408] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mf#0) goto mul8s_compare::@7 +Simple Condition (bool~) mul8s_compare::$10 [412] if((signed word) mul8s_compare::ms#0==(signed word) mul8s_compare::mn#0) goto mul8s_compare::@8 +Simple Condition (bool~) mul8s_compare::$12 [416] if((byte) mul8s_compare::ok#3!=(byte) 0) goto mul8s_compare::@9 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_line_cursor#0 = (byte*) 1024 Constant (const byte) print_char::ch#0 = '-' @@ -3569,17 +3569,17 @@ Constant (const byte*) memset::$2 = (byte*)memset::str#0 Constant (const byte*) memset::dst#0 = (byte*)memset::str#0 Constant (const void*) memset::return#2 = memset::str#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always false - eliminating [3] if((const word) memset::num#0<=(byte) 0) goto memset::@1 +if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1 Successful SSA optimization Pass2ConstantIfs Consolidated constant strings into (const byte*) str1 Consolidated constant strings into (const byte*) str2 Consolidated constant strings into (const byte*) str3 Consolidated constant strings into (const byte*) str4 Successful SSA optimization Pass2ConstantStringConsolidation -Resolved ranged next value [495] mul8u_compare::b#1 ← ++ mul8u_compare::b#10 to ++ -Resolved ranged comparison value [497] if(mul8u_compare::b#1!=rangelast(0,$ff)) goto mul8u_compare::@2 to (number) 0 -Resolved ranged next value [514] mul8u_compare::a#1 ← ++ mul8u_compare::a#7 to ++ -Resolved ranged comparison value [516] if(mul8u_compare::a#1!=rangelast(0,$ff)) goto mul8u_compare::@1 to (number) 0 +Resolved ranged next value [322] mul8u_compare::b#1 ← ++ mul8u_compare::b#10 to ++ +Resolved ranged comparison value [324] if(mul8u_compare::b#1!=rangelast(0,$ff)) goto mul8u_compare::@2 to (number) 0 +Resolved ranged next value [335] mul8u_compare::a#1 ← ++ mul8u_compare::a#7 to ++ +Resolved ranged comparison value [337] if(mul8u_compare::a#1!=rangelast(0,$ff)) goto mul8u_compare::@1 to (number) 0 Eliminating unused constant (const void*) memset::return#2 Successful SSA optimization PassNEliminateUnusedVars Adding number conversion cast (unumber) 0 in if((byte) mul8u_compare::b#1!=(number) 0) goto mul8u_compare::@2 diff --git a/src/test/ref/test-scroll-up.asm b/src/test/ref/test-scroll-up.asm index 48717fe08..568e4ee95 100644 --- a/src/test/ref/test-scroll-up.asm +++ b/src/test/ref/test-scroll-up.asm @@ -4,9 +4,13 @@ .pc = $80d "Program" .label screen = $400 main: { + // scrollup1() jsr scrollup1 + // scrollup2() jsr scrollup2 + // scrollup3() jsr scrollup3 + // } rts } scrollup3: { @@ -18,6 +22,7 @@ scrollup3: { sta.z line sta.z line+1 __b1: + // for (word line = 0; line < 40*24; line += 40) lda.z line+1 cmp #>$28*$18 bcc __b2 @@ -26,6 +31,7 @@ scrollup3: { cmp #<$28*$18 bcc __b2 !: + // } rts __b2: lda.z line @@ -34,8 +40,10 @@ scrollup3: { sta.z l2+1 ldx #0 __b3: + // for (byte c=0; c<40; ++c) cpx #$28 bcc __b4 + // line += 40 lda #$28 clc adc.z line @@ -45,6 +53,7 @@ scrollup3: { !: jmp __b1 __b4: + // screen[l2++] = screen[l2+40] lda.z l2 clc adc #$28*$18 bcc b1 @@ -124,12 +141,15 @@ scrollup1: { cmp #<$28*$18 bcc b1 !: + // } rts b1: ldx #0 __b2: + // for (byte c=0; c<40; ++c) cpx #$28 bcc __b3 + // line += 40 lda #$28 clc adc.z line @@ -139,6 +159,7 @@ scrollup1: { !: jmp __b1 __b3: + // line+c txa clc adc.z line @@ -146,6 +167,7 @@ scrollup1: { lda #0 adc.z line+1 sta.z __2+1 + // line+c+40 txa clc adc.z line @@ -153,6 +175,7 @@ scrollup1: { lda #0 adc.z line+1 sta.z __4+1 + // screen[line+c] = screen[line+c+40] clc lda.z __5 adc #$4d2 sta.z w1+1 __b1: + // w2 = w1 - 91 lda.z w1 sec sbc #$5b @@ -29,6 +31,7 @@ main: { lda.z w1+1 sbc #>$5b sta.z w2+1 + // w1 = w2 - 41 lda.z w2 sec sbc #$29 @@ -36,22 +39,28 @@ main: { lda.z w2+1 sbc #>$29 sta.z w1+1 + // print_sword(w1) lda.z w1 sta.z print_sword.w lda.z w1+1 sta.z print_sword.w+1 jsr print_sword + // print_char(' ') lda #' ' jsr print_char + // print_sword(w2) lda.z w2 sta.z print_sword.w lda.z w2+1 sta.z print_sword.w+1 jsr print_sword + // print_ln() jsr print_ln + // for( byte i: 0..10 ) inx cpx #$b bne __b6 + // } rts __b6: lda.z print_line_cursor @@ -63,6 +72,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -70,6 +80,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Clear the screen. Also resets current line/char cursor. print_cls: { + // memset(print_screen, ' ', 1000) jsr memset + // } rts } // Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str. @@ -162,17 +193,21 @@ memset: { lda #>str sta.z dst+1 __b1: + // for(char* dst = str; dst!=end; dst++) lda.z dst+1 cmp #>end bne __b2 lda.z dst cmp #$28*$18 bcc b1 @@ -25,10 +26,13 @@ main: { ldx #0 // Cleare the bottom line __b5: + // for (byte c=0; c<40; ++c) cpx #$28 bcc __b6 + // } rts __b6: + // line+c txa clc adc.z line @@ -36,6 +40,7 @@ main: { lda #0 adc.z line+1 sta.z __6+1 + // screen[line+c] = ' ' clc lda.z __9 adc #text @@ -25,6 +27,7 @@ main: { lda #0 sta.z textbox.x1 jsr textbox + // textbox(3,3,37,9,text) lda #text @@ -37,6 +40,7 @@ main: { sta.z textbox.y1 sta.z textbox.x1 jsr textbox + // textbox(30,8,39,24,text) lda #text @@ -53,8 +57,10 @@ main: { __b7: jmp __b7 __b2: + // x+x lda.z x asl + // textbox(x,x,x+x+1,x+10,text2) clc adc #1 sta.z textbox.x2 @@ -72,6 +78,7 @@ main: { sta.z wait sta.z wait+1 __b4: + // for (word wait = 0; wait < 35000; wait++) lda.z wait+1 cmp #>$88b8 bcc __b5 @@ -80,12 +87,14 @@ main: { cmp #<$88b8 bcc __b5 !: + // x += 2 lda.z x clc adc #2 sta.z x jmp __b1 __b5: + // for (word wait = 0; wait < 35000; wait++) inc.z wait bne !+ inc.z wait+1 @@ -109,15 +118,20 @@ textbox: { .label __32 = $f .label __33 = $d .label __34 = $b + // draw_window(x1, y1, x2, y2) jsr draw_window + // y = y1+1 inc.z y + // x = x1+1 ldy.z x1 iny sty.z x + // (word)y lda.z y sta.z __3 lda #0 sta.z __3+1 + // z = (word)y*40 lda.z __3 asl sta.z __33 @@ -139,6 +153,7 @@ textbox: { rol.z z+1 asl.z z rol.z z+1 + // if (x == x2 || y == y2) tya cmp.z x2 beq __breturn @@ -148,6 +163,7 @@ textbox: { lda #0 sta.z i __b1: + // z+x lda.z x clc adc.z z @@ -155,6 +171,7 @@ textbox: { lda #0 adc.z z+1 sta.z __9+1 + // screen[z+x] = text[i] clc lda.z __32 adc #= x2 && c < x2-x1) cpy.z x2 bcc __b2 cpx.z __18 bcc __b6 __b2: + // i++; inc.z i + // x++; inc.z x + // if (x == x2) lda.z x cmp.z x2 bne __b8 + // x = x1+1 ldy.z x1 iny sty.z x + // y++; inc.z y + // if (y == y2) lda.z y cmp.z y2 bne __b9 __breturn: + // } rts __b9: + // z = y*40 lda.z y asl asl @@ -223,6 +254,7 @@ textbox: { asl.z z rol.z z+1 __b8: + // while (text[i] != 0) ldy.z i lda (text),y cmp #0 @@ -231,12 +263,15 @@ textbox: { !__b1: rts __b6: + // y++; inc.z y + // if (y == y2) lda.z y cmp.z y2 bne __b7 rts __b7: + // z = y*40 lda.z y asl asl @@ -255,7 +290,9 @@ textbox: { sta.z x jmp __b2 __b4: + // ls++; iny + // c++; inx jmp __b3 } @@ -288,6 +325,7 @@ draw_window: { .label __33 = $11 .label __34 = $d .label __35 = $15 + // z = y1*40 lda.z y1 asl asl @@ -302,6 +340,7 @@ draw_window: { rol.z z+1 asl.z z rol.z z+1 + // q = y2*40 lda.z y2 asl asl @@ -316,14 +355,17 @@ draw_window: { rol.z q+1 asl.z q rol.z q+1 + // x = x1+1 ldx.z x1 inx b1: // draw horizontal lines + // for (byte x = x1+1; x < x2; x++) cpx.z x2 bcs !__b2+ jmp __b2 !__b2: + // z+x1 lda.z x1 clc adc.z z @@ -331,6 +373,7 @@ draw_window: { lda #0 adc.z z+1 sta.z __2+1 + // screen[z+x1] = $55 clc lda.z __29 adc # 1 && y2-y1 > 1) cpx #1+1 bcc __breturn cmp #1+1 bcs __b7 __breturn: + // } rts __b7: + // y = y1+1 ldy.z y1 iny sty.z y3 b3: // blank inside + // for(byte y = y1+1; y < y2; y++) lda.z y3 cmp.z y2 bcc __b9 rts __b9: + // z = y*40 lda.z y3 asl asl @@ -440,14 +498,18 @@ draw_window: { rol.z z_2+1 asl.z z_2 rol.z z_2+1 + // x = x1+1 ldx.z x1 inx __b10: + // for(byte x = x1+1; x < x2; x++) cpx.z x2 bcc __b11 + // for(byte y = y1+1; y < y2; y++) inc.z y3 jmp b3 __b11: + // z+x txa clc adc.z z_2 @@ -455,6 +517,7 @@ draw_window: { lda #0 adc.z z_2+1 sta.z __26+1 + // screen[z+x] = $20 clc lda.z __35 adc #screen&$3fff + // *D018 = d018val lda #d018val sta D018 + // } rts } diff --git a/src/test/ref/travis1.asm b/src/test/ref/travis1.asm index 49f41b2a6..70d6a0b4b 100644 --- a/src/test/ref/travis1.asm +++ b/src/test/ref/travis1.asm @@ -19,7 +19,9 @@ main: { lda #>$400 sta.z print_char_cursor+1 __b1: + // game_ready() jsr game_ready + // if(game_ready()) cmp #0 bne __b3 jmp __b2 @@ -28,16 +30,19 @@ main: { sta.z print_char_cursor lda.z print_line_cursor+1 sta.z print_char_cursor+1 + // print_str_ln("ready!") lda #str sta.z print_str_ln.str+1 jsr print_str_ln __b2: + // for(byte i:0..5) inc.z i lda #6 cmp.z i bne __b5 + // } rts __b5: lda.z print_line_cursor @@ -52,13 +57,17 @@ main: { // print_str_ln(byte* zp(3) str) print_str_ln: { .label str = 3 + // print_str(str) jsr print_str + // print_ln() jsr print_ln + // } rts } // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -66,6 +75,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorstr sta.z print_str_ln.str+1 jsr print_str_ln + // action_count--; dex + // action_count==0 lda #1 cpx #0 beq !+ lda #0 !: + // } rts str: .text "ready" .byte 0 diff --git a/src/test/ref/travis1.log b/src/test/ref/travis1.log index 375c870d3..2bac531f0 100644 --- a/src/test/ref/travis1.log +++ b/src/test/ref/travis1.log @@ -518,12 +518,12 @@ Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_char_cursor#10 (byte*) print_line_cursor#14 Identical Phi Values (byte*) print_line_cursor#18 (byte*) print_line_cursor#14 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_str::$0 [19] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 -Simple Condition (bool~) print_ln::$1 [32] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 -Simple Condition (bool~) main::$3 [56] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 -Simple Condition (bool~) game_ready::$1 [71] if((byte) action_count#13!=(byte) 0) goto game_ready::@1 +Simple Condition (bool~) print_str::$0 [11] if((byte) 0!=*((byte*) print_str::str#2)) goto print_str::@2 +Simple Condition (bool~) print_ln::$1 [20] if((byte*) print_line_cursor#14<(byte*) print_char_cursor#17) goto print_ln::@1 +Simple Condition (bool~) main::$3 [35] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) game_ready::$1 [42] if((byte) action_count#13!=(byte) 0) goto game_ready::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Rewriting ! if()-condition to reversed if() [51] (bool~) main::$1 ← ! (bool~) main::$0 +Rewriting ! if()-condition to reversed if() [30] (bool~) main::$1 ← ! (bool~) main::$0 Successful SSA optimization Pass2ConditionalAndOrRewriting Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const byte) action_count#0 = 0 @@ -532,8 +532,8 @@ Constant (const byte*) print_str_ln::str#0 = main::str Constant (const byte*) print_str_ln::str#1 = game_ready::str Constant (const byte) action_count#4 = READY_FRAMES Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [54] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [56] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [33] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [35] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::i#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 6 diff --git a/src/test/ref/true-inline-words.asm b/src/test/ref/true-inline-words.asm index faeeae19b..654fda1ee 100644 --- a/src/test/ref/true-inline-words.asm +++ b/src/test/ref/true-inline-words.asm @@ -11,16 +11,21 @@ main: { .const w2 = 1*$100+1+w // constant inline words inside expression .label sc = w2 + // *sc = bs[1] // implicit cast to (byte*) lda bs+1 sta sc + // if(*pos=='m') lda #'m' cmp pos beq __b1 + // *bgcol = 2 lda #2 sta bgcol + // } rts __b1: + // *bgcol = 5 lda #5 sta bgcol rts diff --git a/src/test/ref/true-inline-words.log b/src/test/ref/true-inline-words.log index a43e3a6e4..ab2a7fad3 100644 --- a/src/test/ref/true-inline-words.log +++ b/src/test/ref/true-inline-words.log @@ -95,13 +95,13 @@ Alias (word~) main::$0 = (word~) main::$6 Alias (word~) main::$2 = (word~) main::$7 Alias (word) main::w2#0 = (word~) main::$3 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$4 [12] if(*((const byte*) main::pos)==(byte) 'm') goto main::@1 +Simple Condition (bool~) main::$4 [8] if(*((const byte*) main::pos)==(byte) 'm') goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant right-side identified [0] (word) main::w#0 ← (const byte) main::b w= (byte) 0 -Constant right-side identified [2] (word~) main::$0 ← (byte) 1 w= (byte) 1 -Constant right-side identified [5] (word~) main::$2 ← (byte) 0 w= (byte) 0 +Constant right-side identified [1] (word~) main::$0 ← (byte) 1 w= (byte) 1 +Constant right-side identified [3] (word~) main::$2 ← (byte) 0 w= (byte) 0 Successful SSA optimization Pass2ConstantRValueConsolidation -Simplifying constant evaluating to zero (byte) 0*(number) $100+(byte) 0 in [5] (word~) main::$2 ← (byte) 0*(number) $100+(byte) 0 +Simplifying constant evaluating to zero (byte) 0*(number) $100+(byte) 0 in [3] (word~) main::$2 ← (byte) 0*(number) $100+(byte) 0 Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero main::b*$100 in [0] (word) main::w#0 ← (const byte) main::b*(number) $100+(byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero diff --git a/src/test/ref/type-inference.asm b/src/test/ref/type-inference.asm index 8c7d1f982..78f5c86d3 100644 --- a/src/test/ref/type-inference.asm +++ b/src/test/ref/type-inference.asm @@ -8,16 +8,20 @@ main: { lda #0 sta.z b __b1: + // -0x30+b lax.z b axs #-[-$30] + // screen[b] = -0x30+b lda.z b asl tay txa sta screen,y + // for( byte b: 0..20) inc.z b lda #$15 cmp.z b bne __b1 + // } rts } diff --git a/src/test/ref/type-mix.asm b/src/test/ref/type-mix.asm index eda61146f..1e7deafa9 100644 --- a/src/test/ref/type-mix.asm +++ b/src/test/ref/type-mix.asm @@ -10,6 +10,7 @@ main: { sta.z w sta.z w+1 __b1: + // w = w - 12 lda.z w sec sbc #$c @@ -17,10 +18,14 @@ main: { lda.z w+1 sbc #>$c sta.z w+1 + // -$3ff sta.z a+1 __b1: + // a += -7 lda.z a clc adc #<-7 @@ -32,6 +33,7 @@ main: { lda.z a+1 adc #>-7 sta.z a+1 + // b += 321 clc lda.z b adc #<$141 @@ -39,22 +41,28 @@ main: { lda.z b+1 adc #>$141 sta.z b+1 + // print_sword(a) lda.z a sta.z print_sword.w lda.z a+1 sta.z print_sword.w+1 jsr print_sword + // print_char(' ') lda #' ' jsr print_char + // print_word(b) lda.z b sta.z print_word.w lda.z b+1 sta.z print_word.w+1 jsr print_word + // print_ln() jsr print_ln + // for( byte i : 0..5 ) inx cpx #6 bne __b6 + // } rts __b6: lda.z print_line_cursor @@ -66,6 +74,7 @@ main: { // Print a newline print_ln: { __b1: + // print_line_cursor + $28 lda #$28 clc adc.z print_line_cursor @@ -73,6 +82,7 @@ print_ln: { bcc !+ inc.z print_line_cursor+1 !: + // while (print_line_cursorw) lda.z w+1 sta.z print_byte.b jsr print_byte + // print_byte(>4 lda.z b lsr lsr lsr lsr + // print_char(print_hextab[b>>4]) tay lda print_hextab,y jsr print_char + // b&$f lda #$f and.z b + // print_char(print_hextab[b&$f]) tay lda print_hextab,y jsr print_char + // } rts } // Print a single char // print_char(byte register(A) ch) print_char: { + // *(print_char_cursor++) = ch ldy #0 sta (print_char_cursor),y + // *(print_char_cursor++) = ch; inc.z print_char_cursor bne !+ inc.z print_char_cursor+1 !: + // } rts } // Print a signed word as HEX // print_sword(signed word zp(8) w) print_sword: { .label w = 8 + // if(w<0) lda.z w+1 bmi __b1 + // print_char(' ') lda #' ' jsr print_char __b2: + // print_word((word)w) jsr print_word + // } rts __b1: + // print_char('-') lda #'-' jsr print_char + // w = -w sec lda #0 sbc.z w diff --git a/src/test/ref/type-signed.log b/src/test/ref/type-signed.log index 63791d33e..092f1c477 100644 --- a/src/test/ref/type-signed.log +++ b/src/test/ref/type-signed.log @@ -536,9 +536,9 @@ Identical Phi Values (byte*) print_char_cursor#45 (byte*) print_char_cursor#13 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte*) print_char_cursor#46 (byte*) print_char_cursor#13 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) print_ln::$1 [8] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 -Simple Condition (bool~) print_sword::$0 [17] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 -Simple Condition (bool~) main::$4 [98] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) print_ln::$1 [5] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#13) goto print_ln::@1 +Simple Condition (bool~) print_sword::$0 [9] if((signed word) print_sword::w#1<(signed byte) 0) goto print_sword::@1 +Simple Condition (bool~) main::$4 [64] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte*) print_char_cursor#0 = (byte*) 1024 Constant (const byte) print_char::ch#0 = '-' @@ -548,8 +548,8 @@ Constant (const word) main::b#0 = $1024 Constant (const byte) main::i#0 = 0 Constant (const byte) print_char::ch#4 = ' ' Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [96] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [98] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [62] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [64] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 Adding number conversion cast (unumber) 6 in if((byte) main::i#1!=(number) 6) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 6 diff --git a/src/test/ref/typedef-0.asm b/src/test/ref/typedef-0.asm index c2c25f37f..9db7cc730 100644 --- a/src/test/ref/typedef-0.asm +++ b/src/test/ref/typedef-0.asm @@ -4,7 +4,9 @@ main: { .const b = 'a' .label SCREEN = $400 + // *SCREEN = b lda #b sta SCREEN + // } rts } diff --git a/src/test/ref/typedef-1.asm b/src/test/ref/typedef-1.asm index e6f33d96b..6aa448311 100644 --- a/src/test/ref/typedef-1.asm +++ b/src/test/ref/typedef-1.asm @@ -6,9 +6,11 @@ main: { .label SCREEN = $400 .const p_x = 4 .const p_y = 7 + // *SCREEN = p lda #p_x sta SCREEN lda #p_y sta SCREEN+OFFSET_STRUCT_POINTDEF_Y + // } rts } diff --git a/src/test/ref/typedef-2.asm b/src/test/ref/typedef-2.asm index d84edbca6..1e432eba2 100644 --- a/src/test/ref/typedef-2.asm +++ b/src/test/ref/typedef-2.asm @@ -4,6 +4,7 @@ .label SCREEN = $400 .label ptr = 2 __bbegin: + // ptr = 0x1000 lda #<$1000 sta.z ptr lda #>$1000 @@ -11,7 +12,9 @@ __bbegin: jsr main rts main: { + // SCREEN[0] = j sta SCREEN2+1 + // SCREEN2[1] = +3 lda #<3 sta SCREEN2+1*SIZEOF_SIGNED_WORD lda #>3 sta SCREEN2+1*SIZEOF_SIGNED_WORD+1 + // } rts } diff --git a/src/test/ref/uninitialized.asm b/src/test/ref/uninitialized.asm index 282f8ad13..e2e907c6e 100644 --- a/src/test/ref/uninitialized.asm +++ b/src/test/ref/uninitialized.asm @@ -5,12 +5,18 @@ .label SCREEN = $400 .const b = 0 main: { + // SCREEN[0] = b lda #b sta SCREEN + // SCREEN[2] = w sta SCREEN+3 + // SCREEN[5] = (byte)ptr sta SCREEN+5 + // } rts } diff --git a/src/test/ref/uninitialized.log b/src/test/ref/uninitialized.log index 9712e418a..77bc232db 100644 --- a/src/test/ref/uninitialized.log +++ b/src/test/ref/uninitialized.log @@ -78,7 +78,7 @@ Successful SSA optimization Pass2AliasElimination Constant right-side identified [1] (byte~) main::$0 ← < (const word) w Constant right-side identified [3] (byte~) main::$1 ← > (const word) w Constant right-side identified [5] (byte~) main::$3 ← < (const byte*) ptr -Constant right-side identified [8] (byte~) main::$5 ← > (const byte*) ptr +Constant right-side identified [7] (byte~) main::$5 ← > (const byte*) ptr Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$0 = w diff --git a/src/test/ref/unroll-for-min.asm b/src/test/ref/unroll-for-min.asm index 725733505..653d2a073 100644 --- a/src/test/ref/unroll-for-min.asm +++ b/src/test/ref/unroll-for-min.asm @@ -4,9 +4,11 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[i] = 'a' lda #'a' sta SCREEN sta SCREEN+1 sta SCREEN+2 + // } rts } diff --git a/src/test/ref/unroll-loop-modifyvar.asm b/src/test/ref/unroll-loop-modifyvar.asm index d7cc6b249..20348e1ea 100644 --- a/src/test/ref/unroll-loop-modifyvar.asm +++ b/src/test/ref/unroll-loop-modifyvar.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[a]=a lda #3 sta SCREEN+3 lda #4 @@ -28,5 +29,6 @@ main: { sta SCREEN+$d lda #$e sta SCREEN+$e + // } rts } diff --git a/src/test/ref/unroll-screenfill-for-double.asm b/src/test/ref/unroll-screenfill-for-double.asm index 850d653f3..59373ed5b 100644 --- a/src/test/ref/unroll-screenfill-for-double.asm +++ b/src/test/ref/unroll-screenfill-for-double.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // (SCREEN+line*40)[x] = x lda #0 sta SCREEN sta SCREEN+1*$28 @@ -136,5 +137,6 @@ main: { sta SCREEN+8*$28+$a sta SCREEN+9*$28+$a sta SCREEN+$a*$28+$a + // } rts } diff --git a/src/test/ref/unroll-screenfill-for-double.log b/src/test/ref/unroll-screenfill-for-double.log index 065c7c7fe..aecf3b49d 100644 --- a/src/test/ref/unroll-screenfill-for-double.log +++ b/src/test/ref/unroll-screenfill-for-double.log @@ -79,15 +79,15 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::x#2 (byte) main::x#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$2 [9] unroll if((byte) main::line#1!=rangelast(0,$a)) goto main::@2 -Simple Condition (bool~) main::$3 [13] unroll if((byte) main::x#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$3 [12] unroll if((byte) main::x#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Constant (const byte) main::line#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [7] main::line#1 ← ++ main::line#2 to ++ Resolved ranged comparison value [9] unroll if(main::line#1!=rangelast(0,$a)) goto main::@2 to (number) $b -Resolved ranged next value [11] main::x#1 ← ++ main::x#4 to ++ -Resolved ranged comparison value [13] unroll if(main::x#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [10] main::x#1 ← ++ main::x#4 to ++ +Resolved ranged comparison value [12] unroll if(main::x#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in unroll if((byte) main::line#1!=(number) $b) goto main::@2 Adding number conversion cast (unumber) $b in unroll if((byte) main::x#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/unroll-screenfill-for.asm b/src/test/ref/unroll-screenfill-for.asm index 424e4a649..902f46a59 100644 --- a/src/test/ref/unroll-screenfill-for.asm +++ b/src/test/ref/unroll-screenfill-for.asm @@ -6,6 +6,7 @@ main: { .label SCREEN = $400 ldx #0 __b2: + // (SCREEN+line*40)[x] = x txa sta SCREEN,x txa @@ -56,8 +57,10 @@ main: { sta SCREEN+$17*$28,x txa sta SCREEN+$18*$28,x + // for(byte x: 0..39) inx cpx #$28 bne __b2 + // } rts } diff --git a/src/test/ref/unroll-screenfill-for.log b/src/test/ref/unroll-screenfill-for.log index a2a8353c5..73d086c69 100644 --- a/src/test/ref/unroll-screenfill-for.log +++ b/src/test/ref/unroll-screenfill-for.log @@ -79,15 +79,15 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::x#2 (byte) main::x#4 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$2 [9] unroll if((byte) main::line#1!=rangelast(0,$18)) goto main::@2 -Simple Condition (bool~) main::$3 [13] if((byte) main::x#1!=rangelast(0,$27)) goto main::@1 +Simple Condition (bool~) main::$3 [12] if((byte) main::x#1!=rangelast(0,$27)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Constant (const byte) main::line#0 = 0 Successful SSA optimization Pass2ConstantIdentification Resolved ranged next value [7] main::line#1 ← ++ main::line#2 to ++ Resolved ranged comparison value [9] unroll if(main::line#1!=rangelast(0,$18)) goto main::@2 to (number) $19 -Resolved ranged next value [11] main::x#1 ← ++ main::x#4 to ++ -Resolved ranged comparison value [13] if(main::x#1!=rangelast(0,$27)) goto main::@1 to (number) $28 +Resolved ranged next value [10] main::x#1 ← ++ main::x#4 to ++ +Resolved ranged comparison value [12] if(main::x#1!=rangelast(0,$27)) goto main::@1 to (number) $28 Adding number conversion cast (unumber) $19 in unroll if((byte) main::line#1!=(number) $19) goto main::@2 Adding number conversion cast (unumber) $28 in if((byte) main::x#1!=(number) $28) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions diff --git a/src/test/ref/unroll-screenfill-while.asm b/src/test/ref/unroll-screenfill-while.asm index f31c0d0c4..b05572a22 100644 --- a/src/test/ref/unroll-screenfill-while.asm +++ b/src/test/ref/unroll-screenfill-while.asm @@ -6,6 +6,7 @@ main: { .label SCREEN = $400 ldx #0 __b2: + // (SCREEN+line*40)[x] = x txa sta SCREEN,x txa @@ -56,8 +57,10 @@ main: { sta SCREEN+$17*$28,x txa sta SCREEN+$18*$28,x + // for(byte x: 0..39) inx cpx #$28 bne __b2 + // } rts } diff --git a/src/test/ref/unroll-screenfill-while.log b/src/test/ref/unroll-screenfill-while.log index 3cfc022ae..04eeb67de 100644 --- a/src/test/ref/unroll-screenfill-while.log +++ b/src/test/ref/unroll-screenfill-while.log @@ -93,13 +93,13 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::x#2 (byte) main::x#5 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) main::$0 [5] unroll if((byte) main::line#2!=(byte) $19) goto main::@3 -Simple Condition (bool~) main::$3 [14] if((byte) main::x#1!=rangelast(0,$27)) goto main::@1 +Simple Condition (bool~) main::$3 [12] if((byte) main::x#1!=rangelast(0,$27)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Constant (const byte) main::line#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [12] main::x#1 ← ++ main::x#5 to ++ -Resolved ranged comparison value [14] if(main::x#1!=rangelast(0,$27)) goto main::@1 to (number) $28 +Resolved ranged next value [10] main::x#1 ← ++ main::x#5 to ++ +Resolved ranged comparison value [12] if(main::x#1!=rangelast(0,$27)) goto main::@1 to (number) $28 Adding number conversion cast (unumber) $28 in if((byte) main::x#1!=(number) $28) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $28 @@ -130,8 +130,8 @@ Unrolling loop Loop head: main::@2_1 tails: main::@3_1 blocks: main::@3_1 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#4 (const byte) main::line#1 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [9] (byte~) main::$4 ← (const byte) main::line#1 * (byte) $28 -Constant right-side identified [12] (byte) main::line#5 ← ++ (const byte) main::line#1 +Constant right-side identified [8] (byte~) main::$4 ← (const byte) main::line#1 * (byte) $28 +Constant right-side identified [11] (byte) main::line#5 ← ++ (const byte) main::line#1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$4 = main::line#1*$28 Constant (const byte) main::line#5 = ++main::line#1 @@ -146,8 +146,8 @@ Unrolling loop Loop head: main::@2_2 tails: main::@3_2 blocks: main::@3_2 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#6 (const byte) main::line#5 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [10] (byte~) main::$6 ← (const byte) main::line#5 * (byte) $28 -Constant right-side identified [13] (byte) main::line#7 ← ++ (const byte) main::line#5 +Constant right-side identified [9] (byte~) main::$6 ← (const byte) main::line#5 * (byte) $28 +Constant right-side identified [12] (byte) main::line#7 ← ++ (const byte) main::line#5 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$6 = main::line#5*$28 Constant (const byte) main::line#7 = ++main::line#5 @@ -162,8 +162,8 @@ Unrolling loop Loop head: main::@2_3 tails: main::@3_3 blocks: main::@3_3 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#8 (const byte) main::line#7 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [11] (byte~) main::$8 ← (const byte) main::line#7 * (byte) $28 -Constant right-side identified [14] (byte) main::line#9 ← ++ (const byte) main::line#7 +Constant right-side identified [10] (byte~) main::$8 ← (const byte) main::line#7 * (byte) $28 +Constant right-side identified [13] (byte) main::line#9 ← ++ (const byte) main::line#7 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$8 = main::line#7*$28 Constant (const byte) main::line#9 = ++main::line#7 @@ -178,8 +178,8 @@ Unrolling loop Loop head: main::@2_4 tails: main::@3_4 blocks: main::@3_4 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#10 (const byte) main::line#9 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [12] (byte~) main::$10 ← (const byte) main::line#9 * (byte) $28 -Constant right-side identified [15] (byte) main::line#11 ← ++ (const byte) main::line#9 +Constant right-side identified [11] (byte~) main::$10 ← (const byte) main::line#9 * (byte) $28 +Constant right-side identified [14] (byte) main::line#11 ← ++ (const byte) main::line#9 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$10 = main::line#9*$28 Constant (const byte) main::line#11 = ++main::line#9 @@ -194,8 +194,8 @@ Unrolling loop Loop head: main::@2_5 tails: main::@3_5 blocks: main::@3_5 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#12 (const byte) main::line#11 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [13] (byte~) main::$12 ← (const byte) main::line#11 * (byte) $28 -Constant right-side identified [16] (byte) main::line#13 ← ++ (const byte) main::line#11 +Constant right-side identified [12] (byte~) main::$12 ← (const byte) main::line#11 * (byte) $28 +Constant right-side identified [15] (byte) main::line#13 ← ++ (const byte) main::line#11 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$12 = main::line#11*$28 Constant (const byte) main::line#13 = ++main::line#11 @@ -210,8 +210,8 @@ Unrolling loop Loop head: main::@2_6 tails: main::@3_6 blocks: main::@3_6 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#14 (const byte) main::line#13 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [14] (byte~) main::$14 ← (const byte) main::line#13 * (byte) $28 -Constant right-side identified [17] (byte) main::line#15 ← ++ (const byte) main::line#13 +Constant right-side identified [13] (byte~) main::$14 ← (const byte) main::line#13 * (byte) $28 +Constant right-side identified [16] (byte) main::line#15 ← ++ (const byte) main::line#13 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$14 = main::line#13*$28 Constant (const byte) main::line#15 = ++main::line#13 @@ -226,8 +226,8 @@ Unrolling loop Loop head: main::@2_7 tails: main::@3_7 blocks: main::@3_7 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#16 (const byte) main::line#15 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [15] (byte~) main::$16 ← (const byte) main::line#15 * (byte) $28 -Constant right-side identified [18] (byte) main::line#17 ← ++ (const byte) main::line#15 +Constant right-side identified [14] (byte~) main::$16 ← (const byte) main::line#15 * (byte) $28 +Constant right-side identified [17] (byte) main::line#17 ← ++ (const byte) main::line#15 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$16 = main::line#15*$28 Constant (const byte) main::line#17 = ++main::line#15 @@ -242,8 +242,8 @@ Unrolling loop Loop head: main::@2_8 tails: main::@3_8 blocks: main::@3_8 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#18 (const byte) main::line#17 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [16] (byte~) main::$18 ← (const byte) main::line#17 * (byte) $28 -Constant right-side identified [19] (byte) main::line#19 ← ++ (const byte) main::line#17 +Constant right-side identified [15] (byte~) main::$18 ← (const byte) main::line#17 * (byte) $28 +Constant right-side identified [18] (byte) main::line#19 ← ++ (const byte) main::line#17 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$18 = main::line#17*$28 Constant (const byte) main::line#19 = ++main::line#17 @@ -258,8 +258,8 @@ Unrolling loop Loop head: main::@2_9 tails: main::@3_9 blocks: main::@3_9 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#20 (const byte) main::line#19 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [17] (byte~) main::$20 ← (const byte) main::line#19 * (byte) $28 -Constant right-side identified [20] (byte) main::line#21 ← ++ (const byte) main::line#19 +Constant right-side identified [16] (byte~) main::$20 ← (const byte) main::line#19 * (byte) $28 +Constant right-side identified [19] (byte) main::line#21 ← ++ (const byte) main::line#19 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$20 = main::line#19*$28 Constant (const byte) main::line#21 = ++main::line#19 @@ -274,8 +274,8 @@ Unrolling loop Loop head: main::@2_10 tails: main::@3_10 blocks: main::@3_10 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#22 (const byte) main::line#21 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [18] (byte~) main::$22 ← (const byte) main::line#21 * (byte) $28 -Constant right-side identified [21] (byte) main::line#23 ← ++ (const byte) main::line#21 +Constant right-side identified [17] (byte~) main::$22 ← (const byte) main::line#21 * (byte) $28 +Constant right-side identified [20] (byte) main::line#23 ← ++ (const byte) main::line#21 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$22 = main::line#21*$28 Constant (const byte) main::line#23 = ++main::line#21 @@ -290,8 +290,8 @@ Unrolling loop Loop head: main::@2_11 tails: main::@3_11 blocks: main::@3_11 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#24 (const byte) main::line#23 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [19] (byte~) main::$24 ← (const byte) main::line#23 * (byte) $28 -Constant right-side identified [22] (byte) main::line#25 ← ++ (const byte) main::line#23 +Constant right-side identified [18] (byte~) main::$24 ← (const byte) main::line#23 * (byte) $28 +Constant right-side identified [21] (byte) main::line#25 ← ++ (const byte) main::line#23 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$24 = main::line#23*$28 Constant (const byte) main::line#25 = ++main::line#23 @@ -306,8 +306,8 @@ Unrolling loop Loop head: main::@2_12 tails: main::@3_12 blocks: main::@3_12 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#26 (const byte) main::line#25 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [20] (byte~) main::$26 ← (const byte) main::line#25 * (byte) $28 -Constant right-side identified [23] (byte) main::line#27 ← ++ (const byte) main::line#25 +Constant right-side identified [19] (byte~) main::$26 ← (const byte) main::line#25 * (byte) $28 +Constant right-side identified [22] (byte) main::line#27 ← ++ (const byte) main::line#25 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$26 = main::line#25*$28 Constant (const byte) main::line#27 = ++main::line#25 @@ -322,8 +322,8 @@ Unrolling loop Loop head: main::@2_13 tails: main::@3_13 blocks: main::@3_13 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#28 (const byte) main::line#27 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [21] (byte~) main::$28 ← (const byte) main::line#27 * (byte) $28 -Constant right-side identified [24] (byte) main::line#29 ← ++ (const byte) main::line#27 +Constant right-side identified [20] (byte~) main::$28 ← (const byte) main::line#27 * (byte) $28 +Constant right-side identified [23] (byte) main::line#29 ← ++ (const byte) main::line#27 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$28 = main::line#27*$28 Constant (const byte) main::line#29 = ++main::line#27 @@ -338,8 +338,8 @@ Unrolling loop Loop head: main::@2_14 tails: main::@3_14 blocks: main::@3_14 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#30 (const byte) main::line#29 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [22] (byte~) main::$30 ← (const byte) main::line#29 * (byte) $28 -Constant right-side identified [25] (byte) main::line#31 ← ++ (const byte) main::line#29 +Constant right-side identified [21] (byte~) main::$30 ← (const byte) main::line#29 * (byte) $28 +Constant right-side identified [24] (byte) main::line#31 ← ++ (const byte) main::line#29 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$30 = main::line#29*$28 Constant (const byte) main::line#31 = ++main::line#29 @@ -354,8 +354,8 @@ Unrolling loop Loop head: main::@2_15 tails: main::@3_15 blocks: main::@3_15 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#32 (const byte) main::line#31 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [23] (byte~) main::$32 ← (const byte) main::line#31 * (byte) $28 -Constant right-side identified [26] (byte) main::line#33 ← ++ (const byte) main::line#31 +Constant right-side identified [22] (byte~) main::$32 ← (const byte) main::line#31 * (byte) $28 +Constant right-side identified [25] (byte) main::line#33 ← ++ (const byte) main::line#31 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$32 = main::line#31*$28 Constant (const byte) main::line#33 = ++main::line#31 @@ -370,8 +370,8 @@ Unrolling loop Loop head: main::@2_16 tails: main::@3_16 blocks: main::@3_16 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#34 (const byte) main::line#33 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [24] (byte~) main::$34 ← (const byte) main::line#33 * (byte) $28 -Constant right-side identified [27] (byte) main::line#35 ← ++ (const byte) main::line#33 +Constant right-side identified [23] (byte~) main::$34 ← (const byte) main::line#33 * (byte) $28 +Constant right-side identified [26] (byte) main::line#35 ← ++ (const byte) main::line#33 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$34 = main::line#33*$28 Constant (const byte) main::line#35 = ++main::line#33 @@ -386,8 +386,8 @@ Unrolling loop Loop head: main::@2_17 tails: main::@3_17 blocks: main::@3_17 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#36 (const byte) main::line#35 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [25] (byte~) main::$36 ← (const byte) main::line#35 * (byte) $28 -Constant right-side identified [28] (byte) main::line#37 ← ++ (const byte) main::line#35 +Constant right-side identified [24] (byte~) main::$36 ← (const byte) main::line#35 * (byte) $28 +Constant right-side identified [27] (byte) main::line#37 ← ++ (const byte) main::line#35 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$36 = main::line#35*$28 Constant (const byte) main::line#37 = ++main::line#35 @@ -402,8 +402,8 @@ Unrolling loop Loop head: main::@2_18 tails: main::@3_18 blocks: main::@3_18 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#38 (const byte) main::line#37 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [26] (byte~) main::$38 ← (const byte) main::line#37 * (byte) $28 -Constant right-side identified [29] (byte) main::line#39 ← ++ (const byte) main::line#37 +Constant right-side identified [25] (byte~) main::$38 ← (const byte) main::line#37 * (byte) $28 +Constant right-side identified [28] (byte) main::line#39 ← ++ (const byte) main::line#37 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$38 = main::line#37*$28 Constant (const byte) main::line#39 = ++main::line#37 @@ -418,8 +418,8 @@ Unrolling loop Loop head: main::@2_19 tails: main::@3_19 blocks: main::@3_19 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#40 (const byte) main::line#39 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [27] (byte~) main::$40 ← (const byte) main::line#39 * (byte) $28 -Constant right-side identified [30] (byte) main::line#41 ← ++ (const byte) main::line#39 +Constant right-side identified [26] (byte~) main::$40 ← (const byte) main::line#39 * (byte) $28 +Constant right-side identified [29] (byte) main::line#41 ← ++ (const byte) main::line#39 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$40 = main::line#39*$28 Constant (const byte) main::line#41 = ++main::line#39 @@ -434,8 +434,8 @@ Unrolling loop Loop head: main::@2_20 tails: main::@3_20 blocks: main::@3_20 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#42 (const byte) main::line#41 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [28] (byte~) main::$42 ← (const byte) main::line#41 * (byte) $28 -Constant right-side identified [31] (byte) main::line#43 ← ++ (const byte) main::line#41 +Constant right-side identified [27] (byte~) main::$42 ← (const byte) main::line#41 * (byte) $28 +Constant right-side identified [30] (byte) main::line#43 ← ++ (const byte) main::line#41 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$42 = main::line#41*$28 Constant (const byte) main::line#43 = ++main::line#41 @@ -450,8 +450,8 @@ Unrolling loop Loop head: main::@2_21 tails: main::@3_21 blocks: main::@3_21 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#44 (const byte) main::line#43 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [29] (byte~) main::$44 ← (const byte) main::line#43 * (byte) $28 -Constant right-side identified [32] (byte) main::line#45 ← ++ (const byte) main::line#43 +Constant right-side identified [28] (byte~) main::$44 ← (const byte) main::line#43 * (byte) $28 +Constant right-side identified [31] (byte) main::line#45 ← ++ (const byte) main::line#43 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$44 = main::line#43*$28 Constant (const byte) main::line#45 = ++main::line#43 @@ -466,8 +466,8 @@ Unrolling loop Loop head: main::@2_22 tails: main::@3_22 blocks: main::@3_22 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#46 (const byte) main::line#45 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [30] (byte~) main::$46 ← (const byte) main::line#45 * (byte) $28 -Constant right-side identified [33] (byte) main::line#47 ← ++ (const byte) main::line#45 +Constant right-side identified [29] (byte~) main::$46 ← (const byte) main::line#45 * (byte) $28 +Constant right-side identified [32] (byte) main::line#47 ← ++ (const byte) main::line#45 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$46 = main::line#45*$28 Constant (const byte) main::line#47 = ++main::line#45 @@ -482,8 +482,8 @@ Unrolling loop Loop head: main::@2_23 tails: main::@3_23 blocks: main::@3_23 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#48 (const byte) main::line#47 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [31] (byte~) main::$48 ← (const byte) main::line#47 * (byte) $28 -Constant right-side identified [34] (byte) main::line#49 ← ++ (const byte) main::line#47 +Constant right-side identified [30] (byte~) main::$48 ← (const byte) main::line#47 * (byte) $28 +Constant right-side identified [33] (byte) main::line#49 ← ++ (const byte) main::line#47 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$48 = main::line#47*$28 Constant (const byte) main::line#49 = ++main::line#47 @@ -498,8 +498,8 @@ Unrolling loop Loop head: main::@2_24 tails: main::@3_24 blocks: main::@3_24 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#50 (const byte) main::line#49 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [32] (byte~) main::$50 ← (const byte) main::line#49 * (byte) $28 -Constant right-side identified [35] (byte) main::line#51 ← ++ (const byte) main::line#49 +Constant right-side identified [31] (byte~) main::$50 ← (const byte) main::line#49 * (byte) $28 +Constant right-side identified [34] (byte) main::line#51 ← ++ (const byte) main::line#49 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$50 = main::line#49*$28 Constant (const byte) main::line#51 = ++main::line#49 @@ -514,8 +514,8 @@ Unrolling loop Loop head: main::@2_25 tails: main::@3_25 blocks: main::@3_25 mai Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::line#52 (const byte) main::line#51 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [33] (byte~) main::$52 ← (const byte) main::line#51 * (byte) $28 -Constant right-side identified [36] (byte) main::line#53 ← ++ (const byte) main::line#51 +Constant right-side identified [32] (byte~) main::$52 ← (const byte) main::line#51 * (byte) $28 +Constant right-side identified [35] (byte) main::line#53 ← ++ (const byte) main::line#51 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::$52 = main::line#51*$28 Constant (const byte) main::line#53 = ++main::line#51 diff --git a/src/test/ref/unroll-while-min.asm b/src/test/ref/unroll-while-min.asm index 620413f23..f71b43f52 100644 --- a/src/test/ref/unroll-while-min.asm +++ b/src/test/ref/unroll-while-min.asm @@ -4,8 +4,10 @@ .pc = $80d "Program" main: { .label SCREEN = $400 + // SCREEN[i++] = 'a' lda #'a' sta SCREEN sta SCREEN+1 + // } rts } diff --git a/src/test/ref/unroll-while-min.log b/src/test/ref/unroll-while-min.log index 125f42018..301782bb1 100644 --- a/src/test/ref/unroll-while-min.log +++ b/src/test/ref/unroll-while-min.log @@ -78,7 +78,7 @@ Unrolling loop Loop head: main::@1_1 tails: main::@2_1 blocks: main::@2_1 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::i#4 (const byte) main::i#1 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [7] (byte) main::i#5 ← ++ (const byte) main::i#1 +Constant right-side identified [6] (byte) main::i#5 ← ++ (const byte) main::i#1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#5 = ++main::i#1 Successful SSA optimization Pass2ConstantIdentification @@ -88,7 +88,7 @@ Unrolling loop Loop head: main::@1_2 tails: main::@2_2 blocks: main::@2_2 main:: Successful SSA optimization Pass2LoopUnroll Identical Phi Values (byte) main::i#6 (const byte) main::i#5 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [8] (byte) main::i#7 ← ++ (const byte) main::i#5 +Constant right-side identified [7] (byte) main::i#7 ← ++ (const byte) main::i#5 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) main::i#7 = ++main::i#5 Successful SSA optimization Pass2ConstantIdentification diff --git a/src/test/ref/unused-irq.asm b/src/test/ref/unused-irq.asm index c127a915c..7a4da555c 100644 --- a/src/test/ref/unused-irq.asm +++ b/src/test/ref/unused-irq.asm @@ -5,23 +5,29 @@ .label SCREEN = $400 .label HARDWARE_IRQ = $fffe main: { + // *SCREEN = 'x' lda #'x' sta SCREEN + // } rts } // Unused Interrupt Routine irq2: { + // *HARDWARE_IRQ = &irq1 lda #irq1 sta HARDWARE_IRQ+1 + // } jmp $ea81 } // Unused Interrupt Routine irq1: { + // *HARDWARE_IRQ = &irq2 lda #irq2 sta HARDWARE_IRQ+1 + // } jmp $ea81 } diff --git a/src/test/ref/unused-method.asm b/src/test/ref/unused-method.asm index 105f81be5..c024d75b2 100644 --- a/src/test/ref/unused-method.asm +++ b/src/test/ref/unused-method.asm @@ -3,7 +3,9 @@ .pc = $80d "Program" main: { .label screen = $400 + // screen[0] = 1 lda #1 sta screen + // } rts } diff --git a/src/test/ref/unused-vars.asm b/src/test/ref/unused-vars.asm index 02420dad7..4eca9c2f2 100644 --- a/src/test/ref/unused-vars.asm +++ b/src/test/ref/unused-vars.asm @@ -7,16 +7,21 @@ main: { // used vars .const col = 2 .label COLS = $d800 + // s() jsr s ldx #0 __b1: + // COLS[i] = col lda #col sta COLS,x + // SCREEN[i] = b lda #2/2+1+1 sta SCREEN,x + // for(byte i : 0..100) inx cpx #$65 bne __b1 + // } rts } s: { diff --git a/src/test/ref/unused-vars.log b/src/test/ref/unused-vars.log index 4d2cc1a79..117700953 100644 --- a/src/test/ref/unused-vars.log +++ b/src/test/ref/unused-vars.log @@ -126,7 +126,7 @@ Identical Phi Values (byte) b#3 (byte) b#2 Identical Phi Values (byte) b#10 (byte) b#13 Identical Phi Values (byte) b#12 (byte) b#3 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$4 [13] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$4 [12] if((byte) main::i#1!=rangelast(0,$64)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) b#0 = (byte)2/2 Constant (const byte) main::i#0 = 0 @@ -134,8 +134,8 @@ Constant (const byte) s::return#1 = 2 Successful SSA optimization Pass2ConstantIdentification Constant (const byte) s::return#0 = s::return#1 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [11] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [13] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [10] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [12] if(main::i#1!=rangelast(0,$64)) goto main::@1 to (number) $65 Eliminating unused constant (const byte) s::return#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused constant (const byte) s::return#1 diff --git a/src/test/ref/unusedblockproblem.asm b/src/test/ref/unusedblockproblem.asm index 98bd50a88..527cc9a56 100644 --- a/src/test/ref/unusedblockproblem.asm +++ b/src/test/ref/unusedblockproblem.asm @@ -5,6 +5,7 @@ main: { .label SCREEN = $400 __b1: + // (*SCREEN)++; inc SCREEN jmp __b1 } diff --git a/src/test/ref/useglobal.asm b/src/test/ref/useglobal.asm index 74c69c86b..ea72293cc 100644 --- a/src/test/ref/useglobal.asm +++ b/src/test/ref/useglobal.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // *SCREEN = 1 lda #1 sta SCREEN + // } rts } diff --git a/src/test/ref/useuninitialized.asm b/src/test/ref/useuninitialized.asm index 1a1ab8cff..a871c330a 100644 --- a/src/test/ref/useuninitialized.asm +++ b/src/test/ref/useuninitialized.asm @@ -6,9 +6,12 @@ .const s = 1 main: { .label screen = $400 + // *screen = b lda #b sta screen + // *(screen+1) = s lda #s sta screen+1 + // } rts } diff --git a/src/test/ref/useuninitialized.log b/src/test/ref/useuninitialized.log index f57b62095..c5a5bdbcd 100644 --- a/src/test/ref/useuninitialized.log +++ b/src/test/ref/useuninitialized.log @@ -93,7 +93,7 @@ Identical Phi Values (byte) b#4 (byte) b#0 Identical Phi Values (byte) s#3 (byte) s#1 Identical Phi Values (byte) b#3 (byte) b#1 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [7] (byte*~) main::$1 ← (const byte*) main::screen + (byte) 1 +Constant right-side identified [6] (byte*~) main::$1 ← (const byte*) main::screen + (byte) 1 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte) b#0 = 0 Constant (const byte) s#0 = 0 diff --git a/src/test/ref/var-export.asm b/src/test/ref/var-export.asm index 9079c172f..2e8dd2c29 100644 --- a/src/test/ref/var-export.asm +++ b/src/test/ref/var-export.asm @@ -4,8 +4,10 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // SCREEN[0] = 'x' lda #'x' sta SCREEN + // } rts } MESSAGE: .text "camelot!" diff --git a/src/test/ref/var-forward-problem.asm b/src/test/ref/var-forward-problem.asm index 7ab0cfb2c..ae1a3b3c6 100644 --- a/src/test/ref/var-forward-problem.asm +++ b/src/test/ref/var-forward-problem.asm @@ -5,7 +5,9 @@ .label screen = $400 .const b = 'a' main: { + // *screen = b lda #b sta screen + // } rts } diff --git a/src/test/ref/var-forward-problem2.asm b/src/test/ref/var-forward-problem2.asm index 7ab0cfb2c..ae1a3b3c6 100644 --- a/src/test/ref/var-forward-problem2.asm +++ b/src/test/ref/var-forward-problem2.asm @@ -5,7 +5,9 @@ .label screen = $400 .const b = 'a' main: { + // *screen = b lda #b sta screen + // } rts } diff --git a/src/test/ref/var-init-problem.asm b/src/test/ref/var-init-problem.asm index 2ef1da863..088fb2603 100644 --- a/src/test/ref/var-init-problem.asm +++ b/src/test/ref/var-init-problem.asm @@ -4,7 +4,9 @@ .pc = $80d "Program" .label screen = $400 main: { + // *screen = 'a' lda #'a' sta screen + // } rts } diff --git a/src/test/ref/var-register-noarg.asm b/src/test/ref/var-register-noarg.asm index 492cf4a20..e1714e8d8 100644 --- a/src/test/ref/var-register-noarg.asm +++ b/src/test/ref/var-register-noarg.asm @@ -6,15 +6,20 @@ main: { ldx #0 __b1: + // while(i<40*4) cpx #$28*4 bcc __b2 + // } rts __b2: + // i&7 txa and #7 + // SCREEN[i++] = MSG[i&7] tay lda MSG,y sta SCREEN,x + // SCREEN[i++] = MSG[i&7]; inx jmp __b1 } diff --git a/src/test/ref/var-register-zp-3.asm b/src/test/ref/var-register-zp-3.asm index cd91ad5e8..e085f13d9 100644 --- a/src/test/ref/var-register-zp-3.asm +++ b/src/test/ref/var-register-zp-3.asm @@ -4,6 +4,7 @@ .pc = $80d "Program" .label screen = $400 main: { + // print2(screen, "hello") lda #screen @@ -13,6 +14,7 @@ main: { lda #>msg sta.z print2.msg+1 jsr print2 + // print2(screen+80, "world") lda #screen+$50 @@ -22,6 +24,7 @@ main: { lda #>msg1 sta.z print2.msg+1 jsr print2 + // } rts msg: .text "hello" .byte 0 @@ -37,25 +40,32 @@ print2: { txa sta.z i __b1: + // for(byte i=0; msg[i]; i++) ldy.z i lda (msg),y cmp #0 bne __b2 + // } rts __b2: + // print_char(at, j, msg[i]) ldy.z i lda (msg),y jsr print_char + // j += 2 inx inx + // for(byte i=0; msg[i]; i++) inc.z i jmp __b1 } // print_char(byte* zp($fa) at, byte register(X) idx, byte register(A) ch) print_char: { .label at = $fa + // at[idx] = ch stx.z $ff ldy.z $ff sta (at),y + // } rts } diff --git a/src/test/ref/var-register-zp.asm b/src/test/ref/var-register-zp.asm index 7473225c6..a6bb2350d 100644 --- a/src/test/ref/var-register-zp.asm +++ b/src/test/ref/var-register-zp.asm @@ -8,16 +8,21 @@ main: { .label j = 4 .label __1 = 6 .label k = 6 + // i=0 lda #0 sta.z i + // j=0 sta.z j sta.z j+1 __b1: + // while(i<4) lda.z i cmp #4 bcc __b2 + // } rts __b2: + // SCREEN[i++] = j++ lda.z i asl tay @@ -25,17 +30,21 @@ main: { sta SCREEN,y lda.z j+1 sta SCREEN+1,y + // SCREEN[i++] = j++; inc.z i inc.z j bne !+ inc.z j+1 !: + // (int)i lda.z i sta.z __1 lda #0 sta.z __1+1 + // k = (int)i*2 asl.z k rol.z k+1 + // SCREEN[i++] = k lda.z i asl tay @@ -43,6 +52,7 @@ main: { sta SCREEN,y lda.z k+1 sta SCREEN+1,y + // SCREEN[i++] = k; inc.z i jmp __b1 } diff --git a/src/test/ref/var-register.asm b/src/test/ref/var-register.asm index a12aea0a3..80f1eb9cb 100644 --- a/src/test/ref/var-register.asm +++ b/src/test/ref/var-register.asm @@ -10,25 +10,33 @@ main: { lda #0 sta.z a __b3: + // val1 = a+x tya clc adc.z a + // print(y, val1) jsr print + // for( byte a: 0..100 ) inc.z a lda #$65 cmp.z a bne __b3 + // for( byte y: 0..100 ) inx cpx #$65 bne __b2 + // for( register(Y) byte x: 0..100 ) iny cpy #$65 bne __b1 + // } rts } // print(byte register(X) idx, byte register(A) val) print: { .label SCREEN = $400 + // SCREEN[idx] = val sta SCREEN,x + // } rts } diff --git a/src/test/ref/var-register.log b/src/test/ref/var-register.log index a5fcdbb1c..1dcac14e4 100644 --- a/src/test/ref/var-register.log +++ b/src/test/ref/var-register.log @@ -130,20 +130,20 @@ Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) main::y#2 (byte) main::y#4 Identical Phi Values (byte) print::val#1 (byte) print::val#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$2 [14] if((byte) main::a#1!=rangelast(0,$64)) goto main::@3 -Simple Condition (bool~) main::$3 [18] if((byte) main::y#1!=rangelast(0,$64)) goto main::@2 -Simple Condition (bool~) main::$4 [22] if((byte) main::x#1!=rangelast(0,$64)) goto main::@1 +Simple Condition (bool~) main::$2 [12] if((byte) main::a#1!=rangelast(0,$64)) goto main::@3 +Simple Condition (bool~) main::$3 [15] if((byte) main::y#1!=rangelast(0,$64)) goto main::@2 +Simple Condition (bool~) main::$4 [18] if((byte) main::x#1!=rangelast(0,$64)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::x#0 = 0 Constant (const byte) main::y#0 = 0 Constant (const byte) main::a#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [12] main::a#1 ← ++ main::a#2 to ++ -Resolved ranged comparison value [14] if(main::a#1!=rangelast(0,$64)) goto main::@3 to (number) $65 -Resolved ranged next value [16] main::y#1 ← ++ main::y#4 to ++ -Resolved ranged comparison value [18] if(main::y#1!=rangelast(0,$64)) goto main::@2 to (number) $65 -Resolved ranged next value [20] main::x#1 ← ++ main::x#2 to ++ -Resolved ranged comparison value [22] if(main::x#1!=rangelast(0,$64)) goto main::@1 to (number) $65 +Resolved ranged next value [10] main::a#1 ← ++ main::a#2 to ++ +Resolved ranged comparison value [12] if(main::a#1!=rangelast(0,$64)) goto main::@3 to (number) $65 +Resolved ranged next value [13] main::y#1 ← ++ main::y#4 to ++ +Resolved ranged comparison value [15] if(main::y#1!=rangelast(0,$64)) goto main::@2 to (number) $65 +Resolved ranged next value [16] main::x#1 ← ++ main::x#2 to ++ +Resolved ranged comparison value [18] if(main::x#1!=rangelast(0,$64)) goto main::@1 to (number) $65 Adding number conversion cast (unumber) $65 in if((byte) main::a#1!=(number) $65) goto main::@3 Adding number conversion cast (unumber) $65 in if((byte) main::y#1!=(number) $65) goto main::@2 Adding number conversion cast (unumber) $65 in if((byte) main::x#1!=(number) $65) goto main::@1 diff --git a/src/test/ref/varmodel-ma_mem-2.asm b/src/test/ref/varmodel-ma_mem-2.asm index a670c9fa3..0cd8f9792 100644 --- a/src/test/ref/varmodel-ma_mem-2.asm +++ b/src/test/ref/varmodel-ma_mem-2.asm @@ -4,26 +4,32 @@ .pc = $80d "Program" main: { .label screen = 2 + // screen = 0x0400 // A local pointer lda #<$400 sta.z screen lda #>$400 sta.z screen+1 + // for( char i: 0..5 ) lda #0 sta i // A local counter __b1: + // *(screen++) = 'a' lda #'a' ldy #0 sta (screen),y + // *(screen++) = 'a'; inc.z screen bne !+ inc.z screen+1 !: + // for( char i: 0..5 ) inc i lda #6 cmp i bne __b1 + // } rts i: .byte 0 } diff --git a/src/test/ref/varmodel-ma_mem-3.asm b/src/test/ref/varmodel-ma_mem-3.asm index 514d87aa4..5c68f37d9 100644 --- a/src/test/ref/varmodel-ma_mem-3.asm +++ b/src/test/ref/varmodel-ma_mem-3.asm @@ -3,8 +3,11 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // model_ma_mem() jsr model_ma_mem + // model_ssa_zp() jsr model_ssa_zp + // } rts } model_ssa_zp: { @@ -17,28 +20,35 @@ model_ssa_zp: { sta.z screen+1 // A local counter __b1: + // *(screen++) = 'b' lda #'b' ldy #0 sta (screen),y + // *(screen++) = 'b'; inc.z screen bne !+ inc.z screen+1 !: + // for( char i: 0..5 ) inx cpx #6 bne __b1 + // } rts } model_ma_mem: { + // screen = 0x0400 // A local pointer lda #<$400 sta screen lda #>$400 sta screen+1 + // for( char i: 0..5 ) lda #0 sta i // A local counter __b1: + // *(screen++) = 'a' lda #'a' ldy screen sty.z $fe @@ -46,14 +56,17 @@ model_ma_mem: { sty.z $ff ldy #0 sta ($fe),y + // *(screen++) = 'a'; inc screen bne !+ inc screen+1 !: + // for( char i: 0..5 ) inc i lda #6 cmp i bne __b1 + // } rts screen: .word 0 i: .byte 0 diff --git a/src/test/ref/varmodel-ma_mem-4.asm b/src/test/ref/varmodel-ma_mem-4.asm index baaccca2c..5089e5c3f 100644 --- a/src/test/ref/varmodel-ma_mem-4.asm +++ b/src/test/ref/varmodel-ma_mem-4.asm @@ -7,6 +7,7 @@ .label screen = 2 main: { .const b = 'b' + // for( char i: 0..5 ) lda #0 sta i lda #<$400 @@ -14,31 +15,39 @@ main: { lda #>$400 sta.z screen+1 __b1: + // *(screen++) = a lda #a ldy #0 sta (screen),y + // *(screen++) = a; inc.z screen bne !+ inc.z screen+1 !: + // *(screen++) = b lda #b ldy #0 sta (screen),y + // *(screen++) = b; inc.z screen bne !+ inc.z screen+1 !: + // *(screen++) = i lda i ldy #0 sta (screen),y + // *(screen++) = i; inc.z screen bne !+ inc.z screen+1 !: + // for( char i: 0..5 ) inc i lda #6 cmp i bne __b1 + // } rts i: .byte 0 } diff --git a/src/test/ref/varmodel-ma_mem-5.asm b/src/test/ref/varmodel-ma_mem-5.asm new file mode 100644 index 000000000..bfebc4c9a --- /dev/null +++ b/src/test/ref/varmodel-ma_mem-5.asm @@ -0,0 +1,25 @@ +// Test memory model +// Demonstrates problem where post-increase on __ma memory variables is performed to early +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label SCREEN = $400 +main: { + // i=0 + lda #0 + sta i + __b1: + // SCREEN[i] = '*' + lda #'*' + ldy i + sta SCREEN,y + // i++<4 + tya + // while(i++<4) + inc i + cmp #4 + bcc __b1 + // } + rts + i: .byte 0 +} diff --git a/src/test/ref/varmodel-ma_mem-5.cfg b/src/test/ref/varmodel-ma_mem-5.cfg new file mode 100644 index 000000000..badd99214 --- /dev/null +++ b/src/test/ref/varmodel-ma_mem-5.cfg @@ -0,0 +1,23 @@ +@begin: scope:[] from + [0] phi() + to:@1 +@1: scope:[] from @begin + [1] phi() + [2] call main + to:@end +@end: scope:[] from @1 + [3] phi() + +(void()) main() +main: scope:[main] from @1 + [4] (byte) main::i ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [5] *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' + [6] (byte~) main::$1 ← (byte) main::i + [7] (byte) main::i ← ++ (byte) main::i + [8] if((byte~) main::$1<(byte) 4) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [9] return + to:@return diff --git a/src/test/ref/varmodel-ma_mem-5.log b/src/test/ref/varmodel-ma_mem-5.log new file mode 100644 index 000000000..19e26524f --- /dev/null +++ b/src/test/ref/varmodel-ma_mem-5.log @@ -0,0 +1,310 @@ +Culled Empty Block (label) main::@2 + +CONTROL FLOW GRAPH SSA +@begin: scope:[] from + to:@1 + +(void()) main() +main: scope:[main] from @1 + (byte) main::i ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' + (bool~) main::$0 ← (byte) main::i < (number) 4 + (byte) main::i ← ++ (byte) main::i + if((bool~) main::$0) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + 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 +(const byte*) SCREEN = (byte*)(number) $400 +(void()) main() +(bool~) main::$0 +(label) main::@1 +(label) main::@return +(byte) main::i loadstore + +Adding number conversion cast (unumber) 4 in (bool~) main::$0 ← (byte) main::i < (number) 4 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant pointer cast (byte*) 1024 +Simplifying constant integer cast 4 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 4 +Successful SSA optimization PassNFinalizeNumberTypeConversions +Condition not simple (bool~) main::$0 [4] if((bool~) main::$0) goto main::@1 +Introduced intermediate condition variable (byte~) main::$1 ← (byte) main::i +Simple Condition (bool~) main::$0 [4] if((byte~) main::$1<(byte) 4) goto main::@1 +Successful SSA optimization Pass2ConditionalJumpSimplification +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() + +(void()) main() +main: scope:[main] from @1 + [4] (byte) main::i ← (byte) 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + [5] *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' + [6] (byte~) main::$1 ← (byte) main::i + [7] (byte) main::i ← ++ (byte) main::i + [8] if((byte~) main::$1<(byte) 4) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@1 + [9] return + to:@return + + +VARIABLE REGISTER WEIGHTS +(void()) main() +(byte~) main::$1 11.0 +(byte) main::i loadstore 9.200000000000001 + +Initial phi equivalence classes +Added variable main::i to live range equivalence class [ main::i ] +Added variable main::$1 to live range equivalence class [ main::$1 ] +Complete equivalence classes +[ main::i ] +[ main::$1 ] +Allocated mem[1] [ main::i ] +Allocated zp[1]:2 [ main::$1 ] + +INITIAL ASM +Target platform is c64basic / MOS6502X + // File Comments +// Test memory model +// Demonstrates problem where post-increase on __ma memory variables is performed to early + // Upstart +.pc = $801 "Basic" +:BasicUpstart(__bbegin) +.pc = $80d "Program" + // Global Constants & labels + .label SCREEN = $400 + // @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 __1 = 2 + // [4] (byte) main::i ← (byte) 0 -- vbum1=vbuc1 + lda #0 + sta i + jmp __b1 + // main::@1 + __b1: + // [5] *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' -- pbuc1_derefidx_vbum1=vbuc2 + lda #'*' + ldy i + sta SCREEN,y + // [6] (byte~) main::$1 ← (byte) main::i -- vbuz1=vbum2 + lda i + sta.z __1 + // [7] (byte) main::i ← ++ (byte) main::i -- vbum1=_inc_vbum1 + inc i + // [8] if((byte~) main::$1<(byte) 4) goto main::@1 -- vbuz1_lt_vbuc1_then_la1 + lda.z __1 + cmp #4 + bcc __b1 + jmp __breturn + // main::@return + __breturn: + // [9] return + rts + i: .byte 0 +} + // File Data + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] (byte) main::i ← (byte) 0 [ main::i ] ( main:2 [ main::i ] ) always clobbers reg byte a +Statement [5] *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' [ main::i ] ( main:2 [ main::i ] ) always clobbers reg byte a reg byte y +Potential registers mem[1] [ main::i ] : mem[1] , +Potential registers zp[1]:2 [ main::$1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 11: zp[1]:2 [ main::$1 ] 9.2: mem[1] [ main::i ] +Uplift Scope [] + +Uplifting [main] best 312 combination reg byte a [ main::$1 ] mem[1] [ main::i ] +Uplifting [] best 312 combination +Attempting to uplift remaining variables inmem[1] [ main::i ] +Uplifting [main] best 312 combination mem[1] [ main::i ] + +ASSEMBLER BEFORE OPTIMIZATION + // File Comments +// Test memory model +// Demonstrates problem where post-increase on __ma memory variables is performed to early + // Upstart +.pc = $801 "Basic" +:BasicUpstart(__bbegin) +.pc = $80d "Program" + // Global Constants & labels + .label SCREEN = $400 + // @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: { + // [4] (byte) main::i ← (byte) 0 -- vbum1=vbuc1 + lda #0 + sta i + jmp __b1 + // main::@1 + __b1: + // [5] *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' -- pbuc1_derefidx_vbum1=vbuc2 + lda #'*' + ldy i + sta SCREEN,y + // [6] (byte~) main::$1 ← (byte) main::i -- vbuaa=vbum1 + lda i + // [7] (byte) main::i ← ++ (byte) main::i -- vbum1=_inc_vbum1 + inc i + // [8] if((byte~) main::$1<(byte) 4) goto main::@1 -- vbuaa_lt_vbuc1_then_la1 + cmp #4 + bcc __b1 + jmp __breturn + // main::@return + __breturn: + // [9] return + rts + i: .byte 0 +} + // File Data + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp __b1 +Removing instruction jmp __bend +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Succesful ASM optimization Pass5NextJumpElimination +Replacing instruction lda i with TYA +Replacing label __bbegin with __b1 +Removing instruction __bbegin: +Removing instruction __b1_from___bbegin: +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 __b1: +Succesful ASM optimization Pass5UnusedLabelElimination + +FINAL SYMBOL TABLE +(label) @1 +(label) @begin +(label) @end +(const byte*) SCREEN = (byte*) 1024 +(void()) main() +(byte~) main::$1 reg byte a 11.0 +(label) main::@1 +(label) main::@return +(byte) main::i loadstore mem[1] 9.200000000000001 + +mem[1] [ main::i ] +reg byte a [ main::$1 ] + + +FINAL ASSEMBLER +Score: 247 + + // File Comments +// Test memory model +// Demonstrates problem where post-increase on __ma memory variables is performed to early + // Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + // Global Constants & labels + .label SCREEN = $400 + // @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: { + // i=0 + // [4] (byte) main::i ← (byte) 0 -- vbum1=vbuc1 + lda #0 + sta i + // main::@1 + __b1: + // SCREEN[i] = '*' + // [5] *((const byte*) SCREEN + (byte) main::i) ← (byte) '*' -- pbuc1_derefidx_vbum1=vbuc2 + lda #'*' + ldy i + sta SCREEN,y + // i++<4 + // [6] (byte~) main::$1 ← (byte) main::i -- vbuaa=vbum1 + tya + // while(i++<4) + // [7] (byte) main::i ← ++ (byte) main::i -- vbum1=_inc_vbum1 + inc i + // [8] if((byte~) main::$1<(byte) 4) goto main::@1 -- vbuaa_lt_vbuc1_then_la1 + cmp #4 + bcc __b1 + // main::@return + // } + // [9] return + rts + i: .byte 0 +} + // File Data + diff --git a/src/test/ref/varmodel-ma_mem-5.sym b/src/test/ref/varmodel-ma_mem-5.sym new file mode 100644 index 000000000..cc8791f7f --- /dev/null +++ b/src/test/ref/varmodel-ma_mem-5.sym @@ -0,0 +1,12 @@ +(label) @1 +(label) @begin +(label) @end +(const byte*) SCREEN = (byte*) 1024 +(void()) main() +(byte~) main::$1 reg byte a 11.0 +(label) main::@1 +(label) main::@return +(byte) main::i loadstore mem[1] 9.200000000000001 + +mem[1] [ main::i ] +reg byte a [ main::$1 ] diff --git a/src/test/ref/varmodel-ma_mem.asm b/src/test/ref/varmodel-ma_mem.asm index b5e8102ff..da0d2b4bc 100644 --- a/src/test/ref/varmodel-ma_mem.asm +++ b/src/test/ref/varmodel-ma_mem.asm @@ -3,15 +3,18 @@ :BasicUpstart(main) .pc = $80d "Program" main: { + // screen = 0x0400 // A local pointer lda #<$400 sta screen lda #>$400 sta screen+1 + // for( char i: 0..5 ) lda #0 sta i // A local counter __b1: + // *(screen++) = 'a' lda #'a' ldy screen sty.z $fe @@ -19,14 +22,17 @@ main: { sty.z $ff ldy #0 sta ($fe),y + // *(screen++) = 'a'; inc screen bne !+ inc screen+1 !: + // for( char i: 0..5 ) inc i lda #6 cmp i bne __b1 + // } rts screen: .word 0 i: .byte 0 diff --git a/src/test/ref/void-parameter.asm b/src/test/ref/void-parameter.asm index 66d7fde03..68a5dc4ce 100644 --- a/src/test/ref/void-parameter.asm +++ b/src/test/ref/void-parameter.asm @@ -5,15 +5,22 @@ .pc = $80d "Program" .label SCREEN = $400 main: { + // print() ldx #0 jsr print + // print() jsr print + // print() jsr print + // } rts } print: { + // SCREEN[idx++] = '.' lda #'.' sta SCREEN,x + // SCREEN[idx++] = '.'; inx + // } rts } diff --git a/src/test/ref/volatile-0.asm b/src/test/ref/volatile-0.asm index 19b786514..994d66acd 100644 --- a/src/test/ref/volatile-0.asm +++ b/src/test/ref/volatile-0.asm @@ -5,20 +5,25 @@ .label SCREEN = $400 .label i = 2 __bbegin: + // i = 3 lda #3 sta.z i jsr main rts main: { __b1: + // while(i<7) lda.z i cmp #7 bcc __b2 + // } rts __b2: + // SCREEN[i++] = i ldy.z i tya sta SCREEN,y + // SCREEN[i++] = i; inc.z i jmp __b1 } diff --git a/src/test/ref/volatile-1.asm b/src/test/ref/volatile-1.asm index 4e3fb292e..07104c939 100644 --- a/src/test/ref/volatile-1.asm +++ b/src/test/ref/volatile-1.asm @@ -5,17 +5,22 @@ .label SCREEN = $400 main: { .label i = 2 + // i = 3 lda #3 sta.z i __b1: + // while(i<7) lda.z i cmp #7 bcc __b2 + // } rts __b2: + // SCREEN[i++] = i ldy.z i tya sta SCREEN,y + // SCREEN[i++] = i; inc.z i jmp __b1 } diff --git a/src/test/ref/volatile-2.asm b/src/test/ref/volatile-2.asm index ea6227121..896e066d5 100644 --- a/src/test/ref/volatile-2.asm +++ b/src/test/ref/volatile-2.asm @@ -5,6 +5,7 @@ .label SCREEN = $400 .label ch = 2 __bbegin: + // ch = 3 lda #3 sta.z ch jsr main @@ -12,12 +13,16 @@ __bbegin: main: { ldx #3 __b1: + // while(i<7) cpx #7 bcc __b2 + // } rts __b2: + // SCREEN[i++] = ch lda.z ch sta SCREEN,x + // SCREEN[i++] = ch; inx jmp __b1 } diff --git a/src/test/ref/voronoi.asm b/src/test/ref/voronoi.asm index 838d52fe3..1fab2cf4a 100644 --- a/src/test/ref/voronoi.asm +++ b/src/test/ref/voronoi.asm @@ -8,69 +8,98 @@ // The total number of voronoi points .const numpoints = 6 main: { + // initscreen() jsr initscreen __b1: + // render() jsr render + // animate() jsr animate jmp __b1 } animate: { + // XPOS[0]+1 ldx XPOS inx + // XPOS[0] = XPOS[0]+1 stx XPOS + // if(XPOS[0]==40) lda #$28 cmp XPOS bne __b1 + // XPOS[0] = 0 lda #0 sta XPOS __b1: + // YPOS[0]+1 ldx YPOS inx + // YPOS[0] = YPOS[0]+1 stx YPOS + // if(YPOS[0]==25) lda #$19 cmp YPOS bne __b2 + // YPOS[0] = 0 lda #0 sta YPOS __b2: + // XPOS[1]-1 lda XPOS+1 sec sbc #1 + // XPOS[1] = XPOS[1]-1 sta XPOS+1 + // if(XPOS[1]==255) lda #$ff cmp XPOS+1 bne __b3 + // XPOS[1] = 40 lda #$28 sta XPOS+1 __b3: + // YPOS[2]+1 lda YPOS+2 clc adc #1 + // YPOS[2] = YPOS[2]+1 sta YPOS+2 + // if(YPOS[2]==25) lda #$19 cmp YPOS+2 bne __b4 + // YPOS[2] = 0 lda #0 sta YPOS+2 __b4: + // YPOS[3]-1 ldx YPOS+3 dex + // YPOS[3] = YPOS[3]-1 stx YPOS+3 + // if(YPOS[3]==255) lda #$ff cmp YPOS+3 bne __breturn + // YPOS[3] = 25 lda #$19 sta YPOS+3 + // XPOS[3]+7 lda #7 clc adc XPOS+3 + // XPOS[3] = XPOS[3]+7 sta XPOS+3 + // if(XPOS[3]>=40) cmp #$28 bcc __breturn + // XPOS[3]-40 sec sbc #$28 + // XPOS[3] = XPOS[3]-40 sta XPOS+3 __breturn: + // } rts } render: { @@ -87,24 +116,32 @@ render: { lda #0 sta.z x __b2: + // findcol(x, y) jsr findcol + // findcol(x, y) txa + // col = findcol(x, y) + // colline[x] = col ldy.z x sta (colline),y + // for( byte x : 0..39) inc.z x lda #$28 cmp.z x bne __b2 + // colline = colline+40 clc adc.z colline sta.z colline bcc !+ inc.z colline+1 !: + // for( byte y : 0.. 24) inc.z y lda #$19 cmp.z y bne __b1 + // } rts } // findcol(byte zp(3) x, byte zp(2) y) @@ -121,46 +158,60 @@ findcol: { txa sta.z i __b1: + // for( byte i=0; iSCREEN sta.z screen+1 __b1: + // for( byte* screen = SCREEN; screenSCREEN+$3e8 bcc __b2 @@ -197,11 +252,14 @@ initscreen: { cmp #=(byte) findcol::mindiff#10) goto findcol::@10 +Simple Condition (bool~) animate::$2 [8] if(*((const byte*) XPOS + (byte) 0)!=(byte) $28) goto animate::@1 +Simple Condition (bool~) animate::$5 [12] if(*((const byte*) YPOS + (byte) 0)!=(byte) $19) goto animate::@2 +Simple Condition (bool~) animate::$8 [17] if(*((const byte*) XPOS + (byte) 1)!=(byte) $ff) goto animate::@3 +Simple Condition (bool~) animate::$11 [22] if(*((const byte*) YPOS + (byte) 2)!=(byte) $19) goto animate::@4 +Simple Condition (bool~) animate::$14 [27] if(*((const byte*) YPOS + (byte) 3)!=(byte) $ff) goto animate::@return +Simple Condition (bool~) animate::$17 [33] if(*((const byte*) XPOS + (byte) 3)<(byte) $28) goto animate::@return +Simple Condition (bool~) initscreen::$1 [41] if((byte*) initscreen::screen#2<(byte*~) initscreen::$0) goto initscreen::@2 +Simple Condition (bool~) render::$1 [58] if((byte) render::x#1!=rangelast(0,$27)) goto render::@2 +Simple Condition (bool~) render::$3 [62] if((byte) render::y#1!=rangelast(0,$18)) goto render::@1 +Simple Condition (bool~) findcol::$0 [70] if((byte) findcol::i#10<(const byte) numpoints) goto findcol::@2 +Simple Condition (bool~) findcol::$2 [74] if((byte) findcol::x#0!=(byte) findcol::xp#0) goto findcol::@4 +Simple Condition (bool~) findcol::$5 [77] if((byte) findcol::x#0<(byte) findcol::xp#0) goto findcol::@6 +Simple Condition (bool~) findcol::$4 [79] if((byte) findcol::y#0!=(byte) findcol::yp#0) goto findcol::@4 +Simple Condition (bool~) findcol::$8 [87] if((byte) findcol::y#0<(byte) findcol::yp#0) goto findcol::@8 +Simple Condition (bool~) findcol::$14 [94] if((byte) findcol::diff#7>=(byte) findcol::mindiff#10) goto findcol::@10 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [45] (byte*~) initscreen::$0 ← (const byte*) SCREEN + (word) $3e8 +Constant right-side identified [39] (byte*~) initscreen::$0 ← (const byte*) SCREEN + (word) $3e8 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) initscreen::screen#0 = SCREEN Constant (const byte*) initscreen::$0 = SCREEN+$3e8 @@ -817,18 +817,18 @@ Constant (const byte) findcol::return#2 = 0 Successful SSA optimization Pass2ConstantIdentification if() condition always true - replacing block destination [3] if(true) goto main::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [65] render::x#1 ← ++ render::x#2 to ++ -Resolved ranged comparison value [67] if(render::x#1!=rangelast(0,$27)) goto render::@2 to (number) $28 -Resolved ranged next value [71] render::y#1 ← ++ render::y#4 to ++ -Resolved ranged comparison value [73] if(render::y#1!=rangelast(0,$18)) goto render::@1 to (number) $19 +Resolved ranged next value [56] render::x#1 ← ++ render::x#2 to ++ +Resolved ranged comparison value [58] if(render::x#1!=rangelast(0,$27)) goto render::@2 to (number) $28 +Resolved ranged next value [60] render::y#1 ← ++ render::y#4 to ++ +Resolved ranged comparison value [62] if(render::y#1!=rangelast(0,$18)) goto render::@1 to (number) $19 Simplifying expression containing zero XPOS in [5] (byte~) animate::$0 ← *((const byte*) XPOS + (byte) 0) + (byte) 1 Simplifying expression containing zero XPOS in [6] *((const byte*) XPOS + (byte) 0) ← (byte~) animate::$0 -Simplifying expression containing zero XPOS in [9] if(*((const byte*) XPOS + (byte) 0)!=(byte) $28) goto animate::@1 -Simplifying expression containing zero YPOS in [10] (byte~) animate::$3 ← *((const byte*) YPOS + (byte) 0) + (byte) 1 -Simplifying expression containing zero YPOS in [11] *((const byte*) YPOS + (byte) 0) ← (byte~) animate::$3 -Simplifying expression containing zero YPOS in [14] if(*((const byte*) YPOS + (byte) 0)!=(byte) $19) goto animate::@2 -Simplifying expression containing zero XPOS in [15] *((const byte*) XPOS + (byte) 0) ← (byte) 0 -Simplifying expression containing zero YPOS in [21] *((const byte*) YPOS + (byte) 0) ← (byte) 0 +Simplifying expression containing zero XPOS in [8] if(*((const byte*) XPOS + (byte) 0)!=(byte) $28) goto animate::@1 +Simplifying expression containing zero YPOS in [9] (byte~) animate::$3 ← *((const byte*) YPOS + (byte) 0) + (byte) 1 +Simplifying expression containing zero YPOS in [10] *((const byte*) YPOS + (byte) 0) ← (byte~) animate::$3 +Simplifying expression containing zero YPOS in [12] if(*((const byte*) YPOS + (byte) 0)!=(byte) $19) goto animate::@2 +Simplifying expression containing zero XPOS in [13] *((const byte*) XPOS + (byte) 0) ← (byte) 0 +Simplifying expression containing zero YPOS in [18] *((const byte*) YPOS + (byte) 0) ← (byte) 0 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused constant (const byte) findcol::diff#0 Successful SSA optimization PassNEliminateUnusedVars diff --git a/src/test/ref/wfragment1.asm b/src/test/ref/wfragment1.asm index d0a4ae1a0..be737915d 100644 --- a/src/test/ref/wfragment1.asm +++ b/src/test/ref/wfragment1.asm @@ -6,14 +6,18 @@ main: { ldy #0 __b1: + // move_enemy(i) jsr move_enemy + // for(byte i:0..5) iny cpy #6 bne __b1 + // } rts } // move_enemy(byte register(Y) obj_slot) move_enemy: { + // OBJ_WORLD_X[obj_slot] -= 1 tya asl tax @@ -22,6 +26,7 @@ move_enemy: { dec OBJ_WORLD_X+1,x !: dec OBJ_WORLD_X,x + // } rts } OBJ_WORLD_X: .fill 2*MAX_OBJECTS, 0 diff --git a/src/test/ref/wfragment1.log b/src/test/ref/wfragment1.log index 3379c38e2..20f31cac2 100644 --- a/src/test/ref/wfragment1.log +++ b/src/test/ref/wfragment1.log @@ -143,15 +143,15 @@ Alias (bool) move_enemy::return#1 = (bool) move_enemy::return#3 (bool) move_enem Successful SSA optimization Pass2AliasElimination Identical Phi Values (byte) move_enemy::obj_slot#1 (byte) move_enemy::obj_slot#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$1 [8] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 +Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,5)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Constant (const bool) move_enemy::return#1 = true Successful SSA optimization Pass2ConstantIdentification Constant (const bool) move_enemy::return#0 = move_enemy::return#1 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [6] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [8] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 +Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,5)) goto main::@1 to (number) 6 Eliminating unused constant (const bool) move_enemy::return#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused constant (const bool) move_enemy::return#1 diff --git a/src/test/ref/word-array-0.asm b/src/test/ref/word-array-0.asm index d81834758..eb132c418 100644 --- a/src/test/ref/word-array-0.asm +++ b/src/test/ref/word-array-0.asm @@ -8,21 +8,32 @@ main: { .label words = $400 .label w1 = 2 .label w2 = 4 + // w1 = words[1] lda words+1*SIZEOF_WORD sta.z w1 lda words+1*SIZEOF_WORD+1 sta.z w1+1 + // w1 lda.z w1+1 + // SCREEN[1] = >w1 sta SCREEN+1 + // w2 = words[2] lda words+2*SIZEOF_WORD sta.z w2 lda words+2*SIZEOF_WORD+1 sta.z w2+1 + // w2 lda.z w2+1 + // SCREEN[3] = >w2 sta SCREEN+3 + // } rts } diff --git a/src/test/ref/word-array-1.asm b/src/test/ref/word-array-1.asm index 06093423c..79783eb00 100644 --- a/src/test/ref/word-array-1.asm +++ b/src/test/ref/word-array-1.asm @@ -10,6 +10,7 @@ main: { sta.z idx tax __b1: + // w = words[i] txa asl tay @@ -17,19 +18,28 @@ main: { sta.z w lda words+1,y sta.z w+1 + // >w + // SCREEN[idx++] = >w ldy.z idx sta SCREEN,y + // SCREEN[idx++] = >w; iny + // $101 sta words+1,y + // for( byte i: 0..2) inx cpx #3 bne __b1 + // >words[0] lda words+1 + // SCREEN[0] = >words[0] sta SCREEN + // words[1] lda words+1*SIZEOF_WORD+1 + // SCREEN[2] = >words[1] sta SCREEN+2 + // words[2] lda words+2*SIZEOF_WORD+1 + // SCREEN[4] = >words[2] sta SCREEN+4 + // *wp lda $400+SIZEOF_WORD+1 + // SCREEN[1] = >*wp sta SCREEN+1 + // <*wp lda $400+SIZEOF_WORD+SIZEOF_WORD + // SCREEN[2] = <*wp sta SCREEN+2 + // >*wp lda $400+SIZEOF_WORD+SIZEOF_WORD+1 + // SCREEN[3] = >*wp sta SCREEN+3 + // <*wp lda $400+SIZEOF_WORD+SIZEOF_WORD-SIZEOF_WORD + // SCREEN[4] = <*wp sta SCREEN+4 + // >*wp lda $400+SIZEOF_WORD+SIZEOF_WORD-SIZEOF_WORD+1 + // SCREEN[5] = >*wp sta SCREEN+5 + // } rts } diff --git a/src/test/ref/word-pointer-iteration.asm b/src/test/ref/word-pointer-iteration.asm index cfb8714d8..20782c24c 100644 --- a/src/test/ref/word-pointer-iteration.asm +++ b/src/test/ref/word-pointer-iteration.asm @@ -16,6 +16,7 @@ main: { lda #>words sta.z wp+1 __b1: + // w = *(wp++) ldy #0 lda (wp),y sta.z w @@ -29,20 +30,29 @@ main: { bcc !+ inc.z wp+1 !: + // w lda.z w+1 + // SCREEN[idx++] = >w sta SCREEN,y + // SCREEN[idx++] = >w; iny tya + // idx++; clc adc #1 sta.z idx + // for( byte i: 0..3) inx cpx #4 bne __b1 + // } rts // Clever word array that represents C64 numbers 0-7 words: .word $3130, $3332, $3534, $3736 diff --git a/src/test/ref/word-pointer-math-0.asm b/src/test/ref/word-pointer-math-0.asm index 2a49a046f..382c863ef 100644 --- a/src/test/ref/word-pointer-math-0.asm +++ b/src/test/ref/word-pointer-math-0.asm @@ -8,21 +8,32 @@ main: { .label words = $400 .label w1 = 2 .label w2 = 4 + // w1 = *(words+1) lda words+1*SIZEOF_WORD sta.z w1 lda words+1*SIZEOF_WORD+1 sta.z w1+1 + // w1 lda.z w1+1 + // SCREEN[1] = >w1 sta SCREEN+1 + // w2 = *(words+2) lda words+2*SIZEOF_WORD sta.z w2 lda words+2*SIZEOF_WORD+1 sta.z w2+1 + // w2 lda.z w2+1 + // SCREEN[3] = >w2 sta SCREEN+3 + // } rts } diff --git a/src/test/ref/word-pointer-math-1.asm b/src/test/ref/word-pointer-math-1.asm index 79e0cca1e..5dd0e35e0 100644 --- a/src/test/ref/word-pointer-math-1.asm +++ b/src/test/ref/word-pointer-math-1.asm @@ -8,9 +8,11 @@ main: { .label w1 = $1000 .label w2 = $1140 .const wd = (w2-w1)/SIZEOF_WORD + // *SCREEN = wd lda #wd sta SCREEN+1 + // } rts } diff --git a/src/test/ref/word-pointer-math.asm b/src/test/ref/word-pointer-math.asm index 36c7fce51..3631b8476 100644 --- a/src/test/ref/word-pointer-math.asm +++ b/src/test/ref/word-pointer-math.asm @@ -10,27 +10,38 @@ main: { sta.z idx tax __b1: + // words+i txa asl + // w = *(words+i) tay lda words,y sta.z w lda words+1,y sta.z w+1 + // w lda.z w+1 + // SCREEN[idx++] = >w sta SCREEN,y + // SCREEN[idx++] = >w; iny tya + // idx++; clc adc #1 sta.z idx + // for( byte i: 0..3) inx cpx #4 bne __b1 + // } rts // Clever word array that represents C64 numbers 0-7 words: .word $3130, $3332, $3534, $3736 diff --git a/src/test/ref/wordexpr.asm b/src/test/ref/wordexpr.asm index 8629a26c6..6ff612b22 100644 --- a/src/test/ref/wordexpr.asm +++ b/src/test/ref/wordexpr.asm @@ -9,6 +9,7 @@ main: { sta.z b sta.z b+1 __b1: + // b = b + 40*8 clc lda.z b adc #<$28*8 @@ -16,8 +17,10 @@ main: { lda.z b+1 adc #>$28*8 sta.z b+1 + // for(byte i : 0..10) inx cpx #$b bne __b1 + // } rts } diff --git a/src/test/ref/wordexpr.log b/src/test/ref/wordexpr.log index ed68d3eb2..9475d03ae 100644 --- a/src/test/ref/wordexpr.log +++ b/src/test/ref/wordexpr.log @@ -53,13 +53,13 @@ Successful SSA optimization PassNAddNumberTypeConversions Inferred type updated to word in (unumber~) main::$0 ← (word) main::b#2 + (word)(number) $28*(number) 8 Alias (word) main::b#1 = (word~) main::$0 Successful SSA optimization Pass2AliasElimination -Simple Condition (bool~) main::$1 [7] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$1 [6] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const word) main::b#0 = 0 Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [5] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [7] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [4] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [6] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/zeropage-detect-advanced.asm b/src/test/ref/zeropage-detect-advanced.asm index 7848cd915..b313fb87b 100644 --- a/src/test/ref/zeropage-detect-advanced.asm +++ b/src/test/ref/zeropage-detect-advanced.asm @@ -6,6 +6,7 @@ main: { .label c = t .label t = 2 + // t lda #<0 sta.z t sta.z t+1 @@ -13,7 +14,9 @@ main: { sta.z t+2 lda #>0>>$10 sta.z t+3 + // *(unsigned char *)0x0400 = c[0] lda.z c sta $400 + // } rts } diff --git a/src/test/ref/zeropage-sinus.asm b/src/test/ref/zeropage-sinus.asm index 847e905c5..33cca85cf 100644 --- a/src/test/ref/zeropage-sinus.asm +++ b/src/test/ref/zeropage-sinus.asm @@ -10,34 +10,47 @@ .label SPRITES_ENABLE = $d015 .label SCREEN = $400 main: { + // asm // Stop interrupts sei + // *SPRITES_ENABLE = 1 // Show sprite lda #1 sta SPRITES_ENABLE + // SPRITES_YPOS[0] = 100 lda #$64 sta SPRITES_YPOS + // SPRITES_XPOS[0] = 100 sta SPRITES_XPOS + // *(SCREEN+SPRITE_PTRS) = (byte)(SPRITE/0x40) lda #$ff&SPRITE/$40 sta SCREEN+SPRITE_PTRS + // saveZeropage() jsr saveZeropage + // sinZeropage() jsr sinZeropage + // animSprite() jsr animSprite + // restoreZeropage() jsr restoreZeropage + // } rts } // Save all values on zeropage restoreZeropage: { + // asm ldx #0 !: lda ZP_STORAGE,x sta.z 0,x inx bne !- + // } rts } // Move a sprite in the sinus on zeropage animSprite: { + // kickasm ldx #$00 repeat: lda #$fe @@ -59,26 +72,31 @@ animSprite: { inx jmp repeat + // } rts } // Move the SINUS values to zeropage sinZeropage: { + // asm ldx #0 !: lda SINTABLE,x sta.z 0,x inx bne !- + // } rts } // Save all values on zeropage saveZeropage: { + // asm ldx #0 !: lda.z 0,x sta ZP_STORAGE,x inx bne !- + // } rts } // A 256-byte (co)sinus (with $ff in the first two entries) diff --git a/src/test/ref/zpparammin.asm b/src/test/ref/zpparammin.asm index 1f53e5c6b..b9300b38a 100644 --- a/src/test/ref/zpparammin.asm +++ b/src/test/ref/zpparammin.asm @@ -8,6 +8,7 @@ main: { lda #0 sta.z i __b1: + // sum(i,i+1,i+2) lda.z i clc adc #1 @@ -16,8 +17,10 @@ main: { inx ldy.z i jsr sum + // SCREEN[i] = sum(i,i+1,i+2) ldy.z i sta SCREEN,y + // sum2(i,i+1,i+2) tya clc adc #1 @@ -25,31 +28,40 @@ main: { inx inx jsr sum2 + // SCREEN2[i] = sum2(i,i+1,i+2) ldy.z i sta SCREEN2,y + // for(byte i : 0..10) inc.z i lda #$b cmp.z i bne __b1 + // } rts } // sum2(byte register(Y) a, byte register(A) b, byte register(X) c) sum2: { + // a+b sty.z $ff clc adc.z $ff + // a+b+c stx.z $ff clc adc.z $ff + // } rts } // sum(byte register(Y) a, byte register(A) b, byte register(X) c) sum: { + // a+b sty.z $ff clc adc.z $ff + // a+b+c stx.z $ff clc adc.z $ff + // } rts } diff --git a/src/test/ref/zpparammin.log b/src/test/ref/zpparammin.log index 58e476253..ce1fc8852 100644 --- a/src/test/ref/zpparammin.log +++ b/src/test/ref/zpparammin.log @@ -191,12 +191,12 @@ Identical Phi Values (byte) sum2::a#1 (byte) sum2::a#0 Identical Phi Values (byte) sum2::b#1 (byte) sum2::b#0 Identical Phi Values (byte) sum2::c#1 (byte) sum2::c#0 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$6 [24] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$6 [18] if((byte) main::i#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::i#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [22] main::i#1 ← ++ main::i#2 to ++ -Resolved ranged comparison value [24] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [16] main::i#1 ← ++ main::i#2 to ++ +Resolved ranged comparison value [18] if(main::i#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast $b diff --git a/src/test/ref/zpptr.asm b/src/test/ref/zpptr.asm index 872f354bd..3a6f6d841 100644 --- a/src/test/ref/zpptr.asm +++ b/src/test/ref/zpptr.asm @@ -15,6 +15,7 @@ main: { __b2: ldx #0 __b3: + // zpptr2 = zpptr+i lda.z i clc adc #zpptr adc #0 sta.z zpptr2+1 + // w = (word)j lda.z j sta.z w lda #0 sta.z w+1 + // zpptr2 = zpptr2 + w lda.z zpptr2 clc adc.z w @@ -33,18 +36,23 @@ main: { lda.z zpptr2+1 adc.z w+1 sta.z zpptr2+1 + // *zpptr2 = k txa ldy #0 sta (zpptr2),y + // for(byte k : 0..10) inx cpx #$b bne __b3 + // for(byte i : 0..10) inc.z i lda #$b cmp.z i bne __b2 + // for(byte j : 0..10) inc.z j cmp.z j bne __b1 + // } rts } diff --git a/src/test/ref/zpptr.log b/src/test/ref/zpptr.log index 996291ce4..f2ea86a79 100644 --- a/src/test/ref/zpptr.log +++ b/src/test/ref/zpptr.log @@ -114,20 +114,20 @@ Identical Phi Values (byte) main::j#2 (byte) main::j#4 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values (byte) main::j#4 (byte) main::j#6 Successful SSA optimization Pass2IdenticalPhiElimination -Simple Condition (bool~) main::$3 [15] if((byte) main::k#1!=rangelast(0,$a)) goto main::@3 -Simple Condition (bool~) main::$4 [19] if((byte) main::i#1!=rangelast(0,$a)) goto main::@2 -Simple Condition (bool~) main::$5 [23] if((byte) main::j#1!=rangelast(0,$a)) goto main::@1 +Simple Condition (bool~) main::$3 [12] if((byte) main::k#1!=rangelast(0,$a)) goto main::@3 +Simple Condition (bool~) main::$4 [15] if((byte) main::i#1!=rangelast(0,$a)) goto main::@2 +Simple Condition (bool~) main::$5 [18] if((byte) main::j#1!=rangelast(0,$a)) goto main::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Constant (const byte) main::j#0 = 0 Constant (const byte) main::i#0 = 0 Constant (const byte) main::k#0 = 0 Successful SSA optimization Pass2ConstantIdentification -Resolved ranged next value [13] main::k#1 ← ++ main::k#2 to ++ -Resolved ranged comparison value [15] if(main::k#1!=rangelast(0,$a)) goto main::@3 to (number) $b -Resolved ranged next value [17] main::i#1 ← ++ main::i#4 to ++ -Resolved ranged comparison value [19] if(main::i#1!=rangelast(0,$a)) goto main::@2 to (number) $b -Resolved ranged next value [21] main::j#1 ← ++ main::j#6 to ++ -Resolved ranged comparison value [23] if(main::j#1!=rangelast(0,$a)) goto main::@1 to (number) $b +Resolved ranged next value [10] main::k#1 ← ++ main::k#2 to ++ +Resolved ranged comparison value [12] if(main::k#1!=rangelast(0,$a)) goto main::@3 to (number) $b +Resolved ranged next value [13] main::i#1 ← ++ main::i#4 to ++ +Resolved ranged comparison value [15] if(main::i#1!=rangelast(0,$a)) goto main::@2 to (number) $b +Resolved ranged next value [16] main::j#1 ← ++ main::j#6 to ++ +Resolved ranged comparison value [18] if(main::j#1!=rangelast(0,$a)) goto main::@1 to (number) $b Adding number conversion cast (unumber) $b in if((byte) main::k#1!=(number) $b) goto main::@3 Adding number conversion cast (unumber) $b in if((byte) main::i#1!=(number) $b) goto main::@2 Adding number conversion cast (unumber) $b in if((byte) main::j#1!=(number) $b) goto main::@1