ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: News :: First BASIC to assembly compiler released

First BASIC to assembly compiler released
Posted on 3 January 1999, 00:59 GMT

David Hart has released the TI-BASIC Compiler v0.2 Alpha for Windows 9x/NT. This program will compile tokenised TI-BASIC programs into assembly programs for the TI-86. Currently there is only limited command support and most graphing commands are not supported. Compiling a program will increase its size by 20-40%, which is quite large when you compare BASIC and assembly programs. David will continue development on this program if he gets enough support (which he probably will).

 


The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.


Adding support for "advanced" TI-BASIC commands
my $0.2

Hey David, You know what would make this Compiler really rock? Include support for special ASM commands like these:

Sprite(
Invert(
Eraseline( TI86 can't erase lines :-(
Contrast(
PowerOff

Since the Compiler can only read tokenized code, You can put the special commands in your BASIC prgm in quotes on a line by themsleves like this:

:"Sprite( 2,5,00FFFE...)"

This will allow the command to appear in the tokenized code exactly how it was written in the original BASIC code (I think).
I'm not sure how your compiler works, but if you could figure out a way to add "Advanced ASM" commands, it would be so awesome!! Keep up the good work!

my 0.02

     4 January 1999, 06:04 GMT

Re: Adding support for "advanced" TI-BASIC commands
David Hart

That's given me a really good idea... But I won't say any more just yet, it'll spoil the surprise!

     5 January 1999, 22:11 GMT


Re: Adding support for "advanced" TI-BASIC commands
lexlugger

Why not add inline assembly language?

     7 January 1999, 05:25 GMT

Re: First BASIC to assembly compiler released
Kane

Uh... it doesn't work for me. I get a Range Check Error every time I try to compile. Even when trying a simple program that Displays "Hi" wouldn't work. And yes, I ran it on my calc before sending it to the computer. So what could be wrong? I can't find anything in the help files about a Range Check error =[

     4 January 1999, 22:17 GMT


Re: Re: First BASIC to assembly compiler released
David Hart

This is because you're compiling files in your root directory (C:\, A:\ or whatever). Make sure any files you try to compile are in a sub-directory of the root directory. This bug occurs because the compiler adds an extra \ after any file paths, which works for sub-directories but not the root dir. This'll be fixed in the next version.

     5 January 1999, 22:26 GMT


Re: Re: Re: First BASIC to assembly compiler released
Kane

Cool thanks :)
Now I can finally put my name on my BlackJack and Slots programs and not have to worry about people editing it in BASIC code =)
The 20%-40% won't affect it that much either, since it's not that big
hehe
Thanks for the help Dave

     6 January 1999, 00:50 GMT


Re: Re: Re: Re: First BASIC to assembly compiler released
Eugene

Ever heard of edit-locking via Graphlink software? (Please don't say you have a TI-85 or don't use TI's software)

     6 January 1999, 02:18 GMT

Re: Re: Re: Re: Re: First BASIC to assembly compiler released
Kane

Never heard of it. I never really checked out the whole WinLink program, and I didn't think edit-locking Basic programs was actually possible. And yes I have a TI-86.

     6 January 1999, 21:20 GMT


Re: Re: Re: Re: Re: First BASIC to assembly compiler released
Eddie Hazell

Edit locking for the 86 is lame protection. The programs cannot be edited on the calculator, but if you open them with WinLink, you can view and edit the entire program. You can even unlock it! I don't think that is very nice protection.

     9 January 1999, 20:05 GMT


Re: Re: Re: Re: Re: Re: First BASIC to assembly compiler released
Eugene

It's even worse for the 89. You can unlock programs you locked on the computer...on the calculator!!!

     18 January 1999, 03:58 GMT

Re: First BASIC to assembly compiler released
Mike

Yeah this would be nice if it acctually worked

     4 January 1999, 22:31 GMT

Re: First BASIC to assembly compiler released
Roger

How come I get an error every time I try to compile a program with menus? The message is something about invalid parameters

     5 January 1999, 04:44 GMT

Re: First BASIC to assembly compiler released
Mbeanis
(Web Page)

Everybody has said "Now do it for my calc!"
Well, I think the next logical step is the TI-85... like monkeys to humans (closest relation). Anyway, the BASIC "Assembly include" program function sounds pretty sweet, except that when the calc automatically tokenises the prog, it probably automatically inserts a Disp command before "ASM ", or am I totally wrong? I don't know enough, but it might be a problem. ANyway, good work, I wish I had a TI-86 now.

     5 January 1999, 07:01 GMT


Re: Re: First BASIC to assembly compiler released
David Hart

I'm afraid I won't be porting it to the TI-85 because the mathematical routines are at different locations on different ROM versions, and there are so many ROM versions that it wouldn't be worth supporting one of them, and it would take far too long to support all of them. "Assembly includes" aren't supported yet (next version again!)

     5 January 1999, 22:31 GMT

Re: First BASIC to assembly compiler released
higgimonster

This is a really great idea. I have an 83 and I am getting an 89 friday. I am asuming that i ue TI-BASIC to write these programs?
I hope so becaue I havee ton of progs that I have wwritten for my calc but they are too deemanding for my 6mhz of prosseccing power.

     5 January 1999, 21:13 GMT

Re: Re: First BASIC to assembly compiler released
Mark Leverentz

Yes, the 89 does have TI Basic, but you will have to do a little bit of work to translate the programs. The biggest difference between 83 and 89 basic is that the 89 commands are typed in letter by letter (i.e. to type in a For command, you type 'F', then 'o', and then 'r') as opposed to the 83, where you just select "For" from a menu.

But don't get your hopes up too high. I went from an 82 to an 89, and I didn't notice any huge speed improvement in BASIC programs. Don't get me wrong though, I think that getting an 89 is a great move %)

     6 January 1999, 00:09 GMT


Re: Re: Re: First BASIC to assembly compiler released
Eugene

Actually, you CAN select commands from menus on a TI-89. On an 83, you HAVE to select from menus.

If I write any BASIC programs for my 82, I do it on my computer because I can't stand switching between the program editor and the menu--you can't see both at the same time! (Split screens? Dunno.)

Another difference is that we don't have the "One End Fits All" scenario. We end If-thens with an endif, for loops with endfor, generic loops with endloop, etc. (We even end prgms with endprgm!)

Here's a third: You can take advantage of parameters! (those things you can put in between the parentheses you tack on after a program name)

Let me also mention that you can also run programs without params from the keyboard by pressing diamond, then 1-9. Just rename the program kbdprgmx, replacing the x with a digit.

You will see more differences when you get the 89, if you decide to.

P.S. Just in case you want to know, I ran the same program (translated, of course) on the 82 and 89, and I noticed that the 89 ran much faster than the 82. (83? Same thing, I think.)

     6 January 1999, 02:30 GMT


spd
KAKE

spd. as in the drug. the chemical brain-adler. the 82 (the entire 8x series) runs at 6mhz (really more like 1.2), while the 92 & 89 run at 10mhz. one has a z80, one has a 68k. just like in my mac classic. see a trend here?

spd. turbo your calc and get high. that's the
icing
on
the

-KAKE

     6 January 1999, 05:09 GMT


Re: Re: First BASIC to assembly compiler released
Valentin
(Web Page)

Ya I have a TI-86 and I did basic basic programming, but it was too slow like all the ti 8x (exp. 89) run on 6MHz, so I looked for something to speed up my ti 86, so I boosted it, and it runs at 2-3 times faster, and it runs fine, I did the same for a few of my friends because the y do a lot of calc. and some of the problems take too long to graph and solve. Oh i think that the best way is to have a switch, so that you can go to normal and turbo, saves power too.

     6 January 1999, 04:16 GMT


Slow 86''s
Nathan Ladd

Yeah, my main speed problem though is editing a medium to large (1k and up) sized program, and then trying to run it. I hate the long time that it takes to load the prog. Any way to remedy this?

     6 January 1999, 05:24 GMT


Really Slow 86''s
KAKE

Nathan Ladd,

i don't know whether you know this or not, but the 86 is THE slowest 8x calculator (okay, so maybe the 80 or the 81 is, they're irrelevant). the reasons are technical, but simply put, the z80 can't handled 100k of RAM. so it does some insane little switching thingy which takes time. so for anybody AT ALL that makes basic progs, a turbo is damn well near a requirement. it makes the calc actually usable. i know only 1 person who thinks it's just fine.

well, enough rambling. remember,

too many
chefs
ruin
the

-KAKE

     7 January 1999, 04:12 GMT


Re: Really Slow 86''s
Brock Wilcox

Correction, the 86 is the slowest when it comes to running TI-BASIC. Assembly is just as fast as any other calc with the Z80. Just look at sqrxz or a similar asm game.

--Brock

     7 January 1999, 07:53 GMT


crctn
KAKE

hehe, i found what i was looking for. the ti81 has a 2 mhz z80 making it the slowest z80 based, while the 80 has a 980 khz proprietary chip, making IT the slowest at basic. and no, asm is no faster. (think about it, how can you escape from the limitations of the z80 in reference to ram? you can't. therefore, asm isn't going to be able to bypass the mechanism to enable that "woppin' " 100k.

you need
some
sugar.
try

-KAKE

     7 January 1999, 09:01 GMT

THE slowest...?
Mike
(Web Page)

I agree that the 86 processes basic really poorly, but asm seems to be really up to speed, though. If asm is the slowest on the 86, then why does sqrxz slow down so much on the 85 and not on the TI-86?

     7 January 1999, 21:04 GMT


Re: crctn
Lost

Actually the reason the 86 is just about the same speed as a 85 in asm and slower in basic is that in asm you can controll the page flipping (that is how it uses the extra memory) in asm. You don't have to change the rom page often and when you do you can set up your program so its at a time when speed isn't important(Out side of the main loop). In basic programing the calculator is constantly flipping pages and you can help it. By the well all calculators (I think) have some form of page flipping, just not as often.

     8 January 1999, 23:26 GMT


oops
oops

oops, yeah, your right, sorry. i had a discussion with a friend at school about it and we timed a simple graphic asm prog i made on two non-turboed calcs (85 & 86) with brand new batteries and they were about the same, the 86 was MARGINELY FASTER. i spent more time on it's code, though, too. i appologize for being wrong. i don't know what i was thinking.

when you're
hungry,
eat

-KAKE

     9 January 1999, 08:28 GMT

1  2  3  4  5  

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