Jump to content
IGNORED

Origins of TI BASIC


Casey

Recommended Posts

Ok but the topic of the post is ORIGINS OF TI BASIC and TI BASIC is written in GPL not Forth or Pascal or Assembly.

 

I do not quite know how it got twisted to Forth?

 

See per the topic of this post I mentioned GPL MOVE as that is exactly how TI Basic works.

 

what that has to do with Forth move of GROM to RAM is beyond me to explain per the topic.

Edited by RXB
Link to comment
Share on other sites

Ok but the topic of the post is ORIGINS OF TI BASIC and TI BASIC is written in GPL not Forth or Pascal or Assembly.

 

I do not quite know how it got twisted to Forth?

 

See per the topic of this post I mentioned GPL MOVE as that is exactly how TI Basic works.

 

what that has to do with Forth move of GROM to RAM is beyond me to explain per the topic.

 

If you re-read the thread, you will see that it was your posts (#2 and #15) that started us down this path. :)

 

Back on topic—There is quite a bit of interesting information in this thread about the Microsoft origins of TI Basic—@sometimes99er’s quotes, in particular.

 

...lee

  • Like 1
Link to comment
Share on other sites

I wonder, though, how Microsoft came up with the weird CALL everything syntax. AFAIK, the TI 99 is the only MS BASIC that has CALLs.

 

Maybe it's a logical consequence of GPL subroutines? Or maybe they wanted to allow for extensions (by cartridges) that felt native to the language?

Link to comment
Share on other sites

RXB has put a ton of stuff directly from GPL into XB list of commands some examples are

 

GPL - MOVE = RXB - CALL MOVES("type type",length,from,to) ! type Ram, Vdp, Grom and $tring

 

GPL - ACTONE = RXB - CALL BEEP

 

GPL - BADTON = RXB - CALL HONK

 

GPL - EXIT = CALL BYE

 

GPL - IO = RXB CALL IO(type,address of sound list) or CALL IO(type,#bits,cru-base,variable,variable) or CALL IO(type,length,vdp-address for Cassette)

 

These were all pulled right from GPL.

Link to comment
Share on other sites

I wonder, though, how Microsoft came up with the weird CALL everything syntax. AFAIK, the TI 99 is the only MS BASIC that has CALLs.

 

Maybe it's a logical consequence of GPL subroutines? Or maybe they wanted to allow for extensions (by cartridges) that felt native to the language?

Microsoft didn't. They had nothing to do with it. It's ANSI BASIC and it's the same on TI's mini-computers.

 

  • Like 1
Link to comment
Share on other sites

https://en.wikipedia.org/wiki/Microsoft_BASIC

Texas Instruments BASIC
This is the version of BASIC used on Texas Instruments' TI-99/4A computer line. Notably, it is not written in assembly language, but in a high level interpreter developed by TI. The reason for this was because Microsoft did not have any programmers who knew how to code for the TI-99/4A's 9900 CPU and so Texas Instruments instead gave them an interpreter to code in instead. The unfortunate effect of this was to make TI BASIC extremely slow due to being double-interpreted.

Link to comment
Share on other sites

Microsoft didn't. They had nothing to do with it. It's ANSI BASIC and it's the same on TI's mini-computers.

 

 

From [http://www.atarimagazines.com/creative/v10n9/171_Structured_programming_in.php]:

 

"The Call statement in ANSI Basic serves the same function as the GOSUB statement in Minimal Basic. Both statements transfer control to another part of the program; when that part is finished, control normally returns to the statement after the Call or GOSUB. In addition, the above Call statement identifies the variable s$ as a parameter, through which data may be sent to a program unit or, as in the present case, received from it."

 

So we have the best of both worlds, CALL *and* GOSUB?

  • Like 1
Link to comment
Share on other sites

The reason for this was because Microsoft did not have any programmers who knew how to code for the TI-99/4A's 9900 CPU and so Texas Instruments instead gave them an interpreter to code in instead.

This statement makes no sense... GPL is not exactly a leap in simplicity above the 9900, nor does it resemble any other processor that Microsoft's programmers would have been familiar with. They still would have needed to learn GPL.

 

GPL's benefit seems to be storage space (smaller byte codes) and hardware abstraction (no need to know the details of how to talk to VDP or GROM, or for that matter anything). Since TI was fairly forward thinking, that makes some sense. The whole idea of locking things in GROMs for control also makes sense, from a business decision standpoint. (That is, makes sense that it happened, not that it was a good idea.) ;)

 

I would still love to see something authoritative about the origins of GPL.

  • Like 1
Link to comment
Share on other sites

User defined subroutines, with names, were available in BASIC for the minicomputers. So are they in Extended BASIC. I doubt TI didn't think about Extended BASIC already when they were making the TI BASIC in the machine. Thus it's just as plausible that they wanted to use a similar construct for some internal stuff, like COLOR and SOUND, as they did the for CALL SUB feature.

  • Like 2
Link to comment
Share on other sites

I wonder, though, how Microsoft came up with the weird CALL everything syntax. AFAIK, the TI 99 is the only MS BASIC that has CALLs.

 

I know that the IBM pc-jr's gw-basic all supported named subroutines via CALL. It was still supported in qbasic near the end of the MS-DOS days as well, and even today it is legal to explicitly add the keyword "CALL" when calling a procedure or function in Visual Basic (although not necessary) :).

  • Like 1
Link to comment
Share on other sites

I think CALL in TI-BASIC differentiates between the generic BASIC built into the console, and the GPL routines such as CHAR, COLOR etc that give TI BASIC its personality and makes it feel like a TI.

 

Other cartridges such as PRK added additional CALLs to TI BASIC via the GPL CALL mechanism.

Link to comment
Share on other sites

LOL having written GPL code for TI Basic such as the Editor Assembly support routines pushed into the space from >3700 to >3FFF and >5700 to >5FFF

 

These are CALL PEEK, CALL LOAD, CALL CHARPAT, and others like CALL LINK

No they are not different they are the same as the rest of GPL code, nothing special about the CALLs in TI Basic.

 

The only difference is how the TI Basic CALL and XB CALL have the order of pointers switched....

 

i.e. Basic has Next entry pointer, routine address, then name or routine user uses,

now XB has Next entry pointer, name of routine user uses, then pointer to routine address.

TI Basic Header

Header:
2000 : DATA >AA02
2002 : DATA >0100
2004 : DATA >0000
2006 : DATA >214D Program
2008 : DATA >0000
200A : DATA >4D1A Subprograms
200C : DATA >0000
200E : DATA >0000
TI Extended Basic Header

Extended Basic Header
       DATA >AA0F      * VALID GROM / VERSION
       DATA >0100      * (FUTURE EXPANSION)
       DATA >0000      * POWERUP
       DATA XBCART     * PROGRAM
       DATA >0000      * DSR 
       DATA LINK1      * CALL
       DATA >0000      * INTERUPT
       DATA >0000      * BASIC CALL
TI Basic CALL list headers

Subprogram list:
4D1A : DATA >4D24 Next entry g
4D1C : DATA >3538 Routine address
4D1E : DATA >05 Length of name
4D1F : TEXT ':SOUND:' name
4D24 : DATA >4D2E
4D26 : DATA >351C
4D28 : DATA >05
4D29 : TEXT ':CLEAR:'
4D2E : DATA >4D38
4D30 : DATA >5713
4D32 : DATA >05
4D33 : TEXT ':COLOR:'
TI Extended Basic CALL Headers

LINK1  DATA LINK2
       STRI 'SOUND'           SOUND
       DATA XSOUND
LINK2  DATA LINK3
       STRI 'CLEAR'           CLEAR
       DATA CLEAR
LINK3  DATA LINK4
       STRI 'COLOR'           COLOR
       DATA COLOR
LINK4  DATA LINK5
       STRI 'GCHAR'           GCHAR 
       DATA GCHAR
LINK5  DATA LINK6
       STRI 'HCHAR'           HCHAR
       DATA HCHAR
LINK6  DATA LINK7
       STRI 'VCHAR'           VCHAR 
       DATA VCHAR
LINK7  DATA LINKA
       STRI 'CHAR'            CHAR 
       DATA CHARLY
LINKA  DATA LINKB
       STRI 'KEY'             KEY
       DATA ZKEY
LINKB  DATA LINKC
       STRI 'JOYST'           JOYST
       DATA ZJOYST
LINKC  DATA LINKD
       STRI 'SCREEN'          KEY
       DATA BORDER
LINKD  DATA LINKE
       STRI 'VERSION'         VERSION
       DATA VERS
LINKE  DATA LINKS1
       STRI 'ERR'             ERR
       DATA ERRWXY
Edited by RXB
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...