Jump to content

Photo

Origins of TI BASIC


42 replies to this topic

#26 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 369 posts
  • Location:The Great White North

Posted Wed Aug 30, 2017 1:55 PM

What Lee said ;-)


Edited by TheBF, Wed Aug 30, 2017 1:57 PM.


#27 RXB OFFLINE  

RXB

    River Patroller

  • 2,798 posts
  • Location:Vancouver, Washington, USA

Posted Wed Aug 30, 2017 8:33 PM

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, Wed Aug 30, 2017 8:38 PM.


#28 Lee Stewart ONLINE  

Lee Stewart

    River Patroller

  • 3,386 posts
  • Location:Silver Run, Maryland

Posted Wed Aug 30, 2017 9:35 PM

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



#29 ralphb OFFLINE  

ralphb

    Dragonstomper

  • 517 posts
  • Location:Germany

Posted Thu Aug 31, 2017 3:32 AM

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?



#30 RXB OFFLINE  

RXB

    River Patroller

  • 2,798 posts
  • Location:Vancouver, Washington, USA

Posted Thu Aug 31, 2017 5:07 AM

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.



#31 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,583 posts
  • Location:Germany

Posted Thu Aug 31, 2017 6:02 AM

The symbolic calls have some similarities to the symbolic device addressing. I mean, who wants to POKE? Rly? ;-)

 

It seems to me like a concept (i.e. more than just a bad idea).



#32 ralphb OFFLINE  

ralphb

    Dragonstomper

  • 517 posts
  • Location:Germany

Posted Thu Aug 31, 2017 7:20 AM

The symbolic calls have some similarities to the symbolic device addressing. I mean, who wants to POKE? Rly? ;-)

 

Back in the day, I wished I had POKEs for the TI 99.  I mean, with POKEs, you could do ANYTHING!   ;)


  • RXB likes this

#33 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,583 posts
  • Location:Germany

Posted Thu Aug 31, 2017 7:59 AM

Yes, POKE 44,<whatever> and see how the BASIC interpreter trips and falls flat on the face. :grin:



#34 JamesD ONLINE  

JamesD

    Quadrunner

  • 7,736 posts
  • Location:Flyover State

Posted Thu Aug 31, 2017 8:54 AM

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.
 



#35 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,959 posts
  • Location:Denmark

Posted Thu Aug 31, 2017 10:25 AM

https://en.wikipedia...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.



#36 Stuart OFFLINE  

Stuart

    Dragonstomper

  • 707 posts
  • Location:Southampton, UK

Posted Thu Aug 31, 2017 11:57 AM

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.atarimaga...gramming_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?


  • RXB likes this

#37 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,823 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Aug 31, 2017 12:12 PM

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.

#38 JamesD ONLINE  

JamesD

    Quadrunner

  • 7,736 posts
  • Location:Flyover State

Posted Thu Aug 31, 2017 1:17 PM

Wikis are edited by people like us and there is no source listed for that entry



#39 apersson850 OFFLINE  

apersson850

    Moonsweeper

  • 436 posts

Posted Thu Aug 31, 2017 3:25 PM

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.



#40 TheMole OFFLINE  

TheMole

    Dragonstomper

  • 760 posts
  • Location:Belgium

Posted Sat Sep 2, 2017 9:21 AM



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) :).



#41 RXB OFFLINE  

RXB

    River Patroller

  • 2,798 posts
  • Location:Vancouver, Washington, USA

Posted Sat Sep 2, 2017 5:34 PM

Well CALL ROUTINENAME is built into GPL for a reason. Extending that to XB does not seem like much of a stretch.



#42 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,021 posts
  • Location:Uzbekistan (no, really!)

Posted Sun Sep 3, 2017 8:15 AM

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.

#43 RXB OFFLINE  

RXB

    River Patroller

  • 2,798 posts
  • Location:Vancouver, Washington, USA

Posted Sun Sep 3, 2017 11:17 AM

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, Sun Sep 3, 2017 11:22 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users