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

Added spline test, a bunch of missing fragments and special ror/rol 8 handling.

This commit is contained in:
Jesper Gravgaard 2019-07-15 23:45:52 +02:00
parent 69e264d9c5
commit dd8ccaf186
32 changed files with 14144 additions and 4704 deletions

View File

@ -0,0 +1,11 @@
// sign-extend the byte
lda {z2}
sta {z1}
lda {z2}+1
sta {z1}+1
ora #$7f
bmi !+
lda #0
!:
sta {z1}+2
sta {z1}+3

View File

@ -0,0 +1,7 @@
lda {z1}+1
sta {z1}+3
lda {z1}
sta {z1}+2
lda #0
sta {z1}
sta {z1}+1

View File

@ -0,0 +1,8 @@
lda {z1}+2
sta {z1}+3
lda {z1}+1
sta {z1}+2
lda {z1}
sta {z1}+1
lda #0
sta {z1}

View File

@ -0,0 +1,7 @@
lda {z2}+1
sta {z1}+3
lda {z2}
sta {z1}+2
lda #0
sta {z1}
sta {z1}+1

View File

@ -0,0 +1,8 @@
lda {z2}+2
sta {z1}+3
lda {z2}+1
sta {z1}+2
lda {z2}
sta {z1}+1
lda #0
sta {z1}

View File

@ -0,0 +1,2 @@
lda {z1}+3
bmi {la1}

View File

@ -6,8 +6,8 @@ lda {z2}+1
adc #>{c1}
sta {z1}+1
lda {z2}+2
adc #0
adc #<{c1}>>$10
sta {z1}+2
lda {z2}+3
adc #0
adc #>{c1}>>$10
sta {z1}+3

View File

@ -0,0 +1,4 @@
lda {z1}
sta {z1}+1
lda #0
sta {z1}

View File

@ -0,0 +1,4 @@
lda {z1}+1
sta {z1}
lda #0
sta {z1}+1

View File

@ -0,0 +1,4 @@
lda {z2}
sta {z1}+1
lda #0
sta {z1}

View File

@ -0,0 +1,4 @@
lda {z2}+1
sta {z1}
lda #0
sta {z1}+1

View File

