1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-04-09 21:37:31 +00:00

Changed ASM numbers to HEX

This commit is contained in:
jespergravgaard 2017-08-12 02:55:20 +02:00
parent 7555d45b34
commit 1577fe026e
36 changed files with 2561 additions and 2442 deletions

View File

@ -300,13 +300,13 @@ public class AsmFragment {
if (boundValue instanceof RegisterAllocation.Register) {
RegisterAllocation.Register register = (RegisterAllocation.Register) boundValue;
if (register instanceof RegisterAllocation.RegisterZpByte) {
bound = Integer.toString(((RegisterAllocation.RegisterZpByte) register).getZp());
bound = String.format("$%x", ((RegisterAllocation.RegisterZpByte) register).getZp());
} else if (register instanceof RegisterAllocation.RegisterZpWord) {
bound = Integer.toString(((RegisterAllocation.RegisterZpWord) register).getZp());
bound = String.format("$%x", ((RegisterAllocation.RegisterZpWord) register).getZp());
} else if (register instanceof RegisterAllocation.RegisterZpBool) {
bound = Integer.toString(((RegisterAllocation.RegisterZpBool) register).getZp());
bound = String.format("$%x", ((RegisterAllocation.RegisterZpBool) register).getZp());
} else if (register instanceof RegisterAllocation.RegisterZpPointerByte) {
bound = Integer.toString(((RegisterAllocation.RegisterZpPointerByte) register).getZp());
bound = String.format("$%x", ((RegisterAllocation.RegisterZpPointerByte) register).getZp());
} else {
throw new RuntimeException("Register Type not implemented " + register);
}
@ -317,7 +317,7 @@ public class AsmFragment {
Constant pointerConst = (Constant) pointer;
if (pointerConst instanceof ConstantInteger) {
ConstantInteger intPointer = (ConstantInteger) pointerConst;
bound = Integer.toString(intPointer.getNumber());
bound = String.format("$%x", intPointer.getNumber());
} else {
throw new RuntimeException("Bound Value Type not implemented " + boundValue);
}
@ -327,9 +327,9 @@ public class AsmFragment {
} else if (boundValue instanceof ConstantInteger) {
ConstantInteger boundInt = (ConstantInteger) boundValue;
if (boundInt.getType().equals(SymbolTypeBasic.BYTE)) {
bound = Integer.toString(boundInt.getNumber());
bound = String.format("$%x", boundInt.getNumber());
} else {
bound = Integer.toString(boundInt.getNumber());
bound = String.format("$%x", boundInt.getNumber());
}
} else if (boundValue instanceof Label) {
bound = ((Label) boundValue).getFullName().replace('@', 'B').replace(':', '_');
@ -449,7 +449,6 @@ public class AsmFragment {
return new AsmInstruction(type, parameter);
}
@Override
public Object visitExprBinary(Asm6502Parser.ExprBinaryContext ctx) {
Object left = this.visit(ctx.expr(0));
@ -465,7 +464,8 @@ public class AsmFragment {
@Override
public Object visitExprInt(Asm6502Parser.ExprIntContext ctx) {
return NumberParser.parseLiteral(ctx.NUMINT().getText()).toString();
Number number = NumberParser.parseLiteral(ctx.NUMINT().getText());
return String.format("$%x", number);
}
@Override

View File

@ -1,8 +1,12 @@
byte[15] fibs = $1100;
fibs[0] = 0;
fibs[1] = 1;
byte i = 0;
do {
fibs[i+2] = fibs[i]+fibs[i+1];
i = i + 1;
} while(i<15)
main();
void main() {
fibs[0] = 0;
fibs[1] = 1;
byte i = 0;
do {
fibs[i+2] = fibs[i]+fibs[i+1];
} while(++i<15)
}

View File

@ -1,47 +1,48 @@
BBEGIN:
B1_from_BBEGIN:
lda #0
sta 5
ldx #12
sta 4
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #$0
sta $5
ldx #$c
lda #$0
sta $4
lda #<$400
sta $2
lda #>$400
sta $2+$1
B1_from_B3:
B1:
ldy #0
lda #81
sta (2),y
inc 4
inc 2
ldy #$0
lda #$51
sta ($2),y
inc $4
inc $2
bne !+
inc 2+1
inc $2+$1
!:
txa
clc
adc #24
adc #$18
tax
cpx #39
cpx #$27
bcs B2
B3_from_B1:
B3:
lda 4
cmp #40
lda $4
cmp #$28
bcc B1_from_B3
BEND:
B2:
inc 5
lda 2
inc $5
lda $2
clc
adc #40
sta 2
adc #$28
sta $2
bcc !+
inc 2+1
inc $2+$1
!:
txa
sec
sbc #39
sbc #$27
tax
B3_from_B2:
jmp B3

View File

@ -1091,19 +1091,19 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 6
lda #$0
sta $6
//SEG3 [0] phi (byte) e#3 = (byte) 12 -- zpby1=coby1
lda #12
sta 5
lda #$c
sta $5
//SEG4 [0] phi (byte) x#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 4
lda #$0
sta $4
//SEG5 [0] phi (byte*) cursor#3 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
jmp B1
//SEG6 [0] phi from @3 to @1
B1_from_B3:
@ -1115,24 +1115,24 @@ B1_from_B3:
//SEG11 @1
B1:
//SEG12 [1] *((byte*) cursor#3) ← (byte) 81 [ cursor#3 x#2 e#3 y#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #81
sta (2),y
ldy #$0
lda #$51
sta ($2),y
//SEG13 [2] (byte) x#1 ← (byte) x#2 + (byte) 1 [ x#1 cursor#3 e#3 y#2 ] -- zpby1=zpby1_plus_1
inc 4
inc $4
//SEG14 [3] (byte*) cursor#1 ← (byte*) cursor#3 + (byte) 1 [ x#1 e#3 cursor#1 y#2 ] -- zpptrby1=zpptrby1_plus_1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG15 [4] (byte) e#1 ← (byte) e#3 + (byte) 24 [ x#1 e#1 cursor#1 y#2 ] -- zpby1=zpby1_plus_coby1
lda 5
lda $5
clc
adc #24
sta 5
adc #$18
sta $5
//SEG16 [5] if((byte) 39<(byte) e#1) goto @2 [ x#1 e#1 cursor#1 y#2 ] -- coby1_lt_zpby1_then_la1
lda #39
cmp 5
lda #$27
cmp $5
bcc B2
//SEG17 [6] phi from @1 to @3
B3_from_B1:
@ -1143,8 +1143,8 @@ B3_from_B1:
//SEG21 @3
B3:
//SEG22 [7] if((byte) x#1<(byte) 40) goto @1 [ cursor#5 x#1 e#5 y#4 ] -- zpby1_lt_coby1_then_la1
lda 4
cmp #40
lda $4
cmp #$28
bcc B1_from_B3
jmp BEND
//SEG23 @END
@ -1152,20 +1152,20 @@ BEND:
//SEG24 @2
B2:
//SEG25 [8] (byte) y#1 ← (byte) y#2 + (byte) 1 [ x#1 e#1 cursor#1 y#1 ] -- zpby1=zpby1_plus_1
inc 6
inc $6
//SEG26 [9] (byte*) cursor#2 ← (byte*) cursor#1 + (byte) 40 [ x#1 e#1 cursor#2 y#1 ] -- zpptrby1=zpptrby1_plus_coby1
lda 2
lda $2
clc
adc #40
sta 2
adc #$28
sta $2
bcc !+
inc 2+1
inc $2+$1
!:
//SEG27 [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] -- zpby1=zpby1_minus_coby1
lda 5
lda $5
sec
sbc #39
sta 5
sbc #$27
sta $5
//SEG28 [6] phi from @2 to @3
B3_from_B2:
//SEG29 [6] phi (byte) y#4 = (byte) y#1 -- register_copy
@ -1208,18 +1208,18 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 5
lda #$0
sta $5
//SEG3 [0] phi (byte) e#3 = (byte) 12 -- xby=coby1
ldx #12
ldx #$c
//SEG4 [0] phi (byte) x#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 4
lda #$0
sta $4
//SEG5 [0] phi (byte*) cursor#3 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
jmp B1
//SEG6 [0] phi from @3 to @1
B1_from_B3:
@ -1230,23 +1230,23 @@ B1_from_B3:
//SEG11 @1
B1:
//SEG12 [1] *((byte*) cursor#3) ← (byte) 81 [ cursor#3 x#2 e#3 y#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #81
sta (2),y
ldy #$0
lda #$51
sta ($2),y
//SEG13 [2] (byte) x#1 ← (byte) x#2 + (byte) 1 [ x#1 cursor#3 e#3 y#2 ] -- zpby1=zpby1_plus_1
inc 4
inc $4
//SEG14 [3] (byte*) cursor#1 ← (byte*) cursor#3 + (byte) 1 [ x#1 e#3 cursor#1 y#2 ] -- zpptrby1=zpptrby1_plus_1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG15 [4] (byte) e#1 ← (byte) e#3 + (byte) 24 [ x#1 e#1 cursor#1 y#2 ] -- xby=xby_plus_coby1
txa
clc
adc #24
adc #$18
tax
//SEG16 [5] if((byte) 39<(byte) e#1) goto @2 [ x#1 e#1 cursor#1 y#2 ] -- coby1_lt_xby_then_la1
cpx #39
cpx #$27
bcs B2
//SEG17 [6] phi from @1 to @3
B3_from_B1:
@ -1256,111 +1256,27 @@ B3_from_B1:
//SEG21 @3
B3:
//SEG22 [7] if((byte) x#1<(byte) 40) goto @1 [ cursor#5 x#1 e#5 y#4 ] -- zpby1_lt_coby1_then_la1
lda 4
cmp #40
lda $4
cmp #$28
bcc B1_from_B3
//SEG23 @END
BEND:
//SEG24 @2
B2:
//SEG25 [8] (byte) y#1 ← (byte) y#2 + (byte) 1 [ x#1 e#1 cursor#1 y#1 ] -- zpby1=zpby1_plus_1
inc 5
inc $5
//SEG26 [9] (byte*) cursor#2 ← (byte*) cursor#1 + (byte) 40 [ x#1 e#1 cursor#2 y#1 ] -- zpptrby1=zpptrby1_plus_coby1
lda 2
lda $2
clc
adc #40
sta 2
adc #$28
sta $2
bcc !+
inc 2+1
inc $2+$1
!:
//SEG27 [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] -- xby=xby_minus_coby1
txa
sec
sbc #39
tax
//SEG28 [6] phi from @2 to @3
B3_from_B2:
//SEG29 [6] phi (byte) y#4 = (byte) y#1 -- register_copy
//SEG30 [6] phi (byte) e#5 = (byte) e#2 -- register_copy
//SEG31 [6] phi (byte*) cursor#5 = (byte*) cursor#2 -- register_copy
jmp B3
Removing instruction lda #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
ASSEMBLER
//SEG0 @BEGIN
BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 5
//SEG3 [0] phi (byte) e#3 = (byte) 12 -- xby=coby1
ldx #12
//SEG4 [0] phi (byte) x#2 = (byte) 0 -- zpby1=coby1
sta 4
//SEG5 [0] phi (byte*) cursor#3 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
jmp B1
//SEG6 [0] phi from @3 to @1
B1_from_B3:
//SEG7 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
//SEG8 [0] phi (byte) e#3 = (byte) e#5 -- register_copy
//SEG9 [0] phi (byte) x#2 = (byte) x#1 -- register_copy
//SEG10 [0] phi (byte*) cursor#3 = (byte*) cursor#5 -- register_copy
//SEG11 @1
B1:
//SEG12 [1] *((byte*) cursor#3) ← (byte) 81 [ cursor#3 x#2 e#3 y#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #81
sta (2),y
//SEG13 [2] (byte) x#1 ← (byte) x#2 + (byte) 1 [ x#1 cursor#3 e#3 y#2 ] -- zpby1=zpby1_plus_1
inc 4
//SEG14 [3] (byte*) cursor#1 ← (byte*) cursor#3 + (byte) 1 [ x#1 e#3 cursor#1 y#2 ] -- zpptrby1=zpptrby1_plus_1
inc 2
bne !+
inc 2+1
!:
//SEG15 [4] (byte) e#1 ← (byte) e#3 + (byte) 24 [ x#1 e#1 cursor#1 y#2 ] -- xby=xby_plus_coby1
txa
clc
adc #24
tax
//SEG16 [5] if((byte) 39<(byte) e#1) goto @2 [ x#1 e#1 cursor#1 y#2 ] -- coby1_lt_xby_then_la1
cpx #39
bcs B2
//SEG17 [6] phi from @1 to @3
B3_from_B1:
//SEG18 [6] phi (byte) y#4 = (byte) y#2 -- register_copy
//SEG19 [6] phi (byte) e#5 = (byte) e#1 -- register_copy
//SEG20 [6] phi (byte*) cursor#5 = (byte*) cursor#1 -- register_copy
//SEG21 @3
B3:
//SEG22 [7] if((byte) x#1<(byte) 40) goto @1 [ cursor#5 x#1 e#5 y#4 ] -- zpby1_lt_coby1_then_la1
lda 4
cmp #40
bcc B1_from_B3
//SEG23 @END
BEND:
//SEG24 @2
B2:
//SEG25 [8] (byte) y#1 ← (byte) y#2 + (byte) 1 [ x#1 e#1 cursor#1 y#1 ] -- zpby1=zpby1_plus_1
inc 5
//SEG26 [9] (byte*) cursor#2 ← (byte*) cursor#1 + (byte) 40 [ x#1 e#1 cursor#2 y#1 ] -- zpptrby1=zpptrby1_plus_coby1
lda 2
clc
adc #40
sta 2
bcc !+
inc 2+1
!:
//SEG27 [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] -- xby=xby_minus_coby1
txa
sec
sbc #39
sbc #$27
tax
//SEG28 [6] phi from @2 to @3
B3_from_B2:
@ -1377,17 +1293,18 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 5
lda #$0
sta $5
//SEG3 [0] phi (byte) e#3 = (byte) 12 -- xby=coby1
ldx #12
ldx #$c
//SEG4 [0] phi (byte) x#2 = (byte) 0 -- zpby1=coby1
sta 4
lda #$0
sta $4
//SEG5 [0] phi (byte*) cursor#3 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
//SEG6 [0] phi from @3 to @1
B1_from_B3:
//SEG7 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
@ -1397,23 +1314,23 @@ B1_from_B3:
//SEG11 @1
B1:
//SEG12 [1] *((byte*) cursor#3) ← (byte) 81 [ cursor#3 x#2 e#3 y#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #81
sta (2),y
ldy #$0
lda #$51
sta ($2),y
//SEG13 [2] (byte) x#1 ← (byte) x#2 + (byte) 1 [ x#1 cursor#3 e#3 y#2 ] -- zpby1=zpby1_plus_1
inc 4
inc $4
//SEG14 [3] (byte*) cursor#1 ← (byte*) cursor#3 + (byte) 1 [ x#1 e#3 cursor#1 y#2 ] -- zpptrby1=zpptrby1_plus_1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG15 [4] (byte) e#1 ← (byte) e#3 + (byte) 24 [ x#1 e#1 cursor#1 y#2 ] -- xby=xby_plus_coby1
txa
clc
adc #24
adc #$18
tax
//SEG16 [5] if((byte) 39<(byte) e#1) goto @2 [ x#1 e#1 cursor#1 y#2 ] -- coby1_lt_xby_then_la1
cpx #39
cpx #$27
bcs B2
//SEG17 [6] phi from @1 to @3
B3_from_B1:
@ -1423,27 +1340,27 @@ B3_from_B1:
//SEG21 @3
B3:
//SEG22 [7] if((byte) x#1<(byte) 40) goto @1 [ cursor#5 x#1 e#5 y#4 ] -- zpby1_lt_coby1_then_la1
lda 4
cmp #40
lda $4
cmp #$28
bcc B1_from_B3
//SEG23 @END
BEND:
//SEG24 @2
B2:
//SEG25 [8] (byte) y#1 ← (byte) y#2 + (byte) 1 [ x#1 e#1 cursor#1 y#1 ] -- zpby1=zpby1_plus_1
inc 5
inc $5
//SEG26 [9] (byte*) cursor#2 ← (byte*) cursor#1 + (byte) 40 [ x#1 e#1 cursor#2 y#1 ] -- zpptrby1=zpptrby1_plus_coby1
lda 2
lda $2
clc
adc #40
sta 2
adc #$28
sta $2
bcc !+
inc 2+1
inc $2+$1
!:
//SEG27 [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] -- xby=xby_minus_coby1
txa
sec
sbc #39
sbc #$27
tax
//SEG28 [6] phi from @2 to @3
B3_from_B2:
@ -1495,17 +1412,18 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) y#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 5
lda #$0
sta $5
//SEG3 [0] phi (byte) e#3 = (byte) 12 -- xby=coby1
ldx #12
ldx #$c
//SEG4 [0] phi (byte) x#2 = (byte) 0 -- zpby1=coby1
sta 4
lda #$0
sta $4
//SEG5 [0] phi (byte*) cursor#3 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
//SEG6 [0] phi from @3 to @1
B1_from_B3:
//SEG7 [0] phi (byte) y#2 = (byte) y#4 -- register_copy
@ -1515,23 +1433,23 @@ B1_from_B3:
//SEG11 @1
B1:
//SEG12 [1] *((byte*) cursor#3) ← (byte) 81 [ cursor#3 x#2 e#3 y#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #81
sta (2),y
ldy #$0
lda #$51
sta ($2),y
//SEG13 [2] (byte) x#1 ← (byte) x#2 + (byte) 1 [ x#1 cursor#3 e#3 y#2 ] -- zpby1=zpby1_plus_1
inc 4
inc $4
//SEG14 [3] (byte*) cursor#1 ← (byte*) cursor#3 + (byte) 1 [ x#1 e#3 cursor#1 y#2 ] -- zpptrby1=zpptrby1_plus_1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG15 [4] (byte) e#1 ← (byte) e#3 + (byte) 24 [ x#1 e#1 cursor#1 y#2 ] -- xby=xby_plus_coby1
txa
clc
adc #24
adc #$18
tax
//SEG16 [5] if((byte) 39<(byte) e#1) goto @2 [ x#1 e#1 cursor#1 y#2 ] -- coby1_lt_xby_then_la1
cpx #39
cpx #$27
bcs B2
//SEG17 [6] phi from @1 to @3
B3_from_B1:
@ -1541,27 +1459,27 @@ B3_from_B1:
//SEG21 @3
B3:
//SEG22 [7] if((byte) x#1<(byte) 40) goto @1 [ cursor#5 x#1 e#5 y#4 ] -- zpby1_lt_coby1_then_la1
lda 4
cmp #40
lda $4
cmp #$28
bcc B1_from_B3
//SEG23 @END
BEND:
//SEG24 @2
B2:
//SEG25 [8] (byte) y#1 ← (byte) y#2 + (byte) 1 [ x#1 e#1 cursor#1 y#1 ] -- zpby1=zpby1_plus_1
inc 5
inc $5
//SEG26 [9] (byte*) cursor#2 ← (byte*) cursor#1 + (byte) 40 [ x#1 e#1 cursor#2 y#1 ] -- zpptrby1=zpptrby1_plus_coby1
lda 2
lda $2
clc
adc #40
sta 2
adc #$28
sta $2
bcc !+
inc 2+1
inc $2+$1
!:
//SEG27 [10] (byte) e#2 ← (byte) e#1 - (byte) 39 [ x#1 cursor#2 e#2 y#1 ] -- xby=xby_minus_coby1
txa
sec
sbc #39
sbc #$27
tax
//SEG28 [6] phi from @2 to @3
B3_from_B2:

View File

@ -1,17 +1,21 @@
BBEGIN:
lda #0
sta 4352
lda #1
sta 4353
B1_from_BBEGIN:
ldx #0
B1_from_B1:
B1:
lda 4352,x
clc
adc 4353,x
sta 4354,x
inx
cpx #15
bcc B1_from_B1
jsr main
BEND:
main:
lda #$0
sta $1100
lda #$1
sta $1101
main__B1_from_main:
ldx #$0
main__B1_from_B1:
main__B1:
lda $1100,x
clc
adc $1101,x
sta $1102,x
inx
cpx #$f
bcc main__B1_from_B1
main__Breturn:
rts

View File

@ -1,14 +1,20 @@
@BEGIN: from
[0] *((word) 4352) ← (byte) 0 [ ]
[1] *((word) 4353) ← (byte) 1 [ ]
to:@1
@1: from @1 @BEGIN
[2] (byte) i#2 ← phi( @1/(byte) i#1 @BEGIN/(byte) 0 ) [ i#2 ]
[3] (byte~) $1 ← (word) 4352 *idx (byte) i#2 [ i#2 $1 ]
[4] (byte~) $3 ← (word) 4353 *idx (byte) i#2 [ i#2 $1 $3 ]
[5] (byte~) $4 ← (byte~) $1 + (byte~) $3 [ i#2 $4 ]
[6] *((word) 4354 + (byte) i#2) ← (byte~) $4 [ i#2 ]
[7] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ]
[8] if((byte) i#1<(byte) 15) goto @1 [ i#1 ]
[0] call main param-assignment [ ]
to:@END
@END: from @1
@END: from @BEGIN
main: from @BEGIN
[1] *((word) 4352) ← (byte) 0 [ ]
[2] *((word) 4353) ← (byte) 1 [ ]
to:main::@1
main::@1: from main main::@1
[3] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 ) [ main::i#2 ]
[4] (byte~) main::$1 ← (word) 4352 *idx (byte) main::i#2 [ main::i#2 main::$1 ]
[5] (byte~) main::$3 ← (word) 4353 *idx (byte) main::i#2 [ main::i#2 main::$1 main::$3 ]
[6] (byte~) main::$4 ← (byte~) main::$1 + (byte~) main::$3 [ main::i#2 main::$4 ]
[7] *((word) 4354 + (byte) main::i#2) ← (byte~) main::$4 [ main::i#2 ]
[8] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ]
[9] if((byte) main::i#1<(byte) 15) goto main::@1 [ main::i#1 ]
to:main::@return
main::@return: from main::@1
[10] return [ ]
to:@RETURN

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,17 @@
(byte~) $1 reg byte a 11.0
(byte~) $3 reg byte alu 22.0
(byte~) $4 reg byte a 22.0
(label) @1
(label) @BEGIN
(label) @END
(byte[15]) fibs
(byte) i
(byte) i#1 reg byte x 16.5
(byte) i#2 reg byte x 11.0
(void()) main()
(byte~) main::$1 reg byte a 11.0
(byte~) main::$3 reg byte alu 22.0
(byte~) main::$4 reg byte a 22.0
(label) main::@1
(label) main::@return
(byte) main::i
(byte) main::i#1 reg byte x 16.5
(byte) main::i#2 reg byte x 11.0
reg byte x [ i#2 i#1 ]
reg byte a [ $1 ]
reg byte alu [ $3 ]
reg byte a [ $4 ]
reg byte x [ main::i#2 main::i#1 ]
reg byte a [ main::$1 ]
reg byte alu [ main::$3 ]
reg byte a [ main::$4 ]

View File

@ -4,23 +4,23 @@ BEND:
main:
jsr prepare
main__B3_from_main:
ldx #25
ldx #$19
jmp main__B3
main__B3_from_B11:
ldx #25
ldx #$19
main__B3_from_B3:
main__B3_from_B6:
main__B3:
lda 53266
cmp #254
lda $d012
cmp #$fe
bne main__B3_from_B3
main__B4:
lda 53266
cmp #255
lda $d012
cmp #$ff
bne main__B4
main__B6:
dex
cpx #0
cpx #$0
bne main__B3_from_B6
main__B7:
jsr flip
@ -32,86 +32,86 @@ main__Breturn:
rts
plot:
plot__B1_from_plot:
lda #16
sta 4
lda #<1236
sta 2
lda #>1236
sta 2+1
ldx #0
lda #$10
sta $4
lda #<$4d4
sta $2
lda #>$4d4
sta $2+$1
ldx #$0
plot__B1_from_B3:
plot__B1:
plot__B2_from_B1:
ldy #0
ldy #$0
plot__B2_from_B2:
plot__B2:
lda 4096,x
sta (2),y
lda $1000,x
sta ($2),y
inx
iny
cpy #16
cpy #$10
bcc plot__B2_from_B2
plot__B3:
lda 2
lda $2
clc
adc #40
sta 2
adc #$28
sta $2
bcc !+
inc 2+1
inc $2+$1
!:
dec 4
lda 4
dec $4
lda $4
bne plot__B1_from_B3
plot__Breturn:
rts
flip:
flip__B1_from_flip:
lda #16
sta 4
ldy #15
ldx #0
lda #$10
sta $4
ldy #$f
ldx #$0
flip__B1_from_B4:
flip__B1:
flip__B2_from_B1:
lda #16
sta 5
lda #$10
sta $5
flip__B2_from_B2:
flip__B2:
lda 4096,x
sta 4352,y
lda $1000,x
sta $1100,y
inx
tya
clc
adc #16
adc #$10
tay
dec 5
lda 5
dec $5
lda $5
bne flip__B2_from_B2
flip__B4:
dey
dec 4
lda 4
dec $4
lda $4
bne flip__B1_from_B4
flip__B3_from_B4:
ldx #0
ldx #$0
flip__B3_from_B3:
flip__B3:
lda 4352,x
sta 4096,x
lda $1100,x
sta $1000,x
inx
cpx #0
cpx #$0
bne flip__B3_from_B3
flip__Breturn:
rts
prepare:
prepare__B1_from_prepare:
ldx #0
ldx #$0
prepare__B1_from_B1:
prepare__B1:
txa
sta 4096,x
sta $1000,x
inx
cpx #0
cpx #$0
bne prepare__B1_from_B1
prepare__Breturn:
rts

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,22 @@
BBEGIN:
B1_from_BBEGIN:
lda #0
ldx #10
lda #$0
ldx #$a
B1_from_B3:
B1:
cpx #5
cpx #$5
beq !+
bcs B2
!:
B3_from_B1:
B3:
dex
cpx #0
cpx #$0
bne B1_from_B3
BEND:
B2:
stx 255
stx $ff
clc
adc 255
adc $ff
B3_from_B2:
jmp B3

View File

@ -386,11 +386,11 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) s#2 = (byte) 0 -- zpby1=coby1
lda #0
sta 3
lda #$0
sta $3
//SEG3 [0] phi (byte) i#2 = (byte) 10 -- zpby1=coby1
lda #10
sta 2
lda #$a
sta $2
jmp B1
//SEG4 [0] phi from @3 to @1
B1_from_B3:
@ -400,8 +400,8 @@ B1_from_B3:
//SEG7 @1
B1:
//SEG8 [1] if((byte) i#2>(byte) 5) goto @2 [ i#2 s#2 ] -- zpby1_gt_coby1_then_la1
lda 2
cmp #5
lda $2
cmp #$5
beq !+
bcs B2
!:
@ -412,9 +412,9 @@ B3_from_B1:
//SEG11 @3
B3:
//SEG12 [3] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG13 [4] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne B1_from_B3
jmp BEND
//SEG14 @END
@ -422,10 +422,10 @@ BEND:
//SEG15 @2
B2:
//SEG16 [5] (byte) s#1 ← (byte) s#2 + (byte) i#2 [ i#2 s#1 ] -- zpby1=zpby1_plus_zpby2
lda 3
lda $3
clc
adc 2
sta 3
adc $2
sta $3
//SEG17 [2] phi from @2 to @3
B3_from_B2:
//SEG18 [2] phi (byte) s#4 = (byte) s#1 -- register_copy
@ -449,9 +449,9 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #0
lda #$0
//SEG3 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #10
ldx #$a
jmp B1
//SEG4 [0] phi from @3 to @1
B1_from_B3:
@ -460,7 +460,7 @@ B1_from_B3:
//SEG7 @1
B1:
//SEG8 [1] if((byte) i#2>(byte) 5) goto @2 [ i#2 s#2 ] -- xby_gt_coby1_then_la1
cpx #5
cpx #$5
beq !+
bcs B2
!:
@ -472,16 +472,16 @@ B3:
//SEG12 [3] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG13 [4] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne B1_from_B3
//SEG14 @END
BEND:
//SEG15 @2
B2:
//SEG16 [5] (byte) s#1 ← (byte) s#2 + (byte) i#2 [ i#2 s#1 ] -- aby=aby_plus_xby
stx 255
stx $ff
clc
adc 255
adc $ff
//SEG17 [2] phi from @2 to @3
B3_from_B2:
//SEG18 [2] phi (byte) s#4 = (byte) s#1 -- register_copy
@ -495,9 +495,9 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #0
lda #$0
//SEG3 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #10
ldx #$a
//SEG4 [0] phi from @3 to @1
B1_from_B3:
//SEG5 [0] phi (byte) s#2 = (byte) s#4 -- register_copy
@ -505,7 +505,7 @@ B1_from_B3:
//SEG7 @1
B1:
//SEG8 [1] if((byte) i#2>(byte) 5) goto @2 [ i#2 s#2 ] -- xby_gt_coby1_then_la1
cpx #5
cpx #$5
beq !+
bcs B2
!:
@ -517,16 +517,16 @@ B3:
//SEG12 [3] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG13 [4] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne B1_from_B3
//SEG14 @END
BEND:
//SEG15 @2
B2:
//SEG16 [5] (byte) s#1 ← (byte) s#2 + (byte) i#2 [ i#2 s#1 ] -- aby=aby_plus_xby
stx 255
stx $ff
clc
adc 255
adc $ff
//SEG17 [2] phi from @2 to @3
B3_from_B2:
//SEG18 [2] phi (byte) s#4 = (byte) s#1 -- register_copy
@ -555,9 +555,9 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) s#2 = (byte) 0 -- aby=coby1
lda #0
lda #$0
//SEG3 [0] phi (byte) i#2 = (byte) 10 -- xby=coby1
ldx #10
ldx #$a
//SEG4 [0] phi from @3 to @1
B1_from_B3:
//SEG5 [0] phi (byte) s#2 = (byte) s#4 -- register_copy
@ -565,7 +565,7 @@ B1_from_B3:
//SEG7 @1
B1:
//SEG8 [1] if((byte) i#2>(byte) 5) goto @2 [ i#2 s#2 ] -- xby_gt_coby1_then_la1
cpx #5
cpx #$5
beq !+
bcs B2
!:
@ -577,16 +577,16 @@ B3:
//SEG12 [3] (byte) i#1 ← -- (byte) i#2 [ i#1 s#4 ] -- xby=_dec_xby
dex
//SEG13 [4] if((byte) i#1>(byte) 0) goto @1 [ i#1 s#4 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne B1_from_B3
//SEG14 @END
BEND:
//SEG15 @2
B2:
//SEG16 [5] (byte) s#1 ← (byte) s#2 + (byte) i#2 [ i#2 s#1 ] -- aby=aby_plus_xby
stx 255
stx $ff
clc
adc 255
adc $ff
//SEG17 [2] phi from @2 to @3
B3_from_B2:
//SEG18 [2] phi (byte) s#4 = (byte) s#1 -- register_copy

View File

@ -3,24 +3,24 @@ BBEGIN:
BEND:
main:
main__B1_from_main:
ldy #100
ldy #$64
main__B1_from_B3:
main__B1:
jsr nest
main__B3:
dey
cpy #0
cpy #$0
bne main__B1_from_B3
main__Breturn:
rts
nest:
nest__B1_from_nest:
ldx #100
ldx #$64
nest__B1_from_B1:
nest__B1:
stx 1024
stx $400
dex
cpx #0
cpx #$0
bne nest__B1_from_B1
nest__Breturn:
rts

View File

@ -748,8 +748,8 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 2
lda #$64
sta $2
jmp main__B1
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
@ -763,9 +763,9 @@ main__B1:
//SEG10 main::@3
main__B3:
//SEG11 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG12 [4] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne main__B1_from_B3
jmp main__Breturn
//SEG13 main::@return
@ -777,8 +777,8 @@ nest:
//SEG16 [6] phi from nest to nest::@1
nest__B1_from_nest:
//SEG17 [6] phi (byte) nest::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 3
lda #$64
sta $3
jmp nest__B1
//SEG18 [6] phi from nest::@1 to nest::@1
nest__B1_from_B1:
@ -787,12 +787,12 @@ nest__B1_from_B1:
//SEG20 nest::@1
nest__B1:
//SEG21 [7] *((word) 1024) ← (byte) nest::j#2 [ main::i#2 nest::j#2 ] -- _star_cowo1=zpby1
lda 3
sta 1024
lda $3
sta $400
//SEG22 [8] (byte) nest::j#1 ← -- (byte) nest::j#2 [ main::i#2 nest::j#1 ] -- zpby1=_dec_zpby1
dec 3
dec $3
//SEG23 [9] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ main::i#2 nest::j#1 ] -- zpby1_gt_0_then_la1
lda 3
lda $3
bne nest__B1_from_B1
jmp nest__Breturn
//SEG24 nest::@return
@ -831,7 +831,7 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- yby=coby1
ldy #100
ldy #$64
jmp main__B1
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
@ -845,7 +845,7 @@ main__B3:
//SEG11 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG12 [4] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #0
cpy #$0
bne main__B1_from_B3
//SEG13 main::@return
main__Breturn:
@ -856,7 +856,7 @@ nest:
//SEG16 [6] phi from nest to nest::@1
nest__B1_from_nest:
//SEG17 [6] phi (byte) nest::j#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
jmp nest__B1
//SEG18 [6] phi from nest::@1 to nest::@1
nest__B1_from_B1:
@ -864,11 +864,11 @@ nest__B1_from_B1:
//SEG20 nest::@1
nest__B1:
//SEG21 [7] *((word) 1024) ← (byte) nest::j#2 [ main::i#2 nest::j#2 ] -- _star_cowo1=xby
stx 1024
stx $400
//SEG22 [8] (byte) nest::j#1 ← -- (byte) nest::j#2 [ main::i#2 nest::j#1 ] -- xby=_dec_xby
dex
//SEG23 [9] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ main::i#2 nest::j#1 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne nest__B1_from_B1
//SEG24 nest::@return
nest__Breturn:
@ -890,7 +890,7 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- yby=coby1
ldy #100
ldy #$64
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
//SEG7 [1] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -903,7 +903,7 @@ main__B3:
//SEG11 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG12 [4] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #0
cpy #$0
bne main__B1_from_B3
//SEG13 main::@return
main__Breturn:
@ -914,18 +914,18 @@ nest:
//SEG16 [6] phi from nest to nest::@1
nest__B1_from_nest:
//SEG17 [6] phi (byte) nest::j#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
//SEG18 [6] phi from nest::@1 to nest::@1
nest__B1_from_B1:
//SEG19 [6] phi (byte) nest::j#2 = (byte) nest::j#1 -- register_copy
//SEG20 nest::@1
nest__B1:
//SEG21 [7] *((word) 1024) ← (byte) nest::j#2 [ main::i#2 nest::j#2 ] -- _star_cowo1=xby
stx 1024
stx $400
//SEG22 [8] (byte) nest::j#1 ← -- (byte) nest::j#2 [ main::i#2 nest::j#1 ] -- xby=_dec_xby
dex
//SEG23 [9] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ main::i#2 nest::j#1 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne nest__B1_from_B1
//SEG24 nest::@return
nest__Breturn:
@ -965,7 +965,7 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- yby=coby1
ldy #100
ldy #$64
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
//SEG7 [1] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -978,7 +978,7 @@ main__B3:
//SEG11 [3] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- yby=_dec_yby
dey
//SEG12 [4] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- yby_gt_0_then_la1
cpy #0
cpy #$0
bne main__B1_from_B3
//SEG13 main::@return
main__Breturn:
@ -989,18 +989,18 @@ nest:
//SEG16 [6] phi from nest to nest::@1
nest__B1_from_nest:
//SEG17 [6] phi (byte) nest::j#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
//SEG18 [6] phi from nest::@1 to nest::@1
nest__B1_from_B1:
//SEG19 [6] phi (byte) nest::j#2 = (byte) nest::j#1 -- register_copy
//SEG20 nest::@1
nest__B1:
//SEG21 [7] *((word) 1024) ← (byte) nest::j#2 [ main::i#2 nest::j#2 ] -- _star_cowo1=xby
stx 1024
stx $400
//SEG22 [8] (byte) nest::j#1 ← -- (byte) nest::j#2 [ main::i#2 nest::j#1 ] -- xby=_dec_xby
dex
//SEG23 [9] if((byte) nest::j#1>(byte) 0) goto nest::@1 [ main::i#2 nest::j#1 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne nest__B1_from_B1
//SEG24 nest::@return
nest__Breturn:

View File

@ -3,64 +3,64 @@ BBEGIN:
BEND:
main:
main__B1_from_main:
lda #100
sta 2
lda #$64
sta $2
main__B1_from_B3:
main__B1:
main__B2_from_B1:
lda #100
sta 3
lda #$64
sta $3
main__B2_from_B5:
main__B2:
jsr nest1
main__B5:
dec 3
lda 3
dec $3
lda $3
bne main__B2_from_B5
main__B3:
dec 2
lda 2
dec $2
lda $2
bne main__B1_from_B3
main__Breturn:
rts
nest1:
nest1__B1_from_nest1:
lda #100
sta 4
lda #$64
sta $4
nest1__B1_from_B3:
nest1__B1:
nest1__B2_from_B1:
lda #100
lda #$64
nest1__B2_from_B5:
nest1__B2:
jsr nest2
nest1__B5:
sec
sbc #1
cmp #0
sbc #$1
cmp #$0
bne nest1__B2_from_B5
nest1__B3:
dec 4
lda 4
dec $4
lda $4
bne nest1__B1_from_B3
nest1__Breturn:
rts
nest2:
nest2__B1_from_nest2:
ldx #100
ldx #$64
nest2__B1_from_B3:
nest2__B1:
nest2__B2_from_B1:
ldy #100
ldy #$64
nest2__B2_from_B2:
nest2__B2:
sty 1024
sty $400
dey
cpy #0
cpy #$0
bne nest2__B2_from_B2
nest2__B3:
dex
cpx #0
cpx #$0
bne nest2__B1_from_B3
nest2__Breturn:
rts

View File

@ -1941,8 +1941,8 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 2
lda #$64
sta $2
jmp main__B1
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
@ -1953,8 +1953,8 @@ main__B1:
//SEG9 [2] phi from main::@1 to main::@2
main__B2_from_B1:
//SEG10 [2] phi (byte) main::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 3
lda #$64
sta $3
jmp main__B2
//SEG11 [2] phi from main::@5 to main::@2
main__B2_from_B5:
@ -1968,17 +1968,17 @@ main__B2:
//SEG15 main::@5
main__B5:
//SEG16 [4] (byte) main::j#1 ← -- (byte) main::j#2 [ main::j#1 main::i#2 ] -- zpby1=_dec_zpby1
dec 3
dec $3
//SEG17 [5] if((byte) main::j#1>(byte) 0) goto main::@2 [ main::j#1 main::i#2 ] -- zpby1_gt_0_then_la1
lda 3
lda $3
bne main__B2_from_B5
jmp main__B3
//SEG18 main::@3
main__B3:
//SEG19 [6] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG20 [7] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne main__B1_from_B3
jmp main__Breturn
//SEG21 main::@return
@ -1990,8 +1990,8 @@ nest1:
//SEG24 [9] phi from nest1 to nest1::@1
nest1__B1_from_nest1:
//SEG25 [9] phi (byte) nest1::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 4
lda #$64
sta $4
jmp nest1__B1
//SEG26 [9] phi from nest1::@3 to nest1::@1
nest1__B1_from_B3:
@ -2002,8 +2002,8 @@ nest1__B1:
//SEG29 [10] phi from nest1::@1 to nest1::@2
nest1__B2_from_B1:
//SEG30 [10] phi (byte) nest1::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 5
lda #$64
sta $5
jmp nest1__B2
//SEG31 [10] phi from nest1::@5 to nest1::@2
nest1__B2_from_B5:
@ -2017,17 +2017,17 @@ nest1__B2:
//SEG35 nest1::@5
nest1__B5:
//SEG36 [12] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- zpby1=_dec_zpby1
dec 5
dec $5
//SEG37 [13] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- zpby1_gt_0_then_la1
lda 5
lda $5
bne nest1__B2_from_B5
jmp nest1__B3
//SEG38 nest1::@3
nest1__B3:
//SEG39 [14] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1=_dec_zpby1
dec 4
dec $4
//SEG40 [15] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1_gt_0_then_la1
lda 4
lda $4
bne nest1__B1_from_B3
jmp nest1__Breturn
//SEG41 nest1::@return
@ -2039,8 +2039,8 @@ nest2:
//SEG44 [17] phi from nest2 to nest2::@1
nest2__B1_from_nest2:
//SEG45 [17] phi (byte) nest2::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 6
lda #$64
sta $6
jmp nest2__B1
//SEG46 [17] phi from nest2::@3 to nest2::@1
nest2__B1_from_B3:
@ -2051,8 +2051,8 @@ nest2__B1:
//SEG49 [18] phi from nest2::@1 to nest2::@2
nest2__B2_from_B1:
//SEG50 [18] phi (byte) nest2::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 7
lda #$64
sta $7
jmp nest2__B2
//SEG51 [18] phi from nest2::@2 to nest2::@2
nest2__B2_from_B2:
@ -2061,20 +2061,20 @@ nest2__B2_from_B2:
//SEG53 nest2::@2
nest2__B2:
//SEG54 [19] *((word) 1024) ← (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#2 nest2::i#2 ] -- _star_cowo1=zpby1
lda 7
sta 1024
lda $7
sta $400
//SEG55 [20] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- zpby1=_dec_zpby1
dec 7
dec $7
//SEG56 [21] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- zpby1_gt_0_then_la1
lda 7
lda $7
bne nest2__B2_from_B2
jmp nest2__B3
//SEG57 nest2::@3
nest2__B3:
//SEG58 [22] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- zpby1=_dec_zpby1
dec 6
dec $6
//SEG59 [23] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- zpby1_gt_0_then_la1
lda 6
lda $6
bne nest2__B1_from_B3
jmp nest2__Breturn
//SEG60 nest2::@return
@ -2128,8 +2128,8 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 2
lda #$64
sta $2
jmp main__B1
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
@ -2139,8 +2139,8 @@ main__B1:
//SEG9 [2] phi from main::@1 to main::@2
main__B2_from_B1:
//SEG10 [2] phi (byte) main::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 3
lda #$64
sta $3
jmp main__B2
//SEG11 [2] phi from main::@5 to main::@2
main__B2_from_B5:
@ -2152,16 +2152,16 @@ main__B2:
//SEG15 main::@5
main__B5:
//SEG16 [4] (byte) main::j#1 ← -- (byte) main::j#2 [ main::j#1 main::i#2 ] -- zpby1=_dec_zpby1
dec 3
dec $3
//SEG17 [5] if((byte) main::j#1>(byte) 0) goto main::@2 [ main::j#1 main::i#2 ] -- zpby1_gt_0_then_la1
lda 3
lda $3
bne main__B2_from_B5
//SEG18 main::@3
main__B3:
//SEG19 [6] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG20 [7] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne main__B1_from_B3
//SEG21 main::@return
main__Breturn:
@ -2172,8 +2172,8 @@ nest1:
//SEG24 [9] phi from nest1 to nest1::@1
nest1__B1_from_nest1:
//SEG25 [9] phi (byte) nest1::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 4
lda #$64
sta $4
jmp nest1__B1
//SEG26 [9] phi from nest1::@3 to nest1::@1
nest1__B1_from_B3:
@ -2183,7 +2183,7 @@ nest1__B1:
//SEG29 [10] phi from nest1::@1 to nest1::@2
nest1__B2_from_B1:
//SEG30 [10] phi (byte) nest1::j#2 = (byte) 100 -- aby=coby1
lda #100
lda #$64
jmp nest1__B2
//SEG31 [10] phi from nest1::@5 to nest1::@2
nest1__B2_from_B5:
@ -2196,16 +2196,16 @@ nest1__B2:
nest1__B5:
//SEG36 [12] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- aby=_dec_aby
sec
sbc #1
sbc #$1
//SEG37 [13] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- aby_gt_0_then_la1
cmp #0
cmp #$0
bne nest1__B2_from_B5
//SEG38 nest1::@3
nest1__B3:
//SEG39 [14] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1=_dec_zpby1
dec 4
dec $4
//SEG40 [15] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1_gt_0_then_la1
lda 4
lda $4
bne nest1__B1_from_B3
//SEG41 nest1::@return
nest1__Breturn:
@ -2216,7 +2216,7 @@ nest2:
//SEG44 [17] phi from nest2 to nest2::@1
nest2__B1_from_nest2:
//SEG45 [17] phi (byte) nest2::i#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
jmp nest2__B1
//SEG46 [17] phi from nest2::@3 to nest2::@1
nest2__B1_from_B3:
@ -2226,7 +2226,7 @@ nest2__B1:
//SEG49 [18] phi from nest2::@1 to nest2::@2
nest2__B2_from_B1:
//SEG50 [18] phi (byte) nest2::j#2 = (byte) 100 -- yby=coby1
ldy #100
ldy #$64
jmp nest2__B2
//SEG51 [18] phi from nest2::@2 to nest2::@2
nest2__B2_from_B2:
@ -2234,18 +2234,18 @@ nest2__B2_from_B2:
//SEG53 nest2::@2
nest2__B2:
//SEG54 [19] *((word) 1024) ← (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#2 nest2::i#2 ] -- _star_cowo1=yby
sty 1024
sty $400
//SEG55 [20] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- yby=_dec_yby
dey
//SEG56 [21] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- yby_gt_0_then_la1
cpy #0
cpy #$0
bne nest2__B2_from_B2
//SEG57 nest2::@3
nest2__B3:
//SEG58 [22] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- xby=_dec_xby
dex
//SEG59 [23] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne nest2__B1_from_B3
//SEG60 nest2::@return
nest2__Breturn:
@ -2271,8 +2271,8 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 2
lda #$64
sta $2
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
//SEG7 [1] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -2281,8 +2281,8 @@ main__B1:
//SEG9 [2] phi from main::@1 to main::@2
main__B2_from_B1:
//SEG10 [2] phi (byte) main::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 3
lda #$64
sta $3
//SEG11 [2] phi from main::@5 to main::@2
main__B2_from_B5:
//SEG12 [2] phi (byte) main::j#2 = (byte) main::j#1 -- register_copy
@ -2293,16 +2293,16 @@ main__B2:
//SEG15 main::@5
main__B5:
//SEG16 [4] (byte) main::j#1 ← -- (byte) main::j#2 [ main::j#1 main::i#2 ] -- zpby1=_dec_zpby1
dec 3
dec $3
//SEG17 [5] if((byte) main::j#1>(byte) 0) goto main::@2 [ main::j#1 main::i#2 ] -- zpby1_gt_0_then_la1
lda 3
lda $3
bne main__B2_from_B5
//SEG18 main::@3
main__B3:
//SEG19 [6] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG20 [7] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne main__B1_from_B3
//SEG21 main::@return
main__Breturn:
@ -2313,8 +2313,8 @@ nest1:
//SEG24 [9] phi from nest1 to nest1::@1
nest1__B1_from_nest1:
//SEG25 [9] phi (byte) nest1::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 4
lda #$64
sta $4
//SEG26 [9] phi from nest1::@3 to nest1::@1
nest1__B1_from_B3:
//SEG27 [9] phi (byte) nest1::i#2 = (byte) nest1::i#1 -- register_copy
@ -2323,7 +2323,7 @@ nest1__B1:
//SEG29 [10] phi from nest1::@1 to nest1::@2
nest1__B2_from_B1:
//SEG30 [10] phi (byte) nest1::j#2 = (byte) 100 -- aby=coby1
lda #100
lda #$64
//SEG31 [10] phi from nest1::@5 to nest1::@2
nest1__B2_from_B5:
//SEG32 [10] phi (byte) nest1::j#2 = (byte) nest1::j#1 -- register_copy
@ -2335,16 +2335,16 @@ nest1__B2:
nest1__B5:
//SEG36 [12] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- aby=_dec_aby
sec
sbc #1
sbc #$1
//SEG37 [13] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- aby_gt_0_then_la1
cmp #0
cmp #$0
bne nest1__B2_from_B5
//SEG38 nest1::@3
nest1__B3:
//SEG39 [14] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1=_dec_zpby1
dec 4
dec $4
//SEG40 [15] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1_gt_0_then_la1
lda 4
lda $4
bne nest1__B1_from_B3
//SEG41 nest1::@return
nest1__Breturn:
@ -2355,7 +2355,7 @@ nest2:
//SEG44 [17] phi from nest2 to nest2::@1
nest2__B1_from_nest2:
//SEG45 [17] phi (byte) nest2::i#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
//SEG46 [17] phi from nest2::@3 to nest2::@1
nest2__B1_from_B3:
//SEG47 [17] phi (byte) nest2::i#2 = (byte) nest2::i#1 -- register_copy
@ -2364,25 +2364,25 @@ nest2__B1:
//SEG49 [18] phi from nest2::@1 to nest2::@2
nest2__B2_from_B1:
//SEG50 [18] phi (byte) nest2::j#2 = (byte) 100 -- yby=coby1
ldy #100
ldy #$64
//SEG51 [18] phi from nest2::@2 to nest2::@2
nest2__B2_from_B2:
//SEG52 [18] phi (byte) nest2::j#2 = (byte) nest2::j#1 -- register_copy
//SEG53 nest2::@2
nest2__B2:
//SEG54 [19] *((word) 1024) ← (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#2 nest2::i#2 ] -- _star_cowo1=yby
sty 1024
sty $400
//SEG55 [20] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- yby=_dec_yby
dey
//SEG56 [21] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- yby_gt_0_then_la1
cpy #0
cpy #$0
bne nest2__B2_from_B2
//SEG57 nest2::@3
nest2__B3:
//SEG58 [22] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- xby=_dec_xby
dex
//SEG59 [23] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne nest2__B1_from_B3
//SEG60 nest2::@return
nest2__Breturn:
@ -2448,8 +2448,8 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 2
lda #$64
sta $2
//SEG6 [1] phi from main::@3 to main::@1
main__B1_from_B3:
//SEG7 [1] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -2458,8 +2458,8 @@ main__B1:
//SEG9 [2] phi from main::@1 to main::@2
main__B2_from_B1:
//SEG10 [2] phi (byte) main::j#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 3
lda #$64
sta $3
//SEG11 [2] phi from main::@5 to main::@2
main__B2_from_B5:
//SEG12 [2] phi (byte) main::j#2 = (byte) main::j#1 -- register_copy
@ -2470,16 +2470,16 @@ main__B2:
//SEG15 main::@5
main__B5:
//SEG16 [4] (byte) main::j#1 ← -- (byte) main::j#2 [ main::j#1 main::i#2 ] -- zpby1=_dec_zpby1
dec 3
dec $3
//SEG17 [5] if((byte) main::j#1>(byte) 0) goto main::@2 [ main::j#1 main::i#2 ] -- zpby1_gt_0_then_la1
lda 3
lda $3
bne main__B2_from_B5
//SEG18 main::@3
main__B3:
//SEG19 [6] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG20 [7] if((byte) main::i#1>(byte) 0) goto main::@1 [ main::i#1 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne main__B1_from_B3
//SEG21 main::@return
main__Breturn:
@ -2490,8 +2490,8 @@ nest1:
//SEG24 [9] phi from nest1 to nest1::@1
nest1__B1_from_nest1:
//SEG25 [9] phi (byte) nest1::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 4
lda #$64
sta $4
//SEG26 [9] phi from nest1::@3 to nest1::@1
nest1__B1_from_B3:
//SEG27 [9] phi (byte) nest1::i#2 = (byte) nest1::i#1 -- register_copy
@ -2500,7 +2500,7 @@ nest1__B1:
//SEG29 [10] phi from nest1::@1 to nest1::@2
nest1__B2_from_B1:
//SEG30 [10] phi (byte) nest1::j#2 = (byte) 100 -- aby=coby1
lda #100
lda #$64
//SEG31 [10] phi from nest1::@5 to nest1::@2
nest1__B2_from_B5:
//SEG32 [10] phi (byte) nest1::j#2 = (byte) nest1::j#1 -- register_copy
@ -2512,16 +2512,16 @@ nest1__B2:
nest1__B5:
//SEG36 [12] (byte) nest1::j#1 ← -- (byte) nest1::j#2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- aby=_dec_aby
sec
sbc #1
sbc #$1
//SEG37 [13] if((byte) nest1::j#1>(byte) 0) goto nest1::@2 [ main::j#2 main::i#2 nest1::j#1 nest1::i#2 ] -- aby_gt_0_then_la1
cmp #0
cmp #$0
bne nest1__B2_from_B5
//SEG38 nest1::@3
nest1__B3:
//SEG39 [14] (byte) nest1::i#1 ← -- (byte) nest1::i#2 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1=_dec_zpby1
dec 4
dec $4
//SEG40 [15] if((byte) nest1::i#1>(byte) 0) goto nest1::@1 [ main::j#2 main::i#2 nest1::i#1 ] -- zpby1_gt_0_then_la1
lda 4
lda $4
bne nest1__B1_from_B3
//SEG41 nest1::@return
nest1__Breturn:
@ -2532,7 +2532,7 @@ nest2:
//SEG44 [17] phi from nest2 to nest2::@1
nest2__B1_from_nest2:
//SEG45 [17] phi (byte) nest2::i#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
//SEG46 [17] phi from nest2::@3 to nest2::@1
nest2__B1_from_B3:
//SEG47 [17] phi (byte) nest2::i#2 = (byte) nest2::i#1 -- register_copy
@ -2541,25 +2541,25 @@ nest2__B1:
//SEG49 [18] phi from nest2::@1 to nest2::@2
nest2__B2_from_B1:
//SEG50 [18] phi (byte) nest2::j#2 = (byte) 100 -- yby=coby1
ldy #100
ldy #$64
//SEG51 [18] phi from nest2::@2 to nest2::@2
nest2__B2_from_B2:
//SEG52 [18] phi (byte) nest2::j#2 = (byte) nest2::j#1 -- register_copy
//SEG53 nest2::@2
nest2__B2:
//SEG54 [19] *((word) 1024) ← (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#2 nest2::i#2 ] -- _star_cowo1=yby
sty 1024
sty $400
//SEG55 [20] (byte) nest2::j#1 ← -- (byte) nest2::j#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- yby=_dec_yby
dey
//SEG56 [21] if((byte) nest2::j#1>(byte) 0) goto nest2::@2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::j#1 nest2::i#2 ] -- yby_gt_0_then_la1
cpy #0
cpy #$0
bne nest2__B2_from_B2
//SEG57 nest2::@3
nest2__B3:
//SEG58 [22] (byte) nest2::i#1 ← -- (byte) nest2::i#2 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- xby=_dec_xby
dex
//SEG59 [23] if((byte) nest2::i#1>(byte) 0) goto nest2::@1 [ main::j#2 main::i#2 nest1::j#2 nest1::i#2 nest2::i#1 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne nest2__B1_from_B3
//SEG60 nest2::@return
nest2__Breturn:

View File

@ -3,16 +3,16 @@ BBEGIN:
BEND:
main:
main__B1_from_main:
ldy #0
ldx #100
ldy #$0
ldx #$64
main__B1:
dex
cpx #0
cpx #$0
bne main__B2
main__Breturn:
rts
main__B2:
cpx #50
cpx #$32
beq !+
bcs main__B4
!:

View File

@ -547,18 +547,18 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::s#3 = (byte) 0 -- zpby1=coby1
lda #0
sta 3
lda #$0
sta $3
//SEG6 [1] phi (byte) main::i#2 = (byte) 100 -- zpby1=coby1
lda #100
sta 2
lda #$64
sta $2
jmp main__B1
//SEG7 main::@1
main__B1:
//SEG8 [2] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 main::s#3 ] -- zpby1=_dec_zpby1
dec 2
dec $2
//SEG9 [3] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::i#1 main::s#3 ] -- zpby1_gt_0_then_la1
lda 2
lda $2
bne main__B2
jmp main__Breturn
//SEG10 main::@return
@ -568,8 +568,8 @@ main__Breturn:
//SEG12 main::@2
main__B2:
//SEG13 [5] if((byte) main::i#1>(byte) 50) goto main::@4 [ main::i#1 main::s#3 ] -- zpby1_gt_coby1_then_la1
lda 2
cmp #50
lda $2
cmp #$32
beq !+
bcs main__B4
!:
@ -577,7 +577,7 @@ main__B2:
//SEG14 main::@5
main__B5:
//SEG15 [6] (byte) main::s#2 ← -- (byte) main::s#3 [ main::i#1 main::s#2 ] -- zpby1=_dec_zpby1
dec 3
dec $3
//SEG16 [1] phi from main::@5 to main::@1
main__B1_from_B5:
//SEG17 [1] phi (byte) main::s#3 = (byte) main::s#2 -- register_copy
@ -586,7 +586,7 @@ main__B1_from_B5:
//SEG19 main::@4
main__B4:
//SEG20 [7] (byte) main::s#1 ← ++ (byte) main::s#3 [ main::i#1 main::s#1 ] -- zpby1=_inc_zpby1
inc 3
inc $3
//SEG21 [1] phi from main::@4 to main::@1
main__B1_from_B4:
//SEG22 [1] phi (byte) main::s#3 = (byte) main::s#1 -- register_copy
@ -620,15 +620,15 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::s#3 = (byte) 0 -- yby=coby1
ldy #0
ldy #$0
//SEG6 [1] phi (byte) main::i#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
//SEG7 main::@1
main__B1:
//SEG8 [2] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 main::s#3 ] -- xby=_dec_xby
dex
//SEG9 [3] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::i#1 main::s#3 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne main__B2
//SEG10 main::@return
main__Breturn:
@ -637,7 +637,7 @@ main__Breturn:
//SEG12 main::@2
main__B2:
//SEG13 [5] if((byte) main::i#1>(byte) 50) goto main::@4 [ main::i#1 main::s#3 ] -- xby_gt_coby1_then_la1
cpx #50
cpx #$32
beq !+
bcs main__B4
!:
@ -692,15 +692,15 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::s#3 = (byte) 0 -- yby=coby1
ldy #0
ldy #$0
//SEG6 [1] phi (byte) main::i#2 = (byte) 100 -- xby=coby1
ldx #100
ldx #$64
//SEG7 main::@1
main__B1:
//SEG8 [2] (byte) main::i#1 ← -- (byte) main::i#2 [ main::i#1 main::s#3 ] -- xby=_dec_xby
dex
//SEG9 [3] if((byte) main::i#1>(byte) 0) goto main::@2 [ main::i#1 main::s#3 ] -- xby_gt_0_then_la1
cpx #0
cpx #$0
bne main__B2
//SEG10 main::@return
main__Breturn:
@ -709,7 +709,7 @@ main__Breturn:
//SEG12 main::@2
main__B2:
//SEG13 [5] if((byte) main::i#1>(byte) 50) goto main::@4 [ main::i#1 main::s#3 ] -- xby_gt_coby1_then_la1
cpx #50
cpx #$32
beq !+
bcs main__B4
!:

View File

@ -1,13 +1,13 @@
BBEGIN:
B1_from_BBEGIN:
ldx #5
ldx #$5
B1_from_B1:
B1:
txa
clc
adc #4
sta 4352,x
adc #$4
sta $1100,x
inx
cpx #10
cpx #$a
bcc B1_from_B1
BEND:

View File

@ -314,8 +314,8 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) i#2 = (byte) 5 -- zpby1=coby1
lda #5
sta 2
lda #$5
sta $2
jmp B1
//SEG3 [0] phi from @1 to @1
B1_from_B1:
@ -324,19 +324,19 @@ B1_from_B1:
//SEG5 @1
B1:
//SEG6 [1] (byte~) $1 ← (byte) i#2 + (byte) 4 [ i#2 $1 ] -- zpby1=zpby2_plus_coby1
lda 2
lda $2
clc
adc #4
sta 3
adc #$4
sta $3
//SEG7 [2] *((word) 4352 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_zpby1=zpby2
lda 3
ldx 2
sta 4352,x
lda $3
ldx $2
sta $1100,x
//SEG8 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- zpby1=zpby1_plus_1
inc 2
inc $2
//SEG9 [4] if((byte) i#1<(byte) 10) goto @1 [ i#1 ] -- zpby1_lt_coby1_then_la1
lda 2
cmp #10
lda $2
cmp #$a
bcc B1_from_B1
jmp BEND
//SEG10 @END
@ -362,7 +362,7 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #5
ldx #$5
jmp B1
//SEG3 [0] phi from @1 to @1
B1_from_B1:
@ -372,13 +372,13 @@ B1:
//SEG6 [1] (byte~) $1 ← (byte) i#2 + (byte) 4 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #4
adc #$4
//SEG7 [2] *((word) 4352 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta 4352,x
sta $1100,x
//SEG8 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
inx
//SEG9 [4] if((byte) i#1<(byte) 10) goto @1 [ i#1 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc B1_from_B1
//SEG10 @END
BEND:
@ -391,7 +391,7 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #5
ldx #$5
//SEG3 [0] phi from @1 to @1
B1_from_B1:
//SEG4 [0] phi (byte) i#2 = (byte) i#1 -- register_copy
@ -400,13 +400,13 @@ B1:
//SEG6 [1] (byte~) $1 ← (byte) i#2 + (byte) 4 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #4
adc #$4
//SEG7 [2] *((word) 4352 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta 4352,x
sta $1100,x
//SEG8 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
inx
//SEG9 [4] if((byte) i#1<(byte) 10) goto @1 [ i#1 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc B1_from_B1
//SEG10 @END
BEND:
@ -430,7 +430,7 @@ BBEGIN:
//SEG1 [0] phi from @BEGIN to @1
B1_from_BBEGIN:
//SEG2 [0] phi (byte) i#2 = (byte) 5 -- xby=coby1
ldx #5
ldx #$5
//SEG3 [0] phi from @1 to @1
B1_from_B1:
//SEG4 [0] phi (byte) i#2 = (byte) i#1 -- register_copy
@ -439,13 +439,13 @@ B1:
//SEG6 [1] (byte~) $1 ← (byte) i#2 + (byte) 4 [ i#2 $1 ] -- aby=xby_plus_coby1
txa
clc
adc #4
adc #$4
//SEG7 [2] *((word) 4352 + (byte) i#2) ← (byte~) $1 [ i#2 ] -- cowo1_staridx_xby=aby
sta 4352,x
sta $1100,x
//SEG8 [3] (byte) i#1 ← (byte) i#2 + (byte) 1 [ i#1 ] -- xby=xby_plus_1
inx
//SEG9 [4] if((byte) i#1<(byte) 10) goto @1 [ i#1 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc B1_from_B1
//SEG10 @END
BEND:

View File

@ -3,16 +3,16 @@ BBEGIN:
BEND:
main:
inccnt_from_main:
ldy #0
ldx #0
ldy #$0
ldx #$0
jsr inccnt
main__B1:
sta 1024
sta $400
inx
inccnt_from_B1:
jsr inccnt
main__B2:
sta 1025
sta $401
main__Breturn:
rts
inccnt:

View File

@ -731,25 +731,25 @@ main:
//SEG5 [9] phi from main to inccnt
inccnt_from_main:
//SEG6 [9] phi (byte) cnt2#11 = (byte) 0 -- zpby1=coby1
lda #0
sta 3
lda #$0
sta $3
//SEG7 [9] phi (byte) cnt#12 = (byte) 0 -- zpby1=coby1
lda #0
sta 2
lda #$0
sta $2
jsr inccnt
jmp main__B1
//SEG8 main::@1
main__B1:
//SEG9 [2] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 ] -- zpby1=zpby2
lda 7
sta 4
lda $7
sta $4
//SEG10 [3] *((word) 1024) ← (byte~) main::$0 [ cnt#1 cnt2#1 ] -- _star_cowo1=zpby1
lda 4
sta 1024
lda $4
sta $400
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 ] -- zpby1=_inc_zpby2
lda 6
sta 2
inc 2
lda $6
sta $2
inc $2
//SEG12 [5] call inccnt param-assignment [ inccnt::return#0 ]
//SEG13 [9] phi from main::@1 to inccnt
inccnt_from_B1:
@ -760,11 +760,11 @@ inccnt_from_B1:
//SEG16 main::@2
main__B2:
//SEG17 [6] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ] -- zpby1=zpby2
lda 7
sta 5
lda $7
sta $5
//SEG18 [7] *((word) 1025) ← (byte~) main::$1 [ ] -- _star_cowo1=zpby1
lda 5
sta 1025
lda $5
sta $401
jmp main__Breturn
//SEG19 main::@return
main__Breturn:
@ -773,14 +773,14 @@ main__Breturn:
//SEG21 inccnt
inccnt:
//SEG22 [10] (byte) cnt#1 ← ++ (byte) cnt#12 [ cnt#1 cnt2#11 ] -- zpby1=_inc_zpby2
lda 2
sta 6
inc 6
lda $2
sta $6
inc $6
//SEG23 [11] (byte) cnt2#1 ← ++ (byte) cnt2#11 [ cnt#1 cnt2#1 ] -- zpby1=_inc_zpby1
inc 3
inc $3
//SEG24 [12] (byte) inccnt::return#0 ← (byte) cnt#1 [ inccnt::return#0 cnt#1 cnt2#1 ] -- zpby1=zpby2
lda 6
sta 7
lda $6
sta $7
jmp inccnt__Breturn
//SEG25 inccnt::@return
inccnt__Breturn:
@ -822,16 +822,16 @@ main:
//SEG5 [9] phi from main to inccnt
inccnt_from_main:
//SEG6 [9] phi (byte) cnt2#11 = (byte) 0 -- yby=coby1
ldy #0
ldy #$0
//SEG7 [9] phi (byte) cnt#12 = (byte) 0 -- xby=coby1
ldx #0
ldx #$0
jsr inccnt
//SEG8 main::@1
main__B1:
//SEG9 [2] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 ]
// (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a
//SEG10 [3] *((word) 1024) ← (byte~) main::$0 [ cnt#1 cnt2#1 ] -- _star_cowo1=aby
sta 1024
sta $400
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 ] -- xby=_inc_xby
inx
//SEG12 [5] call inccnt param-assignment [ inccnt::return#0 ]
@ -845,7 +845,7 @@ main__B2:
//SEG17 [6] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ]
// (byte~) main::$1 = (byte) inccnt::return#0 // register copy reg byte a
//SEG18 [7] *((word) 1025) ← (byte~) main::$1 [ ] -- _star_cowo1=aby
sta 1025
sta $401
//SEG19 main::@return
main__Breturn:
//SEG20 [8] return [ ]
@ -905,16 +905,16 @@ main:
//SEG5 [9] phi from main to inccnt
inccnt_from_main:
//SEG6 [9] phi (byte) cnt2#11 = (byte) 0 -- yby=coby1
ldy #0
ldy #$0
//SEG7 [9] phi (byte) cnt#12 = (byte) 0 -- xby=coby1
ldx #0
ldx #$0
jsr inccnt
//SEG8 main::@1
main__B1:
//SEG9 [2] (byte~) main::$0 ← (byte) inccnt::return#0 [ main::$0 cnt#1 cnt2#1 ]
// (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a
//SEG10 [3] *((word) 1024) ← (byte~) main::$0 [ cnt#1 cnt2#1 ] -- _star_cowo1=aby
sta 1024
sta $400
//SEG11 [4] (byte) cnt#3 ← ++ (byte) cnt#1 [ cnt#3 cnt2#1 ] -- xby=_inc_xby
inx
//SEG12 [5] call inccnt param-assignment [ inccnt::return#0 ]
@ -928,7 +928,7 @@ main__B2:
//SEG17 [6] (byte~) main::$1 ← (byte) inccnt::return#0 [ main::$1 ]
// (byte~) main::$1 = (byte) inccnt::return#0 // register copy reg byte a
//SEG18 [7] *((word) 1025) ← (byte~) main::$1 [ ] -- _star_cowo1=aby
sta 1025
sta $401
//SEG19 main::@return
main__Breturn:
//SEG20 [8] return [ ]

View File

@ -3,16 +3,16 @@ BBEGIN:
BEND:
main:
inccnt_from_main:
ldx #0
ldx #$0
jsr inccnt
main__B1:
stx 1024
stx $400
inx
inccnt_from_B1:
jsr inccnt
main__B2:
inx
stx 1025
stx $401
main__Breturn:
rts
inccnt:

View File

@ -571,19 +571,19 @@ main:
//SEG5 [8] phi from main to inccnt
inccnt_from_main:
//SEG6 [8] phi (byte) cnt#13 = (byte) 0 -- zpby1=coby1
lda #0
sta 2
lda #$0
sta $2
jsr inccnt
jmp main__B1
//SEG7 main::@1
main__B1:
//SEG8 [2] *((word) 1024) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=zpby1
lda 4
sta 1024
lda $4
sta $400
//SEG9 [3] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- zpby1=_inc_zpby2
lda 4
sta 2
inc 2
lda $4
sta $2
inc $2
//SEG10 [4] call inccnt param-assignment [ cnt#10 ]
//SEG11 [8] phi from main::@1 to inccnt
inccnt_from_B1:
@ -593,12 +593,12 @@ inccnt_from_B1:
//SEG13 main::@2
main__B2:
//SEG14 [5] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- zpby1=_inc_zpby2
lda 4
sta 3
inc 3
lda $4
sta $3
inc $3
//SEG15 [6] *((word) 1025) ← (byte) cnt#1 [ ] -- _star_cowo1=zpby1
lda 3
sta 1025
lda $3
sta $401
jmp main__Breturn
//SEG16 main::@return
main__Breturn:
@ -607,9 +607,9 @@ main__Breturn:
//SEG18 inccnt
inccnt:
//SEG19 [9] (byte) cnt#10 ← ++ (byte) cnt#13 [ cnt#10 ] -- zpby1=_inc_zpby2
lda 2
sta 4
inc 4
lda $2
sta $4
inc $4
jmp inccnt__Breturn
//SEG20 inccnt::@return
inccnt__Breturn:
@ -648,12 +648,12 @@ main:
//SEG5 [8] phi from main to inccnt
inccnt_from_main:
//SEG6 [8] phi (byte) cnt#13 = (byte) 0 -- xby=coby1
ldx #0
ldx #$0
jsr inccnt
//SEG7 main::@1
main__B1:
//SEG8 [2] *((word) 1024) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=xby
stx 1024
stx $400
//SEG9 [3] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- xby=_inc_xby
inx
//SEG10 [4] call inccnt param-assignment [ cnt#10 ]
@ -666,7 +666,7 @@ main__B2:
//SEG14 [5] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- xby=_inc_xby
inx
//SEG15 [6] *((word) 1025) ← (byte) cnt#1 [ ] -- _star_cowo1=xby
stx 1025
stx $401
//SEG16 main::@return
main__Breturn:
//SEG17 [7] return [ ]
@ -713,12 +713,12 @@ main:
//SEG5 [8] phi from main to inccnt
inccnt_from_main:
//SEG6 [8] phi (byte) cnt#13 = (byte) 0 -- xby=coby1
ldx #0
ldx #$0
jsr inccnt
//SEG7 main::@1
main__B1:
//SEG8 [2] *((word) 1024) ← (byte) cnt#10 [ cnt#10 ] -- _star_cowo1=xby
stx 1024
stx $400
//SEG9 [3] (byte) cnt#3 ← ++ (byte) cnt#10 [ cnt#3 ] -- xby=_inc_xby
inx
//SEG10 [4] call inccnt param-assignment [ cnt#10 ]
@ -731,7 +731,7 @@ main__B2:
//SEG14 [5] (byte) cnt#1 ← ++ (byte) cnt#10 [ cnt#1 ] -- xby=_inc_xby
inx
//SEG15 [6] *((word) 1025) ← (byte) cnt#1 [ ] -- _star_cowo1=xby
stx 1025
stx $401
//SEG16 main::@return
main__Breturn:
//SEG17 [7] return [ ]

View File

@ -13,79 +13,79 @@ main__Breturn:
rts
lvaluevar:
lvaluevar__B1_from_lvaluevar:
lda #<1024
sta 2
lda #>1024
sta 2+1
ldx #2
lda #<$400
sta $2
lda #>$400
sta $2+$1
ldx #$2
lvaluevar__B1:
cpx #10
cpx #$a
bcc lvaluevar__B2
lvaluevar__Breturn:
rts
lvaluevar__B2:
ldy #0
lda #4
sta (2),y
inc 2
ldy #$0
lda #$4
sta ($2),y
inc $2
bne !+
inc 2+1
inc $2+$1
!:
inx
lvaluevar__B1_from_B2:
jmp lvaluevar__B1
rvaluevar:
rvaluevar__B1_from_rvaluevar:
lda #<1024
sta 2
lda #>1024
sta 2+1
ldx #2
lda #<$400
sta $2
lda #>$400
sta $2+$1
ldx #$2
rvaluevar__B1:
cpx #10
cpx #$a
bcc rvaluevar__B2
rvaluevar__Breturn:
rts
rvaluevar__B2:
ldy #0
lda (2),y
inc 2
ldy #$0
lda ($2),y
inc $2
bne !+
inc 2+1
inc $2+$1
!:
inx
rvaluevar__B1_from_B2:
jmp rvaluevar__B1
rvalue:
lda 1024
lda 1025
lda $400
lda $401
rvalue__B1_from_rvalue:
ldx #2
ldx #$2
rvalue__B1:
cpx #10
cpx #$a
bcc rvalue__B2
rvalue__Breturn:
rts
rvalue__B2:
lda 1024,x
lda $400,x
inx
rvalue__B1_from_B2:
jmp rvalue__B1
lvalue:
lda #1
sta 1024
lda #2
sta 1025
lda #$1
sta $400
lda #$2
sta $401
lvalue__B1_from_lvalue:
ldx #2
ldx #$2
lvalue__B1:
cpx #10
cpx #$a
bcc lvalue__B2
lvalue__Breturn:
rts
lvalue__B2:
lda #3
sta 1024,x
lda #$3
sta $400,x
inx
lvalue__B1_from_B2:
jmp lvalue__B1

View File

@ -1914,19 +1914,19 @@ lvaluevar:
//SEG14 [6] phi from lvaluevar to lvaluevar::@1
lvaluevar__B1_from_lvaluevar:
//SEG15 [6] phi (byte*) lvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 3
lda #>1024
sta 3+1
lda #<$400
sta $3
lda #>$400
sta $3+$1
//SEG16 [6] phi (byte) lvaluevar::i#2 = (byte) 2 -- zpby1=coby1
lda #2
sta 2
lda #$2
sta $2
jmp lvaluevar__B1
//SEG17 lvaluevar::@1
lvaluevar__B1:
//SEG18 [7] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- zpby1_lt_coby1_then_la1
lda 2
cmp #10
lda $2
cmp #$a
bcc lvaluevar__B2
jmp lvaluevar__Breturn
//SEG19 lvaluevar::@return
@ -1936,16 +1936,16 @@ lvaluevar__Breturn:
//SEG21 lvaluevar::@2
lvaluevar__B2:
//SEG22 [9] *((byte*) lvaluevar::screen#2) ← (byte) 4 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #4
sta (3),y
ldy #$0
lda #$4
sta ($3),y
//SEG23 [10] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::screen#1 lvaluevar::i#2 ] -- zpptrby1=_inc_zpptrby1
inc 3
inc $3
bne !+
inc 3+1
inc $3+$1
!:
//SEG24 [11] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- zpby1=_inc_zpby1
inc 2
inc $2
//SEG25 [6] phi from lvaluevar::@2 to lvaluevar::@1
lvaluevar__B1_from_B2:
//SEG26 [6] phi (byte*) lvaluevar::screen#2 = (byte*) lvaluevar::screen#1 -- register_copy
@ -1956,19 +1956,19 @@ rvaluevar:
//SEG29 [12] phi from rvaluevar to rvaluevar::@1
rvaluevar__B1_from_rvaluevar:
//SEG30 [12] phi (byte*) rvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 6
lda #>1024
sta 6+1
lda #<$400
sta $6
lda #>$400
sta $6+$1
//SEG31 [12] phi (byte) rvaluevar::i#2 = (byte) 2 -- zpby1=coby1
lda #2
sta 5
lda #$2
sta $5
jmp rvaluevar__B1
//SEG32 rvaluevar::@1
rvaluevar__B1:
//SEG33 [13] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- zpby1_lt_coby1_then_la1
lda 5
cmp #10
lda $5
cmp #$a
bcc rvaluevar__B2
jmp rvaluevar__Breturn
//SEG34 rvaluevar::@return
@ -1978,16 +1978,16 @@ rvaluevar__Breturn:
//SEG36 rvaluevar::@2
rvaluevar__B2:
//SEG37 [15] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- zpby1=_star_zpptrby1
ldy #0
lda (6),y
sta 10
ldy #$0
lda ($6),y
sta $a
//SEG38 [16] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::screen#1 rvaluevar::i#2 ] -- zpptrby1=_inc_zpptrby1
inc 6
inc $6
bne !+
inc 6+1
inc $6+$1
!:
//SEG39 [17] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- zpby1=_inc_zpby1
inc 5
inc $5
//SEG40 [12] phi from rvaluevar::@2 to rvaluevar::@1
rvaluevar__B1_from_B2:
//SEG41 [12] phi (byte*) rvaluevar::screen#2 = (byte*) rvaluevar::screen#1 -- register_copy
@ -1996,22 +1996,22 @@ rvaluevar__B1_from_B2:
//SEG43 rvalue
rvalue:
//SEG44 [18] (byte) rvalue::b#0 ← * (word) 1024 [ ] -- zpby1=_star_cowo1
lda 1024
sta 11
lda $400
sta $b
//SEG45 [19] (byte) rvalue::b#1 ← * (word) 1025 [ ] -- zpby1=_star_cowo1
lda 1025
sta 12
lda $401
sta $c
//SEG46 [20] phi from rvalue to rvalue::@1
rvalue__B1_from_rvalue:
//SEG47 [20] phi (byte) rvalue::i#2 = (byte) 2 -- zpby1=coby1
lda #2
sta 8
lda #$2
sta $8
jmp rvalue__B1
//SEG48 rvalue::@1
rvalue__B1:
//SEG49 [21] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- zpby1_lt_coby1_then_la1
lda 8
cmp #10
lda $8
cmp #$a
bcc rvalue__B2
jmp rvalue__Breturn
//SEG50 rvalue::@return
@ -2021,11 +2021,11 @@ rvalue__Breturn:
//SEG52 rvalue::@2
rvalue__B2:
//SEG53 [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] -- zpby1=cowo1_staridx_zpby2
ldx 8
lda 1024,x
sta 13
ldx $8
lda $400,x
sta $d
//SEG54 [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] -- zpby1=_inc_zpby1
inc 8
inc $8
//SEG55 [20] phi from rvalue::@2 to rvalue::@1
rvalue__B1_from_B2:
//SEG56 [20] phi (byte) rvalue::i#2 = (byte) rvalue::i#1 -- register_copy
@ -2033,22 +2033,22 @@ rvalue__B1_from_B2:
//SEG57 lvalue
lvalue:
//SEG58 [25] *((word) 1024) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #1
sta 1024
lda #$1
sta $400
//SEG59 [26] *((word) 1025) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #2
sta 1025
lda #$2
sta $401
//SEG60 [27] phi from lvalue to lvalue::@1
lvalue__B1_from_lvalue:
//SEG61 [27] phi (byte) lvalue::i#2 = (byte) 2 -- zpby1=coby1
lda #2
sta 9
lda #$2
sta $9
jmp lvalue__B1
//SEG62 lvalue::@1
lvalue__B1:
//SEG63 [28] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- zpby1_lt_coby1_then_la1
lda 9
cmp #10
lda $9
cmp #$a
bcc lvalue__B2
jmp lvalue__Breturn
//SEG64 lvalue::@return
@ -2058,11 +2058,11 @@ lvalue__Breturn:
//SEG66 lvalue::@2
lvalue__B2:
//SEG67 [30] *((word) 1024 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_zpby1=coby2
lda #3
ldx 9
sta 1024,x
lda #$3
ldx $9
sta $400,x
//SEG68 [31] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- zpby1=_inc_zpby1
inc 9
inc $9
//SEG69 [27] phi from lvalue::@2 to lvalue::@1
lvalue__B1_from_B2:
//SEG70 [27] phi (byte) lvalue::i#2 = (byte) lvalue::i#1 -- register_copy
@ -2157,16 +2157,16 @@ lvaluevar:
//SEG14 [6] phi from lvaluevar to lvaluevar::@1
lvaluevar__B1_from_lvaluevar:
//SEG15 [6] phi (byte*) lvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
//SEG16 [6] phi (byte) lvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG17 lvaluevar::@1
lvaluevar__B1:
//SEG18 [7] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc lvaluevar__B2
//SEG19 lvaluevar::@return
lvaluevar__Breturn:
@ -2175,13 +2175,13 @@ lvaluevar__Breturn:
//SEG21 lvaluevar::@2
lvaluevar__B2:
//SEG22 [9] *((byte*) lvaluevar::screen#2) ← (byte) 4 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #4
sta (2),y
ldy #$0
lda #$4
sta ($2),y
//SEG23 [10] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::screen#1 lvaluevar::i#2 ] -- zpptrby1=_inc_zpptrby1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG24 [11] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2195,16 +2195,16 @@ rvaluevar:
//SEG29 [12] phi from rvaluevar to rvaluevar::@1
rvaluevar__B1_from_rvaluevar:
//SEG30 [12] phi (byte*) rvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
//SEG31 [12] phi (byte) rvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG32 rvaluevar::@1
rvaluevar__B1:
//SEG33 [13] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc rvaluevar__B2
//SEG34 rvaluevar::@return
rvaluevar__Breturn:
@ -2213,12 +2213,12 @@ rvaluevar__Breturn:
//SEG36 rvaluevar::@2
rvaluevar__B2:
//SEG37 [15] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- aby=_star_zpptrby1
ldy #0
lda (2),y
ldy #$0
lda ($2),y
//SEG38 [16] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::screen#1 rvaluevar::i#2 ] -- zpptrby1=_inc_zpptrby1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG39 [17] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2230,17 +2230,17 @@ rvaluevar__B1_from_B2:
//SEG43 rvalue
rvalue:
//SEG44 [18] (byte) rvalue::b#0 ← * (word) 1024 [ ] -- aby=_star_cowo1
lda 1024
lda $400
//SEG45 [19] (byte) rvalue::b#1 ← * (word) 1025 [ ] -- aby=_star_cowo1
lda 1025
lda $401
//SEG46 [20] phi from rvalue to rvalue::@1
rvalue__B1_from_rvalue:
//SEG47 [20] phi (byte) rvalue::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG48 rvalue::@1
rvalue__B1:
//SEG49 [21] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc rvalue__B2
//SEG50 rvalue::@return
rvalue__Breturn:
@ -2249,7 +2249,7 @@ rvalue__Breturn:
//SEG52 rvalue::@2
rvalue__B2:
//SEG53 [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] -- aby=cowo1_staridx_xby
lda 1024,x
lda $400,x
//SEG54 [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] -- xby=_inc_xby
inx
//SEG55 [20] phi from rvalue::@2 to rvalue::@1
@ -2259,19 +2259,19 @@ rvalue__B1_from_B2:
//SEG57 lvalue
lvalue:
//SEG58 [25] *((word) 1024) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #1
sta 1024
lda #$1
sta $400
//SEG59 [26] *((word) 1025) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #2
sta 1025
lda #$2
sta $401
//SEG60 [27] phi from lvalue to lvalue::@1
lvalue__B1_from_lvalue:
//SEG61 [27] phi (byte) lvalue::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG62 lvalue::@1
lvalue__B1:
//SEG63 [28] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc lvalue__B2
//SEG64 lvalue::@return
lvalue__Breturn:
@ -2280,8 +2280,8 @@ lvalue__Breturn:
//SEG66 lvalue::@2
lvalue__B2:
//SEG67 [30] *((word) 1024 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_xby=coby2
lda #3
sta 1024,x
lda #$3
sta $400,x
//SEG68 [31] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- xby=_inc_xby
inx
//SEG69 [27] phi from lvalue::@2 to lvalue::@1
@ -2383,16 +2383,16 @@ lvaluevar:
//SEG14 [6] phi from lvaluevar to lvaluevar::@1
lvaluevar__B1_from_lvaluevar:
//SEG15 [6] phi (byte*) lvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
//SEG16 [6] phi (byte) lvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG17 lvaluevar::@1
lvaluevar__B1:
//SEG18 [7] if((byte) lvaluevar::i#2<(byte) 10) goto lvaluevar::@2 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc lvaluevar__B2
//SEG19 lvaluevar::@return
lvaluevar__Breturn:
@ -2401,13 +2401,13 @@ lvaluevar__Breturn:
//SEG21 lvaluevar::@2
lvaluevar__B2:
//SEG22 [9] *((byte*) lvaluevar::screen#2) ← (byte) 4 [ lvaluevar::i#2 lvaluevar::screen#2 ] -- _star_zpptrby1=coby1
ldy #0
lda #4
sta (2),y
ldy #$0
lda #$4
sta ($2),y
//SEG23 [10] (byte*) lvaluevar::screen#1 ← ++ (byte*) lvaluevar::screen#2 [ lvaluevar::screen#1 lvaluevar::i#2 ] -- zpptrby1=_inc_zpptrby1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG24 [11] (byte) lvaluevar::i#1 ← ++ (byte) lvaluevar::i#2 [ lvaluevar::i#1 lvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2421,16 +2421,16 @@ rvaluevar:
//SEG29 [12] phi from rvaluevar to rvaluevar::@1
rvaluevar__B1_from_rvaluevar:
//SEG30 [12] phi (byte*) rvaluevar::screen#2 = (word) 1024 -- zpptrby1=cowo1
lda #<1024
sta 2
lda #>1024
sta 2+1
lda #<$400
sta $2
lda #>$400
sta $2+$1
//SEG31 [12] phi (byte) rvaluevar::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG32 rvaluevar::@1
rvaluevar__B1:
//SEG33 [13] if((byte) rvaluevar::i#2<(byte) 10) goto rvaluevar::@2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc rvaluevar__B2
//SEG34 rvaluevar::@return
rvaluevar__Breturn:
@ -2439,12 +2439,12 @@ rvaluevar__Breturn:
//SEG36 rvaluevar::@2
rvaluevar__B2:
//SEG37 [15] (byte) rvaluevar::b#0 ← * (byte*) rvaluevar::screen#2 [ rvaluevar::i#2 rvaluevar::screen#2 ] -- aby=_star_zpptrby1
ldy #0
lda (2),y
ldy #$0
lda ($2),y
//SEG38 [16] (byte*) rvaluevar::screen#1 ← ++ (byte*) rvaluevar::screen#2 [ rvaluevar::screen#1 rvaluevar::i#2 ] -- zpptrby1=_inc_zpptrby1
inc 2
inc $2
bne !+
inc 2+1
inc $2+$1
!:
//SEG39 [17] (byte) rvaluevar::i#1 ← ++ (byte) rvaluevar::i#2 [ rvaluevar::i#1 rvaluevar::screen#1 ] -- xby=_inc_xby
inx
@ -2456,17 +2456,17 @@ rvaluevar__B1_from_B2:
//SEG43 rvalue
rvalue:
//SEG44 [18] (byte) rvalue::b#0 ← * (word) 1024 [ ] -- aby=_star_cowo1
lda 1024
lda $400
//SEG45 [19] (byte) rvalue::b#1 ← * (word) 1025 [ ] -- aby=_star_cowo1
lda 1025
lda $401
//SEG46 [20] phi from rvalue to rvalue::@1
rvalue__B1_from_rvalue:
//SEG47 [20] phi (byte) rvalue::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG48 rvalue::@1
rvalue__B1:
//SEG49 [21] if((byte) rvalue::i#2<(byte) 10) goto rvalue::@2 [ rvalue::i#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc rvalue__B2
//SEG50 rvalue::@return
rvalue__Breturn:
@ -2475,7 +2475,7 @@ rvalue__Breturn:
//SEG52 rvalue::@2
rvalue__B2:
//SEG53 [23] (byte) rvalue::b#2 ← (word) 1024 *idx (byte) rvalue::i#2 [ rvalue::i#2 ] -- aby=cowo1_staridx_xby
lda 1024,x
lda $400,x
//SEG54 [24] (byte) rvalue::i#1 ← ++ (byte) rvalue::i#2 [ rvalue::i#1 ] -- xby=_inc_xby
inx
//SEG55 [20] phi from rvalue::@2 to rvalue::@1
@ -2485,19 +2485,19 @@ rvalue__B1_from_B2:
//SEG57 lvalue
lvalue:
//SEG58 [25] *((word) 1024) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #1
sta 1024
lda #$1
sta $400
//SEG59 [26] *((word) 1025) ← (byte) 2 [ ] -- _star_cowo1=coby2
lda #2
sta 1025
lda #$2
sta $401
//SEG60 [27] phi from lvalue to lvalue::@1
lvalue__B1_from_lvalue:
//SEG61 [27] phi (byte) lvalue::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG62 lvalue::@1
lvalue__B1:
//SEG63 [28] if((byte) lvalue::i#2<(byte) 10) goto lvalue::@2 [ lvalue::i#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc lvalue__B2
//SEG64 lvalue::@return
lvalue__Breturn:
@ -2506,8 +2506,8 @@ lvalue__Breturn:
//SEG66 lvalue::@2
lvalue__B2:
//SEG67 [30] *((word) 1024 + (byte) lvalue::i#2) ← (byte) 3 [ lvalue::i#2 ] -- cowo1_staridx_xby=coby2
lda #3
sta 1024,x
lda #$3
sta $400,x
//SEG68 [31] (byte) lvalue::i#1 ← ++ (byte) lvalue::i#2 [ lvalue::i#1 ] -- xby=_inc_xby
inx
//SEG69 [27] phi from lvalue::@2 to lvalue::@1

View File

@ -3,14 +3,14 @@ BBEGIN:
BEND:
main:
main__B1_from_main:
ldx #2
ldx #$2
main__B1:
cpx #10
cpx #$a
bcc main__B2
main__Breturn:
rts
main__B2:
lda 1024,x
lda $400,x
inx
main__B1_from_B2:
jmp main__B1

View File

@ -463,14 +463,14 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 2 -- zpby1=coby1
lda #2
sta 2
lda #$2
sta $2
jmp main__B1
//SEG6 main::@1
main__B1:
//SEG7 [2] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- zpby1_lt_coby1_then_la1
lda 2
cmp #10
lda $2
cmp #$a
bcc main__B2
jmp main__Breturn
//SEG8 main::@return
@ -480,11 +480,11 @@ main__Breturn:
//SEG10 main::@2
main__B2:
//SEG11 [4] (byte) main::b#0 ← (word) 1024 *idx (byte) main::i#2 [ main::i#2 ] -- zpby1=cowo1_staridx_zpby2
ldx 2
lda 1024,x
sta 3
ldx $2
lda $400,x
sta $3
//SEG12 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- zpby1=_inc_zpby1
inc 2
inc $2
//SEG13 [1] phi from main::@2 to main::@1
main__B1_from_B2:
//SEG14 [1] phi (byte) main::i#2 = (byte) main::i#1 -- register_copy
@ -516,11 +516,11 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG6 main::@1
main__B1:
//SEG7 [2] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc main__B2
//SEG8 main::@return
main__Breturn:
@ -529,7 +529,7 @@ main__Breturn:
//SEG10 main::@2
main__B2:
//SEG11 [4] (byte) main::b#0 ← (word) 1024 *idx (byte) main::i#2 [ main::i#2 ] -- aby=cowo1_staridx_xby
lda 1024,x
lda $400,x
//SEG12 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG13 [1] phi from main::@2 to main::@1
@ -566,11 +566,11 @@ main:
//SEG4 [1] phi from main to main::@1
main__B1_from_main:
//SEG5 [1] phi (byte) main::i#2 = (byte) 2 -- xby=coby1
ldx #2
ldx #$2
//SEG6 main::@1
main__B1:
//SEG7 [2] if((byte) main::i#2<(byte) 10) goto main::@2 [ main::i#2 ] -- xby_lt_coby1_then_la1
cpx #10
cpx #$a
bcc main__B2
//SEG8 main::@return
main__Breturn:
@ -579,7 +579,7 @@ main__Breturn:
//SEG10 main::@2
main__B2:
//SEG11 [4] (byte) main::b#0 ← (word) 1024 *idx (byte) main::i#2 [ main::i#2 ] -- aby=cowo1_staridx_xby
lda 1024,x
lda $400,x
//SEG12 [5] (byte) main::i#1 ← ++ (byte) main::i#2 [ main::i#1 ] -- xby=_inc_xby
inx
//SEG13 [1] phi from main::@2 to main::@1

View File

@ -1,31 +1,31 @@
BBEGIN:
sum_from_BBEGIN:
lda #2
ldy #1
lda #$2
ldy #$1
jsr sum
B2:
sta 2
sta $2
sum_from_B2:
lda #4
ldy #3
lda #$4
ldy #$3
jsr sum
B3:
tax
sum_from_B3:
lda #13
ldy #9
lda #$d
ldy #$9
jsr sum
B4:
sta 3
sta $3
txa
clc
adc 2
adc $2
clc
adc 3
adc $3
BEND:
sum:
sty 255
sty $ff
clc
adc 255
adc $ff
sum__Breturn:
rts

View File

@ -503,70 +503,70 @@ BBEGIN:
//SEG2 [8] phi from @BEGIN to sum
sum_from_BBEGIN:
//SEG3 [8] phi (byte) sum::b#3 = (byte) 2 -- zpby1=coby1
lda #2
sta 3
lda #$2
sta $3
//SEG4 [8] phi (byte) sum::a#3 = (byte) 1 -- zpby1=coby1
lda #1
sta 2
lda #$1
sta $2
jsr sum
jmp B2
//SEG5 @2
B2:
//SEG6 [1] (byte) s1#0 ← (byte) sum::return#0 [ s1#0 ] -- zpby1=zpby2
lda 9
sta 4
lda $9
sta $4
//SEG7 [2] call sum param-assignment [ sum::return#0 s1#0 ]
//SEG8 [8] phi from @2 to sum
sum_from_B2:
//SEG9 [8] phi (byte) sum::b#3 = (byte) 4 -- zpby1=coby1
lda #4
sta 3
lda #$4
sta $3
//SEG10 [8] phi (byte) sum::a#3 = (byte) 3 -- zpby1=coby1
lda #3
sta 2
lda #$3
sta $2
jsr sum
jmp B3
//SEG11 @3
B3:
//SEG12 [3] (byte) s2#0 ← (byte) sum::return#0 [ s1#0 s2#0 ] -- zpby1=zpby2
lda 9
sta 5
lda $9
sta $5
//SEG13 [4] call sum param-assignment [ sum::return#0 s1#0 s2#0 ]
//SEG14 [8] phi from @3 to sum
sum_from_B3:
//SEG15 [8] phi (byte) sum::b#3 = (byte) 13 -- zpby1=coby1
lda #13
sta 3
lda #$d
sta $3
//SEG16 [8] phi (byte) sum::a#3 = (byte) 9 -- zpby1=coby1
lda #9
sta 2
lda #$9
sta $2
jsr sum
jmp B4
//SEG17 @4
B4:
//SEG18 [5] (byte) s3#0 ← (byte) sum::return#0 [ s1#0 s2#0 s3#0 ] -- zpby1=zpby2
lda 9
sta 6
lda $9
sta $6
//SEG19 [6] (byte~) $3 ← (byte) s1#0 + (byte) s2#0 [ $3 s3#0 ] -- zpby1=zpby2_plus_zpby3
lda 4
lda $4
clc
adc 5
sta 7
adc $5
sta $7
//SEG20 [7] (byte) s4#0 ← (byte~) $3 + (byte) s3#0 [ ] -- zpby1=zpby2_plus_zpby3
lda 7
lda $7
clc
adc 6
sta 8
adc $6
sta $8
jmp BEND
//SEG21 @END
BEND:
//SEG22 sum
sum:
//SEG23 [9] (byte) sum::return#0 ← (byte) sum::a#3 + (byte) sum::b#3 [ sum::return#0 s1#0 s2#0 ] -- zpby1=zpby2_plus_zpby3
lda 2
lda $2
clc
adc 3
sta 9
adc $3
sta $9
jmp sum__Breturn
//SEG24 sum::@return
sum__Breturn:
@ -604,21 +604,21 @@ BBEGIN:
//SEG2 [8] phi from @BEGIN to sum
sum_from_BBEGIN:
//SEG3 [8] phi (byte) sum::b#3 = (byte) 2 -- aby=coby1
lda #2
lda #$2
//SEG4 [8] phi (byte) sum::a#3 = (byte) 1 -- yby=coby1
ldy #1
ldy #$1
jsr sum
//SEG5 @2
B2:
//SEG6 [1] (byte) s1#0 ← (byte) sum::return#0 [ s1#0 ] -- zpby1=aby
sta 2
sta $2
//SEG7 [2] call sum param-assignment [ sum::return#0 s1#0 ]
//SEG8 [8] phi from @2 to sum
sum_from_B2:
//SEG9 [8] phi (byte) sum::b#3 = (byte) 4 -- aby=coby1
lda #4
lda #$4
//SEG10 [8] phi (byte) sum::a#3 = (byte) 3 -- yby=coby1
ldy #3
ldy #$3
jsr sum
//SEG11 @3
B3:
@ -628,29 +628,29 @@ B3:
//SEG14 [8] phi from @3 to sum
sum_from_B3:
//SEG15 [8] phi (byte) sum::b#3 = (byte) 13 -- aby=coby1
lda #13
lda #$d
//SEG16 [8] phi (byte) sum::a#3 = (byte) 9 -- yby=coby1
ldy #9
ldy #$9
jsr sum
//SEG17 @4
B4:
//SEG18 [5] (byte) s3#0 ← (byte) sum::return#0 [ s1#0 s2#0 s3#0 ] -- zpby1=aby
sta 3
sta $3
//SEG19 [6] (byte~) $3 ← (byte) s1#0 + (byte) s2#0 [ $3 s3#0 ] -- aby=zpby1_plus_xby
txa
clc
adc 2
adc $2
//SEG20 [7] (byte) s4#0 ← (byte~) $3 + (byte) s3#0 [ ] -- aby=aby_plus_zpby1
clc
adc 3
adc $3
//SEG21 @END
BEND:
//SEG22 sum
sum:
//SEG23 [9] (byte) sum::return#0 ← (byte) sum::a#3 + (byte) sum::b#3 [ sum::return#0 s1#0 s2#0 ] -- aby=yby_plus_aby
sty 255
sty $ff
clc
adc 255
adc $ff
//SEG24 sum::@return
sum__Breturn:
//SEG25 [10] return [ sum::return#0 s1#0 s2#0 ]
@ -696,21 +696,21 @@ BBEGIN:
//SEG2 [8] phi from @BEGIN to sum
sum_from_BBEGIN:
//SEG3 [8] phi (byte) sum::b#3 = (byte) 2 -- aby=coby1
lda #2
lda #$2
//SEG4 [8] phi (byte) sum::a#3 = (byte) 1 -- yby=coby1
ldy #1
ldy #$1
jsr sum
//SEG5 @2
B2:
//SEG6 [1] (byte) s1#0 ← (byte) sum::return#0 [ s1#0 ] -- zpby1=aby
sta 2
sta $2
//SEG7 [2] call sum param-assignment [ sum::return#0 s1#0 ]
//SEG8 [8] phi from @2 to sum
sum_from_B2:
//SEG9 [8] phi (byte) sum::b#3 = (byte) 4 -- aby=coby1
lda #4
lda #$4
//SEG10 [8] phi (byte) sum::a#3 = (byte) 3 -- yby=coby1
ldy #3
ldy #$3
jsr sum
//SEG11 @3
B3:
@ -720,29 +720,29 @@ B3:
//SEG14 [8] phi from @3 to sum
sum_from_B3:
//SEG15 [8] phi (byte) sum::b#3 = (byte) 13 -- aby=coby1
lda #13
lda #$d
//SEG16 [8] phi (byte) sum::a#3 = (byte) 9 -- yby=coby1
ldy #9
ldy #$9
jsr sum
//SEG17 @4
B4:
//SEG18 [5] (byte) s3#0 ← (byte) sum::return#0 [ s1#0 s2#0 s3#0 ] -- zpby1=aby
sta 3
sta $3
//SEG19 [6] (byte~) $3 ← (byte) s1#0 + (byte) s2#0 [ $3 s3#0 ] -- aby=zpby1_plus_xby
txa
clc
adc 2
adc $2
//SEG20 [7] (byte) s4#0 ← (byte~) $3 + (byte) s3#0 [ ] -- aby=aby_plus_zpby1
clc
adc 3
adc $3
//SEG21 @END
BEND:
//SEG22 sum
sum:
//SEG23 [9] (byte) sum::return#0 ← (byte) sum::a#3 + (byte) sum::b#3 [ sum::return#0 s1#0 s2#0 ] -- aby=yby_plus_aby
sty 255
sty $ff
clc
adc 255
adc $ff
//SEG24 sum::@return
sum__Breturn:
//SEG25 [10] return [ sum::return#0 s1#0 s2#0 ]

View File

@ -2,7 +2,7 @@ BBEGIN:
jsr main
BEND:
main:
lda #1
sta 1024
lda #$1
sta $400
main__Breturn:
rts

View File

@ -219,8 +219,8 @@ BEND:
//SEG3 main
main:
//SEG4 [1] *((word) 1024) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #1
sta 1024
lda #$1
sta $400
jmp main__Breturn
//SEG5 main::@return
main__Breturn:
@ -250,8 +250,8 @@ BEND:
//SEG3 main
main:
//SEG4 [1] *((word) 1024) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #1
sta 1024
lda #$1
sta $400
//SEG5 main::@return
main__Breturn:
//SEG6 [2] return [ ]
@ -275,8 +275,8 @@ BEND:
//SEG3 main
main:
//SEG4 [1] *((word) 1024) ← (byte) 1 [ ] -- _star_cowo1=coby2
lda #1
sta 1024
lda #$1
sta $400
//SEG5 main::@return
main__Breturn:
//SEG6 [2] return [ ]

View File

@ -3,47 +3,47 @@ BBEGIN:
BEND:
main:
addpoint_from_main:
lda #1
sta 2
ldy #5
lda #0
sta 8
lda #5
lda #$1
sta $2
ldy #$5
lda #$0
sta $8
lda #$5
jsr addpoint
main__B3:
addpoint_from_B3:
lda #2
sta 2
ldy #8
lda #15
lda #$2
sta $2
ldy #$8
lda #$f
jsr addpoint
main__B4:
addpoint_from_B4:
lda #3
sta 2
ldy #14
lda #6
lda #$3
sta $2
ldy #$e
lda #$6
jsr addpoint
main__B5:
addpoint_from_B5:
lda #4
sta 2
ldy #2
lda #34
lda #$4
sta $2
ldy #$2
lda #$22
jsr addpoint
main__B6:
addpoint_from_B6:
lda #5
sta 2
ldy #17
lda #21
lda #$5
sta $2
ldy #$11
lda #$15
jsr addpoint
main__B7:
addpoint_from_B7:
lda #7
sta 2
ldy #22
lda #31
lda #$7
sta $2
ldy #$16
lda #$1f
jsr addpoint
main__B8:
jsr initscreen
@ -56,229 +56,229 @@ main__B11:
main__Breturn:
rts
animate:
lda 4096
lda $1000
clc
adc #1
sta 4096
lda 4096
cmp #40
adc #$1
sta $1000
lda $1000
cmp #$28
beq animate__B1
animate__B2:
lda 4352
lda $1100
clc
adc #1
sta 4352
lda 4352
cmp #25
adc #$1
sta $1100
lda $1100
cmp #$19
beq animate__B3
animate__B4:
ldx 4097
ldx $1001
dex
stx 4097
lda 4097
cmp #255
stx $1001
lda $1001
cmp #$ff
beq animate__B5
animate__B6:
lda 4354
lda $1102
clc
adc #1
sta 4354
lda 4354
cmp #25
adc #$1
sta $1102
lda $1102
cmp #$19
beq animate__B7
animate__B8:
ldx 4355
ldx $1103
dex
stx 4355
lda 4355
cmp #255
stx $1103
lda $1103
cmp #$ff
beq animate__B9
animate__Breturn:
rts
animate__B9:
lda #25
sta 4355
lda 4099
lda #$19
sta $1103
lda $1003
clc
adc #7
sta 4099
lda 4099
cmp #40
adc #$7
sta $1003
lda $1003
cmp #$28
bcs animate__B11
jmp animate__Breturn
animate__B11:
lda 4099
lda $1003
sec
sbc #40
sta 4099
sbc #$28
sta $1003
jmp animate__Breturn
animate__B7:
lda #0
sta 4354
lda #$0
sta $1102
jmp animate__B8
animate__B5:
lda #40
sta 4097
lda #$28
sta $1001
jmp animate__B6
animate__B3:
lda #0
sta 4352
lda #$0
sta $1100
jmp animate__B4
animate__B1:
lda #0
sta 4096
lda #$0
sta $1000
jmp animate__B2
render:
render__B1_from_render:
lda #<55296
sta 3
lda #>55296
sta 3+1
lda #0
sta 2
lda #<$d800
sta $3
lda #>$d800
sta $3+$1
lda #$0
sta $2
render__B1_from_B3:
render__B1:
render__B2_from_B1:
lda #0
sta 5
lda #$0
sta $5
render__B2_from_B5:
render__B2:
lda 5
sta 9
lda 2
sta 10
lda $5
sta $9
lda $2
sta $a
jsr findcol
render__B5:
tya
ldy 5
sta (3),y
inc 5
lda 5
cmp #40
ldy $5
sta ($3),y
inc $5
lda $5
cmp #$28
bcc render__B2_from_B5
render__B3:
lda 3
lda $3
clc
adc #40
sta 3
adc #$28
sta $3
bcc !+
inc 3+1
inc $3+$1
!:
inc 2
lda 2
cmp #25
inc $2
lda $2
cmp #$19
bcc render__B1_from_B3
render__Breturn:
rts
findcol:
findcol__B1_from_findcol:
ldy #0
lda #255
sta 6
ldx #0
ldy #$0
lda #$ff
sta $6
ldx #$0
findcol__B1_from_B13:
findcol__B1:
lda 4096,x
sta 7
lda 4352,x
sta 11
lda 9
cmp 7
lda $1000,x
sta $7
lda $1100,x
sta $b
lda $9
cmp $7
beq findcol__B2
findcol__B3:
lda 9
cmp 7
lda $9
cmp $7
bcc findcol__B6
findcol__B7:
lda 9
lda $9
sec
sbc 7
sta 7
sbc $7
sta $7
findcol__B8_from_B7:
findcol__B8:
lda 10
cmp 11
lda $a
cmp $b
bcc findcol__B9
findcol__B10:
lda 10
lda $a
sec
sbc 11
sbc $b
clc
adc 7
adc $7
findcol__B11_from_B10:
findcol__B11:
cmp 6
cmp $6
bcc findcol__B12
findcol__B13_from_B11:
findcol__B13:
inx
cpx 8
cpx $8
bcc findcol__B1_from_B13
findcol__Breturn_from_B13:
jmp findcol__Breturn
findcol__Breturn_from_B2:
ldy #0
ldy #$0
findcol__Breturn:
rts
findcol__B12:
ldy 4608,x
sta 6
ldy $1200,x
sta $6
findcol__B13_from_B12:
jmp findcol__B13
findcol__B9:
lda 11
lda $b
sec
sbc 10
sbc $a
clc
adc 7
adc $7
findcol__B11_from_B9:
jmp findcol__B11
findcol__B6:
lda 7
lda $7
sec
sbc 9
sta 7
sbc $9
sta $7
findcol__B8_from_B6:
jmp findcol__B8
findcol__B2:
lda 10
cmp 11
lda $a
cmp $b
beq findcol__Breturn_from_B2
jmp findcol__B3
initscreen:
initscreen__B1_from_initscreen:
lda #<1024
sta 3
lda #>1024
sta 3+1
lda #<$400
sta $3
lda #>$400
sta $3+$1
initscreen__B1_from_B1:
initscreen__B1:
ldy #0
lda #230
sta (3),y
inc 3
ldy #$0
lda #$e6
sta ($3),y
inc $3
bne !+
inc 3+1
inc $3+$1
!:
lda 3+1
cmp #>2048
lda $3+$1
cmp #>$7e8
bcc initscreen__B1_from_B1
bne !+
lda 3
cmp #<2048
lda $3
cmp #<$7e8
bcc initscreen__B1_from_B1
!:
initscreen__Breturn:
rts
addpoint:
ldx 8
sta 4096,x
ldx $8
sta $1000,x
tya
ldy 8
sta 4352,y
lda 2
ldx 8
sta 4608,x
inc 8
ldy $8
sta $1100,y
lda $2
ldx $8
sta $1200,x
inc $8
addpoint__Breturn:
rts

View File

@ -182,7 +182,7 @@ initscreen::@1: from initscreen initscreen::@1
[87] (byte*) initscreen::screen#2 ← phi( initscreen/(word) 1024 initscreen::@1/(byte*) initscreen::screen#1 ) [ initscreen::screen#2 ]
[88] *((byte*) initscreen::screen#2) ← (byte) 230 [ initscreen::screen#2 ]
[89] (byte*) initscreen::screen#1 ← ++ (byte*) initscreen::screen#2 [ initscreen::screen#1 ]
[90] if((byte*) initscreen::screen#1<(word) 2048) goto initscreen::@1 [ initscreen::screen#1 ]
[90] if((byte*) initscreen::screen#1<(word) 2024) goto initscreen::@1 [ initscreen::screen#1 ]
to:initscreen::@return
initscreen::@return: from initscreen::@1
[91] return [ ]

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,7 @@ void initscreen() {
byte* screen = SCREEN;
do {
*screen = FILL;
} while(++screen<$0800)
} while(++screen<SCREEN+$03e8)
}
void render() {