1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-19 15:29:48 +00:00

Small numbers skip $

This commit is contained in:
jespergravgaard 2017-10-15 23:15:49 +02:00
parent 3c1f4d2901
commit d551f8c569
50 changed files with 1305 additions and 1202 deletions

View File

@ -5,7 +5,6 @@ import dk.camelot64.kickc.asm.parser.Asm6502BaseVisitor;
import dk.camelot64.kickc.asm.parser.Asm6502Parser;
import dk.camelot64.kickc.icl.*;
import dk.camelot64.kickc.passes.Pass1TypeInference;
import dk.camelot64.kickc.passes.Pass4CodeGeneration;
import java.util.LinkedHashMap;
import java.util.Map;
@ -73,6 +72,48 @@ public class AsmFragment {
}
/**
* Get ASM code for a constant value
*
* @param value The constant value
* @param precedence The precedence of the outer expression operator. Used to generate perenthesis when needed.
*
* @return The ASM string representing the constant value
*/
public static String getAsmConstant(Program program, Constant value, int precedence) {
if (value instanceof ConstantRef) {
value = program.getScope().getConstant((ConstantRef) value);
}
if (value instanceof ConstantVar) {
ConstantVar constantVar = (ConstantVar) value;
String asmName = constantVar.getAsmName() == null ? constantVar.getLocalName() : constantVar.getAsmName();
return asmName.replace("#", "_").replace("$", "_");
} else if (value instanceof ConstantInteger) {
return getAsmNumber(((ConstantInteger) value).getNumber());
} else if (value instanceof ConstantUnary) {
ConstantUnary unary = (ConstantUnary) value;
Operator operator = unary.getOperator();
boolean parenthesis = operator.getPrecedence()>precedence;
return
(parenthesis ? "(" : "") +
operator.getOperator() +
getAsmConstant(program, unary.getOperand(), operator.getPrecedence()) +
(parenthesis? ")" : "");
} else if (value instanceof ConstantBinary) {
ConstantBinary binary = (ConstantBinary) value;
Operator operator = binary.getOperator();
boolean parenthesis = operator.getPrecedence()>precedence;
return
(parenthesis? "(" : "") +
getAsmConstant(program, binary.getLeft(), operator.getPrecedence()) +
operator.getOperator() +
getAsmConstant(program, binary.getRight(), operator.getPrecedence()) +
(parenthesis? ")" : "");
} else {
throw new RuntimeException("Constant type not supported " + value);
}
}
private String assignmentWithAluSignature(StatementAssignment assignment, StatementAssignment assignmentAlu) {
this.scope = program.getGraph().getBlockFromStatementIdx(assignment.getIndex()).getScope();
if (!(assignment.getrValue2() instanceof VariableRef)) {
@ -384,7 +425,7 @@ public class AsmFragment {
Constant pointerConst = (Constant) pointer;
if (pointerConst instanceof ConstantInteger) {
ConstantInteger intPointer = (ConstantInteger) pointerConst;
String param = String.format("$%x", intPointer.getNumber());
String param = getAsmNumber(intPointer.getNumber());
return new AsmParameter(param, SymbolTypeBasic.BYTE.equals(intPointer.getType(program.getScope())));
} else {
throw new RuntimeException("Bound Value Type not implemented " + boundValue);
@ -394,7 +435,7 @@ public class AsmFragment {
}
} else if (boundValue instanceof Constant) {
Constant boundConst = (Constant) boundValue;
String constantValueAsm = Pass4CodeGeneration.getConstantValueAsm(program, boundConst, 99);
String constantValueAsm = getAsmConstant(program, boundConst, 99);
boolean constantValueZp = SymbolTypeBasic.BYTE.equals(boundConst.getType(program.getScope()));
return new AsmParameter(constantValueAsm, constantValueZp);
} else if (boundValue instanceof Label) {
@ -405,6 +446,17 @@ public class AsmFragment {
}
}
public static String getAsmNumber(Number number) {
if(number instanceof Integer) {
if(number.intValue()>=0 && number.intValue()<=9) {
return String.format("%d", number.intValue());
} else {
return String.format("$%x", number);
}
}
throw new RuntimeException("Unsupported number type "+number);
}
/**
* Get the ASM parameter for a specific bound variable
* @param boundVar The variable
@ -612,7 +664,7 @@ public class AsmFragment {
Number number = NumberParser.parseLiteral(ctx.NUMINT().getText());
ConstantInteger intVal = new ConstantInteger(number.intValue());
boolean isZp = SymbolTypeBasic.BYTE.equals(intVal.getType());
String param = String.format("$%x", number);
String param = getAsmNumber(number);
return new AsmParameter(param, isZp);
}

View File

@ -1,8 +1,5 @@
package dk.camelot64.kickc.icl;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/** An Operator. The operation performed on the rvalues in a Statement. */
public class Operator {
@ -15,6 +12,7 @@ public class Operator {
public Operator(String operator, Type type, int precedence) {
this.operator = operator;
this.precedence = precedence;
this.type = type;
}
public static Operator getBinary(String op) {

View File

@ -91,54 +91,12 @@ public class Pass4CodeGeneration {
for (ConstantVar constantVar : scopeConstants) {
String asmName = constantVar.getAsmName() == null ? constantVar.getLocalName() : constantVar.getAsmName();
if (asmName != null && !added.contains(asmName)) {
asm.addConstant(asmName.replace("#", "_").replace("$", "_"), getConstantValueAsm(program, constantVar.getValue(), 99));
asm.addConstant(asmName.replace("#", "_").replace("$", "_"), AsmFragment.getAsmConstant(program, constantVar.getValue(), 99));
added.add(asmName);
}
}
}
/**
* Get ASM code for a constant value
*
* @param value The constant value
* @param precedence The precedence of the outer expression operator. Used to generate perenthesis when needed.
*
* @return The ASM string representing the constant value
*/
public static String getConstantValueAsm(Program program, Constant value, int precedence) {
if (value instanceof ConstantRef) {
value = program.getScope().getConstant((ConstantRef) value);
}
if (value instanceof ConstantVar) {
ConstantVar constantVar = (ConstantVar) value;
String asmName = constantVar.getAsmName() == null ? constantVar.getLocalName() : constantVar.getAsmName();
return asmName.replace("#", "_").replace("$", "_");
} else if (value instanceof ConstantInteger) {
return String.format("$%x", ((ConstantInteger) value).getNumber());
} else if (value instanceof ConstantUnary) {
ConstantUnary unary = (ConstantUnary) value;
Operator operator = unary.getOperator();
boolean parenthesis = operator.getPrecedence()>precedence;
return
(parenthesis ? "(" : "") +
operator.getOperator() +
getConstantValueAsm(program, unary.getOperand(), operator.getPrecedence()) +
(parenthesis? ")" : "");
} else if (value instanceof ConstantBinary) {
ConstantBinary binary = (ConstantBinary) value;
Operator operator = binary.getOperator();
boolean parenthesis = operator.getPrecedence()>precedence;
return
(parenthesis? "(" : "") +
getConstantValueAsm(program, binary.getLeft(), operator.getPrecedence()) +
operator.getOperator() +
getConstantValueAsm(program, binary.getRight(), operator.getPrecedence()) +
(parenthesis? ")" : "");
} else {
throw new RuntimeException("Constant type not supported " + value);
}
}
/**
* Add label declarations for all scope variables assigned to ZP registers

View File

@ -4,8 +4,8 @@ byte[40*25] SCREEN = $0400;
main();
void main() {
byte x0 = 0;
byte y0 = 0;
byte x0 = 4;
byte y0 = 4;
byte x1 = 39;
byte y1 = 24;
byte xd = x1-x0;

View File

@ -4,28 +4,27 @@
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
lda #$0
lda #4
sta y
ldx #yd/$2
lda #$0
ldx #yd/2
sta x
lda #<SCREEN+$0*$28+$0
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
b1:
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
inc x
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
txa
clc
@ -39,7 +38,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
txa
sec
@ -47,7 +46,7 @@ main: {
tax
b2:
lda x
cmp #x1+$1
cmp #x1+1
bcc b1
rts
}

View File

@ -6,10 +6,10 @@ main: scope:[main] from @begin
[1] phi() [ ]
to:main::@1
main::@1: scope:[main] from main main::@2
[2] (byte) main::y#2 ← phi( main/(byte) 0 main::@2/(byte) main::y#4 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::y#2 ← phi( main/(byte) 4 main::@2/(byte) main::y#4 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@2/(byte) main::e#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::x#2 ← phi( main/(byte) 0 main::@2/(byte) main::x#1 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 main::@2/(byte*) main::cursor#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::x#2 ← phi( main/(byte) 4 main::@2/(byte) main::x#1 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 main::@2/(byte*) main::cursor#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ]
[5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ]

View File

@ -4,8 +4,8 @@ byte[40*25] SCREEN = $0400;
main();
void main() {
byte x0 = 0;
byte y0 = 0;
byte x0 = 4;
byte y0 = 4;
byte x1 = 39;
byte y1 = 24;
byte xd = x1-x0;
@ -31,8 +31,8 @@ PROGRAM
(byte[1000]) SCREEN ← (word) 1024
(void~) $0 ← call main
proc (void()) main()
(byte) main::x0 ← (byte) 0
(byte) main::y0 ← (byte) 0
(byte) main::x0 ← (byte) 4
(byte) main::y0 ← (byte) 4
(byte) main::x1 ← (byte) 39
(byte) main::y1 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
@ -114,8 +114,8 @@ INITIAL CONTROL FLOW GRAPH
(void~) $0 ← call main
to:@1
main: scope:[main] from
(byte) main::x0 ← (byte) 0
(byte) main::y0 ← (byte) 0
(byte) main::x0 ← (byte) 4
(byte) main::y0 ← (byte) 4
(byte) main::x1 ← (byte) 39
(byte) main::y1 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
@ -174,8 +174,8 @@ CONTROL FLOW GRAPH
(void~) $0 ← call main
to:@end
main: scope:[main] from
(byte) main::x0 ← (byte) 0
(byte) main::y0 ← (byte) 0
(byte) main::x0 ← (byte) 4
(byte) main::y0 ← (byte) 4
(byte) main::x1 ← (byte) 39
(byte) main::y1 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
@ -232,8 +232,8 @@ CONTROL FLOW GRAPH WITH ASSIGNMENT CALL
@2: scope:[] from @begin
to:@end
main: scope:[main] from @begin
(byte) main::x0 ← (byte) 0
(byte) main::y0 ← (byte) 0
(byte) main::x0 ← (byte) 4
(byte) main::y0 ← (byte) 4
(byte) main::x1 ← (byte) 39
(byte) main::y1 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1 - (byte) main::x0
@ -293,8 +293,8 @@ CONTROL FLOW GRAPH SSA
main: scope:[main] from @begin
(byte) STAR#2 ← phi( @begin/(byte) STAR#0 )
(byte[1000]) SCREEN#1 ← phi( @begin/(byte[1000]) SCREEN#0 )
(byte) main::x0#0 ← (byte) 0
(byte) main::y0#0 ← (byte) 0
(byte) main::x0#0 ← (byte) 4
(byte) main::y0#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
@ -375,8 +375,8 @@ CONTROL FLOW GRAPH WITH ASSIGNMENT CALL & RETURN
main: scope:[main] from @begin
(byte) STAR#2 ← phi( @begin/(byte) STAR#0 )
(byte[1000]) SCREEN#1 ← phi( @begin/(byte[1000]) SCREEN#0 )
(byte) main::x0#0 ← (byte) 0
(byte) main::y0#0 ← (byte) 0
(byte) main::x0#0 ← (byte) 4
(byte) main::y0#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
@ -539,8 +539,8 @@ CONTROL FLOW GRAPH
main: scope:[main] from @begin
(byte) STAR#2 ← phi( @begin/(byte) STAR#0 )
(byte[1000]) SCREEN#1 ← phi( @begin/(byte[1000]) SCREEN#0 )
(byte) main::x0#0 ← (byte) 0
(byte) main::y0#0 ← (byte) 0
(byte) main::x0#0 ← (byte) 4
(byte) main::y0#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
@ -621,8 +621,8 @@ CONTROL FLOW GRAPH
main: scope:[main] from @begin
(byte) STAR#2 ← phi( @begin/(byte) STAR#0 )
(byte[1000]) SCREEN#1 ← phi( @begin/(byte[1000]) SCREEN#0 )
(byte) main::x0#0 ← (byte) 0
(byte) main::y0#0 ← (byte) 0
(byte) main::x0#0 ← (byte) 4
(byte) main::y0#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte~) main::$0 ← (byte) main::x1#0 - (byte) main::x0#0
@ -718,8 +718,8 @@ CONTROL FLOW GRAPH
call main param-assignment
to:@end
main: scope:[main] from @begin
(byte) main::x#0 ← (byte) 0
(byte) main::y#0 ← (byte) 0
(byte) main::x#0 ← (byte) 4
(byte) main::y#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte) main::xd#0 ← (byte) main::x1#0 - (byte) main::x#0
@ -781,8 +781,8 @@ CONTROL FLOW GRAPH
call main param-assignment
to:@end
main: scope:[main] from @begin
(byte) main::x#0 ← (byte) 0
(byte) main::y#0 ← (byte) 0
(byte) main::x#0 ← (byte) 4
(byte) main::y#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte) main::xd#0 ← (byte) main::x1#0 - (byte) main::x#0
@ -838,8 +838,8 @@ CONTROL FLOW GRAPH
call main param-assignment
to:@end
main: scope:[main] from @begin
(byte) main::x#0 ← (byte) 0
(byte) main::y#0 ← (byte) 0
(byte) main::x#0 ← (byte) 4
(byte) main::y#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte) main::xd#0 ← (byte) main::x1#0 - (byte) main::x#0
@ -893,8 +893,8 @@ CONTROL FLOW GRAPH
call main param-assignment
to:@end
main: scope:[main] from @begin
(byte) main::x#0 ← (byte) 0
(byte) main::y#0 ← (byte) 0
(byte) main::x#0 ← (byte) 4
(byte) main::y#0 ← (byte) 4
(byte) main::x1#0 ← (byte) 39
(byte) main::y1#0 ← (byte) 24
(byte) main::xd#0 ← (byte) main::x1#0 - (byte) main::x#0
@ -938,8 +938,8 @@ main::@return: scope:[main] from main::@2
Constant (const byte) STAR#0 = 81
Constant (const byte[1000]) SCREEN#0 = 1024
Constant (const byte) main::x#0 = 0
Constant (const byte) main::y#0 = 0
Constant (const byte) main::x#0 = 4
Constant (const byte) main::y#0 = 4
Constant (const byte) main::x1#0 = 39
Constant (const byte) main::y1#0 = 24
Succesful SSA optimization Pass2ConstantIdentification
@ -1111,15 +1111,15 @@ Multiple usages for variable. Not optimizing sub-constant (byte) main::y#2
Multiple usages for variable. Not optimizing sub-constant (byte*) main::cursor#1
Multiple usages for variable. Not optimizing sub-constant (byte) main::y#2
Multiple usages for variable. Not optimizing sub-constant (byte*) main::cursor#1
Constant inlined main::$3 = (byte) 0*(byte) 40
Constant inlined main::$4 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40
Constant inlined main::$3 = (byte) 4*(byte) 40
Constant inlined main::$4 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40
Constant inlined main::xd#1 = (const byte) main::xd#0
Constant inlined main::x#0 = (byte) 0
Constant inlined main::x#0 = (byte) 4
Constant inlined STAR#1 = (const byte) STAR#0
Constant inlined main::x1#2 = (const byte) main::x1#0
Constant inlined main::cursor#0 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0
Constant inlined main::cursor#0 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4
Constant inlined main::$14 = (const byte) main::x1#0+(byte) 1
Constant inlined main::y#0 = (byte) 0
Constant inlined main::y#0 = (byte) 4
Constant inlined main::e#0 = (const byte) main::yd#0/(byte) 2
Constant inlined main::yd#1 = (const byte) main::yd#0
Succesful SSA optimization Pass2ConstantInlining
@ -1130,10 +1130,10 @@ CONTROL FLOW GRAPH
main: scope:[main] from @begin
to:main::@1
main::@1: scope:[main] from main main::@2
(byte) main::y#2 ← phi( main/(byte) 0 main::@2/(byte) main::y#4 )
(byte) main::y#2 ← phi( main/(byte) 4 main::@2/(byte) main::y#4 )
(byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@2/(byte) main::e#5 )
(byte) main::x#2 ← phi( main/(byte) 0 main::@2/(byte) main::x#1 )
(byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 main::@2/(byte*) main::cursor#5 )
(byte) main::x#2 ← phi( main/(byte) 4 main::@2/(byte) main::x#1 )
(byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 main::@2/(byte*) main::cursor#5 )
*((byte*) main::cursor#3) ← (const byte) STAR#0
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
@ -1185,7 +1185,7 @@ FINAL SYMBOL TABLE
(byte) main::x1
(const byte) main::x1#0 = (byte) 39
(byte) main::xd
(const byte) main::xd#0 = (const byte) main::x1#0-(byte) 0
(const byte) main::xd#0 = (const byte) main::x1#0-(byte) 4
(byte) main::y
(byte) main::y#1
(byte) main::y#2
@ -1194,7 +1194,7 @@ FINAL SYMBOL TABLE
(byte) main::y1
(const byte) main::y1#0 = (byte) 24
(byte) main::yd
(const byte) main::yd#0 = (const byte) main::y1#0-(byte) 0
(const byte) main::yd#0 = (const byte) main::y1#0-(byte) 4
Block Sequence Planned @begin @end main main::@1 main::@3 main::@2 main::@return
Added new block during phi lifting main::@5(between main::@2 and main::@1)
@ -1208,10 +1208,10 @@ CONTROL FLOW GRAPH - PHI LIFTED
main: scope:[main] from @begin
to:main::@1
main::@1: scope:[main] from main main::@5
(byte) main::y#2 ← phi( main/(byte) 0 main::@5/(byte~) main::y#5 )
(byte) main::y#2 ← phi( main/(byte) 4 main::@5/(byte~) main::y#5 )
(byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@5/(byte~) main::e#6 )
(byte) main::x#2 ← phi( main/(byte) 0 main::@5/(byte~) main::x#5 )
(byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 main::@5/(byte*~) main::cursor#6 )
(byte) main::x#2 ← phi( main/(byte) 4 main::@5/(byte~) main::x#5 )
(byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 main::@5/(byte*~) main::cursor#6 )
*((byte*) main::cursor#3) ← (const byte) STAR#0
(byte) main::x#1 ← (byte) main::x#2 + (byte) 1
(byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1
@ -1268,10 +1268,10 @@ main: scope:[main] from @begin
[1] phi() [ ]
to:main::@1
main::@1: scope:[main] from main main::@5
[2] (byte) main::y#2 ← phi( main/(byte) 0 main::@5/(byte~) main::y#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::y#2 ← phi( main/(byte) 4 main::@5/(byte~) main::y#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@5/(byte~) main::e#6 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::x#2 ← phi( main/(byte) 0 main::@5/(byte~) main::x#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 main::@5/(byte*~) main::cursor#6 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::x#2 ← phi( main/(byte) 4 main::@5/(byte~) main::x#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 main::@5/(byte*~) main::cursor#6 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ]
[5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ]
@ -1339,10 +1339,10 @@ main: scope:[main] from @begin
[1] phi() [ ]
to:main::@1
main::@1: scope:[main] from main main::@2
[2] (byte) main::y#2 ← phi( main/(byte) 0 main::@2/(byte) main::y#4 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::y#2 ← phi( main/(byte) 4 main::@2/(byte) main::y#4 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::e#3 ← phi( main/(const byte) main::yd#0/(byte) 2 main::@2/(byte) main::e#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::x#2 ← phi( main/(byte) 0 main::@2/(byte) main::x#1 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 main::@2/(byte*) main::cursor#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte) main::x#2 ← phi( main/(byte) 4 main::@2/(byte) main::x#1 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[2] (byte*) main::cursor#3 ← phi( main/(const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 main::@2/(byte*) main::cursor#5 ) [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ]
[4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ]
[5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ]
@ -1444,28 +1444,28 @@ bend:
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label e = 5
.label y = 6
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::y#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- zpby1=coby1
lda #yd/$2
lda #yd/2
sta e
//SEG9 [2] phi (byte) main::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
lda #4
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 -- zpptrby1=cowo1
lda #<SCREEN+$0*$28+$0
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
jmp b1
//SEG11 [2] phi from main::@2 to main::@1
b1_from_b2:
@ -1477,7 +1477,7 @@ main: {
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
@ -1485,7 +1485,7 @@ main: {
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- zpby1=zpby1_plus_coby1
lda e
@ -1507,7 +1507,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- zpby1=zpby1_minus_coby1
lda e
@ -1525,7 +1525,7 @@ main: {
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1_from_b2
jmp breturn
//SEG32 main::@return
@ -1587,26 +1587,26 @@ bend:
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::y#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- xby=coby1
ldx #yd/$2
//SEG9 [2] phi (byte) main::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
ldx #yd/2
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
lda #4
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 -- zpptrby1=cowo1
lda #<SCREEN+$0*$28+$0
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
jmp b1
//SEG11 [2] phi from main::@2 to main::@1
b1_from_b2:
@ -1617,7 +1617,7 @@ main: {
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
@ -1625,7 +1625,7 @@ main: {
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- xby=xby_plus_coby1
txa
@ -1645,7 +1645,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- xby=xby_minus_coby1
txa
@ -1662,7 +1662,107 @@ main: {
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1_from_b2
//SEG32 main::@return
breturn:
//SEG33 [13] return [ ]
rts
}
Removing instruction lda #4
Succesful ASM optimization Pass5UnnecesaryLoadElimination
ASSEMBLER
//SEG0 Global Constants & labels
.const STAR = $51
.const SCREEN = $400
//SEG1 @begin
bbegin:
//SEG2 [0] call main param-assignment [ ]
//SEG3 [1] phi from @begin to main
main_from_bbegin:
jsr main
//SEG4 @end
bend:
//SEG5 main
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- xby=coby1
ldx #yd/2
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+4*$28+4
sta cursor+1
jmp b1
//SEG11 [2] phi from main::@2 to main::@1
b1_from_b2:
//SEG12 [2] phi (byte) main::y#2 = (byte) main::y#4 -- register_copy
//SEG13 [2] phi (byte) main::e#3 = (byte) main::e#5 -- register_copy
//SEG14 [2] phi (byte) main::x#2 = (byte) main::x#1 -- register_copy
//SEG15 [2] phi (byte*) main::cursor#3 = (byte*) main::cursor#5 -- register_copy
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
inc x
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- xby=xby_plus_coby1
txa
clc
adc #yd
tax
//SEG21 [7] if((const byte) main::xd#0>=(byte) main::e#1) goto main::@2 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- coby1_ge_xby_then_la1
cpx #xd
bcc b2_from_b1
//SEG22 main::@3
b3:
//SEG23 [8] (byte) main::y#1 ← (byte) main::y#2 + (byte) 1 [ main::x#1 main::cursor#1 main::e#1 main::y#1 ] -- zpby1=zpby1_plus_1
inc y
//SEG24 [9] (byte*) main::cursor#2 ← (byte*) main::cursor#1 + (byte) 40 [ main::x#1 main::e#1 main::y#1 main::cursor#2 ] -- zpptrby1=zpptrby1_plus_coby1
lda cursor
clc
adc #$28
sta cursor
bcc !+
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- xby=xby_minus_coby1
txa
sec
sbc #xd
tax
//SEG26 [11] phi from main::@1 main::@3 to main::@2
b2_from_b1:
b2_from_b3:
//SEG27 [11] phi (byte) main::y#4 = (byte) main::y#2 -- register_copy
//SEG28 [11] phi (byte) main::e#5 = (byte) main::e#1 -- register_copy
//SEG29 [11] phi (byte*) main::cursor#5 = (byte*) main::cursor#1 -- register_copy
//SEG30 main::@2
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+1
bcc b1_from_b2
//SEG32 main::@return
breturn:
@ -1692,26 +1792,25 @@ bend:
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::y#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- xby=coby1
ldx #yd/$2
//SEG9 [2] phi (byte) main::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
ldx #yd/2
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 -- zpptrby1=cowo1
lda #<SCREEN+$0*$28+$0
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
jmp b1
//SEG11 [2] phi from main::@2 to main::@1
//SEG12 [2] phi (byte) main::y#2 = (byte) main::y#4 -- register_copy
@ -1721,7 +1820,7 @@ main: {
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
@ -1729,7 +1828,7 @@ main: {
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- xby=xby_plus_coby1
txa
@ -1749,7 +1848,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- xby=xby_minus_coby1
txa
@ -1764,7 +1863,7 @@ main: {
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1
//SEG32 main::@return
breturn:
@ -1791,25 +1890,24 @@ ASSEMBLER
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::y#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- xby=coby1
ldx #yd/$2
//SEG9 [2] phi (byte) main::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
ldx #yd/2
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 -- zpptrby1=cowo1
lda #<SCREEN+$0*$28+$0
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
jmp b1
//SEG11 [2] phi from main::@2 to main::@1
//SEG12 [2] phi (byte) main::y#2 = (byte) main::y#4 -- register_copy
@ -1819,7 +1917,7 @@ main: {
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
@ -1827,7 +1925,7 @@ main: {
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- xby=xby_plus_coby1
txa
@ -1846,7 +1944,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- xby=xby_minus_coby1
txa
@ -1861,7 +1959,7 @@ main: {
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1
//SEG32 main::@return
//SEG33 [13] return [ ]
@ -1883,25 +1981,24 @@ ASSEMBLER
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::y#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- xby=coby1
ldx #yd/$2
//SEG9 [2] phi (byte) main::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
ldx #yd/2
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 -- zpptrby1=cowo1
lda #<SCREEN+$0*$28+$0
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
//SEG11 [2] phi from main::@2 to main::@1
//SEG12 [2] phi (byte) main::y#2 = (byte) main::y#4 -- register_copy
//SEG13 [2] phi (byte) main::e#3 = (byte) main::e#5 -- register_copy
@ -1910,7 +2007,7 @@ main: {
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
@ -1918,7 +2015,7 @@ main: {
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- xby=xby_plus_coby1
txa
@ -1937,7 +2034,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- xby=xby_minus_coby1
txa
@ -1952,7 +2049,7 @@ main: {
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1
//SEG32 main::@return
//SEG33 [13] return [ ]
@ -1988,7 +2085,7 @@ FINAL SYMBOL TABLE
(byte) main::x1
(const byte) main::x1#0 = (byte) 39
(byte) main::xd
(const byte) main::xd#0 = (const byte) main::x1#0-(byte) 0
(const byte) main::xd#0 = (const byte) main::x1#0-(byte) 4
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:5 7.333333333333333
(byte) main::y#2 y zp ZP_BYTE:5 5.5
@ -1997,7 +2094,7 @@ FINAL SYMBOL TABLE
(byte) main::y1
(const byte) main::y1#0 = (byte) 24
(byte) main::yd
(const byte) main::yd#0 = (const byte) main::y1#0-(byte) 0
(const byte) main::yd#0 = (const byte) main::y1#0-(byte) 4
zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ]
zp ZP_BYTE:4 [ main::x#2 main::x#1 ]
@ -2017,25 +2114,24 @@ FINAL CODE
main: {
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-4
.const yd = y1-4
.label x = 4
.label cursor = 2
.label y = 5
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::y#2 = (byte) 0 -- zpby1=coby1
lda #$0
//SEG7 [2] phi (byte) main::y#2 = (byte) 4 -- zpby1=coby1
lda #4
sta y
//SEG8 [2] phi (byte) main::e#3 = (const byte) main::yd#0/(byte) 2 -- xby=coby1
ldx #yd/$2
//SEG9 [2] phi (byte) main::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
ldx #yd/2
//SEG9 [2] phi (byte) main::x#2 = (byte) 4 -- zpby1=coby1
sta x
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 0*(byte) 40+(byte) 0 -- zpptrby1=cowo1
lda #<SCREEN+$0*$28+$0
//SEG10 [2] phi (byte*) main::cursor#3 = (const byte[1000]) SCREEN#0+(byte) 4*(byte) 40+(byte) 4 -- zpptrby1=cowo1
lda #<SCREEN+4*$28+4
sta cursor
lda #>SCREEN+$0*$28+$0
sta cursor+$1
lda #>SCREEN+4*$28+4
sta cursor+1
//SEG11 [2] phi from main::@2 to main::@1
//SEG12 [2] phi (byte) main::y#2 = (byte) main::y#4 -- register_copy
//SEG13 [2] phi (byte) main::e#3 = (byte) main::e#5 -- register_copy
@ -2044,7 +2140,7 @@ main: {
//SEG16 main::@1
b1:
//SEG17 [3] *((byte*) main::cursor#3) ← (const byte) STAR#0 [ main::cursor#3 main::x#2 main::e#3 main::y#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #STAR
sta (cursor),y
//SEG18 [4] (byte) main::x#1 ← (byte) main::x#2 + (byte) 1 [ main::cursor#3 main::e#3 main::y#2 main::x#1 ] -- zpby1=zpby1_plus_1
@ -2052,7 +2148,7 @@ main: {
//SEG19 [5] (byte*) main::cursor#1 ← (byte*) main::cursor#3 + (byte) 1 [ main::e#3 main::y#2 main::x#1 main::cursor#1 ] -- zpptrby1=zpptrby1_plus_1
inc cursor
bne !+
inc cursor+$1
inc cursor+1
!:
//SEG20 [6] (byte) main::e#1 ← (byte) main::e#3 + (const byte) main::yd#0 [ main::y#2 main::x#1 main::cursor#1 main::e#1 ] -- xby=xby_plus_coby1
txa
@ -2071,7 +2167,7 @@ main: {
adc #$28
sta cursor
bcc !+
inc cursor+$1
inc cursor+1
!:
//SEG25 [10] (byte) main::e#2 ← (byte) main::e#1 - (const byte) main::xd#0 [ main::x#1 main::y#1 main::cursor#2 main::e#2 ] -- xby=xby_minus_coby1
txa
@ -2086,7 +2182,7 @@ main: {
b2:
//SEG31 [12] if((byte) main::x#1<(const byte) main::x1#0+(byte) 1) goto main::@1 [ main::cursor#5 main::x#1 main::e#5 main::y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1
//SEG32 main::@return
//SEG33 [13] return [ ]

View File

@ -26,7 +26,7 @@
(byte) main::x1
(const byte) main::x1#0 = (byte) 39
(byte) main::xd
(const byte) main::xd#0 = (const byte) main::x1#0-(byte) 0
(const byte) main::xd#0 = (const byte) main::x1#0-(byte) 4
(byte) main::y
(byte) main::y#1 y zp ZP_BYTE:5 7.333333333333333
(byte) main::y#2 y zp ZP_BYTE:5 5.5
@ -35,7 +35,7 @@
(byte) main::y1
(const byte) main::y1#0 = (byte) 24
(byte) main::yd
(const byte) main::yd#0 = (const byte) main::y1#0-(byte) 0
(const byte) main::yd#0 = (const byte) main::y1#0-(byte) 4
zp ZP_PTR_BYTE:2 [ main::cursor#3 main::cursor#5 main::cursor#1 main::cursor#2 ]
zp ZP_BYTE:4 [ main::x#2 main::x#1 ]

View File

@ -2,33 +2,33 @@
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label idx = 2
.label y = 4
lda #$0
lda #0
sta y
ldy #yd/$2
ldx #$0
lda #$0+$0*$28
ldy #yd/2
ldx #0
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
inx
inc idx
bne !+
inc idx+$1
inc idx+1
!:
tya
clc
@ -42,12 +42,12 @@ b1:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
tya
sec
sbc #xd
tay
b2:
cpx #x1+$1
cpx #x1+1
bcc b1

View File

@ -1175,8 +1175,8 @@ INITIAL ASM
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label x = 4
.label idx = 2
.label e = 5
@ -1186,19 +1186,19 @@ bbegin:
//SEG2 [0] phi from @begin to @1
b1_from_bbegin:
//SEG3 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta y
//SEG4 [0] phi (byte) e#3 = (const byte) yd#0/(byte) 2 -- zpby1=coby1
lda #yd/$2
lda #yd/2
sta e
//SEG5 [0] phi (byte) x#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta x
//SEG6 [0] phi (word) idx#3 = (byte) 0+(byte) 0*(byte) 40 -- zpwo1=coby1
lda #$0+$0*$28
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
jmp b1
//SEG7 [0] phi from @2 to @1
b1_from_b2:
@ -1213,10 +1213,10 @@ b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
@ -1225,7 +1225,7 @@ b1:
//SEG15 [3] (word) idx#1 ← (word) idx#3 + (byte) 1 [ e#3 y#2 x#1 idx#1 ] -- zpwo1=zpwo1_plus_1
inc idx
bne !+
inc idx+$1
inc idx+1
!:
//SEG16 [4] (byte) e#1 ← (byte) e#3 + (const byte) yd#0 [ y#2 x#1 idx#1 e#1 ] -- zpby1=zpby1_plus_coby1
lda e
@ -1247,7 +1247,7 @@ b3:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
//SEG21 [8] (byte) e#2 ← (byte) e#1 - (const byte) xd#0 [ x#1 y#1 idx#2 e#2 ] -- zpby1=zpby1_minus_coby1
lda e
@ -1265,7 +1265,7 @@ b2_from_b3:
b2:
//SEG27 [10] if((byte) x#1<(const byte) x1#0+(byte) 1) goto @1 [ idx#5 x#1 e#5 y#4 ] -- zpby1_lt_coby1_then_la1
lda x
cmp #x1+$1
cmp #x1+1
bcc b1_from_b2
jmp bend
//SEG28 @end
@ -1306,8 +1306,8 @@ ASSEMBLER
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label idx = 2
.label y = 4
//SEG1 @begin
@ -1315,17 +1315,17 @@ bbegin:
//SEG2 [0] phi from @begin to @1
b1_from_bbegin:
//SEG3 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta y
//SEG4 [0] phi (byte) e#3 = (const byte) yd#0/(byte) 2 -- yby=coby1
ldy #yd/$2
ldy #yd/2
//SEG5 [0] phi (byte) x#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG6 [0] phi (word) idx#3 = (byte) 0+(byte) 0*(byte) 40 -- zpwo1=coby1
lda #$0+$0*$28
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
jmp b1
//SEG7 [0] phi from @2 to @1
b1_from_b2:
@ -1339,10 +1339,10 @@ b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
@ -1351,7 +1351,7 @@ b1:
//SEG15 [3] (word) idx#1 ← (word) idx#3 + (byte) 1 [ e#3 y#2 x#1 idx#1 ] -- zpwo1=zpwo1_plus_1
inc idx
bne !+
inc idx+$1
inc idx+1
!:
//SEG16 [4] (byte) e#1 ← (byte) e#3 + (const byte) yd#0 [ y#2 x#1 idx#1 e#1 ] -- yby=yby_plus_coby1
tya
@ -1371,7 +1371,7 @@ b3:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
//SEG21 [8] (byte) e#2 ← (byte) e#1 - (const byte) xd#0 [ x#1 y#1 idx#2 e#2 ] -- yby=yby_minus_coby1
tya
@ -1387,7 +1387,7 @@ b2_from_b3:
//SEG26 @2
b2:
//SEG27 [10] if((byte) x#1<(const byte) x1#0+(byte) 1) goto @1 [ idx#5 x#1 e#5 y#4 ] -- xby_lt_coby1_then_la1
cpx #x1+$1
cpx #x1+1
bcc b1_from_b2
//SEG28 @end
bend:
@ -1405,25 +1405,25 @@ ASSEMBLER
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label idx = 2
.label y = 4
//SEG1 @begin
bbegin:
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta y
//SEG4 [0] phi (byte) e#3 = (const byte) yd#0/(byte) 2 -- yby=coby1
ldy #yd/$2
ldy #yd/2
//SEG5 [0] phi (byte) x#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG6 [0] phi (word) idx#3 = (byte) 0+(byte) 0*(byte) 40 -- zpwo1=coby1
lda #$0+$0*$28
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
jmp b1
//SEG7 [0] phi from @2 to @1
//SEG8 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
@ -1436,10 +1436,10 @@ b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
@ -1448,7 +1448,7 @@ b1:
//SEG15 [3] (word) idx#1 ← (word) idx#3 + (byte) 1 [ e#3 y#2 x#1 idx#1 ] -- zpwo1=zpwo1_plus_1
inc idx
bne !+
inc idx+$1
inc idx+1
!:
//SEG16 [4] (byte) e#1 ← (byte) e#3 + (const byte) yd#0 [ y#2 x#1 idx#1 e#1 ] -- yby=yby_plus_coby1
tya
@ -1468,7 +1468,7 @@ b3:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
//SEG21 [8] (byte) e#2 ← (byte) e#1 - (const byte) xd#0 [ x#1 y#1 idx#2 e#2 ] -- yby=yby_minus_coby1
tya
@ -1482,7 +1482,7 @@ b3:
//SEG26 @2
b2:
//SEG27 [10] if((byte) x#1<(const byte) x1#0+(byte) 1) goto @1 [ idx#5 x#1 e#5 y#4 ] -- xby_lt_coby1_then_la1
cpx #x1+$1
cpx #x1+1
bcc b1
//SEG28 @end
bend:
@ -1497,24 +1497,24 @@ ASSEMBLER
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label idx = 2
.label y = 4
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta y
//SEG4 [0] phi (byte) e#3 = (const byte) yd#0/(byte) 2 -- yby=coby1
ldy #yd/$2
ldy #yd/2
//SEG5 [0] phi (byte) x#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG6 [0] phi (word) idx#3 = (byte) 0+(byte) 0*(byte) 40 -- zpwo1=coby1
lda #$0+$0*$28
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
jmp b1
//SEG7 [0] phi from @2 to @1
//SEG8 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
@ -1527,10 +1527,10 @@ b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
@ -1539,7 +1539,7 @@ b1:
//SEG15 [3] (word) idx#1 ← (word) idx#3 + (byte) 1 [ e#3 y#2 x#1 idx#1 ] -- zpwo1=zpwo1_plus_1
inc idx
bne !+
inc idx+$1
inc idx+1
!:
//SEG16 [4] (byte) e#1 ← (byte) e#3 + (const byte) yd#0 [ y#2 x#1 idx#1 e#1 ] -- yby=yby_plus_coby1
tya
@ -1558,7 +1558,7 @@ b1:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
//SEG21 [8] (byte) e#2 ← (byte) e#1 - (const byte) xd#0 [ x#1 y#1 idx#2 e#2 ] -- yby=yby_minus_coby1
tya
@ -1572,7 +1572,7 @@ b1:
//SEG26 @2
b2:
//SEG27 [10] if((byte) x#1<(const byte) x1#0+(byte) 1) goto @1 [ idx#5 x#1 e#5 y#4 ] -- xby_lt_coby1_then_la1
cpx #x1+$1
cpx #x1+1
bcc b1
//SEG28 @end
@ -1584,24 +1584,24 @@ ASSEMBLER
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label idx = 2
.label y = 4
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta y
//SEG4 [0] phi (byte) e#3 = (const byte) yd#0/(byte) 2 -- yby=coby1
ldy #yd/$2
ldy #yd/2
//SEG5 [0] phi (byte) x#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG6 [0] phi (word) idx#3 = (byte) 0+(byte) 0*(byte) 40 -- zpwo1=coby1
lda #$0+$0*$28
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
//SEG7 [0] phi from @2 to @1
//SEG8 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
//SEG9 [0] phi (byte) e#3 = (byte) e#5 -- register_copy
@ -1613,10 +1613,10 @@ b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
@ -1625,7 +1625,7 @@ b1:
//SEG15 [3] (word) idx#1 ← (word) idx#3 + (byte) 1 [ e#3 y#2 x#1 idx#1 ] -- zpwo1=zpwo1_plus_1
inc idx
bne !+
inc idx+$1
inc idx+1
!:
//SEG16 [4] (byte) e#1 ← (byte) e#3 + (const byte) yd#0 [ y#2 x#1 idx#1 e#1 ] -- yby=yby_plus_coby1
tya
@ -1644,7 +1644,7 @@ b1:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
//SEG21 [8] (byte) e#2 ← (byte) e#1 - (const byte) xd#0 [ x#1 y#1 idx#2 e#2 ] -- yby=yby_minus_coby1
tya
@ -1658,7 +1658,7 @@ b1:
//SEG26 @2
b2:
//SEG27 [10] if((byte) x#1<(const byte) x1#0+(byte) 1) goto @1 [ idx#5 x#1 e#5 y#4 ] -- xby_lt_coby1_then_la1
cpx #x1+$1
cpx #x1+1
bcc b1
//SEG28 @end
@ -1711,24 +1711,24 @@ FINAL CODE
.const screen = $400
.const x1 = $27
.const y1 = $18
.const xd = x1-$0
.const yd = y1-$0
.const xd = x1-0
.const yd = y1-0
.label idx = 2
.label y = 4
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta y
//SEG4 [0] phi (byte) e#3 = (const byte) yd#0/(byte) 2 -- yby=coby1
ldy #yd/$2
ldy #yd/2
//SEG5 [0] phi (byte) x#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG6 [0] phi (word) idx#3 = (byte) 0+(byte) 0*(byte) 40 -- zpwo1=coby1
lda #$0+$0*$28
lda #0+0*$28
sta idx
lda #$0
sta idx+$1
lda #0
sta idx+1
//SEG7 [0] phi from @2 to @1
//SEG8 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
//SEG9 [0] phi (byte) e#3 = (byte) e#5 -- register_copy
@ -1740,10 +1740,10 @@ b1:
lda #<screen
clc
adc idx
sta !s++$1
sta !s++1
lda #>screen
adc idx+$1
sta !s++$2
adc idx+1
sta !s++2
lda #STAR
!s:
sta screen
@ -1752,7 +1752,7 @@ b1:
//SEG15 [3] (word) idx#1 ← (word) idx#3 + (byte) 1 [ e#3 y#2 x#1 idx#1 ] -- zpwo1=zpwo1_plus_1
inc idx
bne !+
inc idx+$1
inc idx+1
!:
//SEG16 [4] (byte) e#1 ← (byte) e#3 + (const byte) yd#0 [ y#2 x#1 idx#1 e#1 ] -- yby=yby_plus_coby1
tya
@ -1771,7 +1771,7 @@ b1:
adc #<$28
sta idx
bcc !+
inc idx+$1
inc idx+1
!:
//SEG21 [8] (byte) e#2 ← (byte) e#1 - (const byte) xd#0 [ x#1 y#1 idx#2 e#2 ] -- yby=yby_minus_coby1
tya
@ -1785,7 +1785,7 @@ b1:
//SEG26 @2
b2:
//SEG27 [10] if((byte) x#1<(const byte) x1#0+(byte) 1) goto @1 [ idx#5 x#1 e#5 y#4 ] -- xby_lt_coby1_then_la1
cpx #x1+$1
cpx #x1+1
bcc b1
//SEG28 @end

View File

@ -1,8 +1,8 @@
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
jsr main
main: {
lda #STAR
@ -11,7 +11,7 @@ main: {
sta BGCOL
ldx #$28
b1:
lda #STAR+$1
lda #STAR+1
sta SCREEN,x
inx
cpx #$50

View File

@ -644,8 +644,8 @@ INITIAL ASM
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
//SEG1 @begin
bbegin:
//SEG2 [0] call main param-assignment [ ]
@ -675,7 +675,7 @@ main: {
//SEG11 main::@1
b1:
//SEG12 [4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) STAR#0+(byte) 1 [ main::i#2 ] -- cowo1_staridx_zpby1=coby2
lda #STAR+$1
lda #STAR+1
ldx i
sta SCREEN,x
//SEG13 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- zpby1=_inc_zpby1
@ -716,8 +716,8 @@ ASSEMBLER
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
//SEG1 @begin
bbegin:
//SEG2 [0] call main param-assignment [ ]
@ -743,7 +743,7 @@ main: {
//SEG11 main::@1
b1:
//SEG12 [4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) STAR#0+(byte) 1 [ main::i#2 ] -- cowo1_staridx_xby=coby2
lda #STAR+$1
lda #STAR+1
sta SCREEN,x
//SEG13 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
@ -764,8 +764,8 @@ ASSEMBLER
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
//SEG1 @begin
bbegin:
//SEG2 [0] call main param-assignment [ ]
@ -790,7 +790,7 @@ main: {
//SEG11 main::@1
b1:
//SEG12 [4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) STAR#0+(byte) 1 [ main::i#2 ] -- cowo1_staridx_xby=coby2
lda #STAR+$1
lda #STAR+1
sta SCREEN,x
//SEG13 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
@ -813,8 +813,8 @@ ASSEMBLER
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
//SEG1 @begin
//SEG2 [0] call main param-assignment [ ]
jsr main
@ -836,7 +836,7 @@ main: {
//SEG11 main::@1
b1:
//SEG12 [4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) STAR#0+(byte) 1 [ main::i#2 ] -- cowo1_staridx_xby=coby2
lda #STAR+$1
lda #STAR+1
sta SCREEN,x
//SEG13 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
@ -855,8 +855,8 @@ ASSEMBLER
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
//SEG1 @begin
//SEG2 [0] call main param-assignment [ ]
jsr main
@ -877,7 +877,7 @@ main: {
//SEG11 main::@1
b1:
//SEG12 [4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) STAR#0+(byte) 1 [ main::i#2 ] -- cowo1_staridx_xby=coby2
lda #STAR+$1
lda #STAR+1
sta SCREEN,x
//SEG13 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
@ -916,8 +916,8 @@ FINAL CODE
.const SCREEN = $400
.const STAR = $51
.const VIC = $d000
.const RED = $2
.const BGCOL = VIC+$10*$2+$1
.const RED = 2
.const BGCOL = VIC+$10*2+1
//SEG1 @begin
//SEG2 [0] call main param-assignment [ ]
jsr main
@ -938,7 +938,7 @@ main: {
//SEG11 main::@1
b1:
//SEG12 [4] *((const byte*) SCREEN#0 + (byte) main::i#2) ← (const byte) STAR#0+(byte) 1 [ main::i#2 ] -- cowo1_staridx_xby=coby2
lda #STAR+$1
lda #STAR+1
sta SCREEN,x
//SEG13 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx

View File

@ -1,16 +1,16 @@
.const fibs = $1100
jsr main
main: {
lda #$0
sta fibs+$0
lda #$1
sta fibs+$1
ldx #$0
lda #0
sta fibs+0
lda #1
sta fibs+1
ldx #0
b1:
lda fibs,x
clc
adc fibs+$1,x
sta fibs+$2,x
adc fibs+1,x
sta fibs+2,x
inx
cpx #$f
bcc b1

View File

@ -645,15 +645,15 @@ main: {
.label _4 = 5
.label i = 2
//SEG5 [1] *((const byte[15]) fibs#0+(byte) 0) ← (byte) 0 [ ] -- _star_cowo1=coby2
lda #$0
sta fibs+$0
lda #0
sta fibs+0
//SEG6 [2] *((const byte[15]) fibs#0+(byte) 1) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
sta fibs+$1
lda #1
sta fibs+1
//SEG7 [3] phi from main to main::@1
b1_from_main:
//SEG8 [3] phi (byte) main::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG9 [3] phi from main::@1 to main::@1
@ -668,7 +668,7 @@ main: {
sta _1
//SEG13 [5] (byte~) main::$3 ← (const byte[15]) fibs#0+(byte) 1 *idx (byte) main::i#2 [ main::i#2 main::$1 main::$3 ] -- zpby1=cowo1_staridx_zpby2
ldx i
lda fibs+$1,x
lda fibs+1,x
sta _3
//SEG14 [6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ] -- zpby1=zpby2_plus_zpby3
lda _1
@ -678,7 +678,7 @@ main: {
//SEG15 [7] *((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ] -- cowo1_staridx_zpby1=zpby2
lda _4
ldx i
sta fibs+$2,x
sta fibs+2,x
//SEG16 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- zpby1=_inc_zpby1
inc i
//SEG17 [9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ] -- zpby1_lt_coby1_then_la1
@ -763,15 +763,15 @@ bend:
//SEG4 main
main: {
//SEG5 [1] *((const byte[15]) fibs#0+(byte) 0) ← (byte) 0 [ ] -- _star_cowo1=coby2
lda #$0
sta fibs+$0
lda #0
sta fibs+0
//SEG6 [2] *((const byte[15]) fibs#0+(byte) 1) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
sta fibs+$1
lda #1
sta fibs+1
//SEG7 [3] phi from main to main::@1
b1_from_main:
//SEG8 [3] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [3] phi from main::@1 to main::@1
b1_from_b1:
@ -784,9 +784,9 @@ main: {
// [5] main::$3 ← fibs#0+1 *idx main::i#2 // ALU
//SEG14 [6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ] -- aby=aby_plus_cowo1_staridx_xby
clc
adc fibs+$1,x
adc fibs+1,x
//SEG15 [7] *((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ] -- cowo1_staridx_xby=aby
sta fibs+$2,x
sta fibs+2,x
//SEG16 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG17 [9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ] -- xby_lt_coby1_then_la1
@ -813,15 +813,15 @@ bend:
//SEG4 main
main: {
//SEG5 [1] *((const byte[15]) fibs#0+(byte) 0) ← (byte) 0 [ ] -- _star_cowo1=coby2
lda #$0
sta fibs+$0
lda #0
sta fibs+0
//SEG6 [2] *((const byte[15]) fibs#0+(byte) 1) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
sta fibs+$1
lda #1
sta fibs+1
//SEG7 [3] phi from main to main::@1
b1_from_main:
//SEG8 [3] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [3] phi from main::@1 to main::@1
//SEG10 [3] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -833,9 +833,9 @@ main: {
// [5] main::$3 ← fibs#0+1 *idx main::i#2 // ALU
//SEG14 [6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ] -- aby=aby_plus_cowo1_staridx_xby
clc
adc fibs+$1,x
adc fibs+1,x
//SEG15 [7] *((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ] -- cowo1_staridx_xby=aby
sta fibs+$2,x
sta fibs+2,x
//SEG16 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG17 [9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ] -- xby_lt_coby1_then_la1
@ -862,14 +862,14 @@ ASSEMBLER
//SEG4 main
main: {
//SEG5 [1] *((const byte[15]) fibs#0+(byte) 0) ← (byte) 0 [ ] -- _star_cowo1=coby2
lda #$0
sta fibs+$0
lda #0
sta fibs+0
//SEG6 [2] *((const byte[15]) fibs#0+(byte) 1) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
sta fibs+$1
lda #1
sta fibs+1
//SEG7 [3] phi from main to main::@1
//SEG8 [3] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [3] phi from main::@1 to main::@1
//SEG10 [3] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -881,9 +881,9 @@ main: {
// [5] main::$3 ← fibs#0+1 *idx main::i#2 // ALU
//SEG14 [6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ] -- aby=aby_plus_cowo1_staridx_xby
clc
adc fibs+$1,x
adc fibs+1,x
//SEG15 [7] *((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ] -- cowo1_staridx_xby=aby
sta fibs+$2,x
sta fibs+2,x
//SEG16 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG17 [9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ] -- xby_lt_coby1_then_la1
@ -906,14 +906,14 @@ ASSEMBLER
//SEG4 main
main: {
//SEG5 [1] *((const byte[15]) fibs#0+(byte) 0) ← (byte) 0 [ ] -- _star_cowo1=coby2
lda #$0
sta fibs+$0
lda #0
sta fibs+0
//SEG6 [2] *((const byte[15]) fibs#0+(byte) 1) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
sta fibs+$1
lda #1
sta fibs+1
//SEG7 [3] phi from main to main::@1
//SEG8 [3] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG9 [3] phi from main::@1 to main::@1
//SEG10 [3] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG11 main::@1
@ -924,9 +924,9 @@ main: {
// [5] main::$3 ← fibs#0+1 *idx main::i#2 // ALU
//SEG14 [6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ] -- aby=aby_plus_cowo1_staridx_xby
clc
adc fibs+$1,x
adc fibs+1,x
//SEG15 [7] *((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ] -- cowo1_staridx_xby=aby
sta fibs+$2,x
sta fibs+2,x
//SEG16 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG17 [9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ] -- xby_lt_coby1_then_la1
@ -967,14 +967,14 @@ FINAL CODE
//SEG4 main
main: {
//SEG5 [1] *((const byte[15]) fibs#0+(byte) 0) ← (byte) 0 [ ] -- _star_cowo1=coby2
lda #$0
sta fibs+$0
lda #0
sta fibs+0
//SEG6 [2] *((const byte[15]) fibs#0+(byte) 1) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
sta fibs+$1
lda #1
sta fibs+1
//SEG7 [3] phi from main to main::@1
//SEG8 [3] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG9 [3] phi from main::@1 to main::@1
//SEG10 [3] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG11 main::@1
@ -985,9 +985,9 @@ main: {
// [5] main::$3 ← fibs#0+1 *idx main::i#2 // ALU
//SEG14 [6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ] -- aby=aby_plus_cowo1_staridx_xby
clc
adc fibs+$1,x
adc fibs+1,x
//SEG15 [7] *((const byte[15]) fibs#0+(byte) 2 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ] -- cowo1_staridx_xby=aby
sta fibs+$2,x
sta fibs+2,x
//SEG16 [8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG17 [9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ] -- xby_lt_coby1_then_la1

View File

@ -16,7 +16,7 @@ main: {
cmp #$ff
bne b4
dex
cpx #$0
cpx #0
bne b3
jsr flip
jsr plot
@ -28,13 +28,13 @@ plot: {
.label y = 4
lda #$10
sta y
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
ldx #$0
lda #>SCREEN+5*$28+$c
sta line+1
ldx #0
b1:
ldy #$0
ldy #0
b2:
lda buffer1,x
sta (line),y
@ -47,7 +47,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
dec y
lda y
@ -60,7 +60,7 @@ flip: {
lda #$10
sta r
ldy #$f
ldx #$0
ldx #0
b1:
lda #$10
sta c
@ -79,22 +79,22 @@ flip: {
dec r
lda r
bne b1
ldx #$0
ldx #0
b3:
lda buffer2,x
sta buffer1,x
inx
cpx #$0
cpx #0
bne b3
rts
}
prepare: {
ldx #$0
ldx #0
b1:
txa
sta buffer1,x
inx
cpx #$0
cpx #0
bne b1
rts
}

View File

@ -4380,12 +4380,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG37 [15] phi from plot::@3 to plot::@1
@ -4399,7 +4399,7 @@ plot: {
//SEG42 [16] phi from plot::@1 to plot::@2
b2_from_b1:
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta x
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
jmp b2
@ -4435,7 +4435,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -4466,7 +4466,7 @@ flip: {
lda #$f
sta dstIdx
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta srcIdx
jmp b1
//SEG65 [27] phi from flip::@4 to flip::@1
@ -4526,7 +4526,7 @@ flip: {
//SEG89 [38] phi from flip::@4 to flip::@3
b3_from_b4:
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b3
//SEG91 [38] phi from flip::@3 to flip::@3
@ -4560,7 +4560,7 @@ prepare: {
//SEG101 [45] phi from prepare to prepare::@1
b1_from_prepare:
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG103 [45] phi from prepare::@1 to prepare::@1
@ -4705,7 +4705,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3_from_b6
//SEG22 main::@7
b7:
@ -4738,12 +4738,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG37 [15] phi from plot::@3 to plot::@1
b1_from_b3:
@ -4755,7 +4755,7 @@ plot: {
//SEG42 [16] phi from plot::@1 to plot::@2
b2_from_b1:
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
jmp b2
//SEG45 [16] phi from plot::@2 to plot::@2
@ -4783,7 +4783,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -4807,7 +4807,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG65 [27] phi from flip::@4 to flip::@1
b1_from_b4:
@ -4859,7 +4859,7 @@ flip: {
//SEG89 [38] phi from flip::@4 to flip::@3
b3_from_b4:
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b3
//SEG91 [38] phi from flip::@3 to flip::@3
b3_from_b3:
@ -4873,7 +4873,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3_from_b3
//SEG98 flip::@return
breturn:
@ -4885,7 +4885,7 @@ prepare: {
//SEG101 [45] phi from prepare to prepare::@1
b1_from_prepare:
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG103 [45] phi from prepare::@1 to prepare::@1
b1_from_b1:
@ -4898,7 +4898,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1_from_b1
//SEG109 prepare::@return
breturn:
@ -4975,7 +4975,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG22 main::@7
b7:
@ -5006,12 +5006,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG37 [15] phi from plot::@3 to plot::@1
//SEG38 [15] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy
@ -5021,7 +5021,7 @@ plot: {
b1:
//SEG42 [16] phi from plot::@1 to plot::@2
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
jmp b2
//SEG45 [16] phi from plot::@2 to plot::@2
@ -5048,7 +5048,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -5072,7 +5072,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG65 [27] phi from flip::@4 to flip::@1
//SEG66 [27] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy
@ -5121,7 +5121,7 @@ flip: {
//SEG89 [38] phi from flip::@4 to flip::@3
b3_from_b4:
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b3
//SEG91 [38] phi from flip::@3 to flip::@3
//SEG92 [38] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy
@ -5134,7 +5134,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG98 flip::@return
breturn:
@ -5146,7 +5146,7 @@ prepare: {
//SEG101 [45] phi from prepare to prepare::@1
b1_from_prepare:
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG103 [45] phi from prepare::@1 to prepare::@1
//SEG104 [45] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy
@ -5158,7 +5158,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG109 prepare::@return
breturn:
@ -5228,7 +5228,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG22 main::@7
//SEG23 [10] call flip param-assignment [ ]
@ -5254,12 +5254,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG37 [15] phi from plot::@3 to plot::@1
//SEG38 [15] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy
@ -5269,7 +5269,7 @@ plot: {
b1:
//SEG42 [16] phi from plot::@1 to plot::@2
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
jmp b2
//SEG45 [16] phi from plot::@2 to plot::@2
@ -5295,7 +5295,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -5317,7 +5317,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG65 [27] phi from flip::@4 to flip::@1
//SEG66 [27] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy
@ -5364,7 +5364,7 @@ flip: {
bne b1
//SEG89 [38] phi from flip::@4 to flip::@3
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b3
//SEG91 [38] phi from flip::@3 to flip::@3
//SEG92 [38] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy
@ -5377,7 +5377,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG98 flip::@return
//SEG99 [43] return [ ]
@ -5387,7 +5387,7 @@ flip: {
prepare: {
//SEG101 [45] phi from prepare to prepare::@1
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG103 [45] phi from prepare::@1 to prepare::@1
//SEG104 [45] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy
@ -5399,7 +5399,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG109 prepare::@return
//SEG110 [49] return [ ]
@ -5457,7 +5457,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG22 main::@7
//SEG23 [10] call flip param-assignment [ ]
@ -5483,12 +5483,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG37 [15] phi from plot::@3 to plot::@1
//SEG38 [15] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy
//SEG39 [15] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy
@ -5497,7 +5497,7 @@ plot: {
b1:
//SEG42 [16] phi from plot::@1 to plot::@2
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
//SEG45 [16] phi from plot::@2 to plot::@2
//SEG46 [16] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy
@ -5522,7 +5522,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -5544,7 +5544,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG65 [27] phi from flip::@4 to flip::@1
//SEG66 [27] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy
//SEG67 [27] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy
@ -5589,7 +5589,7 @@ flip: {
bne b1
//SEG89 [38] phi from flip::@4 to flip::@3
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG91 [38] phi from flip::@3 to flip::@3
//SEG92 [38] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy
//SEG93 flip::@3
@ -5601,7 +5601,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG98 flip::@return
//SEG99 [43] return [ ]
@ -5611,7 +5611,7 @@ flip: {
prepare: {
//SEG101 [45] phi from prepare to prepare::@1
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG103 [45] phi from prepare::@1 to prepare::@1
//SEG104 [45] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy
//SEG105 prepare::@1
@ -5622,7 +5622,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG109 prepare::@return
//SEG110 [49] return [ ]
@ -5674,7 +5674,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG22 main::@7
//SEG23 [10] call flip param-assignment [ ]
@ -5700,12 +5700,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG37 [15] phi from plot::@3 to plot::@1
//SEG38 [15] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy
//SEG39 [15] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy
@ -5714,7 +5714,7 @@ plot: {
b1:
//SEG42 [16] phi from plot::@1 to plot::@2
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
//SEG45 [16] phi from plot::@2 to plot::@2
//SEG46 [16] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy
@ -5739,7 +5739,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -5761,7 +5761,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG65 [27] phi from flip::@4 to flip::@1
//SEG66 [27] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy
//SEG67 [27] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy
@ -5806,7 +5806,7 @@ flip: {
bne b1
//SEG89 [38] phi from flip::@4 to flip::@3
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG91 [38] phi from flip::@3 to flip::@3
//SEG92 [38] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy
//SEG93 flip::@3
@ -5818,7 +5818,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG98 flip::@return
//SEG99 [43] return [ ]
@ -5828,7 +5828,7 @@ flip: {
prepare: {
//SEG101 [45] phi from prepare to prepare::@1
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG103 [45] phi from prepare::@1 to prepare::@1
//SEG104 [45] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy
//SEG105 prepare::@1
@ -5839,7 +5839,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG109 prepare::@return
//SEG110 [49] return [ ]
@ -5889,7 +5889,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG22 main::@7
//SEG23 [10] call flip param-assignment [ ]
@ -5915,12 +5915,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG37 [15] phi from plot::@3 to plot::@1
//SEG38 [15] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy
//SEG39 [15] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy
@ -5929,7 +5929,7 @@ plot: {
b1:
//SEG42 [16] phi from plot::@1 to plot::@2
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
//SEG45 [16] phi from plot::@2 to plot::@2
//SEG46 [16] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy
@ -5954,7 +5954,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -5976,7 +5976,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG65 [27] phi from flip::@4 to flip::@1
//SEG66 [27] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy
//SEG67 [27] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy
@ -6021,7 +6021,7 @@ flip: {
bne b1
//SEG89 [38] phi from flip::@4 to flip::@3
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG91 [38] phi from flip::@3 to flip::@3
//SEG92 [38] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy
//SEG93 flip::@3
@ -6033,7 +6033,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG98 flip::@return
//SEG99 [43] return [ ]
@ -6043,7 +6043,7 @@ flip: {
prepare: {
//SEG101 [45] phi from prepare to prepare::@1
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG103 [45] phi from prepare::@1 to prepare::@1
//SEG104 [45] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy
//SEG105 prepare::@1
@ -6054,7 +6054,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG109 prepare::@return
//SEG110 [49] return [ ]
@ -6194,7 +6194,7 @@ main: {
//SEG20 [8] (byte) main::c#1 ← -- (byte) main::c#2 [ main::c#1 ] -- xby=_dec_xby
dex
//SEG21 [9] if((byte) main::c#1!=(byte) 0) goto main::@3 [ main::c#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG22 main::@7
//SEG23 [10] call flip param-assignment [ ]
@ -6220,12 +6220,12 @@ plot: {
lda #$10
sta y
//SEG35 [15] phi (byte*) plot::line#2 = (const byte[1000]) SCREEN#0+(byte) 5*(byte) 40+(byte) 12 -- zpptrby1=cowo1
lda #<SCREEN+$5*$28+$c
lda #<SCREEN+5*$28+$c
sta line
lda #>SCREEN+$5*$28+$c
sta line+$1
lda #>SCREEN+5*$28+$c
sta line+1
//SEG36 [15] phi (byte) plot::i#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG37 [15] phi from plot::@3 to plot::@1
//SEG38 [15] phi (byte) plot::y#2 = (byte) plot::y#1 -- register_copy
//SEG39 [15] phi (byte*) plot::line#2 = (byte*) plot::line#1 -- register_copy
@ -6234,7 +6234,7 @@ plot: {
b1:
//SEG42 [16] phi from plot::@1 to plot::@2
//SEG43 [16] phi (byte) plot::x#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG44 [16] phi (byte) plot::i#2 = (byte) plot::i#3 -- register_copy
//SEG45 [16] phi from plot::@2 to plot::@2
//SEG46 [16] phi (byte) plot::x#2 = (byte) plot::x#1 -- register_copy
@ -6259,7 +6259,7 @@ plot: {
adc #$28
sta line
bcc !+
inc line+$1
inc line+1
!:
//SEG56 [23] (byte) plot::y#1 ← -- (byte) plot::y#2 [ plot::i#1 plot::line#1 plot::y#1 ] -- zpby1=_dec_zpby1
dec y
@ -6281,7 +6281,7 @@ flip: {
//SEG63 [27] phi (byte) flip::dstIdx#5 = (byte) 15 -- yby=coby1
ldy #$f
//SEG64 [27] phi (byte) flip::srcIdx#3 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG65 [27] phi from flip::@4 to flip::@1
//SEG66 [27] phi (byte) flip::r#2 = (byte) flip::r#1 -- register_copy
//SEG67 [27] phi (byte) flip::dstIdx#5 = (byte) flip::dstIdx#2 -- register_copy
@ -6326,7 +6326,7 @@ flip: {
bne b1
//SEG89 [38] phi from flip::@4 to flip::@3
//SEG90 [38] phi (byte) flip::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG91 [38] phi from flip::@3 to flip::@3
//SEG92 [38] phi (byte) flip::i#2 = (byte) flip::i#1 -- register_copy
//SEG93 flip::@3
@ -6338,7 +6338,7 @@ flip: {
//SEG96 [41] (byte) flip::i#1 ← ++ (byte) flip::i#2 [ flip::i#1 ] -- xby=_inc_xby
inx
//SEG97 [42] if((byte) flip::i#1!=(byte) 0) goto flip::@3 [ flip::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b3
//SEG98 flip::@return
//SEG99 [43] return [ ]
@ -6348,7 +6348,7 @@ flip: {
prepare: {
//SEG101 [45] phi from prepare to prepare::@1
//SEG102 [45] phi (byte) prepare::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG103 [45] phi from prepare::@1 to prepare::@1
//SEG104 [45] phi (byte) prepare::i#2 = (byte) prepare::i#1 -- register_copy
//SEG105 prepare::@1
@ -6359,7 +6359,7 @@ prepare: {
//SEG107 [47] (byte) prepare::i#1 ← ++ (byte) prepare::i#2 [ prepare::i#1 ] -- xby=_inc_xby
inx
//SEG108 [48] if((byte) prepare::i#1!=(byte) 0) goto prepare::@1 [ prepare::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG109 prepare::@return
//SEG110 [49] return [ ]

View File

@ -1,7 +1,7 @@
.const SCREEN = $400
jsr main
main: {
ldx #$0
ldx #0
b1:
txa
sta SCREEN,x

View File

@ -498,7 +498,7 @@ main: {
//SEG7 [2] phi from main to main::@1
b1_from_main:
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
@ -556,7 +556,7 @@ main: {
//SEG7 [2] phi from main to main::@1
b1_from_main:
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
b1_from_b1:
@ -598,7 +598,7 @@ main: {
//SEG7 [2] phi from main to main::@1
b1_from_main:
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -636,7 +636,7 @@ ASSEMBLER
main: {
//SEG7 [2] phi from main to main::@1
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -670,7 +670,7 @@ ASSEMBLER
main: {
//SEG7 [2] phi from main to main::@1
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG11 main::@1
@ -716,7 +716,7 @@ FINAL CODE
main: {
//SEG7 [2] phi from main to main::@1
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG11 main::@1

View File

@ -2,12 +2,12 @@
.const SCREEN2 = $500
jsr main
main: {
ldx #$0
ldx #0
b1:
txa
sta SCREEN1,x
inx
cpx #$0
cpx #0
bne b1
ldx #$64
b2:

View File

@ -789,7 +789,7 @@ main: {
//SEG7 [2] phi from main to main::@1
b1_from_main:
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
@ -871,7 +871,7 @@ main: {
//SEG7 [2] phi from main to main::@1
b1_from_main:
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
b1_from_b1:
@ -884,7 +884,7 @@ main: {
//SEG13 [4] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG14 [5] if((byte) main::i#1!=(byte) 0) goto main::@1 [ main::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1_from_b1
//SEG15 [6] phi from main::@1 to main::@2
b2_from_b1:
@ -934,7 +934,7 @@ main: {
//SEG7 [2] phi from main to main::@1
b1_from_main:
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -946,7 +946,7 @@ main: {
//SEG13 [4] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG14 [5] if((byte) main::i#1!=(byte) 0) goto main::@1 [ main::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG15 [6] phi from main::@1 to main::@2
b2_from_b1:
@ -991,7 +991,7 @@ ASSEMBLER
main: {
//SEG7 [2] phi from main to main::@1
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -1003,7 +1003,7 @@ main: {
//SEG13 [4] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG14 [5] if((byte) main::i#1!=(byte) 0) goto main::@1 [ main::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG15 [6] phi from main::@1 to main::@2
//SEG16 [6] phi (byte) main::j#2 = (byte) 100 -- xby=coby1
@ -1043,7 +1043,7 @@ ASSEMBLER
main: {
//SEG7 [2] phi from main to main::@1
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG11 main::@1
@ -1054,7 +1054,7 @@ main: {
//SEG13 [4] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG14 [5] if((byte) main::i#1!=(byte) 0) goto main::@1 [ main::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG15 [6] phi from main::@1 to main::@2
//SEG16 [6] phi (byte) main::j#2 = (byte) 100 -- xby=coby1
@ -1112,7 +1112,7 @@ FINAL CODE
main: {
//SEG7 [2] phi from main to main::@1
//SEG8 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG9 [2] phi from main::@1 to main::@1
//SEG10 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG11 main::@1
@ -1123,7 +1123,7 @@ main: {
//SEG13 [4] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG14 [5] if((byte) main::i#1!=(byte) 0) goto main::@1 [ main::i#1 ] -- xby_neq_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG15 [6] phi from main::@1 to main::@2
//SEG16 [6] phi (byte) main::j#2 = (byte) 100 -- xby=coby1

View File

@ -1,7 +1,7 @@
.const SCREEN = $400
jsr main
main: {
ldx #$0
ldx #0
b1:
cpx #$32
bcs b2

View File

@ -648,7 +648,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG8 [2] phi from main::@2 to main::@1
@ -714,7 +714,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG8 [2] phi from main::@2 to main::@1
b1_from_b2:
@ -760,7 +760,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG8 [2] phi from main::@2 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -804,7 +804,7 @@ ASSEMBLER
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jmp b1
//SEG8 [2] phi from main::@2 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -842,7 +842,7 @@ ASSEMBLER
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG8 [2] phi from main::@2 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG10 main::@1
@ -893,7 +893,7 @@ FINAL CODE
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
//SEG8 [2] phi from main::@2 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG10 main::@1

View File

@ -1,10 +1,10 @@
jsr main
main: {
.label a = 2
ldx #$0
ldx #0
jsr inc
clc
adc #$4
adc #4
sta a
jsr inc
clc
@ -14,7 +14,7 @@ main: {
inc: {
txa
clc
adc #$7
adc #7
tax
txa
rts

View File

@ -684,7 +684,7 @@ main: {
//SEG7 [9] phi from main to inc
inc_from_main:
//SEG8 [9] phi (byte) i#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jsr inc
jmp b1
@ -694,7 +694,7 @@ main: {
lda inc.return
sta _0
//SEG11 [4] (byte) main::a#1 ← (byte) 4 + (byte~) main::$0 [ main::a#1 inc::$0 ] -- zpby1=coby1_plus_zpby2
lda #$4
lda #4
clc
adc _0
sta a
@ -727,7 +727,7 @@ inc: {
//SEG21 [10] (byte~) inc::$0 ← (byte) i#11 + (byte) 7 [ inc::$0 ] -- zpby1=zpby1_plus_coby1
lda _0
clc
adc #$7
adc #7
sta _0
//SEG22 [11] (byte) inc::return#0 ← (byte~) inc::$0 [ inc::return#0 inc::$0 ] -- zpby1=zpby2
lda _0
@ -787,7 +787,7 @@ main: {
//SEG7 [9] phi from main to inc
inc_from_main:
//SEG8 [9] phi (byte) i#11 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inc
//SEG9 main::@1
b1:
@ -795,7 +795,7 @@ main: {
// (byte~) main::$0 = (byte) inc::return#0 // register copy reg byte a
//SEG11 [4] (byte) main::a#1 ← (byte) 4 + (byte~) main::$0 [ main::a#1 inc::$0 ] -- zpby1=coby1_plus_aby
clc
adc #$4
adc #4
sta a
//SEG12 [5] call inc param-assignment [ inc::return#0 main::a#1 ]
//SEG13 [9] phi from main::@1 to inc
@ -819,7 +819,7 @@ inc: {
//SEG21 [10] (byte~) inc::$0 ← (byte) i#11 + (byte) 7 [ inc::$0 ] -- xby=xby_plus_coby1
txa
clc
adc #$7
adc #7
tax
//SEG22 [11] (byte) inc::return#0 ← (byte~) inc::$0 [ inc::return#0 inc::$0 ] -- aby=xby
txa
@ -847,7 +847,7 @@ main: {
//SEG7 [9] phi from main to inc
inc_from_main:
//SEG8 [9] phi (byte) i#11 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inc
//SEG9 main::@1
b1:
@ -855,7 +855,7 @@ main: {
// (byte~) main::$0 = (byte) inc::return#0 // register copy reg byte a
//SEG11 [4] (byte) main::a#1 ← (byte) 4 + (byte~) main::$0 [ main::a#1 inc::$0 ] -- zpby1=coby1_plus_aby
clc
adc #$4
adc #4
sta a
//SEG12 [5] call inc param-assignment [ inc::return#0 main::a#1 ]
//SEG13 [9] phi from main::@1 to inc
@ -879,7 +879,7 @@ inc: {
//SEG21 [10] (byte~) inc::$0 ← (byte) i#11 + (byte) 7 [ inc::$0 ] -- xby=xby_plus_coby1
txa
clc
adc #$7
adc #7
tax
//SEG22 [11] (byte) inc::return#0 ← (byte~) inc::$0 [ inc::return#0 inc::$0 ] -- aby=xby
txa
@ -911,14 +911,14 @@ main: {
//SEG6 [2] call inc param-assignment [ inc::return#0 inc::$0 ]
//SEG7 [9] phi from main to inc
//SEG8 [9] phi (byte) i#11 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inc
//SEG9 main::@1
//SEG10 [3] (byte~) main::$0 ← (byte) inc::return#0 [ main::$0 inc::$0 ]
// (byte~) main::$0 = (byte) inc::return#0 // register copy reg byte a
//SEG11 [4] (byte) main::a#1 ← (byte) 4 + (byte~) main::$0 [ main::a#1 inc::$0 ] -- zpby1=coby1_plus_aby
clc
adc #$4
adc #4
sta a
//SEG12 [5] call inc param-assignment [ inc::return#0 main::a#1 ]
//SEG13 [9] phi from main::@1 to inc
@ -939,7 +939,7 @@ inc: {
//SEG21 [10] (byte~) inc::$0 ← (byte) i#11 + (byte) 7 [ inc::$0 ] -- xby=xby_plus_coby1
txa
clc
adc #$7
adc #7
tax
//SEG22 [11] (byte) inc::return#0 ← (byte~) inc::$0 [ inc::return#0 inc::$0 ] -- aby=xby
txa
@ -988,14 +988,14 @@ main: {
//SEG6 [2] call inc param-assignment [ inc::return#0 inc::$0 ]
//SEG7 [9] phi from main to inc
//SEG8 [9] phi (byte) i#11 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inc
//SEG9 main::@1
//SEG10 [3] (byte~) main::$0 ← (byte) inc::return#0 [ main::$0 inc::$0 ]
// (byte~) main::$0 = (byte) inc::return#0 // register copy reg byte a
//SEG11 [4] (byte) main::a#1 ← (byte) 4 + (byte~) main::$0 [ main::a#1 inc::$0 ] -- zpby1=coby1_plus_aby
clc
adc #$4
adc #4
sta a
//SEG12 [5] call inc param-assignment [ inc::return#0 main::a#1 ]
//SEG13 [9] phi from main::@1 to inc
@ -1016,7 +1016,7 @@ inc: {
//SEG21 [10] (byte~) inc::$0 ← (byte) i#11 + (byte) 7 [ inc::$0 ] -- xby=xby_plus_coby1
txa
clc
adc #$7
adc #7
tax
//SEG22 [11] (byte) inc::return#0 ← (byte~) inc::$0 [ inc::return#0 inc::$0 ] -- aby=xby
txa

View File

@ -1,7 +1,7 @@
lda #$0
lda #0
ldx #$a
b1:
cpx #$5
cpx #5
bcc b2
beq b2
stx $ff
@ -9,5 +9,5 @@ b1:
adc $ff
b2:
dex
cpx #$0
cpx #0
bne b1

View File

@ -474,7 +474,7 @@ bbegin:
//SEG2 [0] phi from @begin to @1
b1_from_bbegin:
//SEG3 [0] phi (byte) s#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta s
//SEG4 [0] phi (byte) i#2 = (byte) 10 -- zpby1=coby1
lda #$a
@ -489,7 +489,7 @@ b1_from_b2:
b1:
//SEG9 [1] if((byte) i#2<=(byte) 5) goto @2 [ i#2 s#2 ] -- zpby1_le_coby1_then_la1
lda i
cmp #$5
cmp #5
bcc b2_from_b1
beq b2_from_b1
jmp b3
@ -536,7 +536,7 @@ bbegin:
//SEG2 [0] phi from @begin to @1
b1_from_bbegin:
//SEG3 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #$0
lda #0
//SEG4 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #$a
jmp b1
@ -547,7 +547,7 @@ b1_from_b2:
//SEG8 @1
b1:
//SEG9 [1] if((byte) i#2<=(byte) 5) goto @2 [ i#2 s#2 ] -- xby_le_coby1_then_la1
cpx #$5
cpx #5
bcc b2_from_b1
beq b2_from_b1
//SEG10 @3
@ -565,7 +565,7 @@ b2:
//SEG15 [4] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG16 [5] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1_from_b2
//SEG17 @end
bend:
@ -584,7 +584,7 @@ ASSEMBLER
bbegin:
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #$0
lda #0
//SEG4 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #$a
jmp b1
@ -594,7 +594,7 @@ bbegin:
//SEG8 @1
b1:
//SEG9 [1] if((byte) i#2<=(byte) 5) goto @2 [ i#2 s#2 ] -- xby_le_coby1_then_la1
cpx #$5
cpx #5
bcc b2
beq b2
//SEG10 @3
@ -610,7 +610,7 @@ b2:
//SEG15 [4] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG16 [5] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG17 @end
bend:
@ -624,7 +624,7 @@ ASSEMBLER
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #$0
lda #0
//SEG4 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #$a
jmp b1
@ -634,7 +634,7 @@ ASSEMBLER
//SEG8 @1
b1:
//SEG9 [1] if((byte) i#2<=(byte) 5) goto @2 [ i#2 s#2 ] -- xby_le_coby1_then_la1
cpx #$5
cpx #5
bcc b2
beq b2
//SEG10 @3
@ -649,7 +649,7 @@ b2:
//SEG15 [4] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG16 [5] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG17 @end
@ -660,7 +660,7 @@ ASSEMBLER
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #$0
lda #0
//SEG4 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #$a
//SEG5 [0] phi from @2 to @1
@ -669,7 +669,7 @@ ASSEMBLER
//SEG8 @1
b1:
//SEG9 [1] if((byte) i#2<=(byte) 5) goto @2 [ i#2 s#2 ] -- xby_le_coby1_then_la1
cpx #$5
cpx #5
bcc b2
beq b2
//SEG10 @3
@ -684,7 +684,7 @@ b2:
//SEG15 [4] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG16 [5] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG17 @end
@ -710,7 +710,7 @@ FINAL CODE
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #$0
lda #0
//SEG4 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #$a
//SEG5 [0] phi from @2 to @1
@ -719,7 +719,7 @@ FINAL CODE
//SEG8 @1
b1:
//SEG9 [1] if((byte) i#2<=(byte) 5) goto @2 [ i#2 s#2 ] -- xby_le_coby1_then_la1
cpx #$5
cpx #5
bcc b2
beq b2
//SEG10 @3
@ -734,7 +734,7 @@ b2:
//SEG15 [4] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG16 [5] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG17 @end

View File

@ -5,7 +5,7 @@ main: {
b1:
jsr nest
dey
cpy #$0
cpy #0
bne b1
rts
}
@ -14,7 +14,7 @@ nest: {
b1:
stx SCREEN
dex
cpx #$0
cpx #0
bne b1
rts
}

View File

@ -910,7 +910,7 @@ main: {
//SEG14 [4] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG15 [5] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b1_from_b3
//SEG16 main::@return
breturn:
@ -934,7 +934,7 @@ nest: {
//SEG25 [10] (byte) nest::j#1 ← -- (byte) nest::j#2 [ nest::j#1 ] -- xby=_dec_xby
dex
//SEG26 [11] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ nest::j#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1_from_b1
//SEG27 nest::@return
breturn:
@ -978,7 +978,7 @@ main: {
//SEG14 [4] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG15 [5] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b1
//SEG16 main::@return
breturn:
@ -1001,7 +1001,7 @@ nest: {
//SEG25 [10] (byte) nest::j#1 ← -- (byte) nest::j#2 [ nest::j#1 ] -- xby=_dec_xby
dex
//SEG26 [11] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ nest::j#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG27 nest::@return
breturn:
@ -1042,7 +1042,7 @@ main: {
//SEG14 [4] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG15 [5] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b1
//SEG16 main::@return
//SEG17 [6] return [ ]
@ -1063,7 +1063,7 @@ nest: {
//SEG25 [10] (byte) nest::j#1 ← -- (byte) nest::j#2 [ nest::j#1 ] -- xby=_dec_xby
dex
//SEG26 [11] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ nest::j#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG27 nest::@return
//SEG28 [12] return [ ]
@ -1097,7 +1097,7 @@ main: {
//SEG14 [4] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG15 [5] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b1
//SEG16 main::@return
//SEG17 [6] return [ ]
@ -1117,7 +1117,7 @@ nest: {
//SEG25 [10] (byte) nest::j#1 ← -- (byte) nest::j#2 [ nest::j#1 ] -- xby=_dec_xby
dex
//SEG26 [11] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ nest::j#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG27 nest::@return
//SEG28 [12] return [ ]
@ -1170,7 +1170,7 @@ main: {
//SEG14 [4] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG15 [5] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b1
//SEG16 main::@return
//SEG17 [6] return [ ]
@ -1190,7 +1190,7 @@ nest: {
//SEG25 [10] (byte) nest::j#1 ← -- (byte) nest::j#2 [ nest::j#1 ] -- xby=_dec_xby
dex
//SEG26 [11] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ nest::j#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG27 nest::@return
//SEG28 [12] return [ ]

View File

@ -27,8 +27,8 @@ nest1: {
b2:
jsr nest2
sec
sbc #$1
cmp #$0
sbc #1
cmp #0
bne b2
dec i
lda i
@ -42,10 +42,10 @@ nest2: {
b2:
sty SCREEN
dey
cpy #$0
cpy #0
bne b2
dex
cpx #$0
cpx #0
bne b1
rts
}

View File

@ -2245,9 +2245,9 @@ nest1: {
b5:
//SEG40 [14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#2 nest1::j#1 ] -- aby=_dec_aby
sec
sbc #$1
sbc #1
//SEG41 [15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#2 nest1::j#1 ] -- aby_gt_0_then_la1
cmp #$0
cmp #0
bne b2_from_b5
//SEG42 nest1::@3
b3:
@ -2288,14 +2288,14 @@ nest2: {
//SEG59 [23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#2 nest2::j#1 ] -- yby=_dec_yby
dey
//SEG60 [24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#2 nest2::j#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b2_from_b2
//SEG61 nest2::@3
b3:
//SEG62 [25] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ nest2::i#1 ] -- xby=_dec_xby
dex
//SEG63 [26] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ nest2::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1_from_b3
//SEG64 nest2::@return
breturn:
@ -2405,9 +2405,9 @@ nest1: {
b5:
//SEG40 [14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#2 nest1::j#1 ] -- aby=_dec_aby
sec
sbc #$1
sbc #1
//SEG41 [15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#2 nest1::j#1 ] -- aby_gt_0_then_la1
cmp #$0
cmp #0
bne b2
//SEG42 nest1::@3
b3:
@ -2445,14 +2445,14 @@ nest2: {
//SEG59 [23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#2 nest2::j#1 ] -- yby=_dec_yby
dey
//SEG60 [24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#2 nest2::j#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b2
//SEG61 nest2::@3
b3:
//SEG62 [25] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ nest2::i#1 ] -- xby=_dec_xby
dex
//SEG63 [26] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ nest2::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG64 nest2::@return
breturn:
@ -2549,9 +2549,9 @@ nest1: {
//SEG39 nest1::@5
//SEG40 [14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#2 nest1::j#1 ] -- aby=_dec_aby
sec
sbc #$1
sbc #1
//SEG41 [15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#2 nest1::j#1 ] -- aby_gt_0_then_la1
cmp #$0
cmp #0
bne b2
//SEG42 nest1::@3
//SEG43 [16] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ nest1::i#1 ] -- zpby1=_dec_zpby1
@ -2586,13 +2586,13 @@ nest2: {
//SEG59 [23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#2 nest2::j#1 ] -- yby=_dec_yby
dey
//SEG60 [24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#2 nest2::j#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b2
//SEG61 nest2::@3
//SEG62 [25] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ nest2::i#1 ] -- xby=_dec_xby
dex
//SEG63 [26] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ nest2::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG64 nest2::@return
//SEG65 [27] return [ ]
@ -2677,9 +2677,9 @@ nest1: {
//SEG39 nest1::@5
//SEG40 [14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#2 nest1::j#1 ] -- aby=_dec_aby
sec
sbc #$1
sbc #1
//SEG41 [15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#2 nest1::j#1 ] -- aby_gt_0_then_la1
cmp #$0
cmp #0
bne b2
//SEG42 nest1::@3
//SEG43 [16] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ nest1::i#1 ] -- zpby1=_dec_zpby1
@ -2712,13 +2712,13 @@ nest2: {
//SEG59 [23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#2 nest2::j#1 ] -- yby=_dec_yby
dey
//SEG60 [24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#2 nest2::j#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b2
//SEG61 nest2::@3
//SEG62 [25] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ nest2::i#1 ] -- xby=_dec_xby
dex
//SEG63 [26] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ nest2::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG64 nest2::@return
//SEG65 [27] return [ ]
@ -2844,9 +2844,9 @@ nest1: {
//SEG39 nest1::@5
//SEG40 [14] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ nest1::i#2 nest1::j#1 ] -- aby=_dec_aby
sec
sbc #$1
sbc #1
//SEG41 [15] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ nest1::i#2 nest1::j#1 ] -- aby_gt_0_then_la1
cmp #$0
cmp #0
bne b2
//SEG42 nest1::@3
//SEG43 [16] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ nest1::i#1 ] -- zpby1=_dec_zpby1
@ -2879,13 +2879,13 @@ nest2: {
//SEG59 [23] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ nest2::i#2 nest2::j#1 ] -- yby=_dec_yby
dey
//SEG60 [24] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ nest2::i#2 nest2::j#1 ] -- yby_gt_0_then_la1
cpy #$0
cpy #0
bne b2
//SEG61 nest2::@3
//SEG62 [25] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ nest2::i#1 ] -- xby=_dec_xby
dex
//SEG63 [26] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ nest2::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b1
//SEG64 nest2::@return
//SEG65 [27] return [ ]

View File

@ -1,10 +1,10 @@
jsr main
main: {
ldy #$0
ldy #0
ldx #$64
b1:
dex
cpx #$0
cpx #0
bne b2
rts
b2:

View File

@ -666,7 +666,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::s#3 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta s
//SEG8 [2] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #$64
@ -739,7 +739,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::s#3 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG8 [2] phi (byte) main::i#2 = (byte) 100 -- xby=coby1
ldx #$64
//SEG9 main::@1
@ -747,7 +747,7 @@ main: {
//SEG10 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::s#3 main::i#1 ] -- xby=_dec_xby
dex
//SEG11 [4] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::s#3 main::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b2
//SEG12 main::@return
breturn:
@ -794,7 +794,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::s#3 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG8 [2] phi (byte) main::i#2 = (byte) 100 -- xby=coby1
ldx #$64
//SEG9 main::@1
@ -802,7 +802,7 @@ main: {
//SEG10 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::s#3 main::i#1 ] -- xby=_dec_xby
dex
//SEG11 [4] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::s#3 main::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b2
//SEG12 main::@return
breturn:
@ -847,7 +847,7 @@ ASSEMBLER
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::s#3 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG8 [2] phi (byte) main::i#2 = (byte) 100 -- xby=coby1
ldx #$64
//SEG9 main::@1
@ -855,7 +855,7 @@ main: {
//SEG10 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::s#3 main::i#1 ] -- xby=_dec_xby
dex
//SEG11 [4] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::s#3 main::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b2
//SEG12 main::@return
//SEG13 [5] return [ ]
@ -912,7 +912,7 @@ FINAL CODE
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::s#3 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG8 [2] phi (byte) main::i#2 = (byte) 100 -- xby=coby1
ldx #$64
//SEG9 main::@1
@ -920,7 +920,7 @@ main: {
//SEG10 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::s#3 main::i#1 ] -- xby=_dec_xby
dex
//SEG11 [4] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::s#3 main::i#1 ] -- xby_gt_0_then_la1
cpx #$0
cpx #0
bne b2
//SEG12 main::@return
//SEG13 [5] return [ ]

View File

@ -1,9 +1,9 @@
.const p = $1100
ldx #$5
ldx #5
b1:
txa
clc
adc #$2+$2
adc #2+2
sta p,x
inx
cpx #$a

View File

@ -383,7 +383,7 @@ bbegin:
//SEG2 [0] phi from @begin to @1
b1_from_bbegin:
//SEG3 [0] phi (byte) i#2 = (byte) 5 -- zpby1=coby1
lda #$5
lda #5
sta i
jmp b1
//SEG4 [0] phi from @1 to @1
@ -395,7 +395,7 @@ b1:
//SEG7 [1] (byte~) $1 ← (byte) i#2 + (byte) 2+(byte) 2 [ i#2 $1 ] -- zpby1=zpby2_plus_coby1
lda i
clc
adc #$2+$2
adc #2+2
sta _1
//SEG8 [2] *((const byte[16]) p#0 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_zpby1=zpby2
lda _1
@ -433,7 +433,7 @@ bbegin:
//SEG2 [0] phi from @begin to @1
b1_from_bbegin:
//SEG3 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #$5
ldx #5
jmp b1
//SEG4 [0] phi from @1 to @1
b1_from_b1:
@ -443,7 +443,7 @@ b1:
//SEG7 [1] (byte~) $1 ← (byte) i#2 + (byte) 2+(byte) 2 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #$2+$2
adc #2+2
//SEG8 [2] *((const byte[16]) p#0 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta p,x
//SEG9 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
@ -465,7 +465,7 @@ ASSEMBLER
bbegin:
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #$5
ldx #5
jmp b1
//SEG4 [0] phi from @1 to @1
//SEG5 [0] phi (byte) i#2 = (byte) i#1 -- register_copy
@ -474,7 +474,7 @@ b1:
//SEG7 [1] (byte~) $1 ← (byte) i#2 + (byte) 2+(byte) 2 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #$2+$2
adc #2+2
//SEG8 [2] *((const byte[16]) p#0 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta p,x
//SEG9 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
@ -494,7 +494,7 @@ ASSEMBLER
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #$5
ldx #5
jmp b1
//SEG4 [0] phi from @1 to @1
//SEG5 [0] phi (byte) i#2 = (byte) i#1 -- register_copy
@ -503,7 +503,7 @@ b1:
//SEG7 [1] (byte~) $1 ← (byte) i#2 + (byte) 2+(byte) 2 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #$2+$2
adc #2+2
//SEG8 [2] *((const byte[16]) p#0 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta p,x
//SEG9 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
@ -521,7 +521,7 @@ ASSEMBLER
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #$5
ldx #5
//SEG4 [0] phi from @1 to @1
//SEG5 [0] phi (byte) i#2 = (byte) i#1 -- register_copy
//SEG6 @1
@ -529,7 +529,7 @@ b1:
//SEG7 [1] (byte~) $1 ← (byte) i#2 + (byte) 2+(byte) 2 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #$2+$2
adc #2+2
//SEG8 [2] *((const byte[16]) p#0 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta p,x
//SEG9 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
@ -559,7 +559,7 @@ FINAL CODE
//SEG1 @begin
//SEG2 [0] phi from @begin to @1
//SEG3 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #$5
ldx #5
//SEG4 [0] phi from @1 to @1
//SEG5 [0] phi (byte) i#2 = (byte) i#1 -- register_copy
//SEG6 @1
@ -567,7 +567,7 @@ b1:
//SEG7 [1] (byte~) $1 ← (byte) i#2 + (byte) 2+(byte) 2 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #$2+$2
adc #2+2
//SEG8 [2] *((const byte[16]) p#0 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta p,x
//SEG9 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1

View File

@ -2,15 +2,15 @@
.label cnt3 = 2
jsr main
main: {
lda #$0
lda #0
sta cnt3
ldy #$0
ldx #$0
ldy #0
ldx #0
jsr inccnt
sta SCREEN+$0
sta SCREEN+0
inx
jsr inccnt
sta SCREEN+$1
sta SCREEN+1
rts
}
inccnt: {

View File

@ -898,13 +898,13 @@ main: {
//SEG7 [10] phi from main to inccnt
inccnt_from_main:
//SEG8 [10] phi (byte) cnt3#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt3
//SEG9 [10] phi (byte) cnt2#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt2
//SEG10 [10] phi (byte) cnt#12 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt_12
jsr inccnt
jmp b1
@ -915,7 +915,7 @@ main: {
sta _0
//SEG13 [4] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte~) main::$0 [ cnt#1 cnt2#1 cnt3#1 ] -- _star_cowo1=zpby1
lda _0
sta SCREEN+$0
sta SCREEN+0
//SEG14 [5] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 cnt3#1 ] -- zpby1=_inc_zpby2
lda cnt
sta cnt_3
@ -935,7 +935,7 @@ main: {
sta _1
//SEG22 [8] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte~) main::$1 [ ] -- _star_cowo1=zpby1
lda _1
sta SCREEN+$1
sta SCREEN+1
jmp breturn
//SEG23 main::@return
breturn:
@ -1007,19 +1007,19 @@ main: {
//SEG7 [10] phi from main to inccnt
inccnt_from_main:
//SEG8 [10] phi (byte) cnt3#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt3
//SEG9 [10] phi (byte) cnt2#11 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG10 [10] phi (byte) cnt#12 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG11 main::@1
b1:
//SEG12 [3] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 cnt3#1 ]
// (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a
//SEG13 [4] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte~) main::$0 [ cnt#1 cnt2#1 cnt3#1 ] -- _star_cowo1=aby
sta SCREEN+$0
sta SCREEN+0
//SEG14 [5] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 cnt3#1 ] -- xby=_inc_xby
inx
//SEG15 [6] call inccnt param-assignment [ inccnt::return#0 ]
@ -1034,7 +1034,7 @@ main: {
//SEG21 [7] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ]
// (byte~) main::$1 = (byte) inccnt::return#0 // register copy reg byte a
//SEG22 [8] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte~) main::$1 [ ] -- _star_cowo1=aby
sta SCREEN+$1
sta SCREEN+1
//SEG23 main::@return
breturn:
//SEG24 [9] return [ ]
@ -1075,19 +1075,19 @@ main: {
//SEG7 [10] phi from main to inccnt
inccnt_from_main:
//SEG8 [10] phi (byte) cnt3#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt3
//SEG9 [10] phi (byte) cnt2#11 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG10 [10] phi (byte) cnt#12 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG11 main::@1
b1:
//SEG12 [3] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 cnt3#1 ]
// (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a
//SEG13 [4] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte~) main::$0 [ cnt#1 cnt2#1 cnt3#1 ] -- _star_cowo1=aby
sta SCREEN+$0
sta SCREEN+0
//SEG14 [5] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 cnt3#1 ] -- xby=_inc_xby
inx
//SEG15 [6] call inccnt param-assignment [ inccnt::return#0 ]
@ -1102,7 +1102,7 @@ main: {
//SEG21 [7] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ]
// (byte~) main::$1 = (byte) inccnt::return#0 // register copy reg byte a
//SEG22 [8] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte~) main::$1 [ ] -- _star_cowo1=aby
sta SCREEN+$1
sta SCREEN+1
//SEG23 main::@return
breturn:
//SEG24 [9] return [ ]
@ -1147,18 +1147,18 @@ main: {
//SEG6 [2] call inccnt param-assignment [ inccnt::return#0 cnt#1 cnt2#1 cnt3#1 ]
//SEG7 [10] phi from main to inccnt
//SEG8 [10] phi (byte) cnt3#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt3
//SEG9 [10] phi (byte) cnt2#11 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG10 [10] phi (byte) cnt#12 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG11 main::@1
//SEG12 [3] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 cnt3#1 ]
// (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a
//SEG13 [4] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte~) main::$0 [ cnt#1 cnt2#1 cnt3#1 ] -- _star_cowo1=aby
sta SCREEN+$0
sta SCREEN+0
//SEG14 [5] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 cnt3#1 ] -- xby=_inc_xby
inx
//SEG15 [6] call inccnt param-assignment [ inccnt::return#0 ]
@ -1171,7 +1171,7 @@ main: {
//SEG21 [7] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ]
// (byte~) main::$1 = (byte) inccnt::return#0 // register copy reg byte a
//SEG22 [8] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte~) main::$1 [ ] -- _star_cowo1=aby
sta SCREEN+$1
sta SCREEN+1
//SEG23 main::@return
//SEG24 [9] return [ ]
rts
@ -1239,18 +1239,18 @@ main: {
//SEG6 [2] call inccnt param-assignment [ inccnt::return#0 cnt#1 cnt2#1 cnt3#1 ]
//SEG7 [10] phi from main to inccnt
//SEG8 [10] phi (byte) cnt3#11 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt3
//SEG9 [10] phi (byte) cnt2#11 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG10 [10] phi (byte) cnt#12 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG11 main::@1
//SEG12 [3] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 cnt3#1 ]
// (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a
//SEG13 [4] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte~) main::$0 [ cnt#1 cnt2#1 cnt3#1 ] -- _star_cowo1=aby
sta SCREEN+$0
sta SCREEN+0
//SEG14 [5] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 cnt3#1 ] -- xby=_inc_xby
inx
//SEG15 [6] call inccnt param-assignment [ inccnt::return#0 ]
@ -1263,7 +1263,7 @@ main: {
//SEG21 [7] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ]
// (byte~) main::$1 = (byte) inccnt::return#0 // register copy reg byte a
//SEG22 [8] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte~) main::$1 [ ] -- _star_cowo1=aby
sta SCREEN+$1
sta SCREEN+1
//SEG23 main::@return
//SEG24 [9] return [ ]
rts

View File

@ -1,13 +1,13 @@
.const SCREEN = $400
jsr main
main: {
ldx #$0
ldx #0
jsr inccnt
stx SCREEN+$0
stx SCREEN+0
inx
jsr inccnt
inx
stx SCREEN+$1
stx SCREEN+1
rts
}
inccnt: {

View File

@ -621,7 +621,7 @@ main: {
//SEG7 [9] phi from main to inccnt
inccnt_from_main:
//SEG8 [9] phi (byte) cnt#13 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta cnt_13
jsr inccnt
jmp b1
@ -629,7 +629,7 @@ main: {
b1:
//SEG10 [3] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=zpby1
lda cnt_10
sta SCREEN+$0
sta SCREEN+0
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- zpby1=_inc_zpby2
lda cnt_10
sta cnt_3
@ -648,7 +648,7 @@ main: {
inc cnt
//SEG17 [7] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte) cnt#1 [ ] -- _star_cowo1=zpby1
lda cnt
sta SCREEN+$1
sta SCREEN+1
jmp breturn
//SEG18 main::@return
breturn:
@ -704,12 +704,12 @@ main: {
//SEG7 [9] phi from main to inccnt
inccnt_from_main:
//SEG8 [9] phi (byte) cnt#13 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG9 main::@1
b1:
//SEG10 [3] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=xby
stx SCREEN+$0
stx SCREEN+0
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- xby=_inc_xby
inx
//SEG12 [5] call inccnt param-assignment [ cnt#10 ]
@ -722,7 +722,7 @@ main: {
//SEG16 [6] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- xby=_inc_xby
inx
//SEG17 [7] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte) cnt#1 [ ] -- _star_cowo1=xby
stx SCREEN+$1
stx SCREEN+1
//SEG18 main::@return
breturn:
//SEG19 [8] return [ ]
@ -756,12 +756,12 @@ main: {
//SEG7 [9] phi from main to inccnt
inccnt_from_main:
//SEG8 [9] phi (byte) cnt#13 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG9 main::@1
b1:
//SEG10 [3] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=xby
stx SCREEN+$0
stx SCREEN+0
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- xby=_inc_xby
inx
//SEG12 [5] call inccnt param-assignment [ cnt#10 ]
@ -774,7 +774,7 @@ main: {
//SEG16 [6] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- xby=_inc_xby
inx
//SEG17 [7] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte) cnt#1 [ ] -- _star_cowo1=xby
stx SCREEN+$1
stx SCREEN+1
//SEG18 main::@return
breturn:
//SEG19 [8] return [ ]
@ -812,11 +812,11 @@ main: {
//SEG6 [2] call inccnt param-assignment [ cnt#10 ]
//SEG7 [9] phi from main to inccnt
//SEG8 [9] phi (byte) cnt#13 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG9 main::@1
//SEG10 [3] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=xby
stx SCREEN+$0
stx SCREEN+0
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- xby=_inc_xby
inx
//SEG12 [5] call inccnt param-assignment [ cnt#10 ]
@ -827,7 +827,7 @@ main: {
//SEG16 [6] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- xby=_inc_xby
inx
//SEG17 [7] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte) cnt#1 [ ] -- _star_cowo1=xby
stx SCREEN+$1
stx SCREEN+1
//SEG18 main::@return
//SEG19 [8] return [ ]
rts
@ -875,11 +875,11 @@ main: {
//SEG6 [2] call inccnt param-assignment [ cnt#10 ]
//SEG7 [9] phi from main to inccnt
//SEG8 [9] phi (byte) cnt#13 = (byte) 0 -- xby=coby1
ldx #$0
ldx #0
jsr inccnt
//SEG9 main::@1
//SEG10 [3] *((const byte[256]) SCREEN#0+(byte) 0) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=xby
stx SCREEN+$0
stx SCREEN+0
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- xby=_inc_xby
inx
//SEG12 [5] call inccnt param-assignment [ cnt#10 ]
@ -890,7 +890,7 @@ main: {
//SEG16 [6] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- xby=_inc_xby
inx
//SEG17 [7] *((const byte[256]) SCREEN#0+(byte) 1) ← (byte) cnt#1 [ ] -- _star_cowo1=xby
stx SCREEN+$1
stx SCREEN+1
//SEG18 main::@return
//SEG19 [8] return [ ]
rts

View File

@ -7,24 +7,24 @@ main: {
rts
}
lvaluevar: {
.const b = $4
.const b = 4
.label screen = 2
lda #<$400
sta screen
lda #>$400
sta screen+$1
ldx #$2
sta screen+1
ldx #2
b1:
cpx #$a
bcc b2
rts
b2:
ldy #$0
ldy #0
lda #b
sta (screen),y
inc screen
bne !+
inc screen+$1
inc screen+1
!:
inx
jmp b1
@ -34,18 +34,18 @@ rvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
ldx #$2
sta screen+1
ldx #2
b1:
cpx #$a
bcc b2
rts
b2:
ldy #$0
ldy #0
lda (screen),y
inc screen
bne !+
inc screen+$1
inc screen+1
!:
inx
jmp b1
@ -53,8 +53,8 @@ rvaluevar: {
rvalue: {
.const SCREEN = $400
lda SCREEN
lda SCREEN+$1
ldx #$2
lda SCREEN+1
ldx #2
b1:
cpx #$a
bcc b2
@ -66,17 +66,17 @@ rvalue: {
}
lvalue: {
.const SCREEN = $400
lda #$1
lda #1
sta SCREEN
lda #$2
sta SCREEN+$1
ldx #$2
lda #2
sta SCREEN+1
ldx #2
b1:
cpx #$a
bcc b2
rts
b2:
lda #$3
lda #3
sta SCREEN,x
inx
jmp b1

View File

@ -2145,7 +2145,7 @@ main: {
}
//SEG17 lvaluevar
lvaluevar: {
.const b = $4
.const b = 4
.label screen = 3
.label i = 2
//SEG18 [8] phi from lvaluevar to lvaluevar::@1
@ -2154,9 +2154,9 @@ lvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG20 [8] phi (byte) lvaluevar::i#2 = (byte) 2 -- zpby1=coby1
lda #$2
lda #2
sta i
jmp b1
//SEG21 lvaluevar::@1
@ -2173,13 +2173,13 @@ lvaluevar: {
//SEG25 lvaluevar::@2
b2:
//SEG26 [11] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #b
sta (screen),y
//SEG27 [12] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::i#2 lvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG28 [13] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- zpby1=_inc_zpby1
inc i
@ -2200,9 +2200,9 @@ rvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG35 [15] phi (byte) rvaluevar::i#2 = (byte) 2 -- zpby1=coby1
lda #$2
lda #2
sta i
jmp b1
//SEG36 rvaluevar::@1
@ -2219,13 +2219,13 @@ rvaluevar: {
//SEG40 rvaluevar::@2
b2:
//SEG41 [18] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- zpby1=_star_zpptrby1
ldy #$0
ldy #0
lda (screen),y
sta b
//SEG42 [19] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG43 [20] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- zpby1=_inc_zpby1
inc i
@ -2246,12 +2246,12 @@ rvalue: {
lda SCREEN
sta b
//SEG49 [22] (byte) rvalue::b#1 ← * (const byte[1024]) rvalue::SCREEN#0+(byte) 1 [ ] -- zpby1=_star_cowo1
lda SCREEN+$1
lda SCREEN+1
sta b_1
//SEG50 [23] phi from rvalue to rvalue::@1
b1_from_rvalue:
//SEG51 [23] phi (byte) rvalue::i#2 = (byte) 2 -- zpby1=coby1
lda #$2
lda #2
sta i
jmp b1
//SEG52 rvalue::@1
@ -2283,15 +2283,15 @@ lvalue: {
.const SCREEN = $400
.label i = 9
//SEG62 [28] *((const byte[1024]) lvalue::SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG63 [29] *((const byte[1024]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #$2
sta SCREEN+$1
lda #2
sta SCREEN+1
//SEG64 [30] phi from lvalue to lvalue::@1
b1_from_lvalue:
//SEG65 [30] phi (byte) lvalue::i#2 = (byte) 2 -- zpby1=coby1
lda #$2
lda #2
sta i
jmp b1
//SEG66 lvalue::@1
@ -2308,7 +2308,7 @@ lvalue: {
//SEG70 lvalue::@2
b2:
//SEG71 [33] *((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_zpby1=coby2
lda #$3
lda #3
ldx i
sta SCREEN,x
//SEG72 [34] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- zpby1=_inc_zpby1
@ -2413,7 +2413,7 @@ main: {
}
//SEG17 lvaluevar
lvaluevar: {
.const b = $4
.const b = 4
.label screen = 2
//SEG18 [8] phi from lvaluevar to lvaluevar::@1
b1_from_lvaluevar:
@ -2421,9 +2421,9 @@ lvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG20 [8] phi (byte) lvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG21 lvaluevar::@1
b1:
//SEG22 [9] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -2436,13 +2436,13 @@ lvaluevar: {
//SEG25 lvaluevar::@2
b2:
//SEG26 [11] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #b
sta (screen),y
//SEG27 [12] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::i#2 lvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG28 [13] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2461,9 +2461,9 @@ rvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG35 [15] phi (byte) rvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG36 rvaluevar::@1
b1:
//SEG37 [16] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -2476,12 +2476,12 @@ rvaluevar: {
//SEG40 rvaluevar::@2
b2:
//SEG41 [18] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- aby=_star_zpptrby1
ldy #$0
ldy #0
lda (screen),y
//SEG42 [19] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG43 [20] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2497,11 +2497,11 @@ rvalue: {
//SEG48 [21] (byte) rvalue::b#0 ← * (const byte[1024]) rvalue::SCREEN#0 [ ] -- aby=_star_cowo1
lda SCREEN
//SEG49 [22] (byte) rvalue::b#1 ← * (const byte[1024]) rvalue::SCREEN#0+(byte) 1 [ ] -- aby=_star_cowo1
lda SCREEN+$1
lda SCREEN+1
//SEG50 [23] phi from rvalue to rvalue::@1
b1_from_rvalue:
//SEG51 [23] phi (byte) rvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG52 rvalue::@1
b1:
//SEG53 [24] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -2526,15 +2526,15 @@ rvalue: {
lvalue: {
.const SCREEN = $400
//SEG62 [28] *((const byte[1024]) lvalue::SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG63 [29] *((const byte[1024]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #$2
sta SCREEN+$1
lda #2
sta SCREEN+1
//SEG64 [30] phi from lvalue to lvalue::@1
b1_from_lvalue:
//SEG65 [30] phi (byte) lvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG66 lvalue::@1
b1:
//SEG67 [31] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -2547,7 +2547,7 @@ lvalue: {
//SEG70 lvalue::@2
b2:
//SEG71 [33] *((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_xby=coby2
lda #$3
lda #3
sta SCREEN,x
//SEG72 [34] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- xby=_inc_xby
inx
@ -2595,7 +2595,7 @@ main: {
}
//SEG17 lvaluevar
lvaluevar: {
.const b = $4
.const b = 4
.label screen = 2
//SEG18 [8] phi from lvaluevar to lvaluevar::@1
b1_from_lvaluevar:
@ -2603,9 +2603,9 @@ lvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG20 [8] phi (byte) lvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG21 lvaluevar::@1
b1:
//SEG22 [9] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -2618,13 +2618,13 @@ lvaluevar: {
//SEG25 lvaluevar::@2
b2:
//SEG26 [11] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #b
sta (screen),y
//SEG27 [12] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::i#2 lvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG28 [13] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2643,9 +2643,9 @@ rvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG35 [15] phi (byte) rvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG36 rvaluevar::@1
b1:
//SEG37 [16] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -2658,12 +2658,12 @@ rvaluevar: {
//SEG40 rvaluevar::@2
b2:
//SEG41 [18] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- aby=_star_zpptrby1
ldy #$0
ldy #0
lda (screen),y
//SEG42 [19] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG43 [20] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2679,11 +2679,11 @@ rvalue: {
//SEG48 [21] (byte) rvalue::b#0 ← * (const byte[1024]) rvalue::SCREEN#0 [ ] -- aby=_star_cowo1
lda SCREEN
//SEG49 [22] (byte) rvalue::b#1 ← * (const byte[1024]) rvalue::SCREEN#0+(byte) 1 [ ] -- aby=_star_cowo1
lda SCREEN+$1
lda SCREEN+1
//SEG50 [23] phi from rvalue to rvalue::@1
b1_from_rvalue:
//SEG51 [23] phi (byte) rvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG52 rvalue::@1
b1:
//SEG53 [24] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -2708,15 +2708,15 @@ rvalue: {
lvalue: {
.const SCREEN = $400
//SEG62 [28] *((const byte[1024]) lvalue::SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG63 [29] *((const byte[1024]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #$2
sta SCREEN+$1
lda #2
sta SCREEN+1
//SEG64 [30] phi from lvalue to lvalue::@1
b1_from_lvalue:
//SEG65 [30] phi (byte) lvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG66 lvalue::@1
b1:
//SEG67 [31] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -2729,7 +2729,7 @@ lvalue: {
//SEG70 lvalue::@2
b2:
//SEG71 [33] *((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_xby=coby2
lda #$3
lda #3
sta SCREEN,x
//SEG72 [34] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- xby=_inc_xby
inx
@ -2786,16 +2786,16 @@ main: {
}
//SEG17 lvaluevar
lvaluevar: {
.const b = $4
.const b = 4
.label screen = 2
//SEG18 [8] phi from lvaluevar to lvaluevar::@1
//SEG19 [8] phi (byte*) lvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG20 [8] phi (byte) lvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG21 lvaluevar::@1
b1:
//SEG22 [9] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -2807,13 +2807,13 @@ lvaluevar: {
//SEG25 lvaluevar::@2
b2:
//SEG26 [11] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #b
sta (screen),y
//SEG27 [12] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::i#2 lvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG28 [13] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2830,9 +2830,9 @@ rvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG35 [15] phi (byte) rvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG36 rvaluevar::@1
b1:
//SEG37 [16] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -2844,12 +2844,12 @@ rvaluevar: {
//SEG40 rvaluevar::@2
b2:
//SEG41 [18] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- aby=_star_zpptrby1
ldy #$0
ldy #0
lda (screen),y
//SEG42 [19] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG43 [20] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2864,10 +2864,10 @@ rvalue: {
//SEG48 [21] (byte) rvalue::b#0 ← * (const byte[1024]) rvalue::SCREEN#0 [ ] -- aby=_star_cowo1
lda SCREEN
//SEG49 [22] (byte) rvalue::b#1 ← * (const byte[1024]) rvalue::SCREEN#0+(byte) 1 [ ] -- aby=_star_cowo1
lda SCREEN+$1
lda SCREEN+1
//SEG50 [23] phi from rvalue to rvalue::@1
//SEG51 [23] phi (byte) rvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG52 rvalue::@1
b1:
//SEG53 [24] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -2890,14 +2890,14 @@ rvalue: {
lvalue: {
.const SCREEN = $400
//SEG62 [28] *((const byte[1024]) lvalue::SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG63 [29] *((const byte[1024]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #$2
sta SCREEN+$1
lda #2
sta SCREEN+1
//SEG64 [30] phi from lvalue to lvalue::@1
//SEG65 [30] phi (byte) lvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG66 lvalue::@1
b1:
//SEG67 [31] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -2909,7 +2909,7 @@ lvalue: {
//SEG70 lvalue::@2
b2:
//SEG71 [33] *((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_xby=coby2
lda #$3
lda #3
sta SCREEN,x
//SEG72 [34] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- xby=_inc_xby
inx
@ -3011,16 +3011,16 @@ main: {
}
//SEG17 lvaluevar
lvaluevar: {
.const b = $4
.const b = 4
.label screen = 2
//SEG18 [8] phi from lvaluevar to lvaluevar::@1
//SEG19 [8] phi (byte*) lvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG20 [8] phi (byte) lvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG21 lvaluevar::@1
b1:
//SEG22 [9] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -3032,13 +3032,13 @@ lvaluevar: {
//SEG25 lvaluevar::@2
b2:
//SEG26 [11] *((byte*) lvaluevar::screen#2) ← (const byte) lvaluevar::b#0 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #$0
ldy #0
lda #b
sta (screen),y
//SEG27 [12] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::i#2 lvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG28 [13] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -3055,9 +3055,9 @@ rvaluevar: {
lda #<$400
sta screen
lda #>$400
sta screen+$1
sta screen+1
//SEG35 [15] phi (byte) rvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG36 rvaluevar::@1
b1:
//SEG37 [16] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
@ -3069,12 +3069,12 @@ rvaluevar: {
//SEG40 rvaluevar::@2
b2:
//SEG41 [18] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- aby=_star_zpptrby1
ldy #$0
ldy #0
lda (screen),y
//SEG42 [19] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#1 ] -- zpptrby1=_inc_zpptrby1
inc screen
bne !+
inc screen+$1
inc screen+1
!:
//SEG43 [20] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -3089,10 +3089,10 @@ rvalue: {
//SEG48 [21] (byte) rvalue::b#0 ← * (const byte[1024]) rvalue::SCREEN#0 [ ] -- aby=_star_cowo1
lda SCREEN
//SEG49 [22] (byte) rvalue::b#1 ← * (const byte[1024]) rvalue::SCREEN#0+(byte) 1 [ ] -- aby=_star_cowo1
lda SCREEN+$1
lda SCREEN+1
//SEG50 [23] phi from rvalue to rvalue::@1
//SEG51 [23] phi (byte) rvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG52 rvalue::@1
b1:
//SEG53 [24] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -3115,14 +3115,14 @@ rvalue: {
lvalue: {
.const SCREEN = $400
//SEG62 [28] *((const byte[1024]) lvalue::SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG63 [29] *((const byte[1024]) lvalue::SCREEN#0+(byte) 1) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #$2
sta SCREEN+$1
lda #2
sta SCREEN+1
//SEG64 [30] phi from lvalue to lvalue::@1
//SEG65 [30] phi (byte) lvalue::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG66 lvalue::@1
b1:
//SEG67 [31] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- xby_lt_coby1_then_la1
@ -3134,7 +3134,7 @@ lvalue: {
//SEG70 lvalue::@2
b2:
//SEG71 [33] *((const byte[1024]) lvalue::SCREEN#0 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_xby=coby2
lda #$3
lda #3
sta SCREEN,x
//SEG72 [34] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- xby=_inc_xby
inx

View File

@ -1,7 +1,7 @@
jsr main
main: {
.const SCREEN = $400
ldx #$2
ldx #2
b1:
cpx #$a
bcc b2

View File

@ -534,7 +534,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 2 -- zpby1=coby1
lda #$2
lda #2
sta i
jmp b1
//SEG8 main::@1
@ -592,7 +592,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG8 main::@1
b1:
//SEG9 [3] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- xby_lt_coby1_then_la1
@ -631,7 +631,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG8 main::@1
b1:
//SEG9 [3] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- xby_lt_coby1_then_la1
@ -671,7 +671,7 @@ main: {
.const SCREEN = $400
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG8 main::@1
b1:
//SEG9 [3] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- xby_lt_coby1_then_la1
@ -721,7 +721,7 @@ main: {
.const SCREEN = $400
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 2 -- xby=coby1
ldx #$2
ldx #2
//SEG8 main::@1
b1:
//SEG9 [3] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- xby_lt_coby1_then_la1

View File

@ -1,15 +1,15 @@
.label s1 = 2
.label s3 = 3
lda #$2
ldy #$1
lda #2
ldy #1
jsr sum
sta s1
lda #$4
ldy #$3
lda #4
ldy #3
jsr sum
tax
lda #$d
ldy #$9
ldy #9
jsr sum
sta s3
txa

View File

@ -588,10 +588,10 @@ bbegin:
//SEG3 [8] phi from @begin to sum
sum_from_bbegin:
//SEG4 [8] phi (byte) sum::b#3 = (byte) 2 -- zpby1=coby1
lda #$2
lda #2
sta sum.b
//SEG5 [8] phi (byte) sum::a#3 = (byte) 1 -- zpby1=coby1
lda #$1
lda #1
sta sum.a
jsr sum
jmp b2
@ -604,10 +604,10 @@ b2:
//SEG9 [8] phi from @2 to sum
sum_from_b2:
//SEG10 [8] phi (byte) sum::b#3 = (byte) 4 -- zpby1=coby1
lda #$4
lda #4
sta sum.b
//SEG11 [8] phi (byte) sum::a#3 = (byte) 3 -- zpby1=coby1
lda #$3
lda #3
sta sum.a
jsr sum
jmp b3
@ -623,7 +623,7 @@ sum_from_b3:
lda #$d
sta sum.b
//SEG17 [8] phi (byte) sum::a#3 = (byte) 9 -- zpby1=coby1
lda #$9
lda #9
sta sum.a
jsr sum
jmp b4
@ -700,9 +700,9 @@ bbegin:
//SEG3 [8] phi from @begin to sum
sum_from_bbegin:
//SEG4 [8] phi (byte) sum::b#3 = (byte) 2 -- aby=coby1
lda #$2
lda #2
//SEG5 [8] phi (byte) sum::a#3 = (byte) 1 -- yby=coby1
ldy #$1
ldy #1
jsr sum
//SEG6 @2
b2:
@ -712,9 +712,9 @@ b2:
//SEG9 [8] phi from @2 to sum
sum_from_b2:
//SEG10 [8] phi (byte) sum::b#3 = (byte) 4 -- aby=coby1
lda #$4
lda #4
//SEG11 [8] phi (byte) sum::a#3 = (byte) 3 -- yby=coby1
ldy #$3
ldy #3
jsr sum
//SEG12 @3
b3:
@ -726,7 +726,7 @@ sum_from_b3:
//SEG16 [8] phi (byte) sum::b#3 = (byte) 13 -- aby=coby1
lda #$d
//SEG17 [8] phi (byte) sum::a#3 = (byte) 9 -- yby=coby1
ldy #$9
ldy #9
jsr sum
//SEG18 @4
b4:
@ -764,9 +764,9 @@ bbegin:
//SEG2 [0] call sum param-assignment [ sum::return#0 ]
//SEG3 [8] phi from @begin to sum
//SEG4 [8] phi (byte) sum::b#3 = (byte) 2 -- aby=coby1
lda #$2
lda #2
//SEG5 [8] phi (byte) sum::a#3 = (byte) 1 -- yby=coby1
ldy #$1
ldy #1
jsr sum
//SEG6 @2
b2:
@ -776,9 +776,9 @@ b2:
//SEG9 [8] phi from @2 to sum
sum_from_b2:
//SEG10 [8] phi (byte) sum::b#3 = (byte) 4 -- aby=coby1
lda #$4
lda #4
//SEG11 [8] phi (byte) sum::a#3 = (byte) 3 -- yby=coby1
ldy #$3
ldy #3
jsr sum
//SEG12 @3
b3:
@ -790,7 +790,7 @@ sum_from_b3:
//SEG16 [8] phi (byte) sum::b#3 = (byte) 13 -- aby=coby1
lda #$d
//SEG17 [8] phi (byte) sum::a#3 = (byte) 9 -- yby=coby1
ldy #$9
ldy #9
jsr sum
//SEG18 @4
b4:
@ -834,9 +834,9 @@ ASSEMBLER
//SEG2 [0] call sum param-assignment [ sum::return#0 ]
//SEG3 [8] phi from @begin to sum
//SEG4 [8] phi (byte) sum::b#3 = (byte) 2 -- aby=coby1
lda #$2
lda #2
//SEG5 [8] phi (byte) sum::a#3 = (byte) 1 -- yby=coby1
ldy #$1
ldy #1
jsr sum
//SEG6 @2
//SEG7 [1] (byte) s1#0 ← (byte) sum::return#0 [ s1#0 ] -- zpby1=aby
@ -844,9 +844,9 @@ ASSEMBLER
//SEG8 [2] call sum param-assignment [ s1#0 sum::return#0 ]
//SEG9 [8] phi from @2 to sum
//SEG10 [8] phi (byte) sum::b#3 = (byte) 4 -- aby=coby1
lda #$4
lda #4
//SEG11 [8] phi (byte) sum::a#3 = (byte) 3 -- yby=coby1
ldy #$3
ldy #3
jsr sum
//SEG12 @3
//SEG13 [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] -- xby=aby
@ -856,7 +856,7 @@ ASSEMBLER
//SEG16 [8] phi (byte) sum::b#3 = (byte) 13 -- aby=coby1
lda #$d
//SEG17 [8] phi (byte) sum::a#3 = (byte) 9 -- yby=coby1
ldy #$9
ldy #9
jsr sum
//SEG18 @4
//SEG19 [5] (byte) s3#0 ← (byte) sum::return#0 [ s1#0 s2#0 s3#0 ] -- zpby1=aby
@ -921,9 +921,9 @@ FINAL CODE
//SEG2 [0] call sum param-assignment [ sum::return#0 ]
//SEG3 [8] phi from @begin to sum
//SEG4 [8] phi (byte) sum::b#3 = (byte) 2 -- aby=coby1
lda #$2
lda #2
//SEG5 [8] phi (byte) sum::a#3 = (byte) 1 -- yby=coby1
ldy #$1
ldy #1
jsr sum
//SEG6 @2
//SEG7 [1] (byte) s1#0 ← (byte) sum::return#0 [ s1#0 ] -- zpby1=aby
@ -931,9 +931,9 @@ FINAL CODE
//SEG8 [2] call sum param-assignment [ s1#0 sum::return#0 ]
//SEG9 [8] phi from @2 to sum
//SEG10 [8] phi (byte) sum::b#3 = (byte) 4 -- aby=coby1
lda #$4
lda #4
//SEG11 [8] phi (byte) sum::a#3 = (byte) 3 -- yby=coby1
ldy #$3
ldy #3
jsr sum
//SEG12 @3
//SEG13 [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] -- xby=aby
@ -943,7 +943,7 @@ FINAL CODE
//SEG16 [8] phi (byte) sum::b#3 = (byte) 13 -- aby=coby1
lda #$d
//SEG17 [8] phi (byte) sum::a#3 = (byte) 9 -- yby=coby1
ldy #$9
ldy #9
jsr sum
//SEG18 @4
//SEG19 [5] (byte) s3#0 ← (byte) sum::return#0 [ s1#0 s2#0 s3#0 ] -- zpby1=aby

View File

@ -1,7 +1,7 @@
.const SCREEN = $400
jsr main
main: {
lda #$1
lda #1
sta SCREEN
rts
}

View File

@ -239,7 +239,7 @@ bend:
//SEG4 main
main: {
//SEG5 [1] *((const byte*) SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
jmp breturn
//SEG6 main::@return
@ -273,7 +273,7 @@ bend:
//SEG4 main
main: {
//SEG5 [1] *((const byte*) SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG6 main::@return
breturn:
@ -295,7 +295,7 @@ ASSEMBLER
//SEG4 main
main: {
//SEG5 [1] *((const byte*) SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG6 main::@return
//SEG7 [2] return [ ]
@ -321,7 +321,7 @@ FINAL CODE
//SEG4 main
main: {
//SEG5 [1] *((const byte*) SCREEN#0) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #$1
lda #1
sta SCREEN
//SEG6 main::@return
//SEG7 [2] return [ ]

View File

@ -7,34 +7,34 @@
.label numpoints = 8
jsr main
main: {
lda #$1
lda #1
sta addpoint.c
ldy #$5
lda #$0
ldy #5
lda #0
sta numpoints
lda #$5
lda #5
jsr addpoint
lda #$2
lda #2
sta addpoint.c
ldy #$8
ldy #8
lda #$f
jsr addpoint
lda #$3
lda #3
sta addpoint.c
ldy #$e
lda #$6
lda #6
jsr addpoint
lda #$4
lda #4
sta addpoint.c
ldy #$2
ldy #2
lda #$22
jsr addpoint
lda #$5
lda #5
sta addpoint.c
ldy #$11
lda #$15
jsr addpoint
lda #$7
lda #7
sta addpoint.c
ldy #$16
lda #$1f
@ -47,64 +47,64 @@ main: {
rts
}
animate: {
lda XPOS+$0
lda XPOS+0
clc
adc #$1
sta XPOS+$0
lda XPOS+$0
adc #1
sta XPOS+0
lda XPOS+0
cmp #$28
bne b1
lda #$0
sta XPOS+$0
lda #0
sta XPOS+0
b1:
lda YPOS+$0
lda YPOS+0
clc
adc #$1
sta YPOS+$0
lda YPOS+$0
adc #1
sta YPOS+0
lda YPOS+0
cmp #$19
bne b2
lda #$0
sta YPOS+$0
lda #0
sta YPOS+0
b2:
ldx XPOS+$1
ldx XPOS+1
dex
stx XPOS+$1
lda XPOS+$1
stx XPOS+1
lda XPOS+1
cmp #$ff
bne b3
lda #$28
sta XPOS+$1
sta XPOS+1
b3:
lda YPOS+$2
lda YPOS+2
clc
adc #$1
sta YPOS+$2
lda YPOS+$2
adc #1
sta YPOS+2
lda YPOS+2
cmp #$19
bne b4
lda #$0
sta YPOS+$2
lda #0
sta YPOS+2
b4:
ldx YPOS+$3
ldx YPOS+3
dex
stx YPOS+$3
lda YPOS+$3
stx YPOS+3
lda YPOS+3
cmp #$ff
bne breturn
lda #$19
sta YPOS+$3
lda XPOS+$3
sta YPOS+3
lda XPOS+3
clc
adc #$7
sta XPOS+$3
lda XPOS+$3
adc #7
sta XPOS+3
lda XPOS+3
cmp #$28
bcc breturn
lda XPOS+$3
lda XPOS+3
sec
sbc #$28
sta XPOS+$3
sta XPOS+3
breturn:
rts
}
@ -115,11 +115,11 @@ render: {
lda #<COLORS
sta colline
lda #>COLORS
sta colline+$1
lda #$0
sta colline+1
lda #0
sta y
b1:
lda #$0
lda #0
sta x
b2:
lda x
@ -139,7 +139,7 @@ render: {
adc #$28
sta colline
bcc !+
inc colline+$1
inc colline+1
!:
inc y
lda y
@ -154,10 +154,10 @@ findcol: {
.label yp = 11
.label diff = 7
.label mindiff = 6
ldy #$0
ldy #0
lda #$ff
sta mindiff
ldx #$0
ldx #0
b1:
lda XPOS,x
sta xp
@ -169,7 +169,7 @@ findcol: {
lda y
cmp yp
bne b2
ldy #$0
ldy #0
breturn:
rts
b2:
@ -223,16 +223,16 @@ initscreen: {
lda #<SCREEN
sta screen
lda #>SCREEN
sta screen+$1
sta screen+1
b1:
ldy #$0
ldy #0
lda #FILL
sta (screen),y
inc screen
bne !+
inc screen+$1
inc screen+1
!:
lda screen+$1
lda screen+1
cmp #>SCREEN+$3e8
bcc b1
bne !+

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,14 @@
.const SCREEN2 = $400+$28
jsr main
main: {
ldy #$0
ldy #0
b1:
tya
tax
inx
tya
clc
adc #$2
adc #2
sty sum.a
sta sum.c
jsr sum
@ -19,7 +19,7 @@ main: {
inx
tya
clc
adc #$2
adc #2
sty sum2.a
sta sum2.c
jsr sum2

View File

@ -1340,7 +1340,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- zpby1=coby1
lda #$0
lda #0
sta i
jmp b1
//SEG8 [2] phi from main::@4 to main::@1
@ -1352,12 +1352,12 @@ main: {
//SEG11 [3] (byte~) main::$0 ← (byte) main::i#2 + (byte) 1 [ main::i#2 main::$0 ] -- zpby1=zpby2_plus_1
lda i
clc
adc #$1
adc #1
sta _0
//SEG12 [4] (byte~) main::$1 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$0 main::$1 ] -- zpby1=zpby2_plus_coby1
lda i
clc
adc #$2
adc #2
sta _1
//SEG13 [5] (byte) sum::a#0 ← (byte) main::i#2 [ main::i#2 main::$0 main::$1 sum::a#0 ] -- zpby1=zpby2
lda i
@ -1383,12 +1383,12 @@ main: {
//SEG20 [11] (byte~) main::$3 ← (byte) main::i#2 + (byte) 1 [ main::i#2 main::$3 ] -- zpby1=zpby2_plus_1
lda i
clc
adc #$1
adc #1
sta _3
//SEG21 [12] (byte~) main::$4 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$3 main::$4 ] -- zpby1=zpby2_plus_coby1
lda i
clc
adc #$2
adc #2
sta _4
//SEG22 [13] (byte) sum2::a#0 ← (byte) main::i#2 [ main::i#2 main::$3 main::$4 sum2::a#0 ] -- zpby1=zpby2
lda i
@ -1543,7 +1543,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
jmp b1
//SEG8 [2] phi from main::@4 to main::@1
b1_from_b4:
@ -1557,7 +1557,7 @@ main: {
//SEG12 [4] (byte~) main::$1 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$0 main::$1 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG13 [5] (byte) sum::a#0 ← (byte) main::i#2 [ main::i#2 main::$0 main::$1 sum::a#0 ] -- zpby1=yby
sty sum.a
//SEG14 [6] (byte) sum::b#0 ← (byte~) main::$0 [ main::i#2 main::$1 sum::a#0 sum::b#0 ]
@ -1579,7 +1579,7 @@ main: {
//SEG21 [12] (byte~) main::$4 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$3 main::$4 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG22 [13] (byte) sum2::a#0 ← (byte) main::i#2 [ main::i#2 main::$3 main::$4 sum2::a#0 ] -- zpby1=yby
sty sum2.a
//SEG23 [14] (byte) sum2::b#0 ← (byte~) main::$3 [ main::i#2 main::$4 sum2::a#0 sum2::b#0 ]
@ -1657,7 +1657,7 @@ main: {
//SEG6 [2] phi from main to main::@1
b1_from_main:
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
jmp b1
//SEG8 [2] phi from main::@4 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -1670,7 +1670,7 @@ main: {
//SEG12 [4] (byte~) main::$1 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$0 main::$1 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG13 [5] (byte) sum::a#0 ← (byte) main::i#2 [ main::i#2 main::$0 main::$1 sum::a#0 ] -- zpby1=yby
sty sum.a
//SEG14 [6] (byte) sum::b#0 ← (byte~) main::$0 [ main::i#2 main::$1 sum::a#0 sum::b#0 ]
@ -1692,7 +1692,7 @@ main: {
//SEG21 [12] (byte~) main::$4 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$3 main::$4 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG22 [13] (byte) sum2::a#0 ← (byte) main::i#2 [ main::i#2 main::$3 main::$4 sum2::a#0 ] -- zpby1=yby
sty sum2.a
//SEG23 [14] (byte) sum2::b#0 ← (byte~) main::$3 [ main::i#2 main::$4 sum2::a#0 sum2::b#0 ]
@ -1772,7 +1772,7 @@ ASSEMBLER
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
jmp b1
//SEG8 [2] phi from main::@4 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -1785,7 +1785,7 @@ main: {
//SEG12 [4] (byte~) main::$1 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$0 main::$1 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG13 [5] (byte) sum::a#0 ← (byte) main::i#2 [ main::i#2 main::$0 main::$1 sum::a#0 ] -- zpby1=yby
sty sum.a
//SEG14 [6] (byte) sum::b#0 ← (byte~) main::$0 [ main::i#2 main::$1 sum::a#0 sum::b#0 ]
@ -1806,7 +1806,7 @@ main: {
//SEG21 [12] (byte~) main::$4 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$3 main::$4 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG22 [13] (byte) sum2::a#0 ← (byte) main::i#2 [ main::i#2 main::$3 main::$4 sum2::a#0 ] -- zpby1=yby
sty sum2.a
//SEG23 [14] (byte) sum2::b#0 ← (byte~) main::$3 [ main::i#2 main::$4 sum2::a#0 sum2::b#0 ]
@ -1875,7 +1875,7 @@ ASSEMBLER
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG8 [2] phi from main::@4 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG10 main::@1
@ -1887,7 +1887,7 @@ main: {
//SEG12 [4] (byte~) main::$1 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$0 main::$1 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG13 [5] (byte) sum::a#0 ← (byte) main::i#2 [ main::i#2 main::$0 main::$1 sum::a#0 ] -- zpby1=yby
sty sum.a
//SEG14 [6] (byte) sum::b#0 ← (byte~) main::$0 [ main::i#2 main::$1 sum::a#0 sum::b#0 ]
@ -1908,7 +1908,7 @@ main: {
//SEG21 [12] (byte~) main::$4 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$3 main::$4 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG22 [13] (byte) sum2::a#0 ← (byte) main::i#2 [ main::i#2 main::$3 main::$4 sum2::a#0 ] -- zpby1=yby
sty sum2.a
//SEG23 [14] (byte) sum2::b#0 ← (byte~) main::$3 [ main::i#2 main::$4 sum2::a#0 sum2::b#0 ]
@ -2035,7 +2035,7 @@ FINAL CODE
main: {
//SEG6 [2] phi from main to main::@1
//SEG7 [2] phi (byte) main::i#2 = (byte) 0 -- yby=coby1
ldy #$0
ldy #0
//SEG8 [2] phi from main::@4 to main::@1
//SEG9 [2] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
//SEG10 main::@1
@ -2047,7 +2047,7 @@ main: {
//SEG12 [4] (byte~) main::$1 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$0 main::$1 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG13 [5] (byte) sum::a#0 ← (byte) main::i#2 [ main::i#2 main::$0 main::$1 sum::a#0 ] -- zpby1=yby
sty sum.a
//SEG14 [6] (byte) sum::b#0 ← (byte~) main::$0 [ main::i#2 main::$1 sum::a#0 sum::b#0 ]
@ -2068,7 +2068,7 @@ main: {
//SEG21 [12] (byte~) main::$4 ← (byte) main::i#2 + (byte) 2 [ main::i#2 main::$3 main::$4 ] -- aby=yby_plus_coby1
tya
clc
adc #$2
adc #2
//SEG22 [13] (byte) sum2::a#0 ← (byte) main::i#2 [ main::i#2 main::$3 main::$4 sum2::a#0 ] -- zpby1=yby
sty sum2.a
//SEG23 [14] (byte) sum2::b#0 ← (byte~) main::$3 [ main::i#2 main::$4 sum2::a#0 sum2::b#0 ]