1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-07-03 20:29:34 +00:00

Default runs @begin code and then optimizes to main() if no code exists outside main.

This commit is contained in:
jespergravgaard 2018-12-25 17:04:50 +01:00
parent 2be7b2ca2b
commit f8191e8345
359 changed files with 2417 additions and 2367 deletions

View File

@ -455,6 +455,7 @@ public class Compiler {
pass5Optimizations.add(new Pass5UnnecesaryLoadElimination(program));
pass5Optimizations.add(new Pass5RedundantLabelElimination(program));
pass5Optimizations.add(new Pass5UnusedLabelElimination(program));
pass5Optimizations.add(new Pass5SkipBegin(program));
pass5Optimizations.add(new Pass5DoubleJumpElimination(program));
pass5Optimizations.add(new Pass5UnreachableCodeElimination(program));
pass5Optimizations.add(new Pass5RelabelLongLabels(program));

View File

@ -3,11 +3,19 @@ package dk.camelot64.kickc.asm;
/** Set the program counter */
public class AsmBasicUpstart implements AsmLine {
private final String function;
private String label;
private int index;
public AsmBasicUpstart(String function) {
this.function = function;
public AsmBasicUpstart(String label) {
this.label = label;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
@Override
@ -22,7 +30,7 @@ public class AsmBasicUpstart implements AsmLine {
@Override
public String getAsm() {
return ":BasicUpstart(" + function + ")";
return ":BasicUpstart(" + label + ")";
}
@Override

View File

@ -9,6 +9,7 @@ public class SymbolRef implements Value {
public static final String BEGIN_BLOCK_NAME = "@begin";
public static final String END_BLOCK_NAME = "@end";
public static final String PROCEXIT_BLOCK_NAME = "@return";
public static final String MAIN_PROC_NAME = "main";
/** The full name of the variable. Allowing lookup in the symbol table. */
private String fullName;

View File

@ -47,7 +47,7 @@ public class Pass4CodeGeneration {
asm.startSegment( currentScope, null, "Basic Upstart");
asm.addLine(new AsmSetPc("Basic", AsmFormat.getAsmNumber(0x0801)));
asm.addLine(new AsmBasicUpstart("main"));
asm.addLine(new AsmBasicUpstart("bbegin"));
asm.addLine(new AsmSetPc("Program", AsmFormat.getAsmNumber(0x080d)));
// Generate global ZP labels

View File

@ -29,20 +29,25 @@ public class Pass5RedundantLabelElimination extends Pass5AsmOptimization {
currentScope = ((AsmScopeBegin) line).getLabel();
} else if(line instanceof AsmScopeEnd) {
currentScope = "";
} else if(line instanceof AsmBasicUpstart) {
String labelStr = ((AsmBasicUpstart) line).getLabel();
String labelReplacementStr = getLabelReplacement(redundantLabelSet, currentScope, labelStr);
if(labelReplacementStr!=null) {
getLog().append("Replacing label " + labelStr + " with " + labelReplacementStr);
((AsmBasicUpstart) line).setLabel(labelReplacementStr);
}
} else if(line instanceof AsmInstruction) {
AsmInstruction instruction = (AsmInstruction) line;
if(instruction.getType().isJump()) {
String labelStr = instruction.getParameter();
if(!labelStr.contains("!")) {
// If redundant - Replace with the shortest
for(RedundantLabels redundantLabels : redundantLabelSet) {
if(redundantLabels.getScope().equals(currentScope) && redundantLabels.isRedundant(labelStr)) {
getLog().append("Replacing label " + labelStr + " with " + redundantLabels.getKeep());
instruction.setParameter(redundantLabels.getKeep());
}
}
String labelReplacementStr = getLabelReplacement(redundantLabelSet, currentScope, labelStr);
if(labelReplacementStr!=null) {
getLog().append("Replacing label " + labelStr + " with " + labelReplacementStr);
instruction.setParameter(labelReplacementStr);
}
}
} else if(line instanceof AsmLabel) {
AsmLabel label = (AsmLabel) line;
String labelStr = label.getLabel();
@ -61,6 +66,26 @@ public class Pass5RedundantLabelElimination extends Pass5AsmOptimization {
return removeLines.size() > 0;
}
/**
* Look for a replacement for a label. Return the replacement if found.
* @param redundantLabelSet The set of all redundant labels.
* @param currentScope The current scope
* @param labelStr The label string to replace
* @return The replacement for the passed label. Null if it should not be replaced.
*/
private String getLabelReplacement(List<RedundantLabels> redundantLabelSet, String currentScope, String labelStr) {
String labelReplacementStr = null;
if(!labelStr.contains("!")) {
// If redundant - Replace with the shortest
for(RedundantLabels redundantLabels : redundantLabelSet) {
if(redundantLabels.getScope().equals(currentScope) && redundantLabels.isRedundant(labelStr)) {
labelReplacementStr = redundantLabels.getKeep();
}
}
}
return labelReplacementStr;
}
/**
* Find all redundant labels in the ASM
*
@ -116,7 +141,12 @@ public class Pass5RedundantLabelElimination extends Pass5AsmOptimization {
}
public void add(String label) {
if(keep.length() < label.length()) {
if("bbegin".equals(label)) {
redundant.add(label);
keep = label;
} else if("bbegin".equals(keep)) {
redundant.add(label);
} else if(keep.length() < label.length()) {
redundant.add(label);
} else {
redundant.add(keep);

View File

@ -0,0 +1,94 @@
package dk.camelot64.kickc.passes;
import dk.camelot64.kickc.asm.AsmBasicUpstart;
import dk.camelot64.kickc.asm.AsmInstruction;
import dk.camelot64.kickc.asm.AsmLine;
import dk.camelot64.kickc.asm.AsmSegment;
import dk.camelot64.kickc.model.ControlFlowBlock;
import dk.camelot64.kickc.model.Program;
import dk.camelot64.kickc.model.statements.Statement;
import dk.camelot64.kickc.model.statements.StatementCall;
import dk.camelot64.kickc.model.statements.StatementKickAsm;
import dk.camelot64.kickc.model.statements.StatementPhiBlock;
import dk.camelot64.kickc.model.values.LabelRef;
import dk.camelot64.kickc.model.values.ProcedureRef;
import dk.camelot64.kickc.model.values.SymbolRef;
import java.util.ListIterator;
/**
* If the static code section from @begin to @end only has a call to main then modify BasicUpstart to call main directly
*/
public class Pass5SkipBegin extends Pass5AsmOptimization {
public Pass5SkipBegin(Program program) {
super(program);
}
public boolean optimize() {
ControlFlowBlock beginBlock = getProgram().getGraph().getBlock(new LabelRef(SymbolRef.BEGIN_BLOCK_NAME));
boolean canSkip = canSkipBegin(beginBlock);
boolean optimized = false;
if(canSkip) {
// Change BasicUpstart() to call main directly and remove the JSR main
for(AsmSegment segment : getAsmProgram().getSegments()) {
ListIterator<AsmLine> lineIterator = segment.getLines().listIterator();
while(lineIterator.hasNext()) {
AsmLine line = lineIterator.next();
if(line instanceof AsmBasicUpstart) {
AsmBasicUpstart basicUpstart = (AsmBasicUpstart) line;
if(!SymbolRef.MAIN_PROC_NAME.equals(basicUpstart.getLabel())) {
basicUpstart.setLabel(SymbolRef.MAIN_PROC_NAME);
optimized = true;
getLog().append("Updating BasicUpstart to call main directly");
}
} else if(line instanceof AsmInstruction) {
AsmInstruction instruction = (AsmInstruction) line;
if(instruction.getType().getMnemnonic().equals("jsr")) {
if(instruction.getParameter().equals(SymbolRef.MAIN_PROC_NAME)) {
lineIterator.remove();
optimized = true;
getLog().append("Removing instruction " + line.getAsm());
}
}
}
}
}
}
return optimized;
}
/**
* Examines whether the @begin/@end code can be skipped
* This looks through all statements to check that the only one is a call to main()
*
* @param block The block to examine (initially the @begin block)
* @return true if the @begin/@end code can be skipped
*/
private boolean canSkipBegin(ControlFlowBlock block) {
for(Statement statement : block.getStatements()) {
if(statement instanceof StatementPhiBlock) {
if(((StatementPhiBlock) statement).getPhiVariables().size() > 0) {
return false;
}
} else if(statement instanceof StatementCall) {
ProcedureRef procedure = ((StatementCall) statement).getProcedure();
if(!SymbolRef.MAIN_PROC_NAME.equals(procedure.getFullName())) {
return false;
}
} else if(statement instanceof StatementKickAsm){
// KASM-statements do not prevent skipping begin
} else {
return false;
}
}
if(block.getConditionalSuccessor() != null) {
return false;
}
if(block.getDefaultSuccessor() != null) {
ControlFlowBlock successor = getProgram().getGraph().getBlock(block.getDefaultSuccessor());
return canSkipBegin(successor);
}
return true;
}
}

View File

@ -28,6 +28,9 @@ public class Pass5UnusedLabelElimination extends Pass5AsmOptimization {
currentScope = ((AsmScopeBegin) line).getLabel();
} else if(line instanceof AsmScopeEnd) {
currentScope = "";
} else if(line instanceof AsmBasicUpstart) {
String labelStr = currentScope + "::" + ((AsmBasicUpstart) line).getLabel();
usedLabels.add(labelStr);
} else if(line instanceof AsmInstruction) {
AsmInstruction instruction = (AsmInstruction) line;
if(instruction.getType().isJump()) {

View File

@ -1,16 +0,0 @@
.label PLAYFIELD_SPRITES = $3000
.pc = PLAYFIELD_SPRITES "PLayfield Sprites"
.var charset = LoadPicture("nes-playfield.png", List().add($010101, $000000))
.for(var sy=0;sy<10;sy++) {
.for(var sx=0;sx<3;sx++) {
.for (var y=0;y<21; y++) {
.for (var c=0; c<3; c++) {
.byte charset.getSinglecolorByte(sx*3+c,sy*21+y)
}
}
.byte 0
}
}

View File

@ -46,12 +46,6 @@ volatile byte irq_cnt = 0;
// Setup the IRQ
void init_irq() {
// Stup the first IRQ position
irq_raster_next = IRQ_RASTER_FIRST;
irq_sprite_ypos = 50;
irq_sprite_ptr = toSpritePtr(PLAYFIELD_SPRITES);
irq_cnt = 0;
asm { sei }
// Disable CIA 1 Timer IRQ
*CIA1_INTERRUPT = CIA_INTERRUPT_CLEAR;

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.const SZ = $f
jsr main
main: {
ldx #0
b1:

View File

@ -138,7 +138,7 @@ Allocated zp ZP_BYTE:2 [ main::sub#2 main::sub#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const SZ = $f
@ -204,7 +204,7 @@ Uplifting [] best 263 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const SZ = $f
@ -260,19 +260,23 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -294,7 +298,7 @@ reg byte x [ main::sub#2 main::sub#1 ]
FINAL ASSEMBLER
Score: 167
Score: 161
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -307,7 +311,6 @@ Score: 167
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -3,7 +3,6 @@
.pc = $80d "Program"
.const ITEM_COUNT = 3
.const ITEM_SIZE = 5
jsr main
main: {
.label cur_item = 2
lda #<items

View File

@ -245,7 +245,7 @@ Allocated zp ZP_BYTE:7 [ main::$3 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const ITEM_COUNT = 3
@ -374,7 +374,7 @@ Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ main::cur_item#4 main::cur_item#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const ITEM_COUNT = 3
@ -476,23 +476,27 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -529,7 +533,7 @@ reg byte a [ main::$3 ]
FINAL ASSEMBLER
Score: 3422
Score: 3416
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -543,7 +547,6 @@ Score: 3422
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
jsr main
main: {
lda #'c'
sta b

View File

@ -118,7 +118,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -176,7 +176,7 @@ Uplifting [] best 51 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -225,14 +225,18 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda b
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -252,7 +256,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 38
Score: 32
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -264,7 +268,6 @@ Score: 38
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
jsr main
main: {
.label l = 2
ldx #0

View File

@ -275,7 +275,7 @@ Allocated zp ZP_BYTE:5 [ main::l#2 main::l#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -424,7 +424,7 @@ Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:2 [ main::l#2 main::l#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -550,8 +550,8 @@ Replacing label b2_from_b2 with b2
Replacing label b1_from_b5 with b1
Replacing label b4_from_b4 with b4
Replacing label b3_from_b7 with b3
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b5:
@ -561,7 +561,6 @@ Removing instruction b3_from_b7:
Removing instruction b4_from_b3:
Removing instruction b4_from_b4:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b5:
@ -569,11 +568,16 @@ Removing instruction b3_from_b5:
Removing instruction b7:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Removing instruction jmp b4
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -609,7 +613,7 @@ zp ZP_BYTE:2 [ main::l#2 main::l#1 ]
FINAL ASSEMBLER
Score: 4682
Score: 4676
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -622,7 +626,6 @@ Score: 4682
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -12,7 +12,6 @@
.label SCREEN = $400
.label BITMAP = $2000
.const plots_cnt = 8
jsr main
main: {
lda #0
sta BGCOL

View File

@ -1034,7 +1034,7 @@ Allocated zp ZP_BYTE:36 [ init_plot_tables::$10 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label D011 = $d011
@ -1597,7 +1597,7 @@ Allocated (was zp ZP_WORD:22) zp ZP_WORD:6 [ plot::plotter_y#1 plot::plotter_y#2
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label D011 = $d011
@ -2008,8 +2008,8 @@ Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b2_from_b2 with b2
Replacing label b2_from_b2 with b2
Removing instruction bbegin:
Removing instruction b5_from_bbegin:
Removing instruction b5:
Removing instruction bend_from_b5:
Removing instruction b5_from_main:
Removing instruction init_plot_tables_from_b5:
@ -2023,7 +2023,6 @@ Removing instruction b2_from_b10:
Removing instruction b1_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b5:
Removing instruction bend:
Removing instruction init_screen_from_main:
Removing instruction b5:
@ -2043,6 +2042,9 @@ Removing instruction b1_from_init_screen:
Removing instruction b2_from_b1:
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 b10
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp b1
@ -2051,6 +2053,7 @@ Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b10:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp b2
@ -2197,7 +2200,7 @@ reg byte a [ init_plot_tables::$10 ]
FINAL ASSEMBLER
Score: 6207
Score: 6201
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -2219,7 +2222,6 @@ Score: 6207
//SEG3 [1] phi from @begin to @5 [phi:@begin->@5]
//SEG4 @5
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @5 to @end [phi:@5->@end]
//SEG7 @end
//SEG8 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label SCREEN = $400
lda #1^$ff

View File

@ -124,7 +124,7 @@ Allocated zp ZP_BYTE:3 [ main::$1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -201,7 +201,7 @@ Uplifting [] best 289 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -259,18 +259,22 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -291,7 +295,7 @@ reg byte a [ main::$1 ]
FINAL ASSEMBLER
Score: 193
Score: 187
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -302,7 +306,6 @@ Score: 193
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
jsr main
main: {
jsr bool_const_if
jsr bool_const_vars

View File

@ -316,7 +316,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -430,7 +430,7 @@ Uplifting [] best 180 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -536,8 +536,8 @@ Removing instruction jmp breturn
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b4_from_bbegin:
Removing instruction b4:
Removing instruction main_from_b4:
Removing instruction bend_from_b4:
Removing instruction b1_from_main:
@ -545,7 +545,6 @@ Removing instruction bool_const_vars_from_b1:
Removing instruction b2_from_b1:
Removing instruction bool_const_inline_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b4:
Removing instruction bend:
Removing instruction bool_const_if_from_main:
Removing instruction b1:
@ -558,6 +557,11 @@ Removing instruction breturn:
Removing instruction b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @4
@ -588,7 +592,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 66
Score: 60
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -601,7 +605,6 @@ Score: 66
//SEG4 @4
//SEG5 [2] call main
//SEG6 [4] phi from @4 to main [phi:@4->main]
jsr main
//SEG7 [3] phi from @4 to @end [phi:@4->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
ldx #0

View File

@ -257,7 +257,7 @@ Allocated zp ZP_BOOL:10 [ isSet::return#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -424,7 +424,7 @@ Allocated (was zp ZP_BOOL:4) zp ZP_BOOL:2 [ isSet::b#0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -538,13 +538,12 @@ Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b3 with b1
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b7:
@ -552,8 +551,13 @@ Removing instruction b4:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @2
@ -597,7 +601,7 @@ reg byte a [ isSet::return#1 ]
FINAL ASSEMBLER
Score: 546
Score: 540
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -609,7 +613,6 @@ Score: 546
//SEG4 @2
//SEG5 [2] call main
//SEG6 [4] phi from @2 to main [phi:@2->main]
jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
jsr bool_and
jsr bool_or

View File

@ -555,7 +555,7 @@ Allocated zp ZP_BYTE:10 [ bool_and::$1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -937,7 +937,7 @@ Uplifting [] best 2548 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -1252,8 +1252,8 @@ 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 bbegin:
Removing instruction b5_from_bbegin:
Removing instruction b5:
Removing instruction main_from_b5:
Removing instruction bend_from_b5:
Removing instruction b1_from_main:
@ -1267,7 +1267,6 @@ Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b5:
Removing instruction bend:
Removing instruction bool_and_from_main:
Removing instruction b1:
@ -1288,11 +1287,16 @@ Removing instruction breturn:
Removing instruction b1_from_bool_and:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @5
@ -1371,7 +1375,7 @@ reg byte a [ bool_and::$1 ]
FINAL ASSEMBLER
Score: 1810
Score: 1804
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -1383,7 +1387,6 @@ Score: 1810
//SEG4 @5
//SEG5 [2] call main
//SEG6 [4] phi from @5 to main [phi:@5->main]
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
lda #1
sta $400

View File

@ -116,7 +116,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -178,7 +178,7 @@ Uplifting [] best 56 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -230,13 +230,17 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda $400+2
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -250,7 +254,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 43
Score: 37
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -261,7 +265,6 @@ Score: 43
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
jsr bool_and
jsr bool_or

View File

@ -620,7 +620,7 @@ Allocated zp ZP_BYTE:11 [ bool_and::$1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -1028,7 +1028,7 @@ Allocated (was zp ZP_BOOL:8) zp ZP_BOOL:3 [ bool_complex::o2#0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -1358,8 +1358,8 @@ 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 bbegin:
Removing instruction b5_from_bbegin:
Removing instruction b5:
Removing instruction main_from_b5:
Removing instruction bend_from_b5:
Removing instruction b1_from_main:
@ -1373,7 +1373,6 @@ Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Removing instruction b1_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b5:
Removing instruction bend:
Removing instruction bool_and_from_main:
Removing instruction b1:
@ -1394,11 +1393,16 @@ Removing instruction breturn:
Removing instruction b1_from_bool_and:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @5
@ -1493,7 +1497,7 @@ reg byte a [ bool_and::$1 ]
FINAL ASSEMBLER
Score: 2095
Score: 2089
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -1505,7 +1509,6 @@ Score: 2095
//SEG4 @5
//SEG5 [2] call main
//SEG6 [4] phi from @5 to main [phi:@5->main]
jsr main
//SEG7 [3] phi from @5 to @end [phi:@5->@end]
//SEG8 @end
//SEG9 main

View File

@ -3,7 +3,6 @@
.pc = $80d "Program"
.const STAR = $51
.label SCREEN = $400
jsr main
main: {
.const x1 = $27
.const y1 = $18

View File

@ -356,7 +356,7 @@ Allocated zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const STAR = $51
@ -506,7 +506,7 @@ Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:5 [ main::y#2 main::y#4 main::y#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.const STAR = $51
@ -630,22 +630,26 @@ Removing instruction lda #4
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b2_from_b1 with b2
Replacing label b1_from_b2 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b2:
Removing instruction b2_from_b1:
Removing instruction b2_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -695,7 +699,7 @@ zp ZP_BYTE:5 [ main::y#2 main::y#4 main::y#1 ]
FINAL ASSEMBLER
Score: 992
Score: 986
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -709,7 +713,6 @@ Score: 992
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.const STAR = $51
.label screen = $400

View File

@ -347,7 +347,7 @@ Allocated zp ZP_BYTE:6 [ main::y#2 main::y#4 main::y#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -499,7 +499,7 @@ Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:4 [ main::y#2 main::y#4 main::y#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -631,22 +631,26 @@ Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b2_from_b1 with b2
Replacing label b2_from_b1 with b2
Replacing label b1_from_b2 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b2:
Removing instruction b2_from_b1:
Removing instruction b2_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -696,7 +700,7 @@ zp ZP_BYTE:4 [ main::y#2 main::y#4 main::y#1 ]
FINAL ASSEMBLER
Score: 1072
Score: 1066
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -708,7 +712,6 @@ Score: 1072
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -41,7 +41,6 @@
.label DTV_PLANEB_MODULO_HI = $d048
.label SCREEN = $7c00
.label CHARSET8 = $8000
jsr main
main: {
sei
lda #PROCPORT_DDR_MEMORY_MASK

View File

@ -1916,7 +1916,7 @@ Allocated zp ZP_BYTE:26 [ gfx_init_screen0::$3 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -2667,7 +2667,7 @@ Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ gfx_init_plane_charset8::col#2 gfx_
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -3255,8 +3255,8 @@ 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 bbegin:
Removing instruction b9_from_bbegin:
Removing instruction b9:
Removing instruction bend_from_b9:
Removing instruction b1_from_b1:
Removing instruction b1_from_gfx_init:
@ -3269,7 +3269,6 @@ Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b9:
Removing instruction bend:
Removing instruction gfx_init_from_main:
Removing instruction b17:
@ -3294,6 +3293,9 @@ Removing instruction b1_from_gfx_init_screen0:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Relabelling long label b4_from_b3 to b5
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
@ -3303,6 +3305,8 @@ Removing instruction jmp b3
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @9
@ -3634,7 +3638,7 @@ reg byte a [ gfx_init_screen0::$3 ]
FINAL ASSEMBLER
Score: 75383
Score: 75377
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -3685,7 +3689,6 @@ Score: 75383
//SEG3 [1] phi from @begin to @9 [phi:@begin->@9]
//SEG4 @9
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @9 to @end [phi:@9->@end]
//SEG7 @end
//SEG8 main

View File

@ -33,7 +33,6 @@
.label DTV_PLANEB_MODULO_LO = $d047
.label DTV_PLANEB_MODULO_HI = $d048
.label CHUNKY = $8000
jsr main
main: {
sei
lda #PROCPORT_DDR_MEMORY_MASK

View File

@ -1567,7 +1567,7 @@ Allocated zp ZP_BYTE:16 [ gfx_init_chunky::c#0 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -2092,7 +2092,7 @@ Allocated (was zp ZP_WORD:14) zp ZP_WORD:7 [ gfx_init_chunky::$6 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -2521,8 +2521,8 @@ 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 bbegin:
Removing instruction b7_from_bbegin:
Removing instruction b7:
Removing instruction bend_from_b7:
Removing instruction b1_from_b1:
Removing instruction b1_from_b5:
@ -2532,7 +2532,6 @@ Removing instruction b3_from_b2:
Removing instruction b6_from_b5:
Removing instruction dtvSetCpuBankSegment1_from_b6:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b7:
Removing instruction bend:
Removing instruction gfx_init_chunky_from_main:
Removing instruction b17:
@ -2549,11 +2548,16 @@ Removing instruction b6:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Removing instruction jmp b2
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @7
@ -2832,7 +2836,7 @@ reg byte a [ gfx_init_chunky::c#0 ]
FINAL ASSEMBLER
Score: 19888
Score: 19882
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -2875,7 +2879,6 @@ Score: 19888
//SEG3 [1] phi from @begin to @7 [phi:@begin->@7]
//SEG4 @7
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @7 to @end [phi:@7->@end]
//SEG7 @end
//SEG8 main

View File

@ -44,7 +44,6 @@
.const DTV_BLIT_STATUS_BUSY = 1
.label SCREEN = $400
.const SRCA_LEN = 9
jsr main
main: {
lda #DTV_FEATURE_ENABLE
sta DTV_FEATURE

View File

@ -1177,7 +1177,7 @@ Allocated zp ZP_BYTE:3 [ main::$15 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label DTV_FEATURE = $d03f
@ -1464,7 +1464,7 @@ Uplifting [] best 2815 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label DTV_FEATURE = $d03f
@ -1677,17 +1677,19 @@ Removing instruction lda #0
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Replacing label b2_from_b3 with b2
Removing instruction bbegin:
Removing instruction b6_from_bbegin:
Removing instruction b6:
Removing instruction bend_from_b6:
Removing instruction b2_from_b3:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b6:
Removing instruction bend:
Removing instruction b2_from_main:
Removing instruction b3:
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
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b2_from_b2 to b1
@ -1696,6 +1698,8 @@ Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
@ -1940,7 +1944,7 @@ reg byte a [ main::$15 ]
FINAL ASSEMBLER
Score: 1567
Score: 1561
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -1994,7 +1998,6 @@ Score: 1567
//SEG3 [1] phi from @begin to @6 [phi:@begin->@6]
//SEG4 @6
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @6 to @end [phi:@6->@end]
//SEG7 @end
//SEG8 main

View File

@ -10,7 +10,6 @@
.const DTV_HIGHCOLOR = 4
.const DTV_BADLINE_OFF = $20
.label DTV_PALETTE = $d200
jsr main
main: {
sei
lda #DTV_FEATURE_ENABLE

View File

@ -1076,7 +1076,7 @@ Allocated zp ZP_BYTE:3 [ main::c#2 main::c#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label RASTER = $d012
@ -1227,7 +1227,7 @@ Uplifting [] best 11689 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label RASTER = $d012
@ -1355,21 +1355,25 @@ Removing instruction jmp b8
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b7_from_b7 with b7
Replacing label b8_from_b8 with b8
Removing instruction bbegin:
Removing instruction b6_from_bbegin:
Removing instruction b6:
Removing instruction bend_from_b6:
Removing instruction b7_from_b7:
Removing instruction b8_from_b8:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b6:
Removing instruction bend:
Removing instruction b6:
Removing instruction b7_from_b6:
Removing instruction b8_from_b7:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b7
Removing instruction jmp b8
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @6
@ -1577,7 +1581,7 @@ reg byte x [ main::c#2 main::c#1 ]
FINAL ASSEMBLER
Score: 10180
Score: 10174
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -1597,7 +1601,6 @@ Score: 10180
//SEG3 [1] phi from @begin to @6 [phi:@begin->@6]
//SEG4 @6
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @6 to @end [phi:@6->@end]
//SEG7 @end
//SEG8 main

View File

@ -127,7 +127,6 @@
.label keyboard_events_size = 9
.label keyboard_modifiers = 2
.label form_cursor_count = $e
jsr main
main: {
sei
lda #PROCPORT_DDR_MEMORY_MASK

View File

@ -13738,7 +13738,7 @@ Allocated zp ZP_BYTE:356 [ gfx_init_screen0::$3 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -20872,7 +20872,7 @@ Allocated (was zp ZP_DWORD:292) zp ZP_DWORD:19 [ gfx_init_plane_fill::$0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -26439,8 +26439,8 @@ Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
Removing instruction bbegin:
Removing instruction b68_from_bbegin:
Removing instruction b68:
Removing instruction bend_from_b68:
Removing instruction b7_from_main:
Removing instruction gfx_init_from_b7:
@ -26656,7 +26656,6 @@ Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b68:
Removing instruction bend:
Removing instruction b7:
Removing instruction b1_from_b7:
@ -26936,6 +26935,9 @@ Removing instruction b3:
Removing instruction breturn:
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 b15 in bne b15_from_b15
Skipping double jump to breturn_from_b9 in bne b9
Skipping double jump to breturn_from_b3 in bne b3
@ -27048,6 +27050,7 @@ Removing instruction lda x0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Removing instruction b17:
Removing instruction b9:
Removing instruction b3:
@ -27072,18 +27075,18 @@ Removing instruction b37:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp b7
Succesful ASM optimization Pass5UnreachableCodeElimination
Fixing long branch [687] beq b5 to bne
Fixing long branch [691] beq b6 to bne
Fixing long branch [695] beq b7 to bne
Fixing long branch [699] beq b8 to bne
Fixing long branch [685] beq b4 to bne
Fixing long branch [705] beq b9 to bne
Fixing long branch [709] beq b10 to bne
Fixing long branch [713] beq b11 to bne
Fixing long branch [717] beq b12 to bne
Fixing long branch [683] beq b3 to bne
Fixing long branch [723] beq b13 to bne
Fixing long branch [1247] bmi b2 to bpl
Fixing long branch [686] beq b5 to bne
Fixing long branch [690] beq b6 to bne
Fixing long branch [694] beq b7 to bne
Fixing long branch [698] beq b8 to bne
Fixing long branch [684] beq b4 to bne
Fixing long branch [704] beq b9 to bne
Fixing long branch [708] beq b10 to bne
Fixing long branch [712] beq b11 to bne
Fixing long branch [716] beq b12 to bne
Fixing long branch [682] beq b3 to bne
Fixing long branch [722] beq b13 to bne
Fixing long branch [1246] bmi b2 to bpl
FINAL SYMBOL TABLE
(label) @68
@ -28790,7 +28793,7 @@ reg byte a [ gfx_init_screen0::$3 ]
FINAL ASSEMBLER
Score: 11370523
Score: 11370517
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -28927,7 +28930,6 @@ Score: 11370523
//SEG3 [1] phi from @begin to @68 [phi:@begin->@68]
//SEG4 @68
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @68 to @end [phi:@68->@end]
//SEG7 @end
//SEG8 main

View File

@ -78,7 +78,6 @@
.label print_char_cursor = 5
.label dtv_control = 4
.label print_line_cursor = $d
jsr main
main: {
sei
lda #PROCPORT_DDR_MEMORY_MASK

View File

@ -12580,7 +12580,7 @@ Allocated zp ZP_BYTE:295 [ print_str_lines::ch#0 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -19226,7 +19226,7 @@ Allocated (was zp ZP_WORD:157) zp ZP_WORD:13 [ print_line_cursor#18 print_line_c
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT_DDR = 0
@ -24159,8 +24159,8 @@ Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b54_from_bbegin:
Removing instruction b54:
Removing instruction bend_from_b54:
Removing instruction b2_from_main:
Removing instruction b2_from_b2:
@ -24370,7 +24370,6 @@ Removing instruction b1_from_print_ln:
Removing instruction b1_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b54:
Removing instruction bend:
Removing instruction b1_from_menu:
Removing instruction b2_from_b1:
@ -24576,6 +24575,9 @@ Removing instruction b1_from_print_cls:
Removing instruction breturn:
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 b14 in beq b46
Skipping double jump to b4 in jmp b1_from_b30
Skipping double jump to b2 in bne b10
@ -24651,13 +24653,14 @@ Removing instruction lda x0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Removing instruction b46:
Removing instruction b10:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp b14
Removing unreachable instruction jmp b2
Succesful ASM optimization Pass5UnreachableCodeElimination
Fixing long branch [227] beq b4 to bne
Fixing long branch [226] beq b4 to bne
FINAL SYMBOL TABLE
(label) @54
@ -26175,7 +26178,7 @@ reg byte a [ print_str_lines::ch#0 ]
FINAL ASSEMBLER
Score: 2306078
Score: 2306072
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -26263,7 +26266,6 @@ Score: 2306078
//SEG3 [1] phi from @begin to @54 [phi:@begin->@54]
//SEG4 @54
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @54 to @end [phi:@54->@end]
//SEG7 @end
//SEG8 main

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label screen = 3
jsr main
main: {
lda #2
sta line.x1

View File

@ -229,7 +229,7 @@ Allocated zp ZP_WORD:4 [ screen#10 screen#14 screen#11 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label screen = 4
@ -346,7 +346,7 @@ Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ screen#10 screen#14 screen#11 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label screen = 3
@ -444,8 +444,8 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_main:
@ -453,13 +453,17 @@ Removing instruction line_from_b1:
Removing instruction b1_from_line:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction line_from_main:
Removing instruction b1:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @2
@ -489,7 +493,7 @@ zp ZP_WORD:3 [ screen#10 screen#14 screen#11 ]
FINAL ASSEMBLER
Score: 354
Score: 348
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -502,7 +506,6 @@ Score: 354
//SEG4 @2
//SEG5 [2] call main
//SEG6 [4] phi from @2 to main [phi:@2->main]
jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label SCREEN = $400
ldx #0

View File

@ -140,7 +140,7 @@ Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -209,7 +209,7 @@ Uplifting [] best 288 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -265,19 +265,23 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -298,7 +302,7 @@ reg byte x [ main::i#2 main::i#1 ]
FINAL ASSEMBLER
Score: 192
Score: 186
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -310,7 +314,6 @@ Score: 192
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label SCREEN = $400
.const min = $a

View File

@ -171,7 +171,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -244,7 +244,7 @@ Uplifting [] best 61 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -306,14 +306,18 @@ Removing instruction jmp bend
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b3:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -343,7 +347,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 49
Score: 43
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -354,7 +358,6 @@ Score: 49
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -5,7 +5,6 @@
.label SCREEN2 = SCREEN+$28*3
.label SCREEN3 = SCREEN+$28*6
.label SCREEN4 = SCREEN+$28*9
jsr main
main: {
ldx #0
b1:

View File

@ -345,7 +345,7 @@ Allocated zp ZP_BYTE:6 [ w::b2#0 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -502,7 +502,7 @@ Uplifting [] best 836 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -622,8 +622,8 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_b1:
@ -631,7 +631,6 @@ Removing instruction b2_from_b1:
Removing instruction w_from_b2:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b2:
@ -639,9 +638,14 @@ Removing instruction breturn:
Removing instruction b1_from_w:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @2
@ -689,7 +693,7 @@ reg byte x [ w::b2#0 ]
FINAL ASSEMBLER
Score: 674
Score: 668
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -705,7 +709,6 @@ Score: 674
//SEG4 @2
//SEG5 [2] call main
//SEG6 [4] phi from @2 to main [phi:@2->main]
jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
lda #'c'

View File

@ -114,7 +114,7 @@ Allocated zp ZP_BYTE:2 [ main::a#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -181,7 +181,7 @@ Uplifting [] best 59 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -235,14 +235,18 @@ Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #'c'
Removing instruction lda screen+1
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -259,7 +263,7 @@ reg byte a [ main::a#1 ]
FINAL ASSEMBLER
Score: 44
Score: 38
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -270,7 +274,6 @@ Score: 44
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -4,7 +4,6 @@
.label PROCPORT = 1
.label CHARGEN = $d000
.label SCREEN = $400
jsr main
main: {
.label CHAR_A = CHARGEN+8
.label bits = 3

View File

@ -371,7 +371,7 @@ Allocated zp ZP_BYTE:8 [ main::$1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT = 1
@ -559,7 +559,7 @@ Uplifting [main] best 7232 combination zp ZP_BYTE:2 [ main::y#2 main::y#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label PROCPORT = 1
@ -710,15 +710,14 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b3 with b2
Replacing label b1_from_b5 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b5:
Removing instruction b2_from_b3:
Removing instruction b4_from_b2:
Removing instruction b3_from_b4:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b2_from_b1:
@ -727,11 +726,16 @@ Removing instruction b5:
Removing instruction b6:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Relabelling long label b3_from_b2 to b4
Succesful ASM optimization Pass5RelabelLongLabels
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -781,7 +785,7 @@ reg byte a [ main::$1 ]
FINAL ASSEMBLER
Score: 5633
Score: 5627
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -795,7 +799,6 @@ Score: 5633
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = 2
.label colors = 4

View File

@ -248,7 +248,7 @@ Allocated zp ZP_BYTE:8 [ main::color#3 main::color#5 main::color#2 main::color#1
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -404,7 +404,7 @@ Uplifting [main] best 4863 combination zp ZP_BYTE:6 [ main::row#4 main::row#1 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -529,23 +529,27 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b2_from_b2 with b2
Replacing label b1_from_b3 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b3:
Removing instruction b2_from_b1:
Removing instruction b2_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b2
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -582,7 +586,7 @@ reg byte x [ main::color#3 main::color#5 main::color#2 main::color#1 ]
FINAL ASSEMBLER
Score: 3867
Score: 3861
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -594,7 +598,6 @@ Score: 3867
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -6,7 +6,6 @@
.const GREEN = 5
.const RED = 2
.label screen2 = screen1+$28
jsr main
main: {
ldx #0
lda #3

View File

@ -754,7 +754,7 @@ Allocated zp ZP_BYTE:3 [ test::i#11 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label screen1 = $400
@ -1014,7 +1014,7 @@ Uplifting [test] best 250 combination zp ZP_BYTE:2 [ test::a#11 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label screen1 = $400
@ -1245,8 +1245,8 @@ Removing instruction jmp breturn
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Removing instruction b1_from_main:
@ -1270,7 +1270,6 @@ Removing instruction test_from_b9:
Removing instruction b10_from_b9:
Removing instruction test_from_b10:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction test_from_main:
Removing instruction b1:
@ -1286,6 +1285,11 @@ Removing instruction b10:
Removing instruction breturn:
Removing instruction b3:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @2
@ -1331,7 +1335,7 @@ reg byte x [ test::i#11 ]
FINAL ASSEMBLER
Score: 205
Score: 199
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -1348,7 +1352,6 @@ Score: 205
//SEG4 @2
//SEG5 [2] call main
//SEG6 [4] phi from @2 to main [phi:@2->main]
jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
ldx #0

View File

@ -131,7 +131,7 @@ Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -200,7 +200,7 @@ Uplifting [] best 288 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -256,19 +256,23 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -290,7 +294,7 @@ reg byte x [ main::i#2 main::i#1 ]
FINAL ASSEMBLER
Score: 192
Score: 186
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -302,7 +306,6 @@ Score: 192
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label SCREEN = $400
lda #'!'

View File

@ -95,7 +95,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -143,7 +143,7 @@ Uplifting [] best 57 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -184,16 +184,20 @@ Removing instruction jmp bend
Removing instruction jmp b3
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b3:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -208,7 +212,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 18
Score: 12
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -220,7 +224,6 @@ Score: 18
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -3,7 +3,6 @@
.pc = $80d "Program"
.label plots = $1000
.label SCREEN = $400
jsr main
main: {
ldx #0
b1:

View File

@ -290,7 +290,7 @@ Allocated zp ZP_BYTE:6 [ plot::$0 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label plots = $1000
@ -444,7 +444,7 @@ Uplifting [] best 3268 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label plots = $1000
@ -566,8 +566,8 @@ Replacing label b1_from_b1 with b1
Replacing label b2_from_b2 with b2
Replacing label b3_from_b8 with b3
Replacing label b3_from_b8 with b3
Removing instruction bbegin:
Removing instruction b3_from_bbegin:
Removing instruction b3:
Removing instruction main_from_b3:
Removing instruction bend_from_b3:
Removing instruction b1_from_b1:
@ -576,7 +576,6 @@ Removing instruction b2_from_b2:
Removing instruction line_from_b2:
Removing instruction b3_from_b8:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b3:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b3_from_line:
@ -584,9 +583,14 @@ Removing instruction b8:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @3
@ -629,7 +633,7 @@ reg byte a [ plot::$0 ]
FINAL ASSEMBLER
Score: 1969
Score: 1963
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -643,7 +647,6 @@ Score: 1969
//SEG4 @3
//SEG5 [2] call main
//SEG6 [4] phi from @3 to main [phi:@3->main]
jsr main
//SEG7 [3] phi from @3 to @end [phi:@3->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
.const b = 6*$e/3+mod($16,3)

View File

@ -97,7 +97,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -141,7 +141,7 @@ Uplifting [] best 27 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -177,14 +177,18 @@ Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -200,7 +204,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 18
Score: 12
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -211,7 +215,6 @@ Score: 18
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
.label reverse = $80

View File

@ -244,7 +244,7 @@ Allocated zp ZP_BYTE:9 [ sum::return#3 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -378,7 +378,7 @@ Uplifting [sum] best 79 combination reg byte a [ sum::return#3 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -473,12 +473,11 @@ Removing instruction jmp b3
Removing instruction jmp breturn
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b2_from_bbegin:
Removing instruction b2:
Removing instruction main_from_b2:
Removing instruction bend_from_b2:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b2:
Removing instruction bend:
Removing instruction sum_from_main:
Removing instruction b1:
@ -489,6 +488,11 @@ Removing instruction b3:
Removing instruction breturn:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @2
@ -528,7 +532,7 @@ reg byte a [ sum::return#3 ]
FINAL ASSEMBLER
Score: 58
Score: 52
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -540,7 +544,6 @@ Score: 58
//SEG4 @2
//SEG5 [2] call main
//SEG6 [4] phi from @2 to main [phi:@2->main]
jsr main
//SEG7 [3] phi from @2 to @end [phi:@2->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
lda #'*'

View File

@ -112,7 +112,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -160,7 +160,7 @@ Uplifting [] best 57 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -201,16 +201,20 @@ Removing instruction jmp bend
Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -227,7 +231,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 18
Score: 12
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -239,7 +243,6 @@ Score: 18
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
.label wp = w

View File

@ -130,7 +130,7 @@ Allocated zp ZP_BYTE:7 [ main::$4 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -217,7 +217,7 @@ Uplifting [] best 75 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -277,14 +277,18 @@ Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -311,7 +315,7 @@ reg byte a [ main::$4 ]
FINAL ASSEMBLER
Score: 66
Score: 60
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -322,7 +326,6 @@ Score: 66
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
jsr main
main: {
lda #1
sta SCREEN

View File

@ -70,7 +70,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -113,7 +113,7 @@ Uplifting [] best 27 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -148,14 +148,18 @@ Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -169,7 +173,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 18
Score: 12
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -181,7 +185,6 @@ Score: 18
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label SCREEN = $400
ldx #0

View File

@ -171,7 +171,7 @@ Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -243,7 +243,7 @@ Uplifting [] best 288 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -302,19 +302,23 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -343,7 +347,7 @@ reg byte x [ main::i#2 main::i#1 ]
FINAL ASSEMBLER
Score: 192
Score: 186
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -355,7 +359,6 @@ Score: 192
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -6,7 +6,6 @@
.label VIC = $d000
.const RED = 2
.label BGCOL = VIC+$10*2+1
jsr main
main: {
lda #STAR
sta SCREEN

View File

@ -159,7 +159,7 @@ Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -239,7 +239,7 @@ Uplifting [] best 275 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SCREEN = $400
@ -302,18 +302,22 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -340,7 +344,7 @@ reg byte x [ main::i#2 main::i#1 ]
FINAL ASSEMBLER
Score: 179
Score: 173
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -356,7 +360,6 @@ Score: 179
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -6,7 +6,6 @@
.const RED = 2
.label print_char_cursor = 5
.label print_line_cursor = 7
jsr main
main: {
jsr print_cls
lda #GREEN

View File

@ -1335,7 +1335,7 @@ Allocated zp ZP_WORD:16 [ print_cls::sc#2 print_cls::sc#1 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label BGCOL = $d021
@ -1970,7 +1970,7 @@ Allocated (was zp ZP_WORD:10) zp ZP_WORD:7 [ print_line_cursor#24 print_line_cur
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label BGCOL = $d021
@ -2544,8 +2544,8 @@ Replacing label b1_from_b1 with b1
Replacing label b2_from_b1 with b2
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b24_from_bbegin:
Removing instruction b24:
Removing instruction main_from_b24:
Removing instruction bend_from_b24:
Removing instruction b2_from_b1:
@ -2578,7 +2578,6 @@ Removing instruction b2_from_b3:
Removing instruction print_ln_from_b2:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b24:
Removing instruction bend:
Removing instruction print_cls_from_main:
Removing instruction b1:
@ -2614,8 +2613,13 @@ Removing instruction print_str_from_b1:
Removing instruction b1_from_print_cls:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @24
@ -2741,7 +2745,7 @@ reg byte x [ assert_byte::b#3 ]
FINAL ASSEMBLER
Score: 1846
Score: 1840
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -2758,7 +2762,6 @@ Score: 1846
//SEG4 @24
//SEG5 [2] call main
//SEG6 [4] phi from @24 to main [phi:@24->main]
jsr main
//SEG7 [3] phi from @24 to @end [phi:@24->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.label screen = $400
.const a = $c

View File

@ -87,7 +87,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -135,7 +135,7 @@ Uplifting [] best 33 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -176,14 +176,18 @@ Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #a
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -200,7 +204,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 22
Score: 16
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -211,7 +215,6 @@ Score: 22
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -3,7 +3,6 @@
.pc = $80d "Program"
.label BGCOL = $d021
.const RED = 2
jsr main
main: {
lda #RED
sta BGCOL

View File

@ -75,7 +75,7 @@ Complete equivalence classes
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label BGCOL = $d021
@ -119,7 +119,7 @@ Uplifting [] best 27 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label BGCOL = $d021
@ -155,14 +155,18 @@ Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -178,7 +182,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 18
Score: 12
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -191,7 +195,6 @@ Score: 18
//SEG3 [1] phi from @begin to @1 [phi:@begin->@1]
//SEG4 @1
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @1 to @end [phi:@1->@end]
//SEG7 @end
//SEG8 main

View File

@ -1,7 +1,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
jsr main
main: {
.const a = $ee6b2800
.label SCREEN = $400

View File

@ -144,7 +144,7 @@ Allocated zp ZP_BYTE:7 [ main::c#0 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -237,7 +237,7 @@ Allocated (was zp ZP_DWORD:3) zp ZP_DWORD:2 [ main::b#0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
//SEG2 @begin
@ -309,19 +309,23 @@ Removing instruction jmp b1
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction main_from_b1:
Removing instruction bend_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b1:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction breturn:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @1
@ -348,7 +352,7 @@ reg byte a [ main::c#0 ]
FINAL ASSEMBLER
Score: 477
Score: 471
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -360,7 +364,6 @@ Score: 477
//SEG4 @1
//SEG5 [2] call main
//SEG6 [4] phi from @1 to main [phi:@1->main]
jsr main
//SEG7 [3] phi from @1 to @end [phi:@1->@end]
//SEG8 @end
//SEG9 main

View File

@ -2,7 +2,6 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label B = $1000
jsr main
main: {
lda #0
b2:

View File

@ -305,7 +305,7 @@ Allocated zp ZP_BYTE:2 [ a#1 a#12 a#5 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label B = $1000
@ -413,7 +413,7 @@ Uplifting [mode] best 18376 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label B = $1000
@ -514,8 +514,8 @@ Succesful ASM optimization Pass5NextJumpElimination
Replacing label b1 with b2
Replacing label b1 with b2
Replacing label b1_from_b2 with b2
Removing instruction bbegin:
Removing instruction b3_from_bbegin:
Removing instruction b3:
Removing instruction main_from_b3:
Removing instruction bend_from_b3:
Removing instruction b1:
@ -527,7 +527,6 @@ Removing instruction b1_from_mode:
Removing instruction b1_from_b2:
Removing instruction b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b3:
Removing instruction bend:
Removing instruction b1_from_main:
Removing instruction b1_from_b2:
@ -535,6 +534,9 @@ Removing instruction b2:
Removing instruction breturn:
Removing instruction b7:
Succesful ASM optimization Pass5UnusedLabelElimination
Updating BasicUpstart to call main directly
Removing instruction jsr main
Succesful ASM optimization Pass5SkipBegin
Skipping double jump to b2 in jmp b1_from_b7
Succesful ASM optimization Pass5DoubleJumpElimination
Relabelling long label b1_from_b7 to b1
@ -545,6 +547,8 @@ Removing instruction lda B
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Succesful ASM optimization Pass5UnusedLabelElimination
FINAL SYMBOL TABLE
(label) @3
@ -571,7 +575,7 @@ reg byte a [ a#1 a#12 a#5 ]
FINAL ASSEMBLER
Score: 8874
Score: 8868
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -584,7 +588,6 @@ Score: 8874
//SEG4 @3
//SEG5 [2] call main
//SEG6 [4] phi from @3 to main [phi:@3->main]
jsr main
//SEG7 [3] phi from @3 to @end [phi:@3->@end]
//SEG8 @end
//SEG9 main

View File

@ -1,5 +1,5 @@
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
.label SPRITES_XPOS = $d000
.label SPRITES_YPOS = $d001
@ -35,6 +35,7 @@
.label COSQ = SINQ+$40
.label sx = 2
.label sy = 3
bbegin:
jsr main
main: {
sei

View File

@ -5661,7 +5661,7 @@ Allocated zp ZP_WORD:116 [ debug_print_init::$92 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SPRITES_XPOS = $d000
@ -8405,7 +8405,7 @@ Allocated (was zp ZP_BYTE:55) zp ZP_BYTE:16 [ calculate_matrix::t10#0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SPRITES_XPOS = $d000
@ -10465,7 +10465,7 @@ Replacing label b1_from_b2 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b33:
Removing instruction bend_from_b33:
Removing instruction b2_from_b1:
Removing instruction anim_from_b2:
@ -10508,7 +10508,6 @@ Removing instruction b1_from_b2:
Removing instruction b1_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b33:
Removing instruction bend:
Removing instruction b1:
Removing instruction debug_print_init_from_b1:
@ -10617,9 +10616,9 @@ Removing instruction jmp b2
Removing instruction jmp b1
Removing instruction jmp b1
Succesful ASM optimization Pass5NextJumpElimination
Fixing long branch [307] bne b1 to beq
Fixing long branch [975] bne b2 to beq
Fixing long branch [985] bne b1 to beq
Fixing long branch [308] bne b1 to beq
Fixing long branch [976] bne b2 to beq
Fixing long branch [986] bne b1 to beq
FINAL SYMBOL TABLE
(label) @33
@ -11247,7 +11246,7 @@ Score: 85532
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label SPRITES_XPOS = $d000
@ -11285,6 +11284,7 @@ Score: 85532
.label sx = 2
.label sy = 3
//SEG2 @begin
bbegin:
//SEG3 @33
//SEG4 kickasm(location (const byte*) mulf_sqr1#0) {{ .for(var i=0;i<$200;i++) { .if(i<=159) { .byte round((i*i)/256) } .if(i>159 && i<=351 ) { .byte round(((i-256)*(i-256))/256) } .if(i>351) { .byte round(((512-i)*(512-i))/256) } } }}
//SEG5 kickasm(location (const byte*) mulf_sqr2#0) {{ .for(var i=0;i<$200;i++) { .if(i<=159) { .byte round((-i-1)*(-i-1)/256) } .if(i>159 && i<=351 ) { .byte round(((255-i)*(255-i))/256) } .if(i>351) { .byte round(((i-511)*(i-511))/256) } } }}

View File

@ -1,5 +1,5 @@
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
.label xr = $f0
.label yr = $f1
@ -9,6 +9,7 @@
.label PERSP_Z = $2400
.label print_char_cursor = 4
.label print_line_cursor = 2
bbegin:
jsr main
main: {
sei

View File

@ -1929,7 +1929,7 @@ Allocated zp ZP_BYTE:24 [ mulf_init::$10 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label xr = $f0
@ -2718,7 +2718,7 @@ Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:6 [ mulf_init::val#0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label xr = $f0
@ -3408,7 +3408,7 @@ Replacing label b2_from_b5 with b2
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Replacing label b1_from_b1 with b1
Removing instruction bbegin:
Removing instruction b27:
Removing instruction bend_from_b27:
Removing instruction b2_from_b1:
Removing instruction do_perspective_from_b2:
@ -3443,7 +3443,6 @@ Removing instruction print_char_from_b1:
Removing instruction b1_from_b1:
Removing instruction b1_from_b1:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b27:
Removing instruction bend:
Removing instruction mulf_init_from_main:
Removing instruction b1:
@ -3718,7 +3717,7 @@ Score: 3787
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label xr = $f0
@ -3730,6 +3729,7 @@ Score: 3787
.label print_char_cursor = 4
.label print_line_cursor = 2
//SEG2 @begin
bbegin:
//SEG3 @27
//SEG4 kickasm(location (const signed byte*) PERSP_Z#0) {{ { .var d = 256.0 .var z0 = 5.0 .for(var z=0;z<$100;z++) { .if(z>127) { .byte round(d / (z0 - ((z - 256) / 64.0))); } else { .byte round(d / (z0 - (z / 64.0))); } } } }}
//SEG5 [2] call main

View File

@ -11,7 +11,6 @@
.label SCREEN = $400
.label BITMAP = $2000
.const lines_cnt = 8
jsr main
main: {
lda #0
sta BORDERCOL

View File

@ -2829,7 +2829,7 @@ Allocated zp ZP_BYTE:68 [ bitmap_init::$10 ]
INITIAL ASM
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label BORDERCOL = $d020
@ -4249,7 +4249,7 @@ Allocated (was zp ZP_WORD:53) zp ZP_WORD:11 [ bitmap_plot::plotter_y#0 ]
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 Basic Upstart
.pc = $801 "Basic"
:BasicUpstart(main)
:BasicUpstart(bbegin)
.pc = $80d "Program"
//SEG1 Global Constants & labels
.label BORDERCOL = $d020
@ -5300,8 +5300,8 @@ Replacing label b10_from_b1 with b10
Replacing label b1_from_b2 with b1
Replacing label b4_from_b3 with b4
Replacing label b3_from_b4 with b3
Removing instruction bbegin:
Removing instruction b15_from_bbegin:
Removing instruction b15:
Removing instruction bend_from_b15:
Removing instruction b3_from_main:
Removing instruction b4_from_b3:
@ -5337,7 +5337,6 @@ Removing instruction b4_from_b7:
Removing instruction b10_from_b1:
Removing instruction b2_from_b10:
Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction b15:
Removing instruction bend:
Removing instruction bitmap_init_from_main:
Removing instruction b3:
@ -5388,6 +5387,9 @@ Removing instruction b3_from_b2:
Removing instruction b7:
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 b10
Succesful ASM optimization Pass5DoubleJumpElimination
Removing instruction jmp b1
@ -5399,6 +5401,7 @@ Removing instruction jmp b3
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda x0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction bbegin:
Removing instruction b10:
Succesful ASM optimization Pass5UnusedLabelElimination
Removing unreachable instruction jmp b2
@ -5814,7 +5817,7 @@ reg byte a [ bitmap_init::$10 ]
FINAL ASSEMBLER
Score: 221049
Score: 221043
//SEG0 Basic Upstart
.pc = $801 "Basic"
@ -5835,7 +5838,6 @@ Score: 221049
//SEG3 [1] phi from @begin to @15 [phi:@begin->@15]
//SEG4 @15
//SEG5 [2] call main
jsr main
//SEG6 [3] phi from @15 to @end [phi:@15->@end]
//SEG7 @end
//SEG8 main

View File

@ -61,7 +61,6 @@
.const KEY_SPACE = $3c
.const KEY_Q = $3e
.label SCREEN = $400
jsr main
main: {
.label sc = 2
.label i = 4

Some files were not shown because too many files have changed in this diff Show More