mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-27 19:50:10 +00:00
Implemented block label renumbering ensuring generated ASM labels are slightly more sensible to the reader.
This commit is contained in:
parent
126813ff4e
commit
d13ca4e03b
@ -151,7 +151,6 @@ public class Compiler {
|
||||
new Pass1GenerateControlFlowGraph(program).execute();
|
||||
new Pass1ResolveForwardReferences(program).execute();
|
||||
new Pass1UnwindBlockScopes(program).execute();
|
||||
|
||||
new Pass1TypeInference(program).execute();
|
||||
|
||||
if(getLog().isVerbosePass1CreateSsa()) {
|
||||
@ -375,6 +374,7 @@ public class Compiler {
|
||||
// Phi mem coalesce removes as many variables introduced by phi lifting as possible - as long as their live ranges do not overlap
|
||||
new Pass3PhiMemCoalesce(program).step();
|
||||
new Pass2CullEmptyBlocks(program).step();
|
||||
new PassNRenumberLabels(program).execute();
|
||||
new PassNBlockSequencePlanner(program).step();
|
||||
new Pass3AddNopBeforeCallOns(program).generate();
|
||||
new PassNStatementIndices(program).execute();
|
||||
|
@ -634,6 +634,26 @@ public abstract class ProgramValue {
|
||||
}
|
||||
}
|
||||
|
||||
public static class PhiValuePredecessor extends ProgramValue {
|
||||
private final StatementPhiBlock.PhiVariable phiVariable;
|
||||
private final int i;
|
||||
|
||||
PhiValuePredecessor(StatementPhiBlock.PhiVariable phiVariable, int i) {
|
||||
this.phiVariable = phiVariable;
|
||||
this.i = i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Value get() {
|
||||
return phiVariable.getValues().get(i).getPredecessor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(Value value) {
|
||||
phiVariable.getValues().get(i).setPredecessor((LabelRef) value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* LValue as part of an assignment statement (or a call).
|
||||
*/
|
||||
|
@ -118,6 +118,7 @@ public class ProgramValueIterator {
|
||||
for(StatementPhiBlock.PhiVariable phiVariable : ((StatementPhiBlock) statement).getPhiVariables()) {
|
||||
int size = phiVariable.getValues().size();
|
||||
for(int i = 0; i < size; i++) {
|
||||
execute(new ProgramValue.PhiValuePredecessor(phiVariable, i), handler, statement, statementsIt, block);
|
||||
execute(new ProgramValue.PhiValue(phiVariable, i), handler, statement, statementsIt, block);
|
||||
}
|
||||
execute(new ProgramValue.PhiVariable(phiVariable), handler, statement, statementsIt, block);
|
||||
|
@ -362,6 +362,14 @@ public abstract class Scope implements Symbol {
|
||||
return symbols.values();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of the counter used to number intermediate labels
|
||||
* @param intermediateLabelCount The new counter value
|
||||
*/
|
||||
public void setIntermediateLabelCount(int intermediateLabelCount) {
|
||||
this.intermediateLabelCount = intermediateLabelCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if(this == o) {
|
||||
|
@ -0,0 +1,74 @@
|
||||
package dk.camelot64.kickc.passes;
|
||||
|
||||
import dk.camelot64.kickc.model.Program;
|
||||
import dk.camelot64.kickc.model.iterator.ProgramValueIterator;
|
||||
import dk.camelot64.kickc.model.symbols.Label;
|
||||
import dk.camelot64.kickc.model.symbols.Scope;
|
||||
import dk.camelot64.kickc.model.symbols.Symbol;
|
||||
import dk.camelot64.kickc.model.values.LabelRef;
|
||||
import dk.camelot64.kickc.model.values.Value;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Renumber all labels in the program
|
||||
*/
|
||||
public class PassNRenumberLabels extends Pass2SsaOptimization {
|
||||
|
||||
public PassNRenumberLabels(Program program) {
|
||||
super(program);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean step() {
|
||||
Map<LabelRef, LabelRef> renamed = new LinkedHashMap<>();
|
||||
renumberLabels(getScope(), renamed);
|
||||
for(Scope scope : getScope().getAllScopes(true)) {
|
||||
renumberLabels(scope, renamed);
|
||||
}
|
||||
ProgramValueIterator.execute(getGraph(), (programValue, currentStmt, stmtIt, currentBlock) -> {
|
||||
Value value = programValue.get();
|
||||
if(value instanceof LabelRef) {
|
||||
LabelRef newLabelRef = renamed.get(value);
|
||||
if(newLabelRef!=null) {
|
||||
programValue.set(newLabelRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
private void renumberLabels(Scope scope, Map<LabelRef, LabelRef> renamed) {
|
||||
int labelIdx = 1;
|
||||
List<Label> oldLabels = new ArrayList<>();
|
||||
List<Label> newLabels = new ArrayList<>();
|
||||
for(Symbol symbol : scope.getAllSymbols()) {
|
||||
if(symbol instanceof Label) {
|
||||
Label oldLabel = (Label) symbol;
|
||||
if(oldLabel.isIntermediate()) {
|
||||
String newName = "@" + labelIdx++;
|
||||
if(!oldLabel.getLocalName().equals(newName)) {
|
||||
Label newLabel = new Label(newName, scope, true);
|
||||
oldLabels.add(oldLabel);
|
||||
newLabels.add(newLabel);
|
||||
renamed.put((oldLabel).getRef(), newLabel.getRef());
|
||||
getLog().append("Renumbering block "+oldLabel.getFullName()+" to "+newLabel.getFullName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for(Label oldLabel : oldLabels) {
|
||||
scope.remove(oldLabel);
|
||||
}
|
||||
for(Label newLabel : newLabels) {
|
||||
scope.add(newLabel);
|
||||
}
|
||||
scope.setIntermediateLabelCount(labelIdx);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -33,8 +33,8 @@ public class TestPrograms {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoLocalScope() throws IOException, URISyntaxException {
|
||||
compileAndCompare("localscope-loops");
|
||||
public void testLocalScopeLoops() throws IOException, URISyntaxException {
|
||||
compileAndCompare("localscope-loops", getLogSysout());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1,10 +1,9 @@
|
||||
// Illustrates introducing local scopes inside loops etc
|
||||
|
||||
import "print"
|
||||
|
||||
const byte* SCREEN = $400;
|
||||
void main() {
|
||||
for (byte i: 0..5)
|
||||
print_ln();
|
||||
SCREEN[i] = 'a';
|
||||
for (byte i: 0..5)
|
||||
print_str_ln(" xxxxx@");
|
||||
SCREEN[40+i] = 'b';
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call test
|
||||
to:main::@1
|
||||
@ -60,11 +60,11 @@ test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main
|
||||
[28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11
|
||||
[29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[]) ref#0 + (byte) test::i#11)
|
||||
[30] if(*((const byte[]) ref#0 + (byte) test::i#11)==(byte) test::a#11) goto test::@1
|
||||
to:test::@3
|
||||
test::@3: scope:[test] from test
|
||||
to:test::@2
|
||||
test::@2: scope:[test] from test
|
||||
[31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0
|
||||
to:test::@return
|
||||
test::@return: scope:[test] from test::@1 test::@3
|
||||
test::@return: scope:[test] from test::@1 test::@2
|
||||
[32] return
|
||||
to:@return
|
||||
test::@1: scope:[test] from test
|
||||
|
@ -509,8 +509,10 @@ Calls in [main] to test:5 test:7 test:9 test:11 test:13 test:15 test:17 test:19
|
||||
|
||||
Created 2 initial phi equivalence classes
|
||||
Coalesced down to 2 phi equivalence classes
|
||||
Renumbering block @2 to @1
|
||||
Renumbering block test::@3 to test::@2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@1
|
||||
@ -527,14 +529,14 @@ Adding NOP phi() at start of main::@10
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call test
|
||||
to:main::@1
|
||||
@ -587,11 +589,11 @@ test: scope:[test] from main main::@1 main::@10 main::@2 main::@3 main::@4 main
|
||||
[28] *((const byte*) screen1#0 + (byte) test::i#11) ← (byte) test::a#11
|
||||
[29] *((const byte*) screen2#0 + (byte) test::i#11) ← *((const byte[]) ref#0 + (byte) test::i#11)
|
||||
[30] if(*((const byte[]) ref#0 + (byte) test::i#11)==(byte) test::a#11) goto test::@1
|
||||
to:test::@3
|
||||
test::@3: scope:[test] from test
|
||||
to:test::@2
|
||||
test::@2: scope:[test] from test
|
||||
[31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0
|
||||
to:test::@return
|
||||
test::@return: scope:[test] from test::@1 test::@3
|
||||
test::@return: scope:[test] from test::@1 test::@2
|
||||
[32] return
|
||||
to:@return
|
||||
test::@1: scope:[test] from test
|
||||
@ -639,17 +641,17 @@ INITIAL ASM
|
||||
.label screen2 = screen1+$28
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -839,9 +841,9 @@ test: {
|
||||
lda ref,y
|
||||
cmp a
|
||||
beq b1
|
||||
jmp b3
|
||||
//SEG81 test::@3
|
||||
b3:
|
||||
jmp b2
|
||||
//SEG81 test::@2
|
||||
b2:
|
||||
//SEG82 [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 -- pbuc1_derefidx_vbuz1=vbuc2
|
||||
lda #RED
|
||||
ldy i
|
||||
@ -902,17 +904,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label screen2 = screen1+$28
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -1087,9 +1089,9 @@ test: {
|
||||
lda ref,x
|
||||
cmp a
|
||||
beq b1
|
||||
jmp b3
|
||||
//SEG81 test::@3
|
||||
b3:
|
||||
jmp b2
|
||||
//SEG81 test::@2
|
||||
b2:
|
||||
//SEG82 [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
||||
lda #RED
|
||||
sta cols,x
|
||||
@ -1108,7 +1110,7 @@ test: {
|
||||
ref: .byte 3, 4, 3, $12, 9, 1, 4, 2, 4, 5, 1, 0
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
@ -1121,13 +1123,13 @@ Removing instruction jmp b8
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b10
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b2_from_bbegin:
|
||||
Removing instruction b2:
|
||||
Removing instruction main_from_b2:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction test_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
@ -1162,7 +1164,7 @@ Removing instruction b8:
|
||||
Removing instruction b9:
|
||||
Removing instruction b10:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b3:
|
||||
Removing instruction b2:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
@ -1171,7 +1173,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte) GREEN
|
||||
@ -1202,7 +1204,7 @@ FINAL SYMBOL TABLE
|
||||
(const byte*) screen2#0 screen2 = (const byte*) screen1#0+(byte/signed byte/word/signed word/dword/signed dword) $28
|
||||
(void()) test((byte) test::i , (byte) test::a)
|
||||
(label) test::@1
|
||||
(label) test::@3
|
||||
(label) test::@2
|
||||
(label) test::@return
|
||||
(byte) test::a
|
||||
(byte) test::a#11 a zp ZP_BYTE:2 1.3333333333333333
|
||||
@ -1229,11 +1231,11 @@ Score: 199
|
||||
.const RED = 2
|
||||
.label screen2 = screen1+$28
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
//SEG5 @2
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
@ -1363,7 +1365,7 @@ test: {
|
||||
lda ref,x
|
||||
cmp a
|
||||
beq b1
|
||||
//SEG81 test::@3
|
||||
//SEG81 test::@2
|
||||
//SEG82 [31] *((const byte*) cols#0 + (byte) test::i#11) ← (const byte) RED#0 -- pbuc1_derefidx_vbuxx=vbuc2
|
||||
lda #RED
|
||||
sta cols,x
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte) GREEN
|
||||
@ -29,7 +29,7 @@
|
||||
(const byte*) screen2#0 screen2 = (const byte*) screen1#0+(byte/signed byte/word/signed word/dword/signed dword) $28
|
||||
(void()) test((byte) test::i , (byte) test::a)
|
||||
(label) test::@1
|
||||
(label) test::@3
|
||||
(label) test::@2
|
||||
(label) test::@return
|
||||
(byte) test::a
|
||||
(byte) test::a#11 a zp ZP_BYTE:2 1.3333333333333333
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
|
@ -352,21 +352,22 @@ Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Renumbering block @5 to @1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @5
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) BGCOL#0) ← (const byte) BLACK#0
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main
|
||||
@ -471,15 +472,15 @@ INITIAL ASM
|
||||
.const BLACK = 0
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
b5_from_bbegin:
|
||||
jmp b5
|
||||
//SEG5 @5
|
||||
b5:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
|
||||
bend_from_b5:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -517,15 +518,15 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.const BLACK = 0
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
b5_from_bbegin:
|
||||
jmp b5
|
||||
//SEG5 @5
|
||||
b5:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
|
||||
bend_from_b5:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -542,13 +543,13 @@ main: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b5_from_bbegin:
|
||||
Removing instruction b5:
|
||||
Removing instruction bend_from_b5:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction breturn:
|
||||
@ -560,7 +561,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -662,10 +663,10 @@ Score: 12
|
||||
// The colors of the C64
|
||||
.const BLACK = 0
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
//SEG5 @5
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
|
@ -22,14 +22,14 @@ main: {
|
||||
sta D018
|
||||
jsr init_screen
|
||||
jsr init_plot_tables
|
||||
b2:
|
||||
b1:
|
||||
lda #$ff
|
||||
cmp RASTER
|
||||
bne b2
|
||||
bne b1
|
||||
inc BGCOL
|
||||
jsr plots
|
||||
dec BGCOL
|
||||
jmp b2
|
||||
jmp b1
|
||||
}
|
||||
plots: {
|
||||
ldx #0
|
||||
@ -107,7 +107,7 @@ init_plot_tables: {
|
||||
sta yoffs
|
||||
sta yoffs+1
|
||||
tax
|
||||
b5:
|
||||
b3:
|
||||
lda #7
|
||||
sax _6
|
||||
lda yoffs
|
||||
@ -118,7 +118,7 @@ init_plot_tables: {
|
||||
txa
|
||||
and #7
|
||||
cmp #7
|
||||
bne b6
|
||||
bne b4
|
||||
clc
|
||||
lda yoffs
|
||||
adc #<$28*8
|
||||
@ -126,10 +126,10 @@ init_plot_tables: {
|
||||
lda yoffs+1
|
||||
adc #>$28*8
|
||||
sta yoffs+1
|
||||
b6:
|
||||
b4:
|
||||
inx
|
||||
cpx #0
|
||||
bne b5
|
||||
bne b3
|
||||
rts
|
||||
}
|
||||
init_screen: {
|
||||
@ -157,7 +157,7 @@ init_screen: {
|
||||
sta c
|
||||
lda #>SCREEN
|
||||
sta c+1
|
||||
b3:
|
||||
b2:
|
||||
lda #$14
|
||||
ldy #0
|
||||
sta (c),y
|
||||
@ -167,10 +167,10 @@ init_screen: {
|
||||
!:
|
||||
lda c+1
|
||||
cmp #>SCREEN+$400
|
||||
bne b3
|
||||
bne b2
|
||||
lda c
|
||||
cmp #<SCREEN+$400
|
||||
bne b3
|
||||
bne b2
|
||||
rts
|
||||
}
|
||||
plots_x: .byte $3c, $50, $6e, $50, $3c, $28, $a, $28
|
||||
|
@ -1,47 +1,47 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word/dword/signed dword) $40|((word))(const byte*) BITMAP#0/(word/signed word/dword/signed dword) $400
|
||||
[8] call init_screen
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main
|
||||
[9] phi()
|
||||
[10] call init_plot_tables
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@1 main::@3 main::@4
|
||||
[11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) $ff) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@5 main::@7
|
||||
[11] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) $ff) goto main::@2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[12] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
|
||||
[13] call plots
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@2
|
||||
[14] *((const byte*) BGCOL#0) ← -- *((const byte*) BGCOL#0)
|
||||
to:main::@2
|
||||
plots: scope:[plots] from main::@3
|
||||
to:main::@1
|
||||
plots: scope:[plots] from main::@2
|
||||
[15] phi()
|
||||
to:plots::@1
|
||||
plots::@1: scope:[plots] from plots plots::@3
|
||||
[16] (byte) plots::i#2 ← phi( plots/(byte/signed byte/word/signed word/dword/signed dword) 0 plots::@3/(byte) plots::i#1 )
|
||||
plots::@1: scope:[plots] from plots plots::@2
|
||||
[16] (byte) plots::i#2 ← phi( plots/(byte/signed byte/word/signed word/dword/signed dword) 0 plots::@2/(byte) plots::i#1 )
|
||||
[17] (byte) plot::x#0 ← *((const byte[]) plots_x#0 + (byte) plots::i#2)
|
||||
[18] (byte) plot::y#0 ← *((const byte[]) plots_y#0 + (byte) plots::i#2)
|
||||
[19] call plot
|
||||
to:plots::@3
|
||||
plots::@3: scope:[plots] from plots::@1
|
||||
to:plots::@2
|
||||
plots::@2: scope:[plots] from plots::@1
|
||||
[20] (byte) plots::i#1 ← ++ (byte) plots::i#2
|
||||
[21] if((byte) plots::i#1<(const byte) plots_cnt#0) goto plots::@1
|
||||
to:plots::@return
|
||||
plots::@return: scope:[plots] from plots::@3
|
||||
plots::@return: scope:[plots] from plots::@2
|
||||
[22] return
|
||||
to:@return
|
||||
plot: scope:[plot] from plots::@1
|
||||
@ -60,7 +60,7 @@ plot: scope:[plot] from plots::@1
|
||||
plot::@return: scope:[plot] from plot
|
||||
[34] return
|
||||
to:@return
|
||||
init_plot_tables: scope:[init_plot_tables] from main::@5
|
||||
init_plot_tables: scope:[init_plot_tables] from main::@3
|
||||
[35] phi()
|
||||
to:init_plot_tables::@1
|
||||
init_plot_tables::@1: scope:[init_plot_tables] from init_plot_tables init_plot_tables::@2
|
||||
@ -71,16 +71,16 @@ init_plot_tables::@1: scope:[init_plot_tables] from init_plot_tables init_plot_
|
||||
[39] *((const byte[$100]) plot_xhi#0 + (byte) init_plot_tables::x#2) ← >(const byte*) BITMAP#0
|
||||
[40] *((const byte[$100]) plot_bit#0 + (byte) init_plot_tables::x#2) ← (byte) init_plot_tables::bits#3
|
||||
[41] (byte) init_plot_tables::bits#1 ← (byte) init_plot_tables::bits#3 >> (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[42] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@10
|
||||
[42] if((byte) init_plot_tables::bits#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@6
|
||||
to:init_plot_tables::@2
|
||||
init_plot_tables::@2: scope:[init_plot_tables] from init_plot_tables::@1 init_plot_tables::@10
|
||||
[43] (byte) init_plot_tables::bits#4 ← phi( init_plot_tables::@10/(byte) init_plot_tables::bits#1 init_plot_tables::@1/(byte/word/signed word/dword/signed dword) $80 )
|
||||
init_plot_tables::@2: scope:[init_plot_tables] from init_plot_tables::@1 init_plot_tables::@6
|
||||
[43] (byte) init_plot_tables::bits#4 ← phi( init_plot_tables::@6/(byte) init_plot_tables::bits#1 init_plot_tables::@1/(byte/word/signed word/dword/signed dword) $80 )
|
||||
[44] (byte) init_plot_tables::x#1 ← ++ (byte) init_plot_tables::x#2
|
||||
[45] if((byte) init_plot_tables::x#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@1
|
||||
to:init_plot_tables::@5
|
||||
init_plot_tables::@5: scope:[init_plot_tables] from init_plot_tables::@2 init_plot_tables::@6
|
||||
[46] (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@2/((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 init_plot_tables::@6/(byte*) init_plot_tables::yoffs#4 )
|
||||
[46] (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 init_plot_tables::@6/(byte) init_plot_tables::y#1 )
|
||||
to:init_plot_tables::@3
|
||||
init_plot_tables::@3: scope:[init_plot_tables] from init_plot_tables::@2 init_plot_tables::@4
|
||||
[46] (byte*) init_plot_tables::yoffs#2 ← phi( init_plot_tables::@2/((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 init_plot_tables::@4/(byte*) init_plot_tables::yoffs#4 )
|
||||
[46] (byte) init_plot_tables::y#2 ← phi( init_plot_tables::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 init_plot_tables::@4/(byte) init_plot_tables::y#1 )
|
||||
[47] (byte~) init_plot_tables::$6 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
[48] (byte~) init_plot_tables::$7 ← < (byte*) init_plot_tables::yoffs#2
|
||||
[49] (byte~) init_plot_tables::$8 ← (byte~) init_plot_tables::$6 | (byte~) init_plot_tables::$7
|
||||
@ -88,20 +88,20 @@ init_plot_tables::@5: scope:[init_plot_tables] from init_plot_tables::@2 init_p
|
||||
[51] (byte~) init_plot_tables::$9 ← > (byte*) init_plot_tables::yoffs#2
|
||||
[52] *((const byte[$100]) plot_yhi#0 + (byte) init_plot_tables::y#2) ← (byte~) init_plot_tables::$9
|
||||
[53] (byte~) init_plot_tables::$10 ← (byte) init_plot_tables::y#2 & (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
[54] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@6
|
||||
to:init_plot_tables::@7
|
||||
init_plot_tables::@7: scope:[init_plot_tables] from init_plot_tables::@5
|
||||
[54] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word/dword/signed dword) 7) goto init_plot_tables::@4
|
||||
to:init_plot_tables::@5
|
||||
init_plot_tables::@5: scope:[init_plot_tables] from init_plot_tables::@3
|
||||
[55] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (byte/signed byte/word/signed word/dword/signed dword) $28*(byte/signed byte/word/signed word/dword/signed dword) 8
|
||||
to:init_plot_tables::@6
|
||||
init_plot_tables::@6: scope:[init_plot_tables] from init_plot_tables::@5 init_plot_tables::@7
|
||||
[56] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@5/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@7/(byte*) init_plot_tables::yoffs#1 )
|
||||
to:init_plot_tables::@4
|
||||
init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@3 init_plot_tables::@5
|
||||
[56] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@5/(byte*) init_plot_tables::yoffs#1 )
|
||||
[57] (byte) init_plot_tables::y#1 ← ++ (byte) init_plot_tables::y#2
|
||||
[58] if((byte) init_plot_tables::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@5
|
||||
[58] if((byte) init_plot_tables::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto init_plot_tables::@3
|
||||
to:init_plot_tables::@return
|
||||
init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@6
|
||||
init_plot_tables::@return: scope:[init_plot_tables] from init_plot_tables::@4
|
||||
[59] return
|
||||
to:@return
|
||||
init_plot_tables::@10: scope:[init_plot_tables] from init_plot_tables::@1
|
||||
init_plot_tables::@6: scope:[init_plot_tables] from init_plot_tables::@1
|
||||
[60] phi()
|
||||
to:init_plot_tables::@2
|
||||
init_screen: scope:[init_screen] from main
|
||||
@ -112,13 +112,13 @@ init_screen::@1: scope:[init_screen] from init_screen init_screen::@1
|
||||
[63] *((byte*) init_screen::b#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[64] (byte*) init_screen::b#1 ← ++ (byte*) init_screen::b#2
|
||||
[65] if((byte*) init_screen::b#1!=(const byte*) BITMAP#0+(word/signed word/dword/signed dword) $2000) goto init_screen::@1
|
||||
to:init_screen::@3
|
||||
init_screen::@3: scope:[init_screen] from init_screen::@1 init_screen::@3
|
||||
[66] (byte*) init_screen::c#2 ← phi( init_screen::@1/(const byte*) SCREEN#0 init_screen::@3/(byte*) init_screen::c#1 )
|
||||
to:init_screen::@2
|
||||
init_screen::@2: scope:[init_screen] from init_screen::@1 init_screen::@2
|
||||
[66] (byte*) init_screen::c#2 ← phi( init_screen::@1/(const byte*) SCREEN#0 init_screen::@2/(byte*) init_screen::c#1 )
|
||||
[67] *((byte*) init_screen::c#2) ← (byte/signed byte/word/signed word/dword/signed dword) $14
|
||||
[68] (byte*) init_screen::c#1 ← ++ (byte*) init_screen::c#2
|
||||
[69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) $400) goto init_screen::@3
|
||||
[69] if((byte*) init_screen::c#1!=(const byte*) SCREEN#0+(word/signed word/dword/signed dword) $400) goto init_screen::@2
|
||||
to:init_screen::@return
|
||||
init_screen::@return: scope:[init_screen] from init_screen::@3
|
||||
init_screen::@return: scope:[init_screen] from init_screen::@2
|
||||
[70] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -35,11 +35,11 @@
|
||||
(byte~) init_plot_tables::$8 reg byte a 22.0
|
||||
(byte~) init_plot_tables::$9 reg byte a 22.0
|
||||
(label) init_plot_tables::@1
|
||||
(label) init_plot_tables::@10
|
||||
(label) init_plot_tables::@2
|
||||
(label) init_plot_tables::@3
|
||||
(label) init_plot_tables::@4
|
||||
(label) init_plot_tables::@5
|
||||
(label) init_plot_tables::@6
|
||||
(label) init_plot_tables::@7
|
||||
(label) init_plot_tables::@return
|
||||
(byte) init_plot_tables::bits
|
||||
(byte) init_plot_tables::bits#1 reg byte y 11.0
|
||||
@ -57,7 +57,7 @@
|
||||
(byte*) init_plot_tables::yoffs#4 yoffs zp ZP_WORD:2 11.0
|
||||
(void()) init_screen()
|
||||
(label) init_screen::@1
|
||||
(label) init_screen::@3
|
||||
(label) init_screen::@2
|
||||
(label) init_screen::@return
|
||||
(byte*) init_screen::b
|
||||
(byte*) init_screen::b#1 b zp ZP_WORD:2 16.5
|
||||
@ -66,10 +66,10 @@
|
||||
(byte*) init_screen::c#1 c zp ZP_WORD:2 16.5
|
||||
(byte*) init_screen::c#2 c zp ZP_WORD:2 16.5
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@5
|
||||
(label) main::@7
|
||||
(label) main::@4
|
||||
(void()) plot((byte) plot::x , (byte) plot::y)
|
||||
(byte~) plot::$5 reg byte a 4.0
|
||||
(byte~) plot::$6 reg byte a 4.0
|
||||
@ -101,7 +101,7 @@
|
||||
(const byte[$100]) plot_ylo#0 plot_ylo = { fill( $100, 0) }
|
||||
(void()) plots()
|
||||
(label) plots::@1
|
||||
(label) plots::@3
|
||||
(label) plots::@2
|
||||
(label) plots::@return
|
||||
(byte) plots::i
|
||||
(byte) plots::i#1 reg byte x 151.5
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@4
|
||||
@4: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @4
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @4
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call bool_const_if
|
||||
to:main::@1
|
||||
@ -33,11 +33,11 @@ bool_const_inline::@return: scope:[bool_const_inline] from bool_const_inline::@
|
||||
to:@return
|
||||
bool_const_vars: scope:[bool_const_vars] from main::@1
|
||||
[14] phi()
|
||||
to:bool_const_vars::@3
|
||||
bool_const_vars::@3: scope:[bool_const_vars] from bool_const_vars
|
||||
to:bool_const_vars::@1
|
||||
bool_const_vars::@1: scope:[bool_const_vars] from bool_const_vars
|
||||
[15] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) 'f'
|
||||
to:bool_const_vars::@return
|
||||
bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@3
|
||||
bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@1
|
||||
[16] return
|
||||
to:@return
|
||||
bool_const_if: scope:[bool_const_if] from main
|
||||
|
@ -236,8 +236,10 @@ Calls in [main] to bool_const_if:5 bool_const_vars:7 bool_const_inline:9
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Renumbering block @4 to @1
|
||||
Renumbering block bool_const_vars::@3 to bool_const_vars::@1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @4
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@1
|
||||
@ -249,14 +251,14 @@ Adding NOP phi() at start of bool_const_if
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@4
|
||||
@4: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @4
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @4
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call bool_const_if
|
||||
to:main::@1
|
||||
@ -282,11 +284,11 @@ bool_const_inline::@return: scope:[bool_const_inline] from bool_const_inline::@
|
||||
to:@return
|
||||
bool_const_vars: scope:[bool_const_vars] from main::@1
|
||||
[14] phi()
|
||||
to:bool_const_vars::@3
|
||||
bool_const_vars::@3: scope:[bool_const_vars] from bool_const_vars
|
||||
to:bool_const_vars::@1
|
||||
bool_const_vars::@1: scope:[bool_const_vars] from bool_const_vars
|
||||
[15] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) 'f'
|
||||
to:bool_const_vars::@return
|
||||
bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@3
|
||||
bool_const_vars::@return: scope:[bool_const_vars] from bool_const_vars::@1
|
||||
[16] return
|
||||
to:@return
|
||||
bool_const_if: scope:[bool_const_if] from main
|
||||
@ -327,17 +329,17 @@ INITIAL ASM
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @4 [phi:@begin->@4]
|
||||
b4_from_bbegin:
|
||||
jmp b4
|
||||
//SEG5 @4
|
||||
b4:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @4 to main [phi:@4->main]
|
||||
main_from_b4:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @4 to @end [phi:@4->@end]
|
||||
bend_from_b4:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -389,9 +391,9 @@ bool_const_inline: {
|
||||
//SEG28 bool_const_vars
|
||||
// A bunch of constant boolean vars (used in an if)
|
||||
bool_const_vars: {
|
||||
jmp b3
|
||||
//SEG29 bool_const_vars::@3
|
||||
b3:
|
||||
jmp b1
|
||||
//SEG29 bool_const_vars::@1
|
||||
b1:
|
||||
//SEG30 [15] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) 'f' -- _deref_pbuc1=vbuc2
|
||||
lda #'f'
|
||||
sta SCREEN+1
|
||||
@ -446,17 +448,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @4 [phi:@begin->@4]
|
||||
b4_from_bbegin:
|
||||
jmp b4
|
||||
//SEG5 @4
|
||||
b4:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @4 to main [phi:@4->main]
|
||||
main_from_b4:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @4 to @end [phi:@4->@end]
|
||||
bend_from_b4:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -508,9 +510,9 @@ bool_const_inline: {
|
||||
//SEG28 bool_const_vars
|
||||
// A bunch of constant boolean vars (used in an if)
|
||||
bool_const_vars: {
|
||||
jmp b3
|
||||
//SEG29 bool_const_vars::@3
|
||||
b3:
|
||||
jmp b1
|
||||
//SEG29 bool_const_vars::@1
|
||||
b1:
|
||||
//SEG30 [15] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) 'f' -- _deref_pbuc1=vbuc2
|
||||
lda #'f'
|
||||
sta SCREEN+1
|
||||
@ -537,22 +539,22 @@ bool_const_if: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b4_from_bbegin:
|
||||
Removing instruction b4:
|
||||
Removing instruction main_from_b4:
|
||||
Removing instruction bend_from_b4:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction bool_const_vars_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
@ -565,7 +567,7 @@ Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b3:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
@ -577,7 +579,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @4
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
@ -591,7 +593,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_const_inline::@return
|
||||
(byte) bool_const_inline::a
|
||||
(void()) bool_const_vars()
|
||||
(label) bool_const_vars::@3
|
||||
(label) bool_const_vars::@1
|
||||
(label) bool_const_vars::@return
|
||||
(byte) bool_const_vars::a
|
||||
(bool) bool_const_vars::b
|
||||
@ -616,11 +618,11 @@ Score: 60
|
||||
//SEG2 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @4 [phi:@begin->@4]
|
||||
//SEG5 @4
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @4 to main [phi:@4->main]
|
||||
//SEG8 [3] phi from @4 to @end [phi:@4->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
@ -655,7 +657,7 @@ bool_const_inline: {
|
||||
//SEG28 bool_const_vars
|
||||
// A bunch of constant boolean vars (used in an if)
|
||||
bool_const_vars: {
|
||||
//SEG29 bool_const_vars::@3
|
||||
//SEG29 bool_const_vars::@1
|
||||
//SEG30 [15] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) 'f' -- _deref_pbuc1=vbuc2
|
||||
lda #'f'
|
||||
sta SCREEN+1
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @4
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
@ -12,7 +12,7 @@
|
||||
(label) bool_const_inline::@return
|
||||
(byte) bool_const_inline::a
|
||||
(void()) bool_const_vars()
|
||||
(label) bool_const_vars::@3
|
||||
(label) bool_const_vars::@1
|
||||
(label) bool_const_vars::@return
|
||||
(byte) bool_const_vars::a
|
||||
(bool) bool_const_vars::b
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
@ -17,12 +17,12 @@ main::@1: scope:[main] from main main::@3
|
||||
[8] (byte) isSet::i#0 ← (byte) main::i#2
|
||||
[9] call isSet
|
||||
[10] (bool) isSet::return#0 ← (bool) isSet::return#1
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@1
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@1
|
||||
[11] (bool~) main::$2 ← (bool) isSet::return#0
|
||||
[12] if((bool~) main::$2) goto main::@2
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@7
|
||||
main::@4: scope:[main] from main::@5
|
||||
[13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' '
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@4
|
||||
@ -32,7 +32,7 @@ main::@3: scope:[main] from main::@2 main::@4
|
||||
main::@return: scope:[main] from main::@3
|
||||
[16] return
|
||||
to:@return
|
||||
main::@2: scope:[main] from main::@7
|
||||
main::@2: scope:[main] from main::@5
|
||||
[17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*'
|
||||
to:main::@3
|
||||
isSet: scope:[isSet] from main::@1
|
||||
|
@ -138,22 +138,24 @@ Created 1 initial phi equivalence classes
|
||||
Coalesced [17] main::i#7 ← main::i#1
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Culled Empty Block (label) main::@8
|
||||
Renumbering block @2 to @1
|
||||
Renumbering block main::@7 to main::@5
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
@ -163,12 +165,12 @@ main::@1: scope:[main] from main main::@3
|
||||
[8] (byte) isSet::i#0 ← (byte) main::i#2
|
||||
[9] call isSet
|
||||
[10] (bool) isSet::return#0 ← (bool) isSet::return#1
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@1
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@1
|
||||
[11] (bool~) main::$2 ← (bool) isSet::return#0
|
||||
[12] if((bool~) main::$2) goto main::@2
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@7
|
||||
main::@4: scope:[main] from main::@5
|
||||
[13] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) ' '
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@4
|
||||
@ -178,7 +180,7 @@ main::@3: scope:[main] from main::@2 main::@4
|
||||
main::@return: scope:[main] from main::@3
|
||||
[16] return
|
||||
to:@return
|
||||
main::@2: scope:[main] from main::@7
|
||||
main::@2: scope:[main] from main::@5
|
||||
[17] *((const byte*) main::screen#0 + (byte) main::i#2) ← (byte) '*'
|
||||
to:main::@3
|
||||
isSet: scope:[isSet] from main::@1
|
||||
@ -250,17 +252,17 @@ INITIAL ASM
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -302,9 +304,9 @@ main: {
|
||||
//SEG20 [10] (bool) isSet::return#0 ← (bool) isSet::return#1 -- vboz1=vboz2
|
||||
lda isSet.return_1
|
||||
sta isSet.return
|
||||
jmp b7
|
||||
//SEG21 main::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG21 main::@5
|
||||
b5:
|
||||
//SEG22 [11] (bool~) main::$2 ← (bool) isSet::return#0 -- vboz1=vboz2
|
||||
lda isSet.return
|
||||
sta _2
|
||||
@ -419,17 +421,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -461,9 +463,9 @@ main: {
|
||||
//SEG19 [9] call isSet
|
||||
jsr isSet
|
||||
//SEG20 [10] (bool) isSet::return#0 ← (bool) isSet::return#1
|
||||
jmp b7
|
||||
//SEG21 main::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG21 main::@5
|
||||
b5:
|
||||
//SEG22 [11] (bool~) main::$2 ← (bool) isSet::return#0
|
||||
//SEG23 [12] if((bool~) main::$2) goto main::@2 -- vboaa_then_la1
|
||||
cmp #0
|
||||
@ -518,25 +520,25 @@ isSet: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1_from_b3 with b1
|
||||
Removing instruction b2_from_bbegin:
|
||||
Removing instruction b2:
|
||||
Removing instruction main_from_b2:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_b3:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction b7:
|
||||
Removing instruction b5:
|
||||
Removing instruction b4:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
@ -550,7 +552,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(bool()) isSet((byte) isSet::i , (bool) isSet::b)
|
||||
@ -571,7 +573,7 @@ FINAL SYMBOL TABLE
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@7
|
||||
(label) main::@5
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
@ -601,11 +603,11 @@ Score: 540
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
//SEG5 @2
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
@ -631,7 +633,7 @@ main: {
|
||||
//SEG19 [9] call isSet
|
||||
jsr isSet
|
||||
//SEG20 [10] (bool) isSet::return#0 ← (bool) isSet::return#1
|
||||
//SEG21 main::@7
|
||||
//SEG21 main::@5
|
||||
//SEG22 [11] (bool~) main::$2 ← (bool) isSet::return#0
|
||||
//SEG23 [12] if((bool~) main::$2) goto main::@2 -- vboaa_then_la1
|
||||
cmp #0
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(bool()) isSet((byte) isSet::i , (bool) isSet::b)
|
||||
@ -19,7 +19,7 @@
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@7
|
||||
(label) main::@5
|
||||
(label) main::@return
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
|
@ -19,8 +19,8 @@ bool_complex: {
|
||||
tya
|
||||
and #1
|
||||
cpy #$a
|
||||
bcc b8
|
||||
b7:
|
||||
bcc b6
|
||||
b5:
|
||||
cpy #$a
|
||||
bcc b4
|
||||
cmp #0
|
||||
@ -37,10 +37,10 @@ bool_complex: {
|
||||
lda #' '
|
||||
sta screen,y
|
||||
jmp b3
|
||||
b8:
|
||||
b6:
|
||||
cpx #0
|
||||
beq b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
bool_not: {
|
||||
.label screen = $450
|
||||
@ -93,7 +93,7 @@ bool_and: {
|
||||
txa
|
||||
and #1
|
||||
cpx #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
b4:
|
||||
lda #' '
|
||||
sta screen,x
|
||||
@ -102,7 +102,7 @@ bool_and: {
|
||||
cpx #$15
|
||||
bne b1
|
||||
rts
|
||||
b7:
|
||||
b5:
|
||||
cmp #0
|
||||
beq b2
|
||||
jmp b4
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call bool_and
|
||||
to:main::@1
|
||||
@ -33,15 +33,15 @@ bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
|
||||
[14] (byte) bool_complex::i#2 ← phi( bool_complex/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_complex::@3/(byte) bool_complex::i#1 )
|
||||
[15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@8
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8
|
||||
[17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@6
|
||||
to:bool_complex::@5
|
||||
bool_complex::@5: scope:[bool_complex] from bool_complex::@1 bool_complex::@6
|
||||
[18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@4
|
||||
to:bool_complex::@9
|
||||
bool_complex::@9: scope:[bool_complex] from bool_complex::@7
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@5
|
||||
[19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4
|
||||
to:bool_complex::@2
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@6 bool_complex::@7
|
||||
[20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*'
|
||||
to:bool_complex::@3
|
||||
bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
@ -51,12 +51,12 @@ bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
bool_complex::@return: scope:[bool_complex] from bool_complex::@3
|
||||
[23] return
|
||||
to:@return
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7
|
||||
[24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' '
|
||||
to:bool_complex::@3
|
||||
bool_complex::@8: scope:[bool_complex] from bool_complex::@1
|
||||
bool_complex::@6: scope:[bool_complex] from bool_complex::@1
|
||||
[25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2
|
||||
to:bool_complex::@7
|
||||
to:bool_complex::@5
|
||||
bool_not: scope:[bool_not] from main::@2
|
||||
[26] phi()
|
||||
to:bool_not::@1
|
||||
@ -64,11 +64,11 @@ bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
|
||||
[27] (byte) bool_not::i#2 ← phi( bool_not/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_not::@3/(byte) bool_not::i#1 )
|
||||
[28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4
|
||||
to:bool_not::@7
|
||||
bool_not::@7: scope:[bool_not] from bool_not::@1
|
||||
to:bool_not::@5
|
||||
bool_not::@5: scope:[bool_not] from bool_not::@1
|
||||
[30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4
|
||||
to:bool_not::@2
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@7
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@5
|
||||
[31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*'
|
||||
to:bool_not::@3
|
||||
bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
@ -78,7 +78,7 @@ bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
bool_not::@return: scope:[bool_not] from bool_not::@3
|
||||
[34] return
|
||||
to:@return
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5
|
||||
[35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' '
|
||||
to:bool_not::@3
|
||||
bool_or: scope:[bool_or] from main::@1
|
||||
@ -88,11 +88,11 @@ bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
|
||||
[37] (byte) bool_or::i#2 ← phi( bool_or/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_or::@3/(byte) bool_or::i#1 )
|
||||
[38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2
|
||||
to:bool_or::@7
|
||||
bool_or::@7: scope:[bool_or] from bool_or::@1
|
||||
to:bool_or::@5
|
||||
bool_or::@5: scope:[bool_or] from bool_or::@1
|
||||
[40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2
|
||||
to:bool_or::@4
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@7
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@5
|
||||
[41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' '
|
||||
to:bool_or::@3
|
||||
bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
@ -102,7 +102,7 @@ bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
bool_or::@return: scope:[bool_or] from bool_or::@3
|
||||
[44] return
|
||||
to:@return
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5
|
||||
[45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*'
|
||||
to:bool_or::@3
|
||||
bool_and: scope:[bool_and] from main
|
||||
@ -111,9 +111,9 @@ bool_and: scope:[bool_and] from main
|
||||
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
|
||||
[47] (byte) bool_and::i#2 ← phi( bool_and/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_and::@3/(byte) bool_and::i#1 )
|
||||
[48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7
|
||||
[49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5
|
||||
to:bool_and::@4
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5
|
||||
[50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' '
|
||||
to:bool_and::@3
|
||||
bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
@ -123,9 +123,9 @@ bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
bool_and::@return: scope:[bool_and] from bool_and::@3
|
||||
[53] return
|
||||
to:@return
|
||||
bool_and::@7: scope:[bool_and] from bool_and::@1
|
||||
bool_and::@5: scope:[bool_and] from bool_and::@1
|
||||
[54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2
|
||||
to:bool_and::@4
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@7
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@5
|
||||
[55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*'
|
||||
to:bool_and::@3
|
||||
|
@ -348,8 +348,15 @@ Culled Empty Block (label) bool_complex::@10
|
||||
Culled Empty Block (label) bool_not::@8
|
||||
Culled Empty Block (label) bool_or::@8
|
||||
Culled Empty Block (label) bool_and::@8
|
||||
Renumbering block @5 to @1
|
||||
Renumbering block bool_and::@7 to bool_and::@5
|
||||
Renumbering block bool_or::@7 to bool_or::@5
|
||||
Renumbering block bool_not::@7 to bool_not::@5
|
||||
Renumbering block bool_complex::@7 to bool_complex::@5
|
||||
Renumbering block bool_complex::@8 to bool_complex::@6
|
||||
Renumbering block bool_complex::@9 to bool_complex::@7
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @5
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@1
|
||||
@ -363,14 +370,14 @@ Adding NOP phi() at start of bool_and
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call bool_and
|
||||
to:main::@1
|
||||
@ -396,15 +403,15 @@ bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
|
||||
[14] (byte) bool_complex::i#2 ← phi( bool_complex/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_complex::@3/(byte) bool_complex::i#1 )
|
||||
[15] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@8
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8
|
||||
[17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@6
|
||||
to:bool_complex::@5
|
||||
bool_complex::@5: scope:[bool_complex] from bool_complex::@1 bool_complex::@6
|
||||
[18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@4
|
||||
to:bool_complex::@9
|
||||
bool_complex::@9: scope:[bool_complex] from bool_complex::@7
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@5
|
||||
[19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4
|
||||
to:bool_complex::@2
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@6 bool_complex::@7
|
||||
[20] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*'
|
||||
to:bool_complex::@3
|
||||
bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
@ -414,12 +421,12 @@ bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
bool_complex::@return: scope:[bool_complex] from bool_complex::@3
|
||||
[23] return
|
||||
to:@return
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7
|
||||
[24] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' '
|
||||
to:bool_complex::@3
|
||||
bool_complex::@8: scope:[bool_complex] from bool_complex::@1
|
||||
bool_complex::@6: scope:[bool_complex] from bool_complex::@1
|
||||
[25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2
|
||||
to:bool_complex::@7
|
||||
to:bool_complex::@5
|
||||
bool_not: scope:[bool_not] from main::@2
|
||||
[26] phi()
|
||||
to:bool_not::@1
|
||||
@ -427,11 +434,11 @@ bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
|
||||
[27] (byte) bool_not::i#2 ← phi( bool_not/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_not::@3/(byte) bool_not::i#1 )
|
||||
[28] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4
|
||||
to:bool_not::@7
|
||||
bool_not::@7: scope:[bool_not] from bool_not::@1
|
||||
to:bool_not::@5
|
||||
bool_not::@5: scope:[bool_not] from bool_not::@1
|
||||
[30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4
|
||||
to:bool_not::@2
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@7
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@5
|
||||
[31] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*'
|
||||
to:bool_not::@3
|
||||
bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
@ -441,7 +448,7 @@ bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
bool_not::@return: scope:[bool_not] from bool_not::@3
|
||||
[34] return
|
||||
to:@return
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5
|
||||
[35] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' '
|
||||
to:bool_not::@3
|
||||
bool_or: scope:[bool_or] from main::@1
|
||||
@ -451,11 +458,11 @@ bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
|
||||
[37] (byte) bool_or::i#2 ← phi( bool_or/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_or::@3/(byte) bool_or::i#1 )
|
||||
[38] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2
|
||||
to:bool_or::@7
|
||||
bool_or::@7: scope:[bool_or] from bool_or::@1
|
||||
to:bool_or::@5
|
||||
bool_or::@5: scope:[bool_or] from bool_or::@1
|
||||
[40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2
|
||||
to:bool_or::@4
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@7
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@5
|
||||
[41] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' '
|
||||
to:bool_or::@3
|
||||
bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
@ -465,7 +472,7 @@ bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
bool_or::@return: scope:[bool_or] from bool_or::@3
|
||||
[44] return
|
||||
to:@return
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5
|
||||
[45] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*'
|
||||
to:bool_or::@3
|
||||
bool_and: scope:[bool_and] from main
|
||||
@ -474,9 +481,9 @@ bool_and: scope:[bool_and] from main
|
||||
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
|
||||
[47] (byte) bool_and::i#2 ← phi( bool_and/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_and::@3/(byte) bool_and::i#1 )
|
||||
[48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7
|
||||
[49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5
|
||||
to:bool_and::@4
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5
|
||||
[50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' '
|
||||
to:bool_and::@3
|
||||
bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
@ -486,10 +493,10 @@ bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
bool_and::@return: scope:[bool_and] from bool_and::@3
|
||||
[53] return
|
||||
to:@return
|
||||
bool_and::@7: scope:[bool_and] from bool_and::@1
|
||||
bool_and::@5: scope:[bool_and] from bool_and::@1
|
||||
[54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2
|
||||
to:bool_and::@4
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@7
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@5
|
||||
[55] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*'
|
||||
to:bool_and::@3
|
||||
|
||||
@ -562,17 +569,17 @@ INITIAL ASM
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
b5_from_bbegin:
|
||||
jmp b5
|
||||
//SEG5 @5
|
||||
b5:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @5 to main [phi:@5->main]
|
||||
main_from_b5:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
|
||||
bend_from_b5:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -641,20 +648,20 @@ bool_complex: {
|
||||
lda #1
|
||||
and i
|
||||
sta _5
|
||||
//SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@8 -- vbuz1_lt_vbuc1_then_la1
|
||||
//SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@6 -- vbuz1_lt_vbuc1_then_la1
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b8
|
||||
jmp b7
|
||||
//SEG36 bool_complex::@7
|
||||
b7:
|
||||
bcc b6
|
||||
jmp b5
|
||||
//SEG36 bool_complex::@5
|
||||
b5:
|
||||
//SEG37 [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@4 -- vbuz1_lt_vbuc1_then_la1
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b4
|
||||
jmp b9
|
||||
//SEG38 bool_complex::@9
|
||||
b9:
|
||||
jmp b7
|
||||
//SEG38 bool_complex::@7
|
||||
b7:
|
||||
//SEG39 [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 -- vbuz1_eq_0_then_la1
|
||||
lda _5
|
||||
cmp #0
|
||||
@ -687,13 +694,13 @@ bool_complex: {
|
||||
ldy i
|
||||
sta screen,y
|
||||
jmp b3
|
||||
//SEG49 bool_complex::@8
|
||||
b8:
|
||||
//SEG49 bool_complex::@6
|
||||
b6:
|
||||
//SEG50 [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
beq b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
//SEG51 bool_not
|
||||
bool_not: {
|
||||
@ -720,9 +727,9 @@ bool_not: {
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b4
|
||||
jmp b7
|
||||
//SEG59 bool_not::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG59 bool_not::@5
|
||||
b5:
|
||||
//SEG60 [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
@ -781,9 +788,9 @@ bool_or: {
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b2
|
||||
jmp b7
|
||||
//SEG78 bool_or::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG78 bool_or::@5
|
||||
b5:
|
||||
//SEG79 [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
@ -838,10 +845,10 @@ bool_and: {
|
||||
lda #1
|
||||
and i
|
||||
sta _1
|
||||
//SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7 -- vbuz1_lt_vbuc1_then_la1
|
||||
//SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5 -- vbuz1_lt_vbuc1_then_la1
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
jmp b4
|
||||
//SEG97 bool_and::@4
|
||||
b4:
|
||||
@ -863,8 +870,8 @@ bool_and: {
|
||||
breturn:
|
||||
//SEG103 [53] return
|
||||
rts
|
||||
//SEG104 bool_and::@7
|
||||
b7:
|
||||
//SEG104 bool_and::@5
|
||||
b5:
|
||||
//SEG105 [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
@ -954,17 +961,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
b5_from_bbegin:
|
||||
jmp b5
|
||||
//SEG5 @5
|
||||
b5:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @5 to main [phi:@5->main]
|
||||
main_from_b5:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
|
||||
bend_from_b5:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -1028,18 +1035,18 @@ bool_complex: {
|
||||
//SEG34 [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuyy_band_vbuc1
|
||||
tya
|
||||
and #1
|
||||
//SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@8 -- vbuyy_lt_vbuc1_then_la1
|
||||
//SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@6 -- vbuyy_lt_vbuc1_then_la1
|
||||
cpy #$a
|
||||
bcc b8
|
||||
jmp b7
|
||||
//SEG36 bool_complex::@7
|
||||
b7:
|
||||
bcc b6
|
||||
jmp b5
|
||||
//SEG36 bool_complex::@5
|
||||
b5:
|
||||
//SEG37 [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@4 -- vbuyy_lt_vbuc1_then_la1
|
||||
cpy #$a
|
||||
bcc b4
|
||||
jmp b9
|
||||
//SEG38 bool_complex::@9
|
||||
b9:
|
||||
jmp b7
|
||||
//SEG38 bool_complex::@7
|
||||
b7:
|
||||
//SEG39 [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b4
|
||||
@ -1068,12 +1075,12 @@ bool_complex: {
|
||||
lda #' '
|
||||
sta screen,y
|
||||
jmp b3
|
||||
//SEG49 bool_complex::@8
|
||||
b8:
|
||||
//SEG49 bool_complex::@6
|
||||
b6:
|
||||
//SEG50 [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -- vbuxx_eq_0_then_la1
|
||||
cpx #0
|
||||
beq b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
//SEG51 bool_not
|
||||
bool_not: {
|
||||
@ -1095,9 +1102,9 @@ bool_not: {
|
||||
//SEG58 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b4
|
||||
jmp b7
|
||||
//SEG59 bool_not::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG59 bool_not::@5
|
||||
b5:
|
||||
//SEG60 [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b4
|
||||
@ -1147,9 +1154,9 @@ bool_or: {
|
||||
//SEG77 [39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b2
|
||||
jmp b7
|
||||
//SEG78 bool_or::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG78 bool_or::@5
|
||||
b5:
|
||||
//SEG79 [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
@ -1196,9 +1203,9 @@ bool_and: {
|
||||
//SEG95 [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1
|
||||
txa
|
||||
and #1
|
||||
//SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7 -- vbuxx_lt_vbuc1_then_la1
|
||||
//SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
jmp b4
|
||||
//SEG97 bool_and::@4
|
||||
b4:
|
||||
@ -1218,8 +1225,8 @@ bool_and: {
|
||||
breturn:
|
||||
//SEG103 [53] return
|
||||
rts
|
||||
//SEG104 bool_and::@7
|
||||
b7:
|
||||
//SEG104 bool_and::@5
|
||||
b5:
|
||||
//SEG105 [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
@ -1233,25 +1240,25 @@ bool_and: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
@ -1264,10 +1271,10 @@ Replacing label b1_from_b3 with b1
|
||||
Replacing label b1_from_b3 with b1
|
||||
Replacing label b1_from_b3 with b1
|
||||
Replacing label b1_from_b3 with b1
|
||||
Removing instruction b5_from_bbegin:
|
||||
Removing instruction b5:
|
||||
Removing instruction main_from_b5:
|
||||
Removing instruction bend_from_b5:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction bool_or_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
@ -1286,14 +1293,14 @@ Removing instruction b2:
|
||||
Removing instruction b3:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_complex:
|
||||
Removing instruction b9:
|
||||
Removing instruction b7:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_not:
|
||||
Removing instruction b7:
|
||||
Removing instruction b5:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_or:
|
||||
Removing instruction b7:
|
||||
Removing instruction b5:
|
||||
Removing instruction b4:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_and:
|
||||
@ -1311,7 +1318,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) bool_and()
|
||||
@ -1320,7 +1327,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_and::@2
|
||||
(label) bool_and::@3
|
||||
(label) bool_and::@4
|
||||
(label) bool_and::@7
|
||||
(label) bool_and::@5
|
||||
(label) bool_and::@return
|
||||
(byte) bool_and::i
|
||||
(byte) bool_and::i#1 reg byte x 16.5
|
||||
@ -1334,9 +1341,9 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_complex::@2
|
||||
(label) bool_complex::@3
|
||||
(label) bool_complex::@4
|
||||
(label) bool_complex::@5
|
||||
(label) bool_complex::@6
|
||||
(label) bool_complex::@7
|
||||
(label) bool_complex::@8
|
||||
(label) bool_complex::@9
|
||||
(label) bool_complex::@return
|
||||
(byte) bool_complex::i
|
||||
(byte) bool_complex::i#1 reg byte y 16.5
|
||||
@ -1349,7 +1356,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_not::@2
|
||||
(label) bool_not::@3
|
||||
(label) bool_not::@4
|
||||
(label) bool_not::@7
|
||||
(label) bool_not::@5
|
||||
(label) bool_not::@return
|
||||
(byte) bool_not::i
|
||||
(byte) bool_not::i#1 reg byte x 16.5
|
||||
@ -1362,7 +1369,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_or::@2
|
||||
(label) bool_or::@3
|
||||
(label) bool_or::@4
|
||||
(label) bool_or::@7
|
||||
(label) bool_or::@5
|
||||
(label) bool_or::@return
|
||||
(byte) bool_or::i
|
||||
(byte) bool_or::i#1 reg byte x 16.5
|
||||
@ -1397,11 +1404,11 @@ Score: 1804
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
//SEG5 @5
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @5 to main [phi:@5->main]
|
||||
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
@ -1444,15 +1451,15 @@ bool_complex: {
|
||||
//SEG34 [16] (byte~) bool_complex::$5 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuyy_band_vbuc1
|
||||
tya
|
||||
and #1
|
||||
//SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@8 -- vbuyy_lt_vbuc1_then_la1
|
||||
//SEG35 [17] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@6 -- vbuyy_lt_vbuc1_then_la1
|
||||
cpy #$a
|
||||
bcc b8
|
||||
//SEG36 bool_complex::@7
|
||||
b7:
|
||||
bcc b6
|
||||
//SEG36 bool_complex::@5
|
||||
b5:
|
||||
//SEG37 [18] if((byte) bool_complex::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_complex::@4 -- vbuyy_lt_vbuc1_then_la1
|
||||
cpy #$a
|
||||
bcc b4
|
||||
//SEG38 bool_complex::@9
|
||||
//SEG38 bool_complex::@7
|
||||
//SEG39 [19] if((byte~) bool_complex::$5==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@4 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b4
|
||||
@ -1477,12 +1484,12 @@ bool_complex: {
|
||||
lda #' '
|
||||
sta screen,y
|
||||
jmp b3
|
||||
//SEG49 bool_complex::@8
|
||||
b8:
|
||||
//SEG49 bool_complex::@6
|
||||
b6:
|
||||
//SEG50 [25] if((byte~) bool_complex::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_complex::@2 -- vbuxx_eq_0_then_la1
|
||||
cpx #0
|
||||
beq b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
//SEG51 bool_not
|
||||
bool_not: {
|
||||
@ -1500,7 +1507,7 @@ bool_not: {
|
||||
//SEG58 [29] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b4
|
||||
//SEG59 bool_not::@7
|
||||
//SEG59 bool_not::@5
|
||||
//SEG60 [30] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b4
|
||||
@ -1541,7 +1548,7 @@ bool_or: {
|
||||
//SEG77 [39] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b2
|
||||
//SEG78 bool_or::@7
|
||||
//SEG78 bool_or::@5
|
||||
//SEG79 [40] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
@ -1579,9 +1586,9 @@ bool_and: {
|
||||
//SEG95 [48] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1
|
||||
txa
|
||||
and #1
|
||||
//SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7 -- vbuxx_lt_vbuc1_then_la1
|
||||
//SEG96 [49] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
//SEG97 bool_and::@4
|
||||
b4:
|
||||
//SEG98 [50] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2
|
||||
@ -1597,8 +1604,8 @@ bool_and: {
|
||||
//SEG102 bool_and::@return
|
||||
//SEG103 [53] return
|
||||
rts
|
||||
//SEG104 bool_and::@7
|
||||
b7:
|
||||
//SEG104 bool_and::@5
|
||||
b5:
|
||||
//SEG105 [54] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) bool_and()
|
||||
@ -7,7 +7,7 @@
|
||||
(label) bool_and::@2
|
||||
(label) bool_and::@3
|
||||
(label) bool_and::@4
|
||||
(label) bool_and::@7
|
||||
(label) bool_and::@5
|
||||
(label) bool_and::@return
|
||||
(byte) bool_and::i
|
||||
(byte) bool_and::i#1 reg byte x 16.5
|
||||
@ -21,9 +21,9 @@
|
||||
(label) bool_complex::@2
|
||||
(label) bool_complex::@3
|
||||
(label) bool_complex::@4
|
||||
(label) bool_complex::@5
|
||||
(label) bool_complex::@6
|
||||
(label) bool_complex::@7
|
||||
(label) bool_complex::@8
|
||||
(label) bool_complex::@9
|
||||
(label) bool_complex::@return
|
||||
(byte) bool_complex::i
|
||||
(byte) bool_complex::i#1 reg byte y 16.5
|
||||
@ -36,7 +36,7 @@
|
||||
(label) bool_not::@2
|
||||
(label) bool_not::@3
|
||||
(label) bool_not::@4
|
||||
(label) bool_not::@7
|
||||
(label) bool_not::@5
|
||||
(label) bool_not::@return
|
||||
(byte) bool_not::i
|
||||
(byte) bool_not::i#1 reg byte x 16.5
|
||||
@ -49,7 +49,7 @@
|
||||
(label) bool_or::@2
|
||||
(label) bool_or::@3
|
||||
(label) bool_or::@4
|
||||
(label) bool_or::@7
|
||||
(label) bool_or::@5
|
||||
(label) bool_or::@return
|
||||
(byte) bool_or::i
|
||||
(byte) bool_or::i#1 reg byte x 16.5
|
||||
|
@ -4,11 +4,11 @@
|
||||
.pc = $80d "Program"
|
||||
main: {
|
||||
lda #1
|
||||
jmp b6
|
||||
jmp b2
|
||||
b1:
|
||||
lda #0
|
||||
b6:
|
||||
b2:
|
||||
cmp #0
|
||||
bne b1
|
||||
jmp b6
|
||||
jmp b2
|
||||
}
|
||||
|
@ -10,9 +10,9 @@
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@6
|
||||
[5] (bool) framedone#2 ← phi( main/true main::@6/false )
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@1 main::@6
|
||||
main::@1: scope:[main] from main main::@2
|
||||
[5] (bool) framedone#2 ← phi( main/true main::@2/false )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@2
|
||||
[6] if((bool) framedone#2) goto main::@1
|
||||
to:main::@6
|
||||
to:main::@2
|
||||
|
@ -105,6 +105,7 @@ Calls in [] to main:2
|
||||
|
||||
Created 1 initial phi equivalence classes
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Renumbering block main::@6 to main::@2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
@ -123,12 +124,12 @@ FINAL CONTROL FLOW GRAPH
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@6
|
||||
[5] (bool) framedone#2 ← phi( main/true main::@6/false )
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@1 main::@6
|
||||
main::@1: scope:[main] from main main::@2
|
||||
[5] (bool) framedone#2 ← phi( main/true main::@2/false )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@2
|
||||
[6] if((bool) framedone#2) goto main::@1
|
||||
to:main::@6
|
||||
to:main::@2
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
@ -175,22 +176,22 @@ main: {
|
||||
lda #1
|
||||
sta framedone
|
||||
jmp b1
|
||||
//SEG13 [5] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
||||
b1_from_b6:
|
||||
//SEG14 [5] phi (bool) framedone#2 = false [phi:main::@6->main::@1#0] -- vboz1=vboc1
|
||||
//SEG13 [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1_from_b2:
|
||||
//SEG14 [5] phi (bool) framedone#2 = false [phi:main::@2->main::@1#0] -- vboz1=vboc1
|
||||
lda #0
|
||||
sta framedone
|
||||
jmp b1
|
||||
//SEG15 main::@1
|
||||
b1:
|
||||
jmp b6
|
||||
//SEG16 main::@6
|
||||
b6:
|
||||
jmp b2
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG17 [6] if((bool) framedone#2) goto main::@1 -- vboz1_then_la1
|
||||
lda framedone
|
||||
cmp #0
|
||||
bne b1_from_b6
|
||||
jmp b6
|
||||
bne b1_from_b2
|
||||
jmp b2
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
@ -234,29 +235,29 @@ main: {
|
||||
//SEG12 [5] phi (bool) framedone#2 = true [phi:main->main::@1#0] -- vboaa=vboc1
|
||||
lda #1
|
||||
jmp b1
|
||||
//SEG13 [5] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
||||
b1_from_b6:
|
||||
//SEG14 [5] phi (bool) framedone#2 = false [phi:main::@6->main::@1#0] -- vboaa=vboc1
|
||||
//SEG13 [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1_from_b2:
|
||||
//SEG14 [5] phi (bool) framedone#2 = false [phi:main::@2->main::@1#0] -- vboaa=vboc1
|
||||
lda #0
|
||||
jmp b1
|
||||
//SEG15 main::@1
|
||||
b1:
|
||||
jmp b6
|
||||
//SEG16 main::@6
|
||||
b6:
|
||||
jmp b2
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG17 [6] if((bool) framedone#2) goto main::@1 -- vboaa_then_la1
|
||||
cmp #0
|
||||
bne b1_from_b6
|
||||
jmp b6
|
||||
bne b1_from_b2
|
||||
jmp b2
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b2
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1 with b6
|
||||
Replacing label b1 with b2
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
@ -269,7 +270,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Relabelling long label b1_from_b6 to b1
|
||||
Relabelling long label b1_from_b2 to b1
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
@ -282,7 +283,7 @@ FINAL SYMBOL TABLE
|
||||
(bool) framedone#2 reg byte a 50.5
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@6
|
||||
(label) main::@2
|
||||
|
||||
reg byte a [ framedone#2 ]
|
||||
|
||||
@ -309,17 +310,17 @@ main: {
|
||||
//SEG11 [5] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG12 [5] phi (bool) framedone#2 = true [phi:main->main::@1#0] -- vboaa=vboc1
|
||||
lda #1
|
||||
jmp b6
|
||||
//SEG13 [5] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
||||
jmp b2
|
||||
//SEG13 [5] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1:
|
||||
//SEG14 [5] phi (bool) framedone#2 = false [phi:main::@6->main::@1#0] -- vboaa=vboc1
|
||||
//SEG14 [5] phi (bool) framedone#2 = false [phi:main::@2->main::@1#0] -- vboaa=vboc1
|
||||
lda #0
|
||||
//SEG15 main::@1
|
||||
//SEG16 main::@6
|
||||
b6:
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG17 [6] if((bool) framedone#2) goto main::@1 -- vboaa_then_la1
|
||||
cmp #0
|
||||
bne b1
|
||||
jmp b6
|
||||
jmp b2
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,6 @@
|
||||
(bool) framedone#2 reg byte a 50.5
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@6
|
||||
(label) main::@2
|
||||
|
||||
reg byte a [ framedone#2 ]
|
||||
|
@ -10,10 +10,10 @@ main: {
|
||||
lda #1
|
||||
sta $400+2
|
||||
cmp #0
|
||||
bne b2
|
||||
bne b1
|
||||
breturn:
|
||||
rts
|
||||
b2:
|
||||
b1:
|
||||
lda #1
|
||||
sta $400+2+1
|
||||
jmp breturn
|
||||
|
@ -11,11 +11,11 @@ main: scope:[main] from @1
|
||||
[4] *(((bool*))(word/signed word/dword/signed dword) $400) ← true
|
||||
[5] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 1) ← false
|
||||
[6] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true
|
||||
[7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@2
|
||||
[7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main main::@2
|
||||
main::@return: scope:[main] from main main::@1
|
||||
[8] return
|
||||
to:@return
|
||||
main::@2: scope:[main] from main
|
||||
main::@1: scope:[main] from main
|
||||
[9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true
|
||||
to:main::@return
|
||||
|
@ -78,6 +78,7 @@ Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Renumbering block main::@2 to main::@1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
@ -96,12 +97,12 @@ main: scope:[main] from @1
|
||||
[4] *(((bool*))(word/signed word/dword/signed dword) $400) ← true
|
||||
[5] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 1) ← false
|
||||
[6] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true
|
||||
[7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@2
|
||||
[7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main main::@2
|
||||
main::@return: scope:[main] from main main::@1
|
||||
[8] return
|
||||
to:@return
|
||||
main::@2: scope:[main] from main
|
||||
main::@1: scope:[main] from main
|
||||
[9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true
|
||||
to:main::@return
|
||||
|
||||
@ -146,17 +147,17 @@ main: {
|
||||
//SEG12 [6] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2
|
||||
//SEG13 [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@2 -- _deref_pboc1_then_la1
|
||||
//SEG13 [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@1 -- _deref_pboc1_then_la1
|
||||
lda $400+2
|
||||
cmp #0
|
||||
bne b2
|
||||
bne b1
|
||||
jmp breturn
|
||||
//SEG14 main::@return
|
||||
breturn:
|
||||
//SEG15 [8] return
|
||||
rts
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG16 main::@1
|
||||
b1:
|
||||
//SEG17 [9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2+1
|
||||
@ -167,7 +168,7 @@ REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [4] *(((bool*))(word/signed word/dword/signed dword) $400) ← true [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [5] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 1) ← false [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@2 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
|
||||
REGISTER UPLIFT SCOPES
|
||||
@ -210,17 +211,17 @@ main: {
|
||||
//SEG12 [6] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2
|
||||
//SEG13 [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@2 -- _deref_pboc1_then_la1
|
||||
//SEG13 [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@1 -- _deref_pboc1_then_la1
|
||||
lda $400+2
|
||||
cmp #0
|
||||
bne b2
|
||||
bne b1
|
||||
jmp breturn
|
||||
//SEG14 main::@return
|
||||
breturn:
|
||||
//SEG15 [8] return
|
||||
rts
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG16 main::@1
|
||||
b1:
|
||||
//SEG17 [9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2+1
|
||||
@ -251,7 +252,7 @@ FINAL SYMBOL TABLE
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) main()
|
||||
(label) main::@2
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(bool*) main::bscreen
|
||||
|
||||
@ -284,15 +285,15 @@ main: {
|
||||
//SEG12 [6] *(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2
|
||||
//SEG13 [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@2 -- _deref_pboc1_then_la1
|
||||
//SEG13 [7] if(*(((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2)) goto main::@1 -- _deref_pboc1_then_la1
|
||||
cmp #0
|
||||
bne b2
|
||||
bne b1
|
||||
//SEG14 main::@return
|
||||
breturn:
|
||||
//SEG15 [8] return
|
||||
rts
|
||||
//SEG16 main::@2
|
||||
b2:
|
||||
//SEG16 main::@1
|
||||
b1:
|
||||
//SEG17 [9] *(++((bool*))(word/signed word/dword/signed dword) $400+(byte/signed byte/word/signed word/dword/signed dword) 2) ← true -- _deref_pboc1=vboc2
|
||||
lda #1
|
||||
sta $400+2+1
|
||||
|
@ -2,7 +2,7 @@
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) main()
|
||||
(label) main::@2
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(bool*) main::bscreen
|
||||
|
||||
|
@ -30,8 +30,8 @@ bool_complex: {
|
||||
sta o2
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b8
|
||||
b7:
|
||||
bne b6
|
||||
b5:
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b4
|
||||
@ -50,11 +50,11 @@ bool_complex: {
|
||||
lda #' '
|
||||
sta screen,x
|
||||
jmp b3
|
||||
b8:
|
||||
b6:
|
||||
lda o2
|
||||
cmp #0
|
||||
bne b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
bool_not: {
|
||||
.label screen = $450
|
||||
@ -107,7 +107,7 @@ bool_and: {
|
||||
txa
|
||||
and #1
|
||||
cpx #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
b4:
|
||||
lda #' '
|
||||
sta screen,x
|
||||
@ -116,7 +116,7 @@ bool_and: {
|
||||
cpx #$15
|
||||
bne b1
|
||||
rts
|
||||
b7:
|
||||
b5:
|
||||
cmp #0
|
||||
beq b2
|
||||
jmp b4
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call bool_and
|
||||
to:main::@1
|
||||
@ -34,15 +34,15 @@ bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
|
||||
[15] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte/signed byte/word/signed word/dword/signed dword) $a
|
||||
[16] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[17] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[18] if((bool) bool_complex::o1#0) goto bool_complex::@8
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8
|
||||
[18] if((bool) bool_complex::o1#0) goto bool_complex::@6
|
||||
to:bool_complex::@5
|
||||
bool_complex::@5: scope:[bool_complex] from bool_complex::@1 bool_complex::@6
|
||||
[19] if((bool) bool_complex::o1#0) goto bool_complex::@4
|
||||
to:bool_complex::@9
|
||||
bool_complex::@9: scope:[bool_complex] from bool_complex::@7
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@5
|
||||
[20] if((bool) bool_complex::o2#0) goto bool_complex::@4
|
||||
to:bool_complex::@2
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@6 bool_complex::@7
|
||||
[21] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*'
|
||||
to:bool_complex::@3
|
||||
bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
@ -52,12 +52,12 @@ bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
bool_complex::@return: scope:[bool_complex] from bool_complex::@3
|
||||
[24] return
|
||||
to:@return
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7
|
||||
[25] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' '
|
||||
to:bool_complex::@3
|
||||
bool_complex::@8: scope:[bool_complex] from bool_complex::@1
|
||||
bool_complex::@6: scope:[bool_complex] from bool_complex::@1
|
||||
[26] if((bool) bool_complex::o2#0) goto bool_complex::@2
|
||||
to:bool_complex::@7
|
||||
to:bool_complex::@5
|
||||
bool_not: scope:[bool_not] from main::@2
|
||||
[27] phi()
|
||||
to:bool_not::@1
|
||||
@ -65,11 +65,11 @@ bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
|
||||
[28] (byte) bool_not::i#2 ← phi( bool_not/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_not::@3/(byte) bool_not::i#1 )
|
||||
[29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[30] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4
|
||||
to:bool_not::@7
|
||||
bool_not::@7: scope:[bool_not] from bool_not::@1
|
||||
to:bool_not::@5
|
||||
bool_not::@5: scope:[bool_not] from bool_not::@1
|
||||
[31] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4
|
||||
to:bool_not::@2
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@7
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@5
|
||||
[32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*'
|
||||
to:bool_not::@3
|
||||
bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
@ -79,7 +79,7 @@ bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
bool_not::@return: scope:[bool_not] from bool_not::@3
|
||||
[35] return
|
||||
to:@return
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5
|
||||
[36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' '
|
||||
to:bool_not::@3
|
||||
bool_or: scope:[bool_or] from main::@1
|
||||
@ -89,11 +89,11 @@ bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
|
||||
[38] (byte) bool_or::i#2 ← phi( bool_or/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_or::@3/(byte) bool_or::i#1 )
|
||||
[39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[40] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2
|
||||
to:bool_or::@7
|
||||
bool_or::@7: scope:[bool_or] from bool_or::@1
|
||||
to:bool_or::@5
|
||||
bool_or::@5: scope:[bool_or] from bool_or::@1
|
||||
[41] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2
|
||||
to:bool_or::@4
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@7
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@5
|
||||
[42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' '
|
||||
to:bool_or::@3
|
||||
bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
@ -103,7 +103,7 @@ bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
bool_or::@return: scope:[bool_or] from bool_or::@3
|
||||
[45] return
|
||||
to:@return
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5
|
||||
[46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*'
|
||||
to:bool_or::@3
|
||||
bool_and: scope:[bool_and] from main
|
||||
@ -112,9 +112,9 @@ bool_and: scope:[bool_and] from main
|
||||
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
|
||||
[48] (byte) bool_and::i#2 ← phi( bool_and/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_and::@3/(byte) bool_and::i#1 )
|
||||
[49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7
|
||||
[50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5
|
||||
to:bool_and::@4
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5
|
||||
[51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' '
|
||||
to:bool_and::@3
|
||||
bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
@ -124,9 +124,9 @@ bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
bool_and::@return: scope:[bool_and] from bool_and::@3
|
||||
[54] return
|
||||
to:@return
|
||||
bool_and::@7: scope:[bool_and] from bool_and::@1
|
||||
bool_and::@5: scope:[bool_and] from bool_and::@1
|
||||
[55] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2
|
||||
to:bool_and::@4
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@7
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@5
|
||||
[56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*'
|
||||
to:bool_and::@3
|
||||
|
@ -394,8 +394,15 @@ Culled Empty Block (label) bool_complex::@10
|
||||
Culled Empty Block (label) bool_not::@8
|
||||
Culled Empty Block (label) bool_or::@8
|
||||
Culled Empty Block (label) bool_and::@8
|
||||
Renumbering block @5 to @1
|
||||
Renumbering block bool_and::@7 to bool_and::@5
|
||||
Renumbering block bool_or::@7 to bool_or::@5
|
||||
Renumbering block bool_not::@7 to bool_not::@5
|
||||
Renumbering block bool_complex::@7 to bool_complex::@5
|
||||
Renumbering block bool_complex::@8 to bool_complex::@6
|
||||
Renumbering block bool_complex::@9 to bool_complex::@7
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @5
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@1
|
||||
@ -409,14 +416,14 @@ Adding NOP phi() at start of bool_and
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@5
|
||||
@5: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @5
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @5
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call bool_and
|
||||
to:main::@1
|
||||
@ -443,15 +450,15 @@ bool_complex::@1: scope:[bool_complex] from bool_complex bool_complex::@3
|
||||
[15] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte/signed byte/word/signed word/dword/signed dword) $a
|
||||
[16] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[17] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[18] if((bool) bool_complex::o1#0) goto bool_complex::@8
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@1 bool_complex::@8
|
||||
[18] if((bool) bool_complex::o1#0) goto bool_complex::@6
|
||||
to:bool_complex::@5
|
||||
bool_complex::@5: scope:[bool_complex] from bool_complex::@1 bool_complex::@6
|
||||
[19] if((bool) bool_complex::o1#0) goto bool_complex::@4
|
||||
to:bool_complex::@9
|
||||
bool_complex::@9: scope:[bool_complex] from bool_complex::@7
|
||||
to:bool_complex::@7
|
||||
bool_complex::@7: scope:[bool_complex] from bool_complex::@5
|
||||
[20] if((bool) bool_complex::o2#0) goto bool_complex::@4
|
||||
to:bool_complex::@2
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@8 bool_complex::@9
|
||||
bool_complex::@2: scope:[bool_complex] from bool_complex::@6 bool_complex::@7
|
||||
[21] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*'
|
||||
to:bool_complex::@3
|
||||
bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
@ -461,12 +468,12 @@ bool_complex::@3: scope:[bool_complex] from bool_complex::@2 bool_complex::@4
|
||||
bool_complex::@return: scope:[bool_complex] from bool_complex::@3
|
||||
[24] return
|
||||
to:@return
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@7 bool_complex::@9
|
||||
bool_complex::@4: scope:[bool_complex] from bool_complex::@5 bool_complex::@7
|
||||
[25] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) ' '
|
||||
to:bool_complex::@3
|
||||
bool_complex::@8: scope:[bool_complex] from bool_complex::@1
|
||||
bool_complex::@6: scope:[bool_complex] from bool_complex::@1
|
||||
[26] if((bool) bool_complex::o2#0) goto bool_complex::@2
|
||||
to:bool_complex::@7
|
||||
to:bool_complex::@5
|
||||
bool_not: scope:[bool_not] from main::@2
|
||||
[27] phi()
|
||||
to:bool_not::@1
|
||||
@ -474,11 +481,11 @@ bool_not::@1: scope:[bool_not] from bool_not bool_not::@3
|
||||
[28] (byte) bool_not::i#2 ← phi( bool_not/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_not::@3/(byte) bool_not::i#1 )
|
||||
[29] (byte~) bool_not::$1 ← (byte) bool_not::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[30] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4
|
||||
to:bool_not::@7
|
||||
bool_not::@7: scope:[bool_not] from bool_not::@1
|
||||
to:bool_not::@5
|
||||
bool_not::@5: scope:[bool_not] from bool_not::@1
|
||||
[31] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4
|
||||
to:bool_not::@2
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@7
|
||||
bool_not::@2: scope:[bool_not] from bool_not::@5
|
||||
[32] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) '*'
|
||||
to:bool_not::@3
|
||||
bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
@ -488,7 +495,7 @@ bool_not::@3: scope:[bool_not] from bool_not::@2 bool_not::@4
|
||||
bool_not::@return: scope:[bool_not] from bool_not::@3
|
||||
[35] return
|
||||
to:@return
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@7
|
||||
bool_not::@4: scope:[bool_not] from bool_not::@1 bool_not::@5
|
||||
[36] *((const byte*) bool_not::screen#0 + (byte) bool_not::i#2) ← (byte) ' '
|
||||
to:bool_not::@3
|
||||
bool_or: scope:[bool_or] from main::@1
|
||||
@ -498,11 +505,11 @@ bool_or::@1: scope:[bool_or] from bool_or bool_or::@3
|
||||
[38] (byte) bool_or::i#2 ← phi( bool_or/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_or::@3/(byte) bool_or::i#1 )
|
||||
[39] (byte~) bool_or::$1 ← (byte) bool_or::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[40] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2
|
||||
to:bool_or::@7
|
||||
bool_or::@7: scope:[bool_or] from bool_or::@1
|
||||
to:bool_or::@5
|
||||
bool_or::@5: scope:[bool_or] from bool_or::@1
|
||||
[41] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2
|
||||
to:bool_or::@4
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@7
|
||||
bool_or::@4: scope:[bool_or] from bool_or::@5
|
||||
[42] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) ' '
|
||||
to:bool_or::@3
|
||||
bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
@ -512,7 +519,7 @@ bool_or::@3: scope:[bool_or] from bool_or::@2 bool_or::@4
|
||||
bool_or::@return: scope:[bool_or] from bool_or::@3
|
||||
[45] return
|
||||
to:@return
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@7
|
||||
bool_or::@2: scope:[bool_or] from bool_or::@1 bool_or::@5
|
||||
[46] *((const byte*) bool_or::screen#0 + (byte) bool_or::i#2) ← (byte) '*'
|
||||
to:bool_or::@3
|
||||
bool_and: scope:[bool_and] from main
|
||||
@ -521,9 +528,9 @@ bool_and: scope:[bool_and] from main
|
||||
bool_and::@1: scope:[bool_and] from bool_and bool_and::@3
|
||||
[48] (byte) bool_and::i#2 ← phi( bool_and/(byte/signed byte/word/signed word/dword/signed dword) 0 bool_and::@3/(byte) bool_and::i#1 )
|
||||
[49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7
|
||||
[50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5
|
||||
to:bool_and::@4
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@7
|
||||
bool_and::@4: scope:[bool_and] from bool_and::@1 bool_and::@5
|
||||
[51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' '
|
||||
to:bool_and::@3
|
||||
bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
@ -533,10 +540,10 @@ bool_and::@3: scope:[bool_and] from bool_and::@2 bool_and::@4
|
||||
bool_and::@return: scope:[bool_and] from bool_and::@3
|
||||
[54] return
|
||||
to:@return
|
||||
bool_and::@7: scope:[bool_and] from bool_and::@1
|
||||
bool_and::@5: scope:[bool_and] from bool_and::@1
|
||||
[55] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2
|
||||
to:bool_and::@4
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@7
|
||||
bool_and::@2: scope:[bool_and] from bool_and::@5
|
||||
[56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) '*'
|
||||
to:bool_and::@3
|
||||
|
||||
@ -627,17 +634,17 @@ INITIAL ASM
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
b5_from_bbegin:
|
||||
jmp b5
|
||||
//SEG5 @5
|
||||
b5:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @5 to main [phi:@5->main]
|
||||
main_from_b5:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
|
||||
bend_from_b5:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -718,20 +725,20 @@ bool_complex: {
|
||||
!:
|
||||
eor #1
|
||||
sta o2
|
||||
//SEG36 [18] if((bool) bool_complex::o1#0) goto bool_complex::@8 -- vboz1_then_la1
|
||||
//SEG36 [18] if((bool) bool_complex::o1#0) goto bool_complex::@6 -- vboz1_then_la1
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b8
|
||||
jmp b7
|
||||
//SEG37 bool_complex::@7
|
||||
b7:
|
||||
bne b6
|
||||
jmp b5
|
||||
//SEG37 bool_complex::@5
|
||||
b5:
|
||||
//SEG38 [19] if((bool) bool_complex::o1#0) goto bool_complex::@4 -- vboz1_then_la1
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b4
|
||||
jmp b9
|
||||
//SEG39 bool_complex::@9
|
||||
b9:
|
||||
jmp b7
|
||||
//SEG39 bool_complex::@7
|
||||
b7:
|
||||
//SEG40 [20] if((bool) bool_complex::o2#0) goto bool_complex::@4 -- vboz1_then_la1
|
||||
lda o2
|
||||
cmp #0
|
||||
@ -764,13 +771,13 @@ bool_complex: {
|
||||
ldy i
|
||||
sta screen,y
|
||||
jmp b3
|
||||
//SEG50 bool_complex::@8
|
||||
b8:
|
||||
//SEG50 bool_complex::@6
|
||||
b6:
|
||||
//SEG51 [26] if((bool) bool_complex::o2#0) goto bool_complex::@2 -- vboz1_then_la1
|
||||
lda o2
|
||||
cmp #0
|
||||
bne b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
//SEG52 bool_not
|
||||
bool_not: {
|
||||
@ -797,9 +804,9 @@ bool_not: {
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b4
|
||||
jmp b7
|
||||
//SEG60 bool_not::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG60 bool_not::@5
|
||||
b5:
|
||||
//SEG61 [31] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
@ -858,9 +865,9 @@ bool_or: {
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b2
|
||||
jmp b7
|
||||
//SEG79 bool_or::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG79 bool_or::@5
|
||||
b5:
|
||||
//SEG80 [41] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
@ -915,10 +922,10 @@ bool_and: {
|
||||
lda #1
|
||||
and i
|
||||
sta _1
|
||||
//SEG97 [50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7 -- vbuz1_lt_vbuc1_then_la1
|
||||
//SEG97 [50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5 -- vbuz1_lt_vbuc1_then_la1
|
||||
lda i
|
||||
cmp #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
jmp b4
|
||||
//SEG98 bool_and::@4
|
||||
b4:
|
||||
@ -940,8 +947,8 @@ bool_and: {
|
||||
breturn:
|
||||
//SEG104 [54] return
|
||||
rts
|
||||
//SEG105 bool_and::@7
|
||||
b7:
|
||||
//SEG105 bool_and::@5
|
||||
b5:
|
||||
//SEG106 [55] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuz1_eq_0_then_la1
|
||||
lda _1
|
||||
cmp #0
|
||||
@ -962,7 +969,7 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ bo
|
||||
Statement [16] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::$1 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::$1 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BOOL:6 [ bool_complex::o1#0 ]
|
||||
Statement [17] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [18] if((bool) bool_complex::o1#0) goto bool_complex::@8 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [18] if((bool) bool_complex::o1#0) goto bool_complex::@6 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BOOL:8 [ bool_complex::o2#0 ]
|
||||
Statement [19] if((bool) bool_complex::o1#0) goto bool_complex::@4 [ bool_complex::i#2 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [20] if((bool) bool_complex::o2#0) goto bool_complex::@4 [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a
|
||||
@ -981,7 +988,7 @@ Statement [56] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (b
|
||||
Statement [15] (bool) bool_complex::o1#0 ← (byte) bool_complex::i#2 < (byte/signed byte/word/signed word/dword/signed dword) $a [ bool_complex::i#2 bool_complex::o1#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 ] ) always clobbers reg byte a
|
||||
Statement [16] (byte~) bool_complex::$1 ← (byte) bool_complex::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::$1 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::$1 ] ) always clobbers reg byte a
|
||||
Statement [17] (bool) bool_complex::o2#0 ← (byte~) bool_complex::$1 == (byte/signed byte/word/signed word/dword/signed dword) 0 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [18] if((bool) bool_complex::o1#0) goto bool_complex::@8 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [18] if((bool) bool_complex::o1#0) goto bool_complex::@6 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o1#0 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [19] if((bool) bool_complex::o1#0) goto bool_complex::@4 [ bool_complex::i#2 bool_complex::o2#0 ] ( main:2::bool_complex:11 [ bool_complex::i#2 bool_complex::o2#0 ] ) always clobbers reg byte a
|
||||
Statement [20] if((bool) bool_complex::o2#0) goto bool_complex::@4 [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a
|
||||
Statement [21] *((const byte*) bool_complex::screen#0 + (byte) bool_complex::i#2) ← (byte) '*' [ bool_complex::i#2 ] ( main:2::bool_complex:11 [ bool_complex::i#2 ] ) always clobbers reg byte a
|
||||
@ -1034,17 +1041,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
b5_from_bbegin:
|
||||
jmp b5
|
||||
//SEG5 @5
|
||||
b5:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @5 to main [phi:@5->main]
|
||||
main_from_b5:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
|
||||
bend_from_b5:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -1119,20 +1126,20 @@ bool_complex: {
|
||||
!:
|
||||
eor #1
|
||||
sta o2
|
||||
//SEG36 [18] if((bool) bool_complex::o1#0) goto bool_complex::@8 -- vboz1_then_la1
|
||||
//SEG36 [18] if((bool) bool_complex::o1#0) goto bool_complex::@6 -- vboz1_then_la1
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b8
|
||||
jmp b7
|
||||
//SEG37 bool_complex::@7
|
||||
b7:
|
||||
bne b6
|
||||
jmp b5
|
||||
//SEG37 bool_complex::@5
|
||||
b5:
|
||||
//SEG38 [19] if((bool) bool_complex::o1#0) goto bool_complex::@4 -- vboz1_then_la1
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b4
|
||||
jmp b9
|
||||
//SEG39 bool_complex::@9
|
||||
b9:
|
||||
jmp b7
|
||||
//SEG39 bool_complex::@7
|
||||
b7:
|
||||
//SEG40 [20] if((bool) bool_complex::o2#0) goto bool_complex::@4 -- vboz1_then_la1
|
||||
lda o2
|
||||
cmp #0
|
||||
@ -1162,13 +1169,13 @@ bool_complex: {
|
||||
lda #' '
|
||||
sta screen,x
|
||||
jmp b3
|
||||
//SEG50 bool_complex::@8
|
||||
b8:
|
||||
//SEG50 bool_complex::@6
|
||||
b6:
|
||||
//SEG51 [26] if((bool) bool_complex::o2#0) goto bool_complex::@2 -- vboz1_then_la1
|
||||
lda o2
|
||||
cmp #0
|
||||
bne b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
//SEG52 bool_not
|
||||
bool_not: {
|
||||
@ -1190,9 +1197,9 @@ bool_not: {
|
||||
//SEG59 [30] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b4
|
||||
jmp b7
|
||||
//SEG60 bool_not::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG60 bool_not::@5
|
||||
b5:
|
||||
//SEG61 [31] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b4
|
||||
@ -1242,9 +1249,9 @@ bool_or: {
|
||||
//SEG78 [40] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b2
|
||||
jmp b7
|
||||
//SEG79 bool_or::@7
|
||||
b7:
|
||||
jmp b5
|
||||
//SEG79 bool_or::@5
|
||||
b5:
|
||||
//SEG80 [41] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
@ -1291,9 +1298,9 @@ bool_and: {
|
||||
//SEG96 [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1
|
||||
txa
|
||||
and #1
|
||||
//SEG97 [50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7 -- vbuxx_lt_vbuc1_then_la1
|
||||
//SEG97 [50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
jmp b4
|
||||
//SEG98 bool_and::@4
|
||||
b4:
|
||||
@ -1313,8 +1320,8 @@ bool_and: {
|
||||
breturn:
|
||||
//SEG104 [54] return
|
||||
rts
|
||||
//SEG105 bool_and::@7
|
||||
b7:
|
||||
//SEG105 bool_and::@5
|
||||
b5:
|
||||
//SEG106 [55] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
@ -1328,25 +1335,25 @@ bool_and: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
@ -1359,10 +1366,10 @@ Replacing label b1_from_b3 with b1
|
||||
Replacing label b1_from_b3 with b1
|
||||
Replacing label b1_from_b3 with b1
|
||||
Replacing label b1_from_b3 with b1
|
||||
Removing instruction b5_from_bbegin:
|
||||
Removing instruction b5:
|
||||
Removing instruction main_from_b5:
|
||||
Removing instruction bend_from_b5:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction bool_or_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
@ -1381,14 +1388,14 @@ Removing instruction b2:
|
||||
Removing instruction b3:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_complex:
|
||||
Removing instruction b9:
|
||||
Removing instruction b7:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_not:
|
||||
Removing instruction b7:
|
||||
Removing instruction b5:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_or:
|
||||
Removing instruction b7:
|
||||
Removing instruction b5:
|
||||
Removing instruction b4:
|
||||
Removing instruction breturn:
|
||||
Removing instruction b1_from_bool_and:
|
||||
@ -1406,7 +1413,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) bool_and()
|
||||
@ -1415,7 +1422,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_and::@2
|
||||
(label) bool_and::@3
|
||||
(label) bool_and::@4
|
||||
(label) bool_and::@7
|
||||
(label) bool_and::@5
|
||||
(label) bool_and::@return
|
||||
(byte) bool_and::i
|
||||
(byte) bool_and::i#1 reg byte x 16.5
|
||||
@ -1431,9 +1438,9 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_complex::@2
|
||||
(label) bool_complex::@3
|
||||
(label) bool_complex::@4
|
||||
(label) bool_complex::@5
|
||||
(label) bool_complex::@6
|
||||
(label) bool_complex::@7
|
||||
(label) bool_complex::@8
|
||||
(label) bool_complex::@9
|
||||
(label) bool_complex::@return
|
||||
(byte) bool_complex::i
|
||||
(byte) bool_complex::i#1 reg byte x 16.5
|
||||
@ -1453,7 +1460,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_not::@2
|
||||
(label) bool_not::@3
|
||||
(label) bool_not::@4
|
||||
(label) bool_not::@7
|
||||
(label) bool_not::@5
|
||||
(label) bool_not::@return
|
||||
(byte) bool_not::i
|
||||
(byte) bool_not::i#1 reg byte x 16.5
|
||||
@ -1469,7 +1476,7 @@ FINAL SYMBOL TABLE
|
||||
(label) bool_or::@2
|
||||
(label) bool_or::@3
|
||||
(label) bool_or::@4
|
||||
(label) bool_or::@7
|
||||
(label) bool_or::@5
|
||||
(label) bool_or::@return
|
||||
(byte) bool_or::i
|
||||
(byte) bool_or::i#1 reg byte x 16.5
|
||||
@ -1508,11 +1515,11 @@ Score: 2089
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @5 [phi:@begin->@5]
|
||||
//SEG5 @5
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @5 to main [phi:@5->main]
|
||||
//SEG8 [3] phi from @5 to @end [phi:@5->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
@ -1566,17 +1573,17 @@ bool_complex: {
|
||||
!:
|
||||
eor #1
|
||||
sta o2
|
||||
//SEG36 [18] if((bool) bool_complex::o1#0) goto bool_complex::@8 -- vboz1_then_la1
|
||||
//SEG36 [18] if((bool) bool_complex::o1#0) goto bool_complex::@6 -- vboz1_then_la1
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b8
|
||||
//SEG37 bool_complex::@7
|
||||
b7:
|
||||
bne b6
|
||||
//SEG37 bool_complex::@5
|
||||
b5:
|
||||
//SEG38 [19] if((bool) bool_complex::o1#0) goto bool_complex::@4 -- vboz1_then_la1
|
||||
lda o1
|
||||
cmp #0
|
||||
bne b4
|
||||
//SEG39 bool_complex::@9
|
||||
//SEG39 bool_complex::@7
|
||||
//SEG40 [20] if((bool) bool_complex::o2#0) goto bool_complex::@4 -- vboz1_then_la1
|
||||
lda o2
|
||||
cmp #0
|
||||
@ -1602,13 +1609,13 @@ bool_complex: {
|
||||
lda #' '
|
||||
sta screen,x
|
||||
jmp b3
|
||||
//SEG50 bool_complex::@8
|
||||
b8:
|
||||
//SEG50 bool_complex::@6
|
||||
b6:
|
||||
//SEG51 [26] if((bool) bool_complex::o2#0) goto bool_complex::@2 -- vboz1_then_la1
|
||||
lda o2
|
||||
cmp #0
|
||||
bne b2
|
||||
jmp b7
|
||||
jmp b5
|
||||
}
|
||||
//SEG52 bool_not
|
||||
bool_not: {
|
||||
@ -1626,7 +1633,7 @@ bool_not: {
|
||||
//SEG59 [30] if((byte) bool_not::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_not::@4 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b4
|
||||
//SEG60 bool_not::@7
|
||||
//SEG60 bool_not::@5
|
||||
//SEG61 [31] if((byte~) bool_not::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_not::@4 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b4
|
||||
@ -1667,7 +1674,7 @@ bool_or: {
|
||||
//SEG78 [40] if((byte) bool_or::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_or::@2 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b2
|
||||
//SEG79 bool_or::@7
|
||||
//SEG79 bool_or::@5
|
||||
//SEG80 [41] if((byte~) bool_or::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_or::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
@ -1705,9 +1712,9 @@ bool_and: {
|
||||
//SEG96 [49] (byte~) bool_and::$1 ← (byte) bool_and::i#2 & (byte/signed byte/word/signed word/dword/signed dword) 1 -- vbuaa=vbuxx_band_vbuc1
|
||||
txa
|
||||
and #1
|
||||
//SEG97 [50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@7 -- vbuxx_lt_vbuc1_then_la1
|
||||
//SEG97 [50] if((byte) bool_and::i#2<(byte/signed byte/word/signed word/dword/signed dword) $a) goto bool_and::@5 -- vbuxx_lt_vbuc1_then_la1
|
||||
cpx #$a
|
||||
bcc b7
|
||||
bcc b5
|
||||
//SEG98 bool_and::@4
|
||||
b4:
|
||||
//SEG99 [51] *((const byte*) bool_and::screen#0 + (byte) bool_and::i#2) ← (byte) ' ' -- pbuc1_derefidx_vbuxx=vbuc2
|
||||
@ -1723,8 +1730,8 @@ bool_and: {
|
||||
//SEG103 bool_and::@return
|
||||
//SEG104 [54] return
|
||||
rts
|
||||
//SEG105 bool_and::@7
|
||||
b7:
|
||||
//SEG105 bool_and::@5
|
||||
b5:
|
||||
//SEG106 [55] if((byte~) bool_and::$1==(byte/signed byte/word/signed word/dword/signed dword) 0) goto bool_and::@2 -- vbuaa_eq_0_then_la1
|
||||
cmp #0
|
||||
beq b2
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @5
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) bool_and()
|
||||
@ -7,7 +7,7 @@
|
||||
(label) bool_and::@2
|
||||
(label) bool_and::@3
|
||||
(label) bool_and::@4
|
||||
(label) bool_and::@7
|
||||
(label) bool_and::@5
|
||||
(label) bool_and::@return
|
||||
(byte) bool_and::i
|
||||
(byte) bool_and::i#1 reg byte x 16.5
|
||||
@ -23,9 +23,9 @@
|
||||
(label) bool_complex::@2
|
||||
(label) bool_complex::@3
|
||||
(label) bool_complex::@4
|
||||
(label) bool_complex::@5
|
||||
(label) bool_complex::@6
|
||||
(label) bool_complex::@7
|
||||
(label) bool_complex::@8
|
||||
(label) bool_complex::@9
|
||||
(label) bool_complex::@return
|
||||
(byte) bool_complex::i
|
||||
(byte) bool_complex::i#1 reg byte x 16.5
|
||||
@ -45,7 +45,7 @@
|
||||
(label) bool_not::@2
|
||||
(label) bool_not::@3
|
||||
(label) bool_not::@4
|
||||
(label) bool_not::@7
|
||||
(label) bool_not::@5
|
||||
(label) bool_not::@return
|
||||
(byte) bool_not::i
|
||||
(byte) bool_not::i#1 reg byte x 16.5
|
||||
@ -61,7 +61,7 @@
|
||||
(label) bool_or::@2
|
||||
(label) bool_or::@3
|
||||
(label) bool_or::@4
|
||||
(label) bool_or::@7
|
||||
(label) bool_or::@5
|
||||
(label) bool_or::@return
|
||||
(byte) bool_or::i
|
||||
(byte) bool_or::i#1 reg byte x 16.5
|
||||
|
@ -110,13 +110,13 @@ main: {
|
||||
sta VIC_MEMORY
|
||||
ldx #0
|
||||
// DTV Palette - Grey Tones
|
||||
b6:
|
||||
b2:
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b6
|
||||
b2:
|
||||
bne b2
|
||||
b1:
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
rff:
|
||||
@ -158,10 +158,10 @@ main: {
|
||||
sta VIC_CONTROL
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
b8:
|
||||
b3:
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
bne b3
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
@ -180,7 +180,7 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
b11:
|
||||
b5:
|
||||
ldx RASTER
|
||||
txa
|
||||
and #7
|
||||
@ -208,8 +208,8 @@ main: {
|
||||
nop
|
||||
nop
|
||||
cpx #$f2
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
// Initialize the different graphics in the memory
|
||||
gfx_init: {
|
||||
|
@ -1,19 +1,19 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@9
|
||||
@9: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @9
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @9
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[7] call gfx_init
|
||||
to:main::@17
|
||||
main::@17: scope:[main] from main
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main
|
||||
[8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0
|
||||
[10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
@ -33,25 +33,25 @@ main::@17: scope:[main] from main
|
||||
[24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) $4000
|
||||
[26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@17 main::@6
|
||||
[27] (byte) main::j#2 ← phi( main::@17/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(byte) main::j#1 )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@6
|
||||
[27] (byte) main::j#2 ← phi( main::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) main::j#1 )
|
||||
[28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
[29] (byte) main::j#1 ← ++ (byte) main::j#2
|
||||
[30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@11 main::@6
|
||||
[30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@2 main::@5
|
||||
asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
[32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@2 main::@8
|
||||
[34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@8
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@3
|
||||
[34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@10 main::@11
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4 main::@5
|
||||
[36] (byte) main::rst#1 ← *((const byte*) RASTER#0)
|
||||
[37] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
[38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32
|
||||
@ -59,8 +59,8 @@ main::@11: scope:[main] from main::@10 main::@11
|
||||
[40] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
[41] *((const byte*) BORDERCOL#0) ← (byte~) main::$34
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
[43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11
|
||||
to:main::@2
|
||||
[43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5
|
||||
to:main::@1
|
||||
gfx_init: scope:[gfx_init] from main
|
||||
[44] phi()
|
||||
[45] call gfx_init_screen0
|
||||
|
@ -1431,8 +1431,15 @@ Culled Empty Block (label) gfx_init_plane_charset8::@12
|
||||
Culled Empty Block (label) gfx_init_plane_charset8::@13
|
||||
Culled Empty Block (label) gfx_init_screen0::@5
|
||||
Culled Empty Block (label) gfx_init_screen0::@6
|
||||
Renumbering block @9 to @1
|
||||
Renumbering block main::@2 to main::@1
|
||||
Renumbering block main::@6 to main::@2
|
||||
Renumbering block main::@8 to main::@3
|
||||
Renumbering block main::@10 to main::@4
|
||||
Renumbering block main::@11 to main::@5
|
||||
Renumbering block main::@17 to main::@6
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @9
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of gfx_init
|
||||
Adding NOP phi() at start of gfx_init::@1
|
||||
@ -1442,20 +1449,20 @@ Adding NOP phi() at start of gfx_init_screen0
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@9
|
||||
@9: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @9
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @9
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[7] call gfx_init
|
||||
to:main::@17
|
||||
main::@17: scope:[main] from main
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main
|
||||
[8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0
|
||||
[10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
@ -1475,25 +1482,25 @@ main::@17: scope:[main] from main
|
||||
[24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) $4000
|
||||
[26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@17 main::@6
|
||||
[27] (byte) main::j#2 ← phi( main::@17/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(byte) main::j#1 )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@6
|
||||
[27] (byte) main::j#2 ← phi( main::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) main::j#1 )
|
||||
[28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
[29] (byte) main::j#1 ← ++ (byte) main::j#2
|
||||
[30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@11 main::@6
|
||||
[30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@2 main::@5
|
||||
asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
[32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@2 main::@8
|
||||
[34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@8
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@3
|
||||
[34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@10 main::@11
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4 main::@5
|
||||
[36] (byte) main::rst#1 ← *((const byte*) RASTER#0)
|
||||
[37] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
[38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32
|
||||
@ -1501,8 +1508,8 @@ main::@11: scope:[main] from main::@10 main::@11
|
||||
[40] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
[41] *((const byte*) BORDERCOL#0) ← (byte~) main::$34
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
[43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11
|
||||
to:main::@2
|
||||
[43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5
|
||||
to:main::@1
|
||||
gfx_init: scope:[gfx_init] from main
|
||||
[44] phi()
|
||||
[45] call gfx_init_screen0
|
||||
@ -1980,15 +1987,15 @@ INITIAL ASM
|
||||
.label CHARSET8 = $8000
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @9 [phi:@begin->@9]
|
||||
b9_from_bbegin:
|
||||
jmp b9
|
||||
//SEG5 @9
|
||||
b9:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @9 to @end [phi:@9->@end]
|
||||
bend_from_b9:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -2013,9 +2020,9 @@ main: {
|
||||
//SEG14 [44] phi from main to gfx_init [phi:main->gfx_init]
|
||||
gfx_init_from_main:
|
||||
jsr gfx_init
|
||||
jmp b17
|
||||
//SEG15 main::@17
|
||||
b17:
|
||||
jmp b6
|
||||
//SEG15 main::@6
|
||||
b6:
|
||||
//SEG16 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
@ -2081,32 +2088,32 @@ main: {
|
||||
// VIC memory
|
||||
lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2
|
||||
sta VIC_MEMORY
|
||||
//SEG35 [27] phi from main::@17 to main::@6 [phi:main::@17->main::@6]
|
||||
b6_from_b17:
|
||||
//SEG36 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@6#0] -- vbuz1=vbuc1
|
||||
//SEG35 [27] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
|
||||
b2_from_b6:
|
||||
//SEG36 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@2#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta j
|
||||
jmp b6
|
||||
jmp b2
|
||||
// DTV Palette - Grey Tones
|
||||
//SEG37 [27] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
|
||||
b6_from_b6:
|
||||
//SEG38 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@6->main::@6#0] -- register_copy
|
||||
jmp b6
|
||||
//SEG39 main::@6
|
||||
b6:
|
||||
//SEG37 [27] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
b2_from_b2:
|
||||
//SEG38 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@2#0] -- register_copy
|
||||
jmp b2
|
||||
//SEG39 main::@2
|
||||
b2:
|
||||
//SEG40 [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuz1=vbuz1
|
||||
ldy j
|
||||
tya
|
||||
sta DTV_PALETTE,y
|
||||
//SEG41 [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1
|
||||
inc j
|
||||
//SEG42 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6 -- vbuz1_neq_vbuc1_then_la1
|
||||
//SEG42 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #$10
|
||||
cmp j
|
||||
bne b6_from_b6
|
||||
jmp b2
|
||||
//SEG43 main::@2
|
||||
b2:
|
||||
bne b2_from_b2
|
||||
jmp b1
|
||||
//SEG43 main::@1
|
||||
b1:
|
||||
//SEG44 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
@ -2151,16 +2158,16 @@ main: {
|
||||
//SEG46 [33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
jmp b8
|
||||
//SEG47 main::@8
|
||||
b8:
|
||||
//SEG48 [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
jmp b3
|
||||
//SEG47 main::@3
|
||||
b3:
|
||||
//SEG48 [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
jmp b10
|
||||
//SEG49 main::@10
|
||||
b10:
|
||||
bne b3
|
||||
jmp b4
|
||||
//SEG49 main::@4
|
||||
b4:
|
||||
//SEG50 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -2180,9 +2187,9 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
jmp b11
|
||||
//SEG51 main::@11
|
||||
b11:
|
||||
jmp b5
|
||||
//SEG51 main::@5
|
||||
b5:
|
||||
//SEG52 [36] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuz1=_deref_pbuc1
|
||||
lda RASTER
|
||||
sta rst
|
||||
@ -2223,11 +2230,11 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG59 [43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11 -- vbuz1_neq_vbuc1_then_la1
|
||||
//SEG59 [43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #$f2
|
||||
cmp rst
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
//SEG60 gfx_init
|
||||
// Initialize the different graphics in the memory
|
||||
@ -2571,7 +2578,7 @@ Statement [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) S
|
||||
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x
|
||||
Statement [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ main::rst#1 ]
|
||||
Statement [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) always clobbers reg byte a
|
||||
@ -2620,7 +2627,7 @@ Statement [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) S
|
||||
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x
|
||||
Statement [32] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a
|
||||
Statement [38] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a
|
||||
Statement [40] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) always clobbers reg byte a
|
||||
@ -2762,15 +2769,15 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label CHARSET8 = $8000
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @9 [phi:@begin->@9]
|
||||
b9_from_bbegin:
|
||||
jmp b9
|
||||
//SEG5 @9
|
||||
b9:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @9 to @end [phi:@9->@end]
|
||||
bend_from_b9:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -2790,9 +2797,9 @@ main: {
|
||||
//SEG14 [44] phi from main to gfx_init [phi:main->gfx_init]
|
||||
gfx_init_from_main:
|
||||
jsr gfx_init
|
||||
jmp b17
|
||||
//SEG15 main::@17
|
||||
b17:
|
||||
jmp b6
|
||||
//SEG15 main::@6
|
||||
b6:
|
||||
//SEG16 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
@ -2858,29 +2865,29 @@ main: {
|
||||
// VIC memory
|
||||
lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2
|
||||
sta VIC_MEMORY
|
||||
//SEG35 [27] phi from main::@17 to main::@6 [phi:main::@17->main::@6]
|
||||
b6_from_b17:
|
||||
//SEG36 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@6#0] -- vbuxx=vbuc1
|
||||
//SEG35 [27] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
|
||||
b2_from_b6:
|
||||
//SEG36 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@2#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp b6
|
||||
jmp b2
|
||||
// DTV Palette - Grey Tones
|
||||
//SEG37 [27] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
|
||||
b6_from_b6:
|
||||
//SEG38 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@6->main::@6#0] -- register_copy
|
||||
jmp b6
|
||||
//SEG39 main::@6
|
||||
b6:
|
||||
//SEG37 [27] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
b2_from_b2:
|
||||
//SEG38 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@2#0] -- register_copy
|
||||
jmp b2
|
||||
//SEG39 main::@2
|
||||
b2:
|
||||
//SEG40 [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
//SEG41 [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG42 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG42 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$10
|
||||
bne b6_from_b6
|
||||
jmp b2
|
||||
//SEG43 main::@2
|
||||
b2:
|
||||
bne b2_from_b2
|
||||
jmp b1
|
||||
//SEG43 main::@1
|
||||
b1:
|
||||
//SEG44 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
@ -2925,16 +2932,16 @@ main: {
|
||||
//SEG46 [33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
jmp b8
|
||||
//SEG47 main::@8
|
||||
b8:
|
||||
//SEG48 [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
jmp b3
|
||||
//SEG47 main::@3
|
||||
b3:
|
||||
//SEG48 [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
jmp b10
|
||||
//SEG49 main::@10
|
||||
b10:
|
||||
bne b3
|
||||
jmp b4
|
||||
//SEG49 main::@4
|
||||
b4:
|
||||
//SEG50 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -2954,9 +2961,9 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
jmp b11
|
||||
//SEG51 main::@11
|
||||
b11:
|
||||
jmp b5
|
||||
//SEG51 main::@5
|
||||
b5:
|
||||
//SEG52 [36] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuxx=_deref_pbuc1
|
||||
ldx RASTER
|
||||
//SEG53 [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
|
||||
@ -2990,10 +2997,10 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG59 [43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG59 [43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$f2
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
//SEG60 gfx_init
|
||||
// Initialize the different graphics in the memory
|
||||
@ -3287,14 +3294,14 @@ gfx_init_screen0: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b17
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b8
|
||||
Removing instruction jmp b10
|
||||
Removing instruction jmp b11
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp b9
|
||||
@ -3319,16 +3326,16 @@ Removing instruction lda #0
|
||||
Removing instruction lda #0
|
||||
Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Replacing label b6_from_b6 with b6
|
||||
Replacing label b2_from_b2 with b2
|
||||
Replacing label b3_from_b4 with b3
|
||||
Replacing label b2_from_b6 with b2
|
||||
Replacing label b1_from_b7 with b1
|
||||
Replacing label b2_from_b2 with b2
|
||||
Replacing label b1_from_b3 with b1
|
||||
Removing instruction b9_from_bbegin:
|
||||
Removing instruction b9:
|
||||
Removing instruction bend_from_b9:
|
||||
Removing instruction b6_from_b6:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b2_from_b2:
|
||||
Removing instruction b1_from_gfx_init:
|
||||
Removing instruction gfx_init_plane_charset8_from_b1:
|
||||
Removing instruction b1_from_b7:
|
||||
@ -3341,9 +3348,9 @@ Removing instruction b2_from_b2:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction gfx_init_from_main:
|
||||
Removing instruction b17:
|
||||
Removing instruction b6_from_b17:
|
||||
Removing instruction b10:
|
||||
Removing instruction b6:
|
||||
Removing instruction b2_from_b6:
|
||||
Removing instruction b4:
|
||||
Removing instruction gfx_init_screen0_from_gfx_init:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
@ -3368,7 +3375,7 @@ Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Relabelling long label b4_from_b3 to b5
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
@ -3379,7 +3386,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @9
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -3674,12 +3681,12 @@ FINAL SYMBOL TABLE
|
||||
(byte~) main::$32 reg byte a 202.0
|
||||
(byte~) main::$33 reg byte a 202.0
|
||||
(byte~) main::$34 reg byte a 202.0
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
(label) main::@17
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@8
|
||||
(byte) main::j
|
||||
(byte) main::j#1 reg byte x 16.5
|
||||
(byte) main::j#2 reg byte x 22.0
|
||||
@ -3773,10 +3780,10 @@ Score: 75377
|
||||
// Plane with all pixels
|
||||
.label CHARSET8 = $8000
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @9 [phi:@begin->@9]
|
||||
//SEG5 @9
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @9 to @end [phi:@9->@end]
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
@ -3793,7 +3800,7 @@ main: {
|
||||
//SEG13 [7] call gfx_init
|
||||
//SEG14 [44] phi from main to gfx_init [phi:main->gfx_init]
|
||||
jsr gfx_init
|
||||
//SEG15 main::@17
|
||||
//SEG15 main::@6
|
||||
//SEG16 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
@ -3855,24 +3862,24 @@ main: {
|
||||
// VIC memory
|
||||
lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2
|
||||
sta VIC_MEMORY
|
||||
//SEG35 [27] phi from main::@17 to main::@6 [phi:main::@17->main::@6]
|
||||
//SEG36 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@6#0] -- vbuxx=vbuc1
|
||||
//SEG35 [27] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
|
||||
//SEG36 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@2#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
// DTV Palette - Grey Tones
|
||||
//SEG37 [27] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
|
||||
//SEG38 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@6->main::@6#0] -- register_copy
|
||||
//SEG39 main::@6
|
||||
b6:
|
||||
//SEG37 [27] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
//SEG38 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@2#0] -- register_copy
|
||||
//SEG39 main::@2
|
||||
b2:
|
||||
//SEG40 [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
//SEG41 [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG42 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG42 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$10
|
||||
bne b6
|
||||
//SEG43 main::@2
|
||||
b2:
|
||||
bne b2
|
||||
//SEG43 main::@1
|
||||
b1:
|
||||
//SEG44 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
@ -3917,13 +3924,13 @@ main: {
|
||||
//SEG46 [33] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
//SEG47 main::@8
|
||||
b8:
|
||||
//SEG48 [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
//SEG47 main::@3
|
||||
b3:
|
||||
//SEG48 [34] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
//SEG49 main::@10
|
||||
bne b3
|
||||
//SEG49 main::@4
|
||||
//SEG50 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -3943,8 +3950,8 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG51 main::@11
|
||||
b11:
|
||||
//SEG51 main::@5
|
||||
b5:
|
||||
//SEG52 [36] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuxx=_deref_pbuc1
|
||||
ldx RASTER
|
||||
//SEG53 [37] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
|
||||
@ -3978,10 +3985,10 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG59 [43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG59 [43] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$f2
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
//SEG60 gfx_init
|
||||
// Initialize the different graphics in the memory
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @9
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -293,12 +293,12 @@
|
||||
(byte~) main::$32 reg byte a 202.0
|
||||
(byte~) main::$33 reg byte a 202.0
|
||||
(byte~) main::$34 reg byte a 202.0
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
(label) main::@17
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@8
|
||||
(byte) main::j
|
||||
(byte) main::j#1 reg byte x 16.5
|
||||
(byte) main::j#2 reg byte x 22.0
|
||||
|
@ -88,13 +88,13 @@ main: {
|
||||
sta VIC_MEMORY
|
||||
ldx #0
|
||||
// DTV Palette - Grey Tones
|
||||
b6:
|
||||
b2:
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b6
|
||||
b2:
|
||||
bne b2
|
||||
b1:
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
rff:
|
||||
@ -136,10 +136,10 @@ main: {
|
||||
sta VIC_CONTROL
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
b8:
|
||||
b3:
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
bne b3
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
@ -158,7 +158,7 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
b11:
|
||||
b5:
|
||||
ldx RASTER
|
||||
txa
|
||||
and #7
|
||||
@ -186,8 +186,8 @@ main: {
|
||||
nop
|
||||
nop
|
||||
cpx #$f2
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
// Initialize Plane with 8bpp chunky
|
||||
gfx_init_chunky: {
|
||||
|
@ -1,19 +1,19 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@7
|
||||
@7: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @7
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @7
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[7] call gfx_init_chunky
|
||||
to:main::@17
|
||||
main::@17: scope:[main] from main
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main
|
||||
[8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0
|
||||
[10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
@ -27,25 +27,25 @@ main::@17: scope:[main] from main
|
||||
[18] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) $4000
|
||||
[20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@17 main::@6
|
||||
[21] (byte) main::j#2 ← phi( main::@17/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(byte) main::j#1 )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@6
|
||||
[21] (byte) main::j#2 ← phi( main::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) main::j#1 )
|
||||
[22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
[23] (byte) main::j#1 ← ++ (byte) main::j#2
|
||||
[24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@11 main::@6
|
||||
[24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@2 main::@5
|
||||
asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
[26] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@2 main::@8
|
||||
[28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@8
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@3
|
||||
[28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@10 main::@11
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4 main::@5
|
||||
[30] (byte) main::rst#1 ← *((const byte*) RASTER#0)
|
||||
[31] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
[32] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31
|
||||
@ -53,8 +53,8 @@ main::@11: scope:[main] from main::@10 main::@11
|
||||
[34] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
[35] *((const byte*) BORDERCOL#0) ← (byte~) main::$33
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
[37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11
|
||||
to:main::@2
|
||||
[37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5
|
||||
to:main::@1
|
||||
gfx_init_chunky: scope:[gfx_init_chunky] from main
|
||||
[38] phi()
|
||||
[39] call dtvSetCpuBankSegment1
|
||||
@ -73,13 +73,13 @@ gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_
|
||||
gfx_init_chunky::@4: scope:[gfx_init_chunky] from gfx_init_chunky::@2
|
||||
[43] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4
|
||||
[44] call dtvSetCpuBankSegment1
|
||||
to:gfx_init_chunky::@8
|
||||
gfx_init_chunky::@8: scope:[gfx_init_chunky] from gfx_init_chunky::@4
|
||||
to:gfx_init_chunky::@7
|
||||
gfx_init_chunky::@7: scope:[gfx_init_chunky] from gfx_init_chunky::@4
|
||||
[45] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4
|
||||
to:gfx_init_chunky::@3
|
||||
gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@8
|
||||
[46] (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::@8/(byte) gfx_init_chunky::gfxbCpuBank#2 )
|
||||
[46] (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@8/((byte*))(word/signed word/dword/signed dword) $4000 )
|
||||
gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@7
|
||||
[46] (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::@7/(byte) gfx_init_chunky::gfxbCpuBank#2 )
|
||||
[46] (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@7/((byte*))(word/signed word/dword/signed dword) $4000 )
|
||||
[47] (word~) gfx_init_chunky::$9 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6
|
||||
[48] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$9
|
||||
[49] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0
|
||||
|
@ -1199,8 +1199,16 @@ Culled Empty Block (label) main::@18
|
||||
Culled Empty Block (label) gfx_init_chunky::@10
|
||||
Culled Empty Block (label) gfx_init_chunky::@11
|
||||
Culled Empty Block (label) gfx_init_chunky::@12
|
||||
Renumbering block @7 to @1
|
||||
Renumbering block main::@2 to main::@1
|
||||
Renumbering block main::@6 to main::@2
|
||||
Renumbering block main::@8 to main::@3
|
||||
Renumbering block main::@10 to main::@4
|
||||
Renumbering block main::@11 to main::@5
|
||||
Renumbering block main::@17 to main::@6
|
||||
Renumbering block gfx_init_chunky::@8 to gfx_init_chunky::@7
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @7
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of gfx_init_chunky
|
||||
Adding NOP phi() at start of gfx_init_chunky::@6
|
||||
@ -1208,20 +1216,20 @@ Adding NOP phi() at start of gfx_init_chunky::@6
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@7
|
||||
@7: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @7
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @7
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[7] call gfx_init_chunky
|
||||
to:main::@17
|
||||
main::@17: scope:[main] from main
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main
|
||||
[8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0
|
||||
[10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
@ -1235,25 +1243,25 @@ main::@17: scope:[main] from main
|
||||
[18] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) $4000
|
||||
[20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) $3fff>>(byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@17 main::@6
|
||||
[21] (byte) main::j#2 ← phi( main::@17/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@6/(byte) main::j#1 )
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@2 main::@6
|
||||
[21] (byte) main::j#2 ← phi( main::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) main::j#1 )
|
||||
[22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2
|
||||
[23] (byte) main::j#1 ← ++ (byte) main::j#2
|
||||
[24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@11 main::@6
|
||||
[24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@2 main::@5
|
||||
asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
[26] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@2 main::@8
|
||||
[28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@8
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@3
|
||||
[28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@10 main::@11
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4 main::@5
|
||||
[30] (byte) main::rst#1 ← *((const byte*) RASTER#0)
|
||||
[31] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7
|
||||
[32] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31
|
||||
@ -1261,8 +1269,8 @@ main::@11: scope:[main] from main::@10 main::@11
|
||||
[34] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4
|
||||
[35] *((const byte*) BORDERCOL#0) ← (byte~) main::$33
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
[37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11
|
||||
to:main::@2
|
||||
[37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5
|
||||
to:main::@1
|
||||
gfx_init_chunky: scope:[gfx_init_chunky] from main
|
||||
[38] phi()
|
||||
[39] call dtvSetCpuBankSegment1
|
||||
@ -1281,13 +1289,13 @@ gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_
|
||||
gfx_init_chunky::@4: scope:[gfx_init_chunky] from gfx_init_chunky::@2
|
||||
[43] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4
|
||||
[44] call dtvSetCpuBankSegment1
|
||||
to:gfx_init_chunky::@8
|
||||
gfx_init_chunky::@8: scope:[gfx_init_chunky] from gfx_init_chunky::@4
|
||||
to:gfx_init_chunky::@7
|
||||
gfx_init_chunky::@7: scope:[gfx_init_chunky] from gfx_init_chunky::@4
|
||||
[45] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4
|
||||
to:gfx_init_chunky::@3
|
||||
gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@8
|
||||
[46] (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::@8/(byte) gfx_init_chunky::gfxbCpuBank#2 )
|
||||
[46] (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@8/((byte*))(word/signed word/dword/signed dword) $4000 )
|
||||
gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@7
|
||||
[46] (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::@7/(byte) gfx_init_chunky::gfxbCpuBank#2 )
|
||||
[46] (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@7/((byte*))(word/signed word/dword/signed dword) $4000 )
|
||||
[47] (word~) gfx_init_chunky::$9 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6
|
||||
[48] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$9
|
||||
[49] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0
|
||||
@ -1619,15 +1627,15 @@ INITIAL ASM
|
||||
.label CHUNKY = $8000
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @7 [phi:@begin->@7]
|
||||
b7_from_bbegin:
|
||||
jmp b7
|
||||
//SEG5 @7
|
||||
b7:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @7 to @end [phi:@7->@end]
|
||||
bend_from_b7:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -1652,9 +1660,9 @@ main: {
|
||||
//SEG14 [38] phi from main to gfx_init_chunky [phi:main->gfx_init_chunky]
|
||||
gfx_init_chunky_from_main:
|
||||
jsr gfx_init_chunky
|
||||
jmp b17
|
||||
//SEG15 main::@17
|
||||
b17:
|
||||
jmp b6
|
||||
//SEG15 main::@6
|
||||
b6:
|
||||
//SEG16 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
@ -1701,32 +1709,32 @@ main: {
|
||||
// VIC memory
|
||||
lda #(CHUNKY&$3fff)>>6|(0)>>2
|
||||
sta VIC_MEMORY
|
||||
//SEG29 [21] phi from main::@17 to main::@6 [phi:main::@17->main::@6]
|
||||
b6_from_b17:
|
||||
//SEG30 [21] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@6#0] -- vbuz1=vbuc1
|
||||
//SEG29 [21] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
|
||||
b2_from_b6:
|
||||
//SEG30 [21] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@2#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta j
|
||||
jmp b6
|
||||
jmp b2
|
||||
// DTV Palette - Grey Tones
|
||||
//SEG31 [21] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
|
||||
b6_from_b6:
|
||||
//SEG32 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@6->main::@6#0] -- register_copy
|
||||
jmp b6
|
||||
//SEG33 main::@6
|
||||
b6:
|
||||
//SEG31 [21] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
b2_from_b2:
|
||||
//SEG32 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@2#0] -- register_copy
|
||||
jmp b2
|
||||
//SEG33 main::@2
|
||||
b2:
|
||||
//SEG34 [22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuz1=vbuz1
|
||||
ldy j
|
||||
tya
|
||||
sta DTV_PALETTE,y
|
||||
//SEG35 [23] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1
|
||||
inc j
|
||||
//SEG36 [24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6 -- vbuz1_neq_vbuc1_then_la1
|
||||
//SEG36 [24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #$10
|
||||
cmp j
|
||||
bne b6_from_b6
|
||||
jmp b2
|
||||
//SEG37 main::@2
|
||||
b2:
|
||||
bne b2_from_b2
|
||||
jmp b1
|
||||
//SEG37 main::@1
|
||||
b1:
|
||||
//SEG38 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
@ -1771,16 +1779,16 @@ main: {
|
||||
//SEG40 [27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
jmp b8
|
||||
//SEG41 main::@8
|
||||
b8:
|
||||
//SEG42 [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
jmp b3
|
||||
//SEG41 main::@3
|
||||
b3:
|
||||
//SEG42 [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
jmp b10
|
||||
//SEG43 main::@10
|
||||
b10:
|
||||
bne b3
|
||||
jmp b4
|
||||
//SEG43 main::@4
|
||||
b4:
|
||||
//SEG44 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -1800,9 +1808,9 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
jmp b11
|
||||
//SEG45 main::@11
|
||||
b11:
|
||||
jmp b5
|
||||
//SEG45 main::@5
|
||||
b5:
|
||||
//SEG46 [30] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuz1=_deref_pbuc1
|
||||
lda RASTER
|
||||
sta rst
|
||||
@ -1843,11 +1851,11 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG53 [37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11 -- vbuz1_neq_vbuc1_then_la1
|
||||
//SEG53 [37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #$f2
|
||||
cmp rst
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
//SEG54 gfx_init_chunky
|
||||
// Initialize Plane with 8bpp chunky
|
||||
@ -1923,15 +1931,15 @@ gfx_init_chunky: {
|
||||
dtvSetCpuBankSegment1_from_b4:
|
||||
//SEG81 [58] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1#0] -- register_copy
|
||||
jsr dtvSetCpuBankSegment1
|
||||
jmp b8
|
||||
//SEG82 gfx_init_chunky::@8
|
||||
b8:
|
||||
jmp b7
|
||||
//SEG82 gfx_init_chunky::@7
|
||||
b7:
|
||||
//SEG83 [45] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 -- vbuz1=_inc_vbuz1
|
||||
inc gfxbCpuBank
|
||||
//SEG84 [46] phi from gfx_init_chunky::@8 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3]
|
||||
b3_from_b8:
|
||||
//SEG85 [46] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#0] -- register_copy
|
||||
//SEG86 [46] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) $4000 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#1] -- pbuz1=pbuc1
|
||||
//SEG84 [46] phi from gfx_init_chunky::@7 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3]
|
||||
b3_from_b7:
|
||||
//SEG85 [46] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3#0] -- register_copy
|
||||
//SEG86 [46] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) $4000 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3#1] -- pbuz1=pbuc1
|
||||
lda #<$4000
|
||||
sta gfxb
|
||||
lda #>$4000
|
||||
@ -2045,7 +2053,7 @@ Statement [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) C
|
||||
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x
|
||||
Statement [26] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [32] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ main::rst#1 ]
|
||||
Statement [34] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a
|
||||
@ -2077,7 +2085,7 @@ Statement [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) C
|
||||
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x
|
||||
Statement [26] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [31] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) always clobbers reg byte a
|
||||
Statement [32] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a
|
||||
Statement [34] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a
|
||||
@ -2173,15 +2181,15 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label CHUNKY = $8000
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @7 [phi:@begin->@7]
|
||||
b7_from_bbegin:
|
||||
jmp b7
|
||||
//SEG5 @7
|
||||
b7:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @7 to @end [phi:@7->@end]
|
||||
bend_from_b7:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -2201,9 +2209,9 @@ main: {
|
||||
//SEG14 [38] phi from main to gfx_init_chunky [phi:main->gfx_init_chunky]
|
||||
gfx_init_chunky_from_main:
|
||||
jsr gfx_init_chunky
|
||||
jmp b17
|
||||
//SEG15 main::@17
|
||||
b17:
|
||||
jmp b6
|
||||
//SEG15 main::@6
|
||||
b6:
|
||||
//SEG16 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
@ -2250,29 +2258,29 @@ main: {
|
||||
// VIC memory
|
||||
lda #(CHUNKY&$3fff)>>6|(0)>>2
|
||||
sta VIC_MEMORY
|
||||
//SEG29 [21] phi from main::@17 to main::@6 [phi:main::@17->main::@6]
|
||||
b6_from_b17:
|
||||
//SEG30 [21] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@6#0] -- vbuxx=vbuc1
|
||||
//SEG29 [21] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
|
||||
b2_from_b6:
|
||||
//SEG30 [21] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@2#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp b6
|
||||
jmp b2
|
||||
// DTV Palette - Grey Tones
|
||||
//SEG31 [21] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
|
||||
b6_from_b6:
|
||||
//SEG32 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@6->main::@6#0] -- register_copy
|
||||
jmp b6
|
||||
//SEG33 main::@6
|
||||
b6:
|
||||
//SEG31 [21] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
b2_from_b2:
|
||||
//SEG32 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@2#0] -- register_copy
|
||||
jmp b2
|
||||
//SEG33 main::@2
|
||||
b2:
|
||||
//SEG34 [22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
//SEG35 [23] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG36 [24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG36 [24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$10
|
||||
bne b6_from_b6
|
||||
jmp b2
|
||||
//SEG37 main::@2
|
||||
b2:
|
||||
bne b2_from_b2
|
||||
jmp b1
|
||||
//SEG37 main::@1
|
||||
b1:
|
||||
//SEG38 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
@ -2317,16 +2325,16 @@ main: {
|
||||
//SEG40 [27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
jmp b8
|
||||
//SEG41 main::@8
|
||||
b8:
|
||||
//SEG42 [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
jmp b3
|
||||
//SEG41 main::@3
|
||||
b3:
|
||||
//SEG42 [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
jmp b10
|
||||
//SEG43 main::@10
|
||||
b10:
|
||||
bne b3
|
||||
jmp b4
|
||||
//SEG43 main::@4
|
||||
b4:
|
||||
//SEG44 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -2346,9 +2354,9 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
jmp b11
|
||||
//SEG45 main::@11
|
||||
b11:
|
||||
jmp b5
|
||||
//SEG45 main::@5
|
||||
b5:
|
||||
//SEG46 [30] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuxx=_deref_pbuc1
|
||||
ldx RASTER
|
||||
//SEG47 [31] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
|
||||
@ -2382,10 +2390,10 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG53 [37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG53 [37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$f2
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
//SEG54 gfx_init_chunky
|
||||
// Initialize Plane with 8bpp chunky
|
||||
@ -2456,15 +2464,15 @@ gfx_init_chunky: {
|
||||
dtvSetCpuBankSegment1_from_b4:
|
||||
//SEG81 [58] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1#0] -- register_copy
|
||||
jsr dtvSetCpuBankSegment1
|
||||
jmp b8
|
||||
//SEG82 gfx_init_chunky::@8
|
||||
b8:
|
||||
jmp b7
|
||||
//SEG82 gfx_init_chunky::@7
|
||||
b7:
|
||||
//SEG83 [45] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG84 [46] phi from gfx_init_chunky::@8 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3]
|
||||
b3_from_b8:
|
||||
//SEG85 [46] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#0] -- register_copy
|
||||
//SEG86 [46] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) $4000 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#1] -- pbuz1=pbuc1
|
||||
//SEG84 [46] phi from gfx_init_chunky::@7 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3]
|
||||
b3_from_b7:
|
||||
//SEG85 [46] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3#0] -- register_copy
|
||||
//SEG86 [46] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) $4000 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3#1] -- pbuz1=pbuc1
|
||||
lda #<$4000
|
||||
sta gfxb
|
||||
lda #>$4000
|
||||
@ -2555,18 +2563,18 @@ dtvSetCpuBankSegment1: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b17
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b8
|
||||
Removing instruction jmp b10
|
||||
Removing instruction jmp b11
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b8
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b6
|
||||
@ -2576,16 +2584,16 @@ Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction lda #0
|
||||
Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Replacing label b6_from_b6 with b6
|
||||
Replacing label b2_from_b2 with b2
|
||||
Replacing label b3_from_b2 with b3
|
||||
Replacing label b3_from_b2 with b3
|
||||
Replacing label b2_from_b3 with b2
|
||||
Replacing label b2_from_b3 with b2
|
||||
Replacing label b1_from_b5 with b1
|
||||
Removing instruction b7_from_bbegin:
|
||||
Removing instruction b7:
|
||||
Removing instruction bend_from_b7:
|
||||
Removing instruction b6_from_b6:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b2_from_b2:
|
||||
Removing instruction b1_from_b5:
|
||||
Removing instruction b2_from_b1:
|
||||
Removing instruction b2_from_b3:
|
||||
@ -2595,15 +2603,15 @@ Removing instruction dtvSetCpuBankSegment1_from_b6:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction gfx_init_chunky_from_main:
|
||||
Removing instruction b17:
|
||||
Removing instruction b6_from_b17:
|
||||
Removing instruction b10:
|
||||
Removing instruction b6:
|
||||
Removing instruction b2_from_b6:
|
||||
Removing instruction b4:
|
||||
Removing instruction dtvSetCpuBankSegment1_from_gfx_init_chunky:
|
||||
Removing instruction b1_from_gfx_init_chunky:
|
||||
Removing instruction b4:
|
||||
Removing instruction dtvSetCpuBankSegment1_from_b4:
|
||||
Removing instruction b8:
|
||||
Removing instruction b3_from_b8:
|
||||
Removing instruction b7:
|
||||
Removing instruction b3_from_b7:
|
||||
Removing instruction b5:
|
||||
Removing instruction b6:
|
||||
Removing instruction breturn:
|
||||
@ -2612,7 +2620,7 @@ Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
@ -2621,7 +2629,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @7
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -2846,7 +2854,7 @@ FINAL SYMBOL TABLE
|
||||
(label) gfx_init_chunky::@4
|
||||
(label) gfx_init_chunky::@5
|
||||
(label) gfx_init_chunky::@6
|
||||
(label) gfx_init_chunky::@8
|
||||
(label) gfx_init_chunky::@7
|
||||
(label) gfx_init_chunky::@return
|
||||
(byte) gfx_init_chunky::c
|
||||
(byte) gfx_init_chunky::c#0 reg byte a 202.0
|
||||
@ -2870,12 +2878,12 @@ FINAL SYMBOL TABLE
|
||||
(byte~) main::$31 reg byte a 202.0
|
||||
(byte~) main::$32 reg byte a 202.0
|
||||
(byte~) main::$33 reg byte a 202.0
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
(label) main::@17
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@8
|
||||
(byte) main::j
|
||||
(byte) main::j#1 reg byte x 16.5
|
||||
(byte) main::j#2 reg byte x 22.0
|
||||
@ -2950,10 +2958,10 @@ Score: 19882
|
||||
// Plane with all pixels
|
||||
.label CHUNKY = $8000
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @7 [phi:@begin->@7]
|
||||
//SEG5 @7
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @7 to @end [phi:@7->@end]
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
@ -2970,7 +2978,7 @@ main: {
|
||||
//SEG13 [7] call gfx_init_chunky
|
||||
//SEG14 [38] phi from main to gfx_init_chunky [phi:main->gfx_init_chunky]
|
||||
jsr gfx_init_chunky
|
||||
//SEG15 main::@17
|
||||
//SEG15 main::@6
|
||||
//SEG16 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 -- _deref_pbuc1=vbuc2
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
@ -3016,24 +3024,24 @@ main: {
|
||||
// VIC memory
|
||||
lda #(CHUNKY&$3fff)>>6|(0)>>2
|
||||
sta VIC_MEMORY
|
||||
//SEG29 [21] phi from main::@17 to main::@6 [phi:main::@17->main::@6]
|
||||
//SEG30 [21] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@6#0] -- vbuxx=vbuc1
|
||||
//SEG29 [21] phi from main::@6 to main::@2 [phi:main::@6->main::@2]
|
||||
//SEG30 [21] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@2#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
// DTV Palette - Grey Tones
|
||||
//SEG31 [21] phi from main::@6 to main::@6 [phi:main::@6->main::@6]
|
||||
//SEG32 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@6->main::@6#0] -- register_copy
|
||||
//SEG33 main::@6
|
||||
b6:
|
||||
//SEG31 [21] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
//SEG32 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@2->main::@2#0] -- register_copy
|
||||
//SEG33 main::@2
|
||||
b2:
|
||||
//SEG34 [22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
||||
txa
|
||||
sta DTV_PALETTE,x
|
||||
//SEG35 [23] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG36 [24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@6 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG36 [24] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@2 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$10
|
||||
bne b6
|
||||
//SEG37 main::@2
|
||||
b2:
|
||||
bne b2
|
||||
//SEG37 main::@1
|
||||
b1:
|
||||
//SEG38 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize }
|
||||
// Stabilize Raster
|
||||
ldx #$ff
|
||||
@ -3078,13 +3086,13 @@ main: {
|
||||
//SEG40 [27] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta BORDERCOL
|
||||
//SEG41 main::@8
|
||||
b8:
|
||||
//SEG42 [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@8 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
//SEG41 main::@3
|
||||
b3:
|
||||
//SEG42 [28] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$42
|
||||
cmp RASTER
|
||||
bne b8
|
||||
//SEG43 main::@10
|
||||
bne b3
|
||||
//SEG43 main::@4
|
||||
//SEG44 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -3104,8 +3112,8 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG45 main::@11
|
||||
b11:
|
||||
//SEG45 main::@5
|
||||
b5:
|
||||
//SEG46 [30] (byte) main::rst#1 ← *((const byte*) RASTER#0) -- vbuxx=_deref_pbuc1
|
||||
ldx RASTER
|
||||
//SEG47 [31] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 -- vbuaa=vbuxx_band_vbuc1
|
||||
@ -3139,10 +3147,10 @@ main: {
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
//SEG53 [37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@11 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG53 [37] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$f2
|
||||
bne b11
|
||||
jmp b2
|
||||
bne b5
|
||||
jmp b1
|
||||
}
|
||||
//SEG54 gfx_init_chunky
|
||||
// Initialize Plane with 8bpp chunky
|
||||
@ -3200,12 +3208,12 @@ gfx_init_chunky: {
|
||||
//SEG80 [58] phi from gfx_init_chunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1]
|
||||
//SEG81 [58] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1#0] -- register_copy
|
||||
jsr dtvSetCpuBankSegment1
|
||||
//SEG82 gfx_init_chunky::@8
|
||||
//SEG82 gfx_init_chunky::@7
|
||||
//SEG83 [45] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG84 [46] phi from gfx_init_chunky::@8 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3]
|
||||
//SEG85 [46] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#0] -- register_copy
|
||||
//SEG86 [46] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) $4000 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#1] -- pbuz1=pbuc1
|
||||
//SEG84 [46] phi from gfx_init_chunky::@7 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3]
|
||||
//SEG85 [46] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3#0] -- register_copy
|
||||
//SEG86 [46] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) $4000 [phi:gfx_init_chunky::@7->gfx_init_chunky::@3#1] -- pbuz1=pbuc1
|
||||
lda #<$4000
|
||||
sta gfxb
|
||||
lda #>$4000
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @7
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -223,7 +223,7 @@
|
||||
(label) gfx_init_chunky::@4
|
||||
(label) gfx_init_chunky::@5
|
||||
(label) gfx_init_chunky::@6
|
||||
(label) gfx_init_chunky::@8
|
||||
(label) gfx_init_chunky::@7
|
||||
(label) gfx_init_chunky::@return
|
||||
(byte) gfx_init_chunky::c
|
||||
(byte) gfx_init_chunky::c#0 reg byte a 202.0
|
||||
@ -247,12 +247,12 @@
|
||||
(byte~) main::$31 reg byte a 202.0
|
||||
(byte~) main::$32 reg byte a 202.0
|
||||
(byte~) main::$33 reg byte a 202.0
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
(label) main::@17
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@8
|
||||
(byte) main::j
|
||||
(byte) main::j#1 reg byte x 16.5
|
||||
(byte) main::j#2 reg byte x 22.0
|
||||
|
@ -138,17 +138,17 @@ main: {
|
||||
sta DTV_BLITTER_CONTROL2
|
||||
ldx #0
|
||||
// wait til blitter is ready
|
||||
b2:
|
||||
b1:
|
||||
lda #DTV_BLIT_STATUS_BUSY
|
||||
and DTV_BLITTER_CONTROL2
|
||||
cmp #0
|
||||
bne b2
|
||||
bne b1
|
||||
// restart
|
||||
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
|
||||
sta DTV_BLITTER_CONTROL
|
||||
inx
|
||||
cpx #8
|
||||
bne b2
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@6
|
||||
@6: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @6
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @6
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0
|
||||
[6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0
|
||||
@ -40,17 +40,17 @@ main: scope:[main] from @6
|
||||
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0
|
||||
[34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
|
||||
[35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main main::@2 main::@3
|
||||
[36] (byte) main::r#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::r#1 )
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1 main::@2
|
||||
[36] (byte) main::r#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) main::r#1 )
|
||||
[37] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0
|
||||
[38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
[38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[39] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
|
||||
[40] (byte) main::r#1 ← ++ (byte) main::r#2
|
||||
[41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2
|
||||
[41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
main::@return: scope:[main] from main::@2
|
||||
[42] return
|
||||
to:@return
|
||||
|
@ -912,21 +912,24 @@ Created 1 initial phi equivalence classes
|
||||
Coalesced [43] main::r#5 ← main::r#1
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Culled Empty Block (label) main::@5
|
||||
Renumbering block @6 to @1
|
||||
Renumbering block main::@2 to main::@1
|
||||
Renumbering block main::@3 to main::@2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @6
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@6
|
||||
@6: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @6
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @6
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[5] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_CLEAR_IRQ#0
|
||||
[6] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0
|
||||
@ -959,18 +962,18 @@ main: scope:[main] from @6
|
||||
[33] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0
|
||||
[34] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
|
||||
[35] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main main::@2 main::@3
|
||||
[36] (byte) main::r#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::r#1 )
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1 main::@2
|
||||
[36] (byte) main::r#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@2/(byte) main::r#1 )
|
||||
[37] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0
|
||||
[38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
[38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[39] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0
|
||||
[40] (byte) main::r#1 ← ++ (byte) main::r#2
|
||||
[41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2
|
||||
[41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
main::@return: scope:[main] from main::@2
|
||||
[42] return
|
||||
to:@return
|
||||
|
||||
@ -1248,15 +1251,15 @@ INITIAL ASM
|
||||
.const SRCA_LEN = 9
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
|
||||
b6_from_bbegin:
|
||||
jmp b6
|
||||
//SEG5 @6
|
||||
b6:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
|
||||
bend_from_b6:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -1366,43 +1369,43 @@ main: {
|
||||
// Instruct blitter to continue at DEST and restart SRC A/B
|
||||
lda #DTV_BLIT_DEST_CONT
|
||||
sta DTV_BLITTER_CONTROL2
|
||||
//SEG42 [36] phi from main to main::@2 [phi:main->main::@2]
|
||||
b2_from_main:
|
||||
//SEG43 [36] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1
|
||||
//SEG42 [36] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG43 [36] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta r
|
||||
jmp b2
|
||||
jmp b1
|
||||
// wait til blitter is ready
|
||||
//SEG44 [36] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
b2_from_b2:
|
||||
jmp b2
|
||||
//SEG45 [36] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
b2_from_b3:
|
||||
//SEG46 [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@2#0] -- register_copy
|
||||
jmp b2
|
||||
//SEG47 main::@2
|
||||
b2:
|
||||
//SEG44 [36] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
b1_from_b1:
|
||||
jmp b1
|
||||
//SEG45 [36] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1_from_b2:
|
||||
//SEG46 [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
jmp b1
|
||||
//SEG47 main::@1
|
||||
b1:
|
||||
//SEG48 [37] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 -- vbuz1=_deref_pbuc1_band_vbuc2
|
||||
lda #DTV_BLIT_STATUS_BUSY
|
||||
and DTV_BLITTER_CONTROL2
|
||||
sta _15
|
||||
//SEG49 [38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -- vbuz1_neq_0_then_la1
|
||||
//SEG49 [38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuz1_neq_0_then_la1
|
||||
lda _15
|
||||
cmp #0
|
||||
bne b2_from_b2
|
||||
jmp b3
|
||||
//SEG50 main::@3
|
||||
b3:
|
||||
bne b1_from_b1
|
||||
jmp b2
|
||||
//SEG50 main::@2
|
||||
b2:
|
||||
//SEG51 [39] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 -- _deref_pbuc1=vbuc2
|
||||
// restart
|
||||
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
|
||||
sta DTV_BLITTER_CONTROL
|
||||
//SEG52 [40] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuz1=_inc_vbuz1
|
||||
inc r
|
||||
//SEG53 [41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -- vbuz1_neq_vbuc1_then_la1
|
||||
//SEG53 [41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #8
|
||||
cmp r
|
||||
bne b2_from_b3
|
||||
bne b1_from_b2
|
||||
jmp breturn
|
||||
//SEG54 main::@return
|
||||
breturn:
|
||||
@ -1571,15 +1574,15 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.const SRCA_LEN = 9
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
|
||||
b6_from_bbegin:
|
||||
jmp b6
|
||||
//SEG5 @6
|
||||
b6:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
|
||||
bend_from_b6:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -1687,39 +1690,39 @@ main: {
|
||||
// Instruct blitter to continue at DEST and restart SRC A/B
|
||||
lda #DTV_BLIT_DEST_CONT
|
||||
sta DTV_BLITTER_CONTROL2
|
||||
//SEG42 [36] phi from main to main::@2 [phi:main->main::@2]
|
||||
b2_from_main:
|
||||
//SEG43 [36] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1
|
||||
//SEG42 [36] phi from main to main::@1 [phi:main->main::@1]
|
||||
b1_from_main:
|
||||
//SEG43 [36] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp b2
|
||||
jmp b1
|
||||
// wait til blitter is ready
|
||||
//SEG44 [36] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
b2_from_b2:
|
||||
jmp b2
|
||||
//SEG45 [36] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
b2_from_b3:
|
||||
//SEG46 [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@2#0] -- register_copy
|
||||
jmp b2
|
||||
//SEG47 main::@2
|
||||
b2:
|
||||
//SEG44 [36] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
b1_from_b1:
|
||||
jmp b1
|
||||
//SEG45 [36] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
b1_from_b2:
|
||||
//SEG46 [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
jmp b1
|
||||
//SEG47 main::@1
|
||||
b1:
|
||||
//SEG48 [37] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 -- vbuaa=_deref_pbuc1_band_vbuc2
|
||||
lda #DTV_BLIT_STATUS_BUSY
|
||||
and DTV_BLITTER_CONTROL2
|
||||
//SEG49 [38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -- vbuaa_neq_0_then_la1
|
||||
//SEG49 [38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuaa_neq_0_then_la1
|
||||
cmp #0
|
||||
bne b2_from_b2
|
||||
jmp b3
|
||||
//SEG50 main::@3
|
||||
b3:
|
||||
bne b1_from_b1
|
||||
jmp b2
|
||||
//SEG50 main::@2
|
||||
b2:
|
||||
//SEG51 [39] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 -- _deref_pbuc1=vbuc2
|
||||
// restart
|
||||
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
|
||||
sta DTV_BLITTER_CONTROL
|
||||
//SEG52 [40] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG53 [41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG53 [41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #8
|
||||
bne b2_from_b3
|
||||
bne b1_from_b2
|
||||
jmp breturn
|
||||
//SEG54 main::@return
|
||||
breturn:
|
||||
@ -1730,10 +1733,10 @@ main: {
|
||||
SRCB: .byte $80
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction lda #0
|
||||
@ -1743,35 +1746,35 @@ Removing instruction lda #0
|
||||
Removing instruction lda #0
|
||||
Removing instruction lda #0
|
||||
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
||||
Replacing label b2_from_b3 with b2
|
||||
Removing instruction b6_from_bbegin:
|
||||
Removing instruction b6:
|
||||
Removing instruction bend_from_b6:
|
||||
Removing instruction b2_from_b3:
|
||||
Replacing label b1_from_b2 with b1
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_b2:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b2_from_main:
|
||||
Removing instruction b3:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Skipping double jump to b2 in bne b2_from_b2
|
||||
Skipping double jump to b1 in bne b1_from_b1
|
||||
Succesful ASM optimization Pass5DoubleJumpElimination
|
||||
Relabelling long label b2_from_b2 to b1
|
||||
Relabelling long label b1_from_b1 to b2
|
||||
Succesful ASM optimization Pass5RelabelLongLabels
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b1:
|
||||
Removing instruction b2:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @6
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -1999,8 +2002,8 @@ FINAL SYMBOL TABLE
|
||||
(byte) YELLOW
|
||||
(void()) main()
|
||||
(byte~) main::$15 reg byte a 202.0
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@return
|
||||
(byte) main::r
|
||||
(byte) main::r#1 reg byte x 16.5
|
||||
@ -2090,10 +2093,10 @@ Score: 1561
|
||||
.label SCREEN = $400
|
||||
.const SRCA_LEN = 9
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
|
||||
//SEG5 @6
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
@ -2193,31 +2196,31 @@ main: {
|
||||
// Instruct blitter to continue at DEST and restart SRC A/B
|
||||
lda #DTV_BLIT_DEST_CONT
|
||||
sta DTV_BLITTER_CONTROL2
|
||||
//SEG42 [36] phi from main to main::@2 [phi:main->main::@2]
|
||||
//SEG43 [36] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1
|
||||
//SEG42 [36] phi from main to main::@1 [phi:main->main::@1]
|
||||
//SEG43 [36] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@1#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
// wait til blitter is ready
|
||||
//SEG44 [36] phi from main::@2 to main::@2 [phi:main::@2->main::@2]
|
||||
//SEG45 [36] phi from main::@3 to main::@2 [phi:main::@3->main::@2]
|
||||
//SEG46 [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@2#0] -- register_copy
|
||||
//SEG47 main::@2
|
||||
b2:
|
||||
//SEG44 [36] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
||||
//SEG45 [36] phi from main::@2 to main::@1 [phi:main::@2->main::@1]
|
||||
//SEG46 [36] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@2->main::@1#0] -- register_copy
|
||||
//SEG47 main::@1
|
||||
b1:
|
||||
//SEG48 [37] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 -- vbuaa=_deref_pbuc1_band_vbuc2
|
||||
lda #DTV_BLIT_STATUS_BUSY
|
||||
and DTV_BLITTER_CONTROL2
|
||||
//SEG49 [38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 -- vbuaa_neq_0_then_la1
|
||||
//SEG49 [38] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@1 -- vbuaa_neq_0_then_la1
|
||||
cmp #0
|
||||
bne b2
|
||||
//SEG50 main::@3
|
||||
bne b1
|
||||
//SEG50 main::@2
|
||||
//SEG51 [39] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 -- _deref_pbuc1=vbuc2
|
||||
// restart
|
||||
lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD
|
||||
sta DTV_BLITTER_CONTROL
|
||||
//SEG52 [40] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG53 [41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG53 [41] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #8
|
||||
bne b2
|
||||
bne b1
|
||||
//SEG54 main::@return
|
||||
//SEG55 [42] return
|
||||
rts
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @6
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -226,8 +226,8 @@
|
||||
(byte) YELLOW
|
||||
(void()) main()
|
||||
(byte~) main::$15 reg byte a 202.0
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@return
|
||||
(byte) main::r
|
||||
(byte) main::r#1 reg byte x 16.5
|
||||
|
@ -20,15 +20,15 @@ main: {
|
||||
sta DTV_FEATURE
|
||||
lda #DTV_HIGHCOLOR|DTV_BORDER_OFF|DTV_BADLINE_OFF
|
||||
sta DTV_CONTROL
|
||||
b6:
|
||||
b1:
|
||||
lda #$40
|
||||
cmp RASTER
|
||||
bne b6
|
||||
bne b1
|
||||
// Create rasterbars
|
||||
lda #0
|
||||
sta BGCOL
|
||||
ldx #$31
|
||||
b9:
|
||||
b3:
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
@ -57,16 +57,16 @@ main: {
|
||||
inc BGCOL
|
||||
inx
|
||||
cpx #0
|
||||
bne b9
|
||||
bne b3
|
||||
ldx #0
|
||||
// Rotate palette
|
||||
b11:
|
||||
b4:
|
||||
lda palette,x
|
||||
sta DTV_PALETTE,x
|
||||
inc palette,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b11
|
||||
jmp b6
|
||||
bne b4
|
||||
jmp b1
|
||||
palette: .byte 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, $a, $b, $c, $d, $e, $f
|
||||
}
|
||||
|
@ -1,34 +1,34 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@6
|
||||
@6: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @6
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @6
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main main::@11 main::@6
|
||||
[7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@6
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1 main::@4
|
||||
[7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@8 main::@9
|
||||
[9] (byte) main::r#2 ← phi( main::@8/(byte/signed byte/word/signed word/dword/signed dword) $31 main::@9/(byte) main::r#1 )
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@3
|
||||
[9] (byte) main::r#2 ← phi( main::@2/(byte/signed byte/word/signed word/dword/signed dword) $31 main::@3/(byte) main::r#1 )
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
[11] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
|
||||
[12] (byte) main::r#1 ← ++ (byte) main::r#2
|
||||
[13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@11 main::@9
|
||||
[14] (byte) main::c#2 ← phi( main::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@11/(byte) main::c#1 )
|
||||
[13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3 main::@4
|
||||
[14] (byte) main::c#2 ← phi( main::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@4/(byte) main::c#1 )
|
||||
[15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2)
|
||||
[16] *((const byte[$10]) main::palette#0 + (byte) main::c#2) ← ++ *((const byte[$10]) main::palette#0 + (byte) main::c#2)
|
||||
[17] (byte) main::c#1 ← ++ (byte) main::c#2
|
||||
[18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@11
|
||||
to:main::@6
|
||||
[18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@4
|
||||
to:main::@1
|
||||
|
@ -841,45 +841,50 @@ Coalesced [20] main::r#3 ← main::r#1
|
||||
Coalesced down to 2 phi equivalence classes
|
||||
Culled Empty Block (label) main::@18
|
||||
Culled Empty Block (label) main::@17
|
||||
Renumbering block @6 to @1
|
||||
Renumbering block main::@6 to main::@1
|
||||
Renumbering block main::@8 to main::@2
|
||||
Renumbering block main::@9 to main::@3
|
||||
Renumbering block main::@11 to main::@4
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @6
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@6
|
||||
@6: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @6
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @6
|
||||
main: scope:[main] from @1
|
||||
asm { sei }
|
||||
[5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0
|
||||
[6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main main::@11 main::@6
|
||||
[7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@6
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1 main::@4
|
||||
[7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@8 main::@9
|
||||
[9] (byte) main::r#2 ← phi( main::@8/(byte/signed byte/word/signed word/dword/signed dword) $31 main::@9/(byte) main::r#1 )
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@3
|
||||
[9] (byte) main::r#2 ← phi( main::@2/(byte/signed byte/word/signed word/dword/signed dword) $31 main::@3/(byte) main::r#1 )
|
||||
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
[11] *((const byte*) BGCOL#0) ← ++ *((const byte*) BGCOL#0)
|
||||
[12] (byte) main::r#1 ← ++ (byte) main::r#2
|
||||
[13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@11 main::@9
|
||||
[14] (byte) main::c#2 ← phi( main::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@11/(byte) main::c#1 )
|
||||
[13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3 main::@4
|
||||
[14] (byte) main::c#2 ← phi( main::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@4/(byte) main::c#1 )
|
||||
[15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2)
|
||||
[16] *((const byte[$10]) main::palette#0 + (byte) main::c#2) ← ++ *((const byte[$10]) main::palette#0 + (byte) main::c#2)
|
||||
[17] (byte) main::c#1 ← ++ (byte) main::c#2
|
||||
[18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@11
|
||||
to:main::@6
|
||||
[18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@4
|
||||
to:main::@1
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
@ -1097,15 +1102,15 @@ INITIAL ASM
|
||||
.label DTV_PALETTE = $d200
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
|
||||
b6_from_bbegin:
|
||||
jmp b6
|
||||
//SEG5 @6
|
||||
b6:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
|
||||
bend_from_b6:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -1121,32 +1126,32 @@ main: {
|
||||
//SEG12 [6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0 -- _deref_pbuc1=vbuc2
|
||||
lda #DTV_HIGHCOLOR|DTV_BORDER_OFF|DTV_BADLINE_OFF
|
||||
sta DTV_CONTROL
|
||||
jmp b6
|
||||
//SEG13 main::@6
|
||||
b6:
|
||||
//SEG14 [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
jmp b1
|
||||
//SEG13 main::@1
|
||||
b1:
|
||||
//SEG14 [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$40
|
||||
cmp RASTER
|
||||
bne b6
|
||||
jmp b8
|
||||
//SEG15 main::@8
|
||||
b8:
|
||||
bne b1
|
||||
jmp b2
|
||||
//SEG15 main::@2
|
||||
b2:
|
||||
//SEG16 [8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
// Create rasterbars
|
||||
lda #0
|
||||
sta BGCOL
|
||||
//SEG17 [9] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
|
||||
b9_from_b8:
|
||||
//SEG18 [9] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) $31 [phi:main::@8->main::@9#0] -- vbuz1=vbuc1
|
||||
//SEG17 [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
b3_from_b2:
|
||||
//SEG18 [9] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) $31 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1
|
||||
lda #$31
|
||||
sta r
|
||||
jmp b9
|
||||
//SEG19 [9] phi from main::@9 to main::@9 [phi:main::@9->main::@9]
|
||||
b9_from_b9:
|
||||
//SEG20 [9] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@9->main::@9#0] -- register_copy
|
||||
jmp b9
|
||||
//SEG21 main::@9
|
||||
b9:
|
||||
jmp b3
|
||||
//SEG19 [9] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
|
||||
b3_from_b3:
|
||||
//SEG20 [9] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@3#0] -- register_copy
|
||||
jmp b3
|
||||
//SEG21 main::@3
|
||||
b3:
|
||||
//SEG22 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -1177,23 +1182,23 @@ main: {
|
||||
inc BGCOL
|
||||
//SEG24 [12] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuz1=_inc_vbuz1
|
||||
inc r
|
||||
//SEG25 [13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9 -- vbuz1_neq_0_then_la1
|
||||
//SEG25 [13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuz1_neq_0_then_la1
|
||||
lda r
|
||||
cmp #0
|
||||
bne b9_from_b9
|
||||
//SEG26 [14] phi from main::@9 to main::@11 [phi:main::@9->main::@11]
|
||||
b11_from_b9:
|
||||
//SEG27 [14] phi (byte) main::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@9->main::@11#0] -- vbuz1=vbuc1
|
||||
bne b3_from_b3
|
||||
//SEG26 [14] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
|
||||
b4_from_b3:
|
||||
//SEG27 [14] phi (byte) main::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@3->main::@4#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta c
|
||||
jmp b11
|
||||
jmp b4
|
||||
// Rotate palette
|
||||
//SEG28 [14] phi from main::@11 to main::@11 [phi:main::@11->main::@11]
|
||||
b11_from_b11:
|
||||
//SEG29 [14] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@11->main::@11#0] -- register_copy
|
||||
jmp b11
|
||||
//SEG30 main::@11
|
||||
b11:
|
||||
//SEG28 [14] phi from main::@4 to main::@4 [phi:main::@4->main::@4]
|
||||
b4_from_b4:
|
||||
//SEG29 [14] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@4->main::@4#0] -- register_copy
|
||||
jmp b4
|
||||
//SEG30 main::@4
|
||||
b4:
|
||||
//SEG31 [15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2) -- pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1
|
||||
ldy c
|
||||
lda palette,y
|
||||
@ -1203,24 +1208,24 @@ main: {
|
||||
inc palette,x
|
||||
//SEG33 [17] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuz1=_inc_vbuz1
|
||||
inc c
|
||||
//SEG34 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@11 -- vbuz1_neq_vbuc1_then_la1
|
||||
//SEG34 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@4 -- vbuz1_neq_vbuc1_then_la1
|
||||
lda #$10
|
||||
cmp c
|
||||
bne b11_from_b11
|
||||
jmp b6
|
||||
bne b4_from_b4
|
||||
jmp b1
|
||||
palette: .byte 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, $a, $b, $c, $d, $e, $f
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
Statement [5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2) [ main::c#2 ] ( main:2 [ main::c#2 ] ) always clobbers reg byte a
|
||||
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ main::c#2 main::c#1 ]
|
||||
Statement [5] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a
|
||||
Statement [15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2) [ main::c#2 ] ( main:2 [ main::c#2 ] ) always clobbers reg byte a
|
||||
Potential registers zp ZP_BYTE:2 [ main::r#2 main::r#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y ,
|
||||
@ -1255,15 +1260,15 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label DTV_PALETTE = $d200
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
|
||||
b6_from_bbegin:
|
||||
jmp b6
|
||||
//SEG5 @6
|
||||
b6:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
jsr main
|
||||
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
|
||||
bend_from_b6:
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG8 @end
|
||||
bend:
|
||||
@ -1277,31 +1282,31 @@ main: {
|
||||
//SEG12 [6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0 -- _deref_pbuc1=vbuc2
|
||||
lda #DTV_HIGHCOLOR|DTV_BORDER_OFF|DTV_BADLINE_OFF
|
||||
sta DTV_CONTROL
|
||||
jmp b6
|
||||
//SEG13 main::@6
|
||||
b6:
|
||||
//SEG14 [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
jmp b1
|
||||
//SEG13 main::@1
|
||||
b1:
|
||||
//SEG14 [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$40
|
||||
cmp RASTER
|
||||
bne b6
|
||||
jmp b8
|
||||
//SEG15 main::@8
|
||||
b8:
|
||||
bne b1
|
||||
jmp b2
|
||||
//SEG15 main::@2
|
||||
b2:
|
||||
//SEG16 [8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
// Create rasterbars
|
||||
lda #0
|
||||
sta BGCOL
|
||||
//SEG17 [9] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
|
||||
b9_from_b8:
|
||||
//SEG18 [9] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) $31 [phi:main::@8->main::@9#0] -- vbuxx=vbuc1
|
||||
//SEG17 [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
b3_from_b2:
|
||||
//SEG18 [9] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) $31 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1
|
||||
ldx #$31
|
||||
jmp b9
|
||||
//SEG19 [9] phi from main::@9 to main::@9 [phi:main::@9->main::@9]
|
||||
b9_from_b9:
|
||||
//SEG20 [9] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@9->main::@9#0] -- register_copy
|
||||
jmp b9
|
||||
//SEG21 main::@9
|
||||
b9:
|
||||
jmp b3
|
||||
//SEG19 [9] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
|
||||
b3_from_b3:
|
||||
//SEG20 [9] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@3#0] -- register_copy
|
||||
jmp b3
|
||||
//SEG21 main::@3
|
||||
b3:
|
||||
//SEG22 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -1332,21 +1337,21 @@ main: {
|
||||
inc BGCOL
|
||||
//SEG24 [12] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG25 [13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9 -- vbuxx_neq_0_then_la1
|
||||
//SEG25 [13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuxx_neq_0_then_la1
|
||||
cpx #0
|
||||
bne b9_from_b9
|
||||
//SEG26 [14] phi from main::@9 to main::@11 [phi:main::@9->main::@11]
|
||||
b11_from_b9:
|
||||
//SEG27 [14] phi (byte) main::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@9->main::@11#0] -- vbuxx=vbuc1
|
||||
bne b3_from_b3
|
||||
//SEG26 [14] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
|
||||
b4_from_b3:
|
||||
//SEG27 [14] phi (byte) main::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@3->main::@4#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
jmp b11
|
||||
jmp b4
|
||||
// Rotate palette
|
||||
//SEG28 [14] phi from main::@11 to main::@11 [phi:main::@11->main::@11]
|
||||
b11_from_b11:
|
||||
//SEG29 [14] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@11->main::@11#0] -- register_copy
|
||||
jmp b11
|
||||
//SEG30 main::@11
|
||||
b11:
|
||||
//SEG28 [14] phi from main::@4 to main::@4 [phi:main::@4->main::@4]
|
||||
b4_from_b4:
|
||||
//SEG29 [14] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@4->main::@4#0] -- register_copy
|
||||
jmp b4
|
||||
//SEG30 main::@4
|
||||
b4:
|
||||
//SEG31 [15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda palette,x
|
||||
sta DTV_PALETTE,x
|
||||
@ -1354,45 +1359,45 @@ main: {
|
||||
inc palette,x
|
||||
//SEG33 [17] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG34 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@11 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG34 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@4 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$10
|
||||
bne b11_from_b11
|
||||
jmp b6
|
||||
bne b4_from_b4
|
||||
jmp b1
|
||||
palette: .byte 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, $a, $b, $c, $d, $e, $f
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b6
|
||||
Removing instruction jmp b8
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b11
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b4
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b9_from_b9 with b9
|
||||
Replacing label b11_from_b11 with b11
|
||||
Removing instruction b6_from_bbegin:
|
||||
Removing instruction b6:
|
||||
Removing instruction bend_from_b6:
|
||||
Removing instruction b9_from_b9:
|
||||
Removing instruction b11_from_b11:
|
||||
Replacing label b3_from_b3 with b3
|
||||
Replacing label b4_from_b4 with b4
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b3_from_b3:
|
||||
Removing instruction b4_from_b4:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b8:
|
||||
Removing instruction b9_from_b8:
|
||||
Removing instruction b11_from_b9:
|
||||
Removing instruction b2:
|
||||
Removing instruction b3_from_b2:
|
||||
Removing instruction b4_from_b3:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b11
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b4
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @6
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -1579,10 +1584,10 @@ FINAL SYMBOL TABLE
|
||||
(byte) WHITE
|
||||
(byte) YELLOW
|
||||
(void()) main()
|
||||
(label) main::@11
|
||||
(label) main::@6
|
||||
(label) main::@8
|
||||
(label) main::@9
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(byte) main::c
|
||||
(byte) main::c#1 reg byte x 151.5
|
||||
(byte) main::c#2 reg byte x 201.99999999999997
|
||||
@ -1619,10 +1624,10 @@ Score: 10174
|
||||
// Defines colors for the 16 first colors ($00-$0f)
|
||||
.label DTV_PALETTE = $d200
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @6 [phi:@begin->@6]
|
||||
//SEG5 @6
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [3] phi from @6 to @end [phi:@6->@end]
|
||||
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG8 @end
|
||||
//SEG9 main
|
||||
main: {
|
||||
@ -1634,24 +1639,24 @@ main: {
|
||||
//SEG12 [6] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_BORDER_OFF#0|(const byte) DTV_BADLINE_OFF#0 -- _deref_pbuc1=vbuc2
|
||||
lda #DTV_HIGHCOLOR|DTV_BORDER_OFF|DTV_BADLINE_OFF
|
||||
sta DTV_CONTROL
|
||||
//SEG13 main::@6
|
||||
b6:
|
||||
//SEG14 [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
//SEG13 main::@1
|
||||
b1:
|
||||
//SEG14 [7] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@1 -- _deref_pbuc1_neq_vbuc2_then_la1
|
||||
lda #$40
|
||||
cmp RASTER
|
||||
bne b6
|
||||
//SEG15 main::@8
|
||||
bne b1
|
||||
//SEG15 main::@2
|
||||
//SEG16 [8] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 -- _deref_pbuc1=vbuc2
|
||||
// Create rasterbars
|
||||
lda #0
|
||||
sta BGCOL
|
||||
//SEG17 [9] phi from main::@8 to main::@9 [phi:main::@8->main::@9]
|
||||
//SEG18 [9] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) $31 [phi:main::@8->main::@9#0] -- vbuxx=vbuc1
|
||||
//SEG17 [9] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
//SEG18 [9] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) $31 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1
|
||||
ldx #$31
|
||||
//SEG19 [9] phi from main::@9 to main::@9 [phi:main::@9->main::@9]
|
||||
//SEG20 [9] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@9->main::@9#0] -- register_copy
|
||||
//SEG21 main::@9
|
||||
b9:
|
||||
//SEG19 [9] phi from main::@3 to main::@3 [phi:main::@3->main::@3]
|
||||
//SEG20 [9] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@3#0] -- register_copy
|
||||
//SEG21 main::@3
|
||||
b3:
|
||||
//SEG22 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
||||
nop
|
||||
nop
|
||||
@ -1682,17 +1687,17 @@ main: {
|
||||
inc BGCOL
|
||||
//SEG24 [12] (byte) main::r#1 ← ++ (byte) main::r#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG25 [13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@9 -- vbuxx_neq_0_then_la1
|
||||
//SEG25 [13] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@3 -- vbuxx_neq_0_then_la1
|
||||
cpx #0
|
||||
bne b9
|
||||
//SEG26 [14] phi from main::@9 to main::@11 [phi:main::@9->main::@11]
|
||||
//SEG27 [14] phi (byte) main::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@9->main::@11#0] -- vbuxx=vbuc1
|
||||
bne b3
|
||||
//SEG26 [14] phi from main::@3 to main::@4 [phi:main::@3->main::@4]
|
||||
//SEG27 [14] phi (byte) main::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@3->main::@4#0] -- vbuxx=vbuc1
|
||||
ldx #0
|
||||
// Rotate palette
|
||||
//SEG28 [14] phi from main::@11 to main::@11 [phi:main::@11->main::@11]
|
||||
//SEG29 [14] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@11->main::@11#0] -- register_copy
|
||||
//SEG30 main::@11
|
||||
b11:
|
||||
//SEG28 [14] phi from main::@4 to main::@4 [phi:main::@4->main::@4]
|
||||
//SEG29 [14] phi (byte) main::c#2 = (byte) main::c#1 [phi:main::@4->main::@4#0] -- register_copy
|
||||
//SEG30 main::@4
|
||||
b4:
|
||||
//SEG31 [15] *((const byte*) DTV_PALETTE#0 + (byte) main::c#2) ← *((const byte[$10]) main::palette#0 + (byte) main::c#2) -- pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx
|
||||
lda palette,x
|
||||
sta DTV_PALETTE,x
|
||||
@ -1700,10 +1705,10 @@ main: {
|
||||
inc palette,x
|
||||
//SEG33 [17] (byte) main::c#1 ← ++ (byte) main::c#2 -- vbuxx=_inc_vbuxx
|
||||
inx
|
||||
//SEG34 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@11 -- vbuxx_neq_vbuc1_then_la1
|
||||
//SEG34 [18] if((byte) main::c#1!=(byte/signed byte/word/signed word/dword/signed dword) $10) goto main::@4 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$10
|
||||
bne b11
|
||||
jmp b6
|
||||
bne b4
|
||||
jmp b1
|
||||
palette: .byte 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, $a, $b, $c, $d, $e, $f
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @6
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -185,10 +185,10 @@
|
||||
(byte) WHITE
|
||||
(byte) YELLOW
|
||||
(void()) main()
|
||||
(label) main::@11
|
||||
(label) main::@6
|
||||
(label) main::@8
|
||||
(label) main::@9
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(byte) main::c
|
||||
(byte) main::c#1 reg byte x 151.5
|
||||
(byte) main::c#2 reg byte x 201.99999999999997
|
||||
|
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
@ -1,4 +1,4 @@
|
||||
(label) @68
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -353,19 +353,19 @@
|
||||
(byte) WHITE
|
||||
(byte) YELLOW
|
||||
(void()) apply_preset((byte) apply_preset::idx)
|
||||
(label) apply_preset::@22
|
||||
(label) apply_preset::@23
|
||||
(label) apply_preset::@24
|
||||
(label) apply_preset::@25
|
||||
(label) apply_preset::@26
|
||||
(label) apply_preset::@27
|
||||
(label) apply_preset::@28
|
||||
(label) apply_preset::@29
|
||||
(label) apply_preset::@30
|
||||
(label) apply_preset::@31
|
||||
(label) apply_preset::@32
|
||||
(label) apply_preset::@33
|
||||
(label) apply_preset::@45
|
||||
(label) apply_preset::@1
|
||||
(label) apply_preset::@10
|
||||
(label) apply_preset::@11
|
||||
(label) apply_preset::@12
|
||||
(label) apply_preset::@13
|
||||
(label) apply_preset::@2
|
||||
(label) apply_preset::@3
|
||||
(label) apply_preset::@4
|
||||
(label) apply_preset::@5
|
||||
(label) apply_preset::@6
|
||||
(label) apply_preset::@7
|
||||
(label) apply_preset::@8
|
||||
(label) apply_preset::@9
|
||||
(label) apply_preset::@return
|
||||
(byte) apply_preset::i
|
||||
(byte) apply_preset::i#1 reg byte y 1501.5
|
||||
@ -399,11 +399,11 @@
|
||||
(byte~) bitmap_init::$8 reg byte a 22.0
|
||||
(byte~) bitmap_init::$9 reg byte a 22.0
|
||||
(label) bitmap_init::@1
|
||||
(label) bitmap_init::@10
|
||||
(label) bitmap_init::@2
|
||||
(label) bitmap_init::@3
|
||||
(label) bitmap_init::@4
|
||||
(label) bitmap_init::@5
|
||||
(label) bitmap_init::@6
|
||||
(label) bitmap_init::@7
|
||||
(label) bitmap_init::@return
|
||||
(byte*) bitmap_init::bitmap
|
||||
(byte) bitmap_init::bits
|
||||
@ -424,17 +424,17 @@
|
||||
(label) bitmap_line::@1
|
||||
(label) bitmap_line::@10
|
||||
(label) bitmap_line::@11
|
||||
(label) bitmap_line::@15
|
||||
(label) bitmap_line::@17
|
||||
(label) bitmap_line::@20
|
||||
(label) bitmap_line::@21
|
||||
(label) bitmap_line::@25
|
||||
(label) bitmap_line::@27
|
||||
(label) bitmap_line::@12
|
||||
(label) bitmap_line::@13
|
||||
(label) bitmap_line::@14
|
||||
(label) bitmap_line::@2
|
||||
(label) bitmap_line::@3
|
||||
(label) bitmap_line::@4
|
||||
(label) bitmap_line::@5
|
||||
(label) bitmap_line::@6
|
||||
(label) bitmap_line::@7
|
||||
(label) bitmap_line::@8
|
||||
(label) bitmap_line::@9
|
||||
(label) bitmap_line::@return
|
||||
(byte) bitmap_line::x0
|
||||
(byte) bitmap_line::x0#0 x0 zp ZP_BYTE:13 1.260869565217391
|
||||
@ -457,7 +457,7 @@
|
||||
(label) bitmap_line_xdyd::@1
|
||||
(label) bitmap_line_xdyd::@2
|
||||
(label) bitmap_line_xdyd::@3
|
||||
(label) bitmap_line_xdyd::@5
|
||||
(label) bitmap_line_xdyd::@4
|
||||
(label) bitmap_line_xdyd::@return
|
||||
(byte) bitmap_line_xdyd::e
|
||||
(byte) bitmap_line_xdyd::e#0 e zp ZP_BYTE:18 4.0
|
||||
@ -495,7 +495,7 @@
|
||||
(label) bitmap_line_xdyi::@1
|
||||
(label) bitmap_line_xdyi::@2
|
||||
(label) bitmap_line_xdyi::@3
|
||||
(label) bitmap_line_xdyi::@5
|
||||
(label) bitmap_line_xdyi::@4
|
||||
(label) bitmap_line_xdyi::@return
|
||||
(byte) bitmap_line_xdyi::e
|
||||
(byte) bitmap_line_xdyi::e#0 e zp ZP_BYTE:18 4.0
|
||||
@ -533,7 +533,7 @@
|
||||
(label) bitmap_line_ydxd::@1
|
||||
(label) bitmap_line_ydxd::@2
|
||||
(label) bitmap_line_ydxd::@3
|
||||
(label) bitmap_line_ydxd::@5
|
||||
(label) bitmap_line_ydxd::@4
|
||||
(label) bitmap_line_ydxd::@return
|
||||
(byte) bitmap_line_ydxd::e
|
||||
(byte) bitmap_line_ydxd::e#0 e zp ZP_BYTE:13 4.0
|
||||
@ -571,7 +571,7 @@
|
||||
(label) bitmap_line_ydxi::@1
|
||||
(label) bitmap_line_ydxi::@2
|
||||
(label) bitmap_line_ydxi::@3
|
||||
(label) bitmap_line_ydxi::@5
|
||||
(label) bitmap_line_ydxi::@4
|
||||
(label) bitmap_line_ydxi::@return
|
||||
(byte) bitmap_line_ydxi::e
|
||||
(byte) bitmap_line_ydxi::e#0 e zp ZP_BYTE:13 4.0
|
||||
@ -680,26 +680,26 @@
|
||||
(label) form_control::@1
|
||||
(label) form_control::@10
|
||||
(label) form_control::@11
|
||||
(label) form_control::@12
|
||||
(label) form_control::@13
|
||||
(label) form_control::@14
|
||||
(label) form_control::@15
|
||||
(label) form_control::@16
|
||||
(label) form_control::@17
|
||||
(label) form_control::@18
|
||||
(label) form_control::@19
|
||||
(label) form_control::@2
|
||||
(label) form_control::@20
|
||||
(label) form_control::@21
|
||||
(label) form_control::@22
|
||||
(label) form_control::@26
|
||||
(label) form_control::@29
|
||||
(label) form_control::@23
|
||||
(label) form_control::@3
|
||||
(label) form_control::@31
|
||||
(label) form_control::@33
|
||||
(label) form_control::@34
|
||||
(label) form_control::@35
|
||||
(label) form_control::@36
|
||||
(label) form_control::@37
|
||||
(label) form_control::@38
|
||||
(label) form_control::@39
|
||||
(label) form_control::@4
|
||||
(label) form_control::@5
|
||||
(label) form_control::@6
|
||||
(label) form_control::@7
|
||||
(label) form_control::@8
|
||||
(label) form_control::@9
|
||||
(label) form_control::@return
|
||||
(byte*) form_control::field
|
||||
(byte*) form_control::field#0 field zp ZP_WORD:3 0.5925925925925926
|
||||
@ -775,21 +775,21 @@
|
||||
(void()) form_mode()
|
||||
(byte~) form_mode::$36 reg byte a 2002.0
|
||||
(label) form_mode::@1
|
||||
(label) form_mode::@10
|
||||
(label) form_mode::@11
|
||||
(label) form_mode::@12
|
||||
(label) form_mode::@13
|
||||
(label) form_mode::@14
|
||||
(label) form_mode::@15
|
||||
(label) form_mode::@16
|
||||
(label) form_mode::@17
|
||||
(label) form_mode::@18
|
||||
(label) form_mode::@19
|
||||
(label) form_mode::@21
|
||||
(label) form_mode::@22
|
||||
(label) form_mode::@23
|
||||
(label) form_mode::@24
|
||||
(label) form_mode::@25
|
||||
(label) form_mode::@26
|
||||
(label) form_mode::@27
|
||||
(label) form_mode::@28
|
||||
(label) form_mode::@29
|
||||
(label) form_mode::@30
|
||||
(label) form_mode::@31
|
||||
(label) form_mode::@32
|
||||
(label) form_mode::@2
|
||||
(label) form_mode::@3
|
||||
(label) form_mode::@4
|
||||
(label) form_mode::@5
|
||||
(label) form_mode::@6
|
||||
(label) form_mode::@7
|
||||
(label) form_mode::@8
|
||||
(label) form_mode::@9
|
||||
@ -804,7 +804,7 @@
|
||||
(byte*) form_preset
|
||||
(void()) form_render_values()
|
||||
(label) form_render_values::@1
|
||||
(label) form_render_values::@3
|
||||
(label) form_render_values::@2
|
||||
(label) form_render_values::@return
|
||||
(byte*) form_render_values::field
|
||||
(byte*) form_render_values::field#0 field zp ZP_WORD:3 2002.0
|
||||
@ -846,20 +846,20 @@
|
||||
(byte*) form_vic_screen
|
||||
(const byte*) form_vic_screen#0 form_vic_screen = (const byte[]) form_fields_val#0+(byte/signed byte/word/signed word/dword/signed dword) $18
|
||||
(dword()) get_plane((byte) get_plane::idx)
|
||||
(label) get_plane::@27
|
||||
(label) get_plane::@28
|
||||
(label) get_plane::@29
|
||||
(label) get_plane::@30
|
||||
(label) get_plane::@31
|
||||
(label) get_plane::@32
|
||||
(label) get_plane::@33
|
||||
(label) get_plane::@34
|
||||
(label) get_plane::@35
|
||||
(label) get_plane::@36
|
||||
(label) get_plane::@37
|
||||
(label) get_plane::@38
|
||||
(label) get_plane::@39
|
||||
(label) get_plane::@40
|
||||
(label) get_plane::@1
|
||||
(label) get_plane::@10
|
||||
(label) get_plane::@11
|
||||
(label) get_plane::@12
|
||||
(label) get_plane::@13
|
||||
(label) get_plane::@14
|
||||
(label) get_plane::@2
|
||||
(label) get_plane::@3
|
||||
(label) get_plane::@4
|
||||
(label) get_plane::@5
|
||||
(label) get_plane::@6
|
||||
(label) get_plane::@7
|
||||
(label) get_plane::@8
|
||||
(label) get_plane::@9
|
||||
(label) get_plane::@return
|
||||
(byte) get_plane::idx
|
||||
(byte) get_plane::idx#0 reg byte a 4.0
|
||||
@ -870,8 +870,8 @@
|
||||
(dword) get_plane::return#16 return zp ZP_DWORD:9 4.0
|
||||
(dword) get_plane::return#17 return zp ZP_DWORD:9 4.0
|
||||
(byte*()) get_vic_charset((byte) get_vic_charset::idx)
|
||||
(label) get_vic_charset::@3
|
||||
(label) get_vic_charset::@4
|
||||
(label) get_vic_charset::@1
|
||||
(label) get_vic_charset::@2
|
||||
(label) get_vic_charset::@return
|
||||
(byte) get_vic_charset::idx
|
||||
(byte) get_vic_charset::idx#0 reg byte a 3.0
|
||||
@ -879,11 +879,11 @@
|
||||
(byte*) get_vic_charset::return#2 return zp ZP_WORD:3 0.6666666666666666
|
||||
(byte*) get_vic_charset::return#4 return zp ZP_WORD:3 4.0
|
||||
(byte*()) get_vic_screen((byte) get_vic_screen::idx)
|
||||
(label) get_vic_screen::@10
|
||||
(label) get_vic_screen::@11
|
||||
(label) get_vic_screen::@12
|
||||
(label) get_vic_screen::@13
|
||||
(label) get_vic_screen::@9
|
||||
(label) get_vic_screen::@1
|
||||
(label) get_vic_screen::@2
|
||||
(label) get_vic_screen::@3
|
||||
(label) get_vic_screen::@4
|
||||
(label) get_vic_screen::@5
|
||||
(label) get_vic_screen::@return
|
||||
(byte) get_vic_screen::idx
|
||||
(byte) get_vic_screen::idx#0 reg byte a 4.0
|
||||
@ -937,7 +937,7 @@
|
||||
(label) gfx_init_plane_8bppchunky::@4
|
||||
(label) gfx_init_plane_8bppchunky::@5
|
||||
(label) gfx_init_plane_8bppchunky::@6
|
||||
(label) gfx_init_plane_8bppchunky::@8
|
||||
(label) gfx_init_plane_8bppchunky::@7
|
||||
(label) gfx_init_plane_8bppchunky::@return
|
||||
(byte) gfx_init_plane_8bppchunky::c
|
||||
(byte) gfx_init_plane_8bppchunky::c#0 reg byte a 202.0
|
||||
@ -1042,8 +1042,8 @@
|
||||
(label) gfx_init_plane_horisontal::@3
|
||||
(label) gfx_init_plane_horisontal::@4
|
||||
(label) gfx_init_plane_horisontal::@5
|
||||
(label) gfx_init_plane_horisontal::@6
|
||||
(label) gfx_init_plane_horisontal::@7
|
||||
(label) gfx_init_plane_horisontal::@8
|
||||
(label) gfx_init_plane_horisontal::@return
|
||||
(byte) gfx_init_plane_horisontal::ax
|
||||
(byte) gfx_init_plane_horisontal::ax#1 reg byte x 151.5
|
||||
@ -1196,8 +1196,8 @@
|
||||
(byte) gfx_init_screen4::cy#4 cy zp ZP_BYTE:2 3.6666666666666665
|
||||
(void()) gfx_init_vic_bitmap()
|
||||
(label) gfx_init_vic_bitmap::@1
|
||||
(label) gfx_init_vic_bitmap::@2
|
||||
(label) gfx_init_vic_bitmap::@3
|
||||
(label) gfx_init_vic_bitmap::@5
|
||||
(label) gfx_init_vic_bitmap::@return
|
||||
(byte) gfx_init_vic_bitmap::l
|
||||
(byte) gfx_init_vic_bitmap::l#1 l zp ZP_BYTE:2 16.5
|
||||
@ -1251,6 +1251,11 @@
|
||||
(byte~) gfx_mode::$70 reg byte a 4.0
|
||||
(byte~) gfx_mode::$71 reg byte a 4.0
|
||||
(label) gfx_mode::@1
|
||||
(label) gfx_mode::@10
|
||||
(label) gfx_mode::@11
|
||||
(label) gfx_mode::@12
|
||||
(label) gfx_mode::@13
|
||||
(label) gfx_mode::@14
|
||||
(label) gfx_mode::@15
|
||||
(label) gfx_mode::@16
|
||||
(label) gfx_mode::@17
|
||||
@ -1261,24 +1266,19 @@
|
||||
(label) gfx_mode::@21
|
||||
(label) gfx_mode::@22
|
||||
(label) gfx_mode::@23
|
||||
(label) gfx_mode::@24
|
||||
(label) gfx_mode::@25
|
||||
(label) gfx_mode::@26
|
||||
(label) gfx_mode::@27
|
||||
(label) gfx_mode::@28
|
||||
(label) gfx_mode::@29
|
||||
(label) gfx_mode::@3
|
||||
(label) gfx_mode::@30
|
||||
(label) gfx_mode::@31
|
||||
(label) gfx_mode::@34
|
||||
(label) gfx_mode::@36
|
||||
(label) gfx_mode::@38
|
||||
(label) gfx_mode::@32
|
||||
(label) gfx_mode::@33
|
||||
(label) gfx_mode::@4
|
||||
(label) gfx_mode::@46
|
||||
(label) gfx_mode::@47
|
||||
(label) gfx_mode::@48
|
||||
(label) gfx_mode::@49
|
||||
(label) gfx_mode::@5
|
||||
(label) gfx_mode::@50
|
||||
(label) gfx_mode::@51
|
||||
(label) gfx_mode::@52
|
||||
(label) gfx_mode::@6
|
||||
(label) gfx_mode::@7
|
||||
(label) gfx_mode::@8
|
||||
@ -1335,7 +1335,7 @@
|
||||
(byte) gfx_mode::vic_control2#2 reg byte a 2.0
|
||||
(byte[]) keyboard_char_keycodes
|
||||
(byte()) keyboard_event_get()
|
||||
(label) keyboard_event_get::@3
|
||||
(label) keyboard_event_get::@1
|
||||
(label) keyboard_event_get::@return
|
||||
(byte) keyboard_event_get::return
|
||||
(byte) keyboard_event_get::return#1 reg byte a 4.0
|
||||
@ -1368,25 +1368,25 @@
|
||||
(label) keyboard_event_scan::@10
|
||||
(label) keyboard_event_scan::@11
|
||||
(label) keyboard_event_scan::@12
|
||||
(label) keyboard_event_scan::@13
|
||||
(label) keyboard_event_scan::@14
|
||||
(label) keyboard_event_scan::@15
|
||||
(label) keyboard_event_scan::@16
|
||||
(label) keyboard_event_scan::@17
|
||||
(label) keyboard_event_scan::@18
|
||||
(label) keyboard_event_scan::@19
|
||||
(label) keyboard_event_scan::@2
|
||||
(label) keyboard_event_scan::@20
|
||||
(label) keyboard_event_scan::@21
|
||||
(label) keyboard_event_scan::@22
|
||||
(label) keyboard_event_scan::@23
|
||||
(label) keyboard_event_scan::@24
|
||||
(label) keyboard_event_scan::@25
|
||||
(label) keyboard_event_scan::@26
|
||||
(label) keyboard_event_scan::@27
|
||||
(label) keyboard_event_scan::@28
|
||||
(label) keyboard_event_scan::@29
|
||||
(label) keyboard_event_scan::@3
|
||||
(label) keyboard_event_scan::@4
|
||||
(label) keyboard_event_scan::@5
|
||||
(label) keyboard_event_scan::@6
|
||||
(label) keyboard_event_scan::@7
|
||||
(label) keyboard_event_scan::@8
|
||||
(label) keyboard_event_scan::@9
|
||||
(label) keyboard_event_scan::@return
|
||||
(byte) keyboard_event_scan::col
|
||||
(byte) keyboard_event_scan::col#1 reg byte x 150001.5
|
||||
@ -1445,8 +1445,8 @@
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@7
|
||||
(label) main::@9
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(byte[]) preset_8bpppixelcell
|
||||
(const byte[]) preset_8bpppixelcell#0 preset_8bpppixelcell = { (byte/signed byte/word/signed word/dword/signed dword) $a, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) $b, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 1, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 0 }
|
||||
(byte[]) preset_chunky
|
||||
@ -1511,10 +1511,10 @@
|
||||
(byte*) print_str_at::str#2 str zp ZP_WORD:3 1001.5
|
||||
(void()) print_str_lines((byte*) print_str_lines::str)
|
||||
(label) print_str_lines::@1
|
||||
(label) print_str_lines::@6
|
||||
(label) print_str_lines::@7
|
||||
(label) print_str_lines::@8
|
||||
(label) print_str_lines::@9
|
||||
(label) print_str_lines::@2
|
||||
(label) print_str_lines::@3
|
||||
(label) print_str_lines::@4
|
||||
(label) print_str_lines::@5
|
||||
(label) print_str_lines::@return
|
||||
(byte) print_str_lines::ch
|
||||
(byte) print_str_lines::ch#0 reg byte a 667.3333333333334
|
||||
@ -1524,18 +1524,18 @@
|
||||
(byte*) print_str_lines::str#4 str zp ZP_WORD:3 1552.0
|
||||
(byte*) print_str_lines::str#5 str zp ZP_WORD:3 1.0
|
||||
(void()) render_preset_name((byte) render_preset_name::idx)
|
||||
(label) render_preset_name::@22
|
||||
(label) render_preset_name::@23
|
||||
(label) render_preset_name::@24
|
||||
(label) render_preset_name::@25
|
||||
(label) render_preset_name::@26
|
||||
(label) render_preset_name::@27
|
||||
(label) render_preset_name::@28
|
||||
(label) render_preset_name::@29
|
||||
(label) render_preset_name::@30
|
||||
(label) render_preset_name::@31
|
||||
(label) render_preset_name::@32
|
||||
(label) render_preset_name::@33
|
||||
(label) render_preset_name::@1
|
||||
(label) render_preset_name::@10
|
||||
(label) render_preset_name::@11
|
||||
(label) render_preset_name::@12
|
||||
(label) render_preset_name::@2
|
||||
(label) render_preset_name::@3
|
||||
(label) render_preset_name::@4
|
||||
(label) render_preset_name::@5
|
||||
(label) render_preset_name::@6
|
||||
(label) render_preset_name::@7
|
||||
(label) render_preset_name::@8
|
||||
(label) render_preset_name::@9
|
||||
(label) render_preset_name::@return
|
||||
(byte) render_preset_name::idx
|
||||
(byte) render_preset_name::idx#0 reg byte a 4.0
|
||||
|
@ -110,9 +110,9 @@ main: {
|
||||
// Enable DTV extended modes
|
||||
lda #DTV_FEATURE_ENABLE
|
||||
sta DTV_FEATURE
|
||||
b2:
|
||||
b1:
|
||||
jsr menu
|
||||
jmp b2
|
||||
jmp b1
|
||||
}
|
||||
menu: {
|
||||
.label SCREEN = $8000
|
||||
@ -146,18 +146,18 @@ menu: {
|
||||
sta VIC_MEMORY
|
||||
ldx #0
|
||||
// DTV Palette - default
|
||||
b8:
|
||||
b3:
|
||||
lda DTV_PALETTE_DEFAULT,x
|
||||
sta DTV_PALETTE,x
|
||||
inx
|
||||
cpx #$10
|
||||
bne b8
|
||||
bne b3
|
||||
lda #<COLS
|
||||
sta c
|
||||
lda #>COLS
|
||||
sta c+1
|
||||
// Char Colors
|
||||
b10:
|
||||
b4:
|
||||
lda #LIGHT_GREEN
|
||||
ldy #0
|
||||
sta (c),y
|
||||
@ -167,10 +167,10 @@ menu: {
|
||||
!:
|
||||
lda c+1
|
||||
cmp #>COLS+$3e8
|
||||
bne b10
|
||||
bne b4
|
||||
lda c
|
||||
cmp #<COLS+$3e8
|
||||
bne b10
|
||||
bne b4
|
||||
// Screen colors
|
||||
lda #0
|
||||
sta BGCOL
|
||||
@ -178,91 +178,91 @@ menu: {
|
||||
jsr print_set_screen
|
||||
jsr print_cls
|
||||
jsr print_str_lines
|
||||
b2:
|
||||
b1:
|
||||
ldy #KEY_1
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b12
|
||||
beq b6
|
||||
jsr mode_stdchar
|
||||
breturn:
|
||||
rts
|
||||
b12:
|
||||
b6:
|
||||
ldy #KEY_2
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b13
|
||||
beq b7
|
||||
jsr mode_ecmchar
|
||||
jmp breturn
|
||||
b13:
|
||||
b7:
|
||||
ldy #KEY_3
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b14
|
||||
beq b8
|
||||
jsr mode_mcchar
|
||||
jmp breturn
|
||||
b14:
|
||||
b8:
|
||||
ldy #KEY_4
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b15
|
||||
beq b9
|
||||
jsr mode_stdbitmap
|
||||
jmp breturn
|
||||
b15:
|
||||
b9:
|
||||
ldy #KEY_6
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b16
|
||||
beq b10
|
||||
jsr mode_hicolstdchar
|
||||
jmp breturn
|
||||
b16:
|
||||
b10:
|
||||
ldy #KEY_7
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b17
|
||||
beq b11
|
||||
jsr mode_hicolecmchar
|
||||
jmp breturn
|
||||
b17:
|
||||
b11:
|
||||
ldy #KEY_8
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b18
|
||||
beq b12
|
||||
jsr mode_hicolmcchar
|
||||
jmp breturn
|
||||
b18:
|
||||
b12:
|
||||
ldy #KEY_A
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b19
|
||||
beq b13
|
||||
jsr mode_sixsfred2
|
||||
jmp breturn
|
||||
b19:
|
||||
b13:
|
||||
ldy #KEY_B
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b20
|
||||
beq b14
|
||||
jsr mode_twoplanebitmap
|
||||
jmp breturn
|
||||
b20:
|
||||
b14:
|
||||
ldy #KEY_C
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b21
|
||||
beq b15
|
||||
jsr mode_sixsfred
|
||||
jmp breturn
|
||||
b21:
|
||||
b15:
|
||||
ldy #KEY_D
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b22
|
||||
beq b16
|
||||
jsr mode_8bpppixelcell
|
||||
jmp breturn
|
||||
b22:
|
||||
b16:
|
||||
ldy #KEY_E
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
bne !b2+
|
||||
jmp b2
|
||||
!b2:
|
||||
bne !b1+
|
||||
jmp b1
|
||||
!b1:
|
||||
jsr mode_8bppchunkybmm
|
||||
jmp breturn
|
||||
}
|
||||
@ -375,72 +375,72 @@ mode_8bppchunkybmm: {
|
||||
mode_ctrl: {
|
||||
b1:
|
||||
// Wait for the raster
|
||||
b6:
|
||||
b2:
|
||||
lda #$ff
|
||||
cmp RASTER
|
||||
bne b6
|
||||
bne b2
|
||||
ldy #KEY_SPACE
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b9
|
||||
beq b4
|
||||
rts
|
||||
b9:
|
||||
b4:
|
||||
// Read the current control byte
|
||||
ldx dtv_control
|
||||
ldy #KEY_L
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b10
|
||||
beq b5
|
||||
txa
|
||||
ora #DTV_LINEAR
|
||||
tax
|
||||
b10:
|
||||
b5:
|
||||
ldy #KEY_H
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b11
|
||||
beq b6
|
||||
txa
|
||||
ora #DTV_HIGHCOLOR
|
||||
tax
|
||||
b11:
|
||||
b6:
|
||||
ldy #KEY_O
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b12
|
||||
beq b7
|
||||
txa
|
||||
ora #DTV_OVERSCAN
|
||||
tax
|
||||
b12:
|
||||
b7:
|
||||
ldy #KEY_B
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b13
|
||||
beq b8
|
||||
txa
|
||||
ora #DTV_BORDER_OFF
|
||||
tax
|
||||
b13:
|
||||
b8:
|
||||
ldy #KEY_U
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b14
|
||||
beq b9
|
||||
txa
|
||||
ora #DTV_CHUNKY
|
||||
tax
|
||||
b14:
|
||||
b9:
|
||||
ldy #KEY_C
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b15
|
||||
beq b10
|
||||
txa
|
||||
ora #DTV_COLORRAM_OFF
|
||||
tax
|
||||
b15:
|
||||
b10:
|
||||
ldy #KEY_0
|
||||
jsr keyboard_key_pressed
|
||||
cmp #0
|
||||
beq b16
|
||||
beq b11
|
||||
ldx #0
|
||||
b16:
|
||||
b11:
|
||||
cpx dtv_control
|
||||
beq b1
|
||||
stx dtv_control
|
||||
@ -563,9 +563,9 @@ mode_8bpppixelcell: {
|
||||
sta gfxa+1
|
||||
lda #0
|
||||
sta ay
|
||||
b3:
|
||||
b2:
|
||||
ldx #0
|
||||
b4:
|
||||
b3:
|
||||
lda #$f
|
||||
and ay
|
||||
asl
|
||||
@ -584,11 +584,11 @@ mode_8bpppixelcell: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b4
|
||||
bne b3
|
||||
inc ay
|
||||
lda #$19
|
||||
cmp ay
|
||||
bne b3
|
||||
bne b2
|
||||
// 8bpp cells for Plane B (charset) - ROM charset with 256 colors
|
||||
lda #PROCPORT_RAM_CHARROM
|
||||
sta PROCPORT
|
||||
@ -603,10 +603,10 @@ mode_8bpppixelcell: {
|
||||
sta chargen
|
||||
lda #>CHARGEN
|
||||
sta chargen+1
|
||||
b7:
|
||||
b6:
|
||||
lda #0
|
||||
sta cr
|
||||
b8:
|
||||
b7:
|
||||
ldy #0
|
||||
lda (chargen),y
|
||||
sta bits
|
||||
@ -615,16 +615,16 @@ mode_8bpppixelcell: {
|
||||
inc chargen+1
|
||||
!:
|
||||
ldx #0
|
||||
b9:
|
||||
b8:
|
||||
lda #$80
|
||||
and bits
|
||||
cmp #0
|
||||
beq b2
|
||||
beq b4
|
||||
lda col
|
||||
jmp b10
|
||||
b2:
|
||||
jmp b9
|
||||
b4:
|
||||
lda #0
|
||||
b10:
|
||||
b9:
|
||||
ldy #0
|
||||
sta (gfxb),y
|
||||
inc gfxb
|
||||
@ -635,15 +635,15 @@ mode_8bpppixelcell: {
|
||||
inc col
|
||||
inx
|
||||
cpx #8
|
||||
bne b9
|
||||
bne b8
|
||||
inc cr
|
||||
lda #8
|
||||
cmp cr
|
||||
bne b8
|
||||
bne b7
|
||||
inc ch
|
||||
lda ch
|
||||
cmp #0
|
||||
bne b7
|
||||
bne b6
|
||||
lda #PROCPORT_RAM_IO
|
||||
sta PROCPORT
|
||||
lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY
|
||||
@ -746,9 +746,9 @@ mode_sixsfred: {
|
||||
sta gfxa+1
|
||||
lda #0
|
||||
sta ay
|
||||
b7:
|
||||
b6:
|
||||
ldx #0
|
||||
b8:
|
||||
b7:
|
||||
lda ay
|
||||
lsr
|
||||
and #3
|
||||
@ -762,20 +762,20 @@ mode_sixsfred: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b8
|
||||
bne b7
|
||||
inc ay
|
||||
lda #$c8
|
||||
cmp ay
|
||||
bne b7
|
||||
bne b6
|
||||
lda #0
|
||||
sta by
|
||||
lda #<PLANEB
|
||||
sta gfxb
|
||||
lda #>PLANEB
|
||||
sta gfxb+1
|
||||
b11:
|
||||
b9:
|
||||
ldx #0
|
||||
b12:
|
||||
b10:
|
||||
lda #$1b
|
||||
ldy #0
|
||||
sta (gfxb),y
|
||||
@ -785,11 +785,11 @@ mode_sixsfred: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b12
|
||||
bne b10
|
||||
inc by
|
||||
lda #$c8
|
||||
cmp by
|
||||
bne b11
|
||||
bne b9
|
||||
lda #DTV_HIGHCOLOR|DTV_LINEAR
|
||||
sta dtv_control
|
||||
jsr mode_ctrl
|
||||
@ -906,13 +906,13 @@ mode_twoplanebitmap: {
|
||||
sta gfxa+1
|
||||
lda #0
|
||||
sta ay
|
||||
b7:
|
||||
b6:
|
||||
ldx #0
|
||||
b8:
|
||||
b7:
|
||||
lda #4
|
||||
and ay
|
||||
cmp #0
|
||||
beq b9
|
||||
beq b8
|
||||
lda #$ff
|
||||
ldy #0
|
||||
sta (gfxa),y
|
||||
@ -920,23 +920,23 @@ mode_twoplanebitmap: {
|
||||
bne !+
|
||||
inc gfxa+1
|
||||
!:
|
||||
b10:
|
||||
b9:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b8
|
||||
bne b7
|
||||
inc ay
|
||||
lda #$c8
|
||||
cmp ay
|
||||
bne b7
|
||||
bne b6
|
||||
lda #0
|
||||
sta by
|
||||
lda #<PLANEB
|
||||
sta gfxb
|
||||
lda #>PLANEB
|
||||
sta gfxb+1
|
||||
b15:
|
||||
b12:
|
||||
ldx #0
|
||||
b16:
|
||||
b13:
|
||||
lda #$f
|
||||
ldy #0
|
||||
sta (gfxb),y
|
||||
@ -946,16 +946,16 @@ mode_twoplanebitmap: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b16
|
||||
bne b13
|
||||
inc by
|
||||
lda #$c8
|
||||
cmp by
|
||||
bne b15
|
||||
bne b12
|
||||
lda #DTV_HIGHCOLOR|DTV_LINEAR
|
||||
sta dtv_control
|
||||
jsr mode_ctrl
|
||||
rts
|
||||
b9:
|
||||
b8:
|
||||
lda #0
|
||||
tay
|
||||
sta (gfxa),y
|
||||
@ -963,7 +963,7 @@ mode_twoplanebitmap: {
|
||||
bne !+
|
||||
inc gfxa+1
|
||||
!:
|
||||
jmp b10
|
||||
jmp b9
|
||||
}
|
||||
// Sixs Fred Mode 2 - 8bpp Packed Bitmap - Generated from the two DTV linear graphics plane counters
|
||||
// Two Plane MultiColor Bitmap - 8bpp Packed Bitmap (CHUNK/COLDIS/HICOL = 0, ECM/BMM/MCM/LINEAR = 1)
|
||||
@ -1067,9 +1067,9 @@ mode_sixsfred2: {
|
||||
sta gfxa+1
|
||||
lda #0
|
||||
sta ay
|
||||
b7:
|
||||
b6:
|
||||
ldx #0
|
||||
b8:
|
||||
b7:
|
||||
lda ay
|
||||
lsr
|
||||
and #3
|
||||
@ -1083,20 +1083,20 @@ mode_sixsfred2: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b8
|
||||
bne b7
|
||||
inc ay
|
||||
lda #$c8
|
||||
cmp ay
|
||||
bne b7
|
||||
bne b6
|
||||
lda #0
|
||||
sta by
|
||||
lda #<PLANEB
|
||||
sta gfxb
|
||||
lda #>PLANEB
|
||||
sta gfxb+1
|
||||
b11:
|
||||
b9:
|
||||
ldx #0
|
||||
b12:
|
||||
b10:
|
||||
lda #$1b
|
||||
ldy #0
|
||||
sta (gfxb),y
|
||||
@ -1106,11 +1106,11 @@ mode_sixsfred2: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b12
|
||||
bne b10
|
||||
inc by
|
||||
lda #$c8
|
||||
cmp by
|
||||
bne b11
|
||||
bne b9
|
||||
lda #DTV_LINEAR
|
||||
sta dtv_control
|
||||
jsr mode_ctrl
|
||||
@ -1567,12 +1567,12 @@ bitmap_line: {
|
||||
sta xd
|
||||
lda y0
|
||||
cmp y1
|
||||
bcc b10
|
||||
bcc b7
|
||||
sec
|
||||
sbc y1
|
||||
tay
|
||||
cpy xd
|
||||
bcc b11
|
||||
bcc b8
|
||||
lda y1
|
||||
sta bitmap_line_ydxi.y
|
||||
lda y0
|
||||
@ -1581,20 +1581,20 @@ bitmap_line: {
|
||||
jsr bitmap_line_ydxi
|
||||
breturn:
|
||||
rts
|
||||
b11:
|
||||
b8:
|
||||
stx bitmap_line_xdyi.x
|
||||
lda y1
|
||||
sta bitmap_line_xdyi.y
|
||||
sty bitmap_line_xdyi.yd
|
||||
jsr bitmap_line_xdyi
|
||||
jmp breturn
|
||||
b10:
|
||||
b7:
|
||||
lda y1
|
||||
sec
|
||||
sbc y0
|
||||
tay
|
||||
cpy xd
|
||||
bcc b15
|
||||
bcc b9
|
||||
lda y0
|
||||
sta bitmap_line_ydxd.y
|
||||
ldx x0
|
||||
@ -1603,7 +1603,7 @@ bitmap_line: {
|
||||
sty bitmap_line_ydxd.yd
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
b15:
|
||||
b9:
|
||||
stx bitmap_line_xdyd.x
|
||||
lda y1
|
||||
sta bitmap_line_xdyd.y
|
||||
@ -1617,38 +1617,38 @@ bitmap_line: {
|
||||
sta xd
|
||||
lda y0
|
||||
cmp y1
|
||||
bcc b20
|
||||
bcc b11
|
||||
sec
|
||||
sbc y1
|
||||
tay
|
||||
cpy xd
|
||||
bcc b21
|
||||
bcc b12
|
||||
lda y1
|
||||
sta bitmap_line_ydxd.y
|
||||
sty bitmap_line_ydxd.yd
|
||||
jsr bitmap_line_ydxd
|
||||
jmp breturn
|
||||
b21:
|
||||
b12:
|
||||
lda x0
|
||||
sta bitmap_line_xdyd.x
|
||||
stx bitmap_line_xdyd.x1
|
||||
sty bitmap_line_xdyd.yd
|
||||
jsr bitmap_line_xdyd
|
||||
jmp breturn
|
||||
b20:
|
||||
b11:
|
||||
lda y1
|
||||
sec
|
||||
sbc y0
|
||||
tay
|
||||
cpy xd
|
||||
bcc b25
|
||||
bcc b13
|
||||
lda y0
|
||||
sta bitmap_line_ydxi.y
|
||||
ldx x0
|
||||
sty bitmap_line_ydxi.yd
|
||||
jsr bitmap_line_ydxi
|
||||
jmp breturn
|
||||
b25:
|
||||
b13:
|
||||
lda x0
|
||||
sta bitmap_line_xdyi.x
|
||||
stx bitmap_line_xdyi.x1
|
||||
@ -1878,7 +1878,7 @@ bitmap_init: {
|
||||
sta yoffs
|
||||
sta yoffs+1
|
||||
tax
|
||||
b5:
|
||||
b3:
|
||||
lda #7
|
||||
sax _6
|
||||
lda yoffs
|
||||
@ -1889,7 +1889,7 @@ bitmap_init: {
|
||||
txa
|
||||
and #7
|
||||
cmp #7
|
||||
bne b6
|
||||
bne b4
|
||||
clc
|
||||
lda yoffs
|
||||
adc #<$28*8
|
||||
@ -1897,10 +1897,10 @@ bitmap_init: {
|
||||
lda yoffs+1
|
||||
adc #>$28*8
|
||||
sta yoffs+1
|
||||
b6:
|
||||
b4:
|
||||
inx
|
||||
cpx #0
|
||||
bne b5
|
||||
bne b3
|
||||
rts
|
||||
}
|
||||
// Multicolor Character Mode (LINEAR/HICOL/CHUNK/COLDIS/BMM/ECM = 0, MCM = 1)
|
||||
@ -2253,9 +2253,9 @@ print_str_lines: {
|
||||
ldy #0
|
||||
lda (str),y
|
||||
cmp #'@'
|
||||
bne b6
|
||||
bne b2
|
||||
rts
|
||||
b6:
|
||||
b2:
|
||||
ldy #0
|
||||
lda (str),y
|
||||
inc str
|
||||
@ -2263,16 +2263,16 @@ print_str_lines: {
|
||||
inc str+1
|
||||
!:
|
||||
cmp #'@'
|
||||
beq b7
|
||||
beq b3
|
||||
ldy #0
|
||||
sta (print_char_cursor),y
|
||||
inc print_char_cursor
|
||||
bne !+
|
||||
inc print_char_cursor+1
|
||||
!:
|
||||
b7:
|
||||
b3:
|
||||
cmp #'@'
|
||||
bne b6
|
||||
bne b2
|
||||
jsr print_ln
|
||||
lda print_line_cursor
|
||||
sta print_char_cursor
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
(label) @54
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -346,11 +346,11 @@
|
||||
(byte~) bitmap_init::$8 reg byte a 202.0
|
||||
(byte~) bitmap_init::$9 reg byte a 202.0
|
||||
(label) bitmap_init::@1
|
||||
(label) bitmap_init::@10
|
||||
(label) bitmap_init::@2
|
||||
(label) bitmap_init::@3
|
||||
(label) bitmap_init::@4
|
||||
(label) bitmap_init::@5
|
||||
(label) bitmap_init::@6
|
||||
(label) bitmap_init::@7
|
||||
(label) bitmap_init::@return
|
||||
(byte*) bitmap_init::bitmap
|
||||
(byte) bitmap_init::bits
|
||||
@ -371,17 +371,17 @@
|
||||
(label) bitmap_line::@1
|
||||
(label) bitmap_line::@10
|
||||
(label) bitmap_line::@11
|
||||
(label) bitmap_line::@15
|
||||
(label) bitmap_line::@17
|
||||
(label) bitmap_line::@20
|
||||
(label) bitmap_line::@21
|
||||
(label) bitmap_line::@25
|
||||
(label) bitmap_line::@27
|
||||
(label) bitmap_line::@12
|
||||
(label) bitmap_line::@13
|
||||
(label) bitmap_line::@14
|
||||
(label) bitmap_line::@2
|
||||
(label) bitmap_line::@3
|
||||
(label) bitmap_line::@4
|
||||
(label) bitmap_line::@5
|
||||
(label) bitmap_line::@6
|
||||
(label) bitmap_line::@7
|
||||
(label) bitmap_line::@8
|
||||
(label) bitmap_line::@9
|
||||
(label) bitmap_line::@return
|
||||
(byte) bitmap_line::x0
|
||||
(byte) bitmap_line::x0#0 x0 zp ZP_BYTE:9 5.173913043478264
|
||||
@ -404,7 +404,7 @@
|
||||
(label) bitmap_line_xdyd::@1
|
||||
(label) bitmap_line_xdyd::@2
|
||||
(label) bitmap_line_xdyd::@3
|
||||
(label) bitmap_line_xdyd::@5
|
||||
(label) bitmap_line_xdyd::@4
|
||||
(label) bitmap_line_xdyd::@return
|
||||
(byte) bitmap_line_xdyd::e
|
||||
(byte) bitmap_line_xdyd::e#0 e zp ZP_BYTE:12 4.0
|
||||
@ -442,7 +442,7 @@
|
||||
(label) bitmap_line_xdyi::@1
|
||||
(label) bitmap_line_xdyi::@2
|
||||
(label) bitmap_line_xdyi::@3
|
||||
(label) bitmap_line_xdyi::@5
|
||||
(label) bitmap_line_xdyi::@4
|
||||
(label) bitmap_line_xdyi::@return
|
||||
(byte) bitmap_line_xdyi::e
|
||||
(byte) bitmap_line_xdyi::e#0 e zp ZP_BYTE:12 4.0
|
||||
@ -480,7 +480,7 @@
|
||||
(label) bitmap_line_ydxd::@1
|
||||
(label) bitmap_line_ydxd::@2
|
||||
(label) bitmap_line_ydxd::@3
|
||||
(label) bitmap_line_ydxd::@5
|
||||
(label) bitmap_line_ydxd::@4
|
||||
(label) bitmap_line_ydxd::@return
|
||||
(byte) bitmap_line_ydxd::e
|
||||
(byte) bitmap_line_ydxd::e#0 e zp ZP_BYTE:9 4.0
|
||||
@ -518,7 +518,7 @@
|
||||
(label) bitmap_line_ydxi::@1
|
||||
(label) bitmap_line_ydxi::@2
|
||||
(label) bitmap_line_ydxi::@3
|
||||
(label) bitmap_line_ydxi::@5
|
||||
(label) bitmap_line_ydxi::@4
|
||||
(label) bitmap_line_ydxi::@return
|
||||
(byte) bitmap_line_ydxi::e
|
||||
(byte) bitmap_line_ydxi::e#0 e zp ZP_BYTE:9 4.0
|
||||
@ -598,7 +598,7 @@
|
||||
(byte) keyboard_events_size
|
||||
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
|
||||
(byte~) keyboard_key_pressed::$2 reg byte a 4.0
|
||||
(label) keyboard_key_pressed::@2
|
||||
(label) keyboard_key_pressed::@1
|
||||
(label) keyboard_key_pressed::@return
|
||||
(byte) keyboard_key_pressed::colidx
|
||||
(byte) keyboard_key_pressed::colidx#0 colidx zp ZP_BYTE:7 0.6666666666666666
|
||||
@ -643,7 +643,7 @@
|
||||
(byte) keyboard_modifiers
|
||||
(byte[8]) keyboard_scan_values
|
||||
(void()) main()
|
||||
(label) main::@2
|
||||
(label) main::@1
|
||||
(void()) menu()
|
||||
(byte~) menu::$29 reg byte a 202.0
|
||||
(byte~) menu::$33 reg byte a 202.0
|
||||
@ -657,6 +657,7 @@
|
||||
(byte~) menu::$65 reg byte a 202.0
|
||||
(byte~) menu::$69 reg byte a 202.0
|
||||
(byte~) menu::$73 reg byte a 202.0
|
||||
(label) menu::@1
|
||||
(label) menu::@10
|
||||
(label) menu::@11
|
||||
(label) menu::@12
|
||||
@ -671,33 +672,32 @@
|
||||
(label) menu::@20
|
||||
(label) menu::@21
|
||||
(label) menu::@22
|
||||
(label) menu::@23
|
||||
(label) menu::@24
|
||||
(label) menu::@25
|
||||
(label) menu::@26
|
||||
(label) menu::@27
|
||||
(label) menu::@28
|
||||
(label) menu::@29
|
||||
(label) menu::@3
|
||||
(label) menu::@30
|
||||
(label) menu::@31
|
||||
(label) menu::@32
|
||||
(label) menu::@33
|
||||
(label) menu::@34
|
||||
(label) menu::@35
|
||||
(label) menu::@36
|
||||
(label) menu::@37
|
||||
(label) menu::@38
|
||||
(label) menu::@39
|
||||
(label) menu::@4
|
||||
(label) menu::@40
|
||||
(label) menu::@42
|
||||
(label) menu::@44
|
||||
(label) menu::@47
|
||||
(label) menu::@48
|
||||
(label) menu::@50
|
||||
(label) menu::@51
|
||||
(label) menu::@53
|
||||
(label) menu::@55
|
||||
(label) menu::@57
|
||||
(label) menu::@59
|
||||
(label) menu::@41
|
||||
(label) menu::@5
|
||||
(label) menu::@6
|
||||
(label) menu::@61
|
||||
(label) menu::@63
|
||||
(label) menu::@65
|
||||
(label) menu::@67
|
||||
(label) menu::@69
|
||||
(label) menu::@71
|
||||
(label) menu::@7
|
||||
(label) menu::@8
|
||||
(label) menu::@9
|
||||
(label) menu::@return
|
||||
(byte*) menu::CHARSET
|
||||
(const byte*) menu::CHARSET#0 CHARSET = ((byte*))(word/dword/signed dword) $9800
|
||||
@ -713,7 +713,6 @@
|
||||
(word~) mode_8bppchunkybmm::$27 $27 zp ZP_WORD:13 2002.0
|
||||
(label) mode_8bppchunkybmm::@1
|
||||
(label) mode_8bppchunkybmm::@10
|
||||
(label) mode_8bppchunkybmm::@11
|
||||
(label) mode_8bppchunkybmm::@2
|
||||
(label) mode_8bppchunkybmm::@3
|
||||
(label) mode_8bppchunkybmm::@4
|
||||
@ -721,6 +720,7 @@
|
||||
(label) mode_8bppchunkybmm::@6
|
||||
(label) mode_8bppchunkybmm::@7
|
||||
(label) mode_8bppchunkybmm::@8
|
||||
(label) mode_8bppchunkybmm::@9
|
||||
(label) mode_8bppchunkybmm::@return
|
||||
(dword) mode_8bppchunkybmm::PLANEB
|
||||
(const dword) mode_8bppchunkybmm::PLANEB#0 PLANEB = (dword/signed dword) $20000
|
||||
@ -756,7 +756,7 @@
|
||||
(label) mode_8bpppixelcell::@11
|
||||
(label) mode_8bpppixelcell::@12
|
||||
(label) mode_8bpppixelcell::@13
|
||||
(label) mode_8bpppixelcell::@14
|
||||
(label) mode_8bpppixelcell::@2
|
||||
(label) mode_8bpppixelcell::@3
|
||||
(label) mode_8bpppixelcell::@4
|
||||
(label) mode_8bpppixelcell::@5
|
||||
@ -831,23 +831,23 @@
|
||||
(label) mode_ctrl::@14
|
||||
(label) mode_ctrl::@15
|
||||
(label) mode_ctrl::@16
|
||||
(label) mode_ctrl::@17
|
||||
(label) mode_ctrl::@18
|
||||
(label) mode_ctrl::@19
|
||||
(label) mode_ctrl::@2
|
||||
(label) mode_ctrl::@20
|
||||
(label) mode_ctrl::@21
|
||||
(label) mode_ctrl::@22
|
||||
(label) mode_ctrl::@23
|
||||
(label) mode_ctrl::@24
|
||||
(label) mode_ctrl::@25
|
||||
(label) mode_ctrl::@26
|
||||
(label) mode_ctrl::@27
|
||||
(label) mode_ctrl::@28
|
||||
(label) mode_ctrl::@30
|
||||
(label) mode_ctrl::@32
|
||||
(label) mode_ctrl::@33
|
||||
(label) mode_ctrl::@34
|
||||
(label) mode_ctrl::@35
|
||||
(label) mode_ctrl::@36
|
||||
(label) mode_ctrl::@37
|
||||
(label) mode_ctrl::@38
|
||||
(label) mode_ctrl::@39
|
||||
(label) mode_ctrl::@46
|
||||
(label) mode_ctrl::@3
|
||||
(label) mode_ctrl::@4
|
||||
(label) mode_ctrl::@5
|
||||
(label) mode_ctrl::@6
|
||||
(label) mode_ctrl::@7
|
||||
(label) mode_ctrl::@8
|
||||
(label) mode_ctrl::@9
|
||||
(label) mode_ctrl::@return
|
||||
@ -1053,14 +1053,14 @@
|
||||
(byte~) mode_sixsfred::$18 reg byte a 2002.0
|
||||
(byte~) mode_sixsfred::$21 reg byte a 2002.0
|
||||
(label) mode_sixsfred::@1
|
||||
(label) mode_sixsfred::@10
|
||||
(label) mode_sixsfred::@11
|
||||
(label) mode_sixsfred::@12
|
||||
(label) mode_sixsfred::@13
|
||||
(label) mode_sixsfred::@14
|
||||
(label) mode_sixsfred::@2
|
||||
(label) mode_sixsfred::@3
|
||||
(label) mode_sixsfred::@4
|
||||
(label) mode_sixsfred::@5
|
||||
(label) mode_sixsfred::@6
|
||||
(label) mode_sixsfred::@7
|
||||
(label) mode_sixsfred::@8
|
||||
(label) mode_sixsfred::@9
|
||||
@ -1115,14 +1115,14 @@
|
||||
(byte~) mode_sixsfred2::$18 reg byte a 2002.0
|
||||
(byte~) mode_sixsfred2::$21 reg byte a 2002.0
|
||||
(label) mode_sixsfred2::@1
|
||||
(label) mode_sixsfred2::@10
|
||||
(label) mode_sixsfred2::@11
|
||||
(label) mode_sixsfred2::@12
|
||||
(label) mode_sixsfred2::@13
|
||||
(label) mode_sixsfred2::@14
|
||||
(label) mode_sixsfred2::@2
|
||||
(label) mode_sixsfred2::@3
|
||||
(label) mode_sixsfred2::@4
|
||||
(label) mode_sixsfred2::@5
|
||||
(label) mode_sixsfred2::@6
|
||||
(label) mode_sixsfred2::@7
|
||||
(label) mode_sixsfred2::@8
|
||||
(label) mode_sixsfred2::@9
|
||||
@ -1175,7 +1175,7 @@
|
||||
(byte~) mode_stdbitmap::$25 reg byte a 2002.0
|
||||
(byte~) mode_stdbitmap::$26 reg byte a 2002.0
|
||||
(label) mode_stdbitmap::@1
|
||||
(label) mode_stdbitmap::@11
|
||||
(label) mode_stdbitmap::@10
|
||||
(label) mode_stdbitmap::@2
|
||||
(label) mode_stdbitmap::@3
|
||||
(label) mode_stdbitmap::@4
|
||||
@ -1261,15 +1261,15 @@
|
||||
(label) mode_twoplanebitmap::@1
|
||||
(label) mode_twoplanebitmap::@10
|
||||
(label) mode_twoplanebitmap::@11
|
||||
(label) mode_twoplanebitmap::@12
|
||||
(label) mode_twoplanebitmap::@13
|
||||
(label) mode_twoplanebitmap::@14
|
||||
(label) mode_twoplanebitmap::@15
|
||||
(label) mode_twoplanebitmap::@16
|
||||
(label) mode_twoplanebitmap::@17
|
||||
(label) mode_twoplanebitmap::@18
|
||||
(label) mode_twoplanebitmap::@2
|
||||
(label) mode_twoplanebitmap::@3
|
||||
(label) mode_twoplanebitmap::@4
|
||||
(label) mode_twoplanebitmap::@5
|
||||
(label) mode_twoplanebitmap::@6
|
||||
(label) mode_twoplanebitmap::@7
|
||||
(label) mode_twoplanebitmap::@8
|
||||
(label) mode_twoplanebitmap::@9
|
||||
@ -1341,10 +1341,10 @@
|
||||
(byte*) print_set_screen::screen
|
||||
(void()) print_str_lines((byte*) print_str_lines::str)
|
||||
(label) print_str_lines::@1
|
||||
(label) print_str_lines::@6
|
||||
(label) print_str_lines::@7
|
||||
(label) print_str_lines::@8
|
||||
(label) print_str_lines::@9
|
||||
(label) print_str_lines::@2
|
||||
(label) print_str_lines::@3
|
||||
(label) print_str_lines::@4
|
||||
(label) print_str_lines::@5
|
||||
(label) print_str_lines::@return
|
||||
(byte) print_str_lines::ch
|
||||
(byte) print_str_lines::ch#0 reg byte a 667.3333333333334
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call line
|
||||
to:main::@1
|
||||
|
@ -154,8 +154,9 @@ Coalesced [18] line::x#4 ← line::x#1
|
||||
Coalesced (already) [19] screen#18 ← screen#11
|
||||
Coalesced down to 3 phi equivalence classes
|
||||
Culled Empty Block (label) line::@3
|
||||
Renumbering block @2 to @1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@1
|
||||
@ -163,14 +164,14 @@ Adding NOP phi() at start of main::@1
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call line
|
||||
to:main::@1
|
||||
@ -239,17 +240,17 @@ INITIAL ASM
|
||||
.label screen = 4
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -361,17 +362,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label screen = 3
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -446,7 +447,7 @@ line: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
@ -454,10 +455,10 @@ Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1_from_b1 with b1
|
||||
Removing instruction b2_from_bbegin:
|
||||
Removing instruction b2:
|
||||
Removing instruction main_from_b2:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction line_from_b1:
|
||||
Removing instruction b1_from_line:
|
||||
@ -476,7 +477,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) line((byte) line::x0 , (byte) line::x1)
|
||||
@ -516,11 +517,11 @@ Score: 348
|
||||
//SEG2 Global Constants & labels
|
||||
.label screen = 3
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
//SEG5 @2
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) line((byte) line::x0 , (byte) line::x1)
|
||||
|
@ -11,11 +11,11 @@ main: scope:[main] from @1
|
||||
[4] *((const byte*) main::SCREEN#0) ← (const byte) main::midw#0
|
||||
[5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::midb#0
|
||||
[6] if(*((const byte*) main::SCREEN#0)==*((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1)) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main
|
||||
[7] *((const byte*) main::BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1 main::@3
|
||||
main::@return: scope:[main] from main::@1 main::@2
|
||||
[8] return
|
||||
to:@return
|
||||
main::@1: scope:[main] from main
|
||||
|
@ -123,6 +123,7 @@ Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Renumbering block main::@3 to main::@2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
@ -141,11 +142,11 @@ main: scope:[main] from @1
|
||||
[4] *((const byte*) main::SCREEN#0) ← (const byte) main::midw#0
|
||||
[5] *((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::midb#0
|
||||
[6] if(*((const byte*) main::SCREEN#0)==*((const byte*) main::SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1)) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main
|
||||
[7] *((const byte*) main::BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1 main::@3
|
||||
main::@return: scope:[main] from main::@1 main::@2
|
||||
[8] return
|
||||
to:@return
|
||||
main::@1: scope:[main] from main
|
||||
@ -209,9 +210,9 @@ main: {
|
||||
lda SCREEN
|
||||
cmp SCREEN+1
|
||||
beq b1
|
||||
jmp b3
|
||||
//SEG13 main::@3
|
||||
b3:
|
||||
jmp b2
|
||||
//SEG13 main::@2
|
||||
b2:
|
||||
//SEG14 [7] *((const byte*) main::BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 2 -- _deref_pbuc1=vbuc2
|
||||
lda #2
|
||||
sta BGCOL
|
||||
@ -284,9 +285,9 @@ main: {
|
||||
lda SCREEN
|
||||
cmp SCREEN+1
|
||||
beq b1
|
||||
jmp b3
|
||||
//SEG13 main::@3
|
||||
b3:
|
||||
jmp b2
|
||||
//SEG13 main::@2
|
||||
b2:
|
||||
//SEG14 [7] *((const byte*) main::BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 2 -- _deref_pbuc1=vbuc2
|
||||
lda #2
|
||||
sta BGCOL
|
||||
@ -306,7 +307,7 @@ main: {
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b1_from_bbegin:
|
||||
@ -314,7 +315,7 @@ Removing instruction b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b3:
|
||||
Removing instruction b2:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
@ -328,7 +329,7 @@ FINAL SYMBOL TABLE
|
||||
(label) @end
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@3
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
(byte*) main::BGCOL
|
||||
(const byte*) main::BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) $d021
|
||||
@ -385,7 +386,7 @@ main: {
|
||||
lda SCREEN
|
||||
cmp SCREEN+1
|
||||
beq b1
|
||||
//SEG13 main::@3
|
||||
//SEG13 main::@2
|
||||
//SEG14 [7] *((const byte*) main::BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 2 -- _deref_pbuc1=vbuc2
|
||||
lda #2
|
||||
sta BGCOL
|
||||
|
@ -3,7 +3,7 @@
|
||||
(label) @end
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@3
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
(byte*) main::BGCOL
|
||||
(const byte*) main::BGCOL#0 BGCOL = ((byte*))(word/dword/signed dword) $d021
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
|
@ -242,8 +242,9 @@ Coalesced [24] w::i#3 ← w::i#1
|
||||
Coalesced down to 2 phi equivalence classes
|
||||
Culled Empty Block (label) main::@4
|
||||
Culled Empty Block (label) w::@3
|
||||
Renumbering block @2 to @1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@2
|
||||
@ -252,14 +253,14 @@ Adding NOP phi() at start of w
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
@ -348,17 +349,17 @@ INITIAL ASM
|
||||
.label SCREEN4 = SCREEN+$28*9
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -504,17 +505,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label SCREEN4 = SCREEN+$28*9
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -604,7 +605,7 @@ w: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
@ -614,10 +615,10 @@ Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1_from_b1 with b1
|
||||
Replacing label b1_from_b1 with b1
|
||||
Removing instruction b2_from_bbegin:
|
||||
Removing instruction b2:
|
||||
Removing instruction main_from_b2:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
Removing instruction w_from_b2:
|
||||
@ -640,7 +641,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
@ -698,11 +699,11 @@ Score: 648
|
||||
.label SCREEN3 = SCREEN+$28*6
|
||||
.label SCREEN4 = SCREEN+$28*9
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
//SEG5 @2
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
|
@ -5,18 +5,18 @@
|
||||
.label RASTER = $d012
|
||||
.label SCREEN = $400
|
||||
main: {
|
||||
b2:
|
||||
b1:
|
||||
lda RASTER
|
||||
cmp #$20
|
||||
beq !+
|
||||
bcs b6
|
||||
bcs b2
|
||||
!:
|
||||
cmp #$40
|
||||
bcc b6
|
||||
b7:
|
||||
bcc b2
|
||||
b3:
|
||||
sta SCREEN
|
||||
jmp b2
|
||||
b6:
|
||||
jmp b1
|
||||
b2:
|
||||
lda #0
|
||||
jmp b7
|
||||
jmp b3
|
||||
}
|
||||
|
@ -9,18 +9,18 @@
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main main::@7
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
[5] (byte) main::key#0 ← *((const byte*) RASTER#0)
|
||||
[6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@6
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@2
|
||||
[7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@6 main::@9
|
||||
[8] (byte) main::key#2 ← phi( main::@9/(byte) main::key#0 main::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
|
||||
[6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@2
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@1
|
||||
[7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@4
|
||||
[8] (byte) main::key#2 ← phi( main::@4/(byte) main::key#0 main::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 )
|
||||
[9] *((const byte*) SCREEN#0) ← (byte) main::key#2
|
||||
to:main::@2
|
||||
main::@6: scope:[main] from main::@2 main::@9
|
||||
to:main::@1
|
||||
main::@2: scope:[main] from main::@1 main::@4
|
||||
[10] phi()
|
||||
to:main::@7
|
||||
to:main::@3
|
||||
|
@ -93,11 +93,15 @@ Created 1 initial phi equivalence classes
|
||||
Coalesced [8] main::key#3 ← main::key#0
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Culled Empty Block (label) main::@10
|
||||
Renumbering block main::@2 to main::@1
|
||||
Renumbering block main::@6 to main::@2
|
||||
Renumbering block main::@7 to main::@3
|
||||
Renumbering block main::@9 to main::@4
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@6
|
||||
Adding NOP phi() at start of main::@2
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
@ -111,21 +115,21 @@ FINAL CONTROL FLOW GRAPH
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main main::@7
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@3
|
||||
[5] (byte) main::key#0 ← *((const byte*) RASTER#0)
|
||||
[6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@6
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::@2
|
||||
[7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@6 main::@9
|
||||
[8] (byte) main::key#2 ← phi( main::@9/(byte) main::key#0 main::@6/(byte/signed byte/word/signed word/dword/signed dword) 0 )
|
||||
[6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@2
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@1
|
||||
[7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2 main::@4
|
||||
[8] (byte) main::key#2 ← phi( main::@4/(byte) main::key#0 main::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 )
|
||||
[9] *((const byte*) SCREEN#0) ← (byte) main::key#2
|
||||
to:main::@2
|
||||
main::@6: scope:[main] from main::@2 main::@9
|
||||
to:main::@1
|
||||
main::@2: scope:[main] from main::@1 main::@4
|
||||
[10] phi()
|
||||
to:main::@7
|
||||
to:main::@3
|
||||
|
||||
|
||||
VARIABLE REGISTER WEIGHTS
|
||||
@ -171,45 +175,45 @@ bend:
|
||||
//SEG10 main
|
||||
main: {
|
||||
.label key = 2
|
||||
jmp b2
|
||||
//SEG11 main::@2
|
||||
b2:
|
||||
jmp b1
|
||||
//SEG11 main::@1
|
||||
b1:
|
||||
//SEG12 [5] (byte) main::key#0 ← *((const byte*) RASTER#0) -- vbuz1=_deref_pbuc1
|
||||
lda RASTER
|
||||
sta key
|
||||
//SEG13 [6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@6 -- vbuz1_gt_vbuc1_then_la1
|
||||
//SEG13 [6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@2 -- vbuz1_gt_vbuc1_then_la1
|
||||
lda #$20
|
||||
cmp key
|
||||
bcc b6_from_b2
|
||||
jmp b9
|
||||
//SEG14 main::@9
|
||||
b9:
|
||||
//SEG15 [7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 -- vbuz1_lt_vbuc1_then_la1
|
||||
bcc b2_from_b1
|
||||
jmp b4
|
||||
//SEG14 main::@4
|
||||
b4:
|
||||
//SEG15 [7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@2 -- vbuz1_lt_vbuc1_then_la1
|
||||
lda key
|
||||
cmp #$40
|
||||
bcc b6_from_b9
|
||||
//SEG16 [8] phi from main::@9 to main::@7 [phi:main::@9->main::@7]
|
||||
b7_from_b9:
|
||||
//SEG17 [8] phi (byte) main::key#2 = (byte) main::key#0 [phi:main::@9->main::@7#0] -- register_copy
|
||||
jmp b7
|
||||
//SEG18 main::@7
|
||||
b7:
|
||||
bcc b2_from_b4
|
||||
//SEG16 [8] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
b3_from_b4:
|
||||
//SEG17 [8] phi (byte) main::key#2 = (byte) main::key#0 [phi:main::@4->main::@3#0] -- register_copy
|
||||
jmp b3
|
||||
//SEG18 main::@3
|
||||
b3:
|
||||
//SEG19 [9] *((const byte*) SCREEN#0) ← (byte) main::key#2 -- _deref_pbuc1=vbuz1
|
||||
lda key
|
||||
sta SCREEN
|
||||
jmp b1
|
||||
//SEG20 [10] phi from main::@1 main::@4 to main::@2 [phi:main::@1/main::@4->main::@2]
|
||||
b2_from_b1:
|
||||
b2_from_b4:
|
||||
jmp b2
|
||||
//SEG20 [10] phi from main::@2 main::@9 to main::@6 [phi:main::@2/main::@9->main::@6]
|
||||
b6_from_b2:
|
||||
b6_from_b9:
|
||||
jmp b6
|
||||
//SEG21 main::@6
|
||||
b6:
|
||||
//SEG22 [8] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
|
||||
b7_from_b6:
|
||||
//SEG23 [8] phi (byte) main::key#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@7#0] -- vbuz1=vbuc1
|
||||
//SEG21 main::@2
|
||||
b2:
|
||||
//SEG22 [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
b3_from_b2:
|
||||
//SEG23 [8] phi (byte) main::key#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1
|
||||
lda #0
|
||||
sta key
|
||||
jmp b7
|
||||
jmp b3
|
||||
}
|
||||
|
||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||
@ -250,65 +254,65 @@ bend_from_b1:
|
||||
bend:
|
||||
//SEG10 main
|
||||
main: {
|
||||
jmp b2
|
||||
//SEG11 main::@2
|
||||
b2:
|
||||
jmp b1
|
||||
//SEG11 main::@1
|
||||
b1:
|
||||
//SEG12 [5] (byte) main::key#0 ← *((const byte*) RASTER#0) -- vbuaa=_deref_pbuc1
|
||||
lda RASTER
|
||||
//SEG13 [6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@6 -- vbuaa_gt_vbuc1_then_la1
|
||||
//SEG13 [6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@2 -- vbuaa_gt_vbuc1_then_la1
|
||||
cmp #$20
|
||||
beq !+
|
||||
bcs b6_from_b2
|
||||
bcs b2_from_b1
|
||||
!:
|
||||
jmp b9
|
||||
//SEG14 main::@9
|
||||
b9:
|
||||
//SEG15 [7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 -- vbuaa_lt_vbuc1_then_la1
|
||||
jmp b4
|
||||
//SEG14 main::@4
|
||||
b4:
|
||||
//SEG15 [7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@2 -- vbuaa_lt_vbuc1_then_la1
|
||||
cmp #$40
|
||||
bcc b6_from_b9
|
||||
//SEG16 [8] phi from main::@9 to main::@7 [phi:main::@9->main::@7]
|
||||
b7_from_b9:
|
||||
//SEG17 [8] phi (byte) main::key#2 = (byte) main::key#0 [phi:main::@9->main::@7#0] -- register_copy
|
||||
jmp b7
|
||||
//SEG18 main::@7
|
||||
b7:
|
||||
bcc b2_from_b4
|
||||
//SEG16 [8] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
b3_from_b4:
|
||||
//SEG17 [8] phi (byte) main::key#2 = (byte) main::key#0 [phi:main::@4->main::@3#0] -- register_copy
|
||||
jmp b3
|
||||
//SEG18 main::@3
|
||||
b3:
|
||||
//SEG19 [9] *((const byte*) SCREEN#0) ← (byte) main::key#2 -- _deref_pbuc1=vbuaa
|
||||
sta SCREEN
|
||||
jmp b1
|
||||
//SEG20 [10] phi from main::@1 main::@4 to main::@2 [phi:main::@1/main::@4->main::@2]
|
||||
b2_from_b1:
|
||||
b2_from_b4:
|
||||
jmp b2
|
||||
//SEG20 [10] phi from main::@2 main::@9 to main::@6 [phi:main::@2/main::@9->main::@6]
|
||||
b6_from_b2:
|
||||
b6_from_b9:
|
||||
jmp b6
|
||||
//SEG21 main::@6
|
||||
b6:
|
||||
//SEG22 [8] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
|
||||
b7_from_b6:
|
||||
//SEG23 [8] phi (byte) main::key#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@7#0] -- vbuaa=vbuc1
|
||||
//SEG21 main::@2
|
||||
b2:
|
||||
//SEG22 [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
b3_from_b2:
|
||||
//SEG23 [8] phi (byte) main::key#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
|
||||
lda #0
|
||||
jmp b7
|
||||
jmp b3
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b4
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b9
|
||||
Removing instruction jmp b7
|
||||
Removing instruction jmp b6
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b6_from_b2 with b6
|
||||
Replacing label b6_from_b9 with b6
|
||||
Replacing label b2_from_b1 with b2
|
||||
Replacing label b2_from_b4 with b2
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b7_from_b9:
|
||||
Removing instruction b6_from_b2:
|
||||
Removing instruction b6_from_b9:
|
||||
Removing instruction b7_from_b6:
|
||||
Removing instruction b3_from_b4:
|
||||
Removing instruction b2_from_b1:
|
||||
Removing instruction b2_from_b4:
|
||||
Removing instruction b3_from_b2:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b9:
|
||||
Removing instruction b4:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
@ -325,10 +329,10 @@ FINAL SYMBOL TABLE
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@6
|
||||
(label) main::@7
|
||||
(label) main::@9
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(byte) main::key
|
||||
(byte) main::key#0 reg byte a 14.666666666666666
|
||||
(byte) main::key#2 reg byte a 22.0
|
||||
@ -357,32 +361,32 @@ Score: 275
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
//SEG11 main::@2
|
||||
b2:
|
||||
//SEG11 main::@1
|
||||
b1:
|
||||
//SEG12 [5] (byte) main::key#0 ← *((const byte*) RASTER#0) -- vbuaa=_deref_pbuc1
|
||||
lda RASTER
|
||||
//SEG13 [6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@6 -- vbuaa_gt_vbuc1_then_la1
|
||||
//SEG13 [6] if((byte) main::key#0>(byte/signed byte/word/signed word/dword/signed dword) $20) goto main::@2 -- vbuaa_gt_vbuc1_then_la1
|
||||
cmp #$20
|
||||
beq !+
|
||||
bcs b6
|
||||
bcs b2
|
||||
!:
|
||||
//SEG14 main::@9
|
||||
//SEG15 [7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@6 -- vbuaa_lt_vbuc1_then_la1
|
||||
//SEG14 main::@4
|
||||
//SEG15 [7] if((byte) main::key#0<(byte/signed byte/word/signed word/dword/signed dword) $40) goto main::@2 -- vbuaa_lt_vbuc1_then_la1
|
||||
cmp #$40
|
||||
bcc b6
|
||||
//SEG16 [8] phi from main::@9 to main::@7 [phi:main::@9->main::@7]
|
||||
//SEG17 [8] phi (byte) main::key#2 = (byte) main::key#0 [phi:main::@9->main::@7#0] -- register_copy
|
||||
//SEG18 main::@7
|
||||
b7:
|
||||
bcc b2
|
||||
//SEG16 [8] phi from main::@4 to main::@3 [phi:main::@4->main::@3]
|
||||
//SEG17 [8] phi (byte) main::key#2 = (byte) main::key#0 [phi:main::@4->main::@3#0] -- register_copy
|
||||
//SEG18 main::@3
|
||||
b3:
|
||||
//SEG19 [9] *((const byte*) SCREEN#0) ← (byte) main::key#2 -- _deref_pbuc1=vbuaa
|
||||
sta SCREEN
|
||||
jmp b2
|
||||
//SEG20 [10] phi from main::@2 main::@9 to main::@6 [phi:main::@2/main::@9->main::@6]
|
||||
//SEG21 main::@6
|
||||
b6:
|
||||
//SEG22 [8] phi from main::@6 to main::@7 [phi:main::@6->main::@7]
|
||||
//SEG23 [8] phi (byte) main::key#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@6->main::@7#0] -- vbuaa=vbuc1
|
||||
jmp b1
|
||||
//SEG20 [10] phi from main::@1 main::@4 to main::@2 [phi:main::@1/main::@4->main::@2]
|
||||
//SEG21 main::@2
|
||||
b2:
|
||||
//SEG22 [8] phi from main::@2 to main::@3 [phi:main::@2->main::@3]
|
||||
//SEG23 [8] phi (byte) main::key#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@2->main::@3#0] -- vbuaa=vbuc1
|
||||
lda #0
|
||||
jmp b7
|
||||
jmp b3
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@6
|
||||
(label) main::@7
|
||||
(label) main::@9
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(byte) main::key
|
||||
(byte) main::key#0 reg byte a 14.666666666666666
|
||||
(byte) main::key#2 reg byte a 22.0
|
||||
|
@ -135,14 +135,14 @@ loop: {
|
||||
.label s = 3
|
||||
lda #0
|
||||
sta sin_idx
|
||||
b6:
|
||||
b2:
|
||||
lda #$ff
|
||||
cmp RASTER
|
||||
bne b6
|
||||
bne b2
|
||||
ldx sin_idx
|
||||
lda #4
|
||||
sta s
|
||||
b8:
|
||||
b4:
|
||||
lda s
|
||||
asl
|
||||
tay
|
||||
@ -153,9 +153,9 @@ loop: {
|
||||
inc s
|
||||
lda #8
|
||||
cmp s
|
||||
bne b8
|
||||
bne b4
|
||||
inc sin_idx
|
||||
jmp b6
|
||||
jmp b2
|
||||
}
|
||||
// Setup the IRQ
|
||||
sprites_irq_init: {
|
||||
@ -238,10 +238,10 @@ sprites_irq: {
|
||||
inx
|
||||
// Wait for the y-position before changing sprite pointers
|
||||
stx raster_sprite_gfx_modify
|
||||
b11:
|
||||
b8:
|
||||
lda RASTER
|
||||
cmp raster_sprite_gfx_modify
|
||||
bcc b11
|
||||
bcc b8
|
||||
ldx irq_sprite_ptr
|
||||
lda render_screen_showing
|
||||
cmp #0
|
||||
@ -271,7 +271,7 @@ sprites_irq: {
|
||||
lax irq_sprite_ptr
|
||||
axs #-[3]
|
||||
stx irq_sprite_ptr
|
||||
b6:
|
||||
b5:
|
||||
// Setup next interrupt
|
||||
lda irq_raster_next
|
||||
sta RASTER
|
||||
@ -294,7 +294,7 @@ sprites_irq: {
|
||||
lax irq_sprite_ptr
|
||||
axs #-[3]
|
||||
stx irq_sprite_ptr
|
||||
jmp b6
|
||||
jmp b5
|
||||
b3:
|
||||
lax irq_raster_next
|
||||
axs #-[$15]
|
||||
@ -303,7 +303,7 @@ sprites_irq: {
|
||||
sta irq_sprite_ypos
|
||||
lda #toSpritePtr2_return
|
||||
sta irq_sprite_ptr
|
||||
jmp b6
|
||||
jmp b5
|
||||
b1:
|
||||
stx PLAYFIELD_SPRITE_PTRS_1
|
||||
inx
|
||||
|
@ -1,7 +1,7 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@4
|
||||
@4: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] (byte) render_screen_showing#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
kickasm(location (const byte*) PLAYFIELD_SPRITES#0) {{ .var sprites = LoadPicture("playfield-sprites.png", List().add($010101, $000000))
|
||||
// Put the sprites into memory
|
||||
@ -18,19 +18,19 @@
|
||||
}
|
||||
}
|
||||
}}
|
||||
to:@5
|
||||
@5: scope:[] from @4
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[3] (byte) irq_raster_next#0 ← (const byte) IRQ_RASTER_FIRST#0
|
||||
[4] (byte) irq_sprite_ypos#0 ← (const byte) SPRITES_FIRST_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) $15
|
||||
to:toSpritePtr1
|
||||
toSpritePtr1: scope:[] from @5
|
||||
toSpritePtr1: scope:[] from @2
|
||||
[5] phi()
|
||||
to:@10
|
||||
@10: scope:[] from toSpritePtr1
|
||||
to:@5
|
||||
@5: scope:[] from toSpritePtr1
|
||||
[6] (byte) irq_sprite_ptr#0 ← (const byte) toSpritePtr1_return#0+(byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
[7] (byte) irq_cnt#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
to:@7
|
||||
@7: scope:[] from @10
|
||||
to:@3
|
||||
@3: scope:[] from @5
|
||||
kickasm(location (const byte*) SIN#0) {{ .var AMPL = 200-21
|
||||
.for(var i=0; i<256; i++) {
|
||||
.byte 51+AMPL/2+sin(toRadians([i*360]/256))*AMPL/2
|
||||
@ -38,14 +38,14 @@ toSpritePtr1: scope:[] from @5
|
||||
}}
|
||||
kickasm(location (const byte*) SIN_SPRITE#0) {{ .fill $40, $ff
|
||||
}}
|
||||
to:@9
|
||||
@9: scope:[] from @7
|
||||
to:@4
|
||||
@4: scope:[] from @3
|
||||
[10] phi()
|
||||
[11] call main
|
||||
to:@end
|
||||
@end: scope:[] from @9
|
||||
@end: scope:[] from @4
|
||||
[12] phi()
|
||||
main: scope:[main] from @9
|
||||
main: scope:[main] from @4
|
||||
[13] phi()
|
||||
to:main::vicSelectGfxBank1
|
||||
main::vicSelectGfxBank1: scope:[main] from main
|
||||
@ -59,18 +59,18 @@ main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
|
||||
to:main::toD0181
|
||||
main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1
|
||||
[17] phi()
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::toD0181
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::toD0181
|
||||
[18] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
|
||||
[19] call sprites_init
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@4
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@3
|
||||
[20] *((const byte*) SPRITES_ENABLE#0) ← (byte/word/signed word/dword/signed dword) $ff
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@5 main::@6
|
||||
[21] (byte) main::ypos#2 ← phi( main::@5/(byte) main::ypos#1 main::@6/(byte/signed byte/word/signed word/dword/signed dword) $32 )
|
||||
[21] (byte) main::xpos#2 ← phi( main::@5/(byte) main::xpos#1 main::@6/(byte/signed byte/word/signed word/dword/signed dword) $18 )
|
||||
[21] (byte) main::s#2 ← phi( main::@5/(byte) main::s#1 main::@6/(byte/signed byte/word/signed word/dword/signed dword) 4 )
|
||||
main::@1: scope:[main] from main::@4 main::@5
|
||||
[21] (byte) main::ypos#2 ← phi( main::@4/(byte) main::ypos#1 main::@5/(byte/signed byte/word/signed word/dword/signed dword) $32 )
|
||||
[21] (byte) main::xpos#2 ← phi( main::@4/(byte) main::xpos#1 main::@5/(byte/signed byte/word/signed word/dword/signed dword) $18 )
|
||||
[21] (byte) main::s#2 ← phi( main::@4/(byte) main::s#1 main::@5/(byte/signed byte/word/signed word/dword/signed dword) 4 )
|
||||
[22] (byte) main::s2#0 ← (byte) main::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[23] *((const byte*) SPRITES_XPOS#0 + (byte) main::s2#0) ← (byte) main::xpos#2
|
||||
[24] *((const byte*) SPRITES_YPOS#0 + (byte) main::s2#0) ← (byte) main::ypos#2
|
||||
@ -79,47 +79,47 @@ main::@1: scope:[main] from main::@5 main::@6
|
||||
to:main::toSpritePtr2
|
||||
main::toSpritePtr2: scope:[main] from main::@1
|
||||
[27] phi()
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::toSpritePtr2
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::toSpritePtr2
|
||||
[28] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0 + (byte) main::s#2) ← (const byte) main::toSpritePtr2_return#0
|
||||
[29] (byte) main::xpos#1 ← (byte) main::xpos#2 + (byte/signed byte/word/signed word/dword/signed dword) $18
|
||||
[30] (byte) main::ypos#1 ← (byte) main::ypos#2 + (byte/signed byte/word/signed word/dword/signed dword) $18
|
||||
[31] (byte) main::s#1 ← ++ (byte) main::s#2
|
||||
[32] if((byte) main::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@5
|
||||
main::@2: scope:[main] from main::@4
|
||||
[33] phi()
|
||||
[34] call sprites_irq_init
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@2
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@2
|
||||
[35] phi()
|
||||
[36] call loop
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@7
|
||||
main::@return: scope:[main] from main::@6
|
||||
[37] return
|
||||
to:@return
|
||||
loop: scope:[loop] from main::@7
|
||||
loop: scope:[loop] from main::@6
|
||||
[38] phi()
|
||||
to:loop::@1
|
||||
loop::@1: scope:[loop] from loop loop::@9
|
||||
[39] (byte) sin_idx#10 ← phi( loop/(byte/signed byte/word/signed word/dword/signed dword) 0 loop::@9/(byte) sin_idx#3 )
|
||||
to:loop::@6
|
||||
loop::@6: scope:[loop] from loop::@1 loop::@6
|
||||
[40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) $ff) goto loop::@6
|
||||
to:loop::@7
|
||||
loop::@7: scope:[loop] from loop::@6
|
||||
loop::@1: scope:[loop] from loop loop::@5
|
||||
[39] (byte) sin_idx#10 ← phi( loop/(byte/signed byte/word/signed word/dword/signed dword) 0 loop::@5/(byte) sin_idx#3 )
|
||||
to:loop::@2
|
||||
loop::@2: scope:[loop] from loop::@1 loop::@2
|
||||
[40] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) $ff) goto loop::@2
|
||||
to:loop::@3
|
||||
loop::@3: scope:[loop] from loop::@2
|
||||
[41] (byte) loop::idx#0 ← (byte) sin_idx#10
|
||||
to:loop::@8
|
||||
loop::@8: scope:[loop] from loop::@7 loop::@8
|
||||
[42] (byte) loop::idx#2 ← phi( loop::@7/(byte) loop::idx#0 loop::@8/(byte) loop::idx#1 )
|
||||
[42] (byte) loop::s#2 ← phi( loop::@7/(byte/signed byte/word/signed word/dword/signed dword) 4 loop::@8/(byte) loop::s#1 )
|
||||
to:loop::@4
|
||||
loop::@4: scope:[loop] from loop::@3 loop::@4
|
||||
[42] (byte) loop::idx#2 ← phi( loop::@3/(byte) loop::idx#0 loop::@4/(byte) loop::idx#1 )
|
||||
[42] (byte) loop::s#2 ← phi( loop::@3/(byte/signed byte/word/signed word/dword/signed dword) 4 loop::@4/(byte) loop::s#1 )
|
||||
[43] (byte~) loop::$1 ← (byte) loop::s#2 << (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[44] *((const byte*) SPRITES_YPOS#0 + (byte~) loop::$1) ← *((const byte*) SIN#0 + (byte) loop::idx#2)
|
||||
[45] (byte) loop::idx#1 ← (byte) loop::idx#2 + (byte/signed byte/word/signed word/dword/signed dword) $a
|
||||
[46] (byte) loop::s#1 ← ++ (byte) loop::s#2
|
||||
[47] if((byte) loop::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto loop::@8
|
||||
to:loop::@9
|
||||
loop::@9: scope:[loop] from loop::@8
|
||||
[47] if((byte) loop::s#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto loop::@4
|
||||
to:loop::@5
|
||||
loop::@5: scope:[loop] from loop::@4
|
||||
[48] (byte) sin_idx#3 ← ++ (byte) sin_idx#10
|
||||
to:loop::@1
|
||||
sprites_irq_init: scope:[sprites_irq_init] from main::@2
|
||||
@ -138,7 +138,7 @@ sprites_irq_init: scope:[sprites_irq_init] from main::@2
|
||||
sprites_irq_init::@return: scope:[sprites_irq_init] from sprites_irq_init
|
||||
[60] return
|
||||
to:@return
|
||||
sprites_init: scope:[sprites_init] from main::@4
|
||||
sprites_init: scope:[sprites_init] from main::@3
|
||||
[61] *((const byte*) SPRITES_ENABLE#0) ← (byte/signed byte/word/signed word/dword/signed dword) $f
|
||||
[62] *((const byte*) SPRITES_MC#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[63] *((const byte*) SPRITES_EXPAND_Y#0) ← *((const byte*) SPRITES_MC#0)
|
||||
@ -166,15 +166,15 @@ sprites_irq: scope:[sprites_irq] from
|
||||
[78] *((const byte*) SPRITES_YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 6) ← (byte) sprites_irq::ypos#0
|
||||
[79] (byte/signed word/word/dword/signed dword~) sprites_irq::$0 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[80] (byte) sprites_irq::raster_sprite_gfx_modify#0 ← (byte/signed word/word/dword/signed dword~) sprites_irq::$0
|
||||
to:sprites_irq::@11
|
||||
sprites_irq::@11: scope:[sprites_irq] from sprites_irq sprites_irq::@11
|
||||
[81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@11
|
||||
to:sprites_irq::@12
|
||||
sprites_irq::@12: scope:[sprites_irq] from sprites_irq::@11
|
||||
to:sprites_irq::@8
|
||||
sprites_irq::@8: scope:[sprites_irq] from sprites_irq sprites_irq::@8
|
||||
[81] if(*((const byte*) RASTER#0)<(byte) sprites_irq::raster_sprite_gfx_modify#0) goto sprites_irq::@8
|
||||
to:sprites_irq::@9
|
||||
sprites_irq::@9: scope:[sprites_irq] from sprites_irq::@8
|
||||
[82] (byte) sprites_irq::ptr#0 ← (byte) irq_sprite_ptr#0
|
||||
[83] if((byte) render_screen_showing#0==(byte/signed byte/word/signed word/dword/signed dword) 0) goto sprites_irq::@1
|
||||
to:sprites_irq::@13
|
||||
sprites_irq::@13: scope:[sprites_irq] from sprites_irq::@12
|
||||
to:sprites_irq::@10
|
||||
sprites_irq::@10: scope:[sprites_irq] from sprites_irq::@9
|
||||
[84] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0) ← (byte) sprites_irq::ptr#0
|
||||
[85] (byte) sprites_irq::ptr#3 ← ++ (byte) sprites_irq::ptr#0
|
||||
[86] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#3
|
||||
@ -182,43 +182,43 @@ sprites_irq::@13: scope:[sprites_irq] from sprites_irq::@12
|
||||
[88] (byte) sprites_irq::ptr#4 ← ++ (byte) sprites_irq::ptr#3
|
||||
[89] *((const byte*) PLAYFIELD_SPRITE_PTRS_2#0+(byte/signed byte/word/signed word/dword/signed dword) 3) ← (byte) sprites_irq::ptr#4
|
||||
to:sprites_irq::@2
|
||||
sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@13
|
||||
sprites_irq::@2: scope:[sprites_irq] from sprites_irq::@1 sprites_irq::@10
|
||||
[90] (byte) irq_cnt#1 ← ++ (byte) irq_cnt#0
|
||||
[91] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) 9) goto sprites_irq::@3
|
||||
to:sprites_irq::@7
|
||||
sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@2
|
||||
to:sprites_irq::@6
|
||||
sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@2
|
||||
[92] if((byte) irq_cnt#1==(byte/signed byte/word/signed word/dword/signed dword) $a) goto sprites_irq::@4
|
||||
to:sprites_irq::@8
|
||||
sprites_irq::@8: scope:[sprites_irq] from sprites_irq::@7
|
||||
to:sprites_irq::@7
|
||||
sprites_irq::@7: scope:[sprites_irq] from sprites_irq::@6
|
||||
[93] (byte) irq_raster_next#3 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) $14
|
||||
[94] (byte) irq_sprite_ypos#3 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) $15
|
||||
[95] (byte) irq_sprite_ptr#3 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
to:sprites_irq::@6
|
||||
sprites_irq::@6: scope:[sprites_irq] from sprites_irq::@15 sprites_irq::@4 sprites_irq::@8
|
||||
[96] (byte) irq_raster_next#4 ← phi( sprites_irq::@15/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@8/(byte) irq_raster_next#3 )
|
||||
to:sprites_irq::@5
|
||||
sprites_irq::@5: scope:[sprites_irq] from sprites_irq::@11 sprites_irq::@4 sprites_irq::@7
|
||||
[96] (byte) irq_raster_next#4 ← phi( sprites_irq::@11/(byte) irq_raster_next#1 sprites_irq::@4/(byte) irq_raster_next#2 sprites_irq::@7/(byte) irq_raster_next#3 )
|
||||
[97] *((const byte*) RASTER#0) ← (byte) irq_raster_next#4
|
||||
[98] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
to:sprites_irq::@return
|
||||
sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@6
|
||||
sprites_irq::@return: scope:[sprites_irq] from sprites_irq::@5
|
||||
[99] return
|
||||
to:@return
|
||||
sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@7
|
||||
sprites_irq::@4: scope:[sprites_irq] from sprites_irq::@6
|
||||
[100] (byte) irq_cnt#2 ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[101] (byte) irq_raster_next#2 ← (const byte) IRQ_RASTER_FIRST#0
|
||||
[102] (byte) irq_sprite_ypos#2 ← (byte) irq_sprite_ypos#0 + (byte/signed byte/word/signed word/dword/signed dword) $15
|
||||
[103] (byte) irq_sprite_ptr#2 ← (byte) irq_sprite_ptr#0 + (byte/signed byte/word/signed word/dword/signed dword) 3
|
||||
to:sprites_irq::@6
|
||||
to:sprites_irq::@5
|
||||
sprites_irq::@3: scope:[sprites_irq] from sprites_irq::@2
|
||||
[104] (byte) irq_raster_next#1 ← (byte) irq_raster_next#0 + (byte/signed byte/word/signed word/dword/signed dword) $15
|
||||
[105] (byte) irq_sprite_ypos#1 ← (const byte) SPRITES_FIRST_YPOS#0
|
||||
to:sprites_irq::toSpritePtr2
|
||||
sprites_irq::toSpritePtr2: scope:[sprites_irq] from sprites_irq::@3
|
||||
[106] phi()
|
||||
to:sprites_irq::@15
|
||||
sprites_irq::@15: scope:[sprites_irq] from sprites_irq::toSpritePtr2
|
||||
to:sprites_irq::@11
|
||||
sprites_irq::@11: scope:[sprites_irq] from sprites_irq::toSpritePtr2
|
||||
[107] (byte) irq_sprite_ptr#1 ← (const byte) sprites_irq::toSpritePtr2_return#0
|
||||
to:sprites_irq::@6
|
||||
sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@12
|
||||
to:sprites_irq::@5
|
||||
sprites_irq::@1: scope:[sprites_irq] from sprites_irq::@9
|
||||
[108] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0) ← (byte) sprites_irq::ptr#0
|
||||
[109] (byte) sprites_irq::ptr#1 ← ++ (byte) sprites_irq::ptr#0
|
||||
[110] *((const byte*) PLAYFIELD_SPRITE_PTRS_1#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte) sprites_irq::ptr#1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
(label) @10
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @3
|
||||
(label) @4
|
||||
(label) @5
|
||||
(label) @7
|
||||
(label) @9
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -165,10 +165,10 @@
|
||||
(void()) loop()
|
||||
(byte~) loop::$1 reg byte a 202.0
|
||||
(label) loop::@1
|
||||
(label) loop::@6
|
||||
(label) loop::@7
|
||||
(label) loop::@8
|
||||
(label) loop::@9
|
||||
(label) loop::@2
|
||||
(label) loop::@3
|
||||
(label) loop::@4
|
||||
(label) loop::@5
|
||||
(byte) loop::idx
|
||||
(byte) loop::idx#0 reg byte x 22.0
|
||||
(byte) loop::idx#1 reg byte x 67.33333333333333
|
||||
@ -180,10 +180,10 @@
|
||||
(byte/signed word/word/dword/signed dword~) main::$6 reg byte a 22.0
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@7
|
||||
(label) main::@return
|
||||
(byte) main::s
|
||||
(byte) main::s#1 reg byte y 16.5
|
||||
@ -252,16 +252,16 @@
|
||||
interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
|
||||
(byte/signed word/word/dword/signed dword~) sprites_irq::$0 reg byte x 4.0
|
||||
(label) sprites_irq::@1
|
||||
(label) sprites_irq::@10
|
||||
(label) sprites_irq::@11
|
||||
(label) sprites_irq::@12
|
||||
(label) sprites_irq::@13
|
||||
(label) sprites_irq::@15
|
||||
(label) sprites_irq::@2
|
||||
(label) sprites_irq::@3
|
||||
(label) sprites_irq::@4
|
||||
(label) sprites_irq::@5
|
||||
(label) sprites_irq::@6
|
||||
(label) sprites_irq::@7
|
||||
(label) sprites_irq::@8
|
||||
(label) sprites_irq::@9
|
||||
(label) sprites_irq::@return
|
||||
(byte) sprites_irq::ptr
|
||||
(byte) sprites_irq::ptr#0 reg byte x 2.5
|
||||
|
@ -235,20 +235,20 @@ main: {
|
||||
sta render_screen_show
|
||||
b1:
|
||||
// Wait for a frame to pass
|
||||
b6:
|
||||
b2:
|
||||
lda #$ff
|
||||
cmp RASTER
|
||||
bne b6
|
||||
bne b2
|
||||
jsr render_show
|
||||
jsr keyboard_event_scan
|
||||
jsr keyboard_event_get
|
||||
lda game_over
|
||||
cmp #0
|
||||
beq b9
|
||||
b11:
|
||||
beq b4
|
||||
b5:
|
||||
inc BORDERCOL
|
||||
jmp b11
|
||||
b9:
|
||||
jmp b5
|
||||
b4:
|
||||
stx play_movement.key_event
|
||||
jsr play_movement
|
||||
lda play_movement.return
|
||||
@ -294,18 +294,18 @@ render_score: {
|
||||
.label screen = 5
|
||||
lda render_screen_render
|
||||
cmp #0
|
||||
beq b1
|
||||
beq b2
|
||||
lda #<PLAYFIELD_SCREEN_2
|
||||
sta screen
|
||||
lda #>PLAYFIELD_SCREEN_2
|
||||
sta screen+1
|
||||
jmp b2
|
||||
b1:
|
||||
jmp b1
|
||||
b2:
|
||||
lda #<PLAYFIELD_SCREEN_1
|
||||
sta screen
|
||||
lda #>PLAYFIELD_SCREEN_1
|
||||
sta screen+1
|
||||
b2:
|
||||
b1:
|
||||
ldx score_bytes+2
|
||||
ldy #0
|
||||
lda #<score_offset
|
||||
@ -406,18 +406,18 @@ render_next: {
|
||||
.label screen_next_area = 7
|
||||
.label l = 9
|
||||
cmp #0
|
||||
beq b1
|
||||
beq b2
|
||||
lda #<PLAYFIELD_SCREEN_2+next_area_offset
|
||||
sta screen_next_area
|
||||
lda #>PLAYFIELD_SCREEN_2+next_area_offset
|
||||
sta screen_next_area+1
|
||||
jmp b2
|
||||
b1:
|
||||
jmp b1
|
||||
b2:
|
||||
lda #<PLAYFIELD_SCREEN_1+next_area_offset
|
||||
sta screen_next_area
|
||||
lda #>PLAYFIELD_SCREEN_1+next_area_offset
|
||||
sta screen_next_area+1
|
||||
b2:
|
||||
b1:
|
||||
txa
|
||||
asl
|
||||
tay
|
||||
@ -429,9 +429,9 @@ render_next: {
|
||||
sta next_piece_gfx+1
|
||||
lda #0
|
||||
sta l
|
||||
b5:
|
||||
b3:
|
||||
ldx #0
|
||||
b6:
|
||||
b4:
|
||||
ldy #0
|
||||
lda (next_piece_gfx),y
|
||||
inc next_piece_gfx
|
||||
@ -439,18 +439,18 @@ render_next: {
|
||||
inc next_piece_gfx+1
|
||||
!:
|
||||
cmp #0
|
||||
bne b7
|
||||
bne b5
|
||||
lda #0
|
||||
tay
|
||||
sta (screen_next_area),y
|
||||
b8:
|
||||
b6:
|
||||
inc screen_next_area
|
||||
bne !+
|
||||
inc screen_next_area+1
|
||||
!:
|
||||
inx
|
||||
cpx #4
|
||||
bne b6
|
||||
bne b4
|
||||
lda #$24
|
||||
clc
|
||||
adc screen_next_area
|
||||
@ -461,13 +461,13 @@ render_next: {
|
||||
inc l
|
||||
lda #4
|
||||
cmp l
|
||||
bne b5
|
||||
bne b3
|
||||
rts
|
||||
b7:
|
||||
b5:
|
||||
lda next_piece_char
|
||||
ldy #0
|
||||
sta (screen_next_area),y
|
||||
jmp b8
|
||||
jmp b6
|
||||
}
|
||||
// Render the current moving piece at position (current_xpos, current_ypos)
|
||||
// Ignores cases where parts of the tetromino is outside the playfield (sides/bottom) since the movement collision routine prevents this.
|
||||
@ -612,7 +612,7 @@ play_move_rotate: {
|
||||
beq b1
|
||||
cmp #KEY_X
|
||||
beq b2
|
||||
b3:
|
||||
b4:
|
||||
lda #0
|
||||
breturn:
|
||||
rts
|
||||
@ -621,7 +621,7 @@ play_move_rotate: {
|
||||
axs #-[$10]
|
||||
lda #$3f
|
||||
sax orientation
|
||||
b4:
|
||||
b3:
|
||||
lda current_xpos
|
||||
sta play_collision.xpos
|
||||
lda current_ypos
|
||||
@ -633,7 +633,7 @@ play_move_rotate: {
|
||||
sta current_piece_101+1
|
||||
jsr play_collision
|
||||
cmp #COLLISION_NONE
|
||||
bne b3
|
||||
bne b4
|
||||
lda orientation
|
||||
sta current_orientation
|
||||
clc
|
||||
@ -649,7 +649,7 @@ play_move_rotate: {
|
||||
axs #$10
|
||||
lda #$3f
|
||||
sax orientation
|
||||
jmp b4
|
||||
jmp b3
|
||||
}
|
||||
// Test if there is a collision between the current piece moved to (x, y) and anything on the playfield or the playfield boundaries
|
||||
// Returns information about the type of the collision detected
|
||||
@ -725,7 +725,7 @@ play_collision: {
|
||||
inc col
|
||||
inx
|
||||
cpx #4
|
||||
bne b21
|
||||
bne b10
|
||||
lda ypos2
|
||||
clc
|
||||
adc #2
|
||||
@ -733,14 +733,14 @@ play_collision: {
|
||||
inc l
|
||||
lda #4
|
||||
cmp l
|
||||
bne b20
|
||||
bne b9
|
||||
lda #COLLISION_NONE
|
||||
jmp breturn
|
||||
b20:
|
||||
b9:
|
||||
lda i
|
||||
sta i_11
|
||||
jmp b1
|
||||
b21:
|
||||
b10:
|
||||
lda i
|
||||
sta i_13
|
||||
jmp b2
|
||||
@ -833,7 +833,7 @@ play_move_down: {
|
||||
sta current_piece_98+1
|
||||
jsr play_collision
|
||||
cmp #COLLISION_NONE
|
||||
beq b14
|
||||
beq b10
|
||||
jsr play_lock_current
|
||||
jsr play_remove_lines
|
||||
lda play_remove_lines.removed
|
||||
@ -847,7 +847,7 @@ play_move_down: {
|
||||
sta current_piece+1
|
||||
lda #0
|
||||
sta current_orientation
|
||||
b15:
|
||||
b11:
|
||||
lda #0
|
||||
sta current_movedown_counter
|
||||
ldx #1
|
||||
@ -856,9 +856,9 @@ play_move_down: {
|
||||
ldx #0
|
||||
breturn:
|
||||
rts
|
||||
b14:
|
||||
b10:
|
||||
inc current_ypos
|
||||
jmp b15
|
||||
jmp b11
|
||||
}
|
||||
// Spawn a new piece
|
||||
// Moves the next piece into the current and spawns a new next piece
|
||||
@ -973,29 +973,29 @@ play_increase_level: {
|
||||
// Update speed of moving tetrominos down
|
||||
lda #$1d
|
||||
cmp level
|
||||
bcc b1
|
||||
bcc b3
|
||||
ldy level
|
||||
lda MOVEDOWN_SLOW_SPEEDS,y
|
||||
sta current_movedown_slow
|
||||
jmp b2
|
||||
b1:
|
||||
jmp b1
|
||||
b3:
|
||||
lda #1
|
||||
sta current_movedown_slow
|
||||
b2:
|
||||
b1:
|
||||
inc level_bcd
|
||||
lda #$f
|
||||
and level_bcd
|
||||
cmp #$a
|
||||
bne b3
|
||||
bne b2
|
||||
// If level low nybble hits $a change to $10
|
||||
lax level_bcd
|
||||
axs #-[6]
|
||||
stx level_bcd
|
||||
b3:
|
||||
b2:
|
||||
// Increase the score values gained
|
||||
sed
|
||||
ldx #0
|
||||
b7:
|
||||
b5:
|
||||
txa
|
||||
asl
|
||||
asl
|
||||
@ -1015,7 +1015,7 @@ play_increase_level: {
|
||||
sta score_add_bcd+3,y
|
||||
inx
|
||||
cpx #5
|
||||
bne b7
|
||||
bne b5
|
||||
cld
|
||||
rts
|
||||
}
|
||||
@ -1035,38 +1035,38 @@ play_remove_lines: {
|
||||
ldx #PLAYFIELD_LINES*PLAYFIELD_COLS-1
|
||||
ldy #PLAYFIELD_LINES*PLAYFIELD_COLS-1
|
||||
// Read all lines and rewrite them
|
||||
b8:
|
||||
b3:
|
||||
lda #1
|
||||
sta full
|
||||
lda #0
|
||||
sta x
|
||||
b9:
|
||||
b4:
|
||||
lda playfield,y
|
||||
sta c
|
||||
dey
|
||||
cmp #0
|
||||
bne b10
|
||||
bne b5
|
||||
lda #0
|
||||
sta full
|
||||
b10:
|
||||
b5:
|
||||
lda c
|
||||
sta playfield,x
|
||||
dex
|
||||
inc x
|
||||
lda #PLAYFIELD_COLS-1+1
|
||||
cmp x
|
||||
bne b9
|
||||
bne b4
|
||||
lda #1
|
||||
cmp full
|
||||
bne b14
|
||||
bne b8
|
||||
txa
|
||||
axs #-[PLAYFIELD_COLS]
|
||||
inc removed
|
||||
b14:
|
||||
b8:
|
||||
inc y
|
||||
lda #PLAYFIELD_LINES-1+1
|
||||
cmp y
|
||||
bne b8
|
||||
bne b3
|
||||
b1:
|
||||
// Write zeros in the rest of the lines
|
||||
cpx #$ff
|
||||
@ -1117,7 +1117,7 @@ play_lock_current: {
|
||||
inc col
|
||||
inx
|
||||
cpx #4
|
||||
bne b8
|
||||
bne b7
|
||||
lda ypos2
|
||||
clc
|
||||
adc #2
|
||||
@ -1125,13 +1125,13 @@ play_lock_current: {
|
||||
inc l
|
||||
lda #4
|
||||
cmp l
|
||||
bne b7
|
||||
bne b6
|
||||
rts
|
||||
b7:
|
||||
b6:
|
||||
lda i
|
||||
sta i_7
|
||||
jmp b1
|
||||
b8:
|
||||
b7:
|
||||
lda i
|
||||
sta i_9
|
||||
jmp b2
|
||||
@ -1183,7 +1183,7 @@ keyboard_event_scan: {
|
||||
lda #0
|
||||
sta keycode
|
||||
sta row
|
||||
b8:
|
||||
b7:
|
||||
ldx row
|
||||
jsr keyboard_matrix_read
|
||||
sta row_scan
|
||||
@ -1193,11 +1193,11 @@ keyboard_event_scan: {
|
||||
lax keycode
|
||||
axs #-[8]
|
||||
stx keycode
|
||||
b10:
|
||||
b8:
|
||||
inc row
|
||||
lda #8
|
||||
cmp row
|
||||
bne b8
|
||||
bne b7
|
||||
lda #KEY_LSHIFT
|
||||
sta keyboard_event_pressed.keycode
|
||||
jsr keyboard_event_pressed
|
||||
@ -1238,43 +1238,43 @@ keyboard_event_scan: {
|
||||
// Something has changed on the keyboard row - check each column
|
||||
b6:
|
||||
ldx #0
|
||||
b11:
|
||||
b9:
|
||||
lda row_scan
|
||||
ldy row
|
||||
eor keyboard_scan_values,y
|
||||
and keyboard_matrix_col_bitmask,x
|
||||
cmp #0
|
||||
beq b12
|
||||
beq b10
|
||||
lda #8
|
||||
cmp keyboard_events_size
|
||||
beq b12
|
||||
beq b10
|
||||
lda keyboard_matrix_col_bitmask,x
|
||||
and row_scan
|
||||
cmp #0
|
||||
beq b14
|
||||
beq b11
|
||||
// Key pressed
|
||||
lda keycode
|
||||
ldy keyboard_events_size
|
||||
sta keyboard_events,y
|
||||
inc keyboard_events_size
|
||||
b12:
|
||||
b10:
|
||||
inc keycode
|
||||
inx
|
||||
cpx #8
|
||||
bne b11
|
||||
bne b9
|
||||
// Store the current keyboard status for the row to debounce
|
||||
lda row_scan
|
||||
ldy row
|
||||
sta keyboard_scan_values,y
|
||||
jmp b10
|
||||
b14:
|
||||
jmp b8
|
||||
b11:
|
||||
lda #$40
|
||||
ora keycode
|
||||
// Key released
|
||||
ldy keyboard_events_size
|
||||
sta keyboard_events,y
|
||||
inc keyboard_events_size
|
||||
jmp b12
|
||||
jmp b10
|
||||
}
|
||||
// Read a single row of the keyboard matrix
|
||||
// The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs.
|
||||
@ -1297,7 +1297,7 @@ render_show: {
|
||||
cmp #0
|
||||
beq toD0181
|
||||
lda #toD0182_return
|
||||
b2:
|
||||
b1:
|
||||
sta D018
|
||||
ldy level
|
||||
lda PIECES_COLORS_1,y
|
||||
@ -1309,7 +1309,7 @@ render_show: {
|
||||
rts
|
||||
toD0181:
|
||||
lda #toD0181_return
|
||||
jmp b2
|
||||
jmp b1
|
||||
}
|
||||
// Initialize play data tables
|
||||
play_init: {
|
||||
@ -1548,7 +1548,7 @@ render_screen_original: {
|
||||
inx
|
||||
cpx #4
|
||||
bne b2
|
||||
b4:
|
||||
b3:
|
||||
ldy #0
|
||||
lda (oscr),y
|
||||
sta (screen),y
|
||||
@ -1573,8 +1573,8 @@ render_screen_original: {
|
||||
!:
|
||||
inx
|
||||
cpx #$24
|
||||
bne b4
|
||||
b6:
|
||||
bne b3
|
||||
b4:
|
||||
lda #SPACE
|
||||
ldy #0
|
||||
sta (screen),y
|
||||
@ -1591,7 +1591,7 @@ render_screen_original: {
|
||||
!:
|
||||
inx
|
||||
cpx #$28
|
||||
bne b6
|
||||
bne b4
|
||||
inc y
|
||||
lda #$19
|
||||
cmp y
|
||||
@ -1629,10 +1629,10 @@ sprites_irq: {
|
||||
inx
|
||||
// Wait for the y-position before changing sprite pointers
|
||||
stx raster_sprite_gfx_modify
|
||||
b11:
|
||||
b8:
|
||||
lda RASTER
|
||||
cmp raster_sprite_gfx_modify
|
||||
bcc b11
|
||||
bcc b8
|
||||
ldx irq_sprite_ptr
|
||||
lda render_screen_showing
|
||||
cmp #0
|
||||
@ -1662,7 +1662,7 @@ sprites_irq: {
|
||||
lax irq_sprite_ptr
|
||||
axs #-[3]
|
||||
stx irq_sprite_ptr
|
||||
b6:
|
||||
b5:
|
||||
// Setup next interrupt
|
||||
lda irq_raster_next
|
||||
sta RASTER
|
||||
@ -1685,7 +1685,7 @@ sprites_irq: {
|
||||
lax irq_sprite_ptr
|
||||
axs #-[3]
|
||||
stx irq_sprite_ptr
|
||||
jmp b6
|
||||
jmp b5
|
||||
b3:
|
||||
lax irq_raster_next
|
||||
axs #-[$15]
|
||||
@ -1694,7 +1694,7 @@ sprites_irq: {
|
||||
sta irq_sprite_ypos
|
||||
lda #toSpritePtr2_return
|
||||
sta irq_sprite_ptr
|
||||
jmp b6
|
||||
jmp b5
|
||||
b1:
|
||||
stx PLAYFIELD_SPRITE_PTRS_1
|
||||
inx
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
(label) @14
|
||||
(label) @23
|
||||
(label) @24
|
||||
(label) @38
|
||||
(label) @39
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @3
|
||||
(label) @4
|
||||
(label) @5
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -398,7 +398,7 @@
|
||||
(byte) irq_sprite_ypos#3 irq_sprite_ypos zp ZP_BYTE:38 20.0
|
||||
(byte[]) keyboard_char_keycodes
|
||||
(byte()) keyboard_event_get()
|
||||
(label) keyboard_event_get::@3
|
||||
(label) keyboard_event_get::@1
|
||||
(label) keyboard_event_get::@return
|
||||
(byte) keyboard_event_get::return
|
||||
(byte) keyboard_event_get::return#1 reg byte x 4.0
|
||||
@ -431,25 +431,25 @@
|
||||
(label) keyboard_event_scan::@10
|
||||
(label) keyboard_event_scan::@11
|
||||
(label) keyboard_event_scan::@12
|
||||
(label) keyboard_event_scan::@13
|
||||
(label) keyboard_event_scan::@14
|
||||
(label) keyboard_event_scan::@15
|
||||
(label) keyboard_event_scan::@16
|
||||
(label) keyboard_event_scan::@17
|
||||
(label) keyboard_event_scan::@18
|
||||
(label) keyboard_event_scan::@19
|
||||
(label) keyboard_event_scan::@2
|
||||
(label) keyboard_event_scan::@20
|
||||
(label) keyboard_event_scan::@21
|
||||
(label) keyboard_event_scan::@22
|
||||
(label) keyboard_event_scan::@23
|
||||
(label) keyboard_event_scan::@24
|
||||
(label) keyboard_event_scan::@25
|
||||
(label) keyboard_event_scan::@26
|
||||
(label) keyboard_event_scan::@27
|
||||
(label) keyboard_event_scan::@28
|
||||
(label) keyboard_event_scan::@29
|
||||
(label) keyboard_event_scan::@3
|
||||
(label) keyboard_event_scan::@4
|
||||
(label) keyboard_event_scan::@5
|
||||
(label) keyboard_event_scan::@6
|
||||
(label) keyboard_event_scan::@7
|
||||
(label) keyboard_event_scan::@8
|
||||
(label) keyboard_event_scan::@9
|
||||
(label) keyboard_event_scan::@return
|
||||
(byte) keyboard_event_scan::col
|
||||
(byte) keyboard_event_scan::col#1 reg byte x 15001.5
|
||||
@ -522,27 +522,27 @@
|
||||
(word) lines_bcd#30 lines_bcd zp ZP_WORD:17 1.0
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@10
|
||||
(label) main::@11
|
||||
(label) main::@12
|
||||
(label) main::@13
|
||||
(label) main::@14
|
||||
(label) main::@15
|
||||
(label) main::@16
|
||||
(label) main::@17
|
||||
(label) main::@18
|
||||
(label) main::@19
|
||||
(label) main::@2
|
||||
(label) main::@20
|
||||
(label) main::@21
|
||||
(label) main::@22
|
||||
(label) main::@23
|
||||
(label) main::@25
|
||||
(label) main::@26
|
||||
(label) main::@27
|
||||
(label) main::@28
|
||||
(label) main::@29
|
||||
(label) main::@30
|
||||
(label) main::@31
|
||||
(label) main::@32
|
||||
(label) main::@33
|
||||
(label) main::@35
|
||||
(label) main::@36
|
||||
(label) main::@37
|
||||
(label) main::@38
|
||||
(label) main::@39
|
||||
(label) main::@40
|
||||
(label) main::@41
|
||||
(label) main::@42
|
||||
(label) main::@24
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@5
|
||||
(label) main::@6
|
||||
(label) main::@7
|
||||
(label) main::@8
|
||||
(label) main::@9
|
||||
(byte) main::key_event
|
||||
@ -560,15 +560,15 @@
|
||||
(byte()) play_collision((byte) play_collision::xpos , (byte) play_collision::ypos , (byte) play_collision::orientation)
|
||||
(byte~) play_collision::$7 reg byte a 20002.0
|
||||
(label) play_collision::@1
|
||||
(label) play_collision::@14
|
||||
(label) play_collision::@17
|
||||
(label) play_collision::@10
|
||||
(label) play_collision::@2
|
||||
(label) play_collision::@20
|
||||
(label) play_collision::@21
|
||||
(label) play_collision::@3
|
||||
(label) play_collision::@4
|
||||
(label) play_collision::@5
|
||||
(label) play_collision::@6
|
||||
(label) play_collision::@7
|
||||
(label) play_collision::@8
|
||||
(label) play_collision::@9
|
||||
(label) play_collision::@return
|
||||
(byte) play_collision::c
|
||||
(byte) play_collision::c#1 reg byte x 10001.0
|
||||
@ -623,12 +623,12 @@
|
||||
(byte) play_collision::ypos2#2 ypos2 zp ZP_BYTE:11 867.0666666666667
|
||||
(void()) play_increase_level()
|
||||
(byte~) play_increase_level::$1 reg byte a 4.0
|
||||
(label) play_increase_level::@1
|
||||
(label) play_increase_level::@2
|
||||
(label) play_increase_level::@3
|
||||
(label) play_increase_level::@4
|
||||
(label) play_increase_level::@5
|
||||
(label) play_increase_level::@6
|
||||
(label) play_increase_level::@7
|
||||
(label) play_increase_level::@8
|
||||
(label) play_increase_level::@return
|
||||
(byte) play_increase_level::b
|
||||
(byte) play_increase_level::b#1 reg byte x 1501.5
|
||||
@ -661,8 +661,8 @@
|
||||
(label) play_lock_current::@3
|
||||
(label) play_lock_current::@4
|
||||
(label) play_lock_current::@5
|
||||
(label) play_lock_current::@6
|
||||
(label) play_lock_current::@7
|
||||
(label) play_lock_current::@8
|
||||
(label) play_lock_current::@return
|
||||
(byte) play_lock_current::c
|
||||
(byte) play_lock_current::c#1 reg byte x 10001.0
|
||||
@ -691,15 +691,15 @@
|
||||
(byte~) play_move_down::$2 reg byte a 4.0
|
||||
(label) play_move_down::@1
|
||||
(label) play_move_down::@10
|
||||
(label) play_move_down::@11
|
||||
(label) play_move_down::@12
|
||||
(label) play_move_down::@13
|
||||
(label) play_move_down::@14
|
||||
(label) play_move_down::@15
|
||||
(label) play_move_down::@17
|
||||
(label) play_move_down::@18
|
||||
(label) play_move_down::@19
|
||||
(label) play_move_down::@16
|
||||
(label) play_move_down::@2
|
||||
(label) play_move_down::@20
|
||||
(label) play_move_down::@21
|
||||
(label) play_move_down::@3
|
||||
(label) play_move_down::@4
|
||||
(label) play_move_down::@5
|
||||
(label) play_move_down::@6
|
||||
(label) play_move_down::@7
|
||||
@ -723,12 +723,12 @@
|
||||
(byte~) play_move_leftright::$4 reg byte a 4.0
|
||||
(byte~) play_move_leftright::$8 reg byte a 4.0
|
||||
(label) play_move_leftright::@1
|
||||
(label) play_move_leftright::@14
|
||||
(label) play_move_leftright::@15
|
||||
(label) play_move_leftright::@2
|
||||
(label) play_move_leftright::@3
|
||||
(label) play_move_leftright::@4
|
||||
(label) play_move_leftright::@5
|
||||
(label) play_move_leftright::@6
|
||||
(label) play_move_leftright::@9
|
||||
(label) play_move_leftright::@7
|
||||
(label) play_move_leftright::@return
|
||||
(byte) play_move_leftright::key_event
|
||||
(byte) play_move_leftright::key_event#0 reg byte a 3.0
|
||||
@ -740,10 +740,10 @@
|
||||
(byte/signed word/word/dword/signed dword~) play_move_rotate::$5 reg byte x 4.0
|
||||
(byte/signed word/word/dword/signed dword~) play_move_rotate::$7 reg byte x 4.0
|
||||
(label) play_move_rotate::@1
|
||||
(label) play_move_rotate::@11
|
||||
(label) play_move_rotate::@14
|
||||
(label) play_move_rotate::@2
|
||||
(label) play_move_rotate::@3
|
||||
(label) play_move_rotate::@4
|
||||
(label) play_move_rotate::@5
|
||||
(label) play_move_rotate::@6
|
||||
(label) play_move_rotate::@return
|
||||
(byte) play_move_rotate::key_event
|
||||
@ -760,9 +760,9 @@
|
||||
(byte~) play_movement::$3 reg byte a 4.0
|
||||
(byte~) play_movement::$4 reg byte a 4.0
|
||||
(label) play_movement::@1
|
||||
(label) play_movement::@5
|
||||
(label) play_movement::@6
|
||||
(label) play_movement::@7
|
||||
(label) play_movement::@2
|
||||
(label) play_movement::@3
|
||||
(label) play_movement::@4
|
||||
(label) play_movement::@return
|
||||
(byte) play_movement::key_event
|
||||
(byte) play_movement::key_event#0 key_event zp ZP_BYTE:41 8.916666666666664
|
||||
@ -775,12 +775,12 @@
|
||||
(byte) play_movement::return#3 reg byte a 202.0
|
||||
(byte()) play_remove_lines()
|
||||
(label) play_remove_lines::@1
|
||||
(label) play_remove_lines::@10
|
||||
(label) play_remove_lines::@12
|
||||
(label) play_remove_lines::@13
|
||||
(label) play_remove_lines::@14
|
||||
(label) play_remove_lines::@18
|
||||
(label) play_remove_lines::@2
|
||||
(label) play_remove_lines::@3
|
||||
(label) play_remove_lines::@4
|
||||
(label) play_remove_lines::@5
|
||||
(label) play_remove_lines::@6
|
||||
(label) play_remove_lines::@7
|
||||
(label) play_remove_lines::@8
|
||||
(label) play_remove_lines::@9
|
||||
(label) play_remove_lines::@return
|
||||
@ -818,11 +818,11 @@
|
||||
(byte~) play_spawn_current::$2 reg byte a 4.0
|
||||
(byte~) play_spawn_current::$6 reg byte a 2002.0
|
||||
(label) play_spawn_current::@1
|
||||
(label) play_spawn_current::@10
|
||||
(label) play_spawn_current::@11
|
||||
(label) play_spawn_current::@2
|
||||
(label) play_spawn_current::@3
|
||||
(label) play_spawn_current::@9
|
||||
(label) play_spawn_current::@4
|
||||
(label) play_spawn_current::@5
|
||||
(label) play_spawn_current::@6
|
||||
(label) play_spawn_current::@return
|
||||
(byte) play_spawn_current::current_piece_idx
|
||||
(byte) play_spawn_current::current_piece_idx#0 reg byte x 2.0
|
||||
@ -833,8 +833,8 @@
|
||||
(byte~) play_update_score::$2 reg byte a 4.0
|
||||
(byte~) play_update_score::$4 reg byte a 4.0
|
||||
(byte~) play_update_score::$5 reg byte a 4.0
|
||||
(label) play_update_score::@1
|
||||
(label) play_update_score::@2
|
||||
(label) play_update_score::@3
|
||||
(label) play_update_score::@return
|
||||
(dword) play_update_score::add_bcd
|
||||
(dword) play_update_score::add_bcd#0 add_bcd zp ZP_DWORD:43 1.3333333333333333
|
||||
@ -889,8 +889,8 @@
|
||||
(byte~) render_init::$13 reg byte a 22.0
|
||||
(byte~) render_init::$14 reg byte a 22.0
|
||||
(label) render_init::@1
|
||||
(label) render_init::@2
|
||||
(label) render_init::@3
|
||||
(label) render_init::@4
|
||||
(label) render_init::@return
|
||||
(byte) render_init::i
|
||||
(byte) render_init::i#1 reg byte x 16.5
|
||||
@ -921,7 +921,7 @@
|
||||
(label) render_moving::@4
|
||||
(label) render_moving::@5
|
||||
(label) render_moving::@6
|
||||
(label) render_moving::@8
|
||||
(label) render_moving::@7
|
||||
(label) render_moving::@return
|
||||
(byte) render_moving::c
|
||||
(byte) render_moving::c#1 reg byte x 1501.5
|
||||
@ -949,14 +949,14 @@
|
||||
(byte) render_moving::ypos2#2 ypos2 zp ZP_BYTE:12 27.06666666666667
|
||||
(void()) render_next()
|
||||
(byte~) render_next::$4 reg byte y 1.0
|
||||
(label) render_next::@11
|
||||
(label) render_next::@1
|
||||
(label) render_next::@2
|
||||
(label) render_next::@3
|
||||
(label) render_next::@4
|
||||
(label) render_next::@5
|
||||
(label) render_next::@6
|
||||
(label) render_next::@7
|
||||
(label) render_next::@8
|
||||
(label) render_next::@9
|
||||
(label) render_next::@return
|
||||
(byte) render_next::c
|
||||
(byte) render_next::c#1 reg byte x 1501.5
|
||||
@ -1003,13 +1003,13 @@
|
||||
(byte*) render_playfield::screen_line#1 screen_line zp ZP_WORD:5 500.5
|
||||
(byte*) render_playfield::screen_line#2 screen_line zp ZP_WORD:5 1552.0
|
||||
(void()) render_score()
|
||||
(label) render_score::@1
|
||||
(label) render_score::@2
|
||||
(label) render_score::@3
|
||||
(label) render_score::@4
|
||||
(label) render_score::@5
|
||||
(label) render_score::@6
|
||||
(label) render_score::@7
|
||||
(label) render_score::@8
|
||||
(label) render_score::@9
|
||||
(label) render_score::@return
|
||||
(word) render_score::level_offset
|
||||
(const word) render_score::level_offset#0 level_offset = (byte/signed byte/word/signed word/dword/signed dword) $28*(byte/signed byte/word/signed word/dword/signed dword) $13+(byte/signed byte/word/signed word/dword/signed dword) $1f
|
||||
@ -1024,9 +1024,9 @@
|
||||
(void()) render_screen_original((byte*) render_screen_original::screen)
|
||||
(label) render_screen_original::@1
|
||||
(label) render_screen_original::@2
|
||||
(label) render_screen_original::@3
|
||||
(label) render_screen_original::@4
|
||||
(label) render_screen_original::@6
|
||||
(label) render_screen_original::@7
|
||||
(label) render_screen_original::@5
|
||||
(label) render_screen_original::@return
|
||||
(byte) render_screen_original::SPACE
|
||||
(const byte) render_screen_original::SPACE#0 SPACE = (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
@ -1083,7 +1083,7 @@
|
||||
(void()) render_screen_swap()
|
||||
(label) render_screen_swap::@return
|
||||
(void()) render_show()
|
||||
(label) render_show::@2
|
||||
(label) render_show::@1
|
||||
(label) render_show::@return
|
||||
(byte) render_show::d018val
|
||||
(byte) render_show::d018val#3 reg byte a 2.0
|
||||
@ -1148,16 +1148,16 @@
|
||||
interrupt(HARDWARE_CLOBBER)(void()) sprites_irq()
|
||||
(byte/signed word/word/dword/signed dword~) sprites_irq::$0 reg byte x 4.0
|
||||
(label) sprites_irq::@1
|
||||
(label) sprites_irq::@10
|
||||
(label) sprites_irq::@11
|
||||
(label) sprites_irq::@12
|
||||
(label) sprites_irq::@13
|
||||
(label) sprites_irq::@15
|
||||
(label) sprites_irq::@2
|
||||
(label) sprites_irq::@3
|
||||
(label) sprites_irq::@4
|
||||
(label) sprites_irq::@5
|
||||
(label) sprites_irq::@6
|
||||
(label) sprites_irq::@7
|
||||
(label) sprites_irq::@8
|
||||
(label) sprites_irq::@9
|
||||
(label) sprites_irq::@return
|
||||
(byte) sprites_irq::ptr
|
||||
(byte) sprites_irq::ptr#0 reg byte x 2.5
|
||||
|
@ -9,10 +9,10 @@
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[5] *((const byte*) main::SCREEN#0) ← (byte) '!'
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
main::@return: scope:[main] from main::@1
|
||||
[6] return
|
||||
to:@return
|
||||
|
@ -59,6 +59,7 @@ Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Renumbering block main::@3 to main::@1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
@ -76,11 +77,11 @@ FINAL CONTROL FLOW GRAPH
|
||||
[3] phi()
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[5] *((const byte*) main::SCREEN#0) ← (byte) '!'
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
main::@return: scope:[main] from main::@1
|
||||
[6] return
|
||||
to:@return
|
||||
|
||||
@ -119,9 +120,9 @@ bend:
|
||||
//SEG10 main
|
||||
main: {
|
||||
.label SCREEN = $400
|
||||
jmp b3
|
||||
//SEG11 main::@3
|
||||
b3:
|
||||
jmp b1
|
||||
//SEG11 main::@1
|
||||
b1:
|
||||
//SEG12 [5] *((const byte*) main::SCREEN#0) ← (byte) '!' -- _deref_pbuc1=vbuc2
|
||||
lda #'!'
|
||||
sta SCREEN
|
||||
@ -169,9 +170,9 @@ bend:
|
||||
//SEG10 main
|
||||
main: {
|
||||
.label SCREEN = $400
|
||||
jmp b3
|
||||
//SEG11 main::@3
|
||||
b3:
|
||||
jmp b1
|
||||
//SEG11 main::@1
|
||||
b1:
|
||||
//SEG12 [5] *((const byte*) main::SCREEN#0) ← (byte) '!' -- _deref_pbuc1=vbuc2
|
||||
lda #'!'
|
||||
sta SCREEN
|
||||
@ -185,7 +186,7 @@ main: {
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b1_from_bbegin:
|
||||
@ -194,7 +195,7 @@ Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b3:
|
||||
Removing instruction b1:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
Updating BasicUpstart to call main directly
|
||||
@ -208,7 +209,7 @@ FINAL SYMBOL TABLE
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) main()
|
||||
(label) main::@3
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
@ -235,7 +236,7 @@ Score: 12
|
||||
//SEG10 main
|
||||
main: {
|
||||
.label SCREEN = $400
|
||||
//SEG11 main::@3
|
||||
//SEG11 main::@1
|
||||
//SEG12 [5] *((const byte*) main::SCREEN#0) ← (byte) '!' -- _deref_pbuc1=vbuc2
|
||||
lda #'!'
|
||||
sta SCREEN
|
||||
|
@ -2,7 +2,7 @@
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) main()
|
||||
(label) main::@3
|
||||
(label) main::@1
|
||||
(label) main::@return
|
||||
(byte*) main::SCREEN
|
||||
(const byte*) main::SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] (byte) A#0 ← (byte) 'a'
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) SCREEN#0) ← (byte) A#0
|
||||
[5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::B#0
|
||||
[6] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← *((const byte*) main::addrA#0)
|
||||
|
@ -99,20 +99,21 @@ Calls in [main] to sub:7
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Adding NOP phi() at start of @2
|
||||
Renumbering block @2 to @1
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] (byte) A#0 ← (byte) 'a'
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] *((const byte*) SCREEN#0) ← (byte) A#0
|
||||
[5] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (const byte) main::B#0
|
||||
[6] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← *((const byte*) main::addrA#0)
|
||||
@ -168,15 +169,15 @@ bbegin:
|
||||
// Not an early constant (address-of is used)
|
||||
lda #'a'
|
||||
sta A
|
||||
//SEG5 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG6 @2
|
||||
b2:
|
||||
//SEG5 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG6 @1
|
||||
b1:
|
||||
//SEG7 [2] call main
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -258,15 +259,15 @@ bbegin:
|
||||
// Not an early constant (address-of is used)
|
||||
lda #'a'
|
||||
sta A
|
||||
//SEG5 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG6 @2
|
||||
b2:
|
||||
//SEG5 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG6 @1
|
||||
b1:
|
||||
//SEG7 [2] call main
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -310,22 +311,22 @@ sub: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b2_from_bbegin:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction b2:
|
||||
Removing instruction b1:
|
||||
Removing instruction bend:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte) A
|
||||
@ -367,11 +368,11 @@ bbegin:
|
||||
// Not an early constant (address-of is used)
|
||||
lda #'a'
|
||||
sta A
|
||||
//SEG5 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
//SEG6 @2
|
||||
//SEG5 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG6 @1
|
||||
//SEG7 [2] call main
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte) A
|
||||
|
@ -13,20 +13,20 @@ main: {
|
||||
inx
|
||||
cpx #$28
|
||||
bne b1
|
||||
b3:
|
||||
b2:
|
||||
jsr line
|
||||
jmp b3
|
||||
jmp b2
|
||||
}
|
||||
line: {
|
||||
.const x0 = 0
|
||||
.const x1 = $a
|
||||
ldy #x0
|
||||
b5:
|
||||
b1:
|
||||
jsr plot
|
||||
iny
|
||||
cpy #x1
|
||||
bcc b5
|
||||
beq b5
|
||||
bcc b1
|
||||
beq b1
|
||||
rts
|
||||
}
|
||||
// plot(byte register(Y) x)
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @3
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
@ -16,27 +16,27 @@ main::@1: scope:[main] from main main::@1
|
||||
[7] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[8] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@3
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@2
|
||||
[10] phi()
|
||||
[11] call line
|
||||
to:main::@3
|
||||
line: scope:[line] from main::@3
|
||||
to:main::@2
|
||||
line: scope:[line] from main::@2
|
||||
[12] phi()
|
||||
to:line::@5
|
||||
line::@5: scope:[line] from line line::@8
|
||||
[13] (byte) line::x#2 ← phi( line/(const byte) line::x0#0 line::@8/(byte) line::x#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@2
|
||||
[13] (byte) line::x#2 ← phi( line/(const byte) line::x0#0 line::@2/(byte) line::x#1 )
|
||||
[14] (byte) plot::x#1 ← (byte) line::x#2
|
||||
[15] call plot
|
||||
to:line::@8
|
||||
line::@8: scope:[line] from line::@5
|
||||
to:line::@2
|
||||
line::@2: scope:[line] from line::@1
|
||||
[16] (byte) line::x#1 ← ++ (byte) line::x#2
|
||||
[17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@5
|
||||
[17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@8
|
||||
line::@return: scope:[line] from line::@2
|
||||
[18] return
|
||||
to:@return
|
||||
plot: scope:[plot] from line::@5
|
||||
plot: scope:[plot] from line::@1
|
||||
[19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1)
|
||||
[20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0
|
||||
|
@ -193,24 +193,28 @@ Coalesced [20] line::x#4 ← line::x#1
|
||||
Coalesced down to 2 phi equivalence classes
|
||||
Culled Empty Block (label) main::@6
|
||||
Culled Empty Block (label) line::@9
|
||||
Renumbering block @3 to @1
|
||||
Renumbering block main::@3 to main::@2
|
||||
Renumbering block line::@5 to line::@1
|
||||
Renumbering block line::@8 to line::@2
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @3
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@3
|
||||
Adding NOP phi() at start of main::@2
|
||||
Adding NOP phi() at start of line
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @3
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
@ -219,27 +223,27 @@ main::@1: scope:[main] from main main::@1
|
||||
[7] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
[8] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto main::@1
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@1 main::@3
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1 main::@2
|
||||
[10] phi()
|
||||
[11] call line
|
||||
to:main::@3
|
||||
line: scope:[line] from main::@3
|
||||
to:main::@2
|
||||
line: scope:[line] from main::@2
|
||||
[12] phi()
|
||||
to:line::@5
|
||||
line::@5: scope:[line] from line line::@8
|
||||
[13] (byte) line::x#2 ← phi( line/(const byte) line::x0#0 line::@8/(byte) line::x#1 )
|
||||
to:line::@1
|
||||
line::@1: scope:[line] from line line::@2
|
||||
[13] (byte) line::x#2 ← phi( line/(const byte) line::x0#0 line::@2/(byte) line::x#1 )
|
||||
[14] (byte) plot::x#1 ← (byte) line::x#2
|
||||
[15] call plot
|
||||
to:line::@8
|
||||
line::@8: scope:[line] from line::@5
|
||||
to:line::@2
|
||||
line::@2: scope:[line] from line::@1
|
||||
[16] (byte) line::x#1 ← ++ (byte) line::x#2
|
||||
[17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@5
|
||||
[17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@1
|
||||
to:line::@return
|
||||
line::@return: scope:[line] from line::@8
|
||||
line::@return: scope:[line] from line::@2
|
||||
[18] return
|
||||
to:@return
|
||||
plot: scope:[plot] from line::@5
|
||||
plot: scope:[plot] from line::@1
|
||||
[19] (byte) plot::idx#0 ← *((const byte*) plots#0 + (byte) plot::x#1)
|
||||
[20] (byte/signed word/word/dword/signed dword~) plot::$0 ← *((const byte*) SCREEN#0 + (byte) plot::idx#0) + (byte/signed byte/word/signed word/dword/signed dword) 1
|
||||
[21] *((const byte*) SCREEN#0 + (byte) plot::idx#0) ← (byte/signed word/word/dword/signed dword~) plot::$0
|
||||
@ -298,17 +302,17 @@ INITIAL ASM
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
b3_from_bbegin:
|
||||
jmp b3
|
||||
//SEG5 @3
|
||||
b3:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @3 to main [phi:@3->main]
|
||||
main_from_b3:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
|
||||
bend_from_b3:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -341,49 +345,49 @@ main: {
|
||||
lda #$28
|
||||
cmp i
|
||||
bne b1_from_b1
|
||||
//SEG20 [10] phi from main::@1 main::@3 to main::@3 [phi:main::@1/main::@3->main::@3]
|
||||
b3_from_b1:
|
||||
b3_from_b3:
|
||||
jmp b3
|
||||
//SEG21 main::@3
|
||||
b3:
|
||||
//SEG20 [10] phi from main::@1 main::@2 to main::@2 [phi:main::@1/main::@2->main::@2]
|
||||
b2_from_b1:
|
||||
b2_from_b2:
|
||||
jmp b2
|
||||
//SEG21 main::@2
|
||||
b2:
|
||||
//SEG22 [11] call line
|
||||
//SEG23 [12] phi from main::@3 to line [phi:main::@3->line]
|
||||
line_from_b3:
|
||||
//SEG23 [12] phi from main::@2 to line [phi:main::@2->line]
|
||||
line_from_b2:
|
||||
jsr line
|
||||
jmp b3_from_b3
|
||||
jmp b2_from_b2
|
||||
}
|
||||
//SEG24 line
|
||||
line: {
|
||||
.const x0 = 0
|
||||
.const x1 = $a
|
||||
.label x = 3
|
||||
//SEG25 [13] phi from line to line::@5 [phi:line->line::@5]
|
||||
b5_from_line:
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@5#0] -- vbuz1=vbuc1
|
||||
//SEG25 [13] phi from line to line::@1 [phi:line->line::@1]
|
||||
b1_from_line:
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@1#0] -- vbuz1=vbuc1
|
||||
lda #x0
|
||||
sta x
|
||||
jmp b5
|
||||
//SEG27 [13] phi from line::@8 to line::@5 [phi:line::@8->line::@5]
|
||||
b5_from_b8:
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@8->line::@5#0] -- register_copy
|
||||
jmp b5
|
||||
//SEG29 line::@5
|
||||
b5:
|
||||
jmp b1
|
||||
//SEG27 [13] phi from line::@2 to line::@1 [phi:line::@2->line::@1]
|
||||
b1_from_b2:
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@2->line::@1#0] -- register_copy
|
||||
jmp b1
|
||||
//SEG29 line::@1
|
||||
b1:
|
||||
//SEG30 [14] (byte) plot::x#1 ← (byte) line::x#2 -- vbuz1=vbuz2
|
||||
lda x
|
||||
sta plot.x
|
||||
//SEG31 [15] call plot
|
||||
jsr plot
|
||||
jmp b8
|
||||
//SEG32 line::@8
|
||||
b8:
|
||||
jmp b2
|
||||
//SEG32 line::@2
|
||||
b2:
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuz1=_inc_vbuz1
|
||||
inc x
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@5 -- vbuz1_le_vbuc1_then_la1
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@1 -- vbuz1_le_vbuc1_then_la1
|
||||
lda #x1
|
||||
cmp x
|
||||
bcs b5_from_b8
|
||||
bcs b1_from_b2
|
||||
jmp breturn
|
||||
//SEG35 line::@return
|
||||
breturn:
|
||||
@ -451,17 +455,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
b3_from_bbegin:
|
||||
jmp b3
|
||||
//SEG5 @3
|
||||
b3:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @3 to main [phi:@3->main]
|
||||
main_from_b3:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
|
||||
bend_from_b3:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -489,45 +493,45 @@ main: {
|
||||
//SEG19 [9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$28
|
||||
bne b1_from_b1
|
||||
//SEG20 [10] phi from main::@1 main::@3 to main::@3 [phi:main::@1/main::@3->main::@3]
|
||||
b3_from_b1:
|
||||
b3_from_b3:
|
||||
jmp b3
|
||||
//SEG21 main::@3
|
||||
b3:
|
||||
//SEG20 [10] phi from main::@1 main::@2 to main::@2 [phi:main::@1/main::@2->main::@2]
|
||||
b2_from_b1:
|
||||
b2_from_b2:
|
||||
jmp b2
|
||||
//SEG21 main::@2
|
||||
b2:
|
||||
//SEG22 [11] call line
|
||||
//SEG23 [12] phi from main::@3 to line [phi:main::@3->line]
|
||||
line_from_b3:
|
||||
//SEG23 [12] phi from main::@2 to line [phi:main::@2->line]
|
||||
line_from_b2:
|
||||
jsr line
|
||||
jmp b3_from_b3
|
||||
jmp b2_from_b2
|
||||
}
|
||||
//SEG24 line
|
||||
line: {
|
||||
.const x0 = 0
|
||||
.const x1 = $a
|
||||
//SEG25 [13] phi from line to line::@5 [phi:line->line::@5]
|
||||
b5_from_line:
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@5#0] -- vbuyy=vbuc1
|
||||
//SEG25 [13] phi from line to line::@1 [phi:line->line::@1]
|
||||
b1_from_line:
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@1#0] -- vbuyy=vbuc1
|
||||
ldy #x0
|
||||
jmp b5
|
||||
//SEG27 [13] phi from line::@8 to line::@5 [phi:line::@8->line::@5]
|
||||
b5_from_b8:
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@8->line::@5#0] -- register_copy
|
||||
jmp b5
|
||||
//SEG29 line::@5
|
||||
b5:
|
||||
jmp b1
|
||||
//SEG27 [13] phi from line::@2 to line::@1 [phi:line::@2->line::@1]
|
||||
b1_from_b2:
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@2->line::@1#0] -- register_copy
|
||||
jmp b1
|
||||
//SEG29 line::@1
|
||||
b1:
|
||||
//SEG30 [14] (byte) plot::x#1 ← (byte) line::x#2
|
||||
//SEG31 [15] call plot
|
||||
jsr plot
|
||||
jmp b8
|
||||
//SEG32 line::@8
|
||||
b8:
|
||||
jmp b2
|
||||
//SEG32 line::@2
|
||||
b2:
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@5 -- vbuyy_le_vbuc1_then_la1
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@1 -- vbuyy_le_vbuc1_then_la1
|
||||
cpy #x1
|
||||
bcc b5_from_b8
|
||||
beq b5_from_b8
|
||||
bcc b1_from_b2
|
||||
beq b1_from_b2
|
||||
jmp breturn
|
||||
//SEG35 line::@return
|
||||
breturn:
|
||||
@ -553,33 +557,33 @@ plot: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b8
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Replacing label b1_from_b1 with b1
|
||||
Replacing label b3_from_b3 with b3
|
||||
Replacing label b5_from_b8 with b5
|
||||
Replacing label b5_from_b8 with b5
|
||||
Removing instruction b3_from_bbegin:
|
||||
Removing instruction b3:
|
||||
Removing instruction main_from_b3:
|
||||
Removing instruction bend_from_b3:
|
||||
Replacing label b2_from_b2 with b2
|
||||
Replacing label b1_from_b2 with b1
|
||||
Replacing label b1_from_b2 with b1
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Removing instruction b1_from_b1:
|
||||
Removing instruction b3_from_b1:
|
||||
Removing instruction b3_from_b3:
|
||||
Removing instruction line_from_b3:
|
||||
Removing instruction b5_from_b8:
|
||||
Removing instruction b2_from_b1:
|
||||
Removing instruction b2_from_b2:
|
||||
Removing instruction line_from_b2:
|
||||
Removing instruction b1_from_b2:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction b5_from_line:
|
||||
Removing instruction b8:
|
||||
Removing instruction b1_from_line:
|
||||
Removing instruction b2:
|
||||
Removing instruction breturn:
|
||||
Removing instruction breturn:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
@ -587,20 +591,20 @@ Updating BasicUpstart to call main directly
|
||||
Removing instruction jsr main
|
||||
Succesful ASM optimization Pass5SkipBegin
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b5
|
||||
Removing instruction jmp b1
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @3
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
(void()) line((byte) line::x0 , (byte) line::x1)
|
||||
(label) line::@5
|
||||
(label) line::@8
|
||||
(label) line::@1
|
||||
(label) line::@2
|
||||
(label) line::@return
|
||||
(byte) line::x
|
||||
(byte) line::x#1 reg byte y 151.5
|
||||
@ -611,7 +615,7 @@ FINAL SYMBOL TABLE
|
||||
(const byte) line::x1#0 x1 = (byte/signed byte/word/signed word/dword/signed dword) $a
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@3
|
||||
(label) main::@2
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
(byte) main::i#2 reg byte x 18.333333333333332
|
||||
@ -644,11 +648,11 @@ Score: 1963
|
||||
.label plots = $1000
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
//SEG5 @3
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @3 to main [phi:@3->main]
|
||||
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
@ -670,35 +674,35 @@ main: {
|
||||
//SEG19 [9] if((byte) main::i#1!=(byte/signed byte/word/signed word/dword/signed dword) $28) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
||||
cpx #$28
|
||||
bne b1
|
||||
//SEG20 [10] phi from main::@1 main::@3 to main::@3 [phi:main::@1/main::@3->main::@3]
|
||||
//SEG21 main::@3
|
||||
b3:
|
||||
//SEG20 [10] phi from main::@1 main::@2 to main::@2 [phi:main::@1/main::@2->main::@2]
|
||||
//SEG21 main::@2
|
||||
b2:
|
||||
//SEG22 [11] call line
|
||||
//SEG23 [12] phi from main::@3 to line [phi:main::@3->line]
|
||||
//SEG23 [12] phi from main::@2 to line [phi:main::@2->line]
|
||||
jsr line
|
||||
jmp b3
|
||||
jmp b2
|
||||
}
|
||||
//SEG24 line
|
||||
line: {
|
||||
.const x0 = 0
|
||||
.const x1 = $a
|
||||
//SEG25 [13] phi from line to line::@5 [phi:line->line::@5]
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@5#0] -- vbuyy=vbuc1
|
||||
//SEG25 [13] phi from line to line::@1 [phi:line->line::@1]
|
||||
//SEG26 [13] phi (byte) line::x#2 = (const byte) line::x0#0 [phi:line->line::@1#0] -- vbuyy=vbuc1
|
||||
ldy #x0
|
||||
//SEG27 [13] phi from line::@8 to line::@5 [phi:line::@8->line::@5]
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@8->line::@5#0] -- register_copy
|
||||
//SEG29 line::@5
|
||||
b5:
|
||||
//SEG27 [13] phi from line::@2 to line::@1 [phi:line::@2->line::@1]
|
||||
//SEG28 [13] phi (byte) line::x#2 = (byte) line::x#1 [phi:line::@2->line::@1#0] -- register_copy
|
||||
//SEG29 line::@1
|
||||
b1:
|
||||
//SEG30 [14] (byte) plot::x#1 ← (byte) line::x#2
|
||||
//SEG31 [15] call plot
|
||||
jsr plot
|
||||
//SEG32 line::@8
|
||||
//SEG32 line::@2
|
||||
//SEG33 [16] (byte) line::x#1 ← ++ (byte) line::x#2 -- vbuyy=_inc_vbuyy
|
||||
iny
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@5 -- vbuyy_le_vbuc1_then_la1
|
||||
//SEG34 [17] if((byte) line::x#1<=(const byte) line::x1#0) goto line::@1 -- vbuyy_le_vbuc1_then_la1
|
||||
cpy #x1
|
||||
bcc b5
|
||||
beq b5
|
||||
bcc b1
|
||||
beq b1
|
||||
//SEG35 line::@return
|
||||
//SEG36 [18] return
|
||||
rts
|
||||
|
@ -1,11 +1,11 @@
|
||||
(label) @3
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) $400
|
||||
(void()) line((byte) line::x0 , (byte) line::x1)
|
||||
(label) line::@5
|
||||
(label) line::@8
|
||||
(label) line::@1
|
||||
(label) line::@2
|
||||
(label) line::@return
|
||||
(byte) line::x
|
||||
(byte) line::x#1 reg byte y 151.5
|
||||
@ -16,7 +16,7 @@
|
||||
(const byte) line::x1#0 x1 = (byte/signed byte/word/signed word/dword/signed dword) $a
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@3
|
||||
(label) main::@2
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte x 16.5
|
||||
(byte) main::i#2 reg byte x 18.333333333333332
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @3
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
|
@ -103,22 +103,23 @@ Calls in [] to main:2
|
||||
|
||||
Created 0 initial phi equivalence classes
|
||||
Coalesced down to 0 phi equivalence classes
|
||||
Renumbering block @3 to @1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @3
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@3
|
||||
@3: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @3
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @3
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
@ -148,17 +149,17 @@ INITIAL ASM
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
b3_from_bbegin:
|
||||
jmp b3
|
||||
//SEG5 @3
|
||||
b3:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @3 to main [phi:@3->main]
|
||||
main_from_b3:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
|
||||
bend_from_b3:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -198,17 +199,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
b3_from_bbegin:
|
||||
jmp b3
|
||||
//SEG5 @3
|
||||
b3:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @3 to main [phi:@3->main]
|
||||
main_from_b3:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
|
||||
bend_from_b3:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -228,15 +229,15 @@ main: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b3
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b3_from_bbegin:
|
||||
Removing instruction b3:
|
||||
Removing instruction main_from_b3:
|
||||
Removing instruction bend_from_b3:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction b1:
|
||||
@ -249,7 +250,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @3
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
@ -273,11 +274,11 @@ Score: 12
|
||||
//SEG2 Global Constants & labels
|
||||
.label SCREEN = $400
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @3 [phi:@begin->@3]
|
||||
//SEG5 @3
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @3 to main [phi:@3->main]
|
||||
//SEG8 [3] phi from @3 to @end [phi:@3->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @3
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call sum
|
||||
[6] (byte) sum::return#0 ← (byte) sum::return#3
|
||||
|
@ -143,22 +143,23 @@ Calls in [main] to sum:5 sum:9 sum:13
|
||||
|
||||
Created 1 initial phi equivalence classes
|
||||
Coalesced down to 1 phi equivalence classes
|
||||
Renumbering block @2 to @1
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @2
|
||||
Adding NOP phi() at start of @1
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi()
|
||||
to:@2
|
||||
@2: scope:[] from @begin
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @1
|
||||
[4] phi()
|
||||
[5] call sum
|
||||
[6] (byte) sum::return#0 ← (byte) sum::return#3
|
||||
@ -245,17 +246,17 @@ INITIAL ASM
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -380,17 +381,17 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
bbegin:
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
b2_from_bbegin:
|
||||
jmp b2
|
||||
//SEG5 @2
|
||||
b2:
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
b1_from_bbegin:
|
||||
jmp b1
|
||||
//SEG5 @1
|
||||
b1:
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
main_from_b2:
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
main_from_b1:
|
||||
jsr main
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
bend_from_b2:
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
bend_from_b1:
|
||||
jmp bend
|
||||
//SEG9 @end
|
||||
bend:
|
||||
@ -457,7 +458,7 @@ sum: {
|
||||
}
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b2
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
@ -465,10 +466,10 @@ Removing instruction jmp b3
|
||||
Removing instruction jmp breturn
|
||||
Removing instruction jmp breturn
|
||||
Succesful ASM optimization Pass5NextJumpElimination
|
||||
Removing instruction b2_from_bbegin:
|
||||
Removing instruction b2:
|
||||
Removing instruction main_from_b2:
|
||||
Removing instruction bend_from_b2:
|
||||
Removing instruction b1_from_bbegin:
|
||||
Removing instruction b1:
|
||||
Removing instruction main_from_b1:
|
||||
Removing instruction bend_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction bend:
|
||||
Removing instruction sum_from_main:
|
||||
@ -487,7 +488,7 @@ Removing instruction bbegin:
|
||||
Succesful ASM optimization Pass5UnusedLabelElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) main()
|
||||
@ -534,11 +535,11 @@ Score: 52
|
||||
.pc = $80d "Program"
|
||||
//SEG2 Global Constants & labels
|
||||
//SEG3 @begin
|
||||
//SEG4 [1] phi from @begin to @2 [phi:@begin->@2]
|
||||
//SEG5 @2
|
||||
//SEG4 [1] phi from @begin to @1 [phi:@begin->@1]
|
||||
//SEG5 @1
|
||||
//SEG6 [2] call main
|
||||
//SEG7 [4] phi from @2 to main [phi:@2->main]
|
||||
//SEG8 [3] phi from @2 to @end [phi:@2->@end]
|
||||
//SEG7 [4] phi from @1 to main [phi:@1->main]
|
||||
//SEG8 [3] phi from @1 to @end [phi:@1->@end]
|
||||
//SEG9 @end
|
||||
//SEG10 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @2
|
||||
(label) @1
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(void()) main()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user