mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-26 12:49:21 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b05a321d85
4
src/main/fragment/mos6502-common/pdum1=vwuc1.asm
Normal file
4
src/main/fragment/mos6502-common/pdum1=vwuc1.asm
Normal file
@ -0,0 +1,4 @@
|
||||
lda #<{c1}
|
||||
sta {m1}
|
||||
lda #>{c1}
|
||||
sta {m1}+1
|
@ -0,0 +1,5 @@
|
||||
eor ({z1}),y
|
||||
beq !+
|
||||
lda #1
|
||||
!:
|
||||
eor #1
|
@ -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));
|
||||
|
@ -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<Statement> 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() {
|
||||
|
@ -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<Statement> getStatementsBetween(Statement from, Statement to, StatementInfos statementInfos) {
|
||||
Collection<Statement> 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<Statement> 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<LabelRef> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<VariableRef> getDefinedVars(Statement stmt) {
|
||||
Collection<ReferenceToSymbolVar> 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<ReferenceToSymbolVar> refs = symbolVarReferences.get(variableRef);
|
||||
final Collection<Integer> 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<Integer> getVarDefineStatements(VariableRef varRef) {
|
||||
LinkedHashSet<Integer> stmts = new LinkedHashSet<>();
|
||||
Collection<ReferenceToSymbolVar> refs = symbolVarReferences.get(varRef);
|
||||
if(refs != null) {
|
||||
Optional<ReferenceToSymbolVar> 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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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<LValue, StatementAssignment> assignments = getAllAssignments();
|
||||
Map<RValue, List<Statement>> usages = getAllUsages();
|
||||
boolean done = false;
|
||||
boolean modified = false;
|
||||
while(!done) {
|
||||
VariableRef obsoleteConditionVar = findAndRewriteBooleanCondition(assignments, usages);
|
||||
VariableRef obsoleteConditionVar = findAndRewriteBooleanCondition();
|
||||
if(obsoleteConditionVar != null) {
|
||||
Collection<VariableRef> 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<LValue, StatementAssignment> assignments, Map<RValue, List<Statement>> 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();
|
||||
|
@ -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<LValue, StatementAssignment> assignments = getAllAssignments();
|
||||
final Map<RValue, List<Statement>> usages = getAllUsages();
|
||||
final List<VariableRef> simpleConditionVars = getSimpleConditions(assignments, usages);
|
||||
final List<VariableRef> simpleConditionVars = new ArrayList<>();
|
||||
List<SimpleCondition> simpleConditions = getSimpleConditionTodos();
|
||||
for(SimpleCondition simpleCondition : simpleConditions) {
|
||||
rewriteSimpleCondition(simpleCondition);
|
||||
simpleConditionVars.add(simpleCondition.conditionVar);
|
||||
}
|
||||
removeAssignments(getGraph(), simpleConditionVars);
|
||||
deleteSymbols(getScope(), simpleConditionVars);
|
||||
return (simpleConditionVars.size() > 0);
|
||||
}
|
||||
|
||||
private List<VariableRef> getSimpleConditions(final Map<LValue, StatementAssignment> assignments, final Map<RValue, List<Statement>> 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<VariableRef> 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<SimpleCondition> getSimpleConditionTodos() {
|
||||
final VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos();
|
||||
List<SimpleCondition> 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<Integer> 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<Variable> 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<Statement> 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<SymbolRef, RValue> 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<Variable> getReferencedLoadStoreVariables(RValue rValue) {
|
||||
return VariableReferenceInfos.getReferencedVars(rValue)
|
||||
.stream()
|
||||
.map(variableRef -> getScope().getVariable(variableRef))
|
||||
.filter(Variable::isKindLoadStore)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -127,62 +127,5 @@ public abstract class Pass2SsaOptimization extends Pass1Base implements PassStep
|
||||
}
|
||||
}
|
||||
|
||||
public Map<LValue, StatementAssignment> getAllAssignments() {
|
||||
final HashMap<LValue, StatementAssignment> assignments = new LinkedHashMap<>();
|
||||
ControlFlowGraphBaseVisitor<Void> visitor = new ControlFlowGraphBaseVisitor<Void>() {
|
||||
@Override
|
||||
public Void visitAssignment(StatementAssignment assignment) {
|
||||
assignments.put(assignment.getlValue(), assignment);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
visitor.visitGraph(getGraph());
|
||||
return assignments;
|
||||
}
|
||||
|
||||
public Map<RValue, List<Statement>> getAllUsages() {
|
||||
final HashMap<RValue, List<Statement>> usages = new LinkedHashMap<>();
|
||||
ControlFlowGraphBaseVisitor<Void> visitor = new ControlFlowGraphBaseVisitor<Void>() {
|
||||
@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<Statement> use = usages.get(rValue);
|
||||
if(use == null) {
|
||||
use = new ArrayList<>();
|
||||
usages.put(rValue, use);
|
||||
}
|
||||
use.add(statement);
|
||||
}
|
||||
|
||||
};
|
||||
visitor.visitGraph(getGraph());
|
||||
|
||||
return usages;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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<LValue, StatementAssignment> assignments = getAllAssignments();
|
||||
final List<VariableRef> unusedComparisons = optimizeUnaryNots(assignments, usages);
|
||||
final List<VariableRef> 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<VariableRef> optimizeUnaryNots(final Map<LValue, StatementAssignment> assignments, VariableReferenceInfos usages) {
|
||||
|
||||
private List<VariableRef> optimizeUnaryNots() {
|
||||
final VariableReferenceInfos variableReferenceInfos = getProgram().getVariableReferenceInfos();
|
||||
final List<VariableRef> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<SymbolVariableRef, SymbolVariableRef> 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) -> {
|
||||
|
@ -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());
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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, 0);
|
||||
render_bcd( screen, lines_offset, >lines_bcd, 1);
|
||||
render_bcd( screen, lines_offset+1, <lines_bcd, 0);
|
||||
|
||||
unsigned int level_offset = 40*19 + 0x1f;
|
||||
render_bcd( screen, level_offset, level_bcd, 0);
|
||||
render_bcd( screen, level_offset, level_bcd, 0);
|
||||
|
||||
}
|
||||
|
||||
@ -194,7 +195,6 @@ void render_moving() {
|
||||
|
||||
// Render the next tetromino in the "next" area
|
||||
void render_next() {
|
||||
|
||||
// Find the screen area
|
||||
unsigned int next_area_offset = 40*12 + 24 + 4;
|
||||
char* screen_next_area;
|
||||
|
13
src/test/kc/varmodel-ma_mem-5.kc
Normal file
13
src/test/kc/varmodel-ma_mem-5.kc
Normal file
@ -0,0 +1,13 @@
|
||||
// Test memory model
|
||||
// Demonstrates problem where post-increase on __ma memory variables is performed to early
|
||||
|
||||
#pragma var_model(ma_mem, pointer_ssa_zp)
|
||||
|
||||
const char* SCREEN = 0x0400;
|
||||
|
||||
void main() {
|
||||
char i=0;
|
||||
do {
|
||||
SCREEN[i] = '*';
|
||||
} while(i++<4);
|
||||
}
|
@ -6,20 +6,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
|
||||
}
|
||||
|
@ -6,17 +6,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
|
||||
}
|
||||
|
@ -6,20 +6,25 @@
|
||||
.label SCREEN = $400
|
||||
.label i = $2000
|
||||
__bbegin:
|
||||
// i = 3
|
||||
lda #3
|
||||
sta i
|
||||
jsr main
|
||||
rts
|
||||
main: {
|
||||
__b1:
|
||||
// while(i<7)
|
||||
lda i
|
||||
cmp #7
|
||||
bcc __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// SCREEN[i++] = i
|
||||
ldy i
|
||||
tya
|
||||
sta SCREEN,y
|
||||
// SCREEN[i++] = i;
|
||||
inc i
|
||||
jmp __b1
|
||||
}
|
||||
|
@ -6,17 +6,22 @@
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
.label i = $2000
|
||||
// i = 3
|
||||
lda #3
|
||||
sta i
|
||||
__b1:
|
||||
// while(i<7)
|
||||
lda i
|
||||
cmp #7
|
||||
bcc __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// SCREEN[i++] = i
|
||||
ldy i
|
||||
tya
|
||||
sta SCREEN,y
|
||||
// SCREEN[i++] = i;
|
||||
inc i
|
||||
jmp __b1
|
||||
}
|
||||
|
@ -7,14 +7,18 @@
|
||||
main: {
|
||||
.const ch = $102
|
||||
.label i = 2
|
||||
// i=0
|
||||
lda #0
|
||||
sta.z i
|
||||
__b1:
|
||||
// while(i<8)
|
||||
lda.z i
|
||||
cmp #8
|
||||
bcc __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// SCREEN[i++] = ch
|
||||
lda.z i
|
||||
asl
|
||||
tay
|
||||
@ -22,7 +26,9 @@ main: {
|
||||
sta SCREEN,y
|
||||
lda #>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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
lda #>b1
|
||||
sta.z setByte.ptr+1
|
||||
ldx #'c'
|
||||
jsr setByte
|
||||
// setByte(&b2, 'm')
|
||||
lda #<b2
|
||||
sta.z setByte.ptr
|
||||
lda #>b2
|
||||
sta.z setByte.ptr+1
|
||||
ldx #'m'
|
||||
jsr setByte
|
||||
// setByte(&b3, 'l')
|
||||
lda #<b3
|
||||
sta.z setByte.ptr
|
||||
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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
.label idx = 3
|
||||
main: {
|
||||
.label i = 2
|
||||
// print(VALS)
|
||||
lda #<VALS
|
||||
sta.z print.p
|
||||
lda #>VALS
|
||||
@ -14,6 +15,7 @@ main: {
|
||||
lda #0
|
||||
sta.z idx
|
||||
jsr print
|
||||
// print(&VALS[1])
|
||||
lda #<VALS+1*SIZEOF_SIGNED_WORD
|
||||
sta.z print.p
|
||||
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 #<VALS
|
||||
sta.z print.p
|
||||
@ -31,15 +35,18 @@ main: {
|
||||
adc #0
|
||||
sta.z print.p+1
|
||||
jsr print
|
||||
// for(char i:2..3)
|
||||
inc.z i
|
||||
lda #4
|
||||
cmp.z i
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// print(signed word* zp(4) p)
|
||||
print: {
|
||||
.label p = 4
|
||||
// SCREEN[idx++] = *p
|
||||
lda.z idx
|
||||
asl
|
||||
tax
|
||||
@ -49,7 +56,9 @@ print: {
|
||||
iny
|
||||
lda (p),y
|
||||
sta SCREEN+1,x
|
||||
// SCREEN[idx++] = *p;
|
||||
inc.z idx
|
||||
// }
|
||||
rts
|
||||
}
|
||||
VALS: .word 1, 2, 3, 4
|
||||
|
@ -149,17 +149,17 @@ Identical Phi Values (byte) idx#14 (byte) idx#10
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Identical Phi Values (byte) idx#16 (byte) idx#13
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Simple Condition (bool~) main::$4 [19] if((byte) main::i#1!=rangelast(2,3)) goto main::@1
|
||||
Simple Condition (bool~) main::$4 [15] if((byte) main::i#1!=rangelast(2,3)) goto main::@1
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Rewriting array member address-of to pointer addition [12] (signed word*) print::p#2 ← (const signed word*) VALS + (byte~) main::$5
|
||||
Rewriting array member address-of to pointer addition [10] (signed word*) print::p#2 ← (const signed word*) VALS + (byte~) main::$5
|
||||
Successful SSA optimization PassNArrayElementAddressOfRewriting
|
||||
Constant (const signed word*) print::p#0 = VALS
|
||||
Constant (const signed word*) print::p#1 = VALS+1*SIZEOF_SIGNED_WORD
|
||||
Constant (const byte) main::i#0 = 2
|
||||
Constant (const byte) idx#17 = 0
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
Resolved ranged next value [17] main::i#1 ← ++ main::i#2 to ++
|
||||
Resolved ranged comparison value [19] if(main::i#1!=rangelast(2,3)) goto main::@1 to (number) 4
|
||||
Resolved ranged next value [13] main::i#1 ← ++ main::i#2 to ++
|
||||
Resolved ranged comparison value [15] if(main::i#1!=rangelast(2,3)) goto main::@1 to (number) 4
|
||||
Adding number conversion cast (unumber) 4 in if((byte) main::i#1!=(number) 4) goto main::@1
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Simplifying constant integer cast 4
|
||||
|
@ -8,11 +8,13 @@ main: {
|
||||
.label __0 = 4
|
||||
ldx #0
|
||||
__b1:
|
||||
// getValue(idx)
|
||||
txa
|
||||
sta.z getValue.index
|
||||
lda #0
|
||||
sta.z getValue.index+1
|
||||
jsr getValue
|
||||
// SCREEN[idx] = getValue(idx)
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
@ -20,25 +22,32 @@ main: {
|
||||
sta SCREEN,y
|
||||
lda.z __0+1
|
||||
sta SCREEN+1,y
|
||||
// for(unsigned char idx : 0..128)
|
||||
inx
|
||||
cpx #$81
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// getValue(word zp(2) index)
|
||||
getValue: {
|
||||
.label index = 2
|
||||
.label return = 4
|
||||
// index & 0x7f
|
||||
lda #$7f
|
||||
and.z index
|
||||
// arr16[index & 0x7f] & 0xff
|
||||
asl
|
||||
tay
|
||||
lda #$ff
|
||||
and arr16,y
|
||||
// (arr16[index & 0x7f] & 0xff) >> 1
|
||||
lsr
|
||||
// (unsigned int)((arr16[index & 0x7f] & 0xff) >> 1)
|
||||
sta.z return
|
||||
lda #0
|
||||
sta.z return+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
arr16: .fill 2*$80, 0
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -4,8 +4,10 @@
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
// SCREEN[0] = SINTAB[0]
|
||||
lda SINTAB
|
||||
sta SCREEN
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Sinus table
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -4,7 +4,9 @@
|
||||
.label BGCOL = $d021
|
||||
.const BLACK = 0
|
||||
main: {
|
||||
// *BGCOL = BLACK
|
||||
lda #BLACK
|
||||
sta BGCOL
|
||||
// }
|
||||
rts
|
||||
}
|
||||
|
@ -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 #<xc
|
||||
@ -161,6 +180,7 @@ circle: {
|
||||
sbc.z y+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-x,yc-y)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z x1
|
||||
@ -176,6 +196,7 @@ circle: {
|
||||
sbc.z y+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc+x,yc+y)
|
||||
lda.z x1
|
||||
clc
|
||||
adc #<xc
|
||||
@ -191,6 +212,7 @@ circle: {
|
||||
adc #>yc
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-x,yc+y)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z x1
|
||||
@ -206,6 +228,7 @@ circle: {
|
||||
adc #>yc
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc+y,yc-x)
|
||||
lda.z y
|
||||
clc
|
||||
adc #<xc
|
||||
@ -221,6 +244,7 @@ circle: {
|
||||
sbc.z x1+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-y,yc-x)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z y
|
||||
@ -236,6 +260,7 @@ circle: {
|
||||
sbc.z x1+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc+y,yc+x)
|
||||
lda.z y
|
||||
clc
|
||||
adc #<xc
|
||||
@ -251,6 +276,7 @@ circle: {
|
||||
adc #>yc
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-y,yc+x)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z y
|
||||
@ -266,12 +292,14 @@ circle: {
|
||||
adc #>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
|
||||
@ -347,14 +380,18 @@ plot: {
|
||||
lda.z location+1
|
||||
adc #>BITMAP
|
||||
sta.z location+1
|
||||
// <y
|
||||
lda.z y
|
||||
// <y & 7
|
||||
and #7
|
||||
// location += <y & 7
|
||||
clc
|
||||
adc.z location
|
||||
sta.z location
|
||||
bcc !+
|
||||
inc.z location+1
|
||||
!:
|
||||
// y >> 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
|
||||
|
@ -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
|
||||
|
@ -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 #<xc
|
||||
@ -130,6 +145,7 @@ circle: {
|
||||
sbc.z y+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-x,yc-y)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z x1
|
||||
@ -145,6 +161,7 @@ circle: {
|
||||
sbc.z y+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc+x,yc+y)
|
||||
lda.z x1
|
||||
clc
|
||||
adc #<xc
|
||||
@ -160,6 +177,7 @@ circle: {
|
||||
adc #>yc
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-x,yc+y)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z x1
|
||||
@ -175,6 +193,7 @@ circle: {
|
||||
adc #>yc
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc+y,yc-x)
|
||||
lda.z y
|
||||
clc
|
||||
adc #<xc
|
||||
@ -190,6 +209,7 @@ circle: {
|
||||
sbc.z x1+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-y,yc-x)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z y
|
||||
@ -205,6 +225,7 @@ circle: {
|
||||
sbc.z x1+1
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc+y,yc+x)
|
||||
lda.z y
|
||||
clc
|
||||
adc #<xc
|
||||
@ -220,6 +241,7 @@ circle: {
|
||||
adc #>yc
|
||||
sta.z plot.y+1
|
||||
jsr plot
|
||||
// plot(xc-y,yc+x)
|
||||
lda #<xc
|
||||
sec
|
||||
sbc.z y
|
||||
@ -235,12 +257,14 @@ circle: {
|
||||
adc #>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
|
||||
@ -288,14 +316,18 @@ plot: {
|
||||
lda.z location+1
|
||||
adc #>BITMAP
|
||||
sta.z location+1
|
||||
// <y
|
||||
lda.z y
|
||||
// <y & 7
|
||||
and #7
|
||||
// location += <y & 7
|
||||
clc
|
||||
adc.z location
|
||||
sta.z location
|
||||
bcc !+
|
||||
inc.z location+1
|
||||
!:
|
||||
// y >> 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
|
||||
|
@ -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
|
||||
|
@ -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<x1)
|
||||
cpx #x0
|
||||
beq !+
|
||||
bcs __b1
|
||||
!:
|
||||
// xd = x0-x1
|
||||
txa
|
||||
// if(yd<xd)
|
||||
cmp #y1
|
||||
beq !+
|
||||
bcs __b4
|
||||
!:
|
||||
// bitmap_line_ydxd(y0, x0, y1, yd, xd)
|
||||
sta.z bitmap_line_ydxd.xd
|
||||
jsr bitmap_line_ydxd
|
||||
// }
|
||||
rts
|
||||
__b4:
|
||||
// bitmap_line_xdyd(x1, y1, x0, xd, yd)
|
||||
stx.z bitmap_line_xdyd.x
|
||||
sta.z bitmap_line_xdyd.xd
|
||||
jsr bitmap_line_xdyd
|
||||
rts
|
||||
__b1:
|
||||
// xd = x1-x0
|
||||
txa
|
||||
// if(yd<xd)
|
||||
cmp #y1
|
||||
beq !+
|
||||
bcs __b7
|
||||
!:
|
||||
// bitmap_line_ydxi(y0, x0, y1, yd, xd)
|
||||
sta.z bitmap_line_ydxi.xd
|
||||
jsr bitmap_line_ydxi
|
||||
rts
|
||||
__b7:
|
||||
// bitmap_line_xdyi(x0, y0, x1, xd, yd)
|
||||
stx.z bitmap_line_xdyi.x1
|
||||
sta.z bitmap_line_xdyi.xd
|
||||
jsr bitmap_line_xdyi
|
||||
@ -84,26 +103,35 @@ bitmap_line_xdyi: {
|
||||
lda #bitmap_line.x0
|
||||
sta.z x
|
||||
__b1:
|
||||
// bitmap_plot(x,y)
|
||||
ldx.z x
|
||||
ldy.z y
|
||||
jsr bitmap_plot
|
||||
// x++;
|
||||
inc.z x
|
||||
// e = e+yd
|
||||
lax.z e
|
||||
axs #-[bitmap_line.y1]
|
||||
stx.z e
|
||||
// if(xd<e)
|
||||
lda.z xd
|
||||
cmp.z e
|
||||
bcs __b2
|
||||
// y++;
|
||||
inc.z y
|
||||
// e = e - xd
|
||||
txa
|
||||
sec
|
||||
sbc.z xd
|
||||
sta.z e
|
||||
__b2:
|
||||
// x1+1
|
||||
ldx.z x1
|
||||
inx
|
||||
// while (x!=(x1+1))
|
||||
cpx.z x
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// bitmap_plot(byte register(X) x, byte register(Y) y)
|
||||
@ -111,14 +139,17 @@ bitmap_plot: {
|
||||
.label plotter_x = 7
|
||||
.label plotter_y = 9
|
||||
.label plotter = 7
|
||||
// plotter_x = { bitmap_plot_xhi[x], bitmap_plot_xlo[x] }
|
||||
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] }
|
||||
lda bitmap_plot_yhi,y
|
||||
sta.z plotter_y+1
|
||||
lda bitmap_plot_ylo,y
|
||||
sta.z plotter_y
|
||||
// plotter_x+plotter_y
|
||||
lda.z plotter
|
||||
clc
|
||||
adc.z plotter_y
|
||||
@ -126,10 +157,13 @@ bitmap_plot: {
|
||||
lda.z plotter+1
|
||||
adc.z plotter_y+1
|
||||
sta.z plotter+1
|
||||
// *plotter | bitmap_plot_bit[x]
|
||||
lda bitmap_plot_bit,x
|
||||
ldy #0
|
||||
ora (plotter),y
|
||||
// *plotter = *plotter | bitmap_plot_bit[x]
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// bitmap_line_ydxi(byte zp(3) y, byte zp(2) x, byte zp(6) xd)
|
||||
@ -138,6 +172,7 @@ bitmap_line_ydxi: {
|
||||
.label e = 4
|
||||
.label y = 3
|
||||
.label x = 2
|
||||
// e = xd>>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<e)
|
||||
lda #bitmap_line.y1
|
||||
cmp.z e
|
||||
bcs __b2
|
||||
// x++;
|
||||
inc.z x
|
||||
// e = e - yd
|
||||
lax.z e
|
||||
axs #bitmap_line.y1
|
||||
stx.z e
|
||||
__b2:
|
||||
// while (y!=(y1+1))
|
||||
lda #bitmap_line.y1+1
|
||||
cmp.z y
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// bitmap_line_xdyd(byte zp(2) x, byte zp(3) y, byte zp(6) xd)
|
||||
@ -178,25 +221,33 @@ bitmap_line_xdyd: {
|
||||
lda #bitmap_line.y1
|
||||
sta.z y
|
||||
__b1:
|
||||
// bitmap_plot(x,y)
|
||||
ldx.z x
|
||||
ldy.z y
|
||||
jsr bitmap_plot
|
||||
// x++;
|
||||
inc.z x
|
||||
// e = e+yd
|
||||
lax.z e
|
||||
axs #-[bitmap_line.y1]
|
||||
stx.z e
|
||||
// if(xd<e)
|
||||
lda.z xd
|
||||
cmp.z e
|
||||
bcs __b2
|
||||
// y--;
|
||||
dec.z y
|
||||
// e = e - xd
|
||||
txa
|
||||
sec
|
||||
sbc.z xd
|
||||
sta.z e
|
||||
__b2:
|
||||
// while (x!=(x1+1))
|
||||
lda #1
|
||||
cmp.z x
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// bitmap_line_ydxd(byte zp(3) y, byte zp(2) x, byte zp(6) xd)
|
||||
@ -205,6 +256,7 @@ bitmap_line_ydxd: {
|
||||
.label e = 4
|
||||
.label y = 3
|
||||
.label x = 2
|
||||
// e = xd>>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(yd<e)
|
||||
lda #bitmap_line.y1
|
||||
cmp.z e
|
||||
bcs __b2
|
||||
// x--;
|
||||
dec.z x
|
||||
// e = e - yd
|
||||
lax.z e
|
||||
axs #bitmap_line.y1
|
||||
stx.z e
|
||||
__b2:
|
||||
// while (y!=(y1+1))
|
||||
lda #bitmap_line.y1+1
|
||||
cmp.z y
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
init_screen: {
|
||||
@ -241,17 +301,21 @@ init_screen: {
|
||||
lda #>SCREEN
|
||||
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 #<SCREEN+$400
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// *c = $14
|
||||
lda #$14
|
||||
ldy #0
|
||||
sta (c),y
|
||||
// for(byte* c = SCREEN; c!=SCREEN+$400;c++)
|
||||
inc.z c
|
||||
bne !+
|
||||
inc.z c+1
|
||||
@ -262,6 +326,7 @@ init_screen: {
|
||||
bitmap_clear: {
|
||||
.label bitmap = 7
|
||||
.label y = 5
|
||||
// (byte*) { bitmap_plot_xhi[0], bitmap_plot_xlo[0] }
|
||||
lda bitmap_plot_xlo
|
||||
sta.z bitmap
|
||||
lda bitmap_plot_xhi
|
||||
@ -271,20 +336,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
|
||||
}
|
||||
// Initialize the bitmap plotter tables for a specific bitmap
|
||||
@ -294,20 +364,27 @@ bitmap_init: {
|
||||
ldy #$80
|
||||
ldx #0
|
||||
__b1:
|
||||
// x&$f8
|
||||
txa
|
||||
and #$f8
|
||||
// bitmap_plot_xlo[x] = x&$f8
|
||||
sta bitmap_plot_xlo,x
|
||||
// bitmap_plot_xhi[x] = >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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __10
|
||||
// bitmap_plot_ylo[y] = y&$7 | <yoffs
|
||||
sta bitmap_plot_ylo,x
|
||||
// >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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
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
|
||||
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(dy<e)
|
||||
cmp.z dy+1
|
||||
bne !+
|
||||
lda.z e
|
||||
@ -147,6 +175,7 @@ bitmap_line: {
|
||||
beq __b7
|
||||
!:
|
||||
bcc __b7
|
||||
// x += sx
|
||||
lda.z x
|
||||
clc
|
||||
adc.z sx
|
||||
@ -154,6 +183,7 @@ bitmap_line: {
|
||||
lda.z x+1
|
||||
adc.z sx+1
|
||||
sta.z x+1
|
||||
// e -= dy
|
||||
lda.z e
|
||||
sec
|
||||
sbc.z dy
|
||||
@ -162,6 +192,7 @@ bitmap_line: {
|
||||
sbc.z dy+1
|
||||
sta.z e+1
|
||||
__b7:
|
||||
// while (y != y2)
|
||||
lda.z y+1
|
||||
cmp #>y2
|
||||
bne __b6
|
||||
@ -169,11 +200,14 @@ bitmap_line: {
|
||||
cmp #<y2
|
||||
bne __b6
|
||||
__b3:
|
||||
// bitmap_plot(x,(byte)y)
|
||||
lda.z y
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// e = dy/2
|
||||
lda.z dy+1
|
||||
lsr
|
||||
sta.z e1+1
|
||||
@ -189,9 +223,11 @@ bitmap_line: {
|
||||
lda #>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
|
||||
sta.z bitmap_plot.x
|
||||
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
|
||||
// <x
|
||||
lda.z x
|
||||
// *plotter |= bitmap_plot_bit[<x]
|
||||
tay
|
||||
lda bitmap_plot_bit,y
|
||||
ldy #0
|
||||
ora (plotter),y
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Get the sign of a 16-bit unsigned number treated as a signed number.
|
||||
@ -281,8 +329,11 @@ bitmap_plot: {
|
||||
sgn_u16: {
|
||||
.label w = 4
|
||||
.label return = 6
|
||||
// >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 #<SCREEN
|
||||
sta.z memset.str
|
||||
@ -331,6 +389,7 @@ bitmap_clear: {
|
||||
lda #>$3e8
|
||||
sta.z memset.num+1
|
||||
jsr memset
|
||||
// memset(bitmap_gfx, 0, 8000uw)
|
||||
ldx #0
|
||||
lda #<BITMAP
|
||||
sta.z memset.str
|
||||
@ -341,6 +400,7 @@ bitmap_clear: {
|
||||
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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __7
|
||||
// bitmap_plot_ylo[y] = y&$7 | <yoffs
|
||||
sta bitmap_plot_ylo,x
|
||||
// >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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
// <x
|
||||
lda.z x
|
||||
// *plotter |= bitmap_plot_bit[<x]
|
||||
tay
|
||||
lda bitmap_plot_bit,y
|
||||
ldy #0
|
||||
ora (plotter),y
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// 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
|
||||
lda #>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 #<SCREEN
|
||||
sta.z memset.str
|
||||
@ -189,6 +220,7 @@ bitmap_clear: {
|
||||
lda #>$3e8
|
||||
sta.z memset.num+1
|
||||
jsr memset
|
||||
// memset(bitmap_gfx, 0, 8000uw)
|
||||
ldx #0
|
||||
lda #<BITMAP
|
||||
sta.z memset.str
|
||||
@ -199,6 +231,7 @@ bitmap_clear: {
|
||||
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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __7
|
||||
// bitmap_plot_ylo[y] = y&$7 | <yoffs
|
||||
sta bitmap_plot_ylo,x
|
||||
// >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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
// <x
|
||||
lda.z x
|
||||
// *plotter |= bitmap_plot_bit[<x]
|
||||
tay
|
||||
lda bitmap_plot_bit,y
|
||||
ldy #0
|
||||
ora (plotter),y
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Multiply of two signed words to a signed double word
|
||||
@ -260,6 +291,7 @@ mul16s: {
|
||||
.label return = 6
|
||||
.label a = $11
|
||||
.label b = $a
|
||||
// mul16u((word)a, (word) b)
|
||||
lda.z a
|
||||
sta.z mul16u.a
|
||||
lda.z a+1
|
||||
@ -269,12 +301,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
|
||||
@ -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
|
||||
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 #<SCREEN
|
||||
sta.z memset.str
|
||||
@ -404,6 +465,7 @@ bitmap_clear: {
|
||||
lda #>$3e8
|
||||
sta.z memset.num+1
|
||||
jsr memset
|
||||
// memset(bitmap_gfx, 0, 8000uw)
|
||||
ldx #0
|
||||
lda #<BITMAP
|
||||
sta.z memset.str
|
||||
@ -414,6 +476,7 @@ bitmap_clear: {
|
||||
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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __7
|
||||
// bitmap_plot_ylo[y] = y&$7 | <yoffs
|
||||
sta bitmap_plot_ylo,x
|
||||
// >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
|
||||
sta.z sintab
|
||||
lda #>SINUS
|
||||
@ -533,6 +619,7 @@ sin16s_gen2: {
|
||||
sta.z i+1
|
||||
// u[4.28]
|
||||
__b1:
|
||||
// for( word i=0; i<wavelength; i++)
|
||||
lda.z i+1
|
||||
cmp #>wavelength
|
||||
bcc __b2
|
||||
@ -541,8 +628,10 @@ sin16s_gen2: {
|
||||
cmp #<wavelength
|
||||
bcc __b2
|
||||
!:
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// sin16s(x)
|
||||
lda.z x
|
||||
sta.z sin16s.x
|
||||
lda.z x+1
|
||||
@ -552,21 +641,26 @@ sin16s_gen2: {
|
||||
lda.z x+3
|
||||
sta.z sin16s.x+3
|
||||
jsr sin16s
|
||||
// mul16s(sin16s(x), ampl)
|
||||
lda #<ampl
|
||||
sta.z mul16s.b
|
||||
lda #>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<wavelength; i++)
|
||||
inc.z i
|
||||
bne !+
|
||||
inc.z i+1
|
||||
@ -610,6 +706,7 @@ sin16s: {
|
||||
.label x5 = $20
|
||||
.label x5_128 = $20
|
||||
.label sinx = $11
|
||||
// if(x >= PI_u4f28 )
|
||||
lda.z x+3
|
||||
cmp #>PI_u4f28>>$10
|
||||
bcc b1
|
||||
@ -626,6 +723,7 @@ sin16s: {
|
||||
cmp #<PI_u4f28
|
||||
bcc b1
|
||||
!:
|
||||
// x = x - PI_u4f28
|
||||
lda.z x
|
||||
sec
|
||||
sbc #<PI_u4f28
|
||||
@ -644,6 +742,7 @@ sin16s: {
|
||||
b1:
|
||||
ldy #0
|
||||
__b1:
|
||||
// if(x >= PI_HALF_u4f28 )
|
||||
lda.z x+3
|
||||
cmp #>PI_HALF_u4f28>>$10
|
||||
bcc __b2
|
||||
@ -660,6 +759,7 @@ sin16s: {
|
||||
cmp #<PI_HALF_u4f28
|
||||
bcc __b2
|
||||
!:
|
||||
// x = PI_u4f28 - x
|
||||
lda #<PI_u4f28
|
||||
sec
|
||||
sbc.z x
|
||||
@ -674,6 +774,7 @@ sin16s: {
|
||||
sbc.z x+3
|
||||
sta.z x+3
|
||||
__b2:
|
||||
// x<<3
|
||||
lda.z x
|
||||
asl
|
||||
sta.z __4
|
||||
@ -694,10 +795,12 @@ sin16s: {
|
||||
rol.z __4+1
|
||||
rol.z __4+2
|
||||
rol.z __4+3
|
||||
// x1 = >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)<<select
|
||||
cpx #0
|
||||
beq !e+
|
||||
!:
|
||||
@ -803,10 +929,12 @@ mulu16_sel: {
|
||||
dex
|
||||
bne !-
|
||||
!e:
|
||||
// >mul16u(v1, v2)<<select
|
||||
lda.z __1+2
|
||||
sta.z return
|
||||
lda.z __1+3
|
||||
sta.z return+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Divide unsigned 32-bit dword dividend with a 16-bit word divisor
|
||||
@ -815,6 +943,7 @@ div32u16u: {
|
||||
.label quotient_hi = $22
|
||||
.label quotient_lo = $c
|
||||
.label return = $16
|
||||
// divr16u(>dividend, divisor, 0)
|
||||
lda #<PI2_u4f28>>$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(<dividend, divisor, rem16u)
|
||||
lda #<PI2_u4f28&$ffff
|
||||
sta.z divr16u.dividend
|
||||
lda #>PI2_u4f28&$ffff
|
||||
sta.z divr16u.dividend+1
|
||||
jsr divr16u
|
||||
// divr16u(<dividend, divisor, rem16u)
|
||||
// quotient_lo = divr16u(<dividend, divisor, rem16u)
|
||||
// quotient = { quotient_hi, quotient_lo}
|
||||
lda.z quotient_hi
|
||||
sta.z return+2
|
||||
lda.z quotient_hi+1
|
||||
@ -840,6 +975,7 @@ div32u16u: {
|
||||
sta.z return
|
||||
lda.z quotient_lo+1
|
||||
sta.z return+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Performs division on two 16 bit unsigned words and an initial remainder
|
||||
@ -857,20 +993,28 @@ divr16u: {
|
||||
sta.z quotient
|
||||
sta.z quotient+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 #>sin16s_gen2.wavelength
|
||||
bcc __b3
|
||||
@ -879,10 +1023,12 @@ divr16u: {
|
||||
cmp #<sin16s_gen2.wavelength
|
||||
bcc __b3
|
||||
!:
|
||||
// quotient++;
|
||||
inc.z quotient
|
||||
bne !+
|
||||
inc.z quotient+1
|
||||
!:
|
||||
// rem = rem - divisor
|
||||
lda.z rem
|
||||
sec
|
||||
sbc #<sin16s_gen2.wavelength
|
||||
@ -891,26 +1037,35 @@ divr16u: {
|
||||
sbc #>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
|
||||
|
@ -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 = <div32u16u::dividend#0
|
||||
@ -2456,7 +2456,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 [172] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7
|
||||
Constant right-side identified [171] (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
|
||||
|
@ -48,6 +48,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
|
||||
@ -73,13 +74,19 @@ main: {
|
||||
.label r_add = $17
|
||||
.label __33 = $c
|
||||
.label __34 = $c
|
||||
// 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 #$20
|
||||
sta.z r_add
|
||||
@ -93,6 +100,7 @@ main: {
|
||||
sta.z idx_x
|
||||
sta.z idx_x+1
|
||||
__b2:
|
||||
// cos_x = SINUS[idx_x]
|
||||
lda.z idx_x
|
||||
asl
|
||||
sta.z __31
|
||||
@ -114,11 +122,16 @@ main: {
|
||||
sta.z cos_x+1
|
||||
pla
|
||||
sta.z cos_x
|
||||
// mul16s(r, cos_x)
|
||||
jsr mul16s
|
||||
// mul16s(r, cos_x)
|
||||
// xpos = mul16s(r, cos_x)
|
||||
// >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
|
||||
// <x
|
||||
lda.z x
|
||||
// *plotter |= bitmap_plot_bit[<x]
|
||||
tay
|
||||
lda bitmap_plot_bit,y
|
||||
ldy #0
|
||||
ora (plotter),y
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Multiply of two signed words to a signed double word
|
||||
@ -290,6 +328,7 @@ mul16s: {
|
||||
.label return = 8
|
||||
.label a = 2
|
||||
.label b = $c
|
||||
// mul16u((word)a, (word) b)
|
||||
lda.z a
|
||||
sta.z mul16u.a
|
||||
lda.z a+1
|
||||
@ -299,12 +338,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
|
||||
@ -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
|
||||
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 #<SCREEN
|
||||
sta.z memset.str
|
||||
@ -434,6 +502,7 @@ bitmap_clear: {
|
||||
lda #>$3e8
|
||||
sta.z memset.num+1
|
||||
jsr memset
|
||||
// memset(bitmap_gfx, 0, 8000uw)
|
||||
ldx #0
|
||||
lda #<BITMAP
|
||||
sta.z memset.str
|
||||
@ -444,6 +513,7 @@ bitmap_clear: {
|
||||
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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __7
|
||||
// bitmap_plot_ylo[y] = y&$7 | <yoffs
|
||||
sta bitmap_plot_ylo,x
|
||||
// >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
|
||||
sta.z sintab
|
||||
lda #>SINUS
|
||||
@ -563,6 +656,7 @@ sin16s_gen2: {
|
||||
sta.z i+1
|
||||
// u[4.28]
|
||||
__b1:
|
||||
// for( word i=0; i<wavelength; i++)
|
||||
lda.z i+1
|
||||
cmp #>wavelength
|
||||
bcc __b2
|
||||
@ -571,8 +665,10 @@ sin16s_gen2: {
|
||||
cmp #<wavelength
|
||||
bcc __b2
|
||||
!:
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// sin16s(x)
|
||||
lda.z x
|
||||
sta.z sin16s.x
|
||||
lda.z x+1
|
||||
@ -582,21 +678,26 @@ sin16s_gen2: {
|
||||
lda.z x+3
|
||||
sta.z sin16s.x+3
|
||||
jsr sin16s
|
||||
// mul16s(sin16s(x), ampl)
|
||||
lda #<ampl
|
||||
sta.z mul16s.b
|
||||
lda #>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<wavelength; i++)
|
||||
inc.z i
|
||||
bne !+
|
||||
inc.z i+1
|
||||
@ -640,6 +743,7 @@ sin16s: {
|
||||
.label x5 = $20
|
||||
.label x5_128 = $20
|
||||
.label sinx = 2
|
||||
// if(x >= PI_u4f28 )
|
||||
lda.z x+3
|
||||
cmp #>PI_u4f28>>$10
|
||||
bcc b1
|
||||
@ -656,6 +760,7 @@ sin16s: {
|
||||
cmp #<PI_u4f28
|
||||
bcc b1
|
||||
!:
|
||||
// x = x - PI_u4f28
|
||||
lda.z x
|
||||
sec
|
||||
sbc #<PI_u4f28
|
||||
@ -674,6 +779,7 @@ sin16s: {
|
||||
b1:
|
||||
ldy #0
|
||||
__b1:
|
||||
// if(x >= PI_HALF_u4f28 )
|
||||
lda.z x+3
|
||||
cmp #>PI_HALF_u4f28>>$10
|
||||
bcc __b2
|
||||
@ -690,6 +796,7 @@ sin16s: {
|
||||
cmp #<PI_HALF_u4f28
|
||||
bcc __b2
|
||||
!:
|
||||
// x = PI_u4f28 - x
|
||||
lda #<PI_u4f28
|
||||
sec
|
||||
sbc.z x
|
||||
@ -704,6 +811,7 @@ sin16s: {
|
||||
sbc.z x+3
|
||||
sta.z x+3
|
||||
__b2:
|
||||
// x<<3
|
||||
lda.z x
|
||||
asl
|
||||
sta.z __4
|
||||
@ -724,10 +832,12 @@ sin16s: {
|
||||
rol.z __4+1
|
||||
rol.z __4+2
|
||||
rol.z __4+3
|
||||
// x1 = >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)<<select
|
||||
cpx #0
|
||||
beq !e+
|
||||
!:
|
||||
@ -833,10 +966,12 @@ mulu16_sel: {
|
||||
dex
|
||||
bne !-
|
||||
!e:
|
||||
// >mul16u(v1, v2)<<select
|
||||
lda.z __1+2
|
||||
sta.z return
|
||||
lda.z __1+3
|
||||
sta.z return+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Divide unsigned 32-bit dword dividend with a 16-bit word divisor
|
||||
@ -845,6 +980,7 @@ div32u16u: {
|
||||
.label quotient_hi = $22
|
||||
.label quotient_lo = $e
|
||||
.label return = $18
|
||||
// divr16u(>dividend, divisor, 0)
|
||||
lda #<PI2_u4f28>>$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(<dividend, divisor, rem16u)
|
||||
lda #<PI2_u4f28&$ffff
|
||||
sta.z divr16u.dividend
|
||||
lda #>PI2_u4f28&$ffff
|
||||
sta.z divr16u.dividend+1
|
||||
jsr divr16u
|
||||
// divr16u(<dividend, divisor, rem16u)
|
||||
// quotient_lo = divr16u(<dividend, divisor, rem16u)
|
||||
// quotient = { quotient_hi, quotient_lo}
|
||||
lda.z quotient_hi
|
||||
sta.z return+2
|
||||
lda.z quotient_hi+1
|
||||
@ -870,6 +1012,7 @@ div32u16u: {
|
||||
sta.z return
|
||||
lda.z quotient_lo+1
|
||||
sta.z return+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Performs division on two 16 bit unsigned words and an initial remainder
|
||||
@ -887,20 +1030,28 @@ divr16u: {
|
||||
sta.z quotient
|
||||
sta.z quotient+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 #>sin16s_gen2.wavelength
|
||||
bcc __b3
|
||||
@ -909,10 +1060,12 @@ divr16u: {
|
||||
cmp #<sin16s_gen2.wavelength
|
||||
bcc __b3
|
||||
!:
|
||||
// quotient++;
|
||||
inc.z quotient
|
||||
bne !+
|
||||
inc.z quotient+1
|
||||
!:
|
||||
// rem = rem - divisor
|
||||
lda.z rem
|
||||
sec
|
||||
sbc #<sin16s_gen2.wavelength
|
||||
@ -921,26 +1074,35 @@ divr16u: {
|
||||
sbc #>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
|
||||
|
@ -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 = <div32u16u::dividend#0
|
||||
@ -2618,7 +2618,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 [172] (byte) main::toD0181_return#0 ← (const byte) main::toD0181_$3 | (const byte) main::toD0181_$7
|
||||
Constant right-side identified [171] (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
|
||||
|
@ -18,28 +18,36 @@ main: {
|
||||
.label __8 = $f
|
||||
.label a = 2
|
||||
.label i = $1b
|
||||
// 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
|
||||
lda #0
|
||||
sta.z a
|
||||
sta.z i
|
||||
__b1:
|
||||
// for( byte i=0, a=0; i!=8; i++, a+=32)
|
||||
lda #8
|
||||
cmp.z i
|
||||
bne __b2
|
||||
__b3:
|
||||
// (*(SCREEN+999))++;
|
||||
inc SCREEN+$3e7
|
||||
jmp __b3
|
||||
__b2:
|
||||
// (word)COSTAB[a]
|
||||
ldy.z a
|
||||
lda COSTAB,y
|
||||
sta.z __4
|
||||
lda #0
|
||||
sta.z __4+1
|
||||
// bitmap_line( (word)COSTAB[a]+120, (word)SINTAB[a], (word)COSTAB[a+32]+120, (word)SINTAB[a+32])
|
||||
lda #$78
|
||||
clc
|
||||
adc.z bitmap_line.x1
|
||||
@ -52,10 +60,12 @@ main: {
|
||||
sta.z bitmap_line.y1
|
||||
lda #0
|
||||
sta.z bitmap_line.y1+1
|
||||
// (word)COSTAB[a+32]
|
||||
lda COSTAB+$20,y
|
||||
sta.z __8
|
||||
lda #0
|
||||
sta.z __8+1
|
||||
// bitmap_line( (word)COSTAB[a]+120, (word)SINTAB[a], (word)COSTAB[a+32]+120, (word)SINTAB[a+32])
|
||||
lda #$78
|
||||
clc
|
||||
adc.z bitmap_line.x2
|
||||
@ -69,9 +79,11 @@ main: {
|
||||
lda #0
|
||||
sta.z bitmap_line.y2+1
|
||||
jsr bitmap_line
|
||||
// a+=32
|
||||
lax.z a
|
||||
axs #-[$20]
|
||||
stx.z a
|
||||
// for( byte i=0, a=0; i!=8; i++, a+=32)
|
||||
inc.z i
|
||||
jmp __b1
|
||||
}
|
||||
@ -90,6 +102,7 @@ bitmap_line: {
|
||||
.label y1 = 9
|
||||
.label x2 = $f
|
||||
.label y2 = $11
|
||||
// abs_u16(x2-x1)
|
||||
lda.z x2
|
||||
sec
|
||||
sbc.z x1
|
||||
@ -98,10 +111,13 @@ bitmap_line: {
|
||||
sbc.z x1+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 y1
|
||||
@ -110,6 +126,9 @@ bitmap_line: {
|
||||
sbc.z y1+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
|
||||
@ -122,6 +141,7 @@ bitmap_line: {
|
||||
!__b4:
|
||||
!:
|
||||
__b1:
|
||||
// sgn_u16(x2-x1)
|
||||
lda.z x2
|
||||
sec
|
||||
sbc.z x1
|
||||
@ -130,10 +150,13 @@ bitmap_line: {
|
||||
sbc.z x1+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 y1
|
||||
@ -142,6 +165,9 @@ bitmap_line: {
|
||||
sbc.z y1+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
|
||||
@ -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<e)
|
||||
cmp.z dy+1
|
||||
bne !+
|
||||
lda.z e
|
||||
@ -181,6 +212,7 @@ bitmap_line: {
|
||||
beq __b7
|
||||
!:
|
||||
bcc __b7
|
||||
// x += sx
|
||||
lda.z x
|
||||
clc
|
||||
adc.z sx
|
||||
@ -188,6 +220,7 @@ bitmap_line: {
|
||||
lda.z x+1
|
||||
adc.z sx+1
|
||||
sta.z x+1
|
||||
// e -= dy
|
||||
lda.z e
|
||||
sec
|
||||
sbc.z dy
|
||||
@ -196,6 +229,7 @@ bitmap_line: {
|
||||
sbc.z dy+1
|
||||
sta.z e+1
|
||||
__b7:
|
||||
// while (y != y2)
|
||||
lda.z y+1
|
||||
cmp.z y2+1
|
||||
bne __b6
|
||||
@ -203,11 +237,14 @@ bitmap_line: {
|
||||
cmp.z y2
|
||||
bne __b6
|
||||
__b3:
|
||||
// bitmap_plot(x,(byte)y)
|
||||
lda.z y
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// e = dy/2
|
||||
lda.z dy+1
|
||||
lsr
|
||||
sta.z e1+1
|
||||
@ -215,9 +252,11 @@ bitmap_line: {
|
||||
ror
|
||||
sta.z e1
|
||||
__b9:
|
||||
// bitmap_plot(x,(byte)y)
|
||||
lda.z y
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
// x += sx
|
||||
lda.z x
|
||||
clc
|
||||
adc.z sx
|
||||
@ -225,6 +264,7 @@ bitmap_line: {
|
||||
lda.z x+1
|
||||
adc.z sx+1
|
||||
sta.z x+1
|
||||
// e += dy
|
||||
lda.z e1
|
||||
clc
|
||||
adc.z dy
|
||||
@ -232,6 +272,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
|
||||
@ -239,6 +280,7 @@ bitmap_line: {
|
||||
beq __b10
|
||||
!:
|
||||
bcc __b10
|
||||
// y += sy
|
||||
lda.z y
|
||||
clc
|
||||
adc.z sy
|
||||
@ -246,6 +288,7 @@ bitmap_line: {
|
||||
lda.z y+1
|
||||
adc.z sy+1
|
||||
sta.z y+1
|
||||
// e -= dx
|
||||
lda.z e1
|
||||
sec
|
||||
sbc.z dx
|
||||
@ -254,6 +297,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
|
||||
@ -262,6 +306,7 @@ bitmap_line: {
|
||||
bne __b9
|
||||
jmp __b3
|
||||
__b4:
|
||||
// bitmap_plot(x,(byte)y)
|
||||
lda.z y1
|
||||
tax
|
||||
jsr bitmap_plot
|
||||
@ -273,16 +318,19 @@ bitmap_plot: {
|
||||
.label __1 = $19
|
||||
.label plotter = $17
|
||||
.label x = $b
|
||||
// (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
|
||||
@ -290,12 +338,15 @@ bitmap_plot: {
|
||||
lda.z plotter+1
|
||||
adc.z __1+1
|
||||
sta.z plotter+1
|
||||
// <x
|
||||
lda.z x
|
||||
// *plotter |= bitmap_plot_bit[<x]
|
||||
tay
|
||||
lda bitmap_plot_bit,y
|
||||
ldy #0
|
||||
ora (plotter),y
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Get the sign of a 16-bit unsigned number treated as a signed number.
|
||||
@ -304,8 +355,11 @@ bitmap_plot: {
|
||||
sgn_u16: {
|
||||
.label w = 3
|
||||
.label return = 5
|
||||
// >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 #<SCREEN
|
||||
sta.z memset.str
|
||||
@ -354,6 +415,7 @@ bitmap_clear: {
|
||||
lda #>$3e8
|
||||
sta.z memset.num+1
|
||||
jsr memset
|
||||
// memset(bitmap_gfx, 0, 8000uw)
|
||||
ldx #0
|
||||
lda #<BITMAP
|
||||
sta.z memset.str
|
||||
@ -364,6 +426,7 @@ bitmap_clear: {
|
||||
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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __7
|
||||
// bitmap_plot_ylo[y] = y&$7 | <yoffs
|
||||
sta bitmap_plot_ylo,x
|
||||
// >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();
|
||||
|
@ -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
|
||||
|
@ -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; i<plots_cnt;i++)
|
||||
cpx #plots_cnt
|
||||
bcc __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// plot(plots_x[i], plots_y[i])
|
||||
lda plots_x,x
|
||||
sta.z plot.x
|
||||
lda plots_y,x
|
||||
sta.z plot.y
|
||||
jsr plot
|
||||
// for(byte i=0; i<plots_cnt;i++)
|
||||
inx
|
||||
jmp __b1
|
||||
}
|
||||
@ -53,20 +67,25 @@ plot: {
|
||||
.label plotter_x = 3
|
||||
.label plotter_y = 5
|
||||
.label plotter = 3
|
||||
// >plotter_x = plot_xhi[x]
|
||||
ldy.z x
|
||||
lda plot_xhi,y
|
||||
sta.z plotter_x+1
|
||||
lda #<0
|
||||
sta.z plotter_x
|
||||
// <plotter_x = plot_xlo[x]
|
||||
lda plot_xlo,y
|
||||
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
|
||||
// <plotter_y = plot_ylo[y]
|
||||
lda plot_ylo,y
|
||||
sta.z plotter_y
|
||||
// plotter = plotter_x+plotter_y
|
||||
lda.z plotter
|
||||
clc
|
||||
adc.z plotter_y
|
||||
@ -74,12 +93,15 @@ plot: {
|
||||
lda.z plotter+1
|
||||
adc.z plotter_y+1
|
||||
sta.z plotter+1
|
||||
// *plotter | plot_bit[x]
|
||||
ldy #0
|
||||
lda (plotter),y
|
||||
ldy.z x
|
||||
ora plot_bit,y
|
||||
// *plotter = *plotter | plot_bit[x]
|
||||
ldy #0
|
||||
sta (plotter),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
init_plot_tables: {
|
||||
@ -88,20 +110,27 @@ init_plot_tables: {
|
||||
ldy #$80
|
||||
ldx #0
|
||||
__b1:
|
||||
// x&$f8
|
||||
txa
|
||||
and #$f8
|
||||
// plot_xlo[x] = x&$f8
|
||||
sta plot_xlo,x
|
||||
// plot_xhi[x] = >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
|
||||
// y&$7 | <yoffs
|
||||
ora.z __9
|
||||
// plot_ylo[y] = y&$7 | <yoffs
|
||||
sta plot_ylo,x
|
||||
// >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 #<SCREEN+$400
|
||||
bne __b4
|
||||
// }
|
||||
rts
|
||||
__b4:
|
||||
// *c = $14
|
||||
lda #$14
|
||||
ldy #0
|
||||
sta (c),y
|
||||
// for(byte* c = SCREEN; c!=SCREEN+$400;c++)
|
||||
inc.z c
|
||||
bne !+
|
||||
inc.z c+1
|
||||
!:
|
||||
jmp __b3
|
||||
__b2:
|
||||
// *b = 0
|
||||
lda #0
|
||||
tay
|
||||
sta (b),y
|
||||
// for(byte* b = BITMAP; b!=BITMAP+$2000; b++)
|
||||
inc.z b
|
||||
bne !+
|
||||
inc.z b+1
|
||||
|
@ -476,16 +476,16 @@ Identified duplicate assignment right side [74] (byte~) init_plot_tables::$9 ←
|
||||
Successful SSA optimization Pass2DuplicateRValueIdentification
|
||||
Simple Condition (bool~) main::$9 [14] if(*((const byte*) RASTER)!=(byte) $ff) goto main::@2
|
||||
Simple Condition (bool~) plots::$0 [23] if((byte) plots::i#2<(const byte) plots_cnt) goto plots::@2
|
||||
Simple Condition (bool~) init_plot_tables::$3 [58] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@2
|
||||
Simple Condition (bool~) init_plot_tables::$4 [62] if((byte) init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1
|
||||
Simple Condition (bool~) init_plot_tables::$11 [77] if((byte~) init_plot_tables::$9!=(byte) 7) goto init_plot_tables::@6
|
||||
Simple Condition (bool~) init_plot_tables::$13 [81] if((byte) init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5
|
||||
Simple Condition (bool~) init_screen::$0 [89] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2
|
||||
Simple Condition (bool~) init_screen::$2 [97] if((byte*) init_screen::c#2!=(byte*~) init_screen::$1) goto init_screen::@8
|
||||
Simple Condition (bool~) init_plot_tables::$3 [53] if((byte) init_plot_tables::bits#1!=(byte) 0) goto init_plot_tables::@2
|
||||
Simple Condition (bool~) init_plot_tables::$4 [57] if((byte) init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1
|
||||
Simple Condition (bool~) init_plot_tables::$11 [70] if((byte~) init_plot_tables::$9!=(byte) 7) goto init_plot_tables::@6
|
||||
Simple Condition (bool~) init_plot_tables::$13 [74] if((byte) init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5
|
||||
Simple Condition (bool~) init_screen::$0 [80] if((byte*) init_screen::b#2!=(const byte*) BITMAP+(word) $2000) goto init_screen::@2
|
||||
Simple Condition (bool~) init_screen::$2 [87] if((byte*) init_screen::c#2!=(byte*~) init_screen::$1) goto init_screen::@8
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant right-side identified [2] (byte~) main::$0 ← (const byte) BMM | (const byte) DEN
|
||||
Constant right-side identified [6] (word~) main::$3 ← (word)(const byte*) SCREEN
|
||||
Constant right-side identified [95] (byte*~) init_screen::$1 ← (const byte*) SCREEN + (word) $400
|
||||
Constant right-side identified [85] (byte*~) init_screen::$1 ← (const byte*) SCREEN + (word) $400
|
||||
Successful SSA optimization Pass2ConstantRValueConsolidation
|
||||
Constant (const byte) main::$0 = BMM|DEN
|
||||
Constant (const word) main::$3 = (word)SCREEN
|
||||
@ -503,10 +503,10 @@ Constant (const byte*) init_screen::$1 = SCREEN+$400
|
||||
Successful SSA optimization Pass2ConstantIdentification
|
||||
if() condition always true - replacing block destination [18] if(true) goto main::@2
|
||||
Successful SSA optimization Pass2ConstantIfs
|
||||
Resolved ranged next value [60] init_plot_tables::x#1 ← ++ init_plot_tables::x#2 to ++
|
||||
Resolved ranged comparison value [62] if(init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1 to (number) 0
|
||||
Resolved ranged next value [79] init_plot_tables::y#1 ← ++ init_plot_tables::y#2 to ++
|
||||
Resolved ranged comparison value [81] if(init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5 to (number) 0
|
||||
Resolved ranged next value [55] init_plot_tables::x#1 ← ++ init_plot_tables::x#2 to ++
|
||||
Resolved ranged comparison value [57] if(init_plot_tables::x#1!=rangelast(0,$ff)) goto init_plot_tables::@1 to (number) 0
|
||||
Resolved ranged next value [72] init_plot_tables::y#1 ← ++ init_plot_tables::y#2 to ++
|
||||
Resolved ranged comparison value [74] if(init_plot_tables::y#1!=rangelast(0,$ff)) goto init_plot_tables::@5 to (number) 0
|
||||
Removing unused block main::@return
|
||||
Successful SSA optimization Pass2EliminateUnusedBlocks
|
||||
Adding number conversion cast (unumber) 0 in if((byte) init_plot_tables::x#1!=(number) 0) goto init_plot_tables::@1
|
||||
|
@ -3,15 +3,20 @@
|
||||
.pc = $80d "Program"
|
||||
main: {
|
||||
.label SCREEN = $400
|
||||
// *SCREEN = ~1ub
|
||||
lda #1^$ff
|
||||
sta SCREEN
|
||||
ldx #1
|
||||
__b1:
|
||||
// ~c
|
||||
txa
|
||||
eor #$ff
|
||||
// SCREEN[c] = ~c
|
||||
sta SCREEN,x
|
||||
// for(byte c : 1..26)
|
||||
inx
|
||||
cpx #$1b
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
|
@ -4,26 +4,36 @@
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
// bool_const_if()
|
||||
jsr bool_const_if
|
||||
// bool_const_vars()
|
||||
jsr bool_const_vars
|
||||
// bool_const_inline()
|
||||
jsr bool_const_inline
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// A constant boolean inside an if()
|
||||
bool_const_inline: {
|
||||
// SCREEN[2] = 't'
|
||||
lda #'t'
|
||||
sta SCREEN+2
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// A bunch of constant boolean vars (used in an if)
|
||||
bool_const_vars: {
|
||||
// SCREEN[1] = 'f'
|
||||
lda #'f'
|
||||
sta SCREEN+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// A constant boolean inside an if()
|
||||
bool_const_if: {
|
||||
// SCREEN[0] = 't'
|
||||
lda #'t'
|
||||
sta SCREEN
|
||||
// }
|
||||
rts
|
||||
}
|
||||
|
@ -204,23 +204,23 @@ Alias (bool) bool_const_vars::b1#0 = (bool~) bool_const_vars::$3
|
||||
Alias (bool) bool_const_vars::b2#0 = (bool~) bool_const_vars::$6
|
||||
Alias (bool) bool_const_vars::b#0 = (bool~) bool_const_vars::$9
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
Rewriting || if()-condition to two if()s [19] (bool) bool_const_vars::b#0 ← (bool~) bool_const_vars::$8 || false
|
||||
Rewriting && if()-condition to two if()s [18] (bool~) bool_const_vars::$8 ← (bool) bool_const_vars::b1#0 && (bool~) bool_const_vars::$7
|
||||
Rewriting || if()-condition to two if()s [11] (bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2
|
||||
Rewriting || if()-condition to two if()s [32] (bool~) bool_const_inline::$7 ← (bool~) bool_const_inline::$4 || (bool~) bool_const_inline::$6
|
||||
Rewriting || if()-condition to two if()s [29] (bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$3
|
||||
Rewriting ! if()-condition to reversed if() [17] (bool~) bool_const_vars::$7 ← ! (bool) bool_const_vars::b2#0
|
||||
Rewriting || if()-condition to two if()s [15] (bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$5
|
||||
Rewriting && if()-condition to two if()s [28] (bool~) bool_const_inline::$3 ← (bool~) bool_const_inline::$1 && (bool~) bool_const_inline::$2
|
||||
Rewriting || if()-condition to two if()s [16] (bool) bool_const_vars::b#0 ← (bool~) bool_const_vars::$8 || false
|
||||
Rewriting && if()-condition to two if()s [15] (bool~) bool_const_vars::$8 ← (bool) bool_const_vars::b1#0 && (bool~) bool_const_vars::$7
|
||||
Rewriting || if()-condition to two if()s [10] (bool) bool_const_vars::b1#0 ← (bool~) bool_const_vars::$0 || (bool~) bool_const_vars::$2
|
||||
Rewriting || if()-condition to two if()s [27] (bool~) bool_const_inline::$7 ← (bool~) bool_const_inline::$4 || (bool~) bool_const_inline::$6
|
||||
Rewriting || if()-condition to two if()s [25] (bool~) bool_const_inline::$4 ← (bool~) bool_const_inline::$0 || (bool~) bool_const_inline::$3
|
||||
Rewriting ! if()-condition to reversed if() [14] (bool~) bool_const_vars::$7 ← ! (bool) bool_const_vars::b2#0
|
||||
Rewriting || if()-condition to two if()s [13] (bool) bool_const_vars::b2#0 ← (bool~) bool_const_vars::$4 || (bool~) bool_const_vars::$5
|
||||
Rewriting && if()-condition to two if()s [24] (bool~) bool_const_inline::$3 ← (bool~) bool_const_inline::$1 && (bool~) bool_const_inline::$2
|
||||
Successful SSA optimization Pass2ConditionalAndOrRewriting
|
||||
Constant right-side identified [8] (bool~) bool_const_vars::$0 ← (const byte) bool_const_vars::a == (byte) $f
|
||||
Constant right-side identified [10] (bool~) bool_const_vars::$2 ← (byte) $15 >= (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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -8,6 +8,7 @@ main: {
|
||||
b1:
|
||||
lda #0
|
||||
__b2:
|
||||
// while(!framedone)
|
||||
cmp #0
|
||||
bne b1
|
||||
jmp __b2
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -21,6 +21,7 @@ main: {
|
||||
sta.z idx
|
||||
sta.z idx+1
|
||||
__b1:
|
||||
// screen[idx] = STAR
|
||||
lda.z idx
|
||||
clc
|
||||
adc #<screen
|
||||
@ -31,17 +32,23 @@ main: {
|
||||
lda #STAR
|
||||
ldy #0
|
||||
sta (__15),y
|
||||
// x = x + 1
|
||||
inc.z x
|
||||
// idx = idx + 1
|
||||
inc.z idx
|
||||
bne !+
|
||||
inc.z idx+1
|
||||
!:
|
||||
// e = e+yd
|
||||
txa
|
||||
axs #-[y1]
|
||||
// if(xd<e)
|
||||
cpx #x1
|
||||
bcc __b2
|
||||
beq __b2
|
||||
// y = y+1
|
||||
inc.z y
|
||||
// idx = idx + 40
|
||||
lda #$28
|
||||
clc
|
||||
adc.z idx
|
||||
@ -49,11 +56,14 @@ main: {
|
||||
bcc !+
|
||||
inc.z idx+1
|
||||
!:
|
||||
// e = e - xd
|
||||
txa
|
||||
axs #x1
|
||||
__b2:
|
||||
// while (x<(x1+1))
|
||||
lda.z x
|
||||
cmp #x1+1
|
||||
bcc __b1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
|
@ -208,12 +208,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::$9 [21] if((byte) main::xd#0>=(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
|
||||
|
@ -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
|
||||
lda #>str
|
||||
sta.z print_str.str+1
|
||||
jsr print_str
|
||||
// print_dword(u)
|
||||
lda #<u
|
||||
sta.z print_dword.dw
|
||||
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
|
||||
sta.z print_sdword.dw
|
||||
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
|
||||
sta.z print_sdword.dw
|
||||
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_cursor<print_char_cursor)
|
||||
lda.z print_line_cursor+1
|
||||
cmp.z print_char_cursor+1
|
||||
bcc __b1
|
||||
@ -79,22 +95,29 @@ print_ln: {
|
||||
cmp.z print_char_cursor
|
||||
bcc __b1
|
||||
!:
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Print a signed dword as HEX
|
||||
// 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
|
||||
@ -117,57 +140,71 @@ 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(<dw)
|
||||
lda.z dw
|
||||
sta.z print_word.w
|
||||
lda.z dw+1
|
||||
sta.z print_word.w+1
|
||||
jsr print_word
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Print a word as HEX
|
||||
// print_word(word zp(8) w)
|
||||
print_word: {
|
||||
.label w = 8
|
||||
// print_byte(>w)
|
||||
lda.z w+1
|
||||
tax
|
||||
jsr print_byte
|
||||
// print_byte(<w)
|
||||
lda.z w
|
||||
tax
|
||||
jsr print_byte
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// 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 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
|
||||
lda #>str
|
||||
sta.z print_str.str+1
|
||||
jsr print_str
|
||||
// print_word(u)
|
||||
lda #<u
|
||||
sta.z print_word.w
|
||||
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
|
||||
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
|
||||
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
|
||||
lda #>str
|
||||
sta.z print_str.str+1
|
||||
jsr print_str
|
||||
// print_word(u)
|
||||
lda #<u
|
||||
sta.z print_word.w
|
||||
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
|
||||
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
|
||||
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 #<end
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// *dst = c
|
||||
lda #c
|
||||
ldy #0
|
||||
sta (dst),y
|
||||
// for(char* dst = str; dst!=end; dst++)
|
||||
inc.z dst
|
||||
bne !+
|
||||
inc.z dst+1
|
||||
|
@ -1471,13 +1471,13 @@ Identical Phi Values (byte*) print_char_cursor#143 (byte*) print_char_cursor#26
|
||||
Identical Phi Values (byte*) print_char_cursor#146 (byte*) print_char_cursor#26
|
||||
Identical Phi Values (byte*) print_char_cursor#148 (byte*) print_char_cursor#26
|
||||
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#5)) goto print_str::@2
|
||||
Simple Condition (bool~) print_ln::$1 [39] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#26) goto print_ln::@1
|
||||
Simple Condition (bool~) print_sword::$0 [48] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1
|
||||
Simple Condition (bool~) print_sbyte::$0 [72] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1
|
||||
Simple Condition (bool~) print_sdword::$0 [124] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@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#5)) goto print_str::@2
|
||||
Simple Condition (bool~) print_ln::$1 [26] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#26) goto print_ln::@1
|
||||
Simple Condition (bool~) print_sword::$0 [30] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1
|
||||
Simple Condition (bool~) print_sbyte::$0 [45] if((signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1
|
||||
Simple Condition (bool~) print_sdword::$0 [76] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@1
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant (const byte*) print_line_cursor#0 = (byte*) 1024
|
||||
Constant (const byte) print_char::ch#0 = '-'
|
||||
@ -1519,8 +1519,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 [72] if((const signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1
|
||||
if() condition always false - eliminating [2] if((const word) memset::num#0<=(byte) 0) goto memset::@1
|
||||
if() condition always true - replacing block destination [45] if((const signed byte) print_sbyte::b#1<(signed byte) 0) goto print_sbyte::@1
|
||||
Successful SSA optimization Pass2ConstantIfs
|
||||
Eliminating unused constant (const void*) memset::return#2
|
||||
Successful SSA optimization PassNEliminateUnusedVars
|
||||
|
@ -58,51 +58,74 @@
|
||||
// Plane with all pixels
|
||||
.label CHARSET8 = $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()
|
||||
jsr gfx_init
|
||||
// *DTV_FEATURE = DTV_FEATURE_ENABLE
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
sta DTV_FEATURE
|
||||
// *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY | DTV_BADLINE_OFF
|
||||
// 8BPP Pixel Cell Mode
|
||||
lda #DTV_HIGHCOLOR|DTV_LINEAR|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_PLANEA_START_LO = < SCREEN
|
||||
// Plane A: SCREEN
|
||||
lda #0
|
||||
sta DTV_PLANEA_START_LO
|
||||
// *DTV_PLANEA_START_MI = > 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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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_LO
|
||||
// *DTV_BLITTER_SRCA_MI = >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
|
||||
// Step 0.0
|
||||
lda #<SRCB
|
||||
sta DTV_BLITTER_SRCB_LO
|
||||
// *DTV_BLITTER_SRCB_MI = >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
|
||||
// Step 0.0
|
||||
lda #<SCREEN+$28+5
|
||||
sta DTV_BLITTER_DEST_LO
|
||||
// *DTV_BLITTER_DEST_MI = >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!"
|
||||
|
@ -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_LO
|
||||
// *DTV_BLITTER_SRCA_MI = >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
|
||||
// Step 1.0
|
||||
lda #<SRCB
|
||||
sta DTV_BLITTER_SRCB_LO
|
||||
// *DTV_BLITTER_SRCB_MI = >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
|
||||
// Step 0.0
|
||||
sta DTV_BLITTER_DEST_LO
|
||||
// *DTV_BLITTER_DEST_MI = >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', '!', ' '
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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 ]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7114,112 +7114,112 @@ Identical Phi Values (byte) dtv_control#243 (byte) dtv_control#48
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Identified duplicate assignment right side [138] (byte~) bitmap_init::$10 ← (byte) bitmap_init::y#2 & (byte) 7
|
||||
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#2)) 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_ln::$1 [57] if((byte*) print_line_cursor#19<(byte*) print_char_cursor#32) goto print_ln::@1
|
||||
Simple Condition (bool~) bitmap_init::$4 [122] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@2
|
||||
Simple Condition (bool~) bitmap_init::$5 [126] if((byte) bitmap_init::x#1!=rangelast(0,$ff)) goto bitmap_init::@1
|
||||
Simple Condition (bool~) bitmap_init::$12 [141] if((byte~) bitmap_init::$10!=(byte) 7) goto bitmap_init::@6
|
||||
Simple Condition (bool~) bitmap_init::$14 [145] if((byte) bitmap_init::y#1!=rangelast(0,$ff)) goto bitmap_init::@5
|
||||
Simple Condition (bool~) bitmap_clear::$1 [161] if((byte) bitmap_clear::x#1!=rangelast(0,$c7)) goto bitmap_clear::@2
|
||||
Simple Condition (bool~) bitmap_clear::$2 [165] if((byte) bitmap_clear::y#1!=rangelast(0,$27)) goto bitmap_clear::@1
|
||||
Simple Condition (bool~) bitmap_line::$0 [181] if((byte) bitmap_line::x0#0<(byte) bitmap_line::x1#0) goto bitmap_line::@1
|
||||
Simple Condition (bool~) bitmap_line::$12 [186] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@20
|
||||
Simple Condition (bool~) bitmap_line::$2 [191] if((byte) bitmap_line::y0#0<(byte) bitmap_line::y1#0) goto bitmap_line::@10
|
||||
Simple Condition (bool~) bitmap_line::$8 [196] if((byte) bitmap_line::yd#1<(byte) bitmap_line::xd#2) goto bitmap_line::@15
|
||||
Simple Condition (bool~) bitmap_line::$4 [201] if((byte) bitmap_line::yd#2<(byte) bitmap_line::xd#2) goto bitmap_line::@11
|
||||
Simple Condition (bool~) bitmap_line::$18 [234] if((byte) bitmap_line::yd#11<(byte) bitmap_line::xd#1) goto bitmap_line::@25
|
||||
Simple Condition (bool~) bitmap_line::$14 [239] if((byte) bitmap_line::yd#10<(byte) bitmap_line::xd#1) goto bitmap_line::@21
|
||||
Simple Condition (bool~) bitmap_line_xdyi::$4 [282] 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 [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
|
||||
|
@ -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
|
||||
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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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<x1; x++)
|
||||
cpx.z x1
|
||||
bcc __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// *screen = x
|
||||
txa
|
||||
ldy #0
|
||||
sta (screen),y
|
||||
// screen++;
|
||||
inc.z screen
|
||||
bne !+
|
||||
inc.z screen+1
|
||||
!:
|
||||
// for(byte x = x0; x<x1; x++)
|
||||
inx
|
||||
jmp __b1
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ Identical Phi Values (byte*) screen#2 (byte*) screen#10
|
||||
Identical Phi Values (byte) line::x1#2 (byte) line::x1#3
|
||||
Identical Phi Values (byte*) screen#12 (byte*) screen#2
|
||||
Successful SSA optimization Pass2IdenticalPhiElimination
|
||||
Simple Condition (bool~) line::$0 [19] if((byte) line::x#2<(byte) line::x1#3) goto line::@2
|
||||
Simple Condition (bool~) line::$0 [14] if((byte) line::x#2<(byte) line::x1#3) goto line::@2
|
||||
Successful SSA optimization Pass2ConditionalJumpSimplification
|
||||
Constant (const byte*) screen#0 = (byte*) 1024
|
||||
Constant (const byte) line::x0#0 = 1
|
||||
|
@ -6,11 +6,14 @@ main: {
|
||||
.label SCREEN = $400
|
||||
ldx #0
|
||||
__b1:
|
||||
// SCREEN[i] = (byte) sbs[i]
|
||||
lda sbs,x
|
||||
sta SCREEN,x
|
||||
// for(byte i : 0..3)
|
||||
inx
|
||||
cpx #4
|
||||
bne __b1
|
||||
// }
|
||||
rts
|
||||
sbs: .byte -1, -2, -3, -4
|
||||
}
|
||||
|
@ -5,10 +5,12 @@
|
||||
main: {
|
||||
.label getScreen1_return = 2
|
||||
.label spritePtr1_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_return
|
||||
adc #<$378
|
||||
@ -16,9 +18,11 @@ main: {
|
||||
lda.z spritePtr1_return+1
|
||||
adc #>$378
|
||||
sta.z spritePtr1_return+1
|
||||
// *spritePtr(screen) = $22
|
||||
lda #$22
|
||||
ldy #0
|
||||
sta (spritePtr1_return),y
|
||||
// }
|
||||
rts
|
||||
}
|
||||
screens: .word $400, $1400
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user