Would it be possible to make a C cross-compiler for the TI86?

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
I figure if it was, someone would have done it already, but does anyone have any input on the topic?
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
why not? doesn't it run an x86 cpu anyway? you could probably just modify the obj file that gcc produces. also i think you'd need some c libraries that'd take quite a bit of (too much?) room on the ti86
 

Moohooya

Senior member
Oct 10, 1999
677
0
0
Are you looking for a C compiler to run on the TI86, or a cross compiler to generate code for the TI86?

I'd check first to see if either exist. There will certainly be issues with running a compiler on the TI86, lack of memory etc. The libraries will have to be pretty small. If a cross compiler is what you are looking for, the you won't have to worry about the memory limitations of the TI86. If no such compiler exists at the moment, just take the closest cross compiler to the TI86 platform, and modify the libraries. (At least the startup code will have to be modified.)
 

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
I guess what I meant was a compiler that ran on your PC and allowed you to write C programs and compile them into Z80 assembly language.
 

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
The Z80 processor uses the x86 instruction set? I was under the impression that the Z80 was much simpler than any other x86 cpu (I thought it didnt have an FPU, cant even do multiply or divide, etc.)
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0
Original x86 did not have an FPU either.
Hee hee hee, the jollies of anything previous of the 386DX, i.e. 386SX, 286, 186 (they use those in the Airbus 320), and of cours 8088 and 8086.

To date, a lot of operating systems carry code to emulate an FPU. LOL!
 

Special K

Diamond Member
Jun 18, 2000
7,098
0
76
I found two programs that may be what I am looking for:

ZCC (scroll down and look under C compilers)

z88dk

Are these what I want?
 

RSMemphis

Golden Member
Oct 6, 2001
1,521
0
0
the first link died the AT-Geocities death (any geocities link posted on AT is bound to die).

The second looks like an interesting choice, mainly because it is free. But you will have to adjust the libraries and the startup code for the calculator in all likelihood. If there is a mailing list for the z88dk, I am sure someone can tell you more about it.
 

Moohooya

Senior member
Oct 10, 1999
677
0
0
Man are some of you off base. The Z80, we are talking an old 8 bit CPU here. It did have a couple of extended registers to give you 16 bit registers.

No FPU. (You've got to be dreaming to think it had one.)
No multiplication
No division either.

I'm sure you can find libraries out there to do arithemetic. Mul and division are fairly simple. Getting fast floting point arithmetic is tricky, so don't try and do it yourself.

I thought the CPU went
4040
8080
8086

The Z80 was a seperate CPU, similar to the 8080, but beats me which came out first.
 

kylef

Golden Member
Jan 25, 2000
1,430
0
0
Floating point libraries already exist for the Z80. At least they did 8 years ago when I looked...

Sorry, I don't have any links for you, but I can tell you that they do exist!

Edit: also, I think that the TI-85/86 already has floating point library support already in ROM.

I think you should be looking into how to write a limited C cross-compiler for the TI-86 assembly language. Their assembly language documentation might tell you what libraries are available built-in to the TI86.
 

Scootin159

Diamond Member
Apr 17, 2001
3,650
0
76


<< Man are some of you off base. The Z80, we are talking an old 8 bit CPU here. It did have a couple of extended registers to give you 16 bit registers.

No FPU. (You've got to be dreaming to think it had one.)
No multiplication
No division either.

I'm sure you can find libraries out there to do arithemetic. Mul and division are fairly simple. Getting fast floting point arithmetic is tricky, so don't try and do it yourself.

I thought the CPU went
4040
8080
8086

The Z80 was a seperate CPU, similar to the 8080, but beats me which came out first.
>>



you're right, the Z80 was a copy of the 8086, just made by another company (I forget the name...tempted to say Texas Instruments (which would make sense in a TI-86), but I also thought it started with a 'Z'). None the less if you're in for a fun project, the Z80 can be found for about $1/each - make your own motherboard? I imagine it shouldn't be 'too' complex.
 

Moohooya

Senior member
Oct 10, 1999
677
0
0
Scootin159,

Yes, that rings a bell, it was a clone made by someone else. I don't think it was TI though. Was it Zilog (spelling?)

Also agree with kylef. It was such a popular CPU back in its day, there must be gobs of stuff on it out there.
 

Scootin159

Diamond Member
Apr 17, 2001
3,650
0
76


<< Scootin159,

Yes, that rings a bell, it was a clone made by someone else. I don't think it was TI though. Was it Zilog (spelling?)

Also agree with kylef. It was such a popular CPU back in its day, there must be gobs of stuff on it out there.
>>



That's it!

I have a catalog around here somewhere were you can buy 10 of them for $8, makes ya wonder why those graphic calc's cost so much.