From: Carsten Strotmann (cas_at_strotmann.de)
Date: 2003-02-02 21:13:38
Hello,
I'm writing on my next cc65 beginners tutorial issue for ABBUC Magazin.
It's about low-level programming with cc65. I started with an easy example,
the ATARI Rainbow.
This is the program in pseudocode
while (nokey)
{
wsync = colpf2 = rtclok + vcount
}
wsync is a byte at 0xD40A (wait for horizontal sync)
colpf is a byte at 0xD018 ( color of playfield 2)
rtclok is a byte at 0x12 (part of internal clock, incremented every screen
refresh)
vcount is a byte at 0xD40B ( current scanline )
This is my programm, to my knowledge, valid C code (but I'm not an expert)
----------------------
#include <atari.h>
#include <stdio.h>
typedef unsigned char byte;
typedef unsigned word;
int main(void)
{
*(byte*) 0x2FC = 0xFF; // clear keybuffer
while (*(byte*) 0x2FC == 0xFF) // while no key pressed
{
*(byte*) 0xD40A = *(byte*) 0xD018 = (*(byte*) 0x12) + (*(byte*) \
0xD40B); // change bg-color every scanline
}
getchar();
return(0);
}
----------------------
On compile with cc65 2.9.0 I get
rainbow.c(46): Internal compiler error:
oursp != savsp (-2 != 0)
Line: }
cl65: Subprocess `cc65' aborted by signal 6
Can anyone see what is wrong?
Or is this a compiler problem?
Best regards
Carsten
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-02-02 21:11:19 CET