C++ basic compiler

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

FaveRave09
New Member
Posts: 13
Joined: Tue 29 Nov, 2005 8:10 pm

C++ basic compiler

Post by FaveRave09 »

I am working on a simple C++ program to turn a text file written as basic and turn it into a TI 83+ (8XP) file. Can anyone help me out on finding the file format or the codes for basic commands? I think I have a way of finding it out, but I want to make sure I doing it right. (it is friggin hard :x )
Welcome to Jamdung, poor people are dead at random, political violence caan done.
-Damian Marley
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

Turn it into a basic program or an ASM program. Both are pretty much the same filewise. There was a link I've forgotten about, but I got it from someone on this board or on detachedsolutions.com. The most important thing is the checksum which is ( I ~think~) the low order byte of the sum of the bytes in the program. A list of the symbols and commands and the hex equivalent can be found in ti83plus.inc. Good Luck!
Image
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

I recommend a C++ compiler that creates ASM programs. That'd be so awesome. Then 83+ series can compete with Ti-89's TIGCC.

hey btw, do you need a 32-bit processor to be compatible with C/C++?
z80 is 16-bit I think.
Image Image Image
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

I think z80 is 8 bit, though I might be wrong. And on TI Freak's Assembly Resource, there IS a z80 C compiler. The problem is C code is bloated compared to real z80.
Image
User avatar
DigiTan
Calc Master
Posts: 1069
Joined: Fri 04 Mar, 2005 12:52 am
Location: NW Wisconsin
Contact:

Post by DigiTan »

#1 - Z80 is 8 bit

#2 - Both C++, TIGCC --and all other languages for that matter-- are slow and bloated compared to assembly and machine code.

#3 - The processor doesn't have to be any specific architecture or bus size. In fact, my flash expander prototype used C on an 8-bit AVR-series µcontroller.

@ FaveRave09: I'm not sure of how it works either, but I saw a BASIC token summary on ticalc not too long ago. With any luck, some has done an 83+ version by now as well.
My diet consists of nails, code-stealers, and HP fans.
Projects:

Robot War [TI-82, TI Flash App]
Sonic the Hedgehog [Multiplatform]
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

C may be slower than assembly but it's not "slow and bloated" by any means (it may actually be faster and smaller for mediocre assembly coders). In general. C seems to be bad with z80 so that's why C compilers for 83 series calculators aren't that great.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
User avatar
DigiTan
Calc Master
Posts: 1069
Joined: Fri 04 Mar, 2005 12:52 am
Location: NW Wisconsin
Contact:

Post by DigiTan »

I'm guess I'm guilty of exaggarating a bit there with the "bloated" talk. In relative terms, it's still tough to find to a C routine to runs as fast as an ASM version.
My diet consists of nails, code-stealers, and HP fans.
Projects:

Robot War [TI-82, TI Flash App]
Sonic the Hedgehog [Multiplatform]
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

TI-Chess has persuaded me in the worth of TIGCC.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
FaveRave09
New Member
Posts: 13
Joined: Tue 29 Nov, 2005 8:10 pm

Thanks

Post by FaveRave09 »

whoa. way more info than I asked for (thanks). I must admit, I never thought of using the ti.inc file (hitting myself in the head with anuncooked noodle). but some people are interpreting the situation totally differently. I can't tell what you're thinking of, but it's not what I'm thinkin. thanks a lot anyway. :D
Welcome to Jamdung, poor people are dead at random, political violence caan done.
-Damian Marley
User avatar
MissingIntellect
Regular Member
Posts: 102
Joined: Tue 21 Dec, 2004 2:46 pm
Location: Santa Clarita, California
Contact:

Post by MissingIntellect »

C on a 16-bit platform, such as the 68k processor in the TI-89 family? Absolutely. C on a Z80 platform, such as the TI-83? You're probaqbly better off with assembly. :)
--Steve Riekeberg
MaxCoderz Co-Founder, Ex-Staff Member
Image
http://www.missingintellect.net
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

The C compilers which are targetted at the 68k processors have been in dev for a while and are quite decent. They code produced is STILL bloatware when compared to hand-coded ASM.

There are a few C compilers targetted at z80 but they are not very decent as far as calc dev is concerned.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
blueskies
Calc Wizard
Posts: 553
Joined: Tue 25 Apr, 2006 2:24 pm

Re: C++ basic compiler

Post by blueskies »

FaveRave09 wrote:I am working on a simple C++ program to turn a text file written as basic and turn it into a TI 83+ (8XP) file.
he's not doing a C->Z80 program, he's doing a BASIC->Z80 program written in C++. It still makes no sense, but at least we should argue about the right thing. :D
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Yes, i think we are all aware of what he is trying to do. But the point still remains about the C->z80 thing.

FaveRave09: You do know that the old graphlink basically allows you to do that right?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
currahee
Calc Wizard
Posts: 659
Joined: Mon 20 Dec, 2004 4:00 am
Location: My Computer/Someone else's computer
Contact:

Post by currahee »

I hate to say it but y'know I can do pretty much the same thing with TI Graphlink 83+, except for replacing the Theta characters and the arrow characters.
"Not long ago, the Black Gate of Armonk swung open. The lights went out, my skin crawled, and dogs began to howl. I asked my neighbor what it was and he said, 'Those are the nazgul. Once they were human, now they are IBM's lawyers.'"
Liazon
Calc Guru
Posts: 962
Joined: Thu 27 Oct, 2005 8:28 pm

Post by Liazon »

tr1p1ea wrote:The C compilers which are targetted at the 68k processors have been in dev for a while and are quite decent. They code produced is STILL bloatware when compared to hand-coded ASM.

There are a few C compilers targetted at z80 but they are not very decent as far as calc dev is concerned.
But isn't 68k ASM rather different from z80 ASM because you are handling so many more bytes in one register?

and yay for 68k's built in multiplication!
Image Image Image
Post Reply