mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-07 06:37:31 +00:00
Merged memvars-328 into memvars-struct.
This commit is contained in:
parent
070380b4af
commit
d60a31f188
@ -2730,11 +2730,6 @@ public class TestPrograms {
|
||||
compileAndCompare("const-word-pointer");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConstParam1() throws IOException, URISyntaxException {
|
||||
assertError("const-param-1", "Error! Const parameters not supported", false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConstParam() throws IOException, URISyntaxException {
|
||||
compileAndCompare("const-param");
|
||||
|
@ -103,7 +103,7 @@ print_ln: {
|
||||
rts
|
||||
}
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($e) w)
|
||||
// print_word(word zp($e) w)
|
||||
print_word: {
|
||||
.label w = $e
|
||||
lda.z w+1
|
||||
@ -188,7 +188,7 @@ sum: {
|
||||
sta.z current
|
||||
jmp __b1
|
||||
}
|
||||
// prepend(word zeropage(4) x)
|
||||
// prepend(word zp(4) x)
|
||||
prepend: {
|
||||
.label new = $10
|
||||
.label x = 4
|
||||
|
@ -13,6 +13,7 @@ Rewriting struct pointer member access *((struct node*) prepend::new).value
|
||||
Rewriting struct pointer member access *((struct node*) sum::current).value
|
||||
Rewriting struct pointer member access *((struct node*) sum::current).next
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strlen::str)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
|
||||
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
|
||||
@ -32,7 +33,7 @@ Culled Empty Block (label) @8
|
||||
Culled Empty Block (label) @9
|
||||
Culled Empty Block (label) @10
|
||||
Culled Empty Block (label) @11
|
||||
Culled Empty Block (label) @13
|
||||
Culled Empty Block (label) @12
|
||||
Culled Empty Block (label) @14
|
||||
Culled Empty Block (label) @15
|
||||
Culled Empty Block (label) @16
|
||||
@ -61,26 +62,27 @@ Culled Empty Block (label) @38
|
||||
Culled Empty Block (label) @39
|
||||
Culled Empty Block (label) @40
|
||||
Culled Empty Block (label) @41
|
||||
Culled Empty Block (label) @43
|
||||
Culled Empty Block (label) @46
|
||||
Culled Empty Block (label) alloc::@1
|
||||
Culled Empty Block (label) @42
|
||||
Culled Empty Block (label) @44
|
||||
Culled Empty Block (label) @47
|
||||
Culled Empty Block (label) alloc::@1
|
||||
Culled Empty Block (label) @48
|
||||
Culled Empty Block (label) @49
|
||||
Culled Empty Block (label) sum::@4
|
||||
Culled Empty Block (label) sum::@5
|
||||
Culled Empty Block (label) sum::@6
|
||||
Culled Empty Block (label) sum::@7
|
||||
Culled Empty Block (label) @49
|
||||
Culled Empty Block (label) @50
|
||||
Culled Empty Block (label) main::@5
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
to:@12
|
||||
@12: scope:[] from @begin
|
||||
(byte*) print_screen#0 ← ((byte*)) (number) $400
|
||||
to:@13
|
||||
@13: scope:[] from @begin
|
||||
(byte*) print_screen#0 ← (byte*)(number) $400
|
||||
(byte*) print_line_cursor#0 ← (byte*) print_screen#0
|
||||
(byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
|
||||
to:@42
|
||||
to:@43
|
||||
|
||||
(void()) print_ln()
|
||||
print_ln: scope:[print_ln] from end::@2
|
||||
@ -171,12 +173,12 @@ print_char::@return: scope:[print_char] from print_char
|
||||
(byte*) print_char_cursor#10 ← (byte*) print_char_cursor#27
|
||||
return
|
||||
to:@return
|
||||
@42: scope:[] from @12
|
||||
(byte*) print_line_cursor#26 ← phi( @12/(byte*) print_line_cursor#0 )
|
||||
(byte*) print_char_cursor#47 ← phi( @12/(byte*) print_char_cursor#0 )
|
||||
@43: scope:[] from @13
|
||||
(byte*) print_line_cursor#26 ← phi( @13/(byte*) print_line_cursor#0 )
|
||||
(byte*) print_char_cursor#47 ← phi( @13/(byte*) print_char_cursor#0 )
|
||||
(word) last_time#0 ← (word) 0
|
||||
(word) Ticks#0 ← (word) 0
|
||||
to:@44
|
||||
to:@45
|
||||
|
||||
(void()) start()
|
||||
start: scope:[start] from end main
|
||||
@ -241,22 +243,22 @@ end::@return: scope:[end] from end::@3
|
||||
(byte*) print_line_cursor#4 ← (byte*) print_line_cursor#12
|
||||
return
|
||||
to:@return
|
||||
@44: scope:[] from @42
|
||||
(byte*) print_line_cursor#24 ← phi( @42/(byte*) print_line_cursor#26 )
|
||||
(word) last_time#18 ← phi( @42/(word) last_time#0 )
|
||||
(word) Ticks#18 ← phi( @42/(word) Ticks#0 )
|
||||
(byte*) print_char_cursor#45 ← phi( @42/(byte*) print_char_cursor#47 )
|
||||
@45: scope:[] from @43
|
||||
(byte*) print_line_cursor#24 ← phi( @43/(byte*) print_line_cursor#26 )
|
||||
(word) last_time#18 ← phi( @43/(word) last_time#0 )
|
||||
(word) Ticks#18 ← phi( @43/(word) Ticks#0 )
|
||||
(byte*) print_char_cursor#45 ← phi( @43/(byte*) print_char_cursor#47 )
|
||||
(word) rand_seed#4 ← (word) 0
|
||||
to:@45
|
||||
@45: scope:[] from @44
|
||||
(byte*) print_line_cursor#22 ← phi( @44/(byte*) print_line_cursor#24 )
|
||||
(word) last_time#17 ← phi( @44/(word) last_time#18 )
|
||||
(word) Ticks#17 ← phi( @44/(word) Ticks#18 )
|
||||
(byte*) print_char_cursor#44 ← phi( @44/(byte*) print_char_cursor#45 )
|
||||
(word) rand_seed#23 ← phi( @44/(word) rand_seed#4 )
|
||||
to:@46
|
||||
@46: scope:[] from @45
|
||||
(byte*) print_line_cursor#22 ← phi( @45/(byte*) print_line_cursor#24 )
|
||||
(word) last_time#17 ← phi( @45/(word) last_time#18 )
|
||||
(word) Ticks#17 ← phi( @45/(word) Ticks#18 )
|
||||
(byte*) print_char_cursor#44 ← phi( @45/(byte*) print_char_cursor#45 )
|
||||
(word) rand_seed#23 ← phi( @45/(word) rand_seed#4 )
|
||||
(word) free_#0 ← (word) 0
|
||||
(struct node*) root#0 ← (struct node*) 0
|
||||
to:@50
|
||||
to:@51
|
||||
|
||||
(void()) init()
|
||||
init: scope:[init] from main::@1
|
||||
@ -353,14 +355,14 @@ sum::@return: scope:[sum] from sum::@3
|
||||
to:@return
|
||||
|
||||
(signed word()) main()
|
||||
main: scope:[main] from @50
|
||||
(byte*) print_line_cursor#33 ← phi( @50/(byte*) print_line_cursor#19 )
|
||||
(word) Ticks#26 ← phi( @50/(word) Ticks#14 )
|
||||
(word) last_time#26 ← phi( @50/(word) last_time#14 )
|
||||
(byte*) print_char_cursor#52 ← phi( @50/(byte*) print_char_cursor#41 )
|
||||
(struct node*) root#26 ← phi( @50/(struct node*) root#22 )
|
||||
(word) free_#28 ← phi( @50/(word) free_#24 )
|
||||
(word) rand_seed#18 ← phi( @50/(word) rand_seed#20 )
|
||||
main: scope:[main] from @51
|
||||
(byte*) print_line_cursor#33 ← phi( @51/(byte*) print_line_cursor#19 )
|
||||
(word) Ticks#26 ← phi( @51/(word) Ticks#14 )
|
||||
(word) last_time#26 ← phi( @51/(word) last_time#14 )
|
||||
(byte*) print_char_cursor#52 ← phi( @51/(byte*) print_char_cursor#41 )
|
||||
(struct node*) root#26 ← phi( @51/(struct node*) root#22 )
|
||||
(word) free_#28 ← phi( @51/(word) free_#24 )
|
||||
(word) rand_seed#18 ← phi( @51/(word) rand_seed#20 )
|
||||
(word) main::i#0 ← (word) 0
|
||||
(byte) main::c#0 ← (byte) 0
|
||||
call start
|
||||
@ -514,25 +516,25 @@ main::@return: scope:[main] from main::@11
|
||||
(byte*) print_line_cursor#6 ← (byte*) print_line_cursor#14
|
||||
return
|
||||
to:@return
|
||||
@50: scope:[] from @45
|
||||
(byte*) print_line_cursor#19 ← phi( @45/(byte*) print_line_cursor#22 )
|
||||
(word) last_time#14 ← phi( @45/(word) last_time#17 )
|
||||
(word) Ticks#14 ← phi( @45/(word) Ticks#17 )
|
||||
(byte*) print_char_cursor#41 ← phi( @45/(byte*) print_char_cursor#44 )
|
||||
(struct node*) root#22 ← phi( @45/(struct node*) root#0 )
|
||||
(word) free_#24 ← phi( @45/(word) free_#0 )
|
||||
(word) rand_seed#20 ← phi( @45/(word) rand_seed#23 )
|
||||
@51: scope:[] from @46
|
||||
(byte*) print_line_cursor#19 ← phi( @46/(byte*) print_line_cursor#22 )
|
||||
(word) last_time#14 ← phi( @46/(word) last_time#17 )
|
||||
(word) Ticks#14 ← phi( @46/(word) Ticks#17 )
|
||||
(byte*) print_char_cursor#41 ← phi( @46/(byte*) print_char_cursor#44 )
|
||||
(struct node*) root#22 ← phi( @46/(struct node*) root#0 )
|
||||
(word) free_#24 ← phi( @46/(word) free_#0 )
|
||||
(word) rand_seed#20 ← phi( @46/(word) rand_seed#23 )
|
||||
call main
|
||||
(signed word) main::return#2 ← (signed word) main::return#1
|
||||
to:@51
|
||||
@51: scope:[] from @50
|
||||
(byte*) print_line_cursor#15 ← phi( @50/(byte*) print_line_cursor#6 )
|
||||
(word) last_time#11 ← phi( @50/(word) last_time#4 )
|
||||
(word) Ticks#11 ← phi( @50/(word) Ticks#5 )
|
||||
(byte*) print_char_cursor#34 ← phi( @50/(byte*) print_char_cursor#16 )
|
||||
(struct node*) root#16 ← phi( @50/(struct node*) root#7 )
|
||||
(word) free_#19 ← phi( @50/(word) free_#9 )
|
||||
(word) rand_seed#15 ← phi( @50/(word) rand_seed#7 )
|
||||
to:@52
|
||||
@52: scope:[] from @51
|
||||
(byte*) print_line_cursor#15 ← phi( @51/(byte*) print_line_cursor#6 )
|
||||
(word) last_time#11 ← phi( @51/(word) last_time#4 )
|
||||
(word) Ticks#11 ← phi( @51/(word) Ticks#5 )
|
||||
(byte*) print_char_cursor#34 ← phi( @51/(byte*) print_char_cursor#16 )
|
||||
(struct node*) root#16 ← phi( @51/(struct node*) root#7 )
|
||||
(word) free_#19 ← phi( @51/(word) free_#9 )
|
||||
(word) rand_seed#15 ← phi( @51/(word) rand_seed#7 )
|
||||
(word) rand_seed#8 ← (word) rand_seed#15
|
||||
(word) free_#10 ← (word) free_#19
|
||||
(struct node*) root#8 ← (struct node*) root#16
|
||||
@ -541,15 +543,15 @@ main::@return: scope:[main] from main::@11
|
||||
(word) last_time#5 ← (word) last_time#11
|
||||
(byte*) print_line_cursor#7 ← (byte*) print_line_cursor#15
|
||||
to:@end
|
||||
@end: scope:[] from @51
|
||||
@end: scope:[] from @52
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @12
|
||||
(label) @42
|
||||
(label) @44
|
||||
(label) @13
|
||||
(label) @43
|
||||
(label) @45
|
||||
(label) @50
|
||||
(label) @46
|
||||
(label) @51
|
||||
(label) @52
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte) OFFSET_STRUCT_NODE_NEXT = (byte) 0
|
||||
@ -637,7 +639,7 @@ SYMBOL TABLE SSA
|
||||
(word) free_#7
|
||||
(word) free_#8
|
||||
(word) free_#9
|
||||
(const struct node*) heap = { fill( $fa0, 0) }
|
||||
(const struct node*) heap[(number) $fa0] = { fill( $fa0, 0) }
|
||||
(void()) init()
|
||||
(label) init::@return
|
||||
(word) last_time
|
||||
@ -793,7 +795,7 @@ SYMBOL TABLE SSA
|
||||
(byte*) print_char_cursor#7
|
||||
(byte*) print_char_cursor#8
|
||||
(byte*) print_char_cursor#9
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#0
|
||||
(byte*) print_line_cursor#1
|
||||
@ -949,7 +951,6 @@ Adding number conversion cast (unumber) 0 in (byte) main::c#1 ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in (word) main::i#1 ← (number) 0
|
||||
Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
|
||||
Inlining cast (word) rand_seed#0 ← (unumber)(number) $194a
|
||||
Inlining cast (word) free_#1 ← (unumber)(number) 0
|
||||
Inlining cast (struct node*) root#1 ← (struct node*)(number) 0
|
||||
@ -1224,10 +1225,10 @@ Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_l
|
||||
Added new block during phi lifting main::@12(between main::@10 and main::@1)
|
||||
Added new block during phi lifting main::@13(between main::@8 and main::@2)
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @12
|
||||
Adding NOP phi() at start of @45
|
||||
Adding NOP phi() at start of @50
|
||||
Adding NOP phi() at start of @13
|
||||
Adding NOP phi() at start of @46
|
||||
Adding NOP phi() at start of @51
|
||||
Adding NOP phi() at start of @52
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@6
|
||||
@ -1272,9 +1273,9 @@ Coalesced [93] sum::current#6 ← sum::current#2
|
||||
Coalesced [94] sum::s#6 ← sum::s#2
|
||||
Not coalescing [101] root#11 ← prepend::new#1
|
||||
Coalesced down to 11 phi equivalence classes
|
||||
Culled Empty Block (label) @12
|
||||
Culled Empty Block (label) @45
|
||||
Culled Empty Block (label) @51
|
||||
Culled Empty Block (label) @13
|
||||
Culled Empty Block (label) @46
|
||||
Culled Empty Block (label) @52
|
||||
Culled Empty Block (label) main::@6
|
||||
Culled Empty Block (label) main::@7
|
||||
Culled Empty Block (label) main::@11
|
||||
@ -1286,9 +1287,9 @@ Culled Empty Block (label) print_ln::@3
|
||||
Culled Empty Block (label) print_word::@2
|
||||
Culled Empty Block (label) print_byte::@2
|
||||
Culled Empty Block (label) sum::@3
|
||||
Renumbering block @42 to @1
|
||||
Renumbering block @44 to @2
|
||||
Renumbering block @50 to @3
|
||||
Renumbering block @43 to @1
|
||||
Renumbering block @45 to @2
|
||||
Renumbering block @51 to @3
|
||||
Renumbering block main::@8 to main::@5
|
||||
Renumbering block main::@9 to main::@6
|
||||
Renumbering block main::@10 to main::@7
|
||||
@ -1920,7 +1921,7 @@ print_ln: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($21) w)
|
||||
// print_word(word zp($21) w)
|
||||
print_word: {
|
||||
.label w = $21
|
||||
// [41] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2
|
||||
@ -1950,7 +1951,7 @@ print_word: {
|
||||
}
|
||||
// print_byte
|
||||
// Print a byte as HEX
|
||||
// print_byte(byte zeropage($b) b)
|
||||
// print_byte(byte zp($b) b)
|
||||
print_byte: {
|
||||
.label __0 = $23
|
||||
.label __2 = $24
|
||||
@ -1997,7 +1998,7 @@ print_byte: {
|
||||
}
|
||||
// print_char
|
||||
// Print a single char
|
||||
// print_char(byte zeropage($c) ch)
|
||||
// print_char(byte zp($c) ch)
|
||||
print_char: {
|
||||
.label ch = $c
|
||||
// [55] *((byte*) print_char_cursor#26) ← (byte) print_char::ch#3 -- _deref_pbuz1=vbuz2
|
||||
@ -2094,7 +2095,7 @@ sum: {
|
||||
jmp __b1
|
||||
}
|
||||
// prepend
|
||||
// prepend(word zeropage($17) x)
|
||||
// prepend(word zp($17) x)
|
||||
prepend: {
|
||||
.label new = $27
|
||||
.label x = $17
|
||||
@ -2573,7 +2574,7 @@ print_ln: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($e) w)
|
||||
// print_word(word zp($e) w)
|
||||
print_word: {
|
||||
.label w = $e
|
||||
// [41] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1
|
||||
@ -2733,7 +2734,7 @@ sum: {
|
||||
jmp __b1
|
||||
}
|
||||
// prepend
|
||||
// prepend(word zeropage(4) x)
|
||||
// prepend(word zp(4) x)
|
||||
prepend: {
|
||||
.label new = $10
|
||||
.label x = 4
|
||||
@ -2945,7 +2946,7 @@ FINAL SYMBOL TABLE
|
||||
(word) free_
|
||||
(word) free_#13 free_ zp[2]:8 8.583333333333332
|
||||
(word) free_#22 free_ zp[2]:8 20.999999999999996
|
||||
(const struct node*) heap = { fill( $fa0, 0) }
|
||||
(const struct node*) heap[(number) $fa0] = { fill( $fa0, 0) }
|
||||
(void()) init()
|
||||
(label) init::@return
|
||||
(word) last_time
|
||||
@ -2998,7 +2999,7 @@ FINAL SYMBOL TABLE
|
||||
(byte*) print_char_cursor#10 print_char_cursor zp[2]:6 0.9333333333333332
|
||||
(byte*) print_char_cursor#26 print_char_cursor zp[2]:6 9.5
|
||||
(byte*) print_char_cursor#49 print_char_cursor zp[2]:6 1.8333333333333333
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp[2]:4 16.5
|
||||
(byte*) print_line_cursor#8 print_line_cursor zp[2]:4 22.0
|
||||
@ -3263,7 +3264,7 @@ print_ln: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($e) w)
|
||||
// print_word(word zp($e) w)
|
||||
print_word: {
|
||||
.label w = $e
|
||||
// print_byte(>w)
|
||||
@ -3420,7 +3421,7 @@ sum: {
|
||||
jmp __b1
|
||||
}
|
||||
// prepend
|
||||
// prepend(word zeropage(4) x)
|
||||
// prepend(word zp(4) x)
|
||||
prepend: {
|
||||
.label new = $10
|
||||
.label x = 4
|
||||
|
@ -25,7 +25,7 @@
|
||||
(word) free_
|
||||
(word) free_#13 free_ zp[2]:8 8.583333333333332
|
||||
(word) free_#22 free_ zp[2]:8 20.999999999999996
|
||||
(const struct node*) heap = { fill( $fa0, 0) }
|
||||
(const struct node*) heap[(number) $fa0] = { fill( $fa0, 0) }
|
||||
(void()) init()
|
||||
(label) init::@return
|
||||
(word) last_time
|
||||
@ -78,7 +78,7 @@
|
||||
(byte*) print_char_cursor#10 print_char_cursor zp[2]:6 0.9333333333333332
|
||||
(byte*) print_char_cursor#26 print_char_cursor zp[2]:6 9.5
|
||||
(byte*) print_char_cursor#49 print_char_cursor zp[2]:6 1.8333333333333333
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp[2]:4 16.5
|
||||
(byte*) print_line_cursor#8 print_line_cursor zp[2]:4 22.0
|
||||
|
@ -4,12 +4,11 @@
|
||||
.label VIC_MEMORY = $d018
|
||||
// CIA#2 Port A: Serial bus, RS-232, VIC memory bank
|
||||
.label CIA2_PORT_A = $dd00
|
||||
.const SCREEN1 = $e000
|
||||
.const SCREEN2 = $e400
|
||||
.const CHARSET = $e800
|
||||
.const PAGE1 = $8a
|
||||
// ((SCREEN1 >> 6) & 0xF0) | ((CHARSET >> 10) & 0x0E);
|
||||
.const PAGE2 = $9a
|
||||
.label SCREEN1 = $e000
|
||||
.label SCREEN2 = $e400
|
||||
.label CHARSET = $e800
|
||||
.const PAGE1 = SCREEN1>>6&$f0|CHARSET>>$a&$e
|
||||
.const PAGE2 = SCREEN2>>6&$f0|CHARSET>>$a&$e
|
||||
.label print_line_cursor = 4
|
||||
.label print_char_cursor = 6
|
||||
.label last_time = $a
|
||||
@ -28,8 +27,12 @@ main: {
|
||||
.label block = $e
|
||||
.label v = $f
|
||||
.label count = 4
|
||||
jsr start
|
||||
lda #<$194a
|
||||
sta.z rand_seed
|
||||
lda #>$194a
|
||||
sta.z rand_seed+1
|
||||
jsr makechar
|
||||
jsr start
|
||||
lda CIA2_PORT_A
|
||||
sta.z block
|
||||
lda #$fc
|
||||
@ -77,7 +80,7 @@ main: {
|
||||
dec.z count
|
||||
jmp __b1
|
||||
}
|
||||
// doplasma(byte* zeropage(6) scrn)
|
||||
// doplasma(byte* zp(6) scrn)
|
||||
doplasma: {
|
||||
.const c2A = 0
|
||||
.const c2B = 0
|
||||
@ -211,7 +214,7 @@ print_ln: {
|
||||
rts
|
||||
}
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($13) w)
|
||||
// print_word(word zp($13) w)
|
||||
print_word: {
|
||||
.label w = $13
|
||||
lda.z w+1
|
||||
@ -370,7 +373,6 @@ rand: {
|
||||
rts
|
||||
}
|
||||
print_hextab: .text "0123456789abcdef"
|
||||
// ((SCREEN2 >> 6) & 0xF0) | ((CHARSET >> 10) & 0x0E);
|
||||
.align $100
|
||||
sinustable: .byte $80, $7d, $7a, $77, $74, $70, $6d, $6a, $67, $64, $61, $5e, $5b, $58, $55, $52, $4f, $4d, $4a, $47, $44, $41, $3f, $3c, $39, $37, $34, $32, $2f, $2d, $2b, $28, $26, $24, $22, $20, $1e, $1c, $1a, $18, $16, $15, $13, $11, $10, $f, $d, $c, $b, $a, 8, 7, 6, 6, 5, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 6, 7, 8, $a, $b, $c, $d, $f, $10, $11, $13, $15, $16, $18, $1a, $1c, $1e, $20, $22, $24, $26, $28, $2b, $2d, $2f, $32, $34, $37, $39, $3c, $3f, $41, $44, $47, $4a, $4d, $4f, $52, $55, $58, $5b, $5e, $61, $64, $67, $6a, $6d, $70, $74, $77, $7a, $7d, $80, $83, $86, $89, $8c, $90, $93, $96, $99, $9c, $9f, $a2, $a5, $a8, $ab, $ae, $b1, $b3, $b6, $b9, $bc, $bf, $c1, $c4, $c7, $c9, $cc, $ce, $d1, $d3, $d5, $d8, $da, $dc, $de, $e0, $e2, $e4, $e6, $e8, $ea, $eb, $ed, $ef, $f0, $f1, $f3, $f4, $f5, $f6, $f8, $f9, $fa, $fa, $fb, $fc, $fd, $fd, $fe, $fe, $fe, $ff, $ff, $ff, $ff, $ff, $ff, $ff, $fe, $fe, $fe, $fd, $fd, $fc, $fb, $fa, $fa, $f9, $f8, $f6, $f5, $f4, $f3, $f1, $f0, $ef, $ed, $eb, $ea, $e8, $e6, $e4, $e2, $e0, $de, $dc, $da, $d8, $d5, $d3, $d1, $ce, $cc, $c9, $c7, $c4, $c1, $bf, $bc, $b9, $b6, $b3, $b1, $ae, $ab, $a8, $a5, $a2, $9f, $9c, $99, $96, $93, $90, $8c, $89, $86, $83
|
||||
xbuf: .fill $28, 0
|
||||
|
@ -5,7 +5,7 @@
|
||||
[1] (word) last_time#0 ← (word) 0
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[2] (word) rand_seed#22 ← (word) 0
|
||||
[2] (word) rand_seed#23 ← (word) 0
|
||||
to:@3
|
||||
@3: scope:[] from @2
|
||||
[3] phi()
|
||||
@ -16,12 +16,12 @@
|
||||
|
||||
(signed word()) main()
|
||||
main: scope:[main] from @3
|
||||
[6] phi()
|
||||
[7] call start
|
||||
[6] (word) rand_seed#21 ← (word) $194a
|
||||
[7] call makechar
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main
|
||||
[8] phi()
|
||||
[9] call makechar
|
||||
[9] call start
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@4
|
||||
[10] (byte) main::block#1 ← *((const byte*) CIA2_PORT_A)
|
||||
@ -56,7 +56,7 @@ main::@7: scope:[main] from main::@6
|
||||
|
||||
(void()) doplasma((byte*) doplasma::scrn)
|
||||
doplasma: scope:[doplasma] from main::@2 main::@6
|
||||
[26] (byte*) doplasma::scrn#13 ← phi( main::@6/(byte*)(const word) SCREEN2 main::@2/(byte*)(const word) SCREEN1 )
|
||||
[26] (byte*) doplasma::scrn#13 ← phi( main::@6/(const byte*) SCREEN2 main::@2/(const byte*) SCREEN1 )
|
||||
to:doplasma::@1
|
||||
doplasma::@1: scope:[doplasma] from doplasma doplasma::@2
|
||||
[27] (byte) doplasma::c1b#3 ← phi( doplasma/(byte) 0 doplasma::@2/(byte) doplasma::c1b#2 )
|
||||
@ -181,7 +181,7 @@ print_char::@return: scope:[print_char] from print_char
|
||||
to:@return
|
||||
|
||||
(void()) start()
|
||||
start: scope:[start] from end main
|
||||
start: scope:[start] from end main::@4
|
||||
asm { jsr$FFDE staLAST_TIME stxLAST_TIME+1 }
|
||||
[84] (word) rand_seed#0 ← (word) $194a
|
||||
to:start::@return
|
||||
@ -190,7 +190,7 @@ start::@return: scope:[start] from start
|
||||
to:@return
|
||||
|
||||
(void()) makechar()
|
||||
makechar: scope:[makechar] from main::@4
|
||||
makechar: scope:[makechar] from main
|
||||
[86] phi()
|
||||
to:makechar::@1
|
||||
makechar::@1: scope:[makechar] from makechar makechar::@4
|
||||
@ -219,7 +219,7 @@ makechar::@5: scope:[makechar] from makechar::@3 makechar::@8
|
||||
makechar::@7: scope:[makechar] from makechar::@5
|
||||
[97] (word~) makechar::$8 ← (word) makechar::c#3 << (byte) 3
|
||||
[98] (word~) makechar::$9 ← (word~) makechar::$8 + (byte) makechar::i#3
|
||||
[99] (byte*~) makechar::$10 ← (byte*)(const word) CHARSET + (word~) makechar::$9
|
||||
[99] (byte*~) makechar::$10 ← (const byte*) CHARSET + (word~) makechar::$9
|
||||
[100] *((byte*~) makechar::$10) ← (byte) makechar::b#3
|
||||
[101] (byte) makechar::i#2 ← ++ (byte) makechar::i#3
|
||||
to:makechar::@3
|
||||
@ -244,7 +244,7 @@ makechar::@8: scope:[makechar] from makechar::@10 makechar::@9
|
||||
(byte()) rand()
|
||||
rand: scope:[rand] from makechar::@6
|
||||
asm { ldx#8 ldaRAND_SEED+0 __rand_loop: asl rolRAND_SEED+1 bcc__no_eor eor#$2D __no_eor: dex bne__rand_loop staRAND_SEED+0 }
|
||||
[112] (byte) rand::return#0 ← (byte)(word) rand_seed#0
|
||||
[112] (byte) rand::return#0 ← (byte)(word) rand_seed#21
|
||||
to:rand::@return
|
||||
rand::@return: scope:[rand] from rand
|
||||
[113] return
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,21 +3,21 @@
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const word) CHARSET = (number) $e800
|
||||
(const byte*) CHARSET = (byte*) 59392
|
||||
(const byte*) CIA2_PORT_A = (byte*) 56576
|
||||
(const byte) PAGE1 = (number) $8a
|
||||
(const byte) PAGE2 = (number) $9a
|
||||
(const byte) PAGE1 = (word)(const byte*) SCREEN1>>(byte) 6&(byte) $f0|(word)(const byte*) CHARSET>>(byte) $a&(byte) $e
|
||||
(const byte) PAGE2 = (word)(const byte*) SCREEN2>>(byte) 6&(byte) $f0|(word)(const byte*) CHARSET>>(byte) $a&(byte) $e
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const word) SCREEN1 = (number) $e000
|
||||
(const word) SCREEN2 = (number) $e400
|
||||
(const byte*) SCREEN1 = (byte*) 57344
|
||||
(const byte*) SCREEN2 = (byte*) 58368
|
||||
(word) Ticks
|
||||
(word) Ticks#1 Ticks zp[2]:16 2.0
|
||||
(word) Ticks#2 Ticks_1 zp[2]:19 4.0
|
||||
(const byte*) VIC_MEMORY = (byte*) 53272
|
||||
(const byte*) bittab = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
|
||||
(const byte*) bittab[] = { (byte) 1, (byte) 2, (byte) 4, (byte) 8, (byte) $10, (byte) $20, (byte) $40, (byte) $80 }
|
||||
(void()) doplasma((byte*) doplasma::scrn)
|
||||
(byte~) doplasma::$1 reg byte a 202.0
|
||||
(byte~) doplasma::$3 reg byte a 202.0
|
||||
@ -144,7 +144,7 @@
|
||||
(byte*) print_char_cursor#10 print_char_cursor zp[2]:6 1.0
|
||||
(byte*) print_char_cursor#25 print_char_cursor zp[2]:6 4.0
|
||||
(byte*) print_char_cursor#35 print_char_cursor zp[2]:6 1.3333333333333333
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp[2]:4 16.5
|
||||
(byte*) print_line_cursor#8 print_line_cursor zp[2]:4 22.0
|
||||
@ -164,14 +164,15 @@
|
||||
(byte) rand::return#0 reg byte a 334.33333333333337
|
||||
(byte) rand::return#2 reg byte a 2002.0
|
||||
(word) rand_seed
|
||||
(word) rand_seed#0 rand_seed zp[2]:12 0.06451612903225806
|
||||
(word) rand_seed#22 rand_seed zp[2]:12 20.0
|
||||
(const byte*) sinustable = { (byte) $80, (byte) $7d, (byte) $7a, (byte) $77, (byte) $74, (byte) $70, (byte) $6d, (byte) $6a, (byte) $67, (byte) $64, (byte) $61, (byte) $5e, (byte) $5b, (byte) $58, (byte) $55, (byte) $52, (byte) $4f, (byte) $4d, (byte) $4a, (byte) $47, (byte) $44, (byte) $41, (byte) $3f, (byte) $3c, (byte) $39, (byte) $37, (byte) $34, (byte) $32, (byte) $2f, (byte) $2d, (byte) $2b, (byte) $28, (byte) $26, (byte) $24, (byte) $22, (byte) $20, (byte) $1e, (byte) $1c, (byte) $1a, (byte) $18, (byte) $16, (byte) $15, (byte) $13, (byte) $11, (byte) $10, (byte) $f, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 8, (byte) 7, (byte) 6, (byte) 6, (byte) 5, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 6, (byte) 7, (byte) 8, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $f, (byte) $10, (byte) $11, (byte) $13, (byte) $15, (byte) $16, (byte) $18, (byte) $1a, (byte) $1c, (byte) $1e, (byte) $20, (byte) $22, (byte) $24, (byte) $26, (byte) $28, (byte) $2b, (byte) $2d, (byte) $2f, (byte) $32, (byte) $34, (byte) $37, (byte) $39, (byte) $3c, (byte) $3f, (byte) $41, (byte) $44, (byte) $47, (byte) $4a, (byte) $4d, (byte) $4f, (byte) $52, (byte) $55, (byte) $58, (byte) $5b, (byte) $5e, (byte) $61, (byte) $64, (byte) $67, (byte) $6a, (byte) $6d, (byte) $70, (byte) $74, (byte) $77, (byte) $7a, (byte) $7d, (byte) $80, (byte) $83, (byte) $86, (byte) $89, (byte) $8c, (byte) $90, (byte) $93, (byte) $96, (byte) $99, (byte) $9c, (byte) $9f, (byte) $a2, (byte) $a5, (byte) $a8, (byte) $ab, (byte) $ae, (byte) $b1, (byte) $b3, (byte) $b6, (byte) $b9, (byte) $bc, (byte) $bf, (byte) $c1, (byte) $c4, (byte) $c7, (byte) $c9, (byte) $cc, (byte) $ce, (byte) $d1, (byte) $d3, (byte) $d5, (byte) $d8, (byte) $da, (byte) $dc, (byte) $de, (byte) $e0, (byte) $e2, (byte) $e4, (byte) $e6, (byte) $e8, (byte) $ea, (byte) $eb, (byte) $ed, (byte) $ef, (byte) $f0, (byte) $f1, (byte) $f3, (byte) $f4, (byte) $f5, (byte) $f6, (byte) $f8, (byte) $f9, (byte) $fa, (byte) $fa, (byte) $fb, (byte) $fc, (byte) $fd, (byte) $fd, (byte) $fe, (byte) $fe, (byte) $fe, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $fe, (byte) $fe, (byte) $fe, (byte) $fd, (byte) $fd, (byte) $fc, (byte) $fb, (byte) $fa, (byte) $fa, (byte) $f9, (byte) $f8, (byte) $f6, (byte) $f5, (byte) $f4, (byte) $f3, (byte) $f1, (byte) $f0, (byte) $ef, (byte) $ed, (byte) $eb, (byte) $ea, (byte) $e8, (byte) $e6, (byte) $e4, (byte) $e2, (byte) $e0, (byte) $de, (byte) $dc, (byte) $da, (byte) $d8, (byte) $d5, (byte) $d3, (byte) $d1, (byte) $ce, (byte) $cc, (byte) $c9, (byte) $c7, (byte) $c4, (byte) $c1, (byte) $bf, (byte) $bc, (byte) $b9, (byte) $b6, (byte) $b3, (byte) $b1, (byte) $ae, (byte) $ab, (byte) $a8, (byte) $a5, (byte) $a2, (byte) $9f, (byte) $9c, (byte) $99, (byte) $96, (byte) $93, (byte) $90, (byte) $8c, (byte) $89, (byte) $86, (byte) $83 }
|
||||
(word) rand_seed#0 rand_seed zp[2]:12 20.0
|
||||
(word) rand_seed#21 rand_seed zp[2]:12 0.07142857142857142
|
||||
(word) rand_seed#23 rand_seed zp[2]:12 20.0
|
||||
(const byte*) sinustable[(number) $100] = { (byte) $80, (byte) $7d, (byte) $7a, (byte) $77, (byte) $74, (byte) $70, (byte) $6d, (byte) $6a, (byte) $67, (byte) $64, (byte) $61, (byte) $5e, (byte) $5b, (byte) $58, (byte) $55, (byte) $52, (byte) $4f, (byte) $4d, (byte) $4a, (byte) $47, (byte) $44, (byte) $41, (byte) $3f, (byte) $3c, (byte) $39, (byte) $37, (byte) $34, (byte) $32, (byte) $2f, (byte) $2d, (byte) $2b, (byte) $28, (byte) $26, (byte) $24, (byte) $22, (byte) $20, (byte) $1e, (byte) $1c, (byte) $1a, (byte) $18, (byte) $16, (byte) $15, (byte) $13, (byte) $11, (byte) $10, (byte) $f, (byte) $d, (byte) $c, (byte) $b, (byte) $a, (byte) 8, (byte) 7, (byte) 6, (byte) 6, (byte) 5, (byte) 4, (byte) 3, (byte) 3, (byte) 2, (byte) 2, (byte) 2, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 2, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 6, (byte) 7, (byte) 8, (byte) $a, (byte) $b, (byte) $c, (byte) $d, (byte) $f, (byte) $10, (byte) $11, (byte) $13, (byte) $15, (byte) $16, (byte) $18, (byte) $1a, (byte) $1c, (byte) $1e, (byte) $20, (byte) $22, (byte) $24, (byte) $26, (byte) $28, (byte) $2b, (byte) $2d, (byte) $2f, (byte) $32, (byte) $34, (byte) $37, (byte) $39, (byte) $3c, (byte) $3f, (byte) $41, (byte) $44, (byte) $47, (byte) $4a, (byte) $4d, (byte) $4f, (byte) $52, (byte) $55, (byte) $58, (byte) $5b, (byte) $5e, (byte) $61, (byte) $64, (byte) $67, (byte) $6a, (byte) $6d, (byte) $70, (byte) $74, (byte) $77, (byte) $7a, (byte) $7d, (byte) $80, (byte) $83, (byte) $86, (byte) $89, (byte) $8c, (byte) $90, (byte) $93, (byte) $96, (byte) $99, (byte) $9c, (byte) $9f, (byte) $a2, (byte) $a5, (byte) $a8, (byte) $ab, (byte) $ae, (byte) $b1, (byte) $b3, (byte) $b6, (byte) $b9, (byte) $bc, (byte) $bf, (byte) $c1, (byte) $c4, (byte) $c7, (byte) $c9, (byte) $cc, (byte) $ce, (byte) $d1, (byte) $d3, (byte) $d5, (byte) $d8, (byte) $da, (byte) $dc, (byte) $de, (byte) $e0, (byte) $e2, (byte) $e4, (byte) $e6, (byte) $e8, (byte) $ea, (byte) $eb, (byte) $ed, (byte) $ef, (byte) $f0, (byte) $f1, (byte) $f3, (byte) $f4, (byte) $f5, (byte) $f6, (byte) $f8, (byte) $f9, (byte) $fa, (byte) $fa, (byte) $fb, (byte) $fc, (byte) $fd, (byte) $fd, (byte) $fe, (byte) $fe, (byte) $fe, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $ff, (byte) $fe, (byte) $fe, (byte) $fe, (byte) $fd, (byte) $fd, (byte) $fc, (byte) $fb, (byte) $fa, (byte) $fa, (byte) $f9, (byte) $f8, (byte) $f6, (byte) $f5, (byte) $f4, (byte) $f3, (byte) $f1, (byte) $f0, (byte) $ef, (byte) $ed, (byte) $eb, (byte) $ea, (byte) $e8, (byte) $e6, (byte) $e4, (byte) $e2, (byte) $e0, (byte) $de, (byte) $dc, (byte) $da, (byte) $d8, (byte) $d5, (byte) $d3, (byte) $d1, (byte) $ce, (byte) $cc, (byte) $c9, (byte) $c7, (byte) $c4, (byte) $c1, (byte) $bf, (byte) $bc, (byte) $b9, (byte) $b6, (byte) $b3, (byte) $b1, (byte) $ae, (byte) $ab, (byte) $a8, (byte) $a5, (byte) $a2, (byte) $9f, (byte) $9c, (byte) $99, (byte) $96, (byte) $93, (byte) $90, (byte) $8c, (byte) $89, (byte) $86, (byte) $83 }
|
||||
(void()) start()
|
||||
(label) start::@return
|
||||
(const word*) start::LAST_TIME = &(word) last_time
|
||||
(const byte*) xbuf = { fill( $28, 0) }
|
||||
(const byte*) ybuf = { fill( $19, 0) }
|
||||
(const byte*) xbuf[(number) $28] = { fill( $28, 0) }
|
||||
(const byte*) ybuf[(number) $19] = { fill( $19, 0) }
|
||||
|
||||
zp[1]:2 [ doplasma::c2a#3 doplasma::c2a#2 ]
|
||||
zp[1]:3 [ doplasma::c2b#3 doplasma::c2b#2 ]
|
||||
@ -185,7 +186,7 @@ zp[1]:8 [ makechar::i#3 makechar::i#2 doplasma::ii#3 doplasma::ii#2 ]
|
||||
reg byte y [ makechar::ii#3 makechar::ii#2 ]
|
||||
zp[1]:9 [ makechar::b#3 makechar::b#7 makechar::b#2 doplasma::c1a#3 doplasma::c1a#2 ]
|
||||
zp[2]:10 [ last_time#0 last_time#1 last_time#2 ]
|
||||
zp[2]:12 [ rand_seed#0 rand_seed#22 ]
|
||||
zp[2]:12 [ rand_seed#0 rand_seed#21 rand_seed#23 ]
|
||||
zp[1]:14 [ main::block#1 ]
|
||||
reg byte a [ main::tmp#1 ]
|
||||
zp[1]:15 [ main::v#1 ]
|
||||
|
@ -76,7 +76,7 @@ print_ln: {
|
||||
rts
|
||||
}
|
||||
// Print a word as DECIMAL
|
||||
// print_word_decimal(word zeropage(5) w)
|
||||
// print_word_decimal(word zp(5) w)
|
||||
print_word_decimal: {
|
||||
.label w = 5
|
||||
jsr utoa
|
||||
@ -84,7 +84,7 @@ print_word_decimal: {
|
||||
rts
|
||||
}
|
||||
// Print a zero-terminated string
|
||||
// print_str(byte* zeropage(5) str)
|
||||
// print_str(byte* zp(5) str)
|
||||
print_str: {
|
||||
.label str = 5
|
||||
lda #<decimal_digits
|
||||
@ -116,7 +116,7 @@ print_str: {
|
||||
// - value : The number to be converted to RADIX
|
||||
// - buffer : receives the string representing the number and zero-termination.
|
||||
// - radix : The radix to convert the number to (from the enum RADIX)
|
||||
// utoa(word zeropage(5) value, byte* zeropage(7) buffer)
|
||||
// utoa(word zp(5) value, byte* zp(7) buffer)
|
||||
utoa: {
|
||||
.const max_digits = 5
|
||||
.label digit_value = $11
|
||||
@ -184,7 +184,7 @@ utoa: {
|
||||
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
|
||||
// (For decimal the subs used are 10000, 1000, 100, 10, 1)
|
||||
// returns : the value reduced by sub * digit so that it is less than sub.
|
||||
// utoa_append(byte* zeropage(7) buffer, word zeropage(5) value, word zeropage($11) sub)
|
||||
// utoa_append(byte* zp(7) buffer, word zp(5) value, word zp($11) sub)
|
||||
utoa_append: {
|
||||
.label buffer = 7
|
||||
.label value = 5
|
||||
@ -277,7 +277,7 @@ end: {
|
||||
rts
|
||||
}
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($11) w)
|
||||
// print_word(word zp($11) w)
|
||||
print_word: {
|
||||
.label w = $11
|
||||
lda.z w+1
|
||||
|
@ -7,6 +7,7 @@ Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items -
|
||||
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
|
||||
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strlen::str)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
|
||||
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
|
||||
@ -23,6 +24,7 @@ Culled Empty Block (label) @5
|
||||
Culled Empty Block (label) @6
|
||||
Culled Empty Block (label) @7
|
||||
Culled Empty Block (label) @8
|
||||
Culled Empty Block (label) @9
|
||||
Culled Empty Block (label) utoa::@13
|
||||
Culled Empty Block (label) utoa::@5
|
||||
Culled Empty Block (label) utoa::@14
|
||||
@ -34,20 +36,19 @@ Culled Empty Block (label) utoa::@17
|
||||
Culled Empty Block (label) utoa::@22
|
||||
Culled Empty Block (label) utoa::@23
|
||||
Culled Empty Block (label) utoa::@25
|
||||
Culled Empty Block (label) @9
|
||||
Culled Empty Block (label) @10
|
||||
Culled Empty Block (label) utoa_append::@4
|
||||
Culled Empty Block (label) utoa_append::@5
|
||||
Culled Empty Block (label) utoa_append::@6
|
||||
Culled Empty Block (label) utoa_append::@7
|
||||
Culled Empty Block (label) @10
|
||||
Culled Empty Block (label) @11
|
||||
Culled Empty Block (label) @13
|
||||
Culled Empty Block (label) @12
|
||||
Culled Empty Block (label) @14
|
||||
Culled Empty Block (label) @15
|
||||
Culled Empty Block (label) print_str::@4
|
||||
Culled Empty Block (label) print_str::@3
|
||||
Culled Empty Block (label) print_str::@5
|
||||
Culled Empty Block (label) print_str::@6
|
||||
Culled Empty Block (label) @15
|
||||
Culled Empty Block (label) @16
|
||||
Culled Empty Block (label) @17
|
||||
Culled Empty Block (label) @18
|
||||
@ -74,13 +75,14 @@ Culled Empty Block (label) @38
|
||||
Culled Empty Block (label) @39
|
||||
Culled Empty Block (label) @40
|
||||
Culled Empty Block (label) @41
|
||||
Culled Empty Block (label) @43
|
||||
Culled Empty Block (label) @45
|
||||
Culled Empty Block (label) @42
|
||||
Culled Empty Block (label) @44
|
||||
Culled Empty Block (label) @46
|
||||
Culled Empty Block (label) sum::@7
|
||||
Culled Empty Block (label) sum::@8
|
||||
Culled Empty Block (label) sum::@6
|
||||
Culled Empty Block (label) sum::@9
|
||||
Culled Empty Block (label) @46
|
||||
Culled Empty Block (label) @47
|
||||
Culled Empty Block (label) main::@4
|
||||
Culled Empty Block (label) main::@5
|
||||
Culled Empty Block (label) main::@6
|
||||
@ -88,7 +90,7 @@ Culled Empty Block (label) main::@7
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
to:@12
|
||||
to:@13
|
||||
|
||||
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
|
||||
utoa: scope:[utoa] from print_word_decimal
|
||||
@ -163,8 +165,8 @@ utoa::@8: scope:[utoa] from utoa::@1 utoa::@2 utoa::@3 utoa::@4
|
||||
(word) utoa::value#7 ← phi( utoa::@1/(word) utoa::value#8 utoa::@2/(word) utoa::value#9 utoa::@3/(word) utoa::value#10 utoa::@4/(word) utoa::value#11 )
|
||||
(word*) utoa::digit_values#8 ← phi( utoa::@1/(word*) utoa::digit_values#1 utoa::@2/(word*) utoa::digit_values#2 utoa::@3/(word*) utoa::digit_values#3 utoa::@4/(word*) utoa::digit_values#4 )
|
||||
(byte) utoa::max_digits#7 ← phi( utoa::@1/(byte) utoa::max_digits#1 utoa::@2/(byte) utoa::max_digits#2 utoa::@3/(byte) utoa::max_digits#3 utoa::@4/(byte) utoa::max_digits#4 )
|
||||
(byte) utoa::started#0 ← (number) 0
|
||||
(byte) utoa::digit#0 ← (number) 0
|
||||
(byte) utoa::started#0 ← (byte) 0
|
||||
(byte) utoa::digit#0 ← (byte) 0
|
||||
to:utoa::@18
|
||||
utoa::@18: scope:[utoa] from utoa::@21 utoa::@8
|
||||
(byte*) utoa::buffer#11 ← phi( utoa::@21/(byte*) utoa::buffer#14 utoa::@8/(byte*) utoa::buffer#15 )
|
||||
@ -238,7 +240,7 @@ utoa_append: scope:[utoa_append] from utoa::@24
|
||||
(byte*) utoa_append::buffer#3 ← phi( utoa::@24/(byte*) utoa_append::buffer#0 )
|
||||
(word) utoa_append::sub#3 ← phi( utoa::@24/(word) utoa_append::sub#0 )
|
||||
(word) utoa_append::value#5 ← phi( utoa::@24/(word) utoa_append::value#0 )
|
||||
(byte) utoa_append::digit#0 ← (number) 0
|
||||
(byte) utoa_append::digit#0 ← (byte) 0
|
||||
to:utoa_append::@1
|
||||
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
|
||||
(byte*) utoa_append::buffer#2 ← phi( utoa_append/(byte*) utoa_append::buffer#3 utoa_append::@2/(byte*) utoa_append::buffer#4 )
|
||||
@ -268,11 +270,11 @@ utoa_append::@return: scope:[utoa_append] from utoa_append::@3
|
||||
(word) utoa_append::return#2 ← (word) utoa_append::return#4
|
||||
return
|
||||
to:@return
|
||||
@12: scope:[] from @begin
|
||||
(byte*) print_screen#0 ← ((byte*)) (number) $400
|
||||
@13: scope:[] from @begin
|
||||
(byte*) print_screen#0 ← (byte*)(number) $400
|
||||
(byte*) print_line_cursor#0 ← (byte*) print_screen#0
|
||||
(byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
|
||||
to:@42
|
||||
to:@43
|
||||
|
||||
(void()) print_str((byte*) print_str::str)
|
||||
print_str: scope:[print_str] from print_word_decimal::@1
|
||||
@ -411,12 +413,12 @@ print_char::@return: scope:[print_char] from print_char
|
||||
(byte*) print_char_cursor#14 ← (byte*) print_char_cursor#36
|
||||
return
|
||||
to:@return
|
||||
@42: scope:[] from @12
|
||||
(byte*) print_line_cursor#28 ← phi( @12/(byte*) print_line_cursor#0 )
|
||||
(byte*) print_char_cursor#60 ← phi( @12/(byte*) print_char_cursor#0 )
|
||||
@43: scope:[] from @13
|
||||
(byte*) print_line_cursor#28 ← phi( @13/(byte*) print_line_cursor#0 )
|
||||
(byte*) print_char_cursor#60 ← phi( @13/(byte*) print_char_cursor#0 )
|
||||
(word) last_time#0 ← (word) 0
|
||||
(word) Ticks#0 ← (word) 0
|
||||
to:@44
|
||||
to:@45
|
||||
|
||||
(void()) start()
|
||||
start: scope:[start] from end main
|
||||
@ -481,13 +483,13 @@ end::@return: scope:[end] from end::@3
|
||||
(byte*) print_line_cursor#4 ← (byte*) print_line_cursor#13
|
||||
return
|
||||
to:@return
|
||||
@44: scope:[] from @42
|
||||
(word) last_time#17 ← phi( @42/(word) last_time#0 )
|
||||
(word) Ticks#17 ← phi( @42/(word) Ticks#0 )
|
||||
(byte*) print_line_cursor#26 ← phi( @42/(byte*) print_line_cursor#28 )
|
||||
(byte*) print_char_cursor#59 ← phi( @42/(byte*) print_char_cursor#60 )
|
||||
@45: scope:[] from @43
|
||||
(word) last_time#17 ← phi( @43/(word) last_time#0 )
|
||||
(word) Ticks#17 ← phi( @43/(word) Ticks#0 )
|
||||
(byte*) print_line_cursor#26 ← phi( @43/(byte*) print_line_cursor#28 )
|
||||
(byte*) print_char_cursor#59 ← phi( @43/(byte*) print_char_cursor#60 )
|
||||
(word) rand_seed#4 ← (word) 0
|
||||
to:@47
|
||||
to:@48
|
||||
|
||||
(word()) sum()
|
||||
sum: scope:[sum] from main::@2
|
||||
@ -542,12 +544,12 @@ sum::@return: scope:[sum] from sum::@3
|
||||
to:@return
|
||||
|
||||
(signed word()) main()
|
||||
main: scope:[main] from @47
|
||||
(byte*) print_line_cursor#31 ← phi( @47/(byte*) print_line_cursor#22 )
|
||||
(byte*) print_char_cursor#62 ← phi( @47/(byte*) print_char_cursor#53 )
|
||||
(word) Ticks#20 ← phi( @47/(word) Ticks#14 )
|
||||
(word) last_time#20 ← phi( @47/(word) last_time#14 )
|
||||
(word) rand_seed#18 ← phi( @47/(word) rand_seed#20 )
|
||||
main: scope:[main] from @48
|
||||
(byte*) print_line_cursor#31 ← phi( @48/(byte*) print_line_cursor#22 )
|
||||
(byte*) print_char_cursor#62 ← phi( @48/(byte*) print_char_cursor#53 )
|
||||
(word) Ticks#20 ← phi( @48/(word) Ticks#14 )
|
||||
(word) last_time#20 ← phi( @48/(word) last_time#14 )
|
||||
(word) rand_seed#18 ← phi( @48/(word) rand_seed#20 )
|
||||
(word) main::i#0 ← (word) 0
|
||||
call start
|
||||
to:main::@8
|
||||
@ -649,50 +651,50 @@ main::@return: scope:[main] from main::@12
|
||||
(word) last_time#4 ← (word) last_time#10
|
||||
return
|
||||
to:@return
|
||||
@47: scope:[] from @44
|
||||
(word) last_time#14 ← phi( @44/(word) last_time#17 )
|
||||
(word) Ticks#14 ← phi( @44/(word) Ticks#17 )
|
||||
(byte*) print_line_cursor#22 ← phi( @44/(byte*) print_line_cursor#26 )
|
||||
(byte*) print_char_cursor#53 ← phi( @44/(byte*) print_char_cursor#59 )
|
||||
(word) rand_seed#20 ← phi( @44/(word) rand_seed#4 )
|
||||
@48: scope:[] from @45
|
||||
(word) last_time#14 ← phi( @45/(word) last_time#17 )
|
||||
(word) Ticks#14 ← phi( @45/(word) Ticks#17 )
|
||||
(byte*) print_line_cursor#22 ← phi( @45/(byte*) print_line_cursor#26 )
|
||||
(byte*) print_char_cursor#53 ← phi( @45/(byte*) print_char_cursor#59 )
|
||||
(word) rand_seed#20 ← phi( @45/(word) rand_seed#4 )
|
||||
call main
|
||||
(signed word) main::return#2 ← (signed word) main::return#1
|
||||
to:@48
|
||||
@48: scope:[] from @47
|
||||
(word) last_time#11 ← phi( @47/(word) last_time#4 )
|
||||
(word) Ticks#11 ← phi( @47/(word) Ticks#5 )
|
||||
(byte*) print_line_cursor#17 ← phi( @47/(byte*) print_line_cursor#7 )
|
||||
(byte*) print_char_cursor#44 ← phi( @47/(byte*) print_char_cursor#21 )
|
||||
(word) rand_seed#15 ← phi( @47/(word) rand_seed#7 )
|
||||
to:@49
|
||||
@49: scope:[] from @48
|
||||
(word) last_time#11 ← phi( @48/(word) last_time#4 )
|
||||
(word) Ticks#11 ← phi( @48/(word) Ticks#5 )
|
||||
(byte*) print_line_cursor#17 ← phi( @48/(byte*) print_line_cursor#7 )
|
||||
(byte*) print_char_cursor#44 ← phi( @48/(byte*) print_char_cursor#21 )
|
||||
(word) rand_seed#15 ← phi( @48/(word) rand_seed#7 )
|
||||
(word) rand_seed#8 ← (word) rand_seed#15
|
||||
(byte*) print_char_cursor#22 ← (byte*) print_char_cursor#44
|
||||
(byte*) print_line_cursor#8 ← (byte*) print_line_cursor#17
|
||||
(word) Ticks#6 ← (word) Ticks#11
|
||||
(word) last_time#5 ← (word) last_time#11
|
||||
to:@end
|
||||
@end: scope:[] from @48
|
||||
@end: scope:[] from @49
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @12
|
||||
(label) @42
|
||||
(label) @44
|
||||
(label) @47
|
||||
(label) @13
|
||||
(label) @43
|
||||
(label) @45
|
||||
(label) @48
|
||||
(label) @49
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte) BINARY = (number) 2
|
||||
(const byte) DECIMAL = (number) $a
|
||||
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
||||
(const byte*) DIGITS[] = (string) "0123456789abcdef"z
|
||||
(const byte) HEXADECIMAL = (number) $10
|
||||
(const byte) OCTAL = (number) 8
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const word*) RADIX_BINARY_VALUES = { (word)(number) $8000, (word)(number) $4000, (word)(number) $2000, (word)(number) $1000, (word)(number) $800, (word)(number) $400, (word)(number) $200, (word)(number) $100, (word)(number) $80, (word)(number) $40, (word)(number) $20, (word)(number) $10, (word)(number) 8, (word)(number) 4, (word)(number) 2 }
|
||||
(const word*) RADIX_DECIMAL_VALUES = { (word)(number) $2710, (word)(number) $3e8, (word)(number) $64, (word)(number) $a }
|
||||
(const word*) RADIX_HEXADECIMAL_VALUES = { (word)(number) $1000, (word)(number) $100, (word)(number) $10 }
|
||||
(const word*) RADIX_OCTAL_VALUES = { (word)(number) $8000, (word)(number) $1000, (word)(number) $200, (word)(number) $40, (word)(number) 8 }
|
||||
(const word*) RADIX_BINARY_VALUES[] = { (word) $8000, (word) $4000, (word) $2000, (word) $1000, (word) $800, (word) $400, (word) $200, (word) $100, (word) $80, (word) $40, (word) $20, (word) $10, (word) 8, (word) 4, (word) 2 }
|
||||
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
|
||||
(const word*) RADIX_HEXADECIMAL_VALUES[] = { (word) $1000, (word) $100, (word) $10 }
|
||||
(const word*) RADIX_OCTAL_VALUES[] = { (word) $8000, (word) $1000, (word) $200, (word) $40, (word) 8 }
|
||||
(const byte) SIZEOF_WORD = (byte) 2
|
||||
(word) Ticks
|
||||
(word) Ticks#0
|
||||
@ -719,7 +721,7 @@ SYMBOL TABLE SSA
|
||||
(word) Ticks#7
|
||||
(word) Ticks#8
|
||||
(word) Ticks#9
|
||||
(const byte*) decimal_digits = { fill( 6, 0) }
|
||||
(const byte*) decimal_digits[(number) 6] = { fill( 6, 0) }
|
||||
(void()) end()
|
||||
(label) end::@1
|
||||
(label) end::@2
|
||||
@ -857,7 +859,7 @@ SYMBOL TABLE SSA
|
||||
(byte*) print_char_cursor#7
|
||||
(byte*) print_char_cursor#8
|
||||
(byte*) print_char_cursor#9
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#0
|
||||
(byte*) print_line_cursor#1
|
||||
@ -1165,13 +1167,10 @@ Adding number conversion cast (unumber) 4 in (byte) utoa::max_digits#2 ← (numb
|
||||
Adding number conversion cast (unumber) 6 in (byte) utoa::max_digits#3 ← (number) 6
|
||||
Adding number conversion cast (unumber) $10 in (byte) utoa::max_digits#4 ← (number) $10
|
||||
Adding number conversion cast (unumber) 0 in *((byte*) utoa::buffer#2) ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in (byte) utoa::started#0 ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in (byte) utoa::digit#0 ← (number) 0
|
||||
Adding number conversion cast (unumber) 1 in (number~) utoa::$5 ← (byte) utoa::max_digits#5 - (number) 1
|
||||
Adding number conversion cast (unumber) utoa::$5 in (number~) utoa::$5 ← (byte) utoa::max_digits#5 - (unumber)(number) 1
|
||||
Adding number conversion cast (unumber) 0 in *((byte*) utoa::buffer#3) ← (number) 0
|
||||
Adding number conversion cast (unumber) 1 in (byte) utoa::started#1 ← (number) 1
|
||||
Adding number conversion cast (unumber) 0 in (byte) utoa_append::digit#0 ← (number) 0
|
||||
Adding number conversion cast (unumber) 0 in (bool~) print_str::$0 ← (number) 0 != *((byte*) print_str::str#2)
|
||||
Adding number conversion cast (unumber) $28 in (byte*~) print_ln::$0 ← (byte*) print_line_cursor#9 + (number) $28
|
||||
Adding number conversion cast (unumber) 4 in (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (number) 4
|
||||
@ -1193,13 +1192,9 @@ Inlining cast (byte) utoa::max_digits#2 ← (unumber)(number) 4
|
||||
Inlining cast (byte) utoa::max_digits#3 ← (unumber)(number) 6
|
||||
Inlining cast (byte) utoa::max_digits#4 ← (unumber)(number) $10
|
||||
Inlining cast *((byte*) utoa::buffer#2) ← (unumber)(number) 0
|
||||
Inlining cast (byte) utoa::started#0 ← (unumber)(number) 0
|
||||
Inlining cast (byte) utoa::digit#0 ← (unumber)(number) 0
|
||||
Inlining cast (byte~) utoa::$4 ← (byte)(word) utoa::value#3
|
||||
Inlining cast *((byte*) utoa::buffer#3) ← (unumber)(number) 0
|
||||
Inlining cast (byte) utoa::started#1 ← (unumber)(number) 1
|
||||
Inlining cast (byte) utoa_append::digit#0 ← (unumber)(number) 0
|
||||
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
|
||||
Inlining cast (word) rand_seed#0 ← (unumber)(number) $194a
|
||||
Inlining cast (word) sum::s#1 ← (unumber)(number) 0
|
||||
Inlining cast (byte) sum::page#1 ← (unumber)(number) 0
|
||||
@ -1207,45 +1202,15 @@ Inlining cast (byte) sum::i#1 ← (unumber)(number) 0
|
||||
Inlining cast (word) main::i#1 ← (unumber)(number) 0
|
||||
Inlining cast (signed word) main::return#0 ← (snumber)(number) 0
|
||||
Successful SSA optimization Pass2InlineCast
|
||||
Simplifying constant integer cast $8000
|
||||
Simplifying constant integer cast $4000
|
||||
Simplifying constant integer cast $2000
|
||||
Simplifying constant integer cast $1000
|
||||
Simplifying constant integer cast $800
|
||||
Simplifying constant integer cast $400
|
||||
Simplifying constant integer cast $200
|
||||
Simplifying constant integer cast $100
|
||||
Simplifying constant integer cast $80
|
||||
Simplifying constant integer cast $40
|
||||
Simplifying constant integer cast $20
|
||||
Simplifying constant integer cast $10
|
||||
Simplifying constant integer cast 8
|
||||
Simplifying constant integer cast 4
|
||||
Simplifying constant integer cast 2
|
||||
Simplifying constant integer cast $8000
|
||||
Simplifying constant integer cast $1000
|
||||
Simplifying constant integer cast $200
|
||||
Simplifying constant integer cast $40
|
||||
Simplifying constant integer cast 8
|
||||
Simplifying constant integer cast $2710
|
||||
Simplifying constant integer cast $3e8
|
||||
Simplifying constant integer cast $64
|
||||
Simplifying constant integer cast $a
|
||||
Simplifying constant integer cast $1000
|
||||
Simplifying constant integer cast $100
|
||||
Simplifying constant integer cast $10
|
||||
Simplifying constant pointer cast (byte*) 57344
|
||||
Simplifying constant integer cast 5
|
||||
Simplifying constant integer cast 4
|
||||
Simplifying constant integer cast 6
|
||||
Simplifying constant integer cast $10
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast 1
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast 1
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant pointer cast (byte*) 1024
|
||||
Simplifying constant integer cast 0
|
||||
Simplifying constant integer cast $28
|
||||
@ -1267,13 +1232,10 @@ Finalized unsigned number type (byte) 4
|
||||
Finalized unsigned number type (byte) 6
|
||||
Finalized unsigned number type (byte) $10
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 1
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 1
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) 0
|
||||
Finalized unsigned number type (byte) $28
|
||||
Finalized unsigned number type (byte) 4
|
||||
Finalized unsigned number type (byte) $f
|
||||
@ -1601,9 +1563,9 @@ Added new block during phi lifting utoa::@28(between utoa::@27 and utoa::@21)
|
||||
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
|
||||
Added new block during phi lifting sum::@10(between sum::@4 and sum::@4)
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @12
|
||||
Adding NOP phi() at start of @47
|
||||
Adding NOP phi() at start of @13
|
||||
Adding NOP phi() at start of @48
|
||||
Adding NOP phi() at start of @49
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@8
|
||||
@ -1668,8 +1630,8 @@ Coalesced [135] print_char_cursor#69 ← print_char_cursor#49
|
||||
Coalesced [139] print_char::ch#4 ← print_char::ch#1
|
||||
Coalesced (already) [140] print_char_cursor#70 ← print_char_cursor#13
|
||||
Coalesced down to 16 phi equivalence classes
|
||||
Culled Empty Block (label) @12
|
||||
Culled Empty Block (label) @48
|
||||
Culled Empty Block (label) @13
|
||||
Culled Empty Block (label) @49
|
||||
Culled Empty Block (label) main::@8
|
||||
Culled Empty Block (label) main::@12
|
||||
Culled Empty Block (label) print_ln::@2
|
||||
@ -1684,9 +1646,9 @@ Culled Empty Block (label) sum::@10
|
||||
Culled Empty Block (label) end::@3
|
||||
Culled Empty Block (label) print_word::@2
|
||||
Culled Empty Block (label) print_byte::@2
|
||||
Renumbering block @42 to @1
|
||||
Renumbering block @44 to @2
|
||||
Renumbering block @47 to @3
|
||||
Renumbering block @43 to @1
|
||||
Renumbering block @45 to @2
|
||||
Renumbering block @48 to @3
|
||||
Renumbering block utoa::@18 to utoa::@1
|
||||
Renumbering block utoa::@19 to utoa::@2
|
||||
Renumbering block utoa::@20 to utoa::@3
|
||||
@ -2370,7 +2332,7 @@ print_ln: {
|
||||
}
|
||||
// print_word_decimal
|
||||
// Print a word as DECIMAL
|
||||
// print_word_decimal(word zeropage($21) w)
|
||||
// print_word_decimal(word zp($21) w)
|
||||
print_word_decimal: {
|
||||
.label w = $21
|
||||
// [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0 -- vwuz1=vwuz2
|
||||
@ -2399,7 +2361,7 @@ print_word_decimal: {
|
||||
}
|
||||
// print_str
|
||||
// Print a zero-terminated string
|
||||
// print_str(byte* zeropage(6) str)
|
||||
// print_str(byte* zp(6) str)
|
||||
print_str: {
|
||||
.label str = 6
|
||||
// [33] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
|
||||
@ -2452,7 +2414,7 @@ print_str: {
|
||||
// - value : The number to be converted to RADIX
|
||||
// - buffer : receives the string representing the number and zero-termination.
|
||||
// - radix : The radix to convert the number to (from the enum RADIX)
|
||||
// utoa(word zeropage(9) value, byte* zeropage($24) buffer)
|
||||
// utoa(word zp(9) value, byte* zp($24) buffer)
|
||||
utoa: {
|
||||
.const max_digits = 5
|
||||
.label __4 = $23
|
||||
@ -2614,7 +2576,7 @@ utoa: {
|
||||
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
|
||||
// (For decimal the subs used are 10000, 1000, 100, 10, 1)
|
||||
// returns : the value reduced by sub * digit so that it is less than sub.
|
||||
// utoa_append(byte* zeropage($29) buffer, word zeropage($e) value, word zeropage($2b) sub)
|
||||
// utoa_append(byte* zp($29) buffer, word zp($e) value, word zp($2b) sub)
|
||||
utoa_append: {
|
||||
.label buffer = $29
|
||||
.label value = $e
|
||||
@ -2809,7 +2771,7 @@ end: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($34) w)
|
||||
// print_word(word zp($34) w)
|
||||
print_word: {
|
||||
.label w = $34
|
||||
// [88] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2
|
||||
@ -2841,7 +2803,7 @@ print_word: {
|
||||
}
|
||||
// print_byte
|
||||
// Print a byte as HEX
|
||||
// print_byte(byte zeropage($17) b)
|
||||
// print_byte(byte zp($17) b)
|
||||
print_byte: {
|
||||
.label __0 = $36
|
||||
.label __2 = $37
|
||||
@ -2888,7 +2850,7 @@ print_byte: {
|
||||
}
|
||||
// print_char
|
||||
// Print a single char
|
||||
// print_char(byte zeropage($18) ch)
|
||||
// print_char(byte zp($18) ch)
|
||||
print_char: {
|
||||
.label ch = $18
|
||||
// [102] *((byte*) print_char_cursor#35) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2
|
||||
@ -3283,7 +3245,7 @@ print_ln: {
|
||||
}
|
||||
// print_word_decimal
|
||||
// Print a word as DECIMAL
|
||||
// print_word_decimal(word zeropage(5) w)
|
||||
// print_word_decimal(word zp(5) w)
|
||||
print_word_decimal: {
|
||||
.label w = 5
|
||||
// [27] (word) utoa::value#1 ← (word) print_word_decimal::w#0
|
||||
@ -3308,7 +3270,7 @@ print_word_decimal: {
|
||||
}
|
||||
// print_str
|
||||
// Print a zero-terminated string
|
||||
// print_str(byte* zeropage(5) str)
|
||||
// print_str(byte* zp(5) str)
|
||||
print_str: {
|
||||
.label str = 5
|
||||
// [33] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
|
||||
@ -3361,7 +3323,7 @@ print_str: {
|
||||
// - value : The number to be converted to RADIX
|
||||
// - buffer : receives the string representing the number and zero-termination.
|
||||
// - radix : The radix to convert the number to (from the enum RADIX)
|
||||
// utoa(word zeropage(5) value, byte* zeropage(7) buffer)
|
||||
// utoa(word zp(5) value, byte* zp(7) buffer)
|
||||
utoa: {
|
||||
.const max_digits = 5
|
||||
.label digit_value = $11
|
||||
@ -3491,7 +3453,7 @@ utoa: {
|
||||
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
|
||||
// (For decimal the subs used are 10000, 1000, 100, 10, 1)
|
||||
// returns : the value reduced by sub * digit so that it is less than sub.
|
||||
// utoa_append(byte* zeropage(7) buffer, word zeropage(5) value, word zeropage($11) sub)
|
||||
// utoa_append(byte* zp(7) buffer, word zp(5) value, word zp($11) sub)
|
||||
utoa_append: {
|
||||
.label buffer = 7
|
||||
.label value = 5
|
||||
@ -3669,7 +3631,7 @@ end: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($11) w)
|
||||
// print_word(word zp($11) w)
|
||||
print_word: {
|
||||
.label w = $11
|
||||
// [88] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1
|
||||
@ -3919,16 +3881,16 @@ FINAL SYMBOL TABLE
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
||||
(const byte*) DIGITS[] = (string) "0123456789abcdef"z
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const word*) RADIX_DECIMAL_VALUES = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
|
||||
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
|
||||
(word) Ticks
|
||||
(word) Ticks#1 Ticks zp[2]:15 2.0
|
||||
(word) Ticks#2 Ticks_1 zp[2]:17 4.0
|
||||
(const byte*) decimal_digits = { fill( 6, 0) }
|
||||
(const byte*) decimal_digits[(number) 6] = { fill( 6, 0) }
|
||||
(void()) end()
|
||||
(label) end::@1
|
||||
(label) end::@2
|
||||
@ -4252,7 +4214,7 @@ print_ln: {
|
||||
}
|
||||
// print_word_decimal
|
||||
// Print a word as DECIMAL
|
||||
// print_word_decimal(word zeropage(5) w)
|
||||
// print_word_decimal(word zp(5) w)
|
||||
print_word_decimal: {
|
||||
.label w = 5
|
||||
// utoa(w, decimal_digits, DECIMAL)
|
||||
@ -4273,7 +4235,7 @@ print_word_decimal: {
|
||||
}
|
||||
// print_str
|
||||
// Print a zero-terminated string
|
||||
// print_str(byte* zeropage(5) str)
|
||||
// print_str(byte* zp(5) str)
|
||||
print_str: {
|
||||
.label str = 5
|
||||
// [33] phi from print_str to print_str::@1 [phi:print_str->print_str::@1]
|
||||
@ -4324,7 +4286,7 @@ print_str: {
|
||||
// - value : The number to be converted to RADIX
|
||||
// - buffer : receives the string representing the number and zero-termination.
|
||||
// - radix : The radix to convert the number to (from the enum RADIX)
|
||||
// utoa(word zeropage(5) value, byte* zeropage(7) buffer)
|
||||
// utoa(word zp(5) value, byte* zp(7) buffer)
|
||||
utoa: {
|
||||
.const max_digits = 5
|
||||
.label digit_value = $11
|
||||
@ -4451,7 +4413,7 @@ utoa: {
|
||||
// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased.
|
||||
// (For decimal the subs used are 10000, 1000, 100, 10, 1)
|
||||
// returns : the value reduced by sub * digit so that it is less than sub.
|
||||
// utoa_append(byte* zeropage(7) buffer, word zeropage(5) value, word zeropage($11) sub)
|
||||
// utoa_append(byte* zp(7) buffer, word zp(5) value, word zp($11) sub)
|
||||
utoa_append: {
|
||||
.label buffer = 7
|
||||
.label value = 5
|
||||
@ -4623,7 +4585,7 @@ end: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($11) w)
|
||||
// print_word(word zp($11) w)
|
||||
print_word: {
|
||||
.label w = $11
|
||||
// print_byte(>w)
|
||||
|
@ -3,16 +3,16 @@
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const byte*) DIGITS = (string) "0123456789abcdef"z
|
||||
(const byte*) DIGITS[] = (string) "0123456789abcdef"z
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const word*) RADIX_DECIMAL_VALUES = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
|
||||
(const word*) RADIX_DECIMAL_VALUES[] = { (word) $2710, (word) $3e8, (word) $64, (word) $a }
|
||||
(word) Ticks
|
||||
(word) Ticks#1 Ticks zp[2]:15 2.0
|
||||
(word) Ticks#2 Ticks_1 zp[2]:17 4.0
|
||||
(const byte*) decimal_digits = { fill( 6, 0) }
|
||||
(const byte*) decimal_digits[(number) 6] = { fill( 6, 0) }
|
||||
(void()) end()
|
||||
(label) end::@1
|
||||
(label) end::@2
|
||||
|
@ -78,7 +78,7 @@ print_ln: {
|
||||
rts
|
||||
}
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($c) w)
|
||||
// print_word(word zp($c) w)
|
||||
print_word: {
|
||||
.label w = $c
|
||||
lda.z w+1
|
||||
|
@ -7,6 +7,7 @@ Fixing pointer addition (word*~) bsearch16u::$1 ← (word*) bsearch16u::items -
|
||||
Fixing pointer array-indexing *((word*) utoa::digit_values + (byte) utoa::digit)
|
||||
Fixing pointer array-indexing *((dword*) ultoa::digit_values + (byte) ultoa::digit)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strcpy::src)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) strlen::str)
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str_lines::str)
|
||||
Warning! Adding boolean cast to non-boolean condition (byte) print_str_lines::ch
|
||||
Warning! Adding boolean cast to non-boolean condition *((byte*) print_str::str)
|
||||
@ -25,7 +26,7 @@ Culled Empty Block (label) @8
|
||||
Culled Empty Block (label) @9
|
||||
Culled Empty Block (label) @10
|
||||
Culled Empty Block (label) @11
|
||||
Culled Empty Block (label) @13
|
||||
Culled Empty Block (label) @12
|
||||
Culled Empty Block (label) @14
|
||||
Culled Empty Block (label) @15
|
||||
Culled Empty Block (label) @16
|
||||
@ -54,8 +55,9 @@ Culled Empty Block (label) @38
|
||||
Culled Empty Block (label) @39
|
||||
Culled Empty Block (label) @40
|
||||
Culled Empty Block (label) @41
|
||||
Culled Empty Block (label) @43
|
||||
Culled Empty Block (label) @45
|
||||
Culled Empty Block (label) @42
|
||||
Culled Empty Block (label) @44
|
||||
Culled Empty Block (label) @46
|
||||
Culled Empty Block (label) round::@4
|
||||
Culled Empty Block (label) round::@5
|
||||
Culled Empty Block (label) round::@6
|
||||
@ -67,17 +69,17 @@ Culled Empty Block (label) round::@13
|
||||
Culled Empty Block (label) round::@15
|
||||
Culled Empty Block (label) round::@16
|
||||
Culled Empty Block (label) round::@20
|
||||
Culled Empty Block (label) @46
|
||||
Culled Empty Block (label) @47
|
||||
Culled Empty Block (label) main::@1
|
||||
|
||||
CONTROL FLOW GRAPH SSA
|
||||
@begin: scope:[] from
|
||||
to:@12
|
||||
@12: scope:[] from @begin
|
||||
(byte*) print_screen#0 ← ((byte*)) (number) $400
|
||||
to:@13
|
||||
@13: scope:[] from @begin
|
||||
(byte*) print_screen#0 ← (byte*)(number) $400
|
||||
(byte*) print_line_cursor#0 ← (byte*) print_screen#0
|
||||
(byte*) print_char_cursor#0 ← (byte*) print_line_cursor#0
|
||||
to:@42
|
||||
to:@43
|
||||
|
||||
(void()) print_ln()
|
||||
print_ln: scope:[print_ln] from end::@2
|
||||
@ -168,12 +170,12 @@ print_char::@return: scope:[print_char] from print_char
|
||||
(byte*) print_char_cursor#10 ← (byte*) print_char_cursor#26
|
||||
return
|
||||
to:@return
|
||||
@42: scope:[] from @12
|
||||
(byte*) print_line_cursor#24 ← phi( @12/(byte*) print_line_cursor#0 )
|
||||
(byte*) print_char_cursor#42 ← phi( @12/(byte*) print_char_cursor#0 )
|
||||
@43: scope:[] from @13
|
||||
(byte*) print_line_cursor#24 ← phi( @13/(byte*) print_line_cursor#0 )
|
||||
(byte*) print_char_cursor#42 ← phi( @13/(byte*) print_char_cursor#0 )
|
||||
(word) last_time#0 ← (word) 0
|
||||
(word) Ticks#0 ← (word) 0
|
||||
to:@44
|
||||
to:@45
|
||||
|
||||
(void()) start()
|
||||
start: scope:[start] from end main
|
||||
@ -238,13 +240,13 @@ end::@return: scope:[end] from end::@3
|
||||
(byte*) print_line_cursor#4 ← (byte*) print_line_cursor#12
|
||||
return
|
||||
to:@return
|
||||
@44: scope:[] from @42
|
||||
(byte*) print_line_cursor#22 ← phi( @42/(byte*) print_line_cursor#24 )
|
||||
(byte*) print_char_cursor#41 ← phi( @42/(byte*) print_char_cursor#42 )
|
||||
(word) last_time#17 ← phi( @42/(word) last_time#0 )
|
||||
(word) Ticks#17 ← phi( @42/(word) Ticks#0 )
|
||||
@45: scope:[] from @43
|
||||
(byte*) print_line_cursor#22 ← phi( @43/(byte*) print_line_cursor#24 )
|
||||
(byte*) print_char_cursor#41 ← phi( @43/(byte*) print_char_cursor#42 )
|
||||
(word) last_time#17 ← phi( @43/(word) last_time#0 )
|
||||
(word) Ticks#17 ← phi( @43/(word) Ticks#0 )
|
||||
(word) rand_seed#4 ← (word) 0
|
||||
to:@47
|
||||
to:@48
|
||||
|
||||
(void()) round()
|
||||
round: scope:[round] from main::@10 main::@11 main::@2 main::@3 main::@4 main::@5 main::@6 main::@7 main::@8 main::@9
|
||||
@ -303,12 +305,12 @@ round::@return: scope:[round] from round::@7
|
||||
to:@return
|
||||
|
||||
(signed word()) main()
|
||||
main: scope:[main] from @47
|
||||
(byte*) print_line_cursor#34 ← phi( @47/(byte*) print_line_cursor#19 )
|
||||
(byte*) print_char_cursor#52 ← phi( @47/(byte*) print_char_cursor#38 )
|
||||
(word) Ticks#27 ← phi( @47/(word) Ticks#14 )
|
||||
(word) last_time#27 ← phi( @47/(word) last_time#14 )
|
||||
(word) rand_seed#18 ← phi( @47/(word) rand_seed#20 )
|
||||
main: scope:[main] from @48
|
||||
(byte*) print_line_cursor#34 ← phi( @48/(byte*) print_line_cursor#19 )
|
||||
(byte*) print_char_cursor#52 ← phi( @48/(byte*) print_char_cursor#38 )
|
||||
(word) Ticks#27 ← phi( @48/(word) Ticks#14 )
|
||||
(word) last_time#27 ← phi( @48/(word) last_time#14 )
|
||||
(word) rand_seed#18 ← phi( @48/(word) rand_seed#20 )
|
||||
call start
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main
|
||||
@ -428,44 +430,44 @@ main::@return: scope:[main] from main::@13
|
||||
(byte*) print_line_cursor#6 ← (byte*) print_line_cursor#14
|
||||
return
|
||||
to:@return
|
||||
@47: scope:[] from @44
|
||||
(byte*) print_line_cursor#19 ← phi( @44/(byte*) print_line_cursor#22 )
|
||||
(byte*) print_char_cursor#38 ← phi( @44/(byte*) print_char_cursor#41 )
|
||||
(word) last_time#14 ← phi( @44/(word) last_time#17 )
|
||||
(word) Ticks#14 ← phi( @44/(word) Ticks#17 )
|
||||
(word) rand_seed#20 ← phi( @44/(word) rand_seed#4 )
|
||||
@48: scope:[] from @45
|
||||
(byte*) print_line_cursor#19 ← phi( @45/(byte*) print_line_cursor#22 )
|
||||
(byte*) print_char_cursor#38 ← phi( @45/(byte*) print_char_cursor#41 )
|
||||
(word) last_time#14 ← phi( @45/(word) last_time#17 )
|
||||
(word) Ticks#14 ← phi( @45/(word) Ticks#17 )
|
||||
(word) rand_seed#20 ← phi( @45/(word) rand_seed#4 )
|
||||
call main
|
||||
(signed word) main::return#2 ← (signed word) main::return#1
|
||||
to:@48
|
||||
@48: scope:[] from @47
|
||||
(byte*) print_line_cursor#15 ← phi( @47/(byte*) print_line_cursor#6 )
|
||||
(byte*) print_char_cursor#32 ← phi( @47/(byte*) print_char_cursor#15 )
|
||||
(word) last_time#11 ← phi( @47/(word) last_time#4 )
|
||||
(word) Ticks#11 ← phi( @47/(word) Ticks#5 )
|
||||
(word) rand_seed#15 ← phi( @47/(word) rand_seed#7 )
|
||||
to:@49
|
||||
@49: scope:[] from @48
|
||||
(byte*) print_line_cursor#15 ← phi( @48/(byte*) print_line_cursor#6 )
|
||||
(byte*) print_char_cursor#32 ← phi( @48/(byte*) print_char_cursor#15 )
|
||||
(word) last_time#11 ← phi( @48/(word) last_time#4 )
|
||||
(word) Ticks#11 ← phi( @48/(word) Ticks#5 )
|
||||
(word) rand_seed#15 ← phi( @48/(word) rand_seed#7 )
|
||||
(word) rand_seed#8 ← (word) rand_seed#15
|
||||
(word) Ticks#6 ← (word) Ticks#11
|
||||
(word) last_time#5 ← (word) last_time#11
|
||||
(byte*) print_char_cursor#16 ← (byte*) print_char_cursor#32
|
||||
(byte*) print_line_cursor#7 ← (byte*) print_line_cursor#15
|
||||
to:@end
|
||||
@end: scope:[] from @48
|
||||
@end: scope:[] from @49
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(label) @12
|
||||
(label) @42
|
||||
(label) @44
|
||||
(label) @47
|
||||
(label) @13
|
||||
(label) @43
|
||||
(label) @45
|
||||
(label) @48
|
||||
(label) @49
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const word) COUNT = (number) $4000
|
||||
(const word) COUNT = (word) $4000
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const byte) SQRT_COUNT = (number) $80
|
||||
(const byte*) Sieve = { fill( COUNT, 0) }
|
||||
(const byte) SQRT_COUNT = (byte) $80
|
||||
(const byte*) Sieve[(const word) COUNT] = { fill( COUNT, 0) }
|
||||
(word) Ticks
|
||||
(word) Ticks#0
|
||||
(word) Ticks#1
|
||||
@ -619,7 +621,7 @@ SYMBOL TABLE SSA
|
||||
(byte*) print_char_cursor#7
|
||||
(byte*) print_char_cursor#8
|
||||
(byte*) print_char_cursor#9
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#0
|
||||
(byte*) print_line_cursor#1
|
||||
@ -761,7 +763,6 @@ Adding number conversion cast (unumber) 1 in (byte~) round::$4 ← (byte) round:
|
||||
Adding number conversion cast (unumber) 1 in *((byte*) round::S#4) ← (number) 1
|
||||
Adding number conversion cast (snumber) 0 in (signed word) main::return#0 ← (number) 0
|
||||
Successful SSA optimization PassNAddNumberTypeConversions
|
||||
Inlining cast (byte*) print_screen#0 ← (byte*)(number) $400
|
||||
Inlining cast (word) rand_seed#0 ← (unumber)(number) $194a
|
||||
Inlining cast *((byte*) round::p#3) ← (unumber)(number) 0
|
||||
Inlining cast (byte) round::I#1 ← (unumber)(number) 2
|
||||
@ -922,9 +923,9 @@ Alias candidate removed (volatile)(word) last_time#1 = (word) Ticks#2 (word) las
|
||||
Alias candidate removed (volatile)(word) last_time#1 = (word) Ticks#2 (word) last_time#2
|
||||
Added new block during phi lifting print_ln::@3(between print_ln::@1 and print_ln::@1)
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @12
|
||||
Adding NOP phi() at start of @47
|
||||
Adding NOP phi() at start of @13
|
||||
Adding NOP phi() at start of @48
|
||||
Adding NOP phi() at start of @49
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main
|
||||
Adding NOP phi() at start of main::@2
|
||||
@ -968,8 +969,8 @@ Coalesced [95] round::I#9 ← round::I#2
|
||||
Coalesced [98] round::S#5 ← round::S#2
|
||||
Coalesced [101] round::p#4 ← round::p#1
|
||||
Coalesced down to 7 phi equivalence classes
|
||||
Culled Empty Block (label) @12
|
||||
Culled Empty Block (label) @48
|
||||
Culled Empty Block (label) @13
|
||||
Culled Empty Block (label) @49
|
||||
Culled Empty Block (label) main::@13
|
||||
Culled Empty Block (label) end::@3
|
||||
Culled Empty Block (label) print_ln::@2
|
||||
@ -977,9 +978,9 @@ Culled Empty Block (label) print_ln::@3
|
||||
Culled Empty Block (label) print_word::@2
|
||||
Culled Empty Block (label) print_byte::@2
|
||||
Culled Empty Block (label) round::@3
|
||||
Renumbering block @42 to @1
|
||||
Renumbering block @44 to @2
|
||||
Renumbering block @47 to @3
|
||||
Renumbering block @43 to @1
|
||||
Renumbering block @45 to @2
|
||||
Renumbering block @48 to @3
|
||||
Renumbering block round::@7 to round::@3
|
||||
Renumbering block round::@8 to round::@4
|
||||
Renumbering block round::@10 to round::@5
|
||||
@ -1554,7 +1555,7 @@ print_ln: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($15) w)
|
||||
// print_word(word zp($15) w)
|
||||
print_word: {
|
||||
.label w = $15
|
||||
// [46] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuz1=_hi_vwuz2
|
||||
@ -1590,7 +1591,7 @@ print_word: {
|
||||
}
|
||||
// print_byte
|
||||
// Print a byte as HEX
|
||||
// print_byte(byte zeropage(4) b)
|
||||
// print_byte(byte zp(4) b)
|
||||
print_byte: {
|
||||
.label __0 = $17
|
||||
.label __2 = $18
|
||||
@ -1637,7 +1638,7 @@ print_byte: {
|
||||
}
|
||||
// print_char
|
||||
// Print a single char
|
||||
// print_char(byte zeropage(5) ch)
|
||||
// print_char(byte zp(5) ch)
|
||||
print_char: {
|
||||
.label ch = 5
|
||||
// [60] *((byte*) print_char_cursor#25) ← (byte) print_char::ch#2 -- _deref_pbuz1=vbuz2
|
||||
@ -2137,7 +2138,7 @@ print_ln: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($c) w)
|
||||
// print_word(word zp($c) w)
|
||||
print_word: {
|
||||
.label w = $c
|
||||
// [46] (byte) print_byte::b#0 ← > (word) print_word::w#0 -- vbuxx=_hi_vwuz1
|
||||
@ -2488,13 +2489,13 @@ FINAL SYMBOL TABLE
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const word) COUNT = (number) $4000
|
||||
(const word) COUNT = (word) $4000
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const byte) SQRT_COUNT = (number) $80
|
||||
(const byte*) Sieve = { fill( COUNT, 0) }
|
||||
(const byte) SQRT_COUNT = (byte) $80
|
||||
(const byte*) Sieve[(const word) COUNT] = { fill( COUNT, 0) }
|
||||
(word) Ticks
|
||||
(word) Ticks#1 Ticks zp[2]:10 2.0
|
||||
(word) Ticks#2 Ticks_1 zp[2]:12 4.0
|
||||
@ -2539,7 +2540,7 @@ FINAL SYMBOL TABLE
|
||||
(byte*) print_char_cursor#10 print_char_cursor zp[2]:4 1.0
|
||||
(byte*) print_char_cursor#25 print_char_cursor zp[2]:4 4.0
|
||||
(byte*) print_char_cursor#35 print_char_cursor zp[2]:4 1.3333333333333333
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp[2]:2 16.5
|
||||
(byte*) print_line_cursor#8 print_line_cursor zp[2]:2 22.0
|
||||
@ -2789,7 +2790,7 @@ print_ln: {
|
||||
}
|
||||
// print_word
|
||||
// Print a word as HEX
|
||||
// print_word(word zeropage($c) w)
|
||||
// print_word(word zp($c) w)
|
||||
print_word: {
|
||||
.label w = $c
|
||||
// print_byte(>w)
|
||||
|
@ -3,13 +3,13 @@
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const word) COUNT = (number) $4000
|
||||
(const word) COUNT = (word) $4000
|
||||
(const byte) RADIX::BINARY = (number) 2
|
||||
(const byte) RADIX::DECIMAL = (number) $a
|
||||
(const byte) RADIX::HEXADECIMAL = (number) $10
|
||||
(const byte) RADIX::OCTAL = (number) 8
|
||||
(const byte) SQRT_COUNT = (number) $80
|
||||
(const byte*) Sieve = { fill( COUNT, 0) }
|
||||
(const byte) SQRT_COUNT = (byte) $80
|
||||
(const byte*) Sieve[(const word) COUNT] = { fill( COUNT, 0) }
|
||||
(word) Ticks
|
||||
(word) Ticks#1 Ticks zp[2]:10 2.0
|
||||
(word) Ticks#2 Ticks_1 zp[2]:12 4.0
|
||||
@ -54,7 +54,7 @@
|
||||
(byte*) print_char_cursor#10 print_char_cursor zp[2]:4 1.0
|
||||
(byte*) print_char_cursor#25 print_char_cursor zp[2]:4 4.0
|
||||
(byte*) print_char_cursor#35 print_char_cursor zp[2]:4 1.3333333333333333
|
||||
(const byte*) print_hextab = (string) "0123456789abcdef"z
|
||||
(const byte*) print_hextab[] = (string) "0123456789abcdef"z
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp[2]:2 16.5
|
||||
(byte*) print_line_cursor#8 print_line_cursor zp[2]:2 22.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user