ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Community :: Articles :: BASIC Doesn't Have to Be That Basic
BASIC Doesn't Have to Be That Basic

Posted on 24 January 1999

The following text was written by Patrick Wilson:

Hello everyone. I've been thinking a lot after submitting my article, The TI Programming Alliance, and I realized a few important things. People complain that good assembly programs are few and far between. This is unfortunately true, however don't leave BASIC out. Unless it's for the TI-83 or less. Let's face it, BASIC pretty much just sucks. With the exception of rapid development and almost no risk of crashing, it's slow, cumbersome, inefficient, and resource lacking. Assembly makes up for this, fixing all of these (most of the time). Now, I may have strayed a bit, but... I bring these facts up for a reason and I'll get to the point in just a bit. There is this group of highly talented BASIC programmers that go under the name of "BKSoft". They make VERY good games for the TI-86. All in BASIC though. Second, an assembly program under the name of ASAP X Command extends BASIC in a unique way. It adds simple, fast, and very effective extensions to BASIC such as the ability to display inverted text, draw sprites, test the existence of variables and much more. Now, I will explain why I've said so many different things. What if BASIC was extended by so much, that you couldn't tell where the BASIC ended and the ASM begins? That's right folks! Add assembly power functions to the built-in BASIC. Just think, it wouldn't be that awfully hard.

  1. Find out what BASIC programmers want.

    Personally, I want the ability to draw sprites, find out whether or not the Axes or Coordinates or the Grid's are on, and have fast encryption and decryption. Just think, a math program that didn't mess up your graph screen, a BASIC RPG with fast moving sprites (Yes, BASSPro for the 86 does do this), and a way to encrypt saved games with a password so no one can screw up your saved game when you almost beat it!

  2. Create an API.

    OK, big idea coming! OK, you got one program that runs tiny little applets in the form of a prgm file. The applets would add all the functionality, while the big one would be run through the BASIC program wishing to use the applets. The program would search for all applets with a certain header and load them. Finally, the program could use the commands that were added by the applets. Phew!!!

  3. Keep some control.

    We want functionality, not oversized crap. If this idea is put to use, please use good judgment.

  Reply to this item

Re: Dat Fancy Artical Up There Abouts
Matthew Reed

I believe that adding asm commands into normal BASIC would be a wonderful idea. But, as said before, I wouldn't think any asm programers would want to, as it would let any normal BASIC programer do much better games, putting asm programers out of a job...

Also, my _85_ can do 5x* cos(3x)= 0.5 in 1.9 seconds! So ha! (I guess it is because its got the direct solver app in second-graph that cuts out all that solve for x,1 hub-bub)

Reply to this comment    24 January 1999, 20:20 GMT


Re: Re: Dat Fancy Artical Up There Abouts
Hp forever

Again that is the numeric solution. The ti-85 doesn't have symbolic solving capabilities. The only 4 calculators I know of that Symbolic solving capabilites are the (HP48GX, Ti-92, Ti-92+, Ti-89).

Reply to this comment    24 January 1999, 21:28 GMT


Re: Re: Re: Dat Fancy Artical Up There Abouts
lexlugger

When I solve this equation on my TI-89 using the interactive solver it takes <1.5 seconds.

Reply to this comment    25 January 1999, 13:26 GMT


It is retarded to use solver speed to find the speed of a calculator
Will
(Web Page)

The solver uses Newton's method to solve equations. Once the answer is close, the calculator stops. The amount of iterations the calculator has to do is completely dependent on the initial guess. Therefore the speed of the calculator can only be compared if the exact same initial guess is used. (The value of x is used as the initial value) SO DISREGARD ALL PREVIOUS TESTS USING SOLVER, they have different initial guesses!

Reply to this comment    3 February 1999, 03:18 GMT

Re: "BASIC Doesn''t Have to be That Basic"
Guerric

I dont remeber who already implemented this idea but some guy created a program for the 85 that made his own version of basic into asm. This was a pretty good idea but i never got to try it. Off the top of my head i cant remember but if you look hard it is out there.

