Jump to content
insomnia

GCC for the TI

Recommended Posts

I've never found strings to pull in memcpy, but... GCC /does/ make assumptions about the standard library you have, so I'm not surprised that something is. For example, I implemented a printf in libti99, but then I found that if you code printf() with no variables, gcc generates puts() instead (by deafult).

 

libti99 has gotten a little cluttered, and fills multiple voids now. Eventually I do hope to clean it up and make it more stable.

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

libti99 is great! It provided basically everything I needed to port a game from a CC65 platform (6502 based computers) to the TI. Very usable, especially with the good source examples available in this thread and forum. So thanks!

  • Like 4

Share this post


Link to post
Share on other sites

Thanks guys.

 

I like the sound of that. It makes a compiler where you are really in control.

The reason I asked was I made this linker for my own amusement that links EA3 object and lets you RUN (B) , CALL (BL) or BLWP into the external code from Forth.

It's fun to see it work and for the first time in my life I understand a bit about what linkers actually do. :) 

Maybe C99 is compatible?  I will take a look.

Or maybe I should learn to parse the ELF file format... hmm. ;) 

 

EDIT:  Maybe not. :)  262 page specification document.  :o

Share this post


Link to post
Share on other sites

You can get the gcc linker to output flat binaries and a text file with the symbol table, with those two things you should be able to write a relatively simple tool that combines the information in those two files in to an EA3 object file. I think it might even be possible to write a linker script to output something that converts easily to EA3?

Share this post


Link to post
Share on other sites
1 hour ago, TheMole said:

You can get the gcc linker to output flat binaries and a text file with the symbol table, with those two things you should be able to write a relatively simple tool that combines the information in those two files in to an EA3 object file. I think it might even be possible to write a linker script to output something that converts easily to EA3?

Thanks for that info. 

I was thinking similarly.  I used a DOS Forth system in the 90s that took the .OBJ and the .MAP file and allowed linking external language code into the Forth environment.

Forth traditionally didn't play nice in the sandbox with other languages in the old days.  Not true today with commercial systems.

I am just keeping my old brain running so making something like this work on the 99 is good challenge.

 

 

Share this post


Link to post
Share on other sites

I already have a tool that converts binary files to EA#3, though it's not terribly flexible (it only outputs absolute data). I used it for some XB stuff way back in the day.

 

I dunno. Offered if it's useful. While I use OBJ2BIN a lot, BIN2OBJ I haven't looked at in many years. ;)

 

https://github.com/tursilion/tiobj2bin

 

Edited by Tursi

Share this post


Link to post
Share on other sites
3 hours ago, Tursi said:

I already have a tool that converts binary files to EA#3, though it's not terribly flexible (it only outputs absolute data). I used it for some XB stuff way back in the day.

 

I dunno. Offered if it's useful. While I use OBJ2BIN a lot, BIN2OBJ I haven't looked at in many years. ;)

 

https://github.com/tursilion/tiobj2bin

 

Thanks Tursi.

I will give it a whirl. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...