Re: A89: TIGCC


[Prev][Next][Index][Thread]

Re: A89: TIGCC



>>l have just downloaded TIGCC onto my computer and wow things have really
>>changed!  The last time l used it was a version from a year ago.
>>l'm trying to compile Aerox using this version 0.9 but it doesn't seem to
>>like my subroutines.  For almost everyone l have, l get this (example):

>>[error:] Undefined Reference to 'idle_loop'

>>...
>>idle_loop();
>>...
>>...
>>...
>>idle_loop()
>>{
>>asm("
>> jsr userlib__0000");
>>}

I think you need to put your function before the function call (or initialize
it as being accessible via he function that is calling it.) Try putting:
char idle_loop(void);

at the beginning of your program. Also, you never specified what idle_loop
would return (whether it be a void or char. I'm assuming it's a char). I
believe that the compiler expects a return value in d0 (correct me if I'm
wrong), and if I remember correctly, idle_loop also returns a value in d0, it
should work fine. Also, why do you want to use library calls anyway? TIOS has
basically every function that the libraries have, and you don't need to
create something like that for every function you want to call. Just a
thought.

-Josh