From 6097d80b91cf811cf7f69a66d379f4903fc0c19f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 29 Oct 2017 11:43:39 +0100 Subject: [PATCH] Added a bunch of test cases highlighting each known error --- .../kickc/test/callconstparamproblem.kc | 20 +++++++++++++++++++ .../kickc/test/ref/bitmap-bresenham.log | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/main/java/dk/camelot64/kickc/test/callconstparamproblem.kc diff --git a/src/main/java/dk/camelot64/kickc/test/callconstparamproblem.kc b/src/main/java/dk/camelot64/kickc/test/callconstparamproblem.kc new file mode 100644 index 000000000..2531ce1bc --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/test/callconstparamproblem.kc @@ -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