1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-20 02:32:36 +00:00

Fixed conflict

This commit is contained in:
Jesper Gravgaard 2018-02-13 21:40:52 +01:00
parent a50d685574
commit 8705527316
6 changed files with 5140 additions and 2618 deletions

View File

@ -2,8 +2,6 @@ import "c64"
import "basic-floats"
import "print"
const byte* SCREEN = $0400;
const byte sinlen_x = 221;
const byte[221] sintab_x;
const byte sinlen_y = 197;

View File

@ -3,8 +3,6 @@ import "c64"
import "basic-floats"
import "print"
const byte* SCREEN = $0400;
const byte sinlen_x = 221;
const byte[221] sintab_x;
const byte sinlen_y = 197;
@ -538,7 +536,9 @@ void mulFACby10() {
Importing print
PARSING src/test/java/dk/camelot64/kickc/test/kc/print.kc
byte* line_cursor = $0400;
const byte* SCREEN = $0400;
byte* line_cursor = SCREEN;
byte* char_cursor = line_cursor;
// Print a zero-terminated string
@ -595,9 +595,11 @@ void print_char(byte ch) {
// Clear the screen
void print_cls() {
for(byte* sc=$0400; sc!=$0400+1000; sc++) {
for(byte* sc=SCREEN; sc!=SCREEN+1000; sc++) {
*sc = ' ';
}
line_cursor = SCREEN;
char_cursor = line_cursor;
}
@ -808,7 +810,8 @@ proc (void()) mulFACby10()
mulFACby10::@return:
return
endproc // mulFACby10()
(byte*) line_cursor ← (word/signed word/dword/signed dword) 1024
(byte*) SCREEN ← (word/signed word/dword/signed dword) 1024
(byte*) line_cursor ← (byte*) SCREEN
(byte*) char_cursor ← (byte*) line_cursor
proc (void()) print_str((byte*) print_str::str)
print_str::@1:
@ -884,17 +887,18 @@ print_char::@return:
return
endproc // print_char()
proc (void()) print_cls()
(byte*) print_cls::sc ← (word/signed word/dword/signed dword) 1024
(byte*) print_cls::sc ← (byte*) SCREEN
print_cls::@1:
*((byte*) print_cls::sc) ← (byte) ' '
(byte*) print_cls::sc ← ++ (byte*) print_cls::sc
(word/signed word/dword/signed dword~) print_cls::$0 ← (word/signed word/dword/signed dword) 1024 + (word/signed word/dword/signed dword) 1000
(boolean~) print_cls::$1 ← (byte*) print_cls::sc != (word/signed word/dword/signed dword~) print_cls::$0
(byte*~) print_cls::$0 ← (byte*) SCREEN + (word/signed word/dword/signed dword) 1000
(boolean~) print_cls::$1 ← (byte*) print_cls::sc != (byte*~) print_cls::$0
if((boolean~) print_cls::$1) goto print_cls::@1
(byte*) line_cursor ← (byte*) SCREEN
(byte*) char_cursor ← (byte*) line_cursor
print_cls::@return:
return
endproc // print_cls()
(byte*) SCREEN ← (word/signed word/dword/signed dword) 1024
(byte) sinlen_x ← (byte/word/signed word/dword/signed dword) 221
(byte[221]) sintab_x ← { fill( 221, 0) }
(byte) sinlen_y ← (byte/word/signed word/dword/signed dword) 197
@ -1412,7 +1416,7 @@ SYMBOLS
(label) print_char::@return
(byte) print_char::ch
(void()) print_cls()
(word/signed word/dword/signed dword~) print_cls::$0
(byte*~) print_cls::$0
(boolean~) print_cls::$1
(label) print_cls::@1
(label) print_cls::@return
@ -1535,8 +1539,6 @@ Promoting word/dword/signed dword to byte* in SPRITES_COLS ← ((byte*)) 53287
Promoting word/dword/signed dword to byte* in COLS ← ((byte*)) 55296
Promoting byte/word/signed word/dword/signed dword to byte* in memLo ← ((byte*)) 254
Promoting byte/word/signed word/dword/signed dword to byte* in memHi ← ((byte*)) 255
Promoting word/signed word/dword/signed dword to byte* in line_cursor ← ((byte*)) 1024
Promoting word/signed word/dword/signed dword to byte* in print_cls::sc ← ((byte*)) 1024
Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024
Promoting word/signed word/dword/signed dword to byte* in sprites ← ((byte*)) 8192
Promoting word/dword/signed dword to byte* in gen_sintab::f_2pi ← ((byte*)) 58085
@ -1811,7 +1813,8 @@ mulFACby10::@return: scope:[mulFACby10] from mulFACby10
return
to:@return
@27: scope:[] from @26
(byte*) line_cursor ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte*) line_cursor ← (byte*) SCREEN
(byte*) char_cursor ← (byte*) line_cursor
to:@28
print_str: scope:[print_str] from
@ -1925,22 +1928,23 @@ print_char::@return: scope:[print_char] from print_char
@34: scope:[] from @33
to:@35
print_cls: scope:[print_cls] from
(byte*) print_cls::sc ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte*) print_cls::sc ← (byte*) SCREEN
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
*((byte*) print_cls::sc) ← (byte) ' '
(byte*) print_cls::sc ← ++ (byte*) print_cls::sc
(word/signed word/dword/signed dword~) print_cls::$0 ← (word/signed word/dword/signed dword) 1024 + (word/signed word/dword/signed dword) 1000
(boolean~) print_cls::$1 ← (byte*) print_cls::sc != (word/signed word/dword/signed dword~) print_cls::$0
(byte*~) print_cls::$0 ← (byte*) SCREEN + (word/signed word/dword/signed dword) 1000
(boolean~) print_cls::$1 ← (byte*) print_cls::sc != (byte*~) print_cls::$0
if((boolean~) print_cls::$1) goto print_cls::@1
to:print_cls::@2
print_cls::@2: scope:[print_cls] from print_cls::@1
(byte*) line_cursor ← (byte*) SCREEN
(byte*) char_cursor ← (byte*) line_cursor
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls::@2
return
to:@return
@35: scope:[] from @34
(byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024
(byte) sinlen_x ← (byte/word/signed word/dword/signed dword) 221
(byte[221]) sintab_x ← { fill( 221, 0) }
(byte) sinlen_y ← (byte/word/signed word/dword/signed dword) 197
@ -2350,7 +2354,7 @@ Eliminating unused variable - keeping the call (void~) setMEMtoFAC::$0
Eliminating unused variable - keeping the call (void~) addMEMtoFAC::$0
Eliminating unused variable - keeping the call (void~) divMEMbyFAC::$0
Eliminating unused variable - keeping the call (void~) mulFACbyMEM::$0
Eliminating unused variable (byte*) char_cursor and assignment [68] (byte*) char_cursor ← (byte*) line_cursor
Eliminating unused variable (byte*) char_cursor and assignment [69] (byte*) char_cursor ← (byte*) line_cursor
Eliminating unused variable - keeping the call (void~) main::$0
Eliminating unused variable - keeping the call (void~) main::$2
Eliminating unused variable - keeping the call (void~) init::$0
@ -2382,7 +2386,7 @@ Eliminating unused variable - keeping the call (void~) gen_sintab::$20
Eliminating unused variable - keeping the call (void~) gen_sintab::$21
Eliminating unused variable - keeping the call (void~) gen_sintab::$22
Eliminating unused variable - keeping the call (void~) gen_sintab::$25
Eliminating unused variable (byte*) line_cursor and assignment [46] (byte*) line_cursor ← ((byte*)) (word/signed word/dword/signed dword) 1024
Eliminating unused variable (byte*) line_cursor and assignment [47] (byte*) line_cursor ← (byte*) SCREEN
Creating constant string variable for inline (const string) gen_sprites::$3 "camelot"
Removing empty block @1
Removing empty block @2
@ -2411,7 +2415,6 @@ Removing empty block @23
Removing empty block @24
Removing empty block @25
Removing empty block @26
Removing empty block @27
Removing empty block @28
Removing empty block @29
Removing empty block @30
@ -2487,7 +2490,7 @@ CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN
(byte*) COLS#0 ← ((byte*)) (word/dword/signed dword) 55296
(byte*) memLo#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 254
(byte*) memHi#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 255
to:@35
to:@27
prepareMEM: scope:[prepareMEM] from addMEMtoFAC divMEMbyFAC mulFACbyMEM setFAC setMEMtoFAC
(byte*) prepareMEM::mem#5 ← phi( addMEMtoFAC/(byte*) prepareMEM::mem#2 divMEMbyFAC/(byte*) prepareMEM::mem#3 mulFACbyMEM/(byte*) prepareMEM::mem#4 setFAC/(byte*) prepareMEM::mem#0 setMEMtoFAC/(byte*) prepareMEM::mem#1 )
(byte~) prepareMEM::$0 ← < (byte*) prepareMEM::mem#5
@ -2582,8 +2585,10 @@ sinFAC: scope:[sinFAC] from gen_sintab::@18
sinFAC::@return: scope:[sinFAC] from sinFAC
return
to:@return
@35: scope:[] from @begin
@27: scope:[] from @begin
(byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024
to:@35
@35: scope:[] from @27
(byte) sinlen_x#0 ← (byte/word/signed word/dword/signed dword) 221
(byte[221]) sintab_x#0 ← { fill( 221, 0) }
(byte) sinlen_y#0 ← (byte/word/signed word/dword/signed dword) 197
@ -3374,6 +3379,7 @@ gen_sintab::@return: scope:[gen_sintab] from gen_sintab::@23
@end: scope:[] from @46
SYMBOL TABLE SSA
(label) @27
(label) @35
(label) @38
(label) @40
@ -4677,6 +4683,7 @@ Eliminating unused constant (const byte) progress_idx#35
Succesful SSA optimization PassNEliminateUnusedVars
Eliminating Noop Cast (byte*) prepareMEM::mem#0 ← ((byte*)) (word) setFAC::w#5
Succesful SSA optimization Pass2NopCastElimination
Culled Empty Block (label) @27
Culled Empty Block (label) @35
Culled Empty Block (label) main::@5
Culled Empty Block (label) main::@1

View File

@ -2,19 +2,227 @@
:BasicUpstart(main)
.pc = $80d "Program"
.label SCREEN = $400
.label char_cursor = 6
.label char_cursor = 8
.label line_cursor = 3
.label rem16u = $a
jsr main
main: {
jsr print_cls
jsr test_8s
jsr test_8u
jsr test_16u
rts
}
test_16u: {
.label dividend = 5
.label divisor = $12
.label res = $c
.label i = 2
lda #0
sta rem16u
sta rem16u+1
sta i
b1:
ldy i
lda dividends,y
sta dividend
lda dividends+1,y
sta dividend+1
lda divisors,y
sta divisor
lda divisors+1,y
sta divisor+1
lda dividend
sta div16u.dividend
lda dividend+1
sta div16u.dividend+1
jsr div16u
lda line_cursor
sta char_cursor
lda line_cursor+1
sta char_cursor+1
jsr print_word
lda #<str
sta print_str.str
lda #>str
sta print_str.str+1
jsr print_str
lda divisor
sta print_word.w
lda divisor+1
sta print_word.w+1
jsr print_word
lda #<str1
sta print_str.str
lda #>str1
sta print_str.str+1
jsr print_str
lda res
sta print_word.w
lda res+1
sta print_word.w+1
jsr print_word
lda #<str2
sta print_str.str
lda #>str2
sta print_str.str+1
jsr print_str
lda div16u.rem
sta print_word.w
lda div16u.rem+1
sta print_word.w+1
jsr print_word
jsr print_ln
lda #2
clc
adc i
sta i
cmp #$c
beq !b1+
jmp b1
!b1:
rts
str: .text " / @"
str1: .text " = @"
str2: .text " @"
dividends: .word $ffff, $ffff, $ffff, $ffff, $ffff, $ffff
divisors: .word 5, 7, $b, $d, $11, $13
}
print_ln: {
b1:
lda line_cursor
clc
adc #$28
sta line_cursor
bcc !+
inc line_cursor+1
!:
lda line_cursor+1
cmp char_cursor+1
bcc b1
bne !+
lda line_cursor
cmp char_cursor
bcc b1
!:
rts
}
print_word: {
.label w = 5
lda w+1
sta print_byte.b
jsr print_byte
lda w
sta print_byte.b
jsr print_byte
rts
}
print_byte: {
.label b = 7
lda b
lsr
lsr
lsr
lsr
tay
lda hextab,y
jsr print_char
lda #$f
and b
tay
lda hextab,y
jsr print_char
rts
hextab: .text "0123456789abcdef"
}
print_char: {
ldy #0
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
rts
}
print_str: {
.label str = 5
b1:
ldy #0
lda (str),y
cmp #'@'
bne b2
rts
b2:
ldy #0
lda (str),y
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
inc str
bne !+
inc str+1
!:
jmp b1
}
div16u: {
.label rem = $a
.label dividend = 8
.label quotient = $c
.label return = $c
.label divisor = $12
ldx #0
txa
sta quotient
sta quotient+1
sta rem
sta rem+1
b1:
asl rem
rol rem+1
lda dividend+1
and #$80
cmp #0
beq b2
inc rem
bne !+
inc rem+1
!:
b2:
asl dividend
rol dividend+1
asl quotient
rol quotient+1
lda rem+1
cmp divisor+1
bcc b3
bne !+
lda rem
cmp divisor
bcc b3
!:
inc quotient
bne !+
inc quotient+1
!:
lda rem
sec
sbc divisor
sta rem
lda rem+1
sbc divisor+1
sta rem+1
b3:
inx
cpx #$10
bne b1
rts
}
test_8u: {
.label rem = $e
.label dividend = 5
.label divisor = $a
.label rem = $14
.label dividend = 7
.label divisor = $e
.label i = 2
lda #0
sta rem
@ -74,80 +282,12 @@ test_8u: {
dividends: .byte $ff, $ff, $ff, $ff, $ff, $ff
divisors: .byte 5, 7, $b, $d, $11, $13
}
print_ln: {
b1:
lda line_cursor
clc
adc #$28
sta line_cursor
bcc !+
inc line_cursor+1
!:
lda line_cursor+1
cmp char_cursor+1
bcc b1
bne !+
lda line_cursor
cmp char_cursor
bcc b1
!:
rts
}
print_byte: {
.label b = 5
lda b
lsr
lsr
lsr
lsr
tay
lda hextab,y
jsr print_char
lda #$f
and b
tay
lda hextab,y
jsr print_char
rts
hextab: .text "0123456789abcdef"
}
print_char: {
ldy #0
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
rts
}
print_str: {
.label str = 8
b1:
ldy #0
lda (str),y
cmp #'@'
bne b2
rts
b2:
ldy #0
lda (str),y
sta (char_cursor),y
inc char_cursor
bne !+
inc char_cursor+1
!:
inc str
bne !+
inc str+1
!:
jmp b1
}
div8u: {
.label dividend = $b
.label quotient = $c
.label return = $c
.label divisor = $a
.label remainder = 8
.label dividend = $f
.label quotient = $10
.label return = $10
.label divisor = $e
.label remainder = 5
ldx #0
txa
sta quotient
@ -181,9 +321,9 @@ div8u: {
rts
}
test_8s: {
.label dividend = 5
.label divisor = $f
.label res = $a
.label dividend = 7
.label divisor = $15
.label res = $e
.label i = 2
lda #<SCREEN
sta line_cursor
@ -249,7 +389,7 @@ test_8s: {
divisors: .byte 5, 7, -$b, -$d, $11, $13
}
print_sbyte: {
.label b = 5
.label b = 7
lda b
cmp #0
bpl b1
@ -265,8 +405,8 @@ print_sbyte: {
rts
}
div8s: {
.label neg = $d
.label rem8u = $10
.label neg = $11
.label rem8u = $16
cmp #0
bpl b16
eor #$ff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,16 +4,50 @@
(byte*) SCREEN
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
(byte*) char_cursor
(byte*) char_cursor#1 char_cursor zp ZP_WORD:6 101.0
(byte*~) char_cursor#100 char_cursor zp ZP_WORD:6 22.0
(byte*) char_cursor#11 char_cursor zp ZP_WORD:6 3.40625
(byte*) char_cursor#2 char_cursor zp ZP_WORD:6 23.1875
(byte*) char_cursor#48 char_cursor zp ZP_WORD:6 5.0
(byte*) char_cursor#76 char_cursor zp ZP_WORD:6 3.0
(byte*) char_cursor#77 char_cursor zp ZP_WORD:6 15.999999999999998
(byte*) char_cursor#78 char_cursor zp ZP_WORD:6 15.999999999999998
(byte*) char_cursor#81 char_cursor zp ZP_WORD:6 2.4444444444444446
(byte*~) char_cursor#91 char_cursor zp ZP_WORD:6 22.0
(byte*) char_cursor#1 char_cursor zp ZP_WORD:8 101.0
(byte*) char_cursor#100 char_cursor zp ZP_WORD:8 18.363636363636363
(byte*) char_cursor#102 char_cursor zp ZP_WORD:8 3.0
(byte*) char_cursor#103 char_cursor zp ZP_WORD:8 15.999999999999998
(byte*) char_cursor#104 char_cursor zp ZP_WORD:8 23.0
(byte*) char_cursor#105 char_cursor zp ZP_WORD:8 17.333333333333332
(byte*) char_cursor#109 char_cursor zp ZP_WORD:8 2.4444444444444446
(byte*~) char_cursor#121 char_cursor zp ZP_WORD:8 22.0
(byte*~) char_cursor#128 char_cursor zp ZP_WORD:8 22.0
(byte*~) char_cursor#137 char_cursor zp ZP_WORD:8 22.0
(byte*) char_cursor#14 char_cursor zp ZP_WORD:8 2.5227272727272725
(byte*) char_cursor#64 char_cursor zp ZP_WORD:8 5.0
(word()) div16u((word) div16u::dividend , (word) div16u::divisor)
(byte~) div16u::$1 reg byte a 202.0
(byte~) div16u::$2 reg byte a 202.0
(label) div16u::@1
(label) div16u::@2
(label) div16u::@3
(label) div16u::@4
(label) div16u::@5
(label) div16u::@return
(word) div16u::dividend
(word) div16u::dividend#0 dividend zp ZP_WORD:8 25.25
(word) div16u::dividend#1 dividend zp ZP_WORD:8 4.333333333333333
(word) div16u::dividend#2 dividend zp ZP_WORD:8 43.57142857142858
(word) div16u::divisor
(word) div16u::divisor#0 divisor zp ZP_WORD:18 12.529411764705884
(byte) div16u::i
(byte) div16u::i#1 reg byte x 151.5
(byte) div16u::i#2 reg byte x 15.538461538461538
(word) div16u::quotient
(word) div16u::quotient#1 quotient zp ZP_WORD:12 151.5
(word) div16u::quotient#2 quotient zp ZP_WORD:12 101.0
(word) div16u::quotient#3 quotient zp ZP_WORD:12 25.25
(word) div16u::rem
(word) div16u::rem#1 rem zp ZP_WORD:10 75.75
(word) div16u::rem#2 rem zp ZP_WORD:10 202.0
(word) div16u::rem#3 rem zp ZP_WORD:10 202.0
(word) div16u::rem#4 rem zp ZP_WORD:10 202.0
(word) div16u::rem#5 rem zp ZP_WORD:10 101.0
(word) div16u::rem#8 rem zp ZP_WORD:10 12.5
(word) div16u::return
(word) div16u::return#0 return zp ZP_WORD:12 62.8
(word) div16u::return#2 return zp ZP_WORD:12 22.0
(signed byte()) div8s((signed byte) div8s::dividend , (signed byte) div8s::divisor)
(signed byte~) div8s::$2 reg byte a 2.0
(signed byte~) div8s::$7 reg byte x 1.0
@ -40,11 +74,11 @@
(byte~) div8s::divisorb#4 reg byte x 4.0
(byte~) div8s::divisorb#5 reg byte x 4.0
(byte) div8s::neg
(byte) div8s::neg#2 neg zp ZP_BYTE:13 2.0
(byte) div8s::neg#3 neg zp ZP_BYTE:13 1.0
(byte) div8s::neg#4 neg zp ZP_BYTE:13 0.8571428571428571
(byte) div8s::neg#2 neg zp ZP_BYTE:17 2.0
(byte) div8s::neg#3 neg zp ZP_BYTE:17 1.0
(byte) div8s::neg#4 neg zp ZP_BYTE:17 0.8571428571428571
(byte) div8s::rem8u
(byte) div8s::rem8u#0 rem8u zp ZP_BYTE:16 0.024390243902439025
(byte) div8s::rem8u#0 rem8u zp ZP_BYTE:22 0.024390243902439025
(byte) div8s::resultb
(byte) div8s::resultb#0 reg byte y 0.6666666666666666
(signed byte) div8s::return
@ -62,22 +96,22 @@
(label) div8u::@6
(label) div8u::@return
(byte) div8u::dividend
(byte) div8u::dividend#0 dividend zp ZP_BYTE:11 25.25
(byte) div8u::dividend#1 dividend zp ZP_BYTE:11 2.0
(byte) div8u::dividend#2 dividend zp ZP_BYTE:11 11.0
(byte) div8u::dividend#3 dividend zp ZP_BYTE:11 50.83333333333333
(byte) div8u::dividend#5 dividend zp ZP_BYTE:11 15.0
(byte) div8u::dividend#0 dividend zp ZP_BYTE:15 25.25
(byte) div8u::dividend#1 dividend zp ZP_BYTE:15 2.0
(byte) div8u::dividend#2 dividend zp ZP_BYTE:15 11.0
(byte) div8u::dividend#3 dividend zp ZP_BYTE:15 50.83333333333333
(byte) div8u::dividend#5 dividend zp ZP_BYTE:15 15.0
(byte) div8u::divisor
(byte) div8u::divisor#0 divisor zp ZP_BYTE:10 4.0
(byte) div8u::divisor#1 divisor zp ZP_BYTE:10 22.0
(byte) div8u::divisor#6 divisor zp ZP_BYTE:10 14.333333333333332
(byte) div8u::divisor#0 divisor zp ZP_BYTE:14 4.0
(byte) div8u::divisor#1 divisor zp ZP_BYTE:14 22.0
(byte) div8u::divisor#6 divisor zp ZP_BYTE:14 14.333333333333332
(byte) div8u::i
(byte) div8u::i#1 reg byte x 151.5
(byte) div8u::i#2 reg byte x 16.833333333333332
(byte) div8u::quotient
(byte) div8u::quotient#1 quotient zp ZP_BYTE:12 151.5
(byte) div8u::quotient#2 quotient zp ZP_BYTE:12 101.0
(byte) div8u::quotient#3 quotient zp ZP_BYTE:12 28.857142857142858
(byte) div8u::quotient#1 quotient zp ZP_BYTE:16 151.5
(byte) div8u::quotient#2 quotient zp ZP_BYTE:16 101.0
(byte) div8u::quotient#3 quotient zp ZP_BYTE:16 28.857142857142858
(byte) div8u::rem
(byte) div8u::rem#1 reg byte y 101.0
(byte) div8u::rem#2 reg byte y 202.0
@ -86,19 +120,20 @@
(byte) div8u::rem#5 reg byte y 101.0
(byte) div8u::rem#8 reg byte y 101.66666666666667
(byte*) div8u::remainder
(byte*) div8u::remainder#8 remainder zp ZP_WORD:8 0.13333333333333333
(byte*) div8u::remainder#8 remainder zp ZP_WORD:5 0.13333333333333333
(byte) div8u::return
(byte) div8u::return#0 return zp ZP_BYTE:12 45.142857142857146
(byte) div8u::return#0 return zp ZP_BYTE:16 45.142857142857146
(byte) div8u::return#2 reg byte a 4.0
(byte) div8u::return#3 reg byte a 22.0
(byte*) line_cursor
(byte*) line_cursor#1 line_cursor zp ZP_WORD:3 9.131578947368421
(byte*) line_cursor#14 line_cursor zp ZP_WORD:3 204.0
(byte*) line_cursor#27 line_cursor zp ZP_WORD:3 24.0
(byte*) line_cursor#30 line_cursor zp ZP_WORD:3 0.9565217391304348
(byte*) line_cursor#1 line_cursor zp ZP_WORD:3 5.3478260869565215
(byte*) line_cursor#17 line_cursor zp ZP_WORD:3 204.0
(byte*) line_cursor#33 line_cursor zp ZP_WORD:3 35.0
(byte*) line_cursor#37 line_cursor zp ZP_WORD:3 0.9565217391304348
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(void()) print_byte((byte) print_byte::b)
(byte~) print_byte::$0 reg byte a 4.0
@ -106,12 +141,14 @@
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#1 b zp ZP_BYTE:5 11.0
(byte) print_byte::b#2 b zp ZP_BYTE:5 22.0
(byte) print_byte::b#3 b zp ZP_BYTE:5 22.0
(byte) print_byte::b#4 b zp ZP_BYTE:5 22.0
(byte) print_byte::b#5 b zp ZP_BYTE:5 12.5
(byte~) print_byte::b#7 b zp ZP_BYTE:5 4.0
(byte) print_byte::b#1 b zp ZP_BYTE:7 4.0
(byte) print_byte::b#2 b zp ZP_BYTE:7 4.0
(byte) print_byte::b#3 b zp ZP_BYTE:7 11.0
(byte) print_byte::b#4 b zp ZP_BYTE:7 22.0
(byte) print_byte::b#5 b zp ZP_BYTE:7 22.0
(byte) print_byte::b#6 b zp ZP_BYTE:7 22.0
(byte) print_byte::b#7 b zp ZP_BYTE:7 13.5
(byte~) print_byte::b#9 b zp ZP_BYTE:7 4.0
(byte[]) print_byte::hextab
(const string) print_byte::hextab#0 hextab = (string) "0123456789abcdef"
(void()) print_char((byte) print_char::ch)
@ -135,26 +172,65 @@
(label) print_sbyte::@4
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 b zp ZP_BYTE:5 4.0
(signed byte) print_sbyte::b#1 b zp ZP_BYTE:5 22.0
(signed byte) print_sbyte::b#2 b zp ZP_BYTE:5 22.0
(signed byte) print_sbyte::b#3 b zp ZP_BYTE:5 22.0
(signed byte) print_sbyte::b#4 b zp ZP_BYTE:5 22.0
(signed byte) print_sbyte::b#5 b zp ZP_BYTE:5 12.5
(signed byte) print_sbyte::b#6 b zp ZP_BYTE:5 4.0
(signed byte) print_sbyte::b#0 b zp ZP_BYTE:7 4.0
(signed byte) print_sbyte::b#1 b zp ZP_BYTE:7 22.0
(signed byte) print_sbyte::b#2 b zp ZP_BYTE:7 22.0
(signed byte) print_sbyte::b#3 b zp ZP_BYTE:7 22.0
(signed byte) print_sbyte::b#4 b zp ZP_BYTE:7 22.0
(signed byte) print_sbyte::b#5 b zp ZP_BYTE:7 12.5
(signed byte) print_sbyte::b#6 b zp ZP_BYTE:7 4.0
(void()) print_str((byte*) print_str::str)
(label) print_str::@1
(label) print_str::@2
(label) print_str::@return
(byte*) print_str::str
(byte*) print_str::str#0 str zp ZP_WORD:8 202.0
(byte*) print_str::str#7 str zp ZP_WORD:8 101.5
(byte*) print_str::str#9 str zp ZP_WORD:8 2.0
(byte*) print_str::str#0 str zp ZP_WORD:5 202.0
(byte*) print_str::str#10 str zp ZP_WORD:5 101.5
(byte*) print_str::str#12 str zp ZP_WORD:5 2.0
(void()) print_word((word) print_word::w)
(label) print_word::@1
(label) print_word::@return
(word) print_word::w
(word) print_word::w#0 w zp ZP_WORD:5 11.0
(word) print_word::w#1 w zp ZP_WORD:5 22.0
(word) print_word::w#2 w zp ZP_WORD:5 22.0
(word) print_word::w#3 w zp ZP_WORD:5 22.0
(word) print_word::w#4 w zp ZP_WORD:5 15.999999999999998
(word) rem16u
(word) rem16u#16 rem16u zp ZP_WORD:10 110.0
(signed byte) rem8s
(signed byte) rem8s#1 reg byte x 2.0
(signed byte) rem8s#18 reg byte x 110.0
(signed byte) rem8s#3 reg byte x 1.0833333333333333
(signed byte~) rem8s#30 reg byte x 4.0
(signed byte~) rem8s#32 reg byte x 4.0
(void()) test_16u()
(label) test_16u::@1
(label) test_16u::@10
(label) test_16u::@11
(label) test_16u::@3
(label) test_16u::@4
(label) test_16u::@5
(label) test_16u::@6
(label) test_16u::@7
(label) test_16u::@8
(label) test_16u::@9
(label) test_16u::@return
(word) test_16u::dividend
(word) test_16u::dividend#0 dividend zp ZP_WORD:5 4.714285714285714
(word[]) test_16u::dividends
(const word[]) test_16u::dividends#0 dividends = { (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535 }
(word) test_16u::divisor
(word) test_16u::divisor#0 divisor zp ZP_WORD:18 3.0
(word[]) test_16u::divisors
(const word[]) test_16u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
(byte) test_16u::i
(byte) test_16u::i#1 i zp ZP_BYTE:2 16.5
(byte) test_16u::i#10 i zp ZP_BYTE:2 1.76
(word) test_16u::res
(word) test_16u::res#0 res zp ZP_WORD:12 2.2
(const string) test_16u::str str = (string) " / @"
(const string) test_16u::str1 str1 = (string) " = @"
(const string) test_16u::str2 str2 = (string) " @"
(void()) test_8s()
(label) test_8s::@1
(label) test_8s::@10
@ -169,18 +245,18 @@
(label) test_8s::@9
(label) test_8s::@return
(signed byte) test_8s::dividend
(signed byte) test_8s::dividend#0 dividend zp ZP_BYTE:5 4.714285714285714
(signed byte) test_8s::dividend#0 dividend zp ZP_BYTE:7 4.714285714285714
(signed byte[]) test_8s::dividends
(const signed byte[]) test_8s::dividends#0 dividends = { (byte/signed byte/word/signed word/dword/signed dword) 127, -(byte/signed byte/word/signed word/dword/signed dword) 127, -(byte/signed byte/word/signed word/dword/signed dword) 127, (byte/signed byte/word/signed word/dword/signed dword) 127, (byte/signed byte/word/signed word/dword/signed dword) 127, (byte/signed byte/word/signed word/dword/signed dword) 127 }
(signed byte) test_8s::divisor
(signed byte) test_8s::divisor#0 divisor zp ZP_BYTE:15 3.3000000000000003
(signed byte) test_8s::divisor#0 divisor zp ZP_BYTE:21 3.3000000000000003
(signed byte[]) test_8s::divisors
(const signed byte[]) test_8s::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, -(byte/signed byte/word/signed word/dword/signed dword) 11, -(byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
(byte) test_8s::i
(byte) test_8s::i#1 i zp ZP_BYTE:2 11.0
(byte) test_8s::i#10 i zp ZP_BYTE:2 1.8333333333333333
(signed byte) test_8s::res
(signed byte) test_8s::res#0 res zp ZP_BYTE:10 2.4444444444444446
(signed byte) test_8s::res#0 res zp ZP_BYTE:14 2.4444444444444446
(const string) test_8s::str str = (string) " / @"
(const string) test_8s::str1 str1 = (string) " = @"
(const string) test_8s::str2 str2 = (string) " @"
@ -197,52 +273,58 @@
(label) test_8u::@9
(label) test_8u::@return
(byte) test_8u::dividend
(byte) test_8u::dividend#0 dividend zp ZP_BYTE:5 4.714285714285714
(byte) test_8u::dividend#0 dividend zp ZP_BYTE:7 4.714285714285714
(byte[]) test_8u::dividends
(const byte[]) test_8u::dividends#0 dividends = { (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255 }
(byte) test_8u::divisor
(byte) test_8u::divisor#0 divisor zp ZP_BYTE:10 3.0
(byte) test_8u::divisor#0 divisor zp ZP_BYTE:14 3.0
(byte[]) test_8u::divisors
(const byte[]) test_8u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
(byte) test_8u::i
(byte) test_8u::i#1 i zp ZP_BYTE:2 16.5
(byte) test_8u::i#10 i zp ZP_BYTE:2 1.76
(byte) test_8u::rem
(byte) test_8u::rem#0 rem zp ZP_BYTE:14 0.12745098039215685
(byte) test_8u::rem#0 rem zp ZP_BYTE:20 0.12745098039215685
(byte) test_8u::res
(byte) test_8u::res#0 reg byte x 2.2
(const string) test_8u::str str = (string) " / @"
(const string) test_8u::str1 str1 = (string) " = @"
(const string) test_8u::str2 str2 = (string) " @"
zp ZP_BYTE:2 [ test_8u::i#10 test_8u::i#1 test_8s::i#10 test_8s::i#1 ]
zp ZP_WORD:3 [ line_cursor#14 line_cursor#27 line_cursor#30 line_cursor#1 print_cls::sc#2 print_cls::sc#1 ]
zp ZP_BYTE:5 [ print_byte::b#5 print_byte::b#7 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 test_8u::dividend#0 test_8s::dividend#0 ]
zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 test_8u::i#10 test_8u::i#1 test_8s::i#10 test_8s::i#1 ]
zp ZP_WORD:3 [ line_cursor#17 line_cursor#33 line_cursor#1 line_cursor#37 print_cls::sc#2 print_cls::sc#1 ]
zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 test_16u::dividend#0 print_str::str#10 print_str::str#12 print_str::str#0 div8u::remainder#8 ]
zp ZP_BYTE:7 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 test_8u::dividend#0 test_8s::dividend#0 ]
reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ]
zp ZP_WORD:6 [ char_cursor#48 char_cursor#78 char_cursor#76 char_cursor#91 char_cursor#2 char_cursor#11 char_cursor#77 char_cursor#1 char_cursor#81 char_cursor#100 ]
zp ZP_WORD:8 [ print_str::str#7 print_str::str#9 print_str::str#0 div8u::remainder#8 ]
zp ZP_BYTE:10 [ div8u::divisor#6 div8u::divisor#0 div8u::divisor#1 test_8u::divisor#0 test_8s::res#0 ]
zp ZP_WORD:8 [ char_cursor#64 char_cursor#105 char_cursor#102 char_cursor#104 char_cursor#121 char_cursor#100 char_cursor#14 char_cursor#128 char_cursor#103 char_cursor#1 char_cursor#109 char_cursor#137 div16u::dividend#2 div16u::dividend#1 div16u::dividend#0 ]
zp ZP_WORD:10 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ]
zp ZP_WORD:12 [ div16u::quotient#3 div16u::return#0 div16u::quotient#1 div16u::quotient#2 div16u::return#2 test_16u::res#0 ]
reg byte x [ div16u::i#2 div16u::i#1 ]
zp ZP_BYTE:14 [ div8u::divisor#6 div8u::divisor#0 div8u::divisor#1 test_8u::divisor#0 test_8s::res#0 ]
reg byte y [ div8u::rem#4 div8u::rem#8 div8u::rem#5 div8u::rem#1 div8u::rem#2 div8u::rem#3 ]
zp ZP_BYTE:11 [ div8u::dividend#3 div8u::dividend#5 div8u::dividend#1 div8u::dividend#2 div8u::dividend#0 ]
zp ZP_BYTE:12 [ div8u::quotient#3 div8u::return#0 div8u::quotient#1 div8u::quotient#2 ]
zp ZP_BYTE:15 [ div8u::dividend#3 div8u::dividend#5 div8u::dividend#1 div8u::dividend#2 div8u::dividend#0 ]
zp ZP_BYTE:16 [ div8u::quotient#3 div8u::return#0 div8u::quotient#1 div8u::quotient#2 ]
reg byte x [ div8u::i#2 div8u::i#1 ]
reg byte x [ rem8s#18 rem8s#3 rem8s#30 rem8s#1 ]
reg byte x [ rem8s#18 rem8s#3 rem8s#32 rem8s#1 ]
reg byte y [ div8s::dividendb#3 div8s::dividendb#7 div8s::dividendb#8 ]
reg byte x [ div8s::divisorb#3 div8s::divisorb#4 div8s::divisorb#5 ]
zp ZP_BYTE:13 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ]
zp ZP_BYTE:17 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ]
reg byte a [ div8s::return#2 div8s::return#6 div8s::return#0 ]
zp ZP_BYTE:14 [ test_8u::rem#0 ]
reg byte a [ div8u::return#3 ]
reg byte x [ test_8u::res#0 ]
zp ZP_WORD:18 [ test_16u::divisor#0 div16u::divisor#0 ]
reg byte a [ print_byte::$0 ]
reg byte a [ print_byte::$2 ]
reg byte a [ div16u::$1 ]
reg byte a [ div16u::$2 ]
zp ZP_BYTE:20 [ test_8u::rem#0 ]
reg byte a [ div8u::return#3 ]
reg byte x [ test_8u::res#0 ]
reg byte a [ div8u::$1 ]
zp ZP_BYTE:15 [ test_8s::divisor#0 ]
zp ZP_BYTE:21 [ test_8s::divisor#0 ]
reg byte a [ div8s::dividend#0 ]
reg byte x [ div8s::divisor#0 ]
reg byte a [ div8s::return#3 ]
reg byte a [ div8s::$2 ]
reg byte x [ div8s::$7 ]
zp ZP_BYTE:16 [ div8s::rem8u#0 ]
zp ZP_BYTE:22 [ div8s::rem8u#0 ]
reg byte a [ div8u::return#2 ]
reg byte y [ div8s::resultb#0 ]