I've been playing with this C to z80 compiler for the past couple hours, and I must say I'm impressed. The compiled C code runs as expected, and works quite well. Things like division, multiplication, mod, true-local variables, recursize function calls, etc.. all work. The biggest problem is the lack of pre-defined functions. Here's a full list:


Code:
void ClrScrnFull(void);
void HomeUp(void);
void NewLine(void);

void PutC(unsigned char c);
void PutTokString(unsigned char ta, unsigned char tb);
unsigned char IsA2ByteTok(unsigned char t);
void PutS(unsigned char* s);
void DispInt(unsigned int i);
unsigned char GetKey(void);

extern unsigned char CurRow;
extern unsigned char CurCol;


However, if more were to be written, it could definitely be very useful...

Get it here: http://www.ticalc.org/archives/files/fileinfo/380/38061.html
I'd be happy to write some functions for it...perhaps we could contact the author, get permission to work on it, and make it a BASIC 1337 project?
they dont explain how to make functions very well, but I did upload an OS X build for lazy people....
I saw that, I linked to it on my asm resource page...
KermMartian wrote:
I'd be happy to write some functions for it...perhaps we could contact the author, get permission to work on it, and make it a BASIC 1337 project?


that would be cool Smile http://www.ticalc.org/archives/files/fileinfo/381/38118.html <---my build
I'm gonna have to check this out...how badly inefficient is the code though?
KermMartian wrote:
I'd be happy to write some functions for it...perhaps we could contact the author, get permission to work on it, and make it a BASIC 1337 project?


but its not in basic Sad (nor does it compile basic)

The generated code for a small program that moves a '+' around the home screen (and when the '+' is over a 0, it ends) was around 7,000bytes of ASM (and comments). However, the generated binary was only 600bytes, so the Z80 assembler must do code optimization too...

Easy ASM functions would be simple, because its just chunks of ASM code wrapped with _ASM and _ENDASM (or something like that). returning a var or receiving a var i have no clue how you'd do

Oh, and teh actual Z80 code creation is done by SDCC. TISDCC is a "wrapper" to easily use sdcc, devpack, and such (or so it would appear)

Also, its released under the GNU GPL (i believe), which therefore means permission to use it/redistribute it is already given (as long as original author is credited and such)
Kllrnohj wrote:
KermMartian wrote:
I'd be happy to write some functions for it...perhaps we could contact the author, get permission to work on it, and make it a BASIC 1337 project?


but its not in basic Sad (nor does it compile basic)

The generated code for a small program that moves a '+' around the home screen (and when the '+' is over a 0, it ends) was around 7,000bytes of ASM (and comments). However, the generated binary was only 600bytes, so the Z80 assembler must do code optimization too...

Easy ASM functions would be simple, because its just chunks of ASM code wrapped with _ASM and _ENDASM (or something like that). returning a var or receiving a var I have no clue how you'd do

Oh, and teh actual Z80 code creation is done by SDCC. TISDCC is a "wrapper" to easily use sdcc, devpack, and such (or so it would appear)

Also, its released under the GNU GPL (I believe), which therefore means permission to use it/redistribute it is already given (as long as original author is credited and such)


7000 bytes = text. That bears only a relative ratio to final binary size.
600 is still a bit big for that.
I recommended it for 1337 coverage/featuring because it's a non-ASM, noob-friendly way to program better, faster games. Smile
KermMartian wrote:
7000 bytes = text. That bears only a relative ratio to final binary size.
600 is still a bit big for that.
I recommended it for 1337 coverage/featuring because it's a non-ASM, noob-friendly way to program better, faster games. Smile


True, but ASM isn't compiled, its just assembled (theoretically anyway)

I think more functions need to be created before it gets officially endorsed by B1337
Kllrnohj wrote:
KermMartian wrote:
7000 bytes = text. That bears only a relative ratio to final binary size.
600 is still a bit big for that.
I recommended it for 1337 coverage/featuring because it's a non-ASM, noob-friendly way to program better, faster games. Smile


True, but ASM isn't compiled, its just assembled (theoretically anyway)

I think more functions need to be created before it gets officially endorsed by B1337

Sounds like a plan! Let's get to it.
heh...i'll try to do what i can, but i don't know ASM Laughing
Kllrnohj wrote:
heh...I'll try to do what I can, but I don't know ASM Laughing

Ohhh, that could be a problem. :S
Quote:
I recommended it for 1337 coverage/featuring because it's a non-ASM, noob-friendly way to program better, faster games. Smile


Since when did C become n00b-friendly? Confused
better idea: use Latenite(IDE) by Ben Ryves, the new EarlyMorning(Sprite Editor) by Vincent Junemann, PindurTI(Emulator) by Patai Gergely, and the TI Calculator API by Tim Franssen- the programs make everything easier, and none of that pesky .org $9D95 crap...
wizard3246 wrote:
better idea: use Latenite(IDE) by Ben Ryves, the new EarlyMorning(Sprite Editor) by Vincent Junemann, PindurTI(Emulator) by Patai Gergely, and the TI Calculator API by Tim Franssen- the programs make everything easier, and none of that pesky .org $9D95 crap...

Eh, I shall always remain a hard-liner about coding. Smile
wizard3246 wrote:
better idea: use Latenite(IDE) by Ben Ryves, the new EarlyMorning(Sprite Editor) by Vincent Junemann, PindurTI(Emulator) by Patai Gergely, and the TI Calculator API by Tim Franssen- the programs make everything easier, and none of that pesky .org $9D95 crap...


even with all those tools, you STILL need to know ASM and you STILL need to do all that low lever crap. The whole point of a C compiler is to AVOID all that Wink

Quote:
Since when did C become n00b friendly?


Its a hell of alot easier to learn, understand, and read than ASM Laughing

:For function creation, the documentation at http://sdcc.sourceforge.net/ talks about returning values and pure ASM in functions
Exactly. So I think this is something to keep an eye on.
so Kerm, you up for making some functions Wink
I'd love to, in all my mountains of free time. Very Happy Wink
bah, we all know you have no life anyway, so what ELSE would you use your free time for Wink
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement