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: Article: "BASIC Doesn''t Have to be That Basic"
phil

what is the best way to learn asm, and dont say read source because someone with no programing background cant tell what the hell it means.

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

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

read the source

Reply to this comment    25 January 1999, 02:34 GMT


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

I have a decent knowledge of c++ and basic, but looking a assembly source doesn't seem to help. All the programs I have tried to write either crash the calc or don't get that far.

Reply to this comment    25 January 1999, 03:34 GMT

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

check out our tutorials! (the link above)

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


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

Oh. I guess I should pay more attention to your site.

I think most tutorials are hard to follow, though. They don't explain things in enough detail. They just say, "I'll explain all that later!" In the case of Terry Peng's ASM tutorial, he kept saying that, then left us in the dark with a list of works to consult.

Learning ASM can be tough. You gotta be determined to learn.

Reply to this comment    26 January 1999, 05:26 GMT

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

If you have no programming experience I suggest you star with an easier language than ASM such as C++ or BASIC.

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


Re: Re: Article: "BASIC Doesn''t Have to be That Basic"
Olathe  Account Info
(Web Page)

The best way is to buy a book or check one out from your library. Get one for a PC and learn that. Then, you will have the basics down and can learn TI assembly with relative ease, plus be able to program fast PC programs.

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

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

I agree. BASIC is slow, but it gives you unlimited number of programing possibilities.
For example:
I was really pis... because there was no choice of storing data in some kind of RECORDs or even in a arrays of string. Then, suddenly it clicked!
Try to make a matrix for storing numbers and lets make one or more giant strnig which will be under control by few numbers in the matrix. OK, it takes up a lot of memory, but it works and is suprisingly fast. There are ways to increase the speed of calculatons(not calculator,even that is possible), but that's not the issue here. The only limiting factor is mem size, everything else can be done. Of course, you just have to figure it out!!

Reply to this comment    25 January 1999, 00:27 GMT


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

"Unlimited number of programing possibilities. "

Oy! With that kind of attitude, go learn C++ and see what unlimited possibilities really are!

Reply to this comment    26 January 1999, 23:18 GMT

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

8->X
8->Y

"DD6FAF46" ->String1

Send(9ZSPRITE

Sounds good to me!

BTW, are there any sprite routines that work like that for the TI83?

Reply to this comment    25 January 1999, 00:48 GMT


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

I created a sprite program pretty much just like that, and I will be putting on my page soon. But to get back to the subject of this page, I made it in BASIC because it was most conveniant, but I will port it to ASM.

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

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

Why fight over Basic can be as good as Assembly or Assembly is better than basic? C++ is better than both calc basic and assembly. Then, should we stop programming calculator and start programming C++? Basic or assembly, they are both better than each other in some way.

Reply to this comment    25 January 1999, 02:22 GMT


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

Actually, I think somebody's working on a C++ compiler/linker for the TI...don't ask me which one, although I would like to see one for the 83 :) Besides, C++ includes inline ASM as a feature. If that could also be implemented, think of the possiblities...


--David
"Why can I NEVER spell words correctly when I'm making an online post?"

Reply to this comment    25 January 1999, 03:31 GMT


Re: Re: Re: Article: "BASIC Doesn''t Have to be That Basic"
Daniel Bishop  Account Info

I hate basic (it's too limited) and I have not yet been able to write a functional asm program. I would love to have C++ for the 83 so I could writ good program.

Reply to this comment    24 April 2000, 06:27 GMT

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

OK. I read _all_ of this and to summarize it, I just saw basic users talking about how they wanted a extended basic and asm users telling them they should learn asm. Well jeez. It's not that easy. I for one have tried to learn asm for over two months now, but have had too much stuff in my life going on to be able to concentrate on learning. Now. To get to the point. People like me who have given a try at asm and failed are stuck with basic. I guess all i'm saying is to all those great asm programmers out there: Just humor us. I don't see why you should tell us to learn asm and that we're lazy to not have. So prove your good at the language. Make an asm programing language that would have basic-like commands, and on-calc programing (because I mean jeez. I know my best ideas come in my math class :) ), but the speed and power of asm. Ok. I'm done.

Reply to this comment    25 January 1999, 03:39 GMT

ASM vs. BASIC
Nathan Ladd

Hey, listen to the crap flowing from the fingers of some of these die-hard BASIC fans. Allright, he has an o.k idea, but imagine the overhead for a sprite routine implementable in BASIC. On my 86, it takes several seconds to just to an 16x8 nested loop. The overhead and sprite ASM functions would take at least a tenth of a sec each, so you get a long time to update the screen. Don't be idiots out there... THINK!!! BASIC has its uses but to fill the areas that it lacks in is mere patchwork, and a poor job at that. The only way to integrate BASIC and ASM is to create a shell that includes built-in functions, including one to set the regs very fast from the prompt. Perhaps there would be a list that goes from 1 on up that is a,b,c,d ect. That might work... It would be cool, but the point is that the highest potential for coolness is in ASM. Period. (I mean Gamies)

Reply to this comment    25 January 1999, 04:07 GMT

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

ok. here's what I think:

there are a few reasons why this is a bad idea. First, these functions were made for math, and since no one knows enough about math calls in asm there isn't really any reason to expect anything of this sort to come from anywhere save TI.
The truth of matter is that these functions can't really be used with graphics .. there's no way to store graphical data structures .. if you used a string to store sprites you would see an ascii character for a sprite row--very cryptic--and to even get it there or edit it you would need asm. And to display the sprite would be the easy part!! how would you employ scrolling or animation? And even still, no matter how optimised it might be it will still be very slow since the OS must load the entire asap program into asm space every time the asap is parsed (that would be some sprite routine function, eh?!!)

another thing is that the asaps are very limited .. only three can exist on the calc at a time (however 256 functions per asap) so you would only be able to use a few of these such libraries in a basic program, each of which would have to be installed via an asm program by everyone who would like to run this program .. only to find that displaying a sprite is about 50 times slower than displaying a text char.
So, you can see there isn't much practicality except for in math asaps. Face it: if you want to write a good game for the calc you need to learn assembly.

Reply to this comment    25 January 1999, 04:52 GMT


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

This is true about the higher number calcs but for the 83 it should be easy to do and actually a lot faster than trying to get basic to plot out the sprite. Here is how a sprite can be placed by a basic user. (I feel like I am repeating myself)
1. Have the user store the sprite in a list.
The format is easy. Instead of the 1 or 0 put the deciaml value for the whole line. Very "Basic" asm programming knowledge here. If they don't want to learn asm at least they can learn to convert binary to decimal.

2. Store the name of the list in Ans ex: "JLIST
3. Store pixel coordinates in X and Y
4. Send (9prgmSPRITE

All we the asm programmers have to do is rcl X and Y, get the list name out of Ans and plot the pixels. Not really that hard and if it makes some else's life easier than why not.

Reply to this comment    25 January 1999, 06:28 GMT


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

The question isn't how hard it would be to do in assembly, but how useful it would be on account of it's slowness.
I don't think you're talking about asaps here, but using an asm program call to perform an assembly. An asap is a program that adds special tokens to the already existing set you see in the catalog. For example, sprite(x, y, list, list offset) would draw the sprite to the graph screen. Either way, though, whether asm prog or asap it would be almost just as slow (a little faster for the asap granted): load the asm / asap program, load floating point info for cordinates and sprite offset and find the correct sprite from the external list (so at least two VAT searches), and only then draw the sprite. That's not a fast operation .. much slower than displaying a text character (which in a sense is a grid sprite routine) and not even including any error handling that would have to be done. Maybe one thing that might be useful however, is using an asap to play a sound: sound( frequency, duration). But not for programming games, so forget about it.

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


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

True, it may be slower than ouputting a text chartacter, but that isn't what this reply was about. It was about a way for basic users to implement sprites, slow as it may be. Displaying the text characters in asm is still slow. What sprites in basic programs can do is give the same "slowness" but at better quality. You get a wall that looks like a wall instead of a X at the same speed almost. Sounds reasonable to me.

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


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

And here's what I'm saying:

it isn't going to be "almost the same speed", not even close. On the ti-86 (don't know about the 83) a whole ROM page is dedicated to the text char sprites (most of the page is empty) .. all the routine needs to do flip that ROM page, and run the putsprite (ie putchar) that's on page 0. That's a hell of alot faster than searching through the VAT for an asm program, loading that programing into asm space, searching again through the VAT for an external list and using abs addressing to find the correct sprite data before even running the putsprite .. and unless you copied that sprite into a buffer, you'd have to use abs addressing within the putsprite as well. I'll wager, in fact, that it's about 10-20 times slower than using a text char.
Have you ever installed user fonts on your calc? .. there's a noticable speed difference. And a BASIC putsprite would be much slower than that even!

Reply to this comment    26 January 1999, 06:08 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