mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-25 20:32:25 +00:00
Fixed problem with casting negative 8-bit numbers to 16-bit. Closes #496
This commit is contained in:
parent
b336ba38df
commit
d39893f97a
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 1533d6e417
|
||||
//KICKC FRAGMENT CACHE 161ce03ba6
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
18271
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
18271
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
File diff suppressed because it is too large
Load Diff
6
src/main/fragment/mos6502-common/vwsm1=vbsaa.asm
Normal file
6
src/main/fragment/mos6502-common/vwsm1=vbsaa.asm
Normal file
@ -0,0 +1,6 @@
|
||||
sta {m1}
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta {m1}+1
|
4
src/main/fragment/mos6502-common/vwsm1=vbsc1.asm
Normal file
4
src/main/fragment/mos6502-common/vwsm1=vbsc1.asm
Normal file
@ -0,0 +1,4 @@
|
||||
lda #<{c1}
|
||||
sta {m1}
|
||||
lda #>{c1}
|
||||
sta {m1}+1
|
@ -818,15 +818,25 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx_(lt|gt|le|ge|eq|neq)_(.*c1.*)", rvalAa, "lda {c1},x", "vb$1aa_$2_$3", null, null));
|
||||
|
||||
// Use unsigned ASM to synthesize signed ASM ( ...vbs... -> ...vbu... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)_(eq|neq)_(v.s..)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)_(band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(p.s..)_derefidx_(vbu..)", null, null, "$1=$2_derefidx_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=_(inc|dec)_(v.s..)", null, null, "$1=_$2_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbuz.|vbuaa|vbuxx|vbuyy)=_(lo|hi)_vws(z.|c.|m.)", null, null, "$1=_$2_vwu$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbs..)=(vbs..)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vws..)=(vws..)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vds..)=(vds..)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbs..)_(eq|neq)_(vbs..)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vws..)_(eq|neq)_(vws..)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vds..)_(eq|neq)_(vds..)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbs..)=(vbs..)_(band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vws..)=(vws..)_(band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vds..)=(vds..)_(band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbs..)=(pbs..)_derefidx_(vbu..)", null, null, "$1=$2_derefidx_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vws..)=(pws..)_derefidx_(vbu..)", null, null, "$1=$2_derefidx_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vds..)=(pds..)_derefidx_(vbu..)", null, null, "$1=$2_derefidx_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbs..)=_(inc|dec)_(vbs..)", null, null, "$1=_$2_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vws..)=_(inc|dec)_(vws..)", null, null, "$1=_$2_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vds..)=_(inc|dec)_(vds..)", null, null, "$1=_$2_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb[su]..)=(vb[su]..)_(plus|minus)_(vb[su]..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vw[su]..)=(vw[su]..)_(plus|minus)_(vw[su]..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vd[su]..)=(vd[su]..)_(plus|minus)_(vd[su]..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbu..)=_(lo|hi)_vws(z.|c.|m.)", null, null, "$1=_$2_vwu$3", null, mapSToU));
|
||||
|
||||
// Use Z1/Z2 ASM to synthesize Z1-only code ( ...z1...z1... -> ...z1...z2... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..[zm])1=(v..[zm])1_(plus|minus|band|bxor|bor)_(.*)", oneZM2, null, "$11=$22_$3_$4", null, mapZM1, false));
|
||||
|
@ -42,6 +42,11 @@ public class TestPrograms {
|
||||
public TestPrograms() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCastingNegative() throws IOException, URISyntaxException {
|
||||
compileAndCompare("casting-negative.c");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testForEver2() throws IOException, URISyntaxException {
|
||||
compileAndCompare("for-ever-2.c");
|
||||
@ -188,12 +193,12 @@ public class TestPrograms {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPolygon() throws IOException, URISyntaxException {
|
||||
public void testXyScroller() throws IOException, URISyntaxException {
|
||||
compileAndCompare("complex/xy-scroller/xy-scroller.c");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testXyScroller() throws IOException, URISyntaxException {
|
||||
public void testPolygon() throws IOException, URISyntaxException {
|
||||
compileAndCompare("complex/polygon/polygon.c");
|
||||
}
|
||||
|
||||
|
19
src/test/kc/casting-negative.c
Normal file
19
src/test/kc/casting-negative.c
Normal file
@ -0,0 +1,19 @@
|
||||
// Demonstrates problem with Casting of negative signed values
|
||||
// https://gitlab.com/camelot/kickc/-/issues/496
|
||||
|
||||
#include <conio.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void test_casting(signed short signed_short_value) {
|
||||
printf("%d\n", signed_short_value);
|
||||
}
|
||||
|
||||
void main() {
|
||||
clrscr();
|
||||
signed char signed_char_value = -5;
|
||||
while (signed_char_value != 0) {
|
||||
++signed_char_value;
|
||||
test_casting(signed_char_value);
|
||||
//printf("%d\n", (signed short)signed_char_value);
|
||||
}
|
||||
}
|
552
src/test/ref/casting-negative.asm
Normal file
552
src/test/ref/casting-negative.asm
Normal file
@ -0,0 +1,552 @@
|
||||
// Demonstrates problem with Casting of negative signed values
|
||||
// https://gitlab.com/camelot/kickc/-/issues/496
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(__start)
|
||||
.pc = $80d "Program"
|
||||
.const LIGHT_BLUE = $e
|
||||
.const OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
|
||||
.const SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
|
||||
// Color Ram
|
||||
.label COLORRAM = $d800
|
||||
// Default address of screen character matrix
|
||||
.label DEFAULT_SCREEN = $400
|
||||
// The number of bytes on the screen
|
||||
// The current cursor x-position
|
||||
.label conio_cursor_x = $a
|
||||
// The current cursor y-position
|
||||
.label conio_cursor_y = $b
|
||||
// The current text cursor line start
|
||||
.label conio_line_text = $c
|
||||
// The current color cursor line start
|
||||
.label conio_line_color = $e
|
||||
__start: {
|
||||
// conio_cursor_x = 0
|
||||
lda #0
|
||||
sta.z conio_cursor_x
|
||||
// conio_cursor_y = 0
|
||||
sta.z conio_cursor_y
|
||||
// conio_line_text = CONIO_SCREEN_TEXT
|
||||
lda #<DEFAULT_SCREEN
|
||||
sta.z conio_line_text
|
||||
lda #>DEFAULT_SCREEN
|
||||
sta.z conio_line_text+1
|
||||
// conio_line_color = CONIO_SCREEN_COLORS
|
||||
lda #<COLORRAM
|
||||
sta.z conio_line_color
|
||||
lda #>COLORRAM
|
||||
sta.z conio_line_color+1
|
||||
jsr main
|
||||
rts
|
||||
}
|
||||
main: {
|
||||
.label signed_char_value = 2
|
||||
// clrscr()
|
||||
jsr clrscr
|
||||
lda #-5
|
||||
sta.z signed_char_value
|
||||
__b1:
|
||||
// while (signed_char_value != 0)
|
||||
lda.z signed_char_value
|
||||
cmp #0
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// ++signed_char_value;
|
||||
inc.z signed_char_value
|
||||
// test_casting(signed_char_value)
|
||||
lda.z signed_char_value
|
||||
sta.z test_casting.signed_short_value
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta.z test_casting.signed_short_value+1
|
||||
jsr test_casting
|
||||
jmp __b1
|
||||
}
|
||||
// clears the screen and moves the cursor to the upper left-hand corner of the screen.
|
||||
clrscr: {
|
||||
.label line_text = 3
|
||||
.label line_cols = 5
|
||||
lda #<COLORRAM
|
||||
sta.z line_cols
|
||||
lda #>COLORRAM
|
||||
sta.z line_cols+1
|
||||
lda #<DEFAULT_SCREEN
|
||||
sta.z line_text
|
||||
lda #>DEFAULT_SCREEN
|
||||
sta.z line_text+1
|
||||
ldx #0
|
||||
__b1:
|
||||
// for( char l=0;l<CONIO_HEIGHT; l++ )
|
||||
cpx #$19
|
||||
bcc __b2
|
||||
// conio_cursor_x = 0
|
||||
lda #0
|
||||
sta.z conio_cursor_x
|
||||
// conio_cursor_y = 0
|
||||
sta.z conio_cursor_y
|
||||
// conio_line_text = CONIO_SCREEN_TEXT
|
||||
lda #<DEFAULT_SCREEN
|
||||
sta.z conio_line_text
|
||||
lda #>DEFAULT_SCREEN
|
||||
sta.z conio_line_text+1
|
||||
// conio_line_color = CONIO_SCREEN_COLORS
|
||||
lda #<COLORRAM
|
||||
sta.z conio_line_color
|
||||
lda #>COLORRAM
|
||||
sta.z conio_line_color+1
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
ldy #0
|
||||
__b3:
|
||||
// for( char c=0;c<CONIO_WIDTH; c++ )
|
||||
cpy #$28
|
||||
bcc __b4
|
||||
// line_text += CONIO_WIDTH
|
||||
lda #$28
|
||||
clc
|
||||
adc.z line_text
|
||||
sta.z line_text
|
||||
bcc !+
|
||||
inc.z line_text+1
|
||||
!:
|
||||
// line_cols += CONIO_WIDTH
|
||||
lda #$28
|
||||
clc
|
||||
adc.z line_cols
|
||||
sta.z line_cols
|
||||
bcc !+
|
||||
inc.z line_cols+1
|
||||
!:
|
||||
// for( char l=0;l<CONIO_HEIGHT; l++ )
|
||||
inx
|
||||
jmp __b1
|
||||
__b4:
|
||||
// line_text[c] = ' '
|
||||
lda #' '
|
||||
sta (line_text),y
|
||||
// line_cols[c] = conio_textcolor
|
||||
lda #LIGHT_BLUE
|
||||
sta (line_cols),y
|
||||
// for( char c=0;c<CONIO_WIDTH; c++ )
|
||||
iny
|
||||
jmp __b3
|
||||
}
|
||||
// test_casting(signed word zp(3) signed_short_value)
|
||||
test_casting: {
|
||||
.label signed_short_value = 3
|
||||
// printf("%d\n", signed_short_value)
|
||||
jsr printf_sint
|
||||
// printf("%d\n", signed_short_value)
|
||||
lda #<s
|
||||
sta.z cputs.s
|
||||
lda #>s
|
||||
sta.z cputs.s+1
|
||||
jsr cputs
|
||||
// }
|
||||
rts
|
||||
s: .text @"\n"
|
||||
.byte 0
|
||||
}
|
||||
// Print a signed integer using a specific format
|
||||
// printf_sint(signed word zp(3) value)
|
||||
printf_sint: {
|
||||
.label value = 3
|
||||
// printf_buffer.sign = 0
|
||||
// Handle any sign
|
||||
lda #0
|
||||
sta printf_buffer
|
||||
// if(value<0)
|
||||
lda.z value+1
|
||||
bmi __b1
|
||||
jmp __b2
|
||||
__b1:
|
||||
// value = -value
|
||||
sec
|
||||
lda #0
|
||||
sbc.z value
|
||||
sta.z value
|
||||
lda #0
|
||||
sbc.z value+1
|
||||
sta.z value+1
|
||||
// printf_buffer.sign = '-'
|
||||
lda #'-'
|
||||
sta printf_buffer
|
||||
__b2:
|
||||
// utoa(uvalue, printf_buffer.digits, format.radix)
|
||||
jsr utoa
|
||||
// printf_number_buffer(printf_buffer, format)
|
||||
lda printf_buffer
|
||||
// Print using format
|
||||
jsr printf_number_buffer
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Output a NUL-terminated string at the current cursor position
|
||||
// cputs(byte* zp(5) s)
|
||||
cputs: {
|
||||
.label s = 5
|
||||
__b1:
|
||||
// while(c=*s++)
|
||||
ldy #0
|
||||
lda (s),y
|
||||
inc.z s
|
||||
bne !+
|
||||
inc.z s+1
|
||||
!:
|
||||
cmp #0
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// cputc(c)
|
||||
jsr cputc
|
||||
jmp __b1
|
||||
}
|
||||
// Converts unsigned number value to a string representing it in RADIX format.
|
||||
// If the leading digits are zero they are not included in the string.
|
||||
// - 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 zp(3) value, byte* zp($12) buffer)
|
||||
utoa: {
|
||||
.const max_digits = 5
|
||||
.label digit_value = $10
|
||||
.label buffer = $12
|
||||
.label digit = 7
|
||||
.label value = 3
|
||||
lda #<printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
|
||||
sta.z buffer
|
||||
lda #>printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
|
||||
sta.z buffer+1
|
||||
ldx #0
|
||||
txa
|
||||
sta.z digit
|
||||
__b1:
|
||||
// for( char digit=0; digit<max_digits-1; digit++ )
|
||||
lda.z digit
|
||||
cmp #max_digits-1
|
||||
bcc __b2
|
||||
// *buffer++ = DIGITS[(char)value]
|
||||
lda.z value
|
||||
tay
|
||||
lda DIGITS,y
|
||||
ldy #0
|
||||
sta (buffer),y
|
||||
// *buffer++ = DIGITS[(char)value];
|
||||
inc.z buffer
|
||||
bne !+
|
||||
inc.z buffer+1
|
||||
!:
|
||||
// *buffer = 0
|
||||
lda #0
|
||||
tay
|
||||
sta (buffer),y
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// digit_value = digit_values[digit]
|
||||
lda.z digit
|
||||
asl
|
||||
tay
|
||||
lda RADIX_DECIMAL_VALUES,y
|
||||
sta.z digit_value
|
||||
lda RADIX_DECIMAL_VALUES+1,y
|
||||
sta.z digit_value+1
|
||||
// if (started || value >= digit_value)
|
||||
cpx #0
|
||||
bne __b5
|
||||
cmp.z value+1
|
||||
bne !+
|
||||
lda.z digit_value
|
||||
cmp.z value
|
||||
beq __b5
|
||||
!:
|
||||
bcc __b5
|
||||
__b4:
|
||||
// for( char digit=0; digit<max_digits-1; digit++ )
|
||||
inc.z digit
|
||||
jmp __b1
|
||||
__b5:
|
||||
// utoa_append(buffer++, value, digit_value)
|
||||
jsr utoa_append
|
||||
// utoa_append(buffer++, value, digit_value)
|
||||
// value = utoa_append(buffer++, value, digit_value)
|
||||
// value = utoa_append(buffer++, value, digit_value);
|
||||
inc.z buffer
|
||||
bne !+
|
||||
inc.z buffer+1
|
||||
!:
|
||||
ldx #1
|
||||
jmp __b4
|
||||
}
|
||||
// Print the contents of the number buffer using a specific format.
|
||||
// This handles minimum length, zero-filling, and left/right justification from the format
|
||||
// printf_number_buffer(byte register(A) buffer_sign)
|
||||
printf_number_buffer: {
|
||||
.label buffer_digits = printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
|
||||
// if(buffer.sign)
|
||||
cmp #0
|
||||
beq __b2
|
||||
// cputc(buffer.sign)
|
||||
jsr cputc
|
||||
__b2:
|
||||
// cputs(buffer.digits)
|
||||
lda #<buffer_digits
|
||||
sta.z cputs.s
|
||||
lda #>buffer_digits
|
||||
sta.z cputs.s+1
|
||||
jsr cputs
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Output one character at the current cursor position
|
||||
// Moves the cursor forward. Scrolls the entire screen if needed
|
||||
// cputc(byte register(A) c)
|
||||
cputc: {
|
||||
// if(c=='\n')
|
||||
cmp #'\n'
|
||||
beq __b1
|
||||
// conio_line_text[conio_cursor_x] = c
|
||||
ldy.z conio_cursor_x
|
||||
sta (conio_line_text),y
|
||||
// conio_line_color[conio_cursor_x] = conio_textcolor
|
||||
lda #LIGHT_BLUE
|
||||
sta (conio_line_color),y
|
||||
// if(++conio_cursor_x==CONIO_WIDTH)
|
||||
inc.z conio_cursor_x
|
||||
lda #$28
|
||||
cmp.z conio_cursor_x
|
||||
bne __breturn
|
||||
// cputln()
|
||||
jsr cputln
|
||||
__breturn:
|
||||
// }
|
||||
rts
|
||||
__b1:
|
||||
// cputln()
|
||||
jsr cputln
|
||||
rts
|
||||
}
|
||||
// Used to convert a single digit of an unsigned number value to a string representation
|
||||
// Counts a single digit up from '0' as long as the value is larger than sub.
|
||||
// Each time the digit is increased sub is subtracted from value.
|
||||
// - buffer : pointer to the char that receives the digit
|
||||
// - value : The value where the digit will be derived from
|
||||
// - 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* zp($12) buffer, word zp(3) value, word zp($10) sub)
|
||||
utoa_append: {
|
||||
.label buffer = $12
|
||||
.label value = 3
|
||||
.label sub = $10
|
||||
.label return = 3
|
||||
ldx #0
|
||||
__b1:
|
||||
// while (value >= sub)
|
||||
lda.z sub+1
|
||||
cmp.z value+1
|
||||
bne !+
|
||||
lda.z sub
|
||||
cmp.z value
|
||||
beq __b2
|
||||
!:
|
||||
bcc __b2
|
||||
// *buffer = DIGITS[digit]
|
||||
lda DIGITS,x
|
||||
ldy #0
|
||||
sta (buffer),y
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// digit++;
|
||||
inx
|
||||
// value -= sub
|
||||
lda.z value
|
||||
sec
|
||||
sbc.z sub
|
||||
sta.z value
|
||||
lda.z value+1
|
||||
sbc.z sub+1
|
||||
sta.z value+1
|
||||
jmp __b1
|
||||
}
|
||||
// Print a newline
|
||||
cputln: {
|
||||
// conio_line_text += CONIO_WIDTH
|
||||
lda #$28
|
||||
clc
|
||||
adc.z conio_line_text
|
||||
sta.z conio_line_text
|
||||
bcc !+
|
||||
inc.z conio_line_text+1
|
||||
!:
|
||||
// conio_line_color += CONIO_WIDTH
|
||||
lda #$28
|
||||
clc
|
||||
adc.z conio_line_color
|
||||
sta.z conio_line_color
|
||||
bcc !+
|
||||
inc.z conio_line_color+1
|
||||
!:
|
||||
// conio_cursor_x = 0
|
||||
lda #0
|
||||
sta.z conio_cursor_x
|
||||
// conio_cursor_y++;
|
||||
inc.z conio_cursor_y
|
||||
// cscroll()
|
||||
jsr cscroll
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Scroll the entire screen if the cursor is beyond the last line
|
||||
cscroll: {
|
||||
// if(conio_cursor_y==CONIO_HEIGHT)
|
||||
lda #$19
|
||||
cmp.z conio_cursor_y
|
||||
bne __breturn
|
||||
// memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
|
||||
lda #<DEFAULT_SCREEN
|
||||
sta.z memcpy.destination
|
||||
lda #>DEFAULT_SCREEN
|
||||
sta.z memcpy.destination+1
|
||||
lda #<DEFAULT_SCREEN+$28
|
||||
sta.z memcpy.source
|
||||
lda #>DEFAULT_SCREEN+$28
|
||||
sta.z memcpy.source+1
|
||||
jsr memcpy
|
||||
// memcpy(CONIO_SCREEN_COLORS, CONIO_SCREEN_COLORS+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
|
||||
lda #<COLORRAM
|
||||
sta.z memcpy.destination
|
||||
lda #>COLORRAM
|
||||
sta.z memcpy.destination+1
|
||||
lda #<COLORRAM+$28
|
||||
sta.z memcpy.source
|
||||
lda #>COLORRAM+$28
|
||||
sta.z memcpy.source+1
|
||||
jsr memcpy
|
||||
// memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH)
|
||||
ldx #' '
|
||||
lda #<DEFAULT_SCREEN+$19*$28-$28
|
||||
sta.z memset.str
|
||||
lda #>DEFAULT_SCREEN+$19*$28-$28
|
||||
sta.z memset.str+1
|
||||
jsr memset
|
||||
// memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH)
|
||||
ldx #LIGHT_BLUE
|
||||
lda #<COLORRAM+$19*$28-$28
|
||||
sta.z memset.str
|
||||
lda #>COLORRAM+$19*$28-$28
|
||||
sta.z memset.str+1
|
||||
jsr memset
|
||||
// conio_line_text -= CONIO_WIDTH
|
||||
sec
|
||||
lda.z conio_line_text
|
||||
sbc #$28
|
||||
sta.z conio_line_text
|
||||
lda.z conio_line_text+1
|
||||
sbc #0
|
||||
sta.z conio_line_text+1
|
||||
// conio_line_color -= CONIO_WIDTH
|
||||
sec
|
||||
lda.z conio_line_color
|
||||
sbc #$28
|
||||
sta.z conio_line_color
|
||||
lda.z conio_line_color+1
|
||||
sbc #0
|
||||
sta.z conio_line_color+1
|
||||
// conio_cursor_y--;
|
||||
dec.z conio_cursor_y
|
||||
__breturn:
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Copy block of memory (forwards)
|
||||
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
|
||||
// memcpy(void* zp(8) destination, void* zp($12) source)
|
||||
memcpy: {
|
||||
.label src_end = $10
|
||||
.label dst = 8
|
||||
.label src = $12
|
||||
.label source = $12
|
||||
.label destination = 8
|
||||
// src_end = (char*)source+num
|
||||
lda.z source
|
||||
clc
|
||||
adc #<$19*$28-$28
|
||||
sta.z src_end
|
||||
lda.z source+1
|
||||
adc #>$19*$28-$28
|
||||
sta.z src_end+1
|
||||
__b1:
|
||||
// while(src!=src_end)
|
||||
lda.z src+1
|
||||
cmp.z src_end+1
|
||||
bne __b2
|
||||
lda.z src
|
||||
cmp.z src_end
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// *dst++ = *src++
|
||||
ldy #0
|
||||
lda (src),y
|
||||
sta (dst),y
|
||||
// *dst++ = *src++;
|
||||
inc.z dst
|
||||
bne !+
|
||||
inc.z dst+1
|
||||
!:
|
||||
inc.z src
|
||||
bne !+
|
||||
inc.z src+1
|
||||
!:
|
||||
jmp __b1
|
||||
}
|
||||
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
|
||||
// memset(void* zp(8) str, byte register(X) c)
|
||||
memset: {
|
||||
.label end = $12
|
||||
.label dst = 8
|
||||
.label str = 8
|
||||
// end = (char*)str + num
|
||||
lda #$28
|
||||
clc
|
||||
adc.z str
|
||||
sta.z end
|
||||
lda #0
|
||||
adc.z str+1
|
||||
sta.z end+1
|
||||
__b2:
|
||||
// for(char* dst = str; dst!=end; dst++)
|
||||
lda.z dst+1
|
||||
cmp.z end+1
|
||||
bne __b3
|
||||
lda.z dst
|
||||
cmp.z end
|
||||
bne __b3
|
||||
// }
|
||||
rts
|
||||
__b3:
|
||||
// *dst = c
|
||||
txa
|
||||
ldy #0
|
||||
sta (dst),y
|
||||
// for(char* dst = str; dst!=end; dst++)
|
||||
inc.z dst
|
||||
bne !+
|
||||
inc.z dst+1
|
||||
!:
|
||||
jmp __b2
|
||||
}
|
||||
// The digits used for numbers
|
||||
DIGITS: .text "0123456789abcdef"
|
||||
// Values of decimal digits
|
||||
RADIX_DECIMAL_VALUES: .word $2710, $3e8, $64, $a
|
||||
// Buffer used for stringified number being printed
|
||||
printf_buffer: .fill SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER, 0
|
316
src/test/ref/casting-negative.cfg
Normal file
316
src/test/ref/casting-negative.cfg
Normal file
@ -0,0 +1,316 @@
|
||||
|
||||
(void()) __start()
|
||||
__start: scope:[__start] from
|
||||
[0] phi()
|
||||
to:__start::__init1
|
||||
__start::__init1: scope:[__start] from __start
|
||||
[1] (byte) conio_cursor_x ← (byte) 0
|
||||
[2] (byte) conio_cursor_y ← (byte) 0
|
||||
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
|
||||
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
|
||||
to:__start::@1
|
||||
__start::@1: scope:[__start] from __start::__init1
|
||||
[5] phi()
|
||||
[6] call main
|
||||
to:__start::@return
|
||||
__start::@return: scope:[__start] from __start::@1
|
||||
[7] return
|
||||
to:@return
|
||||
|
||||
(void()) main()
|
||||
main: scope:[main] from __start::@1
|
||||
[8] phi()
|
||||
[9] call clrscr
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@2
|
||||
[10] (signed byte) main::signed_char_value#2 ← phi( main/(signed byte) -5 main::@2/(signed byte) main::signed_char_value#1 )
|
||||
[11] if((signed byte) main::signed_char_value#2!=(signed byte) 0) goto main::@2
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[12] return
|
||||
to:@return
|
||||
main::@2: scope:[main] from main::@1
|
||||
[13] (signed byte) main::signed_char_value#1 ← ++ (signed byte) main::signed_char_value#2
|
||||
[14] (signed word) test_casting::signed_short_value#0 ← (signed byte) main::signed_char_value#1
|
||||
[15] call test_casting
|
||||
to:main::@1
|
||||
|
||||
(void()) clrscr()
|
||||
clrscr: scope:[clrscr] from main
|
||||
[16] phi()
|
||||
to:clrscr::@1
|
||||
clrscr::@1: scope:[clrscr] from clrscr clrscr::@5
|
||||
[17] (byte*) clrscr::line_cols#5 ← phi( clrscr/(const nomodify byte*) COLORRAM clrscr::@5/(byte*) clrscr::line_cols#1 )
|
||||
[17] (byte*) clrscr::line_text#5 ← phi( clrscr/(const nomodify byte*) DEFAULT_SCREEN clrscr::@5/(byte*) clrscr::line_text#1 )
|
||||
[17] (byte) clrscr::l#2 ← phi( clrscr/(byte) 0 clrscr::@5/(byte) clrscr::l#1 )
|
||||
[18] if((byte) clrscr::l#2<(byte) $19) goto clrscr::@3
|
||||
to:clrscr::@2
|
||||
clrscr::@2: scope:[clrscr] from clrscr::@1
|
||||
[19] (byte) conio_cursor_x ← (byte) 0
|
||||
[20] (byte) conio_cursor_y ← (byte) 0
|
||||
[21] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
|
||||
[22] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
|
||||
to:clrscr::@return
|
||||
clrscr::@return: scope:[clrscr] from clrscr::@2
|
||||
[23] return
|
||||
to:@return
|
||||
clrscr::@3: scope:[clrscr] from clrscr::@1 clrscr::@4
|
||||
[24] (byte) clrscr::c#2 ← phi( clrscr::@1/(byte) 0 clrscr::@4/(byte) clrscr::c#1 )
|
||||
[25] if((byte) clrscr::c#2<(byte) $28) goto clrscr::@4
|
||||
to:clrscr::@5
|
||||
clrscr::@5: scope:[clrscr] from clrscr::@3
|
||||
[26] (byte*) clrscr::line_text#1 ← (byte*) clrscr::line_text#5 + (byte) $28
|
||||
[27] (byte*) clrscr::line_cols#1 ← (byte*) clrscr::line_cols#5 + (byte) $28
|
||||
[28] (byte) clrscr::l#1 ← ++ (byte) clrscr::l#2
|
||||
to:clrscr::@1
|
||||
clrscr::@4: scope:[clrscr] from clrscr::@3
|
||||
[29] *((byte*) clrscr::line_text#5 + (byte) clrscr::c#2) ← (byte) ' '
|
||||
[30] *((byte*) clrscr::line_cols#5 + (byte) clrscr::c#2) ← (const nomodify byte) LIGHT_BLUE
|
||||
[31] (byte) clrscr::c#1 ← ++ (byte) clrscr::c#2
|
||||
to:clrscr::@3
|
||||
|
||||
(void()) test_casting((signed word) test_casting::signed_short_value)
|
||||
test_casting: scope:[test_casting] from main::@2
|
||||
[32] (signed word) printf_sint::value#1 ← (signed word) test_casting::signed_short_value#0
|
||||
[33] call printf_sint
|
||||
to:test_casting::@1
|
||||
test_casting::@1: scope:[test_casting] from test_casting
|
||||
[34] phi()
|
||||
[35] call cputs
|
||||
to:test_casting::@return
|
||||
test_casting::@return: scope:[test_casting] from test_casting::@1
|
||||
[36] return
|
||||
to:@return
|
||||
|
||||
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
|
||||
printf_sint: scope:[printf_sint] from test_casting
|
||||
[37] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
|
||||
[38] if((signed word) printf_sint::value#1<(signed byte) 0) goto printf_sint::@1
|
||||
to:printf_sint::@2
|
||||
printf_sint::@1: scope:[printf_sint] from printf_sint
|
||||
[39] (signed word) printf_sint::value#0 ← - (signed word) printf_sint::value#1
|
||||
[40] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
|
||||
to:printf_sint::@2
|
||||
printf_sint::@2: scope:[printf_sint] from printf_sint printf_sint::@1
|
||||
[41] (signed word) printf_sint::value#4 ← phi( printf_sint::@1/(signed word) printf_sint::value#0 printf_sint/(signed word) printf_sint::value#1 )
|
||||
[42] (word) utoa::value#1 ← (word)(signed word) printf_sint::value#4
|
||||
[43] call utoa
|
||||
to:printf_sint::@3
|
||||
printf_sint::@3: scope:[printf_sint] from printf_sint::@2
|
||||
[44] (byte) printf_number_buffer::buffer_sign#0 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
|
||||
[45] call printf_number_buffer
|
||||
to:printf_sint::@return
|
||||
printf_sint::@return: scope:[printf_sint] from printf_sint::@3
|
||||
[46] return
|
||||
to:@return
|
||||
|
||||
(void()) cputs((to_nomodify byte*) cputs::s)
|
||||
cputs: scope:[cputs] from printf_number_buffer::@2 test_casting::@1
|
||||
[47] (to_nomodify byte*) cputs::s#4 ← phi( printf_number_buffer::@2/(const byte*) printf_number_buffer::buffer_digits#0 test_casting::@1/(const byte*) test_casting::s )
|
||||
to:cputs::@1
|
||||
cputs::@1: scope:[cputs] from cputs cputs::@2
|
||||
[48] (to_nomodify byte*) cputs::s#3 ← phi( cputs/(to_nomodify byte*) cputs::s#4 cputs::@2/(to_nomodify byte*) cputs::s#0 )
|
||||
[49] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#3)
|
||||
[50] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#3
|
||||
[51] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2
|
||||
to:cputs::@return
|
||||
cputs::@return: scope:[cputs] from cputs::@1
|
||||
[52] return
|
||||
to:@return
|
||||
cputs::@2: scope:[cputs] from cputs::@1
|
||||
[53] (byte) cputc::c#0 ← (byte) cputs::c#1
|
||||
[54] call cputc
|
||||
to:cputs::@1
|
||||
|
||||
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
|
||||
utoa: scope:[utoa] from printf_sint::@2
|
||||
[55] phi()
|
||||
to:utoa::@1
|
||||
utoa::@1: scope:[utoa] from utoa utoa::@4
|
||||
[56] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
|
||||
[56] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
|
||||
[56] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(word) utoa::value#1 )
|
||||
[56] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
|
||||
[57] if((byte) utoa::digit#2<(const byte) utoa::max_digits#1-(byte) 1) goto utoa::@2
|
||||
to:utoa::@3
|
||||
utoa::@3: scope:[utoa] from utoa::@1
|
||||
[58] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
|
||||
[59] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
|
||||
[60] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
|
||||
[61] *((byte*) utoa::buffer#3) ← (byte) 0
|
||||
to:utoa::@return
|
||||
utoa::@return: scope:[utoa] from utoa::@3
|
||||
[62] return
|
||||
to:@return
|
||||
utoa::@2: scope:[utoa] from utoa::@1
|
||||
[63] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
|
||||
[64] (word) utoa::digit_value#0 ← *((const word*) RADIX_DECIMAL_VALUES + (byte~) utoa::$10)
|
||||
[65] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
|
||||
to:utoa::@7
|
||||
utoa::@7: scope:[utoa] from utoa::@2
|
||||
[66] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
|
||||
to:utoa::@4
|
||||
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
|
||||
[67] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
|
||||
[67] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
|
||||
[67] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
|
||||
[68] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
|
||||
to:utoa::@1
|
||||
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
|
||||
[69] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
|
||||
[70] (word) utoa_append::value#0 ← (word) utoa::value#2
|
||||
[71] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
|
||||
[72] call utoa_append
|
||||
[73] (word) utoa_append::return#0 ← (word) utoa_append::value#2
|
||||
to:utoa::@6
|
||||
utoa::@6: scope:[utoa] from utoa::@5
|
||||
[74] (word) utoa::value#0 ← (word) utoa_append::return#0
|
||||
[75] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
|
||||
to:utoa::@4
|
||||
|
||||
(void()) printf_number_buffer((byte) printf_number_buffer::buffer_sign , (byte*) printf_number_buffer::buffer_digits , (byte) printf_number_buffer::format_min_length , (byte) printf_number_buffer::format_justify_left , (byte) printf_number_buffer::format_sign_always , (byte) printf_number_buffer::format_zero_padding , (byte) printf_number_buffer::format_upper_case , (byte) printf_number_buffer::format_radix)
|
||||
printf_number_buffer: scope:[printf_number_buffer] from printf_sint::@3
|
||||
[76] phi()
|
||||
to:printf_number_buffer::@1
|
||||
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
|
||||
[77] if((byte) 0==(byte) printf_number_buffer::buffer_sign#0) goto printf_number_buffer::@2
|
||||
to:printf_number_buffer::@3
|
||||
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1
|
||||
[78] (byte) cputc::c#2 ← (byte) printf_number_buffer::buffer_sign#0
|
||||
[79] call cputc
|
||||
to:printf_number_buffer::@2
|
||||
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
|
||||
[80] phi()
|
||||
[81] call cputs
|
||||
to:printf_number_buffer::@return
|
||||
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
|
||||
[82] return
|
||||
to:@return
|
||||
|
||||
(void()) cputc((byte) cputc::c)
|
||||
cputc: scope:[cputc] from cputs::@2 printf_number_buffer::@3
|
||||
[83] (byte) cputc::c#3 ← phi( cputs::@2/(byte) cputc::c#0 printf_number_buffer::@3/(byte) cputc::c#2 )
|
||||
[84] if((byte) cputc::c#3==(byte) '
|
||||
') goto cputc::@1
|
||||
to:cputc::@2
|
||||
cputc::@2: scope:[cputc] from cputc
|
||||
[85] *((byte*) conio_line_text + (byte) conio_cursor_x) ← (byte) cputc::c#3
|
||||
[86] *((byte*) conio_line_color + (byte) conio_cursor_x) ← (const nomodify byte) LIGHT_BLUE
|
||||
[87] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x
|
||||
[88] if((byte) conio_cursor_x!=(byte) $28) goto cputc::@return
|
||||
to:cputc::@3
|
||||
cputc::@3: scope:[cputc] from cputc::@2
|
||||
[89] phi()
|
||||
[90] call cputln
|
||||
to:cputc::@return
|
||||
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
|
||||
[91] return
|
||||
to:@return
|
||||
cputc::@1: scope:[cputc] from cputc
|
||||
[92] phi()
|
||||
[93] call cputln
|
||||
to:cputc::@return
|
||||
|
||||
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
|
||||
utoa_append: scope:[utoa_append] from utoa::@5
|
||||
[94] phi()
|
||||
to:utoa_append::@1
|
||||
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
|
||||
[95] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
|
||||
[95] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
|
||||
[96] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
|
||||
to:utoa_append::@3
|
||||
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
|
||||
[97] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
|
||||
to:utoa_append::@return
|
||||
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
|
||||
[98] return
|
||||
to:@return
|
||||
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
|
||||
[99] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
|
||||
[100] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
|
||||
to:utoa_append::@1
|
||||
|
||||
(void()) cputln()
|
||||
cputln: scope:[cputln] from cputc::@1 cputc::@3
|
||||
[101] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $28
|
||||
[102] (byte*) conio_line_color ← (byte*) conio_line_color + (byte) $28
|
||||
[103] (byte) conio_cursor_x ← (byte) 0
|
||||
[104] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y
|
||||
[105] call cscroll
|
||||
to:cputln::@return
|
||||
cputln::@return: scope:[cputln] from cputln
|
||||
[106] return
|
||||
to:@return
|
||||
|
||||
(void()) cscroll()
|
||||
cscroll: scope:[cscroll] from cputln
|
||||
[107] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return
|
||||
to:cscroll::@1
|
||||
cscroll::@1: scope:[cscroll] from cscroll
|
||||
[108] phi()
|
||||
[109] call memcpy
|
||||
to:cscroll::@2
|
||||
cscroll::@2: scope:[cscroll] from cscroll::@1
|
||||
[110] phi()
|
||||
[111] call memcpy
|
||||
to:cscroll::@3
|
||||
cscroll::@3: scope:[cscroll] from cscroll::@2
|
||||
[112] phi()
|
||||
[113] call memset
|
||||
to:cscroll::@4
|
||||
cscroll::@4: scope:[cscroll] from cscroll::@3
|
||||
[114] phi()
|
||||
[115] call memset
|
||||
to:cscroll::@5
|
||||
cscroll::@5: scope:[cscroll] from cscroll::@4
|
||||
[116] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $28
|
||||
[117] (byte*) conio_line_color ← (byte*) conio_line_color - (byte) $28
|
||||
[118] (byte) conio_cursor_y ← -- (byte) conio_cursor_y
|
||||
to:cscroll::@return
|
||||
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
|
||||
[119] return
|
||||
to:@return
|
||||
|
||||
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
|
||||
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
|
||||
[120] (void*) memcpy::destination#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) DEFAULT_SCREEN cscroll::@2/(void*)(const nomodify byte*) COLORRAM )
|
||||
[120] (void*) memcpy::source#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) DEFAULT_SCREEN+(byte) $28 cscroll::@2/(void*)(const nomodify byte*) COLORRAM+(byte) $28 )
|
||||
[121] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $28-(number) $28
|
||||
[122] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
|
||||
[123] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
|
||||
to:memcpy::@1
|
||||
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
|
||||
[124] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
|
||||
[124] (byte*) memcpy::src#2 ← phi( memcpy/(byte*) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
|
||||
[125] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
|
||||
to:memcpy::@return
|
||||
memcpy::@return: scope:[memcpy] from memcpy::@1
|
||||
[126] return
|
||||
to:@return
|
||||
memcpy::@2: scope:[memcpy] from memcpy::@1
|
||||
[127] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
|
||||
[128] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
|
||||
[129] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
|
||||
to:memcpy::@1
|
||||
|
||||
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
|
||||
memset: scope:[memset] from cscroll::@3 cscroll::@4
|
||||
[130] (byte) memset::c#4 ← phi( cscroll::@3/(byte) ' ' cscroll::@4/(const nomodify byte) LIGHT_BLUE )
|
||||
[130] (void*) memset::str#3 ← phi( cscroll::@3/(void*)(const nomodify byte*) DEFAULT_SCREEN+(word)(number) $19*(number) $28-(byte) $28 cscroll::@4/(void*)(const nomodify byte*) COLORRAM+(word)(number) $19*(number) $28-(byte) $28 )
|
||||
to:memset::@1
|
||||
memset::@1: scope:[memset] from memset
|
||||
[131] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $28
|
||||
[132] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
|
||||
to:memset::@2
|
||||
memset::@2: scope:[memset] from memset::@1 memset::@3
|
||||
[133] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
|
||||
[134] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
|
||||
to:memset::@return
|
||||
memset::@return: scope:[memset] from memset::@2
|
||||
[135] return
|
||||
to:@return
|
||||
memset::@3: scope:[memset] from memset::@2
|
||||
[136] *((byte*) memset::dst#2) ← (byte) memset::c#4
|
||||
[137] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
to:memset::@2
|
6798
src/test/ref/casting-negative.log
Normal file
6798
src/test/ref/casting-negative.log
Normal file
File diff suppressed because one or more lines are too long
322
src/test/ref/casting-negative.sym
Normal file
322
src/test/ref/casting-negative.sym
Normal file
@ -0,0 +1,322 @@
|
||||
(const nomodify byte*) COLORRAM = (byte*) 55296
|
||||
(const nomodify byte*) DEFAULT_SCREEN = (byte*) 1024
|
||||
(const byte*) DIGITS[] = (byte*) "0123456789abcdef"z
|
||||
(const nomodify byte) LIGHT_BLUE = (byte) $e
|
||||
(byte) MOS6526_CIA::INTERRUPT
|
||||
(byte) MOS6526_CIA::PORT_A
|
||||
(byte) MOS6526_CIA::PORT_A_DDR
|
||||
(byte) MOS6526_CIA::PORT_B
|
||||
(byte) MOS6526_CIA::PORT_B_DDR
|
||||
(byte) MOS6526_CIA::SERIAL_DATA
|
||||
(word) MOS6526_CIA::TIMER_A
|
||||
(byte) MOS6526_CIA::TIMER_A_CONTROL
|
||||
(word) MOS6526_CIA::TIMER_B
|
||||
(byte) MOS6526_CIA::TIMER_B_CONTROL
|
||||
(byte) MOS6526_CIA::TOD_10THS
|
||||
(byte) MOS6526_CIA::TOD_HOURS
|
||||
(byte) MOS6526_CIA::TOD_MIN
|
||||
(byte) MOS6526_CIA::TOD_SEC
|
||||
(byte) MOS6569_VICII::BG_COLOR
|
||||
(byte) MOS6569_VICII::BG_COLOR1
|
||||
(byte) MOS6569_VICII::BG_COLOR2
|
||||
(byte) MOS6569_VICII::BG_COLOR3
|
||||
(byte) MOS6569_VICII::BORDER_COLOR
|
||||
(byte) MOS6569_VICII::CONTROL1
|
||||
(byte) MOS6569_VICII::CONTROL2
|
||||
(byte) MOS6569_VICII::IRQ_ENABLE
|
||||
(byte) MOS6569_VICII::IRQ_STATUS
|
||||
(byte) MOS6569_VICII::LIGHTPEN_X
|
||||
(byte) MOS6569_VICII::LIGHTPEN_Y
|
||||
(byte) MOS6569_VICII::MEMORY
|
||||
(byte) MOS6569_VICII::RASTER
|
||||
(byte) MOS6569_VICII::SPRITE0_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE0_X
|
||||
(byte) MOS6569_VICII::SPRITE0_Y
|
||||
(byte) MOS6569_VICII::SPRITE1_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE1_X
|
||||
(byte) MOS6569_VICII::SPRITE1_Y
|
||||
(byte) MOS6569_VICII::SPRITE2_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE2_X
|
||||
(byte) MOS6569_VICII::SPRITE2_Y
|
||||
(byte) MOS6569_VICII::SPRITE3_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE3_X
|
||||
(byte) MOS6569_VICII::SPRITE3_Y
|
||||
(byte) MOS6569_VICII::SPRITE4_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE4_X
|
||||
(byte) MOS6569_VICII::SPRITE4_Y
|
||||
(byte) MOS6569_VICII::SPRITE5_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE5_X
|
||||
(byte) MOS6569_VICII::SPRITE5_Y
|
||||
(byte) MOS6569_VICII::SPRITE6_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE6_X
|
||||
(byte) MOS6569_VICII::SPRITE6_Y
|
||||
(byte) MOS6569_VICII::SPRITE7_COLOR
|
||||
(byte) MOS6569_VICII::SPRITE7_X
|
||||
(byte) MOS6569_VICII::SPRITE7_Y
|
||||
(byte) MOS6569_VICII::SPRITES_BG_COLLISION
|
||||
(byte) MOS6569_VICII::SPRITES_COLLISION
|
||||
(byte) MOS6569_VICII::SPRITES_ENABLE
|
||||
(byte) MOS6569_VICII::SPRITES_EXPAND_X
|
||||
(byte) MOS6569_VICII::SPRITES_EXPAND_Y
|
||||
(byte) MOS6569_VICII::SPRITES_MC
|
||||
(byte) MOS6569_VICII::SPRITES_MCOLOR1
|
||||
(byte) MOS6569_VICII::SPRITES_MCOLOR2
|
||||
(byte) MOS6569_VICII::SPRITES_PRIORITY
|
||||
(byte) MOS6569_VICII::SPRITES_XMSB
|
||||
(byte) MOS6581_SID::CH1_ATTACK_DECAY
|
||||
(byte) MOS6581_SID::CH1_CONTROL
|
||||
(word) MOS6581_SID::CH1_FREQ
|
||||
(word) MOS6581_SID::CH1_PULSE_WIDTH
|
||||
(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE
|
||||
(byte) MOS6581_SID::CH2_ATTACK_DECAY
|
||||
(byte) MOS6581_SID::CH2_CONTROL
|
||||
(word) MOS6581_SID::CH2_FREQ
|
||||
(word) MOS6581_SID::CH2_PULSE_WIDTH
|
||||
(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE
|
||||
(byte) MOS6581_SID::CH3_ATTACK_DECAY
|
||||
(byte) MOS6581_SID::CH3_CONTROL
|
||||
(byte) MOS6581_SID::CH3_ENV
|
||||
(word) MOS6581_SID::CH3_FREQ
|
||||
(byte) MOS6581_SID::CH3_OSC
|
||||
(word) MOS6581_SID::CH3_PULSE_WIDTH
|
||||
(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE
|
||||
(byte) MOS6581_SID::FILTER_CUTOFF_HIGH
|
||||
(byte) MOS6581_SID::FILTER_CUTOFF_LOW
|
||||
(byte) MOS6581_SID::FILTER_SETUP
|
||||
(byte) MOS6581_SID::POT_X
|
||||
(byte) MOS6581_SID::POT_Y
|
||||
(byte) MOS6581_SID::VOLUME_FILTER_MODE
|
||||
(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = (byte) 1
|
||||
(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 byte) SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = (byte) $c
|
||||
(void()) __start()
|
||||
(label) __start::@1
|
||||
(label) __start::@return
|
||||
(label) __start::__init1
|
||||
(void()) clrscr()
|
||||
(label) clrscr::@1
|
||||
(label) clrscr::@2
|
||||
(label) clrscr::@3
|
||||
(label) clrscr::@4
|
||||
(label) clrscr::@5
|
||||
(label) clrscr::@return
|
||||
(byte) clrscr::c
|
||||
(byte) clrscr::c#1 reg byte y 20002.0
|
||||
(byte) clrscr::c#2 reg byte y 12501.25
|
||||
(byte) clrscr::l
|
||||
(byte) clrscr::l#1 reg byte x 2002.0
|
||||
(byte) clrscr::l#2 reg byte x 333.6666666666667
|
||||
(byte*) clrscr::line_cols
|
||||
(byte*) clrscr::line_cols#1 line_cols zp[2]:5 1001.0
|
||||
(byte*) clrscr::line_cols#5 line_cols zp[2]:5 1500.375
|
||||
(byte*) clrscr::line_text
|
||||
(byte*) clrscr::line_text#1 line_text zp[2]:3 667.3333333333334
|
||||
(byte*) clrscr::line_text#5 line_text zp[2]:3 1714.7142857142858
|
||||
(byte) conio_cursor_x loadstore zp[1]:10 2.777777797962963E8
|
||||
(byte) conio_cursor_y loadstore zp[1]:11 4.571428572971429E9
|
||||
(byte*) conio_line_color loadstore zp[2]:14 3.2500000015882354E9
|
||||
(byte*) conio_line_text loadstore zp[2]:12 3.202898552289855E9
|
||||
(void()) cputc((byte) cputc::c)
|
||||
(label) cputc::@1
|
||||
(label) cputc::@2
|
||||
(label) cputc::@3
|
||||
(label) cputc::@return
|
||||
(byte) cputc::c
|
||||
(byte) cputc::c#0 reg byte a 2.00000002E8
|
||||
(byte) cputc::c#2 reg byte a 200002.0
|
||||
(byte) cputc::c#3 reg byte a 1.050050002E9
|
||||
(void()) cputln()
|
||||
(label) cputln::@return
|
||||
(void()) cputs((to_nomodify byte*) cputs::s)
|
||||
(label) cputs::@1
|
||||
(label) cputs::@2
|
||||
(label) cputs::@return
|
||||
(byte) cputs::c
|
||||
(byte) cputs::c#1 reg byte a 1.00000001E8
|
||||
(to_nomodify byte*) cputs::s
|
||||
(to_nomodify byte*) cputs::s#0 s zp[2]:5 5.00000005E7
|
||||
(to_nomodify byte*) cputs::s#3 s zp[2]:5 1.50500002E8
|
||||
(to_nomodify byte*) cputs::s#4 s zp[2]:5 1000001.0
|
||||
(void()) cscroll()
|
||||
(label) cscroll::@1
|
||||
(label) cscroll::@2
|
||||
(label) cscroll::@3
|
||||
(label) cscroll::@4
|
||||
(label) cscroll::@5
|
||||
(label) cscroll::@return
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@return
|
||||
(signed byte) main::signed_char_value
|
||||
(signed byte) main::signed_char_value#1 signed_char_value zp[1]:2 101.0
|
||||
(signed byte) main::signed_char_value#2 signed_char_value zp[1]:2 151.5
|
||||
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
|
||||
(label) memcpy::@1
|
||||
(label) memcpy::@2
|
||||
(label) memcpy::@return
|
||||
(void*) memcpy::destination
|
||||
(void*) memcpy::destination#2 destination zp[2]:8
|
||||
(byte*) memcpy::dst
|
||||
(byte*) memcpy::dst#1 dst zp[2]:8 1.000000000000001E15
|
||||
(byte*) memcpy::dst#2 dst zp[2]:8 1.0003333333333348E15
|
||||
(byte*) memcpy::dst#4 dst zp[2]:8 2.000000000002E12
|
||||
(word) memcpy::num
|
||||
(void*) memcpy::return
|
||||
(void*) memcpy::source
|
||||
(void*) memcpy::source#2 source zp[2]:18
|
||||
(byte*) memcpy::src
|
||||
(byte*) memcpy::src#1 src zp[2]:18 2.000000000000002E15
|
||||
(byte*) memcpy::src#2 src zp[2]:18 1.0002500000000012E15
|
||||
(byte*) memcpy::src#4 src zp[2]:18 1.000000000001E12
|
||||
(byte*) memcpy::src_end
|
||||
(byte*) memcpy::src_end#0 src_end zp[2]:16 1.2512500000000025E14
|
||||
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
|
||||
(label) memset::@1
|
||||
(label) memset::@2
|
||||
(label) memset::@3
|
||||
(label) memset::@return
|
||||
(byte) memset::c
|
||||
(byte) memset::c#4 reg byte x 1.42857142857143E14
|
||||
(byte*) memset::dst
|
||||
(byte*) memset::dst#1 dst zp[2]:8 2.000000000000002E15
|
||||
(byte*) memset::dst#2 dst zp[2]:8 1.3336666666666685E15
|
||||
(byte*) memset::dst#4 dst zp[2]:8 2.000000000002E12
|
||||
(byte*) memset::end
|
||||
(byte*) memset::end#0 end zp[2]:18 1.668333333333337E14
|
||||
(word) memset::num
|
||||
(void*) memset::return
|
||||
(void*) memset::str
|
||||
(void*) memset::str#3 str zp[2]:8
|
||||
(struct printf_buffer_number) printf_buffer loadstore mem[12] = {}
|
||||
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
|
||||
(byte) printf_buffer_number::sign
|
||||
(byte) printf_format_number::justify_left
|
||||
(byte) printf_format_number::min_length
|
||||
(byte) printf_format_number::radix
|
||||
(byte) printf_format_number::sign_always
|
||||
(byte) printf_format_number::upper_case
|
||||
(byte) printf_format_number::zero_padding
|
||||
(byte) printf_format_string::justify_left
|
||||
(byte) printf_format_string::min_length
|
||||
(void()) printf_number_buffer((byte) printf_number_buffer::buffer_sign , (byte*) printf_number_buffer::buffer_digits , (byte) printf_number_buffer::format_min_length , (byte) printf_number_buffer::format_justify_left , (byte) printf_number_buffer::format_sign_always , (byte) printf_number_buffer::format_zero_padding , (byte) printf_number_buffer::format_upper_case , (byte) printf_number_buffer::format_radix)
|
||||
(label) printf_number_buffer::@1
|
||||
(label) printf_number_buffer::@2
|
||||
(label) printf_number_buffer::@3
|
||||
(label) printf_number_buffer::@return
|
||||
(struct printf_buffer_number) printf_number_buffer::buffer
|
||||
(byte*) printf_number_buffer::buffer_digits
|
||||
(const byte*) printf_number_buffer::buffer_digits#0 buffer_digits = (byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS
|
||||
(byte) printf_number_buffer::buffer_sign
|
||||
(byte) printf_number_buffer::buffer_sign#0 reg byte a 70001.0
|
||||
(struct printf_format_number) printf_number_buffer::format
|
||||
(byte) printf_number_buffer::format_justify_left
|
||||
(byte) printf_number_buffer::format_min_length
|
||||
(byte) printf_number_buffer::format_radix
|
||||
(byte) printf_number_buffer::format_sign_always
|
||||
(byte) printf_number_buffer::format_upper_case
|
||||
(byte) printf_number_buffer::format_zero_padding
|
||||
(signed byte) printf_number_buffer::len
|
||||
(signed byte) printf_number_buffer::padding
|
||||
(void()) printf_sint((signed word) printf_sint::value , (byte) printf_sint::format_min_length , (byte) printf_sint::format_justify_left , (byte) printf_sint::format_sign_always , (byte) printf_sint::format_zero_padding , (byte) printf_sint::format_upper_case , (byte) printf_sint::format_radix)
|
||||
(label) printf_sint::@1
|
||||
(label) printf_sint::@2
|
||||
(label) printf_sint::@3
|
||||
(label) printf_sint::@return
|
||||
(struct printf_format_number) printf_sint::format
|
||||
(byte) printf_sint::format_justify_left
|
||||
(byte) printf_sint::format_min_length
|
||||
(byte) printf_sint::format_radix
|
||||
(byte) printf_sint::format_sign_always
|
||||
(byte) printf_sint::format_upper_case
|
||||
(byte) printf_sint::format_zero_padding
|
||||
(word) printf_sint::uvalue
|
||||
(signed word) printf_sint::value
|
||||
(signed word) printf_sint::value#0 value zp[2]:3 10001.0
|
||||
(signed word) printf_sint::value#1 value zp[2]:3 10334.666666666666
|
||||
(signed word) printf_sint::value#4 value zp[2]:3 20002.0
|
||||
(void()) test_casting((signed word) test_casting::signed_short_value)
|
||||
(label) test_casting::@1
|
||||
(label) test_casting::@return
|
||||
(const byte*) test_casting::s[(byte) 2] = (byte*) "
|
||||
"
|
||||
(signed word) test_casting::signed_short_value
|
||||
(signed word) test_casting::signed_short_value#0 signed_short_value zp[2]:3 1102.0
|
||||
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
|
||||
(byte~) utoa::$10 reg byte a 2.0000002E7
|
||||
(byte~) utoa::$11 reg byte a 200002.0
|
||||
(label) utoa::@1
|
||||
(label) utoa::@2
|
||||
(label) utoa::@3
|
||||
(label) utoa::@4
|
||||
(label) utoa::@5
|
||||
(label) utoa::@6
|
||||
(label) utoa::@7
|
||||
(label) utoa::@return
|
||||
(byte*) utoa::buffer
|
||||
(byte*) utoa::buffer#11 buffer zp[2]:18 2871429.0
|
||||
(byte*) utoa::buffer#14 buffer zp[2]:18 1.50000015E7
|
||||
(byte*) utoa::buffer#3 buffer zp[2]:18 200002.0
|
||||
(byte*) utoa::buffer#4 buffer zp[2]:18 2.0000002E7
|
||||
(byte) utoa::digit
|
||||
(byte) utoa::digit#1 digit zp[1]:7 2.0000002E7
|
||||
(byte) utoa::digit#2 digit zp[1]:7 2857143.1428571427
|
||||
(word) utoa::digit_value
|
||||
(word) utoa::digit_value#0 digit_value zp[2]:16 6000000.6
|
||||
(word*) utoa::digit_values
|
||||
(byte) utoa::max_digits
|
||||
(const byte) utoa::max_digits#1 max_digits = (byte) 5
|
||||
(byte) utoa::radix
|
||||
(byte) utoa::started
|
||||
(byte) utoa::started#2 reg byte x 5000000.5
|
||||
(byte) utoa::started#4 reg byte x 1.0000001E7
|
||||
(word) utoa::value
|
||||
(word) utoa::value#0 value zp[2]:3 1.0000001E7
|
||||
(word) utoa::value#1 value zp[2]:3 55001.0
|
||||
(word) utoa::value#2 value zp[2]:3 5728572.142857142
|
||||
(word) utoa::value#6 value zp[2]:3 1.50000015E7
|
||||
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
|
||||
(label) utoa_append::@1
|
||||
(label) utoa_append::@2
|
||||
(label) utoa_append::@3
|
||||
(label) utoa_append::@return
|
||||
(byte*) utoa_append::buffer
|
||||
(byte*) utoa_append::buffer#0 buffer zp[2]:18 1.375000025E7
|
||||
(byte) utoa_append::digit
|
||||
(byte) utoa_append::digit#1 reg byte x 1.00000000001E11
|
||||
(byte) utoa_append::digit#2 reg byte x 1.000500000015E11
|
||||
(word) utoa_append::return
|
||||
(word) utoa_append::return#0 return zp[2]:3 2.0000002E7
|
||||
(word) utoa_append::sub
|
||||
(word) utoa_append::sub#0 sub zp[2]:16 3.33350000005E10
|
||||
(word) utoa_append::value
|
||||
(word) utoa_append::value#0 value zp[2]:3 3.6666667333333336E7
|
||||
(word) utoa_append::value#1 value zp[2]:3 2.00000000002E11
|
||||
(word) utoa_append::value#2 value zp[2]:3 5.001833333416667E10
|
||||
|
||||
zp[1]:2 [ main::signed_char_value#2 main::signed_char_value#1 ]
|
||||
reg byte x [ clrscr::l#2 clrscr::l#1 ]
|
||||
reg byte y [ clrscr::c#2 clrscr::c#1 ]
|
||||
zp[2]:3 [ printf_sint::value#4 printf_sint::value#0 printf_sint::value#1 utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 test_casting::signed_short_value#0 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 clrscr::line_text#5 clrscr::line_text#1 ]
|
||||
zp[2]:5 [ cputs::s#3 cputs::s#4 cputs::s#0 clrscr::line_cols#5 clrscr::line_cols#1 ]
|
||||
zp[1]:7 [ utoa::digit#2 utoa::digit#1 ]
|
||||
reg byte x [ utoa::started#2 utoa::started#4 ]
|
||||
reg byte a [ cputc::c#3 cputc::c#0 cputc::c#2 ]
|
||||
reg byte x [ utoa_append::digit#2 utoa_append::digit#1 ]
|
||||
zp[2]:8 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]
|
||||
reg byte x [ memset::c#4 ]
|
||||
zp[1]:10 [ conio_cursor_x ]
|
||||
zp[1]:11 [ conio_cursor_y ]
|
||||
zp[2]:12 [ conio_line_text ]
|
||||
zp[2]:14 [ conio_line_color ]
|
||||
reg byte a [ printf_number_buffer::buffer_sign#0 ]
|
||||
reg byte a [ cputs::c#1 ]
|
||||
reg byte a [ utoa::$11 ]
|
||||
reg byte a [ utoa::$10 ]
|
||||
zp[2]:16 [ memcpy::src_end#0 utoa::digit_value#0 utoa_append::sub#0 ]
|
||||
zp[2]:18 [ memset::end#0 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 ]
|
||||
mem[12] [ printf_buffer ]
|
Loading…
Reference in New Issue
Block a user