I have gotten the libraries to build an am trying (unsuccessfully) to make a custom putchar.c (I removed the putchar.s file). This is what I have so far:
#include "memory.h" void putchar(char ch) { *(unsigned char *)pScreen = video; *(unsigned char *)pX = caratx; *(unsigned char *)pY = caraty; char x; char y; x = pX; y = pY; pScreen += y * 160; pScreen += x * 2; if (ch = 0x0d) { // Adjust the cursor position, checking to see if we need to scrool the screen return; } return; } It gets errors on just about every line. The first error says syntax error: token 'char' where I declare x. Then, everywhere that a variable is mentioned, it says undefined identifier - even when I declare a variable the .h file is. #ifndef MEMORY_H #define MEMORY_H #define caratx 0x1FFE #define caraty 0x1FFF #define video 0x2000 #endif I simply use "sdcc putchar.c" without quotes to compile. I have been trying for hours to get this thing to work. What am I doing wrong? ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user