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

comments in test.

This commit is contained in:
jespergravgaard 2021-11-03 07:01:52 +01:00
parent ff2afd7c9e
commit c06384607b
3 changed files with 6 additions and 0 deletions

View File

@ -11,8 +11,10 @@ void main() {
for(;;) {
for(char i=0;i<10;i++)
for(char j=0;j<10;j++) {
// i and j are put into X/Y. The A=X+Y fragment uses $ff as temporary storage.
char k = i+j;
if(k>0x80) {
// Problem: This will occasionally trigger due to the IRQ interfering with the value in $ff!
VICII->BORDER_COLOR++;
}
}
@ -25,6 +27,7 @@ __mem char * volatile ptr = (char*)0xff00;
// The Interrupt Handler
__interrupt(rom_sys_c64) void irq() {
*BG_COLOR = WHITE;
// ptr has to be moved to ZP for indirection. The fragment uses $fe-f as temporary storage.
(*ptr)++;
*BG_COLOR = BLACK;
}

View File

@ -74,6 +74,7 @@ main: {
jmp __b1
__b3:
// char k = i+j
// i and j are put into X/Y. The A=X+Y fragment uses $ff as temporary storage.
txa
sty.z $ff
clc

View File

@ -412,6 +412,7 @@ main: {
// main::@3
__b3:
// [13] main::k#0 = main::i#2 + main::j#2 -- vbuaa=vbuxx_plus_vbuyy
// i and j are put into X/Y. The A=X+Y fragment uses $ff as temporary storage.
txa
sty.z $ff
clc
@ -601,6 +602,7 @@ main: {
__b3:
// char k = i+j
// [13] main::k#0 = main::i#2 + main::j#2 -- vbuaa=vbuxx_plus_vbuyy
// i and j are put into X/Y. The A=X+Y fragment uses $ff as temporary storage.
txa
sty.z $ff
clc