Reply to this comment    24 January 1999, 20:49 GMT

Re: Article: "BASIC Doesn''t Have to be That Basic"
SolSkink

1.First of all, the TI-89 already has the ability to run ASM functions from within programs.
2.Although, there is the issue of speed and program size, the easier it is to program, the more programmers will program programs. Thus, more programs will be made. The more made, the more likely that more useful/fun ones will be made.

Reply to this comment    24 January 1999, 21:00 GMT

Re: Article: "BASIC Doesn''t Have to be That Basic"
Zounds

Here is a useful function that i ask any Ti-89 ASM programmers to make...
Please make a function where one stores some number to a specified variable and then call the ASM program that will then play a sound based on the number in the variable(of course through earphone or something similar) I know that a soundlib already exists for the 89.

Reply to this comment    24 January 1999, 21:05 GMT

Article: "BASIC Doesn''t Have to be That Basic"
Jimmy
(Web Page)

Great idea. I have thought on these lines for a while. In truth I haven't touched Basic since I learned ASM a year ago. But when I was first learning asm I was thinking of using sprites in basic.
The concept is pretty easy and I could get it to work now for but lack of time. All you have to do is get the user to load there sprite into a matrix, list, ect.. load pixel coors in X and Y and then run the asm program which looks up the matrix, and draws a sprite at the x and y.
Another idea would to also just make a library of functions. If the basic user loads a 1 into say.. Z then it draws sprites, a 2 it shuts down, 3 it crahes (likely to happen).
I think basic doesn't have to be used in only math programs. I have seen some perfectly fine games in basic. True they would run better in asm, faster, smaller, but the thing about basic is you can program on the fly, no matter where you are, some the things I programmed in basic would probably take me a year to accomplish sitting at my computer working in asm. But I had spare time in class ect... that I could use to work on them.

Well those are my ideas .. go ahead bash them to hell!!!

Jimmy


BTW: I found that most calcs run at different speeds. I had 2 83's. One was faster at graphing and the other could run loops in programs faster.

Reply to this comment    24 January 1999, 21:31 GMT

Re: Article: "BASIC Doesn''t Have to be That Basic"
Eric Brookins

I created a sprite program that is now out at TI-FILES that uses the Ans variable, but I made this so people who don't know ASM, or don't have much room for matrices on their calculator can create great looking pics.

Reply to this comment    24 January 1999, 22:59 GMT

Re: Article: "BASIC Doesn''t Have to be That Basic"
Matt

The ROM version seems to affect the speed of the calc.

Reply to this comment    24 January 1999, 23:45 GMT

Re: Article: "BASIC Doesn''t Have to be That Basic"
Brandon Sterner

I heard the z80 processor ran at different speeds depending on the batteries as well as the temp.

Reply to this comment    26 January 1999, 20:43 GMT


Re: Article: "BASIC Doesn''t Have to be That Basic"
temporalwizard

I wrote a text scrolling prgm. On my 86 the prgm ran slower than my friend's 86. I checked the RAM, I had less free than my friend, I then deleted some of the old variables and such from my calc and the prgm ran faster than it had before. I know about tokenization, but it wasn't that, the text actualy scrolled across the LCD at a faster rate. So I think that the amount of RAM free may affect the speed at wich a prgm runs.

Reply to this comment    26 January 1999, 22:06 GMT

BASIC is for quiche eaters
lexlugger

BASIC is for quiche eaters who don't know what an opcode is.

Reply to this comment    24 January 1999, 21:34 GMT

Re: BASIC is for quiche eaters
Schatz

You knocking my quiche, boy? I admit that I'm a BASIC programmer, but then you got to remember the classics. Like the Commodore 64, and 286s, and the TI-81. I am even willing to admit that I still use these old, outdated, obsolete machines, and still play games in QBASIC, just because I like to see how _intelligence_ is the main part of designing great games, not the language it's done in.
And yes, despite being a BASIC programmer (as if that makes a differance), I know what an opcode is, so shove those ideas of supperiority up your ass, and shut your mouth.


-Schatz

Reply to this comment    28 January 1999, 00:56 GMT

Re: Re: BASIC is for quiche eaters
EJA

I'm with you. I use an Apple //C once a week or more; I have two 286s I use; I have a TRS-80 I use once in a while (I don't have many programs -or a disk drive- for it & tapes are a pain to find without headers: LEX, do u know what a header on a tape is?); I also have a Tandy 1000 I use almost every day, and a Commodore that I un-hooked from my TV & need to hook it back up (maybe this weekend).

Reply to this comment    28 January 2000, 23:02 GMT


Re: Re: BASIC is for quiche eaters
iri  Account Info
(Web Page)

exactly

Reply to this comment    5 February 2000, 16:10 GMT

Re: BASIC is for quiche eaters
temporalwizard

You must be a real jerk, and a redundant one at that. I realy dislike when people repeat themselves all the time. That's the exact same thing you said in an old conversation. Why degrade basic programers? Why not just say something intelligent about why you like/dislike the idea of supporting basic with asm? The point of an argument or discusion is to explain why you think your opinion is right not belittle people. Just to let you know I would program in asm, but I have no PC with which to do it. I personaly would not use asm support in any of my basic programs. For those who are content to stay with basic and don't have the time, effort, or resources, to learn asm this is a good idea.

Reply to this comment    28 January 1999, 01:34 GMT


Re: BASIC is for quiche eaters
iri  Account Info
(Web Page)

do you know the wrestler lex luger?
he suck

Reply to this comment    5 February 2000, 16:12 GMT

Re: Article: "BASIC Doesn''t Have to be That Basic"
David Moreno

If your going to use your time to try to bring better speed to BASIC, then why not use your effort to create a TI-83 BASIC Compiler? What is a BASIC Compiler? A program that takes a BASIC program and generates assembly code suitable for compiling with TASM or any assembler the programmer decides to be the target of the generated assembler code. The user benefits by using BASIC to generate programs easily, and the compiler generates fast assembly code for his/her program, and at the same time, the user can see the equivalent assembler code for his/her basic code. The best of both worlds.

Reply to this comment    24 January 1999, 21:40 GMT


Basic Compiler
Jimmy
(Web Page)

The only problem I see with this is that the program would still be everything it would be in basic just faster. How would you tell it in basic to reverse the text in a way that the compiler would understand what you want, or to shut down or to do some direct communication with the lcd driver. The thing is, there are no commands in basic for these so how would the compiler know to compile these in?? So all you get is fast basic commands. Not meant as a flame!!

Jimmy

Reply to this comment    24 January 1999, 22:44 GMT

Re: Basic Compiler
Eric Brookins

That's why you make a language for the compiler that is close to basic, but uses extra commands for the commands you mentioned. It's just a matter of learning a few new words to type in.

Reply to this comment    24 January 1999, 23:02 GMT


Re: Re: Basic Compiler
Jimmy
(Web Page)

What you have is a good idea, but my post was as to what was said before.
<snip>
"A program that takes a BASIC program and generates assembly code suitable for compiling with TASM."</snip>

I was talking about direct transferance of the basic languange not a modified language. You do have a good idea though and I would like to see someone follow up on it.

Reply to this comment    25 January 1999, 10:42 GMT


Re: Re: Re: Basic Compiler
Eric Brookins

You present a good point, that's why you set up direct basic transfer, so that it will take Basci commands and replace it with asm. If the user doesn't use a modified language a littled, then they are limited to having no memory and file control just like normal basic which we are tryin to get away from.

BTW -I might start this project soon. I need to work on my grades first before I dedicate any time to work like that.

Reply to this comment    26 January 1999, 02:44 GMT


Re: Basic Compiler
Olathe  Account Info
(Web Page)

With PC BASIC compilers, such as QuickBASIC (not to be confused with QBASIC, which can't compile), it has functions prewritten in assembly that it adds as subprograms when you compile. For example, Disp in TI-85 would have a prewrritten subprogram that displays the string to the screen.

Reply to this comment    19 August 1999, 09:15 GMT

1  2  3  4  5  6  7  8  9  10  11  

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