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"
Dines Justesen
(Web Page)

I think that mixing BASIC and ASM would be an exelent way to make good programs for the TI calcs. It would proably not help much in most games, but other kinds of programs would be easier to make.

There seems to be two ways of mixing asm and BASIC, either you have an ASM program which calls BASIC functions of the reverse.

Sometime ago I was working on making it possible to include BASIC commands in ASM. This would be done by calling a special (buildin) function after specifying the tokenized BASIC code. I think that this would have been a great iomprovement to ASM, but I was not able to make the functions work (and I have not had the time to work on it since then).

One way of improving the cababilities of BASIC is to use the method used for TI82 shell to allow to call functions in the ROM. By making small modifications to the shells are started now, BASIC programs would have acces to some part of the system memory and they would be able to run functions in the ROM.

I thinj both of these suggestions could improve the quality of programs (not games), espsecially the first method suggested could make a big difference.

Dines

Reply to this comment    24 January 1999, 19:01 GMT

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

I totally agree that basic shouldn't be too basic. When I am programming something in BASIC, their are a lot of API type functions that I use to save time and memory. For example, I am about to release a BASIC sprite reader that allows non-ASM writers to use sprites in their programs. I think that if we try to keep Basic programs too simple, then the programs will start sucking really bad.

Reply to this comment    24 January 1999, 19:12 GMT

More octane, please
Philibob

FORGET GAMES. Let's just talk about Basic in general

What I want to see:

-Arrays- God, we need arrays. I hate messing around with strings and matricies for simple data manipulation and storage. Just think of the possibilities!

-White Line Draw- My TI86 manual has a misprint which mentions the ability to draw a white (erase) line. Sadly, there is no such feature. Good idea, let's get it through ASM, thank you.

-Extended characters- The calculator has tons of neat and funky characters that are not available to the average typist without an awkward assembly program's assistance.

-Interchange- How about an easy way to change a variable to a string and vice-versa?

---------------

<Opinion>
Basic is portable, flexible, universal, easy, and does not require any additional software to program. It's just SLOW. Let's work to speed this up a bit and make it easy on everyone.
</Opinion>

(Oh yeah, my TI-86 does solver( 5x* cos(3x)= 0.5, x, 1) in 3.5 seconds. HA!)

-PHiLiB0B

Reply to this comment    24 January 1999, 19:37 GMT

Re: More octane, please
Brandon Sterner

Good ideas. I like the idea or some asm in BASIC. I'm an asm programmer. I've started writing basic libraries or applets as some people like to call them for the 83 before but everyone said it was a bad idea. Would all these functions be in one large program or separate smaller programs. If they were all grouped together maybe a=1 for calling the white line. a=2 for calling the sprite routine plus a list or maybe a matrix for the data of the sprite. Lists would be easier and smaller but that would require people to know binary. I don't know how basic programmers would prefer to input their data before calling one of these applets. Just some things we need to think about. Also many BASIC games aren't graphical. Maybe with the help of asm we can get good and graphical games in basic. Not all games need to be fast like sqrxz some games such as mind puzzles are fine if they are slow but graphics are certainly lacking in BASIC. As an asm programmer sometimes i wish i could write a line of basic rather than several lines of asm even in my games not just advanced math programs. I'd be willing to write some applets.

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


Re: Re: More octane, please
David Clamage