@ -156,6 +156,12 @@ public class AsmFragmentInstanceSpecFactory {
operator != null &&
(operator.getOperator().equals(">>") || operator.getOperator().equals("<<"))) {
signature.append(((ConstantInteger) rValue2).getValue());
} else if(
rValue2 instanceof ConstantInteger &&
((((ConstantInteger) rValue2).getValue()) % 8 == 0) &&
operator != null &&
(operator.getOperator().equals(">>") || operator.getOperator().equals("<<"))) {
signature.append(((ConstantInteger) rValue2).getValue());
} else if(
rValue2 instanceof ConstantInteger &&
((ConstantInteger) rValue2).getValue() == 0 &&

View File

@ -112,6 +112,8 @@ void print_sdword(signed dword dw) {
if(dw<0) {
print_char('-');
dw = -dw;
} else {
print_char(' ');
}
print_dword((dword)dw);
}

View File

@ -35,6 +35,18 @@ public class TestPrograms {
public TestPrograms() {
}
/*
@Test
public void testProblemInlineStructReturn() throws IOException, URISyntaxException {
compileAndCompare("problem-inline-struct-return");
}
*/
@Test
public void testSplines() throws IOException, URISyntaxException {
compileAndCompare("complex/splines/splines");
}
@Test
public void testProblemNegativeWordConst() throws IOException, URISyntaxException {
compileAndCompare("problem-negative-word-const");

View File

@ -0,0 +1,132 @@
// Quadratic Spline Library for the C64
// Implements an iterative algorithm using only addition for calculating quadratic splines
//
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
// The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it.
//
// The general formula for the quadratic spline is as follows:
// A = P2 - 2*P1 + P0
// B = 2*P1 - 2*P0
// C = P0
// P(t) = A*t*t + B*t + C
// for 0 <= t <= 1
//
// This library implements a iterative algorithm using multiplications in the initialization and only additions for calculating each point on the spline.
// The iterative algorithm is based on the following:
// P(t+Dt) = P(t) + A*Dt*Dt + 2*A*t*Dt + B*Dt
//
// init:
// N = 16 (number of plots)
// Dt = 1/N
// P = C
// I = A*Dt*Dt + B*Dt
// J = 2*A*Dt*Dt
// loop(N times):
// plot(P)
// P = P + I
// I = I + J
// NOTE: When N=16 then Dt[0.16] = $0.1000 Dt^2[0.16] = $0.0100
// NOTE: When N=8 then Dt[0.16] = $0.2000 Dt^2[0.16] = $0.0400
import "time"
import "print"
import "bitmap2"
import "c64"
// Vector that is part of a spline
struct SplineVector16 {
// x-position s[16.0]
signed int x;
// y-position s[16.0]
signed int y;
};
// Vector that is part of a spline
struct SplineVector32 {
// x-position s[16.16]
signed long x;
// y-position s[16.16]
signed long y;
};
const char* SCREEN = 0x0400;
const char* BITMAP_SCREEN = 0x5c00;
const char* BITMAP_GRAPHICS = 0x6000;
void main() {
bitmap_init(BITMAP_GRAPHICS, BITMAP_SCREEN);
bitmap_clear(BLACK, WHITE);
vicSelectGfxBank(BITMAP_SCREEN);
*D018 = toD018(BITMAP_SCREEN, BITMAP_GRAPHICS);
*D011 = VIC_BMM|VIC_DEN|VIC_RSEL|3;
struct SplineVector16 p0 = { 50, 50 };
struct SplineVector16 p1a = { 100, 50 };
struct SplineVector16 p1b = { 50, 100};
struct SplineVector16 p2 = { 100, 100 };
struct SplineVector16 p3a = { 150, 100 };
struct SplineVector16 p3b = { 100, 150 };
struct SplineVector16 p4 = { 150, 150 };
clock_start();
splinePlot(p0, p1a, p2);
splinePlot(p2, p3a, p4);
splinePlot(p2, p1b, p0);
splinePlot(p4, p3b, p2);
clock_t cyclecount = clock()-CLOCKS_PER_INIT;
print_dword_at(cyclecount, SCREEN);
//vicSelectGfxBank(SCREEN);
//*D018 = toD018(SCREEN, 0x1000);
//*D011 = VIC_DEN|VIC_RSEL|3;
}
void splinePlot(struct SplineVector16 p0, struct SplineVector16 p1, struct SplineVector16 p2) {
// A = P2 - 2*P1 + P0
struct SplineVector16 a = { p2.x - p1.x*2 + p0.x, p2.y - p1.y*2 + p0.y};
// B = 2*P1 - 2*P0
struct SplineVector16 b = { p1.x*2 - p0.x*2, p1.y*2 - p0.y*2 };
// I = A*Dt*Dt + B*Dt
struct SplineVector32 i = { (signed long)a.x*0x100 + (signed long)b.x*0x100*0x10, (signed long)a.y*0x100 + (signed long)b.y*0x100*0x10 };
// J = 2*A*Dt*Dt
struct SplineVector32 j = { (signed long)a.x*0x100*2, (signed long)a.y*0x100*2 };
struct SplineVector32 p = { (signed long)p0.x*0x10000, (signed long)p0.y*0x10000 };
for( char n: 0..16) {
bitmap_plot( > p.x, < > p.y);
// p = p + i;
p = { p.x+i.x, p.y+i.y };
// i = i + j;
i = { i.x+j.x, i.y+j.y };
}
}
// Print a spline vector
void print_spline16(struct SplineVector16 p) {
print_char('(');
print_sword(p.x);
print_char(',');
print_sword(p.y);
print_char(')');
}
// Print a spline vector
void print_spline32(struct SplineVector32 p) {
print_char('(');
print_sdword(p.x);
print_char(',');
print_sdword(p.y);
print_char(')');
}

View File

@ -0,0 +1,21 @@
// Illustrates problem with struct return values from inlined functions
struct SplineVector {
char x;
char y;
};
void main() {
struct SplineVector p1 = { 12, 24};
struct SplineVector p2 = splineDouble(p1);
const char* SCREEN = 0x0400;
SCREEN[0] = p2.x;
SCREEN[1] = p2.y;
}
inline struct SplineVector splineDouble(struct SplineVector p) {
struct SplineVector pr = { p.x*2, p.y*2 };
return pr;
}

View File

@ -85,7 +85,13 @@ print_ln: {
print_sdword: {
.label dw = 4
lda dw+3
bpl b1
bmi b1
lda #' '
jsr print_char
b2:
jsr print_dword
rts
b1:
lda #'-'
jsr print_char
sec
@ -105,8 +111,17 @@ print_sdword: {
eor #$ff
adc #0
sta dw+3
b1:
jsr print_dword
jmp b2
}
// Print a single char
// print_char(byte register(A) ch)
print_char: {
ldy #0
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
rts
}
// Print a dword as HEX
@ -154,17 +169,6 @@ print_byte: {
jsr print_char
rts
}
// Print a single char
// print_char(byte register(A) ch)
print_char: {
ldy #0
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
rts
}
// Print a zero-terminated string
// print_str(byte* zeropage($c) str)
print_str: {

View File

@ -31,7 +31,7 @@ main::@return: scope:[main] from main::@4
[14] return
to:@return
testLong: scope:[testLong] from main::@4
[15] (byte*~) print_char_cursor#159 ← (byte*) print_line_cursor#1
[15] (byte*~) print_char_cursor#162 ← (byte*) print_line_cursor#1
[16] call print_str
to:testLong::@1
testLong::@1: scope:[testLong] from testLong
@ -67,236 +67,240 @@ print_ln: scope:[print_ln] from testChar::@6 testInt::@6 testLong::@6 testShort
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[31] (byte*) print_line_cursor#20 ← phi( print_ln/(byte*) print_line_cursor#39 print_ln::@1/(byte*) print_line_cursor#1 )
[32] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#20 + (byte) $28
[33] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#25) goto print_ln::@1
[33] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#26) goto print_ln::@1
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[34] return
to:@return
print_sdword: scope:[print_sdword] from testLong::@3 testLong::@5
[35] (signed dword) print_sdword::dw#3 ← phi( testLong::@3/(const signed dword) testLong::n#0 testLong::@5/(const signed dword) testLong::s#0 )
[36] if((signed dword) print_sdword::dw#3>=(signed byte) 0) goto print_sdword::@1
to:print_sdword::@2
print_sdword::@2: scope:[print_sdword] from print_sdword
[36] if((signed dword) print_sdword::dw#3<(signed byte) 0) goto print_sdword::@1
to:print_sdword::@3
print_sdword::@3: scope:[print_sdword] from print_sdword
[37] phi()
[38] call print_char
to:print_sdword::@3
print_sdword::@3: scope:[print_sdword] from print_sdword::@2
[39] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#3
to:print_sdword::@1
print_sdword::@1: scope:[print_sdword] from print_sdword print_sdword::@3
[40] (signed dword) print_sdword::dw#4 ← phi( print_sdword/(signed dword) print_sdword::dw#3 print_sdword::@3/(signed dword) print_sdword::dw#0 )
[41] (dword) print_dword::dw#0 ← (dword)(signed dword) print_sdword::dw#4
[42] call print_dword
to:print_sdword::@2
print_sdword::@2: scope:[print_sdword] from print_sdword::@3 print_sdword::@4
[39] (signed dword) print_sdword::dw#5 ← phi( print_sdword::@4/(signed dword) print_sdword::dw#0 print_sdword::@3/(signed dword) print_sdword::dw#3 )
[40] (dword) print_dword::dw#0 ← (dword)(signed dword) print_sdword::dw#5
[41] call print_dword
to:print_sdword::@return
print_sdword::@return: scope:[print_sdword] from print_sdword::@1
[43] return
print_sdword::@return: scope:[print_sdword] from print_sdword::@2
[42] return
to:@return
print_dword: scope:[print_dword] from print_sdword::@1 testLong::@1
[44] (byte*) print_char_cursor#143 ← phi( print_sdword::@1/(byte*) print_char_cursor#25 testLong::@1/(byte*) print_char_cursor#134 )
[44] (dword) print_dword::dw#2 ← phi( print_sdword::@1/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u#0 )
[45] (word) print_word::w#1 ← > (dword) print_dword::dw#2
[46] call print_word
to:print_dword::@1
print_dword::@1: scope:[print_dword] from print_dword
[47] (word) print_word::w#2 ← < (dword) print_dword::dw#2
[48] call print_word
to:print_dword::@return
print_dword::@return: scope:[print_dword] from print_dword::@1
[49] return
to:@return
print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1
[50] (byte*) print_char_cursor#142 ← phi( print_dword/(byte*) print_char_cursor#143 print_dword::@1/(byte*) print_char_cursor#25 print_sword::@2/(byte*) print_char_cursor#25 testInt::@1/(byte*) print_char_cursor#134 testShort::@1/(byte*) print_char_cursor#134 )
[50] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u#0 testShort::@1/(const word) testShort::u#0 )
[51] (byte) print_byte::b#1 ← > (word) print_word::w#5
[52] call print_byte
to:print_word::@1
print_word::@1: scope:[print_word] from print_word
[53] (byte) print_byte::b#2 ← < (word) print_word::w#5
[54] call print_byte
to:print_word::@return
print_word::@return: scope:[print_word] from print_word::@1
[55] return
to:@return
print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3
[56] (byte*) print_char_cursor#146 ← phi( print_sbyte::@2/(byte*) print_char_cursor#25 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#25 testChar::@1/(byte*) print_char_cursor#134 testChar::@3/(byte*) print_char_cursor#25 )
[56] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 )
[57] (byte~) print_byte::$0 ← (byte) print_byte::b#5 >> (byte) 4
[58] (byte) print_char::ch#5 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
[59] call print_char
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[60] (byte~) print_byte::$2 ← (byte) print_byte::b#5 & (byte) $f
[61] (byte) print_char::ch#6 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
[62] call print_char
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[63] return
to:@return
print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sdword::@2 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4
[64] (byte*) print_char_cursor#92 ← phi( print_byte/(byte*) print_char_cursor#146 print_byte::@1/(byte*) print_char_cursor#25 print_sbyte::@1/(byte*) print_char_cursor#25 print_sdword::@2/(byte*) print_char_cursor#25 print_sword::@1/(byte*) print_char_cursor#25 print_sword::@3/(byte*) print_char_cursor#25 testChar::@2/(byte*) print_char_cursor#25 testChar::@4/(byte*) print_char_cursor#25 testInt::@2/(byte*) print_char_cursor#25 testInt::@4/(byte*) print_char_cursor#25 testLong::@2/(byte*) print_char_cursor#25 testLong::@4/(byte*) print_char_cursor#25 testShort::@2/(byte*) print_char_cursor#25 testShort::@4/(byte*) print_char_cursor#25 )
[64] (byte) print_char::ch#15 ← phi( print_byte/(byte) print_char::ch#5 print_byte::@1/(byte) print_char::ch#6 print_sbyte::@1/(byte) '-' print_sdword::@2/(byte) '-' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' testChar::@2/(byte) ' ' testChar::@4/(byte) ' ' testInt::@2/(byte) ' ' testInt::@4/(byte) ' ' testLong::@2/(byte) ' ' testLong::@4/(byte) ' ' testShort::@2/(byte) ' ' testShort::@4/(byte) ' ' )
[65] *((byte*) print_char_cursor#92) ← (byte) print_char::ch#15
[66] (byte*) print_char_cursor#25 ← ++ (byte*) print_char_cursor#92
print_sdword::@1: scope:[print_sdword] from print_sdword
[43] phi()
[44] call print_char
to:print_sdword::@4
print_sdword::@4: scope:[print_sdword] from print_sdword::@1
[45] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#3
to:print_sdword::@2
print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4
[46] (byte*) print_char_cursor#94 ← phi( print_byte/(byte*) print_char_cursor#149 print_byte::@1/(byte*) print_char_cursor#26 print_sbyte::@1/(byte*) print_char_cursor#26 print_sdword::@1/(byte*) print_char_cursor#26 print_sdword::@3/(byte*) print_char_cursor#26 print_sword::@1/(byte*) print_char_cursor#26 print_sword::@3/(byte*) print_char_cursor#26 testChar::@2/(byte*) print_char_cursor#26 testChar::@4/(byte*) print_char_cursor#26 testInt::@2/(byte*) print_char_cursor#26 testInt::@4/(byte*) print_char_cursor#26 testLong::@2/(byte*) print_char_cursor#26 testLong::@4/(byte*) print_char_cursor#26 testShort::@2/(byte*) print_char_cursor#26 testShort::@4/(byte*) print_char_cursor#26 )
[46] (byte) print_char::ch#16 ← phi( print_byte/(byte) print_char::ch#6 print_byte::@1/(byte) print_char::ch#7 print_sbyte::@1/(byte) '-' print_sdword::@1/(byte) '-' print_sdword::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' testChar::@2/(byte) ' ' testChar::@4/(byte) ' ' testInt::@2/(byte) ' ' testInt::@4/(byte) ' ' testLong::@2/(byte) ' ' testLong::@4/(byte) ' ' testShort::@2/(byte) ' ' testShort::@4/(byte) ' ' )
[47] *((byte*) print_char_cursor#94) ← (byte) print_char::ch#16
[48] (byte*) print_char_cursor#26 ← ++ (byte*) print_char_cursor#94
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[67] return
[49] return
to:@return
print_dword: scope:[print_dword] from print_sdword::@2 testLong::@1
[50] (byte*) print_char_cursor#145 ← phi( print_sdword::@2/(byte*) print_char_cursor#26 testLong::@1/(byte*) print_char_cursor#136 )
[50] (dword) print_dword::dw#2 ← phi( print_sdword::@2/(dword) print_dword::dw#0 testLong::@1/(const dword) testLong::u#0 )
[51] (word) print_word::w#1 ← > (dword) print_dword::dw#2
[52] call print_word
to:print_dword::@1
print_dword::@1: scope:[print_dword] from print_dword
[53] (word) print_word::w#2 ← < (dword) print_dword::dw#2
[54] call print_word
to:print_dword::@return
print_dword::@return: scope:[print_dword] from print_dword::@1
[55] return
to:@return
print_word: scope:[print_word] from print_dword print_dword::@1 print_sword::@2 testInt::@1 testShort::@1
[56] (byte*) print_char_cursor#144 ← phi( print_dword/(byte*) print_char_cursor#145 print_dword::@1/(byte*) print_char_cursor#26 print_sword::@2/(byte*) print_char_cursor#26 testInt::@1/(byte*) print_char_cursor#136 testShort::@1/(byte*) print_char_cursor#136 )
[56] (word) print_word::w#5 ← phi( print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 testInt::@1/(const word) testInt::u#0 testShort::@1/(const word) testShort::u#0 )
[57] (byte) print_byte::b#1 ← > (word) print_word::w#5
[58] call print_byte
to:print_word::@1
print_word::@1: scope:[print_word] from print_word
[59] (byte) print_byte::b#2 ← < (word) print_word::w#5
[60] call print_byte
to:print_word::@return
print_word::@return: scope:[print_word] from print_word::@1
[61] return
to:@return
print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3
[62] (byte*) print_char_cursor#149 ← phi( print_sbyte::@2/(byte*) print_char_cursor#26 print_word/(byte*) print_char_cursor#144 print_word::@1/(byte*) print_char_cursor#26 testChar::@1/(byte*) print_char_cursor#136 testChar::@3/(byte*) print_char_cursor#26 )
[62] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 )
[63] (byte~) print_byte::$0 ← (byte) print_byte::b#5 >> (byte) 4
[64] (byte) print_char::ch#6 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
[65] call print_char
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[66] (byte~) print_byte::$2 ← (byte) print_byte::b#5 & (byte) $f
[67] (byte) print_char::ch#7 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
[68] call print_char
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[69] return
to:@return
print_str: scope:[print_str] from testChar testInt testLong testShort
[68] (byte*) print_char_cursor#153 ← phi( testChar/(byte*) 1024 testInt/(byte*~) print_char_cursor#158 testLong/(byte*~) print_char_cursor#159 testShort/(byte*~) print_char_cursor#160 )
[68] (byte*) print_str::str#7 ← phi( testChar/(const string) testChar::str testInt/(const string) testInt::str testLong/(const string) testLong::str testShort/(const string) testShort::str )
[70] (byte*) print_char_cursor#156 ← phi( testChar/(byte*) 1024 testInt/(byte*~) print_char_cursor#161 testLong/(byte*~) print_char_cursor#162 testShort/(byte*~) print_char_cursor#163 )
[70] (byte*) print_str::str#7 ← phi( testChar/(const string) testChar::str testInt/(const string) testInt::str testLong/(const string) testLong::str testShort/(const string) testShort::str )
to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@2
[69] (byte*) print_char_cursor#134 ← phi( print_str/(byte*) print_char_cursor#153 print_str::@2/(byte*) print_char_cursor#1 )
[69] (byte*) print_str::str#5 ← phi( print_str/(byte*) print_str::str#7 print_str::@2/(byte*) print_str::str#0 )
[70] if(*((byte*) print_str::str#5)!=(byte) '@') goto print_str::@2
[71] (byte*) print_char_cursor#136 ← phi( print_str/(byte*) print_char_cursor#156 print_str::@2/(byte*) print_char_cursor#1 )
[71] (byte*) print_str::str#5 ← phi( print_str/(byte*) print_str::str#7 print_str::@2/(byte*) print_str::str#0 )
[72] if(*((byte*) print_str::str#5)!=(byte) '@') goto print_str::@2
to:print_str::@return
print_str::@return: scope:[print_str] from print_str::@1
[71] return
[73] return
to:@return
print_str::@2: scope:[print_str] from print_str::@1
[72] *((byte*) print_char_cursor#134) ← *((byte*) print_str::str#5)
[73] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#134
[74] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#5
[74] *((byte*) print_char_cursor#136) ← *((byte*) print_str::str#5)
[75] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#136
[76] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#5
to:print_str::@1
testInt: scope:[testInt] from main::@3
[75] (byte*~) print_char_cursor#158 ← (byte*) print_line_cursor#1
[76] call print_str
[77] (byte*~) print_char_cursor#161 ← (byte*) print_line_cursor#1
[78] call print_str
to:testInt::@1
testInt::@1: scope:[testInt] from testInt
[77] phi()
[78] call print_word
[79] phi()
[80] call print_word
to:testInt::@2
testInt::@2: scope:[testInt] from testInt::@1
[79] phi()
[80] call print_char
[81] phi()
[82] call print_char
to:testInt::@3
testInt::@3: scope:[testInt] from testInt::@2
[81] phi()
[82] call print_sword
[83] phi()
[84] call print_sword
to:testInt::@4
testInt::@4: scope:[testInt] from testInt::@3
[83] phi()
[84] call print_char
[85] phi()
[86] call print_char
to:testInt::@5
testInt::@5: scope:[testInt] from testInt::@4
[85] phi()
[86] call print_sword
[87] phi()
[88] call print_sword
to:testInt::@6
testInt::@6: scope:[testInt] from testInt::@5
[87] phi()
[88] call print_ln
[89] phi()
[90] call print_ln
to:testInt::@return
testInt::@return: scope:[testInt] from testInt::@6
[89] return
[91] return
to:@return
print_sword: scope:[print_sword] from testInt::@3 testInt::@5 testShort::@3 testShort::@5
[90] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n#0 testInt::@5/(const signed word) testInt::s#0 testShort::@3/(const signed word) testShort::n#0 testShort::@5/(const signed word) testShort::s#0 )
[91] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1
[92] (signed word) print_sword::w#10 ← phi( testInt::@3/(const signed word) testInt::n#0 testInt::@5/(const signed word) testInt::s#0 testShort::@3/(const signed word) testShort::n#0 testShort::@5/(const signed word) testShort::s#0 )
[93] if((signed word) print_sword::w#10<(signed byte) 0) goto print_sword::@1
to:print_sword::@3
print_sword::@3: scope:[print_sword] from print_sword
[92] phi()
[93] call print_char
[94] phi()
[95] call print_char
to:print_sword::@2
print_sword::@2: scope:[print_sword] from print_sword::@3 print_sword::@4
[94] (signed word) print_sword::w#7 ← phi( print_sword::@4/(signed word) print_sword::w#0 print_sword::@3/(signed word) print_sword::w#10 )
[95] (word) print_word::w#0 ← (word)(signed word) print_sword::w#7
[96] call print_word
[96] (signed word) print_sword::w#7 ← phi( print_sword::@4/(signed word) print_sword::w#0 print_sword::@3/(signed word) print_sword::w#10 )
[97] (word) print_word::w#0 ← (word)(signed word) print_sword::w#7
[98] call print_word
to:print_sword::@return
print_sword::@return: scope:[print_sword] from print_sword::@2
[97] return
[99] return
to:@return
print_sword::@1: scope:[print_sword] from print_sword
[98] phi()
[99] call print_char
[100] phi()
[101] call print_char
to:print_sword::@4
print_sword::@4: scope:[print_sword] from print_sword::@1
[100] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#10
[102] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#10
to:print_sword::@2
testShort: scope:[testShort] from main::@2
[101] (byte*~) print_char_cursor#160 ← (byte*) print_line_cursor#1
[102] call print_str
[103] (byte*~) print_char_cursor#163 ← (byte*) print_line_cursor#1
[104] call print_str
to:testShort::@1
testShort::@1: scope:[testShort] from testShort
[103] phi()
[104] call print_word
[105] phi()
[106] call print_word
to:testShort::@2
testShort::@2: scope:[testShort] from testShort::@1
[105] phi()
[106] call print_char
[107] phi()
[108] call print_char
to:testShort::@3
testShort::@3: scope:[testShort] from testShort::@2
[107] phi()
[108] call print_sword
[109] phi()
[110] call print_sword
to:testShort::@4
testShort::@4: scope:[testShort] from testShort::@3
[109] phi()
[110] call print_char
[111] phi()
[112] call print_char
to:testShort::@5
testShort::@5: scope:[testShort] from testShort::@4
[111] phi()
[112] call print_sword
[113] phi()
[114] call print_sword
to:testShort::@6
testShort::@6: scope:[testShort] from testShort::@5
[113] phi()
[114] call print_ln
[115] phi()
[116] call print_ln
to:testShort::@return
testShort::@return: scope:[testShort] from testShort::@6
[115] return
[117] return
to:@return
testChar: scope:[testChar] from main::@1
[116] phi()
[117] call print_str
[118] phi()
[119] call print_str
to:testChar::@1
testChar::@1: scope:[testChar] from testChar
[118] phi()
[119] call print_byte
[120] phi()
[121] call print_byte
to:testChar::@2
testChar::@2: scope:[testChar] from testChar::@1
[120] phi()
[121] call print_char
[122] phi()
[123] call print_char
to:testChar::@3
testChar::@3: scope:[testChar] from testChar::@2
[122] phi()
[123] call print_byte
[124] phi()
[125] call print_byte
to:testChar::@4
testChar::@4: scope:[testChar] from testChar::@3
[124] phi()
[125] call print_char
[126] phi()
[127] call print_char
to:testChar::@5
testChar::@5: scope:[testChar] from testChar::@4
[126] phi()
[127] call print_sbyte
[128] phi()
[129] call print_sbyte
to:testChar::@6
testChar::@6: scope:[testChar] from testChar::@5
[128] phi()
[129] call print_ln
[130] phi()
[131] call print_ln
to:testChar::@return
testChar::@return: scope:[testChar] from testChar::@6
[130] return
[132] return
to:@return
print_sbyte: scope:[print_sbyte] from testChar::@5
[131] phi()
[133] phi()
to:print_sbyte::@1
print_sbyte::@1: scope:[print_sbyte] from print_sbyte
[132] phi()
[133] call print_char
[134] phi()
[135] call print_char
to:print_sbyte::@2
print_sbyte::@2: scope:[print_sbyte] from print_sbyte::@1
[134] phi()
[135] call print_byte
[136] phi()
[137] call print_byte
to:print_sbyte::@return
print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@2
[136] return
[138] return
to:@return
print_cls: scope:[print_cls] from main
[137] phi()
[139] phi()
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
[138] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) 1024 print_cls::@1/(byte*) print_cls::sc#1 )
[139] *((byte*) print_cls::sc#2) ← (byte) ' '
[140] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
[141] if((byte*) print_cls::sc#1!=(byte*) 1024+(word) $3e8) goto print_cls::@1
[140] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) 1024 print_cls::@1/(byte*) print_cls::sc#1 )
[141] *((byte*) print_cls::sc#2) ← (byte) ' '
[142] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
[143] if((byte*) print_cls::sc#1!=(byte*) 1024+(word) $3e8) goto print_cls::@1
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls::@1
[142] return
[144] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -19,21 +19,21 @@
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#15 reg byte a 6.0
(byte) print_char::ch#5 reg byte a 4.0
(byte) print_char::ch#16 reg byte a 6.0
(byte) print_char::ch#6 reg byte a 4.0
(byte) print_char::ch#7 reg byte a 4.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:10 11.0
(byte*) print_char_cursor#134 print_char_cursor zp ZP_WORD:10 3.583333333333333
(byte*) print_char_cursor#142 print_char_cursor zp ZP_WORD:10 6.0
(byte*) print_char_cursor#143 print_char_cursor zp ZP_WORD:10 3.0
(byte*) print_char_cursor#146 print_char_cursor zp ZP_WORD:10 3.9999999999999996
(byte*) print_char_cursor#153 print_char_cursor zp ZP_WORD:10 8.0
(byte*~) print_char_cursor#158 print_char_cursor zp ZP_WORD:10 4.0
(byte*~) print_char_cursor#159 print_char_cursor zp ZP_WORD:10 4.0
(byte*~) print_char_cursor#160 print_char_cursor zp ZP_WORD:10 4.0
(byte*) print_char_cursor#25 print_char_cursor zp ZP_WORD:10 0.6000000000000004
(byte*) print_char_cursor#92 print_char_cursor zp ZP_WORD:10 16.0
(byte*) print_char_cursor#136 print_char_cursor zp ZP_WORD:10 3.583333333333333
(byte*) print_char_cursor#144 print_char_cursor zp ZP_WORD:10 6.0
(byte*) print_char_cursor#145 print_char_cursor zp ZP_WORD:10 3.0
(byte*) print_char_cursor#149 print_char_cursor zp ZP_WORD:10 3.9999999999999996
(byte*) print_char_cursor#156 print_char_cursor zp ZP_WORD:10 8.0
(byte*~) print_char_cursor#161 print_char_cursor zp ZP_WORD:10 4.0
(byte*~) print_char_cursor#162 print_char_cursor zp ZP_WORD:10 4.0
(byte*~) print_char_cursor#163 print_char_cursor zp ZP_WORD:10 4.0
(byte*) print_char_cursor#26 print_char_cursor zp ZP_WORD:10 0.6091954022988502
(byte*) print_char_cursor#94 print_char_cursor zp ZP_WORD:10 17.0
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
@ -66,11 +66,12 @@
(label) print_sdword::@1
(label) print_sdword::@2
(label) print_sdword::@3
(label) print_sdword::@4
(label) print_sdword::@return
(signed dword) print_sdword::dw
(signed dword) print_sdword::dw#0 dw zp ZP_DWORD:4 4.0
(signed dword) print_sdword::dw#3 dw zp ZP_DWORD:4 1.5
(signed dword) print_sdword::dw#4 dw zp ZP_DWORD:4 4.0
(signed dword) print_sdword::dw#3 dw zp ZP_DWORD:4 1.0
(signed dword) print_sdword::dw#5 dw zp ZP_DWORD:4 4.0
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
@ -159,11 +160,11 @@
(const word) testShort::u#0 u = (word) $578
zp ZP_WORD:2 [ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 ]
zp ZP_DWORD:4 [ print_sdword::dw#4 print_sdword::dw#3 print_sdword::dw#0 print_dword::dw#2 print_dword::dw#0 ]
zp ZP_DWORD:4 [ print_sdword::dw#5 print_sdword::dw#0 print_sdword::dw#3 print_dword::dw#2 print_dword::dw#0 ]
reg byte a [ print_char::ch#16 print_char::ch#6 print_char::ch#7 ]
zp ZP_WORD:8 [ print_word::w#5 print_word::w#1 print_word::w#2 print_word::w#0 print_sword::w#7 print_sword::w#0 print_sword::w#10 ]
zp ZP_WORD:10 [ print_char_cursor#144 print_char_cursor#145 print_char_cursor#94 print_char_cursor#149 print_char_cursor#26 print_char_cursor#136 print_char_cursor#156 print_char_cursor#161 print_char_cursor#162 print_char_cursor#163 print_char_cursor#1 ]
reg byte x [ print_byte::b#5 print_byte::b#1 print_byte::b#2 ]
reg byte a [ print_char::ch#15 print_char::ch#5 print_char::ch#6 ]
zp ZP_WORD:10 [ print_char_cursor#92 print_char_cursor#146 print_char_cursor#142 print_char_cursor#143 print_char_cursor#25 print_char_cursor#134 print_char_cursor#153 print_char_cursor#158 print_char_cursor#159 print_char_cursor#160 print_char_cursor#1 ]
zp ZP_WORD:12 [ print_str::str#5 print_str::str#7 print_str::str#0 ]
zp ZP_WORD:14 [ print_cls::sc#2 print_cls::sc#1 ]
reg byte a [ print_byte::$0 ]

View File

@ -0,0 +1,850 @@
// Quadratic Spline Library for the C64
// Implements an iterative algorithm using only addition for calculating quadratic splines
//
// A quadratic spline is a curve defined by 3 points: P0, P1 and P2.
// The curve connects P0 to P2 through a smooth curve that moves towards P1, but does usually not touch it.
//
// The general formula for the quadratic spline is as follows:
// A = P2 - 2*P1 + P0
// B = 2*P1 - 2*P0
// C = P0
// P(t) = A*t*t + B*t + C
// for 0 <= t <= 1
//
// This library implements a iterative algorithm using multiplications in the initialization and only additions for calculating each point on the spline.
// The iterative algorithm is based on the following:
// P(t+Dt) = P(t) + A*Dt*Dt + 2*A*t*Dt + B*Dt
//
// init:
// N = 16 (number of plots)
// Dt = 1/N
// P = C
// I = A*Dt*Dt + B*Dt
// J = 2*A*Dt*Dt
// loop(N times):
// plot(P)
// P = P + I
// I = I + J
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.label D011 = $d011
.const VIC_BMM = $20
.const VIC_DEN = $10
.const VIC_RSEL = 8
.label D018 = $d018
// CIA#2 Port A: Serial bus, RS-232, VIC memory bank
.label CIA2_PORT_A = $dd00
// CIA #2 Port A data direction register.
.label CIA2_PORT_A_DDR = $dd02
// CIA #2 Timer A+B Value (32-bit)
.label CIA2_TIMER_AB = $dd04
// CIA #2 Timer A Control Register
.label CIA2_TIMER_A_CONTROL = $dd0e
// CIA #2 Timer B Control Register
.label CIA2_TIMER_B_CONTROL = $dd0f
// Timer Control - Start/stop timer (0:stop, 1: start)
.const CIA_TIMER_CONTROL_START = 1
// Timer Control - Time CONTINUOUS/ONE-SHOT (0:CONTINUOUS, 1: ONE-SHOT)
.const CIA_TIMER_CONTROL_CONTINUOUS = 0
// Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high)
.const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40
.const WHITE = 1
// Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine.
// To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code.
.const CLOCKS_PER_INIT = $12
.label SCREEN = $400
.label BITMAP_SCREEN = $5c00
.label BITMAP_GRAPHICS = $6000
main: {
.const p0_x = $32
.const p0_y = $32
.const p1a_x = $64
.const p1a_y = $32
.const p1b_x = $32
.const p1b_y = $64
.const p2_x = $64
.const p2_y = $64
.const p3a_x = $96
.const p3a_y = $64
.const p3b_x = $64
.const p3b_y = $96
.const p4_x = $96
.const p4_y = $96
.const vicSelectGfxBank1_toDd001_return = 3^(>BITMAP_SCREEN)/$40
.const toD0181_return = (>(BITMAP_SCREEN&$3fff)*4)|(>BITMAP_GRAPHICS)/4&$f
.label _12 = $2b
.label cyclecount = $2b
jsr bitmap_init
jsr bitmap_clear
lda #3
sta CIA2_PORT_A_DDR
lda #vicSelectGfxBank1_toDd001_return
sta CIA2_PORT_A
lda #toD0181_return
sta D018
lda #VIC_BMM|VIC_DEN|VIC_RSEL|3
sta D011
jsr clock_start
lda #<p0_y
sta splinePlot.p0_y
lda #>p0_y
sta splinePlot.p0_y+1
lda #<p2_y
sta splinePlot.p2_y
lda #>p2_y
sta splinePlot.p2_y+1
lda #<p1a_y
sta splinePlot.p1_y
lda #>p1a_y
sta splinePlot.p1_y+1
lda #<p0_x
sta splinePlot.p0_x
lda #>p0_x
sta splinePlot.p0_x+1
lda #<p2_x
sta splinePlot.p2_x
lda #>p2_x
sta splinePlot.p2_x+1
lda #<p1a_x
sta splinePlot.p1_x
lda #>p1a_x
sta splinePlot.p1_x+1
jsr splinePlot
lda #<p2_y
sta splinePlot.p0_y
lda #>p2_y
sta splinePlot.p0_y+1
lda #<p4_y
sta splinePlot.p2_y
lda #>p4_y
sta splinePlot.p2_y+1
lda #<p3a_y
sta splinePlot.p1_y
lda #>p3a_y
sta splinePlot.p1_y+1
lda #<p2_x
sta splinePlot.p0_x
lda #>p2_x
sta splinePlot.p0_x+1
lda #<p4_x
sta splinePlot.p2_x
lda #>p4_x
sta splinePlot.p2_x+1
lda #<p3a_x
sta splinePlot.p1_x
lda #>p3a_x
sta splinePlot.p1_x+1
jsr splinePlot
lda #<p2_y
sta splinePlot.p0_y
lda #>p2_y
sta splinePlot.p0_y+1
lda #<p0_y
sta splinePlot.p2_y
lda #>p0_y
sta splinePlot.p2_y+1
lda #<p1b_y
sta splinePlot.p1_y
lda #>p1b_y
sta splinePlot.p1_y+1
lda #<p2_x
sta splinePlot.p0_x
lda #>p2_x
sta splinePlot.p0_x+1
lda #<p0_x
sta splinePlot.p2_x
lda #>p0_x
sta splinePlot.p2_x+1
lda #<p1b_x
sta splinePlot.p1_x
lda #>p1b_x
sta splinePlot.p1_x+1
jsr splinePlot
lda #<p4_y
sta splinePlot.p0_y
lda #>p4_y
sta splinePlot.p0_y+1
lda #<p2_y
sta splinePlot.p2_y
lda #>p2_y
sta splinePlot.p2_y+1
lda #<p3b_y
sta splinePlot.p1_y
lda #>p3b_y
sta splinePlot.p1_y+1
lda #<p4_x
sta splinePlot.p0_x
lda #>p4_x
sta splinePlot.p0_x+1
lda #<p2_x
sta splinePlot.p2_x
lda #>p2_x
sta splinePlot.p2_x+1
lda #<p3b_x
sta splinePlot.p1_x
lda #>p3b_x
sta splinePlot.p1_x+1
jsr splinePlot
jsr clock
lda cyclecount
sec
sbc #<CLOCKS_PER_INIT
sta cyclecount
lda cyclecount+1
sbc #>CLOCKS_PER_INIT
sta cyclecount+1
lda cyclecount+2
sbc #<CLOCKS_PER_INIT>>$10
sta cyclecount+2
lda cyclecount+3
sbc #>CLOCKS_PER_INIT>>$10
sta cyclecount+3
jsr print_dword_at
rts
}
// Print a dword as HEX at a specific position
// print_dword_at(dword zeropage($2b) dw)
print_dword_at: {
.label dw = $2b
lda dw+2
sta print_word_at.w
lda dw+3
sta print_word_at.w+1
lda #<SCREEN
sta print_word_at.at
lda #>SCREEN
sta print_word_at.at+1
jsr print_word_at
lda dw
sta print_word_at.w
lda dw+1
sta print_word_at.w+1
lda #<SCREEN+4
sta print_word_at.at
lda #>SCREEN+4
sta print_word_at.at+1
jsr print_word_at
rts
}
// Print a word as HEX at a specific position
// print_word_at(word zeropage(2) w, byte* zeropage(4) at)
print_word_at: {
.label w = 2
.label at = 4
lda w+1
sta print_byte_at.b
jsr print_byte_at
lda w
sta print_byte_at.b
lda print_byte_at.at
clc
adc #2
sta print_byte_at.at
bcc !+
inc print_byte_at.at+1
!:
jsr print_byte_at
rts
}
// Print a byte as HEX at a specific position
// print_byte_at(byte zeropage(6) b, byte* zeropage(4) at)
print_byte_at: {
.label b = 6
.label at = 4
lda b
lsr
lsr
lsr
lsr
tay
ldx print_hextab,y
lda at
sta print_char_at.at
lda at+1
sta print_char_at.at+1
jsr print_char_at
lda #$f
and b
tay
lda at
clc
adc #1
sta print_char_at.at
lda at+1
adc #0
sta print_char_at.at+1
ldx print_hextab,y
jsr print_char_at
rts
}
// Print a single char
// print_char_at(byte register(X) ch, byte* zeropage(7) at)
print_char_at: {
.label at = 7
txa
ldy #0
sta (at),y
rts
}
// Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program).
// This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start()
clock: {
.label return = $2b
lda #<$ffffffff
sec
sbc CIA2_TIMER_AB
sta return
lda #>$ffffffff
sbc CIA2_TIMER_AB+1
sta return+1
lda #<$ffffffff>>$10
sbc CIA2_TIMER_AB+2
sta return+2
lda #>$ffffffff>>$10
sbc CIA2_TIMER_AB+3
sta return+3
rts
}
// splinePlot(signed word zeropage($d) p0_x, signed word zeropage($13) p0_y, signed word zeropage(9) p1_x, signed word zeropage($f) p1_y, signed word zeropage($b) p2_x, signed word zeropage($11) p2_y)
splinePlot: {
.label _1 = $b
.label _4 = $11
.label _6 = 9
.label _7 = $2f
.label _9 = $f
.label _10 = $31
.label _12 = $1d
.label _13 = $1d
.label _14 = $33
.label _15 = $33
.label _16 = $33
.label _18 = $21
.label _19 = $21
.label _20 = $37
.label _21 = $37
.label _22 = $37
.label _24 = $3b
.label _25 = $3b
.label _27 = $3f
.label _28 = $3f
.label _30 = $15
.label _32 = $19
.label _35 = $45
.label a_x = $b
.label a_y = $11
.label b_x = $2f
.label b_y = $31
.label i_x = $1d
.label i_y = $21
.label j_x = $3b
.label j_y = $3f
.label p_x = $15
.label p_y = $19
.label p1_x = 9
.label p2_x = $b
.label p0_x = $d
.label p1_y = $f
.label p2_y = $11
.label p0_y = $13
asl _6
rol _6+1
lda _1
sec
sbc _6
sta _1
lda _1+1
sbc _6+1
sta _1+1
lda a_x
clc
adc p0_x
sta a_x
lda a_x+1
adc p0_x+1
sta a_x+1
asl _9
rol _9+1
lda _4
sec
sbc _9
sta _4
lda _4+1
sbc _9+1
sta _4+1
lda a_y
clc
adc p0_y
sta a_y
lda a_y+1
adc p0_y+1
sta a_y+1
lda p0_x
asl
sta _7
lda p0_x+1
rol
sta _7+1
lda _6
sec
sbc b_x
sta b_x
lda _6+1
sbc b_x+1
sta b_x+1
lda p0_y
asl
sta _10
lda p0_y+1
rol
sta _10+1
lda _9
sec
sbc b_y
sta b_y
lda _9+1
sbc b_y+1
sta b_y+1
lda a_x
sta _12
lda a_x+1
sta _12+1
ora #$7f
bmi !+
lda #0
!:
sta _12+2
sta _12+3
lda _13+2
sta _13+3
lda _13+1
sta _13+2
lda _13
sta _13+1
lda #0
sta _13
lda b_x
sta _14
lda b_x+1
sta _14+1
ora #$7f
bmi !+
lda #0
!:
sta _14+2
sta _14+3
lda _15+2
sta _15+3
lda _15+1
sta _15+2
lda _15
sta _15+1
lda #0
sta _15
asl _16
rol _16+1
rol _16+2
rol _16+3
asl _16
rol _16+1
rol _16+2
rol _16+3
asl _16
rol _16+1
rol _16+2
rol _16+3
asl _16
rol _16+1
rol _16+2
rol _16+3
lda i_x
clc
adc _16
sta i_x
lda i_x+1
adc _16+1
sta i_x+1
lda i_x+2
adc _16+2
sta i_x+2
lda i_x+3
adc _16+3
sta i_x+3
lda a_y
sta _18
lda a_y+1
sta _18+1
ora #$7f
bmi !+
lda #0
!:
sta _18+2
sta _18+3
lda _19+2
sta _19+3
lda _19+1
sta _19+2
lda _19
sta _19+1
lda #0
sta _19
lda b_y
sta _20
lda b_y+1
sta _20+1
ora #$7f
bmi !+
lda #0
!:
sta _20+2
sta _20+3
lda _21+2
sta _21+3
lda _21+1
sta _21+2
lda _21
sta _21+1
lda #0
sta _21
asl _22
rol _22+1
rol _22+2
rol _22+3
asl _22
rol _22+1
rol _22+2
rol _22+3
asl _22
rol _22+1
rol _22+2
rol _22+3
asl _22
rol _22+1
rol _22+2
rol _22+3
lda i_y
clc
adc _22
sta i_y
lda i_y+1
adc _22+1
sta i_y+1
lda i_y+2
adc _22+2
sta i_y+2
lda i_y+3
adc _22+3
sta i_y+3
lda a_x
sta _24
lda a_x+1
sta _24+1
ora #$7f
bmi !+
lda #0
!:
sta _24+2
sta _24+3
lda _25+2
sta _25+3
lda _25+1
sta _25+2
lda _25
sta _25+1
lda #0
sta _25
asl j_x
rol j_x+1
rol j_x+2
rol j_x+3
lda a_y
sta _27
lda a_y+1
sta _27+1
ora #$7f
bmi !+
lda #0
!:
sta _27+2
sta _27+3
lda _28+2
sta _28+3
lda _28+1
sta _28+2
lda _28
sta _28+1
lda #0
sta _28
asl j_y
rol j_y+1
rol j_y+2
rol j_y+3
lda p0_x
sta _30
lda p0_x+1
sta _30+1
ora #$7f
bmi !+
lda #0
!:
sta _30+2
sta _30+3
lda p_x+1
sta p_x+3
lda p_x
sta p_x+2
lda #0
sta p_x
sta p_x+1
lda p0_y
sta _32
lda p0_y+1
sta _32+1
ora #$7f
bmi !+
lda #0
!:
sta _32+2
sta _32+3
lda p_y+1
sta p_y+3
lda p_y
sta p_y+2
lda #0
sta p_y
sta p_y+1
tax
b1:
lda p_x+2
sta bitmap_plot.x
lda p_x+3
sta bitmap_plot.x+1
lda p_y+2
sta _35
lda p_y+3
sta _35+1
lda _35
jsr bitmap_plot
lda p_x
clc
adc i_x
sta p_x
lda p_x+1
adc i_x+1
sta p_x+1
lda p_x+2
adc i_x+2
sta p_x+2
lda p_x+3
adc i_x+3
sta p_x+3
lda p_y
clc
adc i_y
sta p_y
lda p_y+1
adc i_y+1
sta p_y+1
lda p_y+2
adc i_y+2
sta p_y+2
lda p_y+3
adc i_y+3
sta p_y+3
lda i_x
clc
adc j_x
sta i_x
lda i_x+1
adc j_x+1
sta i_x+1
lda i_x+2
adc j_x+2
sta i_x+2
lda i_x+3
adc j_x+3
sta i_x+3
lda i_y
clc
adc j_y
sta i_y
lda i_y+1
adc j_y+1
sta i_y+1
lda i_y+2
adc j_y+2
sta i_y+2
lda i_y+3
adc j_y+3
sta i_y+3
inx
cpx #$11
bne b1
rts
}
// Plot a single dot in the bitmap
// bitmap_plot(word zeropage($43) x, byte register(A) y)
bitmap_plot: {
.label _1 = $49
.label plotter = $47
.label x = $43
tay
lda bitmap_plot_yhi,y
sta plotter+1
lda bitmap_plot_ylo,y
sta plotter
lda x
and #<$fff8
sta _1
lda x+1
and #>$fff8
sta _1+1
lda plotter
clc
adc _1
sta plotter
lda plotter+1
adc _1+1
sta plotter+1
lda x
tay
lda bitmap_plot_bit,y
ldy #0
ora (plotter),y
sta (plotter),y
rts
}
// Reset & start the processor clock time. The value can be read using clock().
// This uses CIA #2 Timer A+B on the C64
clock_start: {
// Setup CIA#2 timer A to count (down) CPU cycles
lda #CIA_TIMER_CONTROL_CONTINUOUS
sta CIA2_TIMER_A_CONTROL
lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
sta CIA2_TIMER_B_CONTROL
lda #<$ffffffff
sta CIA2_TIMER_AB
lda #>$ffffffff
sta CIA2_TIMER_AB+1
lda #<$ffffffff>>$10
sta CIA2_TIMER_AB+2
lda #>$ffffffff>>$10
sta CIA2_TIMER_AB+3
lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
sta CIA2_TIMER_B_CONTROL
lda #CIA_TIMER_CONTROL_START
sta CIA2_TIMER_A_CONTROL
rts
}
// Clear all graphics on the bitmap
// bgcol - the background color to fill the screen with
// fgcol - the foreground color to fill the screen with
bitmap_clear: {
.const col = WHITE*$10
ldx #col
lda #<BITMAP_SCREEN
sta memset.str
lda #>BITMAP_SCREEN
sta memset.str+1
lda #<$3e8
sta memset.num
lda #>$3e8
sta memset.num+1
jsr memset
ldx #0
lda #<BITMAP_GRAPHICS
sta memset.str
lda #>BITMAP_GRAPHICS
sta memset.str+1
lda #<$1f40
sta memset.num
lda #>$1f40
sta memset.num+1
jsr memset
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zeropage($27) str, byte register(X) c, word zeropage($25) num)
memset: {
.label end = $25
.label dst = $27
.label num = $25
.label str = $27
lda num
beq breturn
lda num+1
beq breturn
lda end
clc
adc str
sta end
lda end+1
adc str+1
sta end+1
b2:
txa
ldy #0
sta (dst),y
inc dst
bne !+
inc dst+1
!:
lda dst+1
cmp end+1
bne b2
lda dst
cmp end
bne b2
breturn:
rts
}
// Initialize bitmap plotting tables
bitmap_init: {
.label _7 = $4b
.label yoffs = $29
ldx #0
lda #$80
b1:
sta bitmap_plot_bit,x
lsr
cmp #0
bne b2
lda #$80
b2:
inx
cpx #0
bne b1
lda #<BITMAP_GRAPHICS
sta yoffs
lda #>BITMAP_GRAPHICS
sta yoffs+1
ldx #0
b3:
lda #7
sax _7
lda yoffs
ora _7
sta bitmap_plot_ylo,x
lda yoffs+1
sta bitmap_plot_yhi,x
lda #7
cmp _7
bne b4
clc
lda yoffs
adc #<$28*8
sta yoffs
lda yoffs+1
adc #>$28*8
sta yoffs+1
b4:
inx
cpx #0
bne b3
rts
}
print_hextab: .text "0123456789abcdef"
// Tables for the plotter - initialized by calling bitmap_init();
bitmap_plot_ylo: .fill $100, 0
bitmap_plot_yhi: .fill $100, 0
bitmap_plot_bit: .fill $100, 0

View File

@ -0,0 +1,273 @@
@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
main: scope:[main] from @1
[4] phi()
[5] call bitmap_init
to:main::@2
main::@2: scope:[main] from main
[6] phi()
[7] call bitmap_clear
to:main::vicSelectGfxBank1
main::vicSelectGfxBank1: scope:[main] from main::@2
[8] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte) 3
to:main::vicSelectGfxBank1_toDd001
main::vicSelectGfxBank1_toDd001: scope:[main] from main::vicSelectGfxBank1
[9] phi()
to:main::vicSelectGfxBank1_@1
main::vicSelectGfxBank1_@1: scope:[main] from main::vicSelectGfxBank1_toDd001
[10] *((const byte*) CIA2_PORT_A#0) ← (const byte) main::vicSelectGfxBank1_toDd001_return#0
to:main::toD0181
main::toD0181: scope:[main] from main::vicSelectGfxBank1_@1
[11] phi()
to:main::@1
main::@1: scope:[main] from main::toD0181
[12] *((const byte*) D018#0) ← (const byte) main::toD0181_return#0
[13] *((const byte*) D011#0) ← (const byte) VIC_BMM#0|(const byte) VIC_DEN#0|(const byte) VIC_RSEL#0|(byte) 3
[14] call clock_start
to:main::@3
main::@3: scope:[main] from main::@1
[15] phi()
[16] call splinePlot
to:main::@4
main::@4: scope:[main] from main::@3
[17] phi()
[18] call splinePlot
to:main::@5
main::@5: scope:[main] from main::@4
[19] phi()
[20] call splinePlot
to:main::@6
main::@6: scope:[main] from main::@5
[21] phi()
[22] call splinePlot
to:main::@7
main::@7: scope:[main] from main::@6
[23] phi()
[24] call clock
[25] (dword) clock::return#2 ← (dword) clock::return#0
to:main::@8
main::@8: scope:[main] from main::@7
[26] (dword~) main::$12 ← (dword) clock::return#2
[27] (dword) main::cyclecount#0 ← (dword~) main::$12 - (const dword) CLOCKS_PER_INIT#0
[28] (dword) print_dword_at::dw#0 ← (dword) main::cyclecount#0
[29] call print_dword_at
to:main::@return
main::@return: scope:[main] from main::@8
[30] return
to:@return
print_dword_at: scope:[print_dword_at] from main::@8
[31] (word) print_word_at::w#0 ← > (dword) print_dword_at::dw#0
[32] call print_word_at
to:print_dword_at::@1
print_dword_at::@1: scope:[print_dword_at] from print_dword_at
[33] (word) print_word_at::w#1 ← < (dword) print_dword_at::dw#0
[34] call print_word_at
to:print_dword_at::@return
print_dword_at::@return: scope:[print_dword_at] from print_dword_at::@1
[35] return
to:@return
print_word_at: scope:[print_word_at] from print_dword_at print_dword_at::@1
[36] (byte*) print_word_at::at#2 ← phi( print_dword_at/(const byte*) SCREEN#0 print_dword_at::@1/(const byte*) SCREEN#0+(byte) 4 )
[36] (word) print_word_at::w#2 ← phi( print_dword_at/(word) print_word_at::w#0 print_dword_at::@1/(word) print_word_at::w#1 )
[37] (byte) print_byte_at::b#0 ← > (word) print_word_at::w#2
[38] (byte*) print_byte_at::at#0 ← (byte*) print_word_at::at#2
[39] call print_byte_at
to:print_word_at::@1
print_word_at::@1: scope:[print_word_at] from print_word_at
[40] (byte) print_byte_at::b#1 ← < (word) print_word_at::w#2
[41] (byte*) print_byte_at::at#1 ← (byte*) print_word_at::at#2 + (byte) 2
[42] call print_byte_at
to:print_word_at::@return
print_word_at::@return: scope:[print_word_at] from print_word_at::@1
[43] return
to:@return
print_byte_at: scope:[print_byte_at] from print_word_at print_word_at::@1
[44] (byte*) print_byte_at::at#2 ← phi( print_word_at/(byte*) print_byte_at::at#0 print_word_at::@1/(byte*) print_byte_at::at#1 )
[44] (byte) print_byte_at::b#2 ← phi( print_word_at/(byte) print_byte_at::b#0 print_word_at::@1/(byte) print_byte_at::b#1 )
[45] (byte~) print_byte_at::$0 ← (byte) print_byte_at::b#2 >> (byte) 4
[46] (byte) print_char_at::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$0)
[47] (byte*) print_char_at::at#0 ← (byte*) print_byte_at::at#2
[48] call print_char_at
to:print_byte_at::@1
print_byte_at::@1: scope:[print_byte_at] from print_byte_at
[49] (byte~) print_byte_at::$2 ← (byte) print_byte_at::b#2 & (byte) $f
[50] (byte*) print_char_at::at#1 ← (byte*) print_byte_at::at#2 + (byte) 1
[51] (byte) print_char_at::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte_at::$2)
[52] call print_char_at
to:print_byte_at::@return
print_byte_at::@return: scope:[print_byte_at] from print_byte_at::@1
[53] return
to:@return
print_char_at: scope:[print_char_at] from print_byte_at print_byte_at::@1
[54] (byte*) print_char_at::at#2 ← phi( print_byte_at/(byte*) print_char_at::at#0 print_byte_at::@1/(byte*) print_char_at::at#1 )
[54] (byte) print_char_at::ch#2 ← phi( print_byte_at/(byte) print_char_at::ch#0 print_byte_at::@1/(byte) print_char_at::ch#1 )
[55] *((byte*) print_char_at::at#2) ← (byte) print_char_at::ch#2
to:print_char_at::@return
print_char_at::@return: scope:[print_char_at] from print_char_at
[56] return
to:@return
clock: scope:[clock] from main::@7
[57] (dword) clock::return#0 ← (dword) $ffffffff - *((const dword*) CIA2_TIMER_AB#0)
to:clock::@return
clock::@return: scope:[clock] from clock
[58] return
to:@return
splinePlot: scope:[splinePlot] from main::@3 main::@4 main::@5 main::@6
[59] (signed word) splinePlot::p0_y#4 ← phi( main::@3/(const signed word) main::p0_y#0 main::@4/(const signed word) main::p2_y#0 main::@5/(const signed word) main::p2_y#0 main::@6/(const signed word) main::p4_y#0 )
[59] (signed word) splinePlot::p2_y#4 ← phi( main::@3/(const signed word) main::p2_y#0 main::@4/(const signed word) main::p4_y#0 main::@5/(const signed word) main::p0_y#0 main::@6/(const signed word) main::p2_y#0 )
[59] (signed word) splinePlot::p1_y#4 ← phi( main::@3/(const signed word) main::p1a_y#0 main::@4/(const signed word) main::p3a_y#0 main::@5/(const signed word) main::p1b_y#0 main::@6/(const signed word) main::p3b_y#0 )
[59] (signed word) splinePlot::p0_x#4 ← phi( main::@3/(const signed word) main::p0_x#0 main::@4/(const signed word) main::p2_x#0 main::@5/(const signed word) main::p2_x#0 main::@6/(const signed word) main::p4_x#0 )
[59] (signed word) splinePlot::p2_x#4 ← phi( main::@3/(const signed word) main::p2_x#0 main::@4/(const signed word) main::p4_x#0 main::@5/(const signed word) main::p0_x#0 main::@6/(const signed word) main::p2_x#0 )
[59] (signed word) splinePlot::p1_x#4 ← phi( main::@3/(const signed word) main::p1a_x#0 main::@4/(const signed word) main::p3a_x#0 main::@5/(const signed word) main::p1b_x#0 main::@6/(const signed word) main::p3b_x#0 )
[60] (signed word~) splinePlot::$6 ← (signed word) splinePlot::p1_x#4 << (byte) 1
[61] (signed word~) splinePlot::$1 ← (signed word) splinePlot::p2_x#4 - (signed word~) splinePlot::$6
[62] (signed word) splinePlot::a_x#0 ← (signed word~) splinePlot::$1 + (signed word) splinePlot::p0_x#4
[63] (signed word~) splinePlot::$9 ← (signed word) splinePlot::p1_y#4 << (byte) 1
[64] (signed word~) splinePlot::$4 ← (signed word) splinePlot::p2_y#4 - (signed word~) splinePlot::$9
[65] (signed word) splinePlot::a_y#0 ← (signed word~) splinePlot::$4 + (signed word) splinePlot::p0_y#4
[66] (signed word~) splinePlot::$7 ← (signed word) splinePlot::p0_x#4 << (byte) 1
[67] (signed word) splinePlot::b_x#0 ← (signed word~) splinePlot::$6 - (signed word~) splinePlot::$7
[68] (signed word~) splinePlot::$10 ← (signed word) splinePlot::p0_y#4 << (byte) 1
[69] (signed word) splinePlot::b_y#0 ← (signed word~) splinePlot::$9 - (signed word~) splinePlot::$10
[70] (signed dword~) splinePlot::$12 ← (signed dword)(signed word) splinePlot::a_x#0
[71] (signed dword~) splinePlot::$13 ← (signed dword~) splinePlot::$12 << (byte) 8
[72] (signed dword~) splinePlot::$14 ← (signed dword)(signed word) splinePlot::b_x#0
[73] (signed dword~) splinePlot::$15 ← (signed dword~) splinePlot::$14 << (byte) 8
[74] (signed dword~) splinePlot::$16 ← (signed dword~) splinePlot::$15 << (byte) 4
[75] (signed dword) splinePlot::i_x#0 ← (signed dword~) splinePlot::$13 + (signed dword~) splinePlot::$16
[76] (signed dword~) splinePlot::$18 ← (signed dword)(signed word) splinePlot::a_y#0
[77] (signed dword~) splinePlot::$19 ← (signed dword~) splinePlot::$18 << (byte) 8
[78] (signed dword~) splinePlot::$20 ← (signed dword)(signed word) splinePlot::b_y#0
[79] (signed dword~) splinePlot::$21 ← (signed dword~) splinePlot::$20 << (byte) 8
[80] (signed dword~) splinePlot::$22 ← (signed dword~) splinePlot::$21 << (byte) 4
[81] (signed dword) splinePlot::i_y#0 ← (signed dword~) splinePlot::$19 + (signed dword~) splinePlot::$22
[82] (signed dword~) splinePlot::$24 ← (signed dword)(signed word) splinePlot::a_x#0
[83] (signed dword~) splinePlot::$25 ← (signed dword~) splinePlot::$24 << (byte) 8
[84] (signed dword) splinePlot::j_x#0 ← (signed dword~) splinePlot::$25 << (byte) 1
[85] (signed dword~) splinePlot::$27 ← (signed dword)(signed word) splinePlot::a_y#0
[86] (signed dword~) splinePlot::$28 ← (signed dword~) splinePlot::$27 << (byte) 8
[87] (signed dword) splinePlot::j_y#0 ← (signed dword~) splinePlot::$28 << (byte) 1
[88] (signed dword~) splinePlot::$30 ← (signed dword)(signed word) splinePlot::p0_x#4
[89] (signed dword) splinePlot::p_x#0 ← (signed dword~) splinePlot::$30 << (byte) $10
[90] (signed dword~) splinePlot::$32 ← (signed dword)(signed word) splinePlot::p0_y#4
[91] (signed dword) splinePlot::p_y#0 ← (signed dword~) splinePlot::$32 << (byte) $10
to:splinePlot::@1
splinePlot::@1: scope:[splinePlot] from splinePlot splinePlot::@2
[92] (byte) splinePlot::n#2 ← phi( splinePlot/(byte) 0 splinePlot::@2/(byte) splinePlot::n#1 )
[92] (signed dword) splinePlot::i_y#2 ← phi( splinePlot/(signed dword) splinePlot::i_y#0 splinePlot::@2/(signed dword) splinePlot::i_y#1 )
[92] (signed dword) splinePlot::i_x#2 ← phi( splinePlot/(signed dword) splinePlot::i_x#0 splinePlot::@2/(signed dword) splinePlot::i_x#1 )
[92] (signed dword) splinePlot::p_y#2 ← phi( splinePlot/(signed dword) splinePlot::p_y#0 splinePlot::@2/(signed dword) splinePlot::p_y#1 )
[92] (signed dword) splinePlot::p_x#2 ← phi( splinePlot/(signed dword) splinePlot::p_x#0 splinePlot::@2/(signed dword) splinePlot::p_x#1 )
[93] (word) bitmap_plot::x#0 ← > (signed dword) splinePlot::p_x#2
[94] (word~) splinePlot::$35 ← > (signed dword) splinePlot::p_y#2
[95] (byte) bitmap_plot::y#0 ← < (word~) splinePlot::$35
[96] call bitmap_plot
to:splinePlot::@2
splinePlot::@2: scope:[splinePlot] from splinePlot::@1
[97] (signed dword) splinePlot::p_x#1 ← (signed dword) splinePlot::p_x#2 + (signed dword) splinePlot::i_x#2
[98] (signed dword) splinePlot::p_y#1 ← (signed dword) splinePlot::p_y#2 + (signed dword) splinePlot::i_y#2
[99] (signed dword) splinePlot::i_x#1 ← (signed dword) splinePlot::i_x#2 + (signed dword) splinePlot::j_x#0
[100] (signed dword) splinePlot::i_y#1 ← (signed dword) splinePlot::i_y#2 + (signed dword) splinePlot::j_y#0
[101] (byte) splinePlot::n#1 ← ++ (byte) splinePlot::n#2
[102] if((byte) splinePlot::n#1!=(byte) $11) goto splinePlot::@1
to:splinePlot::@return
splinePlot::@return: scope:[splinePlot] from splinePlot::@2
[103] return
to:@return
bitmap_plot: scope:[bitmap_plot] from splinePlot::@1
[104] (word) bitmap_plot::plotter#0 ← *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_plot::y#0) w= *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_plot::y#0)
[105] (word~) bitmap_plot::$1 ← (word) bitmap_plot::x#0 & (word) $fff8
[106] (byte*) bitmap_plot::plotter#1 ← (byte*)(word) bitmap_plot::plotter#0 + (word~) bitmap_plot::$1
[107] (byte~) bitmap_plot::$2 ← < (word) bitmap_plot::x#0
[108] *((byte*) bitmap_plot::plotter#1) ← *((byte*) bitmap_plot::plotter#1) | *((const byte[$100]) bitmap_plot_bit#0 + (byte~) bitmap_plot::$2)
to:bitmap_plot::@return
bitmap_plot::@return: scope:[bitmap_plot] from bitmap_plot
[109] return
to:@return
clock_start: scope:[clock_start] from main::@1
[110] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_CONTINUOUS#0
[111] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0
[112] *((const dword*) CIA2_TIMER_AB#0) ← (dword) $ffffffff
[113] *((const byte*) CIA2_TIMER_B_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0|(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0
[114] *((const byte*) CIA2_TIMER_A_CONTROL#0) ← (const byte) CIA_TIMER_CONTROL_START#0
to:clock_start::@return
clock_start::@return: scope:[clock_start] from clock_start
[115] return
to:@return
bitmap_clear: scope:[bitmap_clear] from main::@2
[116] phi()
[117] call memset
to:bitmap_clear::@1
bitmap_clear::@1: scope:[bitmap_clear] from bitmap_clear
[118] phi()
[119] call memset
to:bitmap_clear::@return
bitmap_clear::@return: scope:[bitmap_clear] from bitmap_clear::@1
[120] return
to:@return
memset: scope:[memset] from bitmap_clear bitmap_clear::@1
[121] (byte) memset::c#3 ← phi( bitmap_clear/(const byte) bitmap_clear::col#0 bitmap_clear::@1/(byte) 0 )
[121] (void*) memset::str#3 ← phi( bitmap_clear/(void*)(const byte*) BITMAP_SCREEN#0 bitmap_clear::@1/(void*)(const byte*) BITMAP_GRAPHICS#0 )
[121] (word) memset::num#2 ← phi( bitmap_clear/(word) $3e8 bitmap_clear::@1/(word) $1f40 )
[122] if((word) memset::num#2<=(byte) 0) goto memset::@return
to:memset::@1
memset::@1: scope:[memset] from memset
[123] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (word) memset::num#2
[124] (byte*~) memset::dst#3 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@2
[125] (byte*) memset::dst#2 ← phi( memset::@1/(byte*~) memset::dst#3 memset::@2/(byte*) memset::dst#1 )
[126] *((byte*) memset::dst#2) ← (byte) memset::c#3
[127] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
[128] if((byte*) memset::dst#1!=(byte*) memset::end#0) goto memset::@2
to:memset::@return
memset::@return: scope:[memset] from memset memset::@2
[129] return
to:@return
bitmap_init: scope:[bitmap_init] from main
[130] phi()
to:bitmap_init::@1
bitmap_init::@1: scope:[bitmap_init] from bitmap_init bitmap_init::@2
[131] (byte) bitmap_init::x#2 ← phi( bitmap_init/(byte) 0 bitmap_init::@2/(byte) bitmap_init::x#1 )
[131] (byte) bitmap_init::bits#3 ← phi( bitmap_init/(byte) $80 bitmap_init::@2/(byte) bitmap_init::bits#4 )
[132] *((const byte[$100]) bitmap_plot_bit#0 + (byte) bitmap_init::x#2) ← (byte) bitmap_init::bits#3
[133] (byte) bitmap_init::bits#1 ← (byte) bitmap_init::bits#3 >> (byte) 1
[134] if((byte) bitmap_init::bits#1!=(byte) 0) goto bitmap_init::@6
to:bitmap_init::@2
bitmap_init::@6: scope:[bitmap_init] from bitmap_init::@1
[135] phi()
to:bitmap_init::@2
bitmap_init::@2: scope:[bitmap_init] from bitmap_init::@1 bitmap_init::@6
[136] (byte) bitmap_init::bits#4 ← phi( bitmap_init::@6/(byte) bitmap_init::bits#1 bitmap_init::@1/(byte) $80 )
[137] (byte) bitmap_init::x#1 ← ++ (byte) bitmap_init::x#2
[138] if((byte) bitmap_init::x#1!=(byte) 0) goto bitmap_init::@1
to:bitmap_init::@3
bitmap_init::@3: scope:[bitmap_init] from bitmap_init::@2 bitmap_init::@4
[139] (byte*) bitmap_init::yoffs#2 ← phi( bitmap_init::@2/(const byte*) BITMAP_GRAPHICS#0 bitmap_init::@4/(byte*) bitmap_init::yoffs#4 )
[139] (byte) bitmap_init::y#2 ← phi( bitmap_init::@2/(byte) 0 bitmap_init::@4/(byte) bitmap_init::y#1 )
[140] (byte~) bitmap_init::$7 ← (byte) bitmap_init::y#2 & (byte) 7
[141] (byte~) bitmap_init::$4 ← < (byte*) bitmap_init::yoffs#2
[142] (byte~) bitmap_init::$5 ← (byte~) bitmap_init::$7 | (byte~) bitmap_init::$4
[143] *((const byte[$100]) bitmap_plot_ylo#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$5
[144] (byte~) bitmap_init::$6 ← > (byte*) bitmap_init::yoffs#2
[145] *((const byte[$100]) bitmap_plot_yhi#0 + (byte) bitmap_init::y#2) ← (byte~) bitmap_init::$6
[146] if((byte~) bitmap_init::$7!=(byte) 7) goto bitmap_init::@4
to:bitmap_init::@5
bitmap_init::@5: scope:[bitmap_init] from bitmap_init::@3
[147] (byte*) bitmap_init::yoffs#1 ← (byte*) bitmap_init::yoffs#2 + (word)(number) $28*(number) 8
to:bitmap_init::@4
bitmap_init::@4: scope:[bitmap_init] from bitmap_init::@3 bitmap_init::@5
[148] (byte*) bitmap_init::yoffs#4 ← phi( bitmap_init::@3/(byte*) bitmap_init::yoffs#2 bitmap_init::@5/(byte*) bitmap_init::yoffs#1 )
[149] (byte) bitmap_init::y#1 ← ++ (byte) bitmap_init::y#2
[150] if((byte) bitmap_init::y#1!=(byte) 0) goto bitmap_init::@3
to:bitmap_init::@return
bitmap_init::@return: scope:[bitmap_init] from bitmap_init::@4
[151] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,347 @@
(label) @1
(label) @begin
(label) @end
(byte*) BITMAP_GRAPHICS
(const byte*) BITMAP_GRAPHICS#0 BITMAP_GRAPHICS = (byte*) 24576
(byte*) BITMAP_SCREEN
(const byte*) BITMAP_SCREEN#0 BITMAP_SCREEN = (byte*) 23552
(byte) BLACK
(byte*) CIA2_PORT_A
(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = (byte*) 56576
(byte*) CIA2_PORT_A_DDR
(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = (byte*) 56578
(dword*) CIA2_TIMER_AB
(const dword*) CIA2_TIMER_AB#0 CIA2_TIMER_AB = (dword*) 56580
(byte*) CIA2_TIMER_A_CONTROL
(const byte*) CIA2_TIMER_A_CONTROL#0 CIA2_TIMER_A_CONTROL = (byte*) 56590
(byte*) CIA2_TIMER_B_CONTROL
(const byte*) CIA2_TIMER_B_CONTROL#0 CIA2_TIMER_B_CONTROL = (byte*) 56591
(byte) CIA_TIMER_CONTROL_A_COUNT_CYCLES
(byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A
(const byte) CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A#0 CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = (byte) $40
(byte) CIA_TIMER_CONTROL_CONTINUOUS
(const byte) CIA_TIMER_CONTROL_CONTINUOUS#0 CIA_TIMER_CONTROL_CONTINUOUS = (byte) 0
(byte) CIA_TIMER_CONTROL_START
(const byte) CIA_TIMER_CONTROL_START#0 CIA_TIMER_CONTROL_START = (byte) 1
(byte) CIA_TIMER_CONTROL_STOP
(dword) CLOCKS_PER_INIT
(const dword) CLOCKS_PER_INIT#0 CLOCKS_PER_INIT = (byte) $12
(byte*) D011
(const byte*) D011#0 D011 = (byte*) 53265
(byte*) D018
(const byte*) D018#0 D018 = (byte*) 53272
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(signed word) SplineVector16::x
(signed word) SplineVector16::y
(signed dword) SplineVector32::x
(signed dword) SplineVector32::y
(byte) VIC_BMM
(const byte) VIC_BMM#0 VIC_BMM = (byte) $20
(byte) VIC_DEN
(const byte) VIC_DEN#0 VIC_DEN = (byte) $10
(byte) VIC_RSEL
(const byte) VIC_RSEL#0 VIC_RSEL = (byte) 8
(byte) WHITE
(const byte) WHITE#0 WHITE = (byte) 1
(void()) bitmap_clear((byte) bitmap_clear::bgcol , (byte) bitmap_clear::fgcol)
(label) bitmap_clear::@1
(label) bitmap_clear::@return
(byte) bitmap_clear::bgcol
(byte) bitmap_clear::col
(const byte) bitmap_clear::col#0 col = (const byte) WHITE#0*(byte) $10
(byte) bitmap_clear::fgcol
(byte*) bitmap_gfx
(void()) bitmap_init((byte*) bitmap_init::gfx , (byte*) bitmap_init::screen)
(byte~) bitmap_init::$4 reg byte a 22.0
(byte~) bitmap_init::$5 reg byte a 22.0
(byte~) bitmap_init::$6 reg byte a 22.0
(byte~) bitmap_init::$7 $7 zp ZP_BYTE:75 5.5
(label) bitmap_init::@1
(label) bitmap_init::@2
(label) bitmap_init::@3
(label) bitmap_init::@4
(label) bitmap_init::@5
(label) bitmap_init::@6
(label) bitmap_init::@return
(byte) bitmap_init::bits
(byte) bitmap_init::bits#1 reg byte a 11.0
(byte) bitmap_init::bits#3 reg byte a 16.5
(byte) bitmap_init::bits#4 reg byte a 7.333333333333333
(byte*) bitmap_init::gfx
(byte*) bitmap_init::screen
(byte) bitmap_init::x
(byte) bitmap_init::x#1 reg byte x 16.5
(byte) bitmap_init::x#2 reg byte x 5.5
(byte) bitmap_init::y
(byte) bitmap_init::y#1 reg byte x 16.5
(byte) bitmap_init::y#2 reg byte x 5.5
(byte*) bitmap_init::yoffs
(byte*) bitmap_init::yoffs#1 yoffs zp ZP_WORD:41 22.0
(byte*) bitmap_init::yoffs#2 yoffs zp ZP_WORD:41 6.875
(byte*) bitmap_init::yoffs#4 yoffs zp ZP_WORD:41 11.0
(void()) bitmap_plot((word) bitmap_plot::x , (byte) bitmap_plot::y)
(word~) bitmap_plot::$1 $1 zp ZP_WORD:73 4.0
(byte~) bitmap_plot::$2 reg byte a 4.0
(label) bitmap_plot::@return
(byte*) bitmap_plot::plotter
(word) bitmap_plot::plotter#0 plotter zp ZP_WORD:71 1.0
(byte*) bitmap_plot::plotter#1 plotter zp ZP_WORD:71 3.0
(word) bitmap_plot::x
(word) bitmap_plot::x#0 x zp ZP_WORD:67 2.5
(byte) bitmap_plot::y
(byte) bitmap_plot::y#0 reg byte a 15.0
(byte[$100]) bitmap_plot_bit
(const byte[$100]) bitmap_plot_bit#0 bitmap_plot_bit = { fill( $100, 0) }
(byte[$100]) bitmap_plot_yhi
(const byte[$100]) bitmap_plot_yhi#0 bitmap_plot_yhi = { fill( $100, 0) }
(byte[$100]) bitmap_plot_ylo
(const byte[$100]) bitmap_plot_ylo#0 bitmap_plot_ylo = { fill( $100, 0) }
(byte*) bitmap_screen
(dword()) clock()
(label) clock::@return
(dword) clock::return
(dword) clock::return#0 return zp ZP_DWORD:43 1.3333333333333333
(dword) clock::return#2 return zp ZP_DWORD:43 4.0
(void()) clock_start()
(label) clock_start::@return
(void()) main()
(dword~) main::$12 $12 zp ZP_DWORD:43 4.0
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@4
(label) main::@5
(label) main::@6
(label) main::@7
(label) main::@8
(label) main::@return
(dword) main::cyclecount
(dword) main::cyclecount#0 cyclecount zp ZP_DWORD:43 4.0
(signed word) main::p0_x
(const signed word) main::p0_x#0 p0_x = (signed byte) $32
(signed word) main::p0_y
(const signed word) main::p0_y#0 p0_y = (signed byte) $32
(signed word) main::p1a_x
(const signed word) main::p1a_x#0 p1a_x = (signed byte) $64
(signed word) main::p1a_y
(const signed word) main::p1a_y#0 p1a_y = (signed byte) $32
(signed word) main::p1b_x
(const signed word) main::p1b_x#0 p1b_x = (signed byte) $32
(signed word) main::p1b_y
(const signed word) main::p1b_y#0 p1b_y = (signed byte) $64
(signed word) main::p2_x
(const signed word) main::p2_x#0 p2_x = (signed byte) $64
(signed word) main::p2_y
(const signed word) main::p2_y#0 p2_y = (signed byte) $64
(signed word) main::p3a_x
(const signed word) main::p3a_x#0 p3a_x = (signed word) $96
(signed word) main::p3a_y
(const signed word) main::p3a_y#0 p3a_y = (signed byte) $64
(signed word) main::p3b_x
(const signed word) main::p3b_x#0 p3b_x = (signed byte) $64
(signed word) main::p3b_y
(const signed word) main::p3b_y#0 p3b_y = (signed word) $96
(signed word) main::p4_x
(const signed word) main::p4_x#0 p4_x = (signed word) $96
(signed word) main::p4_y
(const signed word) main::p4_y#0 p4_y = (signed word) $96
(label) main::toD0181
(word~) main::toD0181_$0
(number~) main::toD0181_$1
(number~) main::toD0181_$2
(number~) main::toD0181_$3
(word~) main::toD0181_$4
(byte~) main::toD0181_$5
(number~) main::toD0181_$6
(number~) main::toD0181_$7
(number~) main::toD0181_$8
(byte*) main::toD0181_gfx
(byte) main::toD0181_return
(const byte) main::toD0181_return#0 toD0181_return = >(word)(const byte*) BITMAP_SCREEN#0&(word) $3fff*(byte) 4|>(word)(const byte*) BITMAP_GRAPHICS#0/(byte) 4&(byte) $f
(byte*) main::toD0181_screen
(label) main::vicSelectGfxBank1
(byte~) main::vicSelectGfxBank1_$0
(label) main::vicSelectGfxBank1_@1
(byte*) main::vicSelectGfxBank1_gfx
(label) main::vicSelectGfxBank1_toDd001
(word~) main::vicSelectGfxBank1_toDd001_$0
(byte~) main::vicSelectGfxBank1_toDd001_$1
(number~) main::vicSelectGfxBank1_toDd001_$2
(number~) main::vicSelectGfxBank1_toDd001_$3
(byte*) main::vicSelectGfxBank1_toDd001_gfx
(byte) main::vicSelectGfxBank1_toDd001_return
(const byte) main::vicSelectGfxBank1_toDd001_return#0 vicSelectGfxBank1_toDd001_return = (byte) 3^>(word)(const byte*) BITMAP_SCREEN#0/(byte) $40
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@return
(byte) memset::c
(byte) memset::c#3 reg byte x 1.375
(byte*) memset::dst
(byte*) memset::dst#1 dst zp ZP_WORD:39 16.5
(byte*) memset::dst#2 dst zp ZP_WORD:39 17.5
(byte*~) memset::dst#3 dst zp ZP_WORD:39 4.0
(byte*) memset::end
(byte*) memset::end#0 end zp ZP_WORD:37 2.1666666666666665
(word) memset::num
(word) memset::num#2 num zp ZP_WORD:37 2.0
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp ZP_WORD:39
(void()) print_byte_at((byte) print_byte_at::b , (byte*) print_byte_at::at)
(byte~) print_byte_at::$0 reg byte a 4.0
(byte~) print_byte_at::$2 reg byte y 2.0
(label) print_byte_at::@1
(label) print_byte_at::@return
(byte*) print_byte_at::at
(byte*) print_byte_at::at#0 at zp ZP_WORD:4 4.0
(byte*) print_byte_at::at#1 at zp ZP_WORD:4 4.0
(byte*) print_byte_at::at#2 at zp ZP_WORD:4 1.3333333333333333
(byte) print_byte_at::b
(byte) print_byte_at::b#0 b zp ZP_BYTE:6 2.0
(byte) print_byte_at::b#1 b zp ZP_BYTE:6 2.0
(byte) print_byte_at::b#2 b zp ZP_BYTE:6 1.6
(void()) print_char_at((byte) print_char_at::ch , (byte*) print_char_at::at)
(label) print_char_at::@return
(byte*) print_char_at::at
(byte*) print_char_at::at#0 at zp ZP_WORD:7 4.0
(byte*) print_char_at::at#1 at zp ZP_WORD:7 2.0
(byte*) print_char_at::at#2 at zp ZP_WORD:7 6.0
(byte) print_char_at::ch
(byte) print_char_at::ch#0 reg byte x 2.0
(byte) print_char_at::ch#1 reg byte x 4.0
(byte) print_char_at::ch#2 reg byte x 6.0
(void()) print_dword_at((dword) print_dword_at::dw , (byte*) print_dword_at::at)
(label) print_dword_at::@1
(label) print_dword_at::@return
(byte*) print_dword_at::at
(dword) print_dword_at::dw
(dword) print_dword_at::dw#0 dw zp ZP_DWORD:43 2.0
(byte[]) print_hextab
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
(void()) print_word_at((word) print_word_at::w , (byte*) print_word_at::at)
(label) print_word_at::@1
(label) print_word_at::@return
(byte*) print_word_at::at
(byte*) print_word_at::at#2 at zp ZP_WORD:4 0.8
(word) print_word_at::w
(word) print_word_at::w#0 w zp ZP_WORD:2 4.0
(word) print_word_at::w#1 w zp ZP_WORD:2 4.0
(word) print_word_at::w#2 w zp ZP_WORD:2 2.0
(void()) splinePlot((signed word) splinePlot::p0_x , (signed word) splinePlot::p0_y , (signed word) splinePlot::p1_x , (signed word) splinePlot::p1_y , (signed word) splinePlot::p2_x , (signed word) splinePlot::p2_y)
(signed word~) splinePlot::$1 $1 zp ZP_WORD:11 4.0
(signed word~) splinePlot::$10 $10 zp ZP_WORD:49 4.0
(signed dword~) splinePlot::$12 $12 zp ZP_DWORD:29 4.0
(signed dword~) splinePlot::$13 $13 zp ZP_DWORD:29 1.0
(signed dword~) splinePlot::$14 $14 zp ZP_DWORD:51 4.0
(signed dword~) splinePlot::$15 $15 zp ZP_DWORD:51 4.0
(signed dword~) splinePlot::$16 $16 zp ZP_DWORD:51 4.0
(signed dword~) splinePlot::$18 $18 zp ZP_DWORD:33 4.0
(signed dword~) splinePlot::$19 $19 zp ZP_DWORD:33 1.0
(signed dword~) splinePlot::$20 $20 zp ZP_DWORD:55 4.0
(signed dword~) splinePlot::$21 $21 zp ZP_DWORD:55 4.0
(signed dword~) splinePlot::$22 $22 zp ZP_DWORD:55 4.0
(signed dword~) splinePlot::$24 $24 zp ZP_DWORD:59 4.0
(signed dword~) splinePlot::$25 $25 zp ZP_DWORD:59 4.0
(signed dword~) splinePlot::$27 $27 zp ZP_DWORD:63 4.0
(signed dword~) splinePlot::$28 $28 zp ZP_DWORD:63 4.0
(signed dword~) splinePlot::$30 $30 zp ZP_DWORD:21 4.0
(signed dword~) splinePlot::$32 $32 zp ZP_DWORD:25 4.0
(word~) splinePlot::$35 $35 zp ZP_WORD:69 22.0
(signed word~) splinePlot::$4 $4 zp ZP_WORD:17 4.0
(signed word~) splinePlot::$6 $6 zp ZP_WORD:9 0.8571428571428571
(signed word~) splinePlot::$7 $7 zp ZP_WORD:47 4.0
(signed word~) splinePlot::$9 $9 zp ZP_WORD:15 1.0
(label) splinePlot::@1
(label) splinePlot::@2
(label) splinePlot::@return
(signed word) splinePlot::a_x
(signed word) splinePlot::a_x#0 a_x zp ZP_WORD:11 0.1
(signed word) splinePlot::a_y
(signed word) splinePlot::a_y#0 a_y zp ZP_WORD:17 0.1
(signed word) splinePlot::b_x
(signed word) splinePlot::b_x#0 b_x zp ZP_WORD:47 0.4
(signed word) splinePlot::b_y
(signed word) splinePlot::b_y#0 b_y zp ZP_WORD:49 0.2222222222222222
(signed dword) splinePlot::i_x
(signed dword) splinePlot::i_x#0 i_x zp ZP_DWORD:29 0.23529411764705882
(signed dword) splinePlot::i_x#1 i_x zp ZP_DWORD:29 5.5
(signed dword) splinePlot::i_x#2 i_x zp ZP_DWORD:29 5.0
(signed dword) splinePlot::i_y
(signed dword) splinePlot::i_y#0 i_y zp ZP_DWORD:33 0.36363636363636365
(signed dword) splinePlot::i_y#1 i_y zp ZP_DWORD:33 7.333333333333333
(signed dword) splinePlot::i_y#2 i_y zp ZP_DWORD:33 4.375
(signed dword) splinePlot::j_x
(signed dword) splinePlot::j_x#0 j_x zp ZP_DWORD:59 0.6842105263157895
(signed dword) splinePlot::j_y
(signed dword) splinePlot::j_y#0 j_y zp ZP_DWORD:63 0.8125
(byte) splinePlot::n
(byte) splinePlot::n#1 reg byte x 16.5
(byte) splinePlot::n#2 reg byte x 2.4444444444444446
(struct SplineVector16) splinePlot::p0
(signed word) splinePlot::p0_x
(signed word) splinePlot::p0_x#4 p0_x zp ZP_WORD:13 0.13793103448275862
(signed word) splinePlot::p0_y
(signed word) splinePlot::p0_y#4 p0_y zp ZP_WORD:19 0.12903225806451613
(struct SplineVector16) splinePlot::p1
(signed word) splinePlot::p1_x
(signed word) splinePlot::p1_x#4 p1_x zp ZP_WORD:9 2.0
(signed word) splinePlot::p1_y
(signed word) splinePlot::p1_y#4 p1_y zp ZP_WORD:15 0.5
(struct SplineVector16) splinePlot::p2
(signed word) splinePlot::p2_x
(signed word) splinePlot::p2_x#4 p2_x zp ZP_WORD:11 1.0
(signed word) splinePlot::p2_y
(signed word) splinePlot::p2_y#4 p2_y zp ZP_WORD:17 0.4
(signed dword) splinePlot::p_x
(signed dword) splinePlot::p_x#0 p_x zp ZP_DWORD:21 1.3333333333333333
(signed dword) splinePlot::p_x#1 p_x zp ZP_DWORD:21 3.6666666666666665
(signed dword) splinePlot::p_x#2 p_x zp ZP_DWORD:21 7.000000000000001
(signed dword) splinePlot::p_y
(signed dword) splinePlot::p_y#0 p_y zp ZP_DWORD:25 4.0
(signed dword) splinePlot::p_y#1 p_y zp ZP_DWORD:25 4.4
(signed dword) splinePlot::p_y#2 p_y zp ZP_DWORD:25 5.833333333333333
zp ZP_WORD:2 [ print_word_at::w#2 print_word_at::w#0 print_word_at::w#1 ]
zp ZP_WORD:4 [ print_word_at::at#2 print_byte_at::at#2 print_byte_at::at#0 print_byte_at::at#1 ]
zp ZP_BYTE:6 [ print_byte_at::b#2 print_byte_at::b#0 print_byte_at::b#1 ]
reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ]
zp ZP_WORD:7 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ]
zp ZP_WORD:9 [ splinePlot::p1_x#4 splinePlot::$6 ]
zp ZP_WORD:11 [ splinePlot::p2_x#4 splinePlot::$1 splinePlot::a_x#0 ]
zp ZP_WORD:13 [ splinePlot::p0_x#4 ]
zp ZP_WORD:15 [ splinePlot::p1_y#4 splinePlot::$9 ]
zp ZP_WORD:17 [ splinePlot::p2_y#4 splinePlot::$4 splinePlot::a_y#0 ]
zp ZP_WORD:19 [ splinePlot::p0_y#4 ]
zp ZP_DWORD:21 [ splinePlot::p_x#2 splinePlot::p_x#0 splinePlot::p_x#1 splinePlot::$30 ]
zp ZP_DWORD:25 [ splinePlot::p_y#2 splinePlot::p_y#0 splinePlot::p_y#1 splinePlot::$32 ]
zp ZP_DWORD:29 [ splinePlot::i_x#2 splinePlot::i_x#0 splinePlot::i_x#1 splinePlot::$13 splinePlot::$12 ]
zp ZP_DWORD:33 [ splinePlot::i_y#2 splinePlot::i_y#0 splinePlot::i_y#1 splinePlot::$19 splinePlot::$18 ]
reg byte x [ splinePlot::n#2 splinePlot::n#1 ]
zp ZP_WORD:37 [ memset::num#2 memset::end#0 ]
zp ZP_WORD:39 [ memset::str#3 memset::dst#2 memset::dst#3 memset::dst#1 ]
reg byte x [ memset::c#3 ]
reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ]
reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ]
reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ]
zp ZP_WORD:41 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ]
zp ZP_DWORD:43 [ clock::return#2 main::$12 clock::return#0 main::cyclecount#0 print_dword_at::dw#0 ]
reg byte a [ print_byte_at::$0 ]
reg byte y [ print_byte_at::$2 ]
zp ZP_WORD:47 [ splinePlot::$7 splinePlot::b_x#0 ]
zp ZP_WORD:49 [ splinePlot::$10 splinePlot::b_y#0 ]
zp ZP_DWORD:51 [ splinePlot::$14 splinePlot::$15 splinePlot::$16 ]
zp ZP_DWORD:55 [ splinePlot::$20 splinePlot::$21 splinePlot::$22 ]
zp ZP_DWORD:59 [ splinePlot::$24 splinePlot::$25 splinePlot::j_x#0 ]
zp ZP_DWORD:63 [ splinePlot::$27 splinePlot::$28 splinePlot::j_y#0 ]
zp ZP_WORD:67 [ bitmap_plot::x#0 ]
zp ZP_WORD:69 [ splinePlot::$35 ]
reg byte a [ bitmap_plot::y#0 ]
zp ZP_WORD:71 [ bitmap_plot::plotter#0 bitmap_plot::plotter#1 ]
zp ZP_WORD:73 [ bitmap_plot::$1 ]
reg byte a [ bitmap_plot::$2 ]
zp ZP_BYTE:75 [ bitmap_init::$7 ]
reg byte a [ bitmap_init::$4 ]
reg byte a [ bitmap_init::$5 ]
reg byte a [ bitmap_init::$6 ]

View File

@ -39,15 +39,10 @@ main: {
sta _2
lda #0
sta _2+1
ldy #8
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
lda _3
sta _3+1
lda #0
sta _3
lda TIMELO
sta _4
lda #0
@ -97,15 +92,10 @@ main: {
sta _11
lda #0
sta _11+1
ldy #8
cpy #0
beq !e+
!:
asl _12
rol _12+1
dey
bne !-
!e:
lda _12
sta _12+1
lda #0
sta _12
lda TIMELO
sta _13
lda #0
@ -612,19 +602,9 @@ div10: {
lda val_2+1
adc val_1+1
sta val_2+1
ldy #8
lda val_2
sta _4
lda val_2+1
lda #0
sta _4+1
cpy #0
beq !e+
!:
lsr _4+1
ror _4
dey
bne !-
!e:
lda val_3
clc
adc val_2

View File

@ -4380,20 +4380,11 @@ main: {
sta _2
lda #0
sta _2+1
// [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz2_rol_vbuc1
ldy #8
// [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz2_rol_8
lda _2
sta _3
lda _2+1
sta _3+1
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
lda #0
sta _3
// [18] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1
lda TIMELO
sta _4
@ -4519,20 +4510,11 @@ main: {
sta _11
lda #0
sta _11+1
// [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 -- vwuz1=vwuz2_rol_vbuc1
ldy #8
// [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 -- vwuz1=vwuz2_rol_8
lda _11
sta _12
lda _11+1
sta _12+1
cpy #0
beq !e+
!:
asl _12
rol _12+1
dey
bne !-
!e:
lda #0
sta _12
// [41] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1
lda TIMELO
sta _13
@ -5671,20 +5653,11 @@ div10: {
lda val_1+1
adc _3+1
sta val_2+1
// [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_vbuc1
ldy #8
lda val_2
sta _4
// [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8
lda val_2+1
sta _4
lda #0
sta _4+1
cpy #0
beq !e+
!:
lsr _4+1
ror _4
dey
bne !-
!e:
// [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz3
lda val_2
clc
@ -5886,7 +5859,7 @@ Statement [12] (word) div16u::return#2 ← (word) div16u::return#0 [ main::u#11
Statement [13] (word) main::v#1 ← (word) div16u::return#2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a
Statement [15] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a
Statement [16] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) [ main::u#11 main::v#1 main::$2 ] ( main:2 [ main::u#11 main::v#1 main::$2 ] ) always clobbers reg byte a
Statement [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::u#11 main::v#1 main::$3 ] ( main:2 [ main::u#11 main::v#1 main::$3 ] ) always clobbers reg byte a reg byte y
Statement [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::u#11 main::v#1 main::$3 ] ( main:2 [ main::u#11 main::v#1 main::$3 ] ) always clobbers reg byte a
Statement [18] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) [ main::u#11 main::v#1 main::$3 main::$4 ] ( main:2 [ main::u#11 main::v#1 main::$3 main::$4 ] ) always clobbers reg byte a
Statement [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 [ main::u#11 main::v#1 myprintf::w3#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 ] ) always clobbers reg byte a
Statement [20] (word) myprintf::w1#0 ← (word) main::u#11 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ) always clobbers reg byte a
@ -5902,7 +5875,7 @@ Statement [35] (word) div10::return#2 ← (word) div10::return#0 [ main::u#15 di
Statement [36] (word) main::v#2 ← (word) div10::return#2 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a
Statement [38] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a
Statement [39] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) [ main::u#15 main::v#2 main::$11 ] ( main:2 [ main::u#15 main::v#2 main::$11 ] ) always clobbers reg byte a
Statement [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 [ main::u#15 main::v#2 main::$12 ] ( main:2 [ main::u#15 main::v#2 main::$12 ] ) always clobbers reg byte a reg byte y
Statement [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 [ main::u#15 main::v#2 main::$12 ] ( main:2 [ main::u#15 main::v#2 main::$12 ] ) always clobbers reg byte a
Statement [41] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) [ main::u#15 main::v#2 main::$12 main::$13 ] ( main:2 [ main::u#15 main::v#2 main::$12 main::$13 ] ) always clobbers reg byte a
Statement [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 [ main::u#15 main::v#2 myprintf::w3#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 ] ) always clobbers reg byte a
Statement [43] (word) myprintf::w1#1 ← (word) main::u#15 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ) always clobbers reg byte a
@ -5976,7 +5949,7 @@ Statement [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::v
Statement [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a
Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a
Statement [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a
Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a reg byte y
Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a
Statement [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a
Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a
Statement [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a
@ -5997,7 +5970,7 @@ Statement [12] (word) div16u::return#2 ← (word) div16u::return#0 [ main::u#11
Statement [13] (word) main::v#1 ← (word) div16u::return#2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a
Statement [15] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@2 [ main::u#11 main::v#1 ] ( main:2 [ main::u#11 main::v#1 ] ) always clobbers reg byte a
Statement [16] (word~) main::$2 ← (word)*((const byte*) TIMEHI#0) [ main::u#11 main::v#1 main::$2 ] ( main:2 [ main::u#11 main::v#1 main::$2 ] ) always clobbers reg byte a
Statement [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::u#11 main::v#1 main::$3 ] ( main:2 [ main::u#11 main::v#1 main::$3 ] ) always clobbers reg byte a reg byte y
Statement [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::u#11 main::v#1 main::$3 ] ( main:2 [ main::u#11 main::v#1 main::$3 ] ) always clobbers reg byte a
Statement [18] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) [ main::u#11 main::v#1 main::$3 main::$4 ] ( main:2 [ main::u#11 main::v#1 main::$3 main::$4 ] ) always clobbers reg byte a
Statement [19] (word) myprintf::w3#0 ← (word~) main::$3 + (word~) main::$4 [ main::u#11 main::v#1 myprintf::w3#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 ] ) always clobbers reg byte a
Statement [20] (word) myprintf::w1#0 ← (word) main::u#11 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ( main:2 [ main::u#11 main::v#1 myprintf::w3#0 myprintf::w1#0 ] ) always clobbers reg byte a
@ -6013,7 +5986,7 @@ Statement [35] (word) div10::return#2 ← (word) div10::return#0 [ main::u#15 di
Statement [36] (word) main::v#2 ← (word) div10::return#2 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a
Statement [38] if(*((const byte*) zp2#0)<(byte) $c8) goto main::@6 [ main::u#15 main::v#2 ] ( main:2 [ main::u#15 main::v#2 ] ) always clobbers reg byte a
Statement [39] (word~) main::$11 ← (word)*((const byte*) TIMEHI#0) [ main::u#15 main::v#2 main::$11 ] ( main:2 [ main::u#15 main::v#2 main::$11 ] ) always clobbers reg byte a
Statement [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 [ main::u#15 main::v#2 main::$12 ] ( main:2 [ main::u#15 main::v#2 main::$12 ] ) always clobbers reg byte a reg byte y
Statement [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 [ main::u#15 main::v#2 main::$12 ] ( main:2 [ main::u#15 main::v#2 main::$12 ] ) always clobbers reg byte a
Statement [41] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) [ main::u#15 main::v#2 main::$12 main::$13 ] ( main:2 [ main::u#15 main::v#2 main::$12 main::$13 ] ) always clobbers reg byte a
Statement [42] (word) myprintf::w3#1 ← (word~) main::$12 + (word~) main::$13 [ main::u#15 main::v#2 myprintf::w3#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 ] ) always clobbers reg byte a
Statement [43] (word) myprintf::w1#1 ← (word) main::u#15 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ( main:2 [ main::u#15 main::v#2 myprintf::w3#1 myprintf::w1#1 ] ) always clobbers reg byte a
@ -6071,7 +6044,7 @@ Statement [184] (word~) div10::$2 ← (word) div10::val#0 << (byte) 1 [ div10::v
Statement [185] (word) div10::val#1 ← (word) div10::val#0 + (word~) div10::$2 [ div10::val#1 ] ( main:2::div10:34 [ main::u#15 div10::val#1 ] ) always clobbers reg byte a
Statement [186] (word~) div10::$3 ← (word) div10::val#1 >> (byte) 4 [ div10::val#1 div10::$3 ] ( main:2::div10:34 [ main::u#15 div10::val#1 div10::$3 ] ) always clobbers reg byte a
Statement [187] (word) div10::val#2 ← (word) div10::val#1 + (word~) div10::$3 [ div10::val#2 ] ( main:2::div10:34 [ main::u#15 div10::val#2 ] ) always clobbers reg byte a
Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a reg byte y
Statement [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 [ div10::val#2 div10::$4 ] ( main:2::div10:34 [ main::u#15 div10::val#2 div10::$4 ] ) always clobbers reg byte a
Statement [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 [ div10::val#3 ] ( main:2::div10:34 [ main::u#15 div10::val#3 ] ) always clobbers reg byte a
Statement [190] (word) div10::return#0 ← (word) div10::val#3 >> (byte) 4 [ div10::return#0 ] ( main:2::div10:34 [ main::u#15 div10::return#0 ] ) always clobbers reg byte a
Statement [192] (word) divr16u::dividend#1 ← (word) div16u::dividend#0 [ divr16u::dividend#1 ] ( main:2::div16u:11 [ main::u#11 divr16u::dividend#1 ] ) always clobbers reg byte a
@ -6163,56 +6136,56 @@ Uplift Scope [utoa] 57.17: zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::va
Uplift Scope [Print]
Uplift Scope []
Uplifting [divr16u] best 466508 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:109 [ divr16u::return#2 ]
Uplifting [append] best 466508 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:83 [ append::return#10 ] zp ZP_WORD:85 [ append::return#4 ] zp ZP_WORD:87 [ append::return#3 ] zp ZP_WORD:89 [ append::return#2 ]
Uplifting [div10] best 466508 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:107 [ div10::return#0 ] zp ZP_WORD:91 [ div10::$0 ] zp ZP_WORD:95 [ div10::$2 ] zp ZP_WORD:99 [ div10::$3 ] zp ZP_WORD:103 [ div10::$4 ] zp ZP_WORD:105 [ div10::val#3 ] zp ZP_WORD:93 [ div10::val#0 ] zp ZP_WORD:97 [ div10::val#1 ] zp ZP_WORD:101 [ div10::val#2 ]
Uplifting [div16u] best 466508 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:111 [ div16u::return#0 ]
Uplifting [main] best 466508 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ]
Uplifting [utoa] best 466477 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:81 [ utoa::dst#3 ]
Uplifting [Print] best 466477 combination
Uplifting [] best 466477 combination
Uplifting [divr16u] best 466046 combination zp ZP_WORD:39 [ divr16u::rem#4 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:43 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:41 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:109 [ divr16u::return#2 ]
Uplifting [append] best 466046 combination zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] zp ZP_WORD:35 [ append::sub#6 ] zp ZP_WORD:83 [ append::return#10 ] zp ZP_WORD:85 [ append::return#4 ] zp ZP_WORD:87 [ append::return#3 ] zp ZP_WORD:89 [ append::return#2 ]
Uplifting [div10] best 466046 combination zp ZP_WORD:60 [ div10::return#2 ] zp ZP_WORD:58 [ div10::val#4 ] zp ZP_WORD:107 [ div10::return#0 ] zp ZP_WORD:91 [ div10::$0 ] zp ZP_WORD:95 [ div10::$2 ] zp ZP_WORD:99 [ div10::$3 ] zp ZP_WORD:103 [ div10::$4 ] zp ZP_WORD:105 [ div10::val#3 ] zp ZP_WORD:93 [ div10::val#0 ] zp ZP_WORD:97 [ div10::val#1 ] zp ZP_WORD:101 [ div10::val#2 ]
Uplifting [div16u] best 466046 combination zp ZP_WORD:48 [ div16u::return#2 ] zp ZP_WORD:46 [ div16u::dividend#0 ] zp ZP_WORD:111 [ div16u::return#0 ]
Uplifting [main] best 466046 combination zp ZP_WORD:52 [ main::$2 ] zp ZP_WORD:56 [ main::$4 ] zp ZP_WORD:64 [ main::$11 ] zp ZP_WORD:68 [ main::$13 ] zp ZP_WORD:2 [ main::u#11 main::u#2 ] zp ZP_WORD:4 [ main::u#15 main::u#4 ] zp ZP_WORD:50 [ main::v#1 ] zp ZP_WORD:62 [ main::v#2 ] zp ZP_WORD:54 [ main::$3 ] zp ZP_WORD:66 [ main::$12 ]
Uplifting [utoa] best 466015 combination zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] reg byte x [ utoa::bStarted#7 utoa::bStarted#6 utoa::bStarted#5 ] reg byte a [ utoa::$16 ] reg byte a [ utoa::$17 ] zp ZP_WORD:81 [ utoa::dst#3 ]
Uplifting [Print] best 466015 combination
Uplifting [] best 466015 combination
Attempting to uplift remaining variables inzp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ]
Uplifting [myprintf] best 466477 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ]
Uplifting [myprintf] best 466015 combination zp ZP_BYTE:24 [ myprintf::bLen#11 myprintf::bLen#13 myprintf::bLen#12 myprintf::bLen#23 myprintf::bLen#14 myprintf::return#0 myprintf::bLen#28 myprintf::bLen#7 myprintf::bLen#3 myprintf::bLen#24 myprintf::bLen#6 myprintf::bLen#1 myprintf::bLen#4 ]
Attempting to uplift remaining variables inzp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ]
Uplifting [myprintf] best 466477 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ]
Uplifting [myprintf] best 466015 combination zp ZP_BYTE:25 [ myprintf::bDigits#10 myprintf::bDigits#8 myprintf::bDigits#14 myprintf::bDigits#24 myprintf::bDigits#25 myprintf::bDigits#1 myprintf::bDigits#16 myprintf::bDigits#3 myprintf::bDigits#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:23 [ myprintf::digit#3 myprintf::digit#2 ]
Uplifting [myprintf] best 454477 combination reg byte x [ myprintf::digit#3 myprintf::digit#2 ]
Uplifting [myprintf] best 454015 combination reg byte x [ myprintf::digit#3 myprintf::digit#2 ]
Attempting to uplift remaining variables inzp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ]
Uplifting [myprintf] best 454477 combination zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ]
Uplifting [myprintf] best 454015 combination zp ZP_BYTE:22 [ myprintf::b#17 myprintf::b#5 ]
Attempting to uplift remaining variables inzp ZP_BYTE:26 [ myprintf::$41 ]
Uplifting [myprintf] best 445477 combination reg byte a [ myprintf::$41 ]
Uplifting [myprintf] best 445015 combination reg byte a [ myprintf::$41 ]
Attempting to uplift remaining variables inzp ZP_BYTE:27 [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ]
Uplifting [myprintf] best 441727 combination reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ]
Uplifting [myprintf] best 441265 combination reg byte x [ myprintf::b#25 myprintf::b#1 myprintf::b#6 ]
Attempting to uplift remaining variables inzp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ]
Uplifting [myprintf] best 441727 combination zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ]
Uplifting [myprintf] best 441265 combination zp ZP_BYTE:15 [ myprintf::bArg#12 myprintf::bArg#10 myprintf::bArg#1 ]
Attempting to uplift remaining variables inzp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ]
Uplifting [myprintf] best 441727 combination zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ]
Uplifting [myprintf] best 441265 combination zp ZP_BYTE:14 [ myprintf::bFormat#10 myprintf::bFormat#4 ]
Attempting to uplift remaining variables inzp ZP_BYTE:70 [ myprintf::$17 ]
Uplifting [myprintf] best 441127 combination reg byte a [ myprintf::$17 ]
Uplifting [myprintf] best 440665 combination reg byte a [ myprintf::$17 ]
Attempting to uplift remaining variables inzp ZP_BYTE:71 [ myprintf::$18 ]
Uplifting [myprintf] best 440527 combination reg byte a [ myprintf::$18 ]
Uplifting [myprintf] best 440065 combination reg byte a [ myprintf::$18 ]
Attempting to uplift remaining variables inzp ZP_BYTE:73 [ myprintf::$24 ]
Uplifting [myprintf] best 439927 combination reg byte a [ myprintf::$24 ]
Uplifting [myprintf] best 439465 combination reg byte a [ myprintf::$24 ]
Attempting to uplift remaining variables inzp ZP_BYTE:75 [ myprintf::$25 ]
Uplifting [myprintf] best 439327 combination reg byte a [ myprintf::$25 ]
Uplifting [myprintf] best 438865 combination reg byte a [ myprintf::$25 ]
Attempting to uplift remaining variables inzp ZP_BYTE:77 [ myprintf::$31 ]
Uplifting [myprintf] best 438727 combination reg byte a [ myprintf::$31 ]
Uplifting [myprintf] best 438265 combination reg byte a [ myprintf::$31 ]
Attempting to uplift remaining variables inzp ZP_BYTE:78 [ myprintf::$49 ]
Uplifting [myprintf] best 438127 combination reg byte a [ myprintf::$49 ]
Uplifting [myprintf] best 437665 combination reg byte a [ myprintf::$49 ]
Attempting to uplift remaining variables inzp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ]
Uplifting [myprintf] best 438127 combination zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ]
Uplifting [myprintf] best 437665 combination zp ZP_BYTE:19 [ myprintf::bLeadZero#10 myprintf::bLeadZero#18 ]
Attempting to uplift remaining variables inzp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ]
Uplifting [myprintf] best 438127 combination zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ]
Uplifting [myprintf] best 437665 combination zp ZP_BYTE:18 [ myprintf::bTrailing#10 myprintf::bTrailing#21 ]
Attempting to uplift remaining variables inzp ZP_BYTE:20 [ myprintf::$23 ]
Uplifting [myprintf] best 437227 combination reg byte a [ myprintf::$23 ]
Uplifting [myprintf] best 436765 combination reg byte a [ myprintf::$23 ]
Attempting to uplift remaining variables inzp ZP_BYTE:21 [ myprintf::$30 ]
Uplifting [myprintf] best 436327 combination reg byte a [ myprintf::$30 ]
Uplifting [myprintf] best 435865 combination reg byte a [ myprintf::$30 ]
Attempting to uplift remaining variables inzp ZP_BYTE:72 [ myprintf::b#15 ]
Uplifting [myprintf] best 436227 combination reg byte x [ myprintf::b#15 ]
Uplifting [myprintf] best 435765 combination reg byte x [ myprintf::b#15 ]
Attempting to uplift remaining variables inzp ZP_BYTE:76 [ myprintf::b#16 ]
Uplifting [myprintf] best 436127 combination reg byte x [ myprintf::b#16 ]
Uplifting [myprintf] best 435665 combination reg byte x [ myprintf::b#16 ]
Attempting to uplift remaining variables inzp ZP_BYTE:74 [ myprintf::bLen#10 ]
Uplifting [myprintf] best 435227 combination reg byte y [ myprintf::bLen#10 ]
Uplifting [myprintf] best 434765 combination reg byte y [ myprintf::bLen#10 ]
Coalescing zero page register with common assignment [ zp ZP_WORD:29 [ utoa::value#12 utoa::value#3 utoa::value#10 utoa::value#2 utoa::value#11 utoa::value#6 utoa::value#4 utoa::value#0 utoa::value#1 ] ] with [ zp ZP_WORD:37 [ append::value#5 append::value#8 append::value#1 append::value#2 append::value#3 append::value#4 append::value#0 ] ] - score: 4
Coalescing zero page register with common assignment [ zp ZP_WORD:31 [ utoa::dst#12 utoa::dst#4 utoa::dst#13 utoa::dst#2 utoa::dst#10 utoa::dst#16 utoa::dst#1 ] ] with [ zp ZP_WORD:33 [ append::dst#4 append::dst#1 append::dst#2 append::dst#3 ] ] - score: 3
Coalescing zero page register with common assignment [ zp ZP_WORD:2 [ main::u#11 main::u#2 ] ] with [ zp ZP_WORD:6 [ myprintf::w1#6 myprintf::w1#0 myprintf::w1#1 ] ] - score: 1
@ -6354,16 +6327,11 @@ main: {
sta _2
lda #0
sta _2+1
// [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_vbuc1
ldy #8
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
// [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_8
lda _3
sta _3+1
lda #0
sta _3
// [18] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1
lda TIMELO
sta _4
@ -6469,16 +6437,11 @@ main: {
sta _11
lda #0
sta _11+1
// [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 -- vwuz1=vwuz1_rol_vbuc1
ldy #8
cpy #0
beq !e+
!:
asl _12
rol _12+1
dey
bne !-
!e:
// [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 -- vwuz1=vwuz1_rol_8
lda _12
sta _12+1
lda #0
sta _12
// [41] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1
lda TIMELO
sta _13
@ -7472,20 +7435,11 @@ div10: {
lda val_2+1
adc val_1+1
sta val_2+1
// [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_vbuc1
ldy #8
lda val_2
sta _4
// [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8
lda val_2+1
sta _4
lda #0
sta _4+1
cpy #0
beq !e+
!:
lsr _4+1
ror _4
dey
bne !-
!e:
// [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz1
lda val_3
clc
@ -7744,6 +7698,7 @@ Removing instruction ldy bLen
Replacing instruction ldy #0 with TAY
Removing instruction ldy #0
Removing instruction lda val_1+1
Removing instruction lda val_2+1
Replacing instruction lda #<0 with TXA
Removing instruction lda #>0
Removing instruction lda #<0
@ -7922,14 +7877,14 @@ Succesful ASM optimization Pass5RedundantLabelElimination
Removing instruction bbegin:
Removing instruction b20:
Succesful ASM optimization Pass5UnusedLabelElimination
Fixing long branch [294] beq b22 to bne
Fixing long branch [299] bcs b22 to bcc
Fixing long branch [182] beq b2 to bne
Fixing long branch [206] bcc b23 to bcs
Fixing long branch [209] beq b23 to bne
Fixing long branch [220] beq b6 to bne
Fixing long branch [413] bne b5 to beq
Fixing long branch [418] bcs b5 to bcc
Fixing long branch [284] beq b22 to bne
Fixing long branch [289] bcs b22 to bcc
Fixing long branch [172] beq b2 to bne
Fixing long branch [196] bcc b23 to bcs
Fixing long branch [199] beq b23 to bne
Fixing long branch [210] beq b6 to bne
Fixing long branch [403] bne b5 to beq
Fixing long branch [408] bcs b5 to bcc
FINAL SYMBOL TABLE
(label) @1
@ -8280,7 +8235,7 @@ reg byte a [ divr16u::$2 ]
FINAL ASSEMBLER
Score: 354955
Score: 354730
// File Comments
// Basic Upstart
@ -8363,16 +8318,11 @@ main: {
lda #0
sta _2+1
// (word)*TIMEHI << 8
// [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_vbuc1
ldy #8
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
// [17] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_8
lda _3
sta _3+1
lda #0
sta _3
// (word)*TIMELO
// [18] (word~) main::$4 ← (word)*((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1
lda TIMELO
@ -8473,16 +8423,11 @@ main: {
lda #0
sta _11+1
// (word)*TIMEHI << 8
// [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 -- vwuz1=vwuz1_rol_vbuc1
ldy #8
cpy #0
beq !e+
!:
asl _12
rol _12+1
dey
bne !-
!e:
// [40] (word~) main::$12 ← (word~) main::$11 << (byte) 8 -- vwuz1=vwuz1_rol_8
lda _12
sta _12+1
lda #0
sta _12
// (word)*TIMELO
// [41] (word~) main::$13 ← (word)*((const byte*) TIMELO#0) -- vwuz1=_word__deref_pbuc1
lda TIMELO
@ -9434,20 +9379,10 @@ div10: {
adc val_1+1
sta val_2+1
// val >> 8
// [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_vbuc1
ldy #8
lda val_2
// [188] (word~) div10::$4 ← (word) div10::val#2 >> (byte) 8 -- vwuz1=vwuz2_ror_8
sta _4
lda val_2+1
lda #0
sta _4+1
cpy #0
beq !e+
!:
lsr _4+1
ror _4
dey
bne !-
!e:
// val += val >> 8
// [189] (word) div10::val#3 ← (word) div10::val#2 + (word~) div10::$4 -- vwuz1=vwuz2_plus_vwuz1
lda val_3

View File

@ -234,7 +234,13 @@ mul16s_error: {
print_sdword: {
.label dw = $b
lda dw+3
bpl b1
bmi b1
lda #' '
jsr print_char
b2:
jsr print_dword
rts
b1:
lda #'-'
jsr print_char
sec
@ -254,8 +260,17 @@ print_sdword: {
eor #$ff
adc #0
sta dw+3
b1:
jsr print_dword
jmp b2
}
// Print a single char
// print_char(byte register(A) ch)
print_char: {
ldy #0
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
rts
}
// Print a dword as HEX
@ -303,17 +318,6 @@ print_byte: {
jsr print_char
rts
}
// Print a single char
// print_char(byte register(A) ch)
print_char: {
ldy #0
sta (print_char_cursor),y
inc print_char_cursor
bne !+
inc print_char_cursor+1
!:
rts
}
// Print a signed word as HEX
// print_sword(signed word zeropage(3) w)
print_sword: {

View File

@ -27,13 +27,13 @@ main::@return: scope:[main] from main::@3
[12] return
to:@return
mul16s_compare: scope:[mul16s_compare] from main::@3
[13] (byte*~) print_char_cursor#220 ← (byte*) print_line_cursor#1
[13] (byte*~) print_char_cursor#222 ← (byte*) print_line_cursor#1
to:mul16s_compare::@1
mul16s_compare::@1: scope:[mul16s_compare] from mul16s_compare mul16s_compare::@8
[14] (byte) mul16s_compare::i#12 ← phi( mul16s_compare/(byte) 0 mul16s_compare::@8/(byte) mul16s_compare::i#1 )
[14] (signed word) mul16s_compare::b#6 ← phi( mul16s_compare/(signed word) -$7fff mul16s_compare::@8/(signed word) mul16s_compare::b#1 )
[14] (signed word) mul16s_compare::a#6 ← phi( mul16s_compare/(signed word) -$7fff mul16s_compare::@8/(signed word) mul16s_compare::a#1 )
[14] (byte*) print_char_cursor#146 ← phi( mul16s_compare/(byte*~) print_char_cursor#220 mul16s_compare::@8/(byte*) print_char_cursor#130 )
[14] (byte*) print_char_cursor#149 ← phi( mul16s_compare/(byte*~) print_char_cursor#222 mul16s_compare::@8/(byte*) print_char_cursor#132 )
[15] call print_str
to:mul16s_compare::@2
mul16s_compare::@2: scope:[mul16s_compare] from mul16s_compare::@1 mul16s_compare::@5
@ -104,7 +104,7 @@ mul16s_compare::@9: scope:[mul16s_compare] from mul16s_compare::@8
[54] call print_ln
to:mul16s_compare::@13
mul16s_compare::@13: scope:[mul16s_compare] from mul16s_compare::@9
[55] (byte*~) print_char_cursor#180 ← (byte*) print_line_cursor#1
[55] (byte*~) print_char_cursor#183 ← (byte*) print_line_cursor#1
[56] call print_str
to:mul16s_compare::@14
mul16s_compare::@14: scope:[mul16s_compare] from mul16s_compare::@13
@ -112,23 +112,23 @@ mul16s_compare::@14: scope:[mul16s_compare] from mul16s_compare::@13
[58] call print_ln
to:mul16s_compare::@return
print_ln: scope:[print_ln] from mul16s_compare::@14 mul16s_compare::@9 mul16s_error::@10 mul16u_compare::@14 mul16u_compare::@9 mul16u_error::@10
[59] (byte*) print_char_cursor#131 ← phi( mul16s_compare::@9/(byte*) print_char_cursor#130 mul16s_compare::@14/(byte*) print_char_cursor#130 mul16s_error::@10/(byte*) print_char_cursor#21 mul16u_compare::@9/(byte*) print_char_cursor#130 mul16u_compare::@14/(byte*) print_char_cursor#130 mul16u_error::@10/(byte*) print_char_cursor#21 )
[59] (byte*) print_char_cursor#133 ← phi( mul16s_compare::@9/(byte*) print_char_cursor#132 mul16s_compare::@14/(byte*) print_char_cursor#132 mul16s_error::@10/(byte*) print_char_cursor#22 mul16u_compare::@9/(byte*) print_char_cursor#132 mul16u_compare::@14/(byte*) print_char_cursor#132 mul16u_error::@10/(byte*) print_char_cursor#22 )
[59] (byte*) print_line_cursor#43 ← phi( mul16s_compare::@9/(byte*) print_line_cursor#1 mul16s_compare::@14/(byte*) print_line_cursor#1 mul16s_error::@10/(byte*) print_line_cursor#1 mul16u_compare::@9/(byte*) 1024 mul16u_compare::@14/(byte*) print_line_cursor#1 mul16u_error::@10/(byte*) 1024 )
to:print_ln::@1
print_ln::@1: scope:[print_ln] from print_ln print_ln::@1
[60] (byte*) print_line_cursor#22 ← phi( print_ln/(byte*) print_line_cursor#43 print_ln::@1/(byte*) print_line_cursor#1 )
[61] (byte*) print_line_cursor#1 ← (byte*) print_line_cursor#22 + (byte) $28
[62] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#131) goto print_ln::@1
[62] if((byte*) print_line_cursor#1<(byte*) print_char_cursor#133) goto print_ln::@1
to:print_ln::@return
print_ln::@return: scope:[print_ln] from print_ln::@1
[63] return
to:@return
print_str: scope:[print_str] from mul16s_compare::@1 mul16s_compare::@13 mul16s_error mul16s_error::@2 mul16s_error::@4 mul16s_error::@6 mul16s_error::@8 mul16u_compare::@1 mul16u_compare::@13 mul16u_error mul16u_error::@2 mul16u_error::@4 mul16u_error::@6 mul16u_error::@8
[64] (byte*) print_char_cursor#151 ← phi( mul16s_compare::@1/(byte*) print_char_cursor#146 mul16s_compare::@13/(byte*~) print_char_cursor#180 mul16s_error/(byte*) print_char_cursor#130 mul16s_error::@2/(byte*) print_char_cursor#21 mul16s_error::@4/(byte*) print_char_cursor#21 mul16s_error::@6/(byte*) print_char_cursor#21 mul16s_error::@8/(byte*) print_char_cursor#21 mul16u_compare::@1/(byte*) print_char_cursor#142 mul16u_compare::@13/(byte*~) print_char_cursor#187 mul16u_error/(byte*) print_char_cursor#130 mul16u_error::@2/(byte*) print_char_cursor#21 mul16u_error::@4/(byte*) print_char_cursor#21 mul16u_error::@6/(byte*) print_char_cursor#21 mul16u_error::@8/(byte*) print_char_cursor#21 )
[64] (byte*) print_char_cursor#154 ← phi( mul16s_compare::@1/(byte*) print_char_cursor#149 mul16s_compare::@13/(byte*~) print_char_cursor#183 mul16s_error/(byte*) print_char_cursor#132 mul16s_error::@2/(byte*) print_char_cursor#22 mul16s_error::@4/(byte*) print_char_cursor#22 mul16s_error::@6/(byte*) print_char_cursor#22 mul16s_error::@8/(byte*) print_char_cursor#22 mul16u_compare::@1/(byte*) print_char_cursor#145 mul16u_compare::@13/(byte*~) print_char_cursor#190 mul16u_error/(byte*) print_char_cursor#132 mul16u_error::@2/(byte*) print_char_cursor#22 mul16u_error::@4/(byte*) print_char_cursor#22 mul16u_error::@6/(byte*) print_char_cursor#22 mul16u_error::@8/(byte*) print_char_cursor#22 )
[64] (byte*) print_str::str#17 ← phi( mul16s_compare::@1/(const string) str mul16s_compare::@13/(const string) mul16s_compare::str1 mul16s_error/(const string) mul16s_error::str mul16s_error::@2/(const string) str1 mul16s_error::@4/(const string) str2 mul16s_error::@6/(const string) str3 mul16s_error::@8/(const string) str4 mul16u_compare::@1/(const string) str mul16u_compare::@13/(const string) mul16u_compare::str1 mul16u_error/(const string) mul16u_error::str mul16u_error::@2/(const string) str1 mul16u_error::@4/(const string) str2 mul16u_error::@6/(const string) str3 mul16u_error::@8/(const string) str4 )
to:print_str::@1
print_str::@1: scope:[print_str] from print_str print_str::@2
[65] (byte*) print_char_cursor#130 ← phi( print_str/(byte*) print_char_cursor#151 print_str::@2/(byte*) print_char_cursor#1 )
[65] (byte*) print_char_cursor#132 ← phi( print_str/(byte*) print_char_cursor#154 print_str::@2/(byte*) print_char_cursor#1 )
[65] (byte*) print_str::str#15 ← phi( print_str/(byte*) print_str::str#17 print_str::@2/(byte*) print_str::str#0 )
[66] if(*((byte*) print_str::str#15)!=(byte) '@') goto print_str::@2
to:print_str::@return
@ -136,8 +136,8 @@ print_str::@return: scope:[print_str] from print_str::@1
[67] return
to:@return
print_str::@2: scope:[print_str] from print_str::@1
[68] *((byte*) print_char_cursor#130) ← *((byte*) print_str::str#15)
[69] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#130
[68] *((byte*) print_char_cursor#132) ← *((byte*) print_str::str#15)
[69] (byte*) print_char_cursor#1 ← ++ (byte*) print_char_cursor#132
[70] (byte*) print_str::str#0 ← ++ (byte*) print_str::str#15
to:print_str::@1
mul16s_error: scope:[mul16s_error] from mul16s_compare::@7
@ -189,433 +189,436 @@ mul16s_error::@return: scope:[mul16s_error] from mul16s_error::@10
to:@return
print_sdword: scope:[print_sdword] from mul16s_error::@5 mul16s_error::@7 mul16s_error::@9
[94] (signed dword) print_sdword::dw#4 ← phi( mul16s_error::@5/(signed dword) print_sdword::dw#1 mul16s_error::@7/(signed dword) print_sdword::dw#2 mul16s_error::@9/(signed dword) print_sdword::dw#3 )
[95] if((signed dword) print_sdword::dw#4>=(signed byte) 0) goto print_sdword::@1
to:print_sdword::@2
print_sdword::@2: scope:[print_sdword] from print_sdword
[95] if((signed dword) print_sdword::dw#4<(signed byte) 0) goto print_sdword::@1
to:print_sdword::@3
print_sdword::@3: scope:[print_sdword] from print_sdword
[96] phi()
[97] call print_char
to:print_sdword::@3
print_sdword::@3: scope:[print_sdword] from print_sdword::@2
[98] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#4
to:print_sdword::@1
print_sdword::@1: scope:[print_sdword] from print_sdword print_sdword::@3
[99] (byte*) print_char_cursor#137 ← phi( print_sdword/(byte*) print_char_cursor#130 print_sdword::@3/(byte*) print_char_cursor#21 )
[99] (signed dword) print_sdword::dw#5 ← phi( print_sdword/(signed dword) print_sdword::dw#4 print_sdword::@3/(signed dword) print_sdword::dw#0 )
[100] (dword) print_dword::dw#0 ← (dword)(signed dword) print_sdword::dw#5
[101] call print_dword
to:print_sdword::@2
print_sdword::@2: scope:[print_sdword] from print_sdword::@3 print_sdword::@4
[98] (signed dword) print_sdword::dw#6 ← phi( print_sdword::@4/(signed dword) print_sdword::dw#0 print_sdword::@3/(signed dword) print_sdword::dw#4 )
[99] (dword) print_dword::dw#0 ← (dword)(signed dword) print_sdword::dw#6
[100] call print_dword
to:print_sdword::@return
print_sdword::@return: scope:[print_sdword] from print_sdword::@1
[102] return
print_sdword::@return: scope:[print_sdword] from print_sdword::@2
[101] return
to:@return
print_dword: scope:[print_dword] from mul16u_error::@5 mul16u_error::@7 mul16u_error::@9 print_sdword::@1
[103] (byte*) print_char_cursor#136 ← phi( mul16u_error::@5/(byte*) print_char_cursor#130 mul16u_error::@7/(byte*) print_char_cursor#130 mul16u_error::@9/(byte*) print_char_cursor#130 print_sdword::@1/(byte*) print_char_cursor#137 )
[103] (dword) print_dword::dw#4 ← phi( mul16u_error::@5/(dword) print_dword::dw#1 mul16u_error::@7/(dword) print_dword::dw#2 mul16u_error::@9/(dword) print_dword::dw#3 print_sdword::@1/(dword) print_dword::dw#0 )
[104] (word) print_word::w#1 ← > (dword) print_dword::dw#4
[105] call print_word
to:print_dword::@1
print_dword::@1: scope:[print_dword] from print_dword
[106] (word) print_word::w#2 ← < (dword) print_dword::dw#4
[107] call print_word
to:print_dword::@return
print_dword::@return: scope:[print_dword] from print_dword::@1
[108] return
to:@return
print_word: scope:[print_word] from mul16u_error::@1 mul16u_error::@3 print_dword print_dword::@1 print_sword::@2
[109] (byte*) print_char_cursor#135 ← phi( mul16u_error::@1/(byte*) print_char_cursor#130 mul16u_error::@3/(byte*) print_char_cursor#130 print_dword/(byte*) print_char_cursor#136 print_dword::@1/(byte*) print_char_cursor#21 print_sword::@2/(byte*) print_char_cursor#21 )
[109] (word) print_word::w#5 ← phi( mul16u_error::@1/(word) print_word::w#3 mul16u_error::@3/(word) print_word::w#4 print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 )
[110] (byte) print_byte::b#0 ← > (word) print_word::w#5
[111] call print_byte
to:print_word::@1
print_word::@1: scope:[print_word] from print_word
[112] (byte) print_byte::b#1 ← < (word) print_word::w#5
[113] call print_byte
to:print_word::@return
print_word::@return: scope:[print_word] from print_word::@1
[114] return
to:@return
print_byte: scope:[print_byte] from print_word print_word::@1
[115] (byte*) print_char_cursor#139 ← phi( print_word/(byte*) print_char_cursor#135 print_word::@1/(byte*) print_char_cursor#21 )
[115] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
[116] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4
[117] (byte) print_char::ch#3 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
[118] call print_char
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[119] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f
[120] (byte) print_char::ch#4 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
[121] call print_char
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[122] return
to:@return
print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@2 print_sword::@1 print_sword::@3
[123] (byte*) print_char_cursor#86 ← phi( print_byte/(byte*) print_char_cursor#139 print_byte::@1/(byte*) print_char_cursor#21 print_sdword::@2/(byte*) print_char_cursor#130 print_sword::@1/(byte*) print_char_cursor#130 print_sword::@3/(byte*) print_char_cursor#130 )
[123] (byte) print_char::ch#5 ← phi( print_byte/(byte) print_char::ch#3 print_byte::@1/(byte) print_char::ch#4 print_sdword::@2/(byte) '-' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' )
[124] *((byte*) print_char_cursor#86) ← (byte) print_char::ch#5
[125] (byte*) print_char_cursor#21 ← ++ (byte*) print_char_cursor#86
print_sdword::@1: scope:[print_sdword] from print_sdword
[102] phi()
[103] call print_char
to:print_sdword::@4
print_sdword::@4: scope:[print_sdword] from print_sdword::@1
[104] (signed dword) print_sdword::dw#0 ← - (signed dword) print_sdword::dw#4
to:print_sdword::@2
print_char: scope:[print_char] from print_byte print_byte::@1 print_sdword::@1 print_sdword::@3 print_sword::@1 print_sword::@3
[105] (byte*) print_char_cursor#88 ← phi( print_byte/(byte*) print_char_cursor#142 print_byte::@1/(byte*) print_char_cursor#22 print_sdword::@1/(byte*) print_char_cursor#132 print_sdword::@3/(byte*) print_char_cursor#132 print_sword::@1/(byte*) print_char_cursor#132 print_sword::@3/(byte*) print_char_cursor#132 )
[105] (byte) print_char::ch#6 ← phi( print_byte/(byte) print_char::ch#4 print_byte::@1/(byte) print_char::ch#5 print_sdword::@1/(byte) '-' print_sdword::@3/(byte) ' ' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' )
[106] *((byte*) print_char_cursor#88) ← (byte) print_char::ch#6
[107] (byte*) print_char_cursor#22 ← ++ (byte*) print_char_cursor#88
to:print_char::@return
print_char::@return: scope:[print_char] from print_char
[126] return
[108] return
to:@return
print_dword: scope:[print_dword] from mul16u_error::@5 mul16u_error::@7 mul16u_error::@9 print_sdword::@2
[109] (byte*) print_char_cursor#138 ← phi( mul16u_error::@5/(byte*) print_char_cursor#132 mul16u_error::@7/(byte*) print_char_cursor#132 mul16u_error::@9/(byte*) print_char_cursor#132 print_sdword::@2/(byte*) print_char_cursor#22 )
[109] (dword) print_dword::dw#4 ← phi( mul16u_error::@5/(dword) print_dword::dw#1 mul16u_error::@7/(dword) print_dword::dw#2 mul16u_error::@9/(dword) print_dword::dw#3 print_sdword::@2/(dword) print_dword::dw#0 )
[110] (word) print_word::w#1 ← > (dword) print_dword::dw#4
[111] call print_word
to:print_dword::@1
print_dword::@1: scope:[print_dword] from print_dword
[112] (word) print_word::w#2 ← < (dword) print_dword::dw#4
[113] call print_word
to:print_dword::@return
print_dword::@return: scope:[print_dword] from print_dword::@1
[114] return
to:@return
print_word: scope:[print_word] from mul16u_error::@1 mul16u_error::@3 print_dword print_dword::@1 print_sword::@2
[115] (byte*) print_char_cursor#137 ← phi( mul16u_error::@1/(byte*) print_char_cursor#132 mul16u_error::@3/(byte*) print_char_cursor#132 print_dword/(byte*) print_char_cursor#138 print_dword::@1/(byte*) print_char_cursor#22 print_sword::@2/(byte*) print_char_cursor#22 )
[115] (word) print_word::w#5 ← phi( mul16u_error::@1/(word) print_word::w#3 mul16u_error::@3/(word) print_word::w#4 print_dword/(word) print_word::w#1 print_dword::@1/(word) print_word::w#2 print_sword::@2/(word) print_word::w#0 )
[116] (byte) print_byte::b#0 ← > (word) print_word::w#5
[117] call print_byte
to:print_word::@1
print_word::@1: scope:[print_word] from print_word
[118] (byte) print_byte::b#1 ← < (word) print_word::w#5
[119] call print_byte
to:print_word::@return
print_word::@return: scope:[print_word] from print_word::@1
[120] return
to:@return
print_byte: scope:[print_byte] from print_word print_word::@1
[121] (byte*) print_char_cursor#142 ← phi( print_word/(byte*) print_char_cursor#137 print_word::@1/(byte*) print_char_cursor#22 )
[121] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 )
[122] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte) 4
[123] (byte) print_char::ch#4 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
[124] call print_char
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[125] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte) $f
[126] (byte) print_char::ch#5 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
[127] call print_char
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[128] return
to:@return
print_sword: scope:[print_sword] from mul16s_error::@1 mul16s_error::@3
[127] (signed word) print_sword::w#3 ← phi( mul16s_error::@1/(signed word) print_sword::w#1 mul16s_error::@3/(signed word) print_sword::w#2 )
[128] if((signed word) print_sword::w#3<(signed byte) 0) goto print_sword::@1
[129] (signed word) print_sword::w#3 ← phi( mul16s_error::@1/(signed word) print_sword::w#1 mul16s_error::@3/(signed word) print_sword::w#2 )
[130] if((signed word) print_sword::w#3<(signed byte) 0) goto print_sword::@1
to:print_sword::@3
print_sword::@3: scope:[print_sword] from print_sword
[129] phi()
[130] call print_char
[131] phi()
[132] call print_char
to:print_sword::@2
print_sword::@2: scope:[print_sword] from print_sword::@3 print_sword::@4
[131] (signed word) print_sword::w#5 ← phi( print_sword::@4/(signed word) print_sword::w#0 print_sword::@3/(signed word) print_sword::w#3 )
[132] (word) print_word::w#0 ← (word)(signed word) print_sword::w#5
[133] call print_word
[133] (signed word) print_sword::w#5 ← phi( print_sword::@4/(signed word) print_sword::w#0 print_sword::@3/(signed word) print_sword::w#3 )
[134] (word) print_word::w#0 ← (word)(signed word) print_sword::w#5
[135] call print_word
to:print_sword::@return
print_sword::@return: scope:[print_sword] from print_sword::@2
[134] return
[136] return
to:@return
print_sword::@1: scope:[print_sword] from print_sword
[135] phi()
[136] call print_char
[137] phi()
[138] call print_char
to:print_sword::@4
print_sword::@4: scope:[print_sword] from print_sword::@1
[137] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3
[139] (signed word) print_sword::w#0 ← - (signed word) print_sword::w#3
to:print_sword::@2
mulf16s: scope:[mulf16s] from mul16s_compare::@11
[138] (word) mulf16u::a#0 ← (word)(signed word) mulf16s::a#0
[139] (word) mulf16u::b#0 ← (word)(signed word) mulf16s::b#0
[140] call mulf16u
[141] (dword) mulf16u::return#2 ← (dword) mulf16u::return#0
[140] (word) mulf16u::a#0 ← (word)(signed word) mulf16s::a#0
[141] (word) mulf16u::b#0 ← (word)(signed word) mulf16s::b#0
[142] call mulf16u
[143] (dword) mulf16u::return#2 ← (dword) mulf16u::return#0
to:mulf16s::@5
mulf16s::@5: scope:[mulf16s] from mulf16s
[142] (dword) mulf16s::m#0 ← (dword) mulf16u::return#2
[143] if((signed word) mulf16s::a#0>=(signed byte) 0) goto mulf16s::@1
[144] (dword) mulf16s::m#0 ← (dword) mulf16u::return#2
[145] if((signed word) mulf16s::a#0>=(signed byte) 0) goto mulf16s::@1
to:mulf16s::@3
mulf16s::@3: scope:[mulf16s] from mulf16s::@5
[144] (word~) mulf16s::$9 ← > (dword) mulf16s::m#0
[145] (word~) mulf16s::$16 ← (word~) mulf16s::$9 - (word)(signed word) mulf16s::b#0
[146] (dword) mulf16s::m#1 ← (dword) mulf16s::m#0 hi= (word~) mulf16s::$16
[146] (word~) mulf16s::$9 ← > (dword) mulf16s::m#0
[147] (word~) mulf16s::$16 ← (word~) mulf16s::$9 - (word)(signed word) mulf16s::b#0
[148] (dword) mulf16s::m#1 ← (dword) mulf16s::m#0 hi= (word~) mulf16s::$16
to:mulf16s::@1
mulf16s::@1: scope:[mulf16s] from mulf16s::@3 mulf16s::@5
[147] (dword) mulf16s::m#5 ← phi( mulf16s::@3/(dword) mulf16s::m#1 mulf16s::@5/(dword) mulf16s::m#0 )
[148] if((signed word) mulf16s::b#0>=(signed byte) 0) goto mulf16s::@2
[149] (dword) mulf16s::m#5 ← phi( mulf16s::@3/(dword) mulf16s::m#1 mulf16s::@5/(dword) mulf16s::m#0 )
[150] if((signed word) mulf16s::b#0>=(signed byte) 0) goto mulf16s::@2
to:mulf16s::@4
mulf16s::@4: scope:[mulf16s] from mulf16s::@1
[149] (word~) mulf16s::$13 ← > (dword) mulf16s::m#5
[150] (word~) mulf16s::$17 ← (word~) mulf16s::$13 - (word)(signed word) mulf16s::a#0
[151] (dword) mulf16s::m#2 ← (dword) mulf16s::m#5 hi= (word~) mulf16s::$17
[151] (word~) mulf16s::$13 ← > (dword) mulf16s::m#5
[152] (word~) mulf16s::$17 ← (word~) mulf16s::$13 - (word)(signed word) mulf16s::a#0
[153] (dword) mulf16s::m#2 ← (dword) mulf16s::m#5 hi= (word~) mulf16s::$17
to:mulf16s::@2
mulf16s::@2: scope:[mulf16s] from mulf16s::@1 mulf16s::@4
[152] (dword) mulf16s::m#4 ← phi( mulf16s::@1/(dword) mulf16s::m#5 mulf16s::@4/(dword) mulf16s::m#2 )
[153] (signed dword) mulf16s::return#0 ← (signed dword)(dword) mulf16s::m#4
[154] (dword) mulf16s::m#4 ← phi( mulf16s::@1/(dword) mulf16s::m#5 mulf16s::@4/(dword) mulf16s::m#2 )
[155] (signed dword) mulf16s::return#0 ← (signed dword)(dword) mulf16s::m#4
to:mulf16s::@return
mulf16s::@return: scope:[mulf16s] from mulf16s::@2
[154] return
[156] return
to:@return
mulf16u: scope:[mulf16u] from mul16u_compare::@11 mulf16s
[155] (word) mulf16u::b#2 ← phi( mul16u_compare::@11/(word) mulf16u::b#1 mulf16s/(word) mulf16u::b#0 )
[155] (word) mulf16u::a#2 ← phi( mul16u_compare::@11/(word) mulf16u::a#1 mulf16s/(word) mulf16u::a#0 )
[156] *((const word*) mulf16u::memA#0) ← (word) mulf16u::a#2
[157] *((const word*) mulf16u::memB#0) ← (word) mulf16u::b#2
[157] (word) mulf16u::b#2 ← phi( mul16u_compare::@11/(word) mulf16u::b#1 mulf16s/(word) mulf16u::b#0 )
[157] (word) mulf16u::a#2 ← phi( mul16u_compare::@11/(word) mulf16u::a#1 mulf16s/(word) mulf16u::a#0 )
[158] *((const word*) mulf16u::memA#0) ← (word) mulf16u::a#2
[159] *((const word*) mulf16u::memB#0) ← (word) mulf16u::b#2
asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !: }
[159] (dword) mulf16u::return#0 ← *((const dword*) mulf16u::memR#0)
[161] (dword) mulf16u::return#0 ← *((const dword*) mulf16u::memR#0)
to:mulf16u::@return
mulf16u::@return: scope:[mulf16u] from mulf16u
[160] return
[162] return
to:@return
mul16s: scope:[mul16s] from mul16s_compare::@10
[161] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0
[162] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#0
[163] call mul16u
[164] (dword) mul16u::return#2 ← (dword) mul16u::res#2
[163] (word) mul16u::a#1 ← (word)(signed word) mul16s::a#0
[164] (word) mul16u::b#0 ← (word)(signed word) mul16s::b#0
[165] call mul16u
[166] (dword) mul16u::return#2 ← (dword) mul16u::res#2
to:mul16s::@5
mul16s::@5: scope:[mul16s] from mul16s
[165] (dword) mul16s::m#0 ← (dword) mul16u::return#2
[166] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
[167] (dword) mul16s::m#0 ← (dword) mul16u::return#2
[168] if((signed word) mul16s::a#0>=(signed byte) 0) goto mul16s::@1
to:mul16s::@3
mul16s::@3: scope:[mul16s] from mul16s::@5
[167] (word~) mul16s::$9 ← > (dword) mul16s::m#0
[168] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#0
[169] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16
[169] (word~) mul16s::$9 ← > (dword) mul16s::m#0
[170] (word~) mul16s::$16 ← (word~) mul16s::$9 - (word)(signed word) mul16s::b#0
[171] (dword) mul16s::m#1 ← (dword) mul16s::m#0 hi= (word~) mul16s::$16
to:mul16s::@1
mul16s::@1: scope:[mul16s] from mul16s::@3 mul16s::@5
[170] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 )
[171] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2
[172] (dword) mul16s::m#5 ← phi( mul16s::@3/(dword) mul16s::m#1 mul16s::@5/(dword) mul16s::m#0 )
[173] if((signed word) mul16s::b#0>=(signed byte) 0) goto mul16s::@2
to:mul16s::@4
mul16s::@4: scope:[mul16s] from mul16s::@1
[172] (word~) mul16s::$13 ← > (dword) mul16s::m#5
[173] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#0
[174] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17
[174] (word~) mul16s::$13 ← > (dword) mul16s::m#5
[175] (word~) mul16s::$17 ← (word~) mul16s::$13 - (word)(signed word) mul16s::a#0
[176] (dword) mul16s::m#2 ← (dword) mul16s::m#5 hi= (word~) mul16s::$17
to:mul16s::@2
mul16s::@2: scope:[mul16s] from mul16s::@1 mul16s::@4
[175] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 )
[176] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
[177] (dword) mul16s::m#4 ← phi( mul16s::@1/(dword) mul16s::m#5 mul16s::@4/(dword) mul16s::m#2 )
[178] (signed dword) mul16s::return#0 ← (signed dword)(dword) mul16s::m#4
to:mul16s::@return
mul16s::@return: scope:[mul16s] from mul16s::@2
[177] return
[179] return
to:@return
mul16u: scope:[mul16u] from mul16s mul16u_compare::@10
[178] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mul16u_compare::@10/(word) mul16u::a#2 )
[178] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mul16u_compare::@10/(word) mul16u::b#1 )
[180] (word) mul16u::a#6 ← phi( mul16s/(word) mul16u::a#1 mul16u_compare::@10/(word) mul16u::a#2 )
[180] (dword) mul16u::mb#0 ← phi( mul16s/(word) mul16u::b#0 mul16u_compare::@10/(word) mul16u::b#1 )
to:mul16u::@1
mul16u::@1: scope:[mul16u] from mul16u mul16u::@3
[179] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 )
[179] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 )
[179] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 )
[180] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
[181] (dword) mul16u::mb#2 ← phi( mul16u/(dword) mul16u::mb#0 mul16u::@3/(dword) mul16u::mb#1 )
[181] (dword) mul16u::res#2 ← phi( mul16u/(byte) 0 mul16u::@3/(dword) mul16u::res#6 )
[181] (word) mul16u::a#3 ← phi( mul16u/(word) mul16u::a#6 mul16u::@3/(word) mul16u::a#0 )
[182] if((word) mul16u::a#3!=(byte) 0) goto mul16u::@2
to:mul16u::@return
mul16u::@return: scope:[mul16u] from mul16u::@1
[181] return
[183] return
to:@return
mul16u::@2: scope:[mul16u] from mul16u::@1
[182] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1
[183] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3
[184] (byte~) mul16u::$1 ← (word) mul16u::a#3 & (byte) 1
[185] if((byte~) mul16u::$1==(byte) 0) goto mul16u::@3
to:mul16u::@4
mul16u::@4: scope:[mul16u] from mul16u::@2
[184] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2
[186] (dword) mul16u::res#1 ← (dword) mul16u::res#2 + (dword) mul16u::mb#2
to:mul16u::@3
mul16u::@3: scope:[mul16u] from mul16u::@2 mul16u::@4
[185] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 )
[186] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1
[187] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1
[187] (dword) mul16u::res#6 ← phi( mul16u::@2/(dword) mul16u::res#2 mul16u::@4/(dword) mul16u::res#1 )
[188] (word) mul16u::a#0 ← (word) mul16u::a#3 >> (byte) 1
[189] (dword) mul16u::mb#1 ← (dword) mul16u::mb#2 << (byte) 1
to:mul16u::@1
muls16s: scope:[muls16s] from mul16s_compare::@2
[188] if((signed word) muls16s::a#0<(signed byte) 0) goto muls16s::@4
[190] if((signed word) muls16s::a#0<(signed byte) 0) goto muls16s::@4
to:muls16s::@2
muls16s::@2: scope:[muls16s] from muls16s
[189] if((signed word) muls16s::a#0<=(signed byte) 0) goto muls16s::@1
[191] if((signed word) muls16s::a#0<=(signed byte) 0) goto muls16s::@1
to:muls16s::@3
muls16s::@3: scope:[muls16s] from muls16s::@2 muls16s::@3
[190] (signed word) muls16s::j#2 ← phi( muls16s::@2/(signed byte) 0 muls16s::@3/(signed word) muls16s::j#1 )
[190] (signed dword) muls16s::m#3 ← phi( muls16s::@2/(signed byte) 0 muls16s::@3/(signed dword) muls16s::m#1 )
[191] (signed dword) muls16s::m#1 ← (signed dword) muls16s::m#3 + (signed word) muls16s::b#0
[192] (signed word) muls16s::j#1 ← ++ (signed word) muls16s::j#2
[193] if((signed word) muls16s::j#1!=(signed word) muls16s::a#0) goto muls16s::@3
[192] (signed word) muls16s::j#2 ← phi( muls16s::@2/(signed byte) 0 muls16s::@3/(signed word) muls16s::j#1 )
[192] (signed dword) muls16s::m#3 ← phi( muls16s::@2/(signed byte) 0 muls16s::@3/(signed dword) muls16s::m#1 )
[193] (signed dword) muls16s::m#1 ← (signed dword) muls16s::m#3 + (signed word) muls16s::b#0
[194] (signed word) muls16s::j#1 ← ++ (signed word) muls16s::j#2
[195] if((signed word) muls16s::j#1!=(signed word) muls16s::a#0) goto muls16s::@3
to:muls16s::@1
muls16s::@1: scope:[muls16s] from muls16s::@2 muls16s::@3 muls16s::@4
[194] (signed dword) muls16s::return#0 ← phi( muls16s::@4/(signed dword) muls16s::m#2 muls16s::@2/(signed byte) 0 muls16s::@3/(signed dword) muls16s::m#1 )
[196] (signed dword) muls16s::return#0 ← phi( muls16s::@4/(signed dword) muls16s::m#2 muls16s::@2/(signed byte) 0 muls16s::@3/(signed dword) muls16s::m#1 )
to:muls16s::@return
muls16s::@return: scope:[muls16s] from muls16s::@1
[195] return
[197] return
to:@return
muls16s::@4: scope:[muls16s] from muls16s muls16s::@4
[196] (signed word) muls16s::i#2 ← phi( muls16s/(signed byte) 0 muls16s::@4/(signed word) muls16s::i#1 )
[196] (signed dword) muls16s::m#5 ← phi( muls16s/(signed byte) 0 muls16s::@4/(signed dword) muls16s::m#2 )
[197] (signed dword) muls16s::m#2 ← (signed dword) muls16s::m#5 - (signed word) muls16s::b#0
[198] (signed word) muls16s::i#1 ← -- (signed word) muls16s::i#2
[199] if((signed word) muls16s::i#1!=(signed word) muls16s::a#0) goto muls16s::@4
[198] (signed word) muls16s::i#2 ← phi( muls16s/(signed byte) 0 muls16s::@4/(signed word) muls16s::i#1 )
[198] (signed dword) muls16s::m#5 ← phi( muls16s/(signed byte) 0 muls16s::@4/(signed dword) muls16s::m#2 )
[199] (signed dword) muls16s::m#2 ← (signed dword) muls16s::m#5 - (signed word) muls16s::b#0
[200] (signed word) muls16s::i#1 ← -- (signed word) muls16s::i#2
[201] if((signed word) muls16s::i#1!=(signed word) muls16s::a#0) goto muls16s::@4
to:muls16s::@1
mul16u_compare: scope:[mul16u_compare] from main::@2
[200] phi()
[202] phi()
to:mul16u_compare::@1
mul16u_compare::@1: scope:[mul16u_compare] from mul16u_compare mul16u_compare::@8
[201] (byte) mul16u_compare::i#12 ← phi( mul16u_compare/(byte) 0 mul16u_compare::@8/(byte) mul16u_compare::i#1 )
[201] (word) mul16u_compare::b#6 ← phi( mul16u_compare/(byte) 0 mul16u_compare::@8/(word) mul16u_compare::b#1 )
[201] (word) mul16u_compare::a#6 ← phi( mul16u_compare/(byte) 0 mul16u_compare::@8/(word) mul16u_compare::a#1 )
[201] (byte*) print_char_cursor#142 ← phi( mul16u_compare/(byte*) 1024 mul16u_compare::@8/(byte*) print_char_cursor#130 )
[202] call print_str
[203] (byte) mul16u_compare::i#12 ← phi( mul16u_compare/(byte) 0 mul16u_compare::@8/(byte) mul16u_compare::i#1 )
[203] (word) mul16u_compare::b#6 ← phi( mul16u_compare/(byte) 0 mul16u_compare::@8/(word) mul16u_compare::b#1 )
[203] (word) mul16u_compare::a#6 ← phi( mul16u_compare/(byte) 0 mul16u_compare::@8/(word) mul16u_compare::a#1 )
[203] (byte*) print_char_cursor#145 ← phi( mul16u_compare/(byte*) 1024 mul16u_compare::@8/(byte*) print_char_cursor#132 )
[204] call print_str
to:mul16u_compare::@2
mul16u_compare::@2: scope:[mul16u_compare] from mul16u_compare::@1 mul16u_compare::@5
[203] (byte) mul16u_compare::j#10 ← phi( mul16u_compare::@1/(byte) 0 mul16u_compare::@5/(byte) mul16u_compare::j#1 )
[203] (word) mul16u_compare::b#2 ← phi( mul16u_compare::@1/(word) mul16u_compare::b#6 mul16u_compare::@5/(word) mul16u_compare::b#1 )
[203] (word) mul16u_compare::a#2 ← phi( mul16u_compare::@1/(word) mul16u_compare::a#6 mul16u_compare::@5/(word) mul16u_compare::a#1 )
[204] (word) mul16u_compare::a#1 ← (word) mul16u_compare::a#2 + (word) $d2b
[205] (word) mul16u_compare::b#1 ← (word) mul16u_compare::b#2 + (word) $ffd
[206] (word) muls16u::a#0 ← (word) mul16u_compare::a#1
[207] (word) muls16u::b#0 ← (word) mul16u_compare::b#1
[208] call muls16u
[209] (dword) muls16u::return#2 ← (dword) muls16u::return#0
[205] (byte) mul16u_compare::j#10 ← phi( mul16u_compare::@1/(byte) 0 mul16u_compare::@5/(byte) mul16u_compare::j#1 )
[205] (word) mul16u_compare::b#2 ← phi( mul16u_compare::@1/(word) mul16u_compare::b#6 mul16u_compare::@5/(word) mul16u_compare::b#1 )
[205] (word) mul16u_compare::a#2 ← phi( mul16u_compare::@1/(word) mul16u_compare::a#6 mul16u_compare::@5/(word) mul16u_compare::a#1 )
[206] (word) mul16u_compare::a#1 ← (word) mul16u_compare::a#2 + (word) $d2b
[207] (word) mul16u_compare::b#1 ← (word) mul16u_compare::b#2 + (word) $ffd
[208] (word) muls16u::a#0 ← (word) mul16u_compare::a#1
[209] (word) muls16u::b#0 ← (word) mul16u_compare::b#1
[210] call muls16u
[211] (dword) muls16u::return#2 ← (dword) muls16u::return#0
to:mul16u_compare::@10
mul16u_compare::@10: scope:[mul16u_compare] from mul16u_compare::@2
[210] (dword) mul16u_compare::ms#0 ← (dword) muls16u::return#2
[211] (word) mul16u::a#2 ← (word) mul16u_compare::a#1
[212] (word) mul16u::b#1 ← (word) mul16u_compare::b#1
[213] call mul16u
[214] (dword) mul16u::return#3 ← (dword) mul16u::res#2
[212] (dword) mul16u_compare::ms#0 ← (dword) muls16u::return#2
[213] (word) mul16u::a#2 ← (word) mul16u_compare::a#1
[214] (word) mul16u::b#1 ← (word) mul16u_compare::b#1
[215] call mul16u
[216] (dword) mul16u::return#3 ← (dword) mul16u::res#2
to:mul16u_compare::@11
mul16u_compare::@11: scope:[mul16u_compare] from mul16u_compare::@10
[215] (dword) mul16u_compare::mn#0 ← (dword) mul16u::return#3
[216] (word) mulf16u::a#1 ← (word) mul16u_compare::a#1
[217] (word) mulf16u::b#1 ← (word) mul16u_compare::b#1
[218] call mulf16u
[219] (dword) mulf16u::return#3 ← (dword) mulf16u::return#0
[217] (dword) mul16u_compare::mn#0 ← (dword) mul16u::return#3
[218] (word) mulf16u::a#1 ← (word) mul16u_compare::a#1
[219] (word) mulf16u::b#1 ← (word) mul16u_compare::b#1
[220] call mulf16u
[221] (dword) mulf16u::return#3 ← (dword) mulf16u::return#0
to:mul16u_compare::@12
mul16u_compare::@12: scope:[mul16u_compare] from mul16u_compare::@11
[220] (dword) mul16u_compare::mf#0 ← (dword) mulf16u::return#3
[221] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3
[222] (dword) mul16u_compare::mf#0 ← (dword) mulf16u::return#3
[223] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mf#0) goto mul16u_compare::@3
to:mul16u_compare::@6
mul16u_compare::@6: scope:[mul16u_compare] from mul16u_compare::@12
[222] phi()
[224] phi()
to:mul16u_compare::@3
mul16u_compare::@3: scope:[mul16u_compare] from mul16u_compare::@12 mul16u_compare::@6
[223] (byte) mul16u_compare::ok#4 ← phi( mul16u_compare::@12/(byte) 1 mul16u_compare::@6/(byte) 0 )
[224] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@15
[225] (byte) mul16u_compare::ok#4 ← phi( mul16u_compare::@12/(byte) 1 mul16u_compare::@6/(byte) 0 )
[226] if((dword) mul16u_compare::ms#0==(dword) mul16u_compare::mn#0) goto mul16u_compare::@15
to:mul16u_compare::@4
mul16u_compare::@15: scope:[mul16u_compare] from mul16u_compare::@3
[225] phi()
[227] phi()
to:mul16u_compare::@4
mul16u_compare::@4: scope:[mul16u_compare] from mul16u_compare::@15 mul16u_compare::@3
[226] (byte) mul16u_compare::ok#3 ← phi( mul16u_compare::@15/(byte) mul16u_compare::ok#4 mul16u_compare::@3/(byte) 0 )
[227] if((byte) mul16u_compare::ok#3!=(byte) 0) goto mul16u_compare::@5
[228] (byte) mul16u_compare::ok#3 ← phi( mul16u_compare::@15/(byte) mul16u_compare::ok#4 mul16u_compare::@3/(byte) 0 )
[229] if((byte) mul16u_compare::ok#3!=(byte) 0) goto mul16u_compare::@5
to:mul16u_compare::@7
mul16u_compare::@7: scope:[mul16u_compare] from mul16u_compare::@4
[228] *((const byte*) BGCOL#0) ← (byte) 2
[229] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1
[230] (word) mul16u_error::b#0 ← (word) mul16u_compare::b#1
[231] (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#0
[232] (dword) mul16u_error::mn#0 ← (dword) mul16u_compare::mn#0
[233] (dword) mul16u_error::mf#0 ← (dword) mul16u_compare::mf#0
[234] call mul16u_error
[230] *((const byte*) BGCOL#0) ← (byte) 2
[231] (word) mul16u_error::a#0 ← (word) mul16u_compare::a#1
[232] (word) mul16u_error::b#0 ← (word) mul16u_compare::b#1
[233] (dword) mul16u_error::ms#0 ← (dword) mul16u_compare::ms#0
[234] (dword) mul16u_error::mn#0 ← (dword) mul16u_compare::mn#0
[235] (dword) mul16u_error::mf#0 ← (dword) mul16u_compare::mf#0
[236] call mul16u_error
to:mul16u_compare::@return
mul16u_compare::@return: scope:[mul16u_compare] from mul16u_compare::@14 mul16u_compare::@7
[235] return
[237] return
to:@return
mul16u_compare::@5: scope:[mul16u_compare] from mul16u_compare::@4
[236] (byte) mul16u_compare::j#1 ← ++ (byte) mul16u_compare::j#10
[237] if((byte) mul16u_compare::j#1!=(byte) $10) goto mul16u_compare::@2
[238] (byte) mul16u_compare::j#1 ← ++ (byte) mul16u_compare::j#10
[239] if((byte) mul16u_compare::j#1!=(byte) $10) goto mul16u_compare::@2
to:mul16u_compare::@8
mul16u_compare::@8: scope:[mul16u_compare] from mul16u_compare::@5
[238] (byte) mul16u_compare::i#1 ← ++ (byte) mul16u_compare::i#12
[239] if((byte) mul16u_compare::i#1!=(byte) $10) goto mul16u_compare::@1
[240] (byte) mul16u_compare::i#1 ← ++ (byte) mul16u_compare::i#12
[241] if((byte) mul16u_compare::i#1!=(byte) $10) goto mul16u_compare::@1
to:mul16u_compare::@9
mul16u_compare::@9: scope:[mul16u_compare] from mul16u_compare::@8
[240] phi()
[241] call print_ln
[242] phi()
[243] call print_ln
to:mul16u_compare::@13
mul16u_compare::@13: scope:[mul16u_compare] from mul16u_compare::@9
[242] (byte*~) print_char_cursor#187 ← (byte*) print_line_cursor#1
[243] call print_str
[244] (byte*~) print_char_cursor#190 ← (byte*) print_line_cursor#1
[245] call print_str
to:mul16u_compare::@14
mul16u_compare::@14: scope:[mul16u_compare] from mul16u_compare::@13
[244] phi()
[245] call print_ln
[246] phi()
[247] call print_ln
to:mul16u_compare::@return
mul16u_error: scope:[mul16u_error] from mul16u_compare::@7
[246] phi()
[247] call print_str
[248] phi()
[249] call print_str
to:mul16u_error::@1
mul16u_error::@1: scope:[mul16u_error] from mul16u_error
[248] (word) print_word::w#3 ← (word) mul16u_error::a#0
[249] call print_word
[250] (word) print_word::w#3 ← (word) mul16u_error::a#0
[251] call print_word
to:mul16u_error::@2
mul16u_error::@2: scope:[mul16u_error] from mul16u_error::@1
[250] phi()
[251] call print_str
[252] phi()
[253] call print_str
to:mul16u_error::@3
mul16u_error::@3: scope:[mul16u_error] from mul16u_error::@2
[252] (word) print_word::w#4 ← (word) mul16u_error::b#0
[253] call print_word
[254] (word) print_word::w#4 ← (word) mul16u_error::b#0
[255] call print_word
to:mul16u_error::@4
mul16u_error::@4: scope:[mul16u_error] from mul16u_error::@3
[254] phi()
[255] call print_str
[256] phi()
[257] call print_str
to:mul16u_error::@5
mul16u_error::@5: scope:[mul16u_error] from mul16u_error::@4
[256] (dword) print_dword::dw#1 ← (dword) mul16u_error::ms#0
[257] call print_dword
[258] (dword) print_dword::dw#1 ← (dword) mul16u_error::ms#0
[259] call print_dword
to:mul16u_error::@6
mul16u_error::@6: scope:[mul16u_error] from mul16u_error::@5
[258] phi()
[259] call print_str
[260] phi()
[261] call print_str
to:mul16u_error::@7
mul16u_error::@7: scope:[mul16u_error] from mul16u_error::@6
[260] (dword) print_dword::dw#2 ← (dword) mul16u_error::mn#0
[261] call print_dword
[262] (dword) print_dword::dw#2 ← (dword) mul16u_error::mn#0
[263] call print_dword
to:mul16u_error::@8
mul16u_error::@8: scope:[mul16u_error] from mul16u_error::@7
[262] phi()
[263] call print_str
[264] phi()
[265] call print_str
to:mul16u_error::@9
mul16u_error::@9: scope:[mul16u_error] from mul16u_error::@8
[264] (dword) print_dword::dw#3 ← (dword) mul16u_error::mf#0
[265] call print_dword
[266] (dword) print_dword::dw#3 ← (dword) mul16u_error::mf#0
[267] call print_dword
to:mul16u_error::@10
mul16u_error::@10: scope:[mul16u_error] from mul16u_error::@9
[266] phi()
[267] call print_ln
[268] phi()
[269] call print_ln
to:mul16u_error::@return
mul16u_error::@return: scope:[mul16u_error] from mul16u_error::@10
[268] return
[270] return
to:@return
muls16u: scope:[muls16u] from mul16u_compare::@2
[269] if((word) muls16u::a#0==(byte) 0) goto muls16u::@1
[271] if((word) muls16u::a#0==(byte) 0) goto muls16u::@1
to:muls16u::@2
muls16u::@2: scope:[muls16u] from muls16u muls16u::@2
[270] (word) muls16u::i#2 ← phi( muls16u/(byte) 0 muls16u::@2/(word) muls16u::i#1 )
[270] (dword) muls16u::m#3 ← phi( muls16u/(byte) 0 muls16u::@2/(dword) muls16u::m#1 )
[271] (dword) muls16u::m#1 ← (dword) muls16u::m#3 + (word) muls16u::b#0
[272] (word) muls16u::i#1 ← ++ (word) muls16u::i#2
[273] if((word) muls16u::i#1!=(word) muls16u::a#0) goto muls16u::@2
[272] (word) muls16u::i#2 ← phi( muls16u/(byte) 0 muls16u::@2/(word) muls16u::i#1 )
[272] (dword) muls16u::m#3 ← phi( muls16u/(byte) 0 muls16u::@2/(dword) muls16u::m#1 )
[273] (dword) muls16u::m#1 ← (dword) muls16u::m#3 + (word) muls16u::b#0
[274] (word) muls16u::i#1 ← ++ (word) muls16u::i#2
[275] if((word) muls16u::i#1!=(word) muls16u::a#0) goto muls16u::@2
to:muls16u::@1
muls16u::@1: scope:[muls16u] from muls16u muls16u::@2
[274] (dword) muls16u::return#0 ← phi( muls16u/(byte) 0 muls16u::@2/(dword) muls16u::m#1 )
[276] (dword) muls16u::return#0 ← phi( muls16u/(byte) 0 muls16u::@2/(dword) muls16u::m#1 )
to:muls16u::@return
muls16u::@return: scope:[muls16u] from muls16u::@1
[275] return
[277] return
to:@return
mulf_init: scope:[mulf_init] from main::@1
[276] phi()
[278] phi()
to:mulf_init::@1
mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@2
[277] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@2/(byte) mulf_init::x_2#2 )
[277] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte[$200]) mulf_sqr1_hi#0+(byte) 1 mulf_init::@2/(byte*) mulf_init::sqr1_hi#1 )
[277] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte[$200]) mulf_sqr1_lo#0+(byte) 1 mulf_init::@2/(byte*) mulf_init::sqr1_lo#1 )
[277] (word) mulf_init::sqr#4 ← phi( mulf_init/(byte) 0 mulf_init::@2/(word) mulf_init::sqr#1 )
[277] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@2/(byte) mulf_init::c#1 )
[278] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2
[279] (byte~) mulf_init::$7 ← (byte) mulf_init::c#1 & (byte) 1
[280] if((byte~) mulf_init::$7!=(byte) 0) goto mulf_init::@2
[279] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@2/(byte) mulf_init::x_2#2 )
[279] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte[$200]) mulf_sqr1_hi#0+(byte) 1 mulf_init::@2/(byte*) mulf_init::sqr1_hi#1 )
[279] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte[$200]) mulf_sqr1_lo#0+(byte) 1 mulf_init::@2/(byte*) mulf_init::sqr1_lo#1 )
[279] (word) mulf_init::sqr#4 ← phi( mulf_init/(byte) 0 mulf_init::@2/(word) mulf_init::sqr#1 )
[279] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@2/(byte) mulf_init::c#1 )
[280] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2
[281] (byte~) mulf_init::$7 ← (byte) mulf_init::c#1 & (byte) 1
[282] if((byte~) mulf_init::$7!=(byte) 0) goto mulf_init::@2
to:mulf_init::@3
mulf_init::@3: scope:[mulf_init] from mulf_init::@1
[281] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3
[282] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4
[283] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3
[284] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4
to:mulf_init::@2
mulf_init::@2: scope:[mulf_init] from mulf_init::@1 mulf_init::@3
[283] (byte) mulf_init::x_2#2 ← phi( mulf_init::@1/(byte) mulf_init::x_2#3 mulf_init::@3/(byte) mulf_init::x_2#1 )
[283] (word) mulf_init::sqr#3 ← phi( mulf_init::@1/(word) mulf_init::sqr#4 mulf_init::@3/(word) mulf_init::sqr#2 )
[284] (byte~) mulf_init::$10 ← < (word) mulf_init::sqr#3
[285] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$10
[286] (byte~) mulf_init::$11 ← > (word) mulf_init::sqr#3
[287] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$11
[288] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2
[289] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2
[290] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2
[291] if((byte*) mulf_init::sqr1_lo#1!=(const byte[$200]) mulf_sqr1_lo#0+(word) $200) goto mulf_init::@1
[285] (byte) mulf_init::x_2#2 ← phi( mulf_init::@1/(byte) mulf_init::x_2#3 mulf_init::@3/(byte) mulf_init::x_2#1 )
[285] (word) mulf_init::sqr#3 ← phi( mulf_init::@1/(word) mulf_init::sqr#4 mulf_init::@3/(word) mulf_init::sqr#2 )
[286] (byte~) mulf_init::$10 ← < (word) mulf_init::sqr#3
[287] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$10
[288] (byte~) mulf_init::$11 ← > (word) mulf_init::sqr#3
[289] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$11
[290] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2
[291] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2
[292] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2
[293] if((byte*) mulf_init::sqr1_lo#1!=(const byte[$200]) mulf_sqr1_lo#0+(word) $200) goto mulf_init::@1
to:mulf_init::@4
mulf_init::@4: scope:[mulf_init] from mulf_init::@2 mulf_init::@5
[292] (byte) mulf_init::dir#2 ← phi( mulf_init::@2/(byte) $ff mulf_init::@5/(byte) mulf_init::dir#3 )
[292] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@2/(const byte[$200]) mulf_sqr2_hi#0 mulf_init::@5/(byte*) mulf_init::sqr2_hi#1 )
[292] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@2/(const byte[$200]) mulf_sqr2_lo#0 mulf_init::@5/(byte*) mulf_init::sqr2_lo#1 )
[292] (byte) mulf_init::x_255#2 ← phi( mulf_init::@2/(byte) -1 mulf_init::@5/(byte) mulf_init::x_255#1 )
[293] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte[$200]) mulf_sqr1_lo#0 + (byte) mulf_init::x_255#2)
[294] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte[$200]) mulf_sqr1_hi#0 + (byte) mulf_init::x_255#2)
[295] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2
[296] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2
[297] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@7
[294] (byte) mulf_init::dir#2 ← phi( mulf_init::@2/(byte) $ff mulf_init::@5/(byte) mulf_init::dir#3 )
[294] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@2/(const byte[$200]) mulf_sqr2_hi#0 mulf_init::@5/(byte*) mulf_init::sqr2_hi#1 )
[294] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@2/(const byte[$200]) mulf_sqr2_lo#0 mulf_init::@5/(byte*) mulf_init::sqr2_lo#1 )
[294] (byte) mulf_init::x_255#2 ← phi( mulf_init::@2/(byte) -1 mulf_init::@5/(byte) mulf_init::x_255#1 )
[295] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte[$200]) mulf_sqr1_lo#0 + (byte) mulf_init::x_255#2)
[296] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte[$200]) mulf_sqr1_hi#0 + (byte) mulf_init::x_255#2)
[297] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2
[298] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2
[299] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@7
to:mulf_init::@5
mulf_init::@7: scope:[mulf_init] from mulf_init::@4
[298] phi()
[300] phi()
to:mulf_init::@5
mulf_init::@5: scope:[mulf_init] from mulf_init::@4 mulf_init::@7
[299] (byte) mulf_init::dir#3 ← phi( mulf_init::@7/(byte) mulf_init::dir#2 mulf_init::@4/(byte) 1 )
[300] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2
[301] if((byte*) mulf_init::sqr2_lo#1!=(const byte[$200]) mulf_sqr2_lo#0+(word) $1ff) goto mulf_init::@4
[301] (byte) mulf_init::dir#3 ← phi( mulf_init::@7/(byte) mulf_init::dir#2 mulf_init::@4/(byte) 1 )
[302] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2
[303] if((byte*) mulf_init::sqr2_lo#1!=(const byte[$200]) mulf_sqr2_lo#0+(word) $1ff) goto mulf_init::@4
to:mulf_init::@6
mulf_init::@6: scope:[mulf_init] from mulf_init::@5
[302] *((const byte[$200]) mulf_sqr2_lo#0+(word) $1ff) ← *((const byte[$200]) mulf_sqr1_lo#0+(word) $100)
[303] *((const byte[$200]) mulf_sqr2_hi#0+(word) $1ff) ← *((const byte[$200]) mulf_sqr1_hi#0+(word) $100)
[304] *((const byte[$200]) mulf_sqr2_lo#0+(word) $1ff) ← *((const byte[$200]) mulf_sqr1_lo#0+(word) $100)
[305] *((const byte[$200]) mulf_sqr2_hi#0+(word) $1ff) ← *((const byte[$200]) mulf_sqr1_hi#0+(word) $100)
to:mulf_init::@return
mulf_init::@return: scope:[mulf_init] from mulf_init::@6
[304] return
[306] return
to:@return
print_cls: scope:[print_cls] from main
[305] phi()
[307] phi()
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
[306] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) 1024 print_cls::@1/(byte*) print_cls::sc#1 )
[307] *((byte*) print_cls::sc#2) ← (byte) ' '
[308] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
[309] if((byte*) print_cls::sc#1!=(byte*) 1024+(word) $3e8) goto print_cls::@1
[308] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) 1024 print_cls::@1/(byte*) print_cls::sc#1 )
[309] *((byte*) print_cls::sc#2) ← (byte) ' '
[310] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
[311] if((byte*) print_cls::sc#1!=(byte*) 1024+(word) $3e8) goto print_cls::@1
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls::@1
[310] return
[312] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -334,25 +334,24 @@
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
(byte) print_char::ch#3 reg byte a 4.0
(byte) print_char::ch#4 reg byte a 4.0
(byte) print_char::ch#5 reg byte a 6.0
(byte) print_char::ch#5 reg byte a 4.0
(byte) print_char::ch#6 reg byte a 6.0
(byte*) print_char_cursor
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:15 101.0
(byte*) print_char_cursor#130 print_char_cursor zp ZP_WORD:15 3.2162162162162145
(byte*) print_char_cursor#131 print_char_cursor zp ZP_WORD:15 5.75
(byte*) print_char_cursor#135 print_char_cursor zp ZP_WORD:15 6.0
(byte*) print_char_cursor#136 print_char_cursor zp ZP_WORD:15 5.0
(byte*) print_char_cursor#137 print_char_cursor zp ZP_WORD:15 3.0
(byte*) print_char_cursor#139 print_char_cursor zp ZP_WORD:15 2.0
(byte*) print_char_cursor#142 print_char_cursor zp ZP_WORD:15 22.0
(byte*) print_char_cursor#146 print_char_cursor zp ZP_WORD:15 24.0
(byte*) print_char_cursor#151 print_char_cursor zp ZP_WORD:15 48.0
(byte*~) print_char_cursor#180 print_char_cursor zp ZP_WORD:15 4.0
(byte*~) print_char_cursor#187 print_char_cursor zp ZP_WORD:15 4.0
(byte*) print_char_cursor#21 print_char_cursor zp ZP_WORD:15 0.6956521739130432
(byte*~) print_char_cursor#220 print_char_cursor zp ZP_WORD:15 4.0
(byte*) print_char_cursor#86 print_char_cursor zp ZP_WORD:15 7.0
(byte*) print_char_cursor#132 print_char_cursor zp ZP_WORD:15 3.1874999999999996
(byte*) print_char_cursor#133 print_char_cursor zp ZP_WORD:15 5.75
(byte*) print_char_cursor#137 print_char_cursor zp ZP_WORD:15 6.0
(byte*) print_char_cursor#138 print_char_cursor zp ZP_WORD:15 5.0
(byte*) print_char_cursor#142 print_char_cursor zp ZP_WORD:15 2.0
(byte*) print_char_cursor#145 print_char_cursor zp ZP_WORD:15 22.0
(byte*) print_char_cursor#149 print_char_cursor zp ZP_WORD:15 24.0
(byte*) print_char_cursor#154 print_char_cursor zp ZP_WORD:15 48.0
(byte*~) print_char_cursor#183 print_char_cursor zp ZP_WORD:15 4.0
(byte*~) print_char_cursor#190 print_char_cursor zp ZP_WORD:15 4.0
(byte*) print_char_cursor#22 print_char_cursor zp ZP_WORD:15 0.653061224489796
(byte*~) print_char_cursor#222 print_char_cursor zp ZP_WORD:15 4.0
(byte*) print_char_cursor#88 print_char_cursor zp ZP_WORD:15 8.0
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
@ -382,14 +381,15 @@
(label) print_sdword::@1
(label) print_sdword::@2
(label) print_sdword::@3
(label) print_sdword::@4
(label) print_sdword::@return
(signed dword) print_sdword::dw
(signed dword) print_sdword::dw#0 dw zp ZP_DWORD:11 4.0
(signed dword) print_sdword::dw#1 dw zp ZP_DWORD:11 4.0
(signed dword) print_sdword::dw#2 dw zp ZP_DWORD:11 4.0
(signed dword) print_sdword::dw#3 dw zp ZP_DWORD:11 4.0
(signed dword) print_sdword::dw#4 dw zp ZP_DWORD:11 3.0
(signed dword) print_sdword::dw#5 dw zp ZP_DWORD:11 4.0
(signed dword) print_sdword::dw#4 dw zp ZP_DWORD:11 1.9999999999999998
(signed dword) print_sdword::dw#6 dw zp ZP_DWORD:11 4.0
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
@ -433,10 +433,10 @@ reg byte y [ mul16s_compare::j#10 mul16s_compare::j#1 ]
reg byte x [ mul16s_compare::ok#3 mul16s_compare::ok#4 ]
zp ZP_WORD:7 [ print_line_cursor#22 print_line_cursor#43 print_line_cursor#1 ]
zp ZP_WORD:9 [ print_str::str#15 print_str::str#17 print_str::str#0 ]
zp ZP_DWORD:11 [ print_sdword::dw#5 print_sdword::dw#4 print_sdword::dw#1 print_sdword::dw#2 print_sdword::dw#3 print_sdword::dw#0 print_dword::dw#4 print_dword::dw#1 print_dword::dw#2 print_dword::dw#3 print_dword::dw#0 mul16s_error::ms#0 mul16s_compare::ms#0 mul16u_compare::ms#0 mul16u_error::ms#0 muls16s::m#5 muls16s::return#0 muls16s::m#2 muls16s::m#3 muls16s::m#1 muls16s::return#2 muls16u::return#0 muls16u::m#3 muls16u::m#1 muls16u::return#2 ]
zp ZP_DWORD:11 [ print_sdword::dw#6 print_sdword::dw#0 print_sdword::dw#4 print_sdword::dw#1 print_sdword::dw#2 print_sdword::dw#3 print_dword::dw#4 print_dword::dw#1 print_dword::dw#2 print_dword::dw#3 print_dword::dw#0 mul16s_error::ms#0 mul16s_compare::ms#0 mul16u_compare::ms#0 mul16u_error::ms#0 muls16s::m#5 muls16s::return#0 muls16s::m#2 muls16s::m#3 muls16s::m#1 muls16s::return#2 muls16u::return#0 muls16u::m#3 muls16u::m#1 muls16u::return#2 ]
reg byte a [ print_char::ch#6 print_char::ch#4 print_char::ch#5 ]
zp ZP_WORD:15 [ print_char_cursor#137 print_char_cursor#138 print_char_cursor#88 print_char_cursor#142 print_char_cursor#154 print_char_cursor#133 print_char_cursor#149 print_char_cursor#222 print_char_cursor#132 print_char_cursor#22 print_char_cursor#183 print_char_cursor#145 print_char_cursor#190 print_char_cursor#1 ]
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
reg byte a [ print_char::ch#5 print_char::ch#3 print_char::ch#4 ]
zp ZP_WORD:15 [ print_char_cursor#86 print_char_cursor#139 print_char_cursor#135 print_char_cursor#136 print_char_cursor#137 print_char_cursor#151 print_char_cursor#131 print_char_cursor#146 print_char_cursor#220 print_char_cursor#130 print_char_cursor#21 print_char_cursor#180 print_char_cursor#142 print_char_cursor#187 print_char_cursor#1 ]
zp ZP_DWORD:17 [ mulf16s::m#4 mulf16s::m#5 mulf16s::m#1 mulf16s::m#0 mulf16s::m#2 mulf16u::return#2 mulf16s::return#0 mulf16s::return#2 mul16s_compare::mf#0 mulf16u::return#0 mulf16u::return#3 mul16s_error::mf#0 mul16u_compare::mf#0 mul16u_error::mf#0 ]
zp ZP_WORD:21 [ mulf16u::a#2 mulf16u::a#1 mulf16u::a#0 mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 muls16u::a#0 ]
zp ZP_WORD:23 [ mulf16u::b#2 mulf16u::b#1 mulf16u::b#0 mul16u_compare::b#2 mul16u_compare::b#6 mul16u_compare::b#1 mul16u::b#1 muls16u::b#0 mul16u_error::b#0 ]

View File

@ -21,15 +21,10 @@ main: {
sta _2
lda #0
sta _2+1
ldy #8
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
lda _3
sta _3+1
lda #0
sta _3
txa
clc
adc _4

View File

@ -280,20 +280,11 @@ main: {
sta _2
lda #0
sta _2+1
// [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz2_rol_vbuc1
ldy #8
// [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz2_rol_8
lda _2
sta _3
lda _2+1
sta _3+1
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
lda #0
sta _3
// [9] (word~) main::$4 ← (word~) main::$3 + (byte) main::i#2 -- vwuz1=vwuz2_plus_vbuz3
lda i
clc
@ -351,16 +342,16 @@ REGISTER UPLIFT POTENTIAL REGISTERS
Statement [6] (word~) main::$1 ← (word)(byte) main::i#2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) always clobbers reg byte a
Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [7] (word~) main::$2 ← (word)(byte) main::i#2 [ main::i#2 main::$1 main::$2 ] ( main:2 [ main::i#2 main::$1 main::$2 ] ) always clobbers reg byte a
Statement [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::i#2 main::$1 main::$3 ] ( main:2 [ main::i#2 main::$1 main::$3 ] ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::i#2 main::$1 main::$3 ] ( main:2 [ main::i#2 main::$1 main::$3 ] ) always clobbers reg byte a
Statement [9] (word~) main::$4 ← (word~) main::$3 + (byte) main::i#2 [ main::i#2 main::$1 main::$4 ] ( main:2 [ main::i#2 main::$1 main::$4 ] ) always clobbers reg byte a
Statement [10] (word~) main::$6 ← (word~) main::$1 << (byte) 1 [ main::i#2 main::$4 main::$6 ] ( main:2 [ main::i#2 main::$4 main::$6 ] ) always clobbers reg byte a
Statement [11] (word*~) main::$9 ← (const word[$100]) words#0 + (word~) main::$6 [ main::i#2 main::$4 main::$9 ] ( main:2 [ main::i#2 main::$4 main::$9 ] ) always clobbers reg byte a
Statement [12] *((word*~) main::$9) ← (word~) main::$4 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a reg byte y
Removing always clobbered register reg byte y as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ]
Statement [15] *((const word*) main::SCREEN#0) ← *((const word[$100]) words#0+(word) $ff*(const byte) SIZEOF_WORD) [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [6] (word~) main::$1 ← (word)(byte) main::i#2 [ main::i#2 main::$1 ] ( main:2 [ main::i#2 main::$1 ] ) always clobbers reg byte a
Statement [7] (word~) main::$2 ← (word)(byte) main::i#2 [ main::i#2 main::$1 main::$2 ] ( main:2 [ main::i#2 main::$1 main::$2 ] ) always clobbers reg byte a
Statement [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::i#2 main::$1 main::$3 ] ( main:2 [ main::i#2 main::$1 main::$3 ] ) always clobbers reg byte a reg byte y
Statement [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 [ main::i#2 main::$1 main::$3 ] ( main:2 [ main::i#2 main::$1 main::$3 ] ) always clobbers reg byte a
Statement [9] (word~) main::$4 ← (word~) main::$3 + (byte) main::i#2 [ main::i#2 main::$1 main::$4 ] ( main:2 [ main::i#2 main::$1 main::$4 ] ) always clobbers reg byte a
Statement [10] (word~) main::$6 ← (word~) main::$1 << (byte) 1 [ main::i#2 main::$4 main::$6 ] ( main:2 [ main::i#2 main::$4 main::$6 ] ) always clobbers reg byte a
Statement [11] (word*~) main::$9 ← (const word[$100]) words#0 + (word~) main::$6 [ main::i#2 main::$4 main::$9 ] ( main:2 [ main::i#2 main::$4 main::$9 ] ) always clobbers reg byte a
@ -378,8 +369,8 @@ REGISTER UPLIFT SCOPES
Uplift Scope [main] 22: zp ZP_WORD:5 [ main::$2 ] 22: zp ZP_WORD:7 [ main::$3 ] 22: zp ZP_WORD:11 [ main::$6 ] 22: zp ZP_WORD:13 [ main::$9 ] 20.62: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 7.33: zp ZP_WORD:9 [ main::$4 ] 5.5: zp ZP_WORD:3 [ main::$1 ]
Uplift Scope []
Uplifting [main] best 1482 combination zp ZP_WORD:5 [ main::$2 ] zp ZP_WORD:7 [ main::$3 ] zp ZP_WORD:11 [ main::$6 ] zp ZP_WORD:13 [ main::$9 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:9 [ main::$4 ] zp ZP_WORD:3 [ main::$1 ]
Uplifting [] best 1482 combination
Uplifting [main] best 1262 combination zp ZP_WORD:5 [ main::$2 ] zp ZP_WORD:7 [ main::$3 ] zp ZP_WORD:11 [ main::$6 ] zp ZP_WORD:13 [ main::$9 ] reg byte x [ main::i#2 main::i#1 ] zp ZP_WORD:9 [ main::$4 ] zp ZP_WORD:3 [ main::$1 ]
Uplifting [] best 1262 combination
Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ main::$1 ] ] with [ zp ZP_WORD:11 [ main::$6 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:5 [ main::$2 ] ] with [ zp ZP_WORD:7 [ main::$3 ] ] - score: 1
Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ main::$1 main::$6 ] ] with [ zp ZP_WORD:13 [ main::$9 ] ] - score: 1
@ -442,16 +433,11 @@ main: {
sta _2
lda #0
sta _2+1
// [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_vbuc1
ldy #8
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
// [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_8
lda _3
sta _3+1
lda #0
sta _3
// [9] (word~) main::$4 ← (word~) main::$3 + (byte) main::i#2 -- vwuz1=vwuz1_plus_vbuxx
txa
clc
@ -556,7 +542,7 @@ zp ZP_WORD:4 [ main::$2 main::$3 main::$4 ]
FINAL ASSEMBLER
Score: 1192
Score: 1092
// File Comments
// Tests a word-array with 128+ elements
@ -601,16 +587,11 @@ main: {
lda #0
sta _2+1
// ((word)i)*0x100
// [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_vbuc1
ldy #8
cpy #0
beq !e+
!:
asl _3
rol _3+1
dey
bne !-
!e:
// [8] (word~) main::$3 ← (word~) main::$2 << (byte) 8 -- vwuz1=vwuz1_rol_8
lda _3
sta _3+1
lda #0
sta _3
// ((word)i)*0x100+i
// [9] (word~) main::$4 ← (word~) main::$3 + (byte) main::i#2 -- vwuz1=vwuz1_plus_vbuxx
txa