ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Community :: Articles :: Cross Compiling
Cross Compiling

Posted on 12 August 1998

The following text was written by Michael Cook:

Basically what this article is about is a need for cross-calc compiling tool (one for the Z80 based calcs and maybe one for the Motorola based ones). All of the Z80 calcs use the same operations. Then only difference is the ROM locations, etc. So the way I see it, all that we'd have to do is make some small changes in the way we write source code and we'd end up with one game and exact copies for all the calculators.

So how would this work you say? It's simple. Instead of calling something like _PUTS on the 83, or something else on one of the other calcs, you would call something like _SHOW_STRING_NORM and there would be one of these type things for each of the routines. Then when the program was compiled, a different version would be produced for each calculator, replacing things like above with the correct ROM call. Things like sprites could also be included because they would use calls like these that would work on all the calcs.

The other way (and in my opinion superior) would be to make one shell for all of the calcs. All the calls would be put to the shell and redirected. This would take almost no time and then every call would have an equivalent on every calc. With this there would be one more shell but I think that we'd all agree that any feature losses would be fine compared to the giant library of games.

So what other things should be done? It won't be too hard to make the pre-compiler that you would send the code to, which would put certain bits of code only in the 85 version or only on the 83 version. Then you could make a program for a 96x64 pixel screen like the 83 and the extra 32 columns of pixels would be used on the 85. This would allow games to look their best on all calcs with the same code! I'd like to thank you for your time and hope you consider this article. I'd love to see programmers like Jimmy Mardell, Andreas Ess, Bill Nigel, and others work on this.

  Reply to this item

All in one compiler
Gerard Imbert

My 2 Francs:

A solution for developing a cross-calculator compiler could be making a single compiler with new assembly mnemonics that can assemble for all the calcs you want in a click. Nice, uh ? :)
Now, how can this be done ? Making a single universal shell would be too complex and therefore too big for small calcs. But, the key would be to find out which "programming functions" can be done on all the TIs, then defining a "standard compiler library" with those commands. These commands would work like macros, for the compiler will replace them by calculator-specific commands, adapted to each case, at compilation time.
Obviously, even if this compiler is an assembler, the speed will not be optimal, and the more powerful calcs (ti92) will be limited to what ti82 can do (for some ti92 "programmable functions" cannot be done on 8x). But as French people say, you canīt have the butter and the money for the butter.
In all cases, I donīt think such a compiler can be done by a single person, the answer is as always team up and divide work... :-)

Reply to this comment    18 August 1998, 16:48 GMT

Re: Article: "Cross Compiling"
J.R. Johnson

I Like the shell idea I myself have been working
on this project but due to lack of time have given
it up last april (too complex for my lack of resources that I currently have.) But if anyone
wants any of the info I have collected! :)

Reply to this comment    18 August 1998, 16:49 GMT


Re: Re: Article: "Cross Compiling"
Stupid Man
(Web Page)

I have checked out the resources I asked you for. They are great!!!!!!!!!! if any one wants any of those I'll be happy to hock-ya-up ;)

Reply to this comment    18 August 1998, 19:03 GMT
1  2  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2012, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer