 20 posts | Greetings!
There is nothing like "C debugger", so you have to figure out what is going wrong by using printf's and other tricks.
In the end, if you want to trace the program at assembly level, you can have a function to make execution stop. Then get to the debugger and trace the prog.
I normally have a _dbug function in asm... something simple like:
_dbug
.(
lda #0
dbug beq dbug
rts
.)
Then I call dbug() from C. The prog stops with an infinite loop at the beq dbug and I take control from the debugger. Then I simply change the Z flag and start tracing...
The C stack is static, 256 bytes in size and set up at the end of the code. It is defined in the tail.s file (which is included automatically) as
osdk_stack
.dsb 256
Don't think you have problems with that, unless having something strange or an error like an infinite recursive call.
If you can provide the code that does have problems...
On a side note, I did not find a lot of limitation in the language. I ported a C version of an infocom interpreter and worked perfectly (i used another dev kit, but the capabilities of OSDK are the same IIRC, having the same library). The real problem is that the compiler is crappy and you will get slow and fat code. So for real gaming, you'd better go for some assembly, at least in the key routines.
Cheers.
|