1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-19 00:29:29 +00:00

Added a bunch of test cases highlighting each known error

This commit is contained in:
jespergravgaard 2017-10-29 11:43:39 +01:00
parent c4c60a5b36
commit 6097d80b91
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,20 @@
// Multiple calls with different (constant?) parameters should yield different values at runtime
// Currently the same constant parameter is passed on every call.
// Reason: Multiple versioned parameter constants x0#0, x0#1 are only output as a single constant in the ASM .const x0 = 0
byte* screen = $0400;
main();
void main() {
line(1,2);
line(3,5);
}
void line(byte x0, byte x1) {
for(byte x = x0; x<x1; x++) {
*screen = x;
screen++;
}
}

View File

@ -37,7 +37,6 @@ void main() {
}
void line(byte x0, byte y0, byte x1, byte y1) {
//byte* plotter;
byte xd = x1-x0;
byte yd = y1-y0;
byte x = x0;