Hi, i have written a little source for make a BASIC-library with one module main.c
main.c:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define T32COL 0xF3BF
#define T32CGP 0xF3C1
#define T32ATR 0xF3C3
#define T32PAT 0xF3C5
#define T32NAM 0xF3BD
#define MODE0 0x00
#define MODE1 0x01
#define MODE2 0x02
#define MODE3 0x03
#define MODE4 0x04
#define MODE5 0x05
#define MODE6 0x06
#define MODE7 0x07
#define MODE8 0x08
void screen(int mode);
void color(char primo_piano, char sfondo, char periferico);
//void pset(char x, char y);
//void cls(void);
//void putchar(char chr);
void print(char *stringa);
/*char inkey(void);
void locate(char x,char y);
void tab(char x);
void input(char var);
void screen(int mode);*/
int main()
{
screen(1);
//color(1,6,1);
//pset(100,100);
print("F");
while(1) {};
return 0;
}
//funzione per impostare configurazione schermo
void screen(int mode){
__asm
ld a,4(ix)
call 0x005F ; --- go to screen mode
call 0x00CC ; --- erase function keys
__endasm;
}
//funzione per impostare colori schermo
void color(char primo_piano, char sfondo, char periferico){
_asm
ld hl,#0xf3e9
ld a,4(ix)
ld (hl),a
inc hl
ld a,5(ix)
ld (hl),a
inc hl
ld a,6(ix)
ld (hl),a
call 0x0062 ; --- change color
_endasm;
}
//funzione per stampa stringhe sullo schermo
void print(char *stringa){
char var;
int x=0;
while(*(stringa+x)!='\0')
{
var=*(stringa+x);
putchar(var);
x++;
}
}
I've keep only screen(), color() and print() functions for understand better where is the problem in my source
I've compiled my main.c with this command row:
sdcc --no-std-crt0 -mz80 --code-loc 0x4020 --data -loc 0xc000 -o prova.ihx main.c crt0msx.16k.4000.rel
and the compilation resoult is:
at 1: warning 117: unknow compiler option '--data' ignored
at 1: warning 119: don't know what to do with file '0xc000' .
file extension unsupported
"sdcpp" it's not recognezed as a internal or external command or an executable program or a batch file
at 1: warning 190: ISO C forbids an empty source file
I don't understand why my compiler tell the above replies ?
Nobody can help me please ?


