mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-19 00:29:29 +00:00
Fixed tests to take adcantadge of casting & int constant type elasticity.
This commit is contained in:
parent
9c39311d67
commit
0323fb0a0d
@ -32,7 +32,7 @@ void main() {
|
||||
*BGCOL = 0;
|
||||
*FGCOL = 0;
|
||||
*D011 = BMM|DEN|RSEL|3;
|
||||
*D018 = $18; // Needs casting for *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400);
|
||||
*D018 = (byte)(((word)SCREEN/$40)|((word)BITMAP/$400));
|
||||
init_screen();
|
||||
init_plot_tables();
|
||||
do {
|
||||
|
@ -22,7 +22,7 @@ void main() {
|
||||
*BGCOL = 0;
|
||||
*FGCOL = 0;
|
||||
*D011 = BMM|DEN|RSEL|3;
|
||||
*D018 = $18; // Needs casting for *D018 = ((word)SCREEN/$40)|((word)BITMAP/$400);
|
||||
*D018 = (byte)(((word)SCREEN/$40)|((word)BITMAP/$400));
|
||||
init_screen();
|
||||
init_plot_tables();
|
||||
do {
|
||||
@ -76,7 +76,7 @@ void init_plot_tables() {
|
||||
plot_ylo[y] = y&$7 | <yoffs;
|
||||
plot_yhi[y] = >yoffs;
|
||||
if((y&$7)==7) {
|
||||
yoffs = yoffs + 320; // Needs better constant type inference for yoffs = yoffs + 40*8;
|
||||
yoffs = yoffs + 40*8; // Needs better constant type inference for yoffs = yoffs + 40*8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ main: {
|
||||
sta FGCOL
|
||||
lda #BMM|DEN|RSEL|3
|
||||
sta D011
|
||||
lda #$18
|
||||
lda #$ff & ($ffff & SCREEN/$40|$ffff & BITMAP/$400)
|
||||
sta D018
|
||||
jsr init_screen
|
||||
jsr init_plot_tables
|
||||
|
@ -11,7 +11,7 @@ main: scope:[main] from @10
|
||||
[4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word) 0 [ ] ( main:2 [ ] )
|
||||
[5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word) 0 [ ] ( main:2 [ ] )
|
||||
[6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word) 3 [ ] ( main:2 [ ] )
|
||||
[7] *((const byte*) D018#0) ← (byte/signed byte/word/signed word) 24 [ ] ( main:2 [ ] )
|
||||
[7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word) 64|((word))(const byte*) BITMAP#0/(word/signed word) 1024 [ ] ( main:2 [ ] )
|
||||
[8] call init_screen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@ main: {
|
||||
sta FGCOL
|
||||
lda #BMM|DEN|RSEL|3
|
||||
sta D011
|
||||
lda #$18
|
||||
lda #$ff & ($ffff & SCREEN/$40|$ffff & BITMAP/$400)
|
||||
sta D018
|
||||
jsr init_screen
|
||||
jsr init_plot_tables
|
||||
@ -128,10 +128,10 @@ init_plot_tables: {
|
||||
bne b4
|
||||
lda yoffs
|
||||
clc
|
||||
adc #<$140
|
||||
adc #<$28*8
|
||||
sta yoffs
|
||||
lda yoffs+1
|
||||
adc #>$140
|
||||
adc #>$28*8
|
||||
sta yoffs+1
|
||||
b4:
|
||||
inx
|
||||
|
@ -11,7 +11,7 @@ main: scope:[main] from @5
|
||||
[4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word) 0 [ ] ( main:2 [ ] )
|
||||
[5] *((const byte*) FGCOL#0) ← (byte/signed byte/word/signed word) 0 [ ] ( main:2 [ ] )
|
||||
[6] *((const byte*) D011#0) ← (const byte) BMM#0|(const byte) DEN#0|(const byte) RSEL#0|(byte/signed byte/word/signed word) 3 [ ] ( main:2 [ ] )
|
||||
[7] *((const byte*) D018#0) ← (byte/signed byte/word/signed word) 24 [ ] ( main:2 [ ] )
|
||||
[7] *((const byte*) D018#0) ← ((byte))((word))(const byte*) SCREEN#0/(byte/signed byte/word/signed word) 64|((word))(const byte*) BITMAP#0/(word/signed word) 1024 [ ] ( main:2 [ ] )
|
||||
[8] call init_screen param-assignment [ ] ( main:2 [ ] )
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main
|
||||
@ -98,7 +98,7 @@ init_plot_tables::@3: scope:[init_plot_tables] from init_plot_tables::@2 init_p
|
||||
[59] if((byte~) init_plot_tables::$10!=(byte/signed byte/word/signed word) 7) goto init_plot_tables::@4 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#2 ] )
|
||||
to:init_plot_tables::@7
|
||||
init_plot_tables::@7: scope:[init_plot_tables] from init_plot_tables::@3
|
||||
[60] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (word/signed word) 320 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] )
|
||||
[60] (byte*) init_plot_tables::yoffs#1 ← (byte*) init_plot_tables::yoffs#2 + (byte/signed byte/word/signed word) 40*(byte/signed byte/word/signed word) 8 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#1 ] )
|
||||
to:init_plot_tables::@4
|
||||
init_plot_tables::@4: scope:[init_plot_tables] from init_plot_tables::@3 init_plot_tables::@7
|
||||
[61] (byte*) init_plot_tables::yoffs#4 ← phi( init_plot_tables::@3/(byte*) init_plot_tables::yoffs#2 init_plot_tables::@7/(byte*) init_plot_tables::yoffs#1 ) [ init_plot_tables::y#2 init_plot_tables::yoffs#4 ] ( main:2::init_plot_tables:10 [ init_plot_tables::y#2 init_plot_tables::yoffs#4 ] )
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user