Two things:
1) About the changing a string to a variable...it's actually pretty easy. Just do this:
Str1->Y1
Y1->A
That's it!
2) Second, I think I ahve a better way for input. It would be like Zazmload for the 83:
"FUNCTION
Send(9pgrmASM
No need to waste a variable! Just use ANS!
Just my thoughts.
-David Clamage

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


Egocentric
Philibob

Whoops... sorry about that...

~ I was talking about ME! ~

The capabilities of drawing a white line and converting string to variable are available on the 83 but _not_ my 86 (or the 85, for that matter)

Hope I didn't confuse anyone!

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


String -> Var on 85/86
Sledge
(Web Page)

Converting strings to vars is very easy on the 85/86. If A is the string, just use:
St>Eq(A,A)
A->A

Done.

Reply to this comment    30 January 1999, 09:39 GMT

Re: More octane, please
HP forever

Yes but is that the symbolic exact solution? NO its a numeric approximation. All the things you listed are available to hp user's who use the HP48. I think it's time we conquore these problems on the ti calcs.

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

Re: More octane, please
Eric Brookins

I own a TI-83 and after the line command you can put a 0 to tell it to be a white line. I don't know if it's the same for the TI-86, but give it a try. The code for the 83 is:

Line (X1, Y1, X2, Y2, 0)

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


Octane?? What the--?
Eugene

Not on the 86.

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

Back to leaded gas.
Piloter

*snip*
-Arrays- God, we need arrays. I hate messing around with strings and matricies for simple data manipulation and storage. Just think of the
possibilities!
*snip*

On an -85: {1,2,3,4,5} ... lists function as arrays.

*snip*
-White Line Draw- My TI86 manual has a misprint which mentions the ability to draw a white (erase) line. Sadly, there is no such feature. Good idea, let's get it through ASM, thank you.
*snip*

On an -85: for(a, xmin, xmax, [.5]* /_\x
ptoff(a, ycoord)[ptchg if you like]
end
Clumsy and inefficient, but it /works/.

*snip*
-Extended characters- The calculator has tons of neat and funky characters that are not available to the average typist without an awkward assembly
program's assistance.
*snip*

Erg, there was a null program I found on here somewhere that let you get at the box character thingy. Maybe a subst([assembly string] command could grab some of the funky ones, too, I haven't tried.

*snip*
-Interchange- How about an easy way to change a variable to a string and vice-versa?
*snip*

On an -85: eq>st() or st>eq() does this, essentially.
Sorry for long post, and I know all this is -85 specific, except for the for func, which works on almost anything.
--Piloter

Reply to this comment    29 January 1999, 18:52 GMT


Re: More octane, please
ShadowLord13

Extended Chars: If you want to get extended chars in a string, you can get them from mario levels (they're stored in strings, and they have lots of chars you can't normally get.), on the 86. I've made a string with all the extended chars in it, including the black box (both of them - there's an 86 one and an 85 one), and the store arrow and the quote. You can email me if you want it, and i'll send it to you.

I also have a program that'll translate numbers and strings back and forth, but it takes a while. I used it in a matrix encryption program I wrote (that also takes a while).

I'd also like to say: I wrote a really addictive game I just call WAR. It's sort of an RPG, but is more of a combat game, with unlimited #s of players, computer intelligences (of variable difficulty levels), up to 30 spells, two different types of weapons, summon creature spells, and more. Like I said, the # of players (both human and computer) are limited only by your calc's memory. The game also uses lists to remember whether it's been installed already, and you can have up to 3 save games in addition to your current one (the save games can be given names, too). (2/->/ dimL instWAR: if instWAR(1)=0:warINST: The program uses sub-programs, to decrease code size. I've also optimized it a bit. Still, it takes up 45K, and with all three save games being used, it takes up a total of about 65K, varying depending on how many players there are.

The point is, even though that game uses 65K, and is in BASIC, it's the most addictive game I've ever played, and the ONLY one i keep on my calculator. (A ti-86, and there's only about 3 ppl in my school with one. I'm thinking of getting a ti-89... 3d graphics and 500K of memory!!!)

Anyhow, I agree that BASIC games would be better with ASM code, I even use small inverse and reverse text programs in WAR, for the title screen.

Reply to this comment    21 June 1999, 16:25 GMT

why bother with BASIC?
base_16

ASM isn't actually all that hard of a language, actually. All it takes is looking at source code, what instructions do, etc. fot about 2 weeks (probably faster for most people), and you have a good idea of how to do ASM. ALthough BASIC is easy to learn, it' slow and bulky, which is great for simple math operations, but not for high quality games. If you want to make games/progs that people care about, learn ASM. If you only gonna make crap for yourself that no one will care about, go for BASIC.

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

Re: why bother with BASIC?
Eric Brookins

I agree with you, but you have to remember that somepeople learn programming quickly(I learned ASM in 5 days),and some people take a while, or may not understand the concept at all.

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

Re: Re: why bother with BASIC?
joe

ok you say you learned asm in 5 days, but how, there is virtually no documentation and even the docs there are are hard to understand. You may say look at source, but source is optimizied and all that crap which makes it almost impossible to understand. Find a book or something that we non-"asm"ers can look at and learn asm and then you can talk.

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

Re: Re: Re: why bother with BASIC?
<blank>

Ok. You idiot. As long as you have a list of the opcodes and operands meanings, and a processor architechture description, as well as the memory map for the system, you can learn and use asm easily. Assembly or any programming language is just a naatural extension of logic. Obviously your logic skills need work if you cant figure it out. All the things i have listed above can easily be found in millions of places on the net. A "tutorial" is not needed. If you need one, you need help.

P.S. the reason i chose to not post my name is becasue i know many ppl will not like my sentiments, and i want ppl to read the message, and not just outlash at me.

Reply to this comment    25 January 1999, 01:18 GMT

Re: Re: Re: Re: why bother with BASIC?
Eric Brookins

I think that the comments you made are unecessary. Just because some people don't pick up on a programming language doesn't make them an idiot. And what is logic to you might not be logic to someone else, so if I were you I would learn to hold my tongue a little bit.

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

Re: Re: Re: Re: why bother with BASIC?
joe

ok smartass where do i get all those things?
besides, from what i have looked at, i understand asm fine, its not a lack of logic, but a lack of having no life!!

Reply to this comment    25 January 1999, 23:29 GMT


That's kinda funny
SuperCheeseMan Account Info

Hey, lemme guess: You're one of those people who believes the following:

1. "If I can do it and you can't, then you're dumb"
2. "If you can do it and I can't, then its dumb"

Try having a more open approach to others' problems; you're usually a lot more useful that way.

Reply to this comment    8 November 1999, 06:49 GMT

Re: Re: Re: why bother with BASIC?
Eric Brookins

Pretty much, before I learned ASM, I knew basic pretty well. Therefore when I started ASM all I needed as a semi-decent tutorial, and a little practice, because if you think about it logically, ASM is much like basic in some ways. By the way if you want to learn ASM for the 83 download the asmguru.hlp file from TI-FILES.

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

Re: Re: Re: why bother with BASIC?
Malenko

There's plenty of places to learn asm. I learned X86 asm out of this old book from 1988, and it has helped me with all my asm needs. Go down to your local book store and find a book on assembly, or even a good web page/ document, sit down for a week with it, then take a stab at it again. It's not that hard, but without a good understanding of computer architechure (sp?)or any real programming experience (Sorry, BASIC wont fit the bill here), asm can seem to be impossible. It just takes work and time.

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


Re: Re: Re: why bother with BASIC?
Olathe  Account Info
(Web Page)

Source is what the programmer makes. It is not optimized unless the programmer does it. The object code and the final executable may be optimized, though. Even optimized, it is still understandable, though.

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


Re: Re: why bother with BASIC?
EEABOF
(Web Page)

All right I have no idea how you learned it that fast.... It took me about 2 weeks to get most of the basic controls down, but I still am very stuck on how to map keyboard events, and how to do sprites...... Maybe its cause Im trying to learn 68k (are u all talking about z80?) If anyone can help me with the above problems please do, and if you are please explain it instead of just given me the code for it. THANKS....

Reply to this comment    30 January 1999, 17:28 GMT


Re: why bother with BASIC?
Michael McElroy Account Info
(Web Page)

You're a loser, and I live with you. Haw, haw.

Reply to this comment    17 March 2004, 01:22 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