Jump to content
Sign in to follow this  
hloberg

Use of NOT in BASICs

Recommended Posts

this is interesting. In Atari BASIC & Apple II integer BASIC   NOT 0=1   &  NOT 1=0     which I think is a logical NOT?

while in TI Ex/BASIC & MS BASICs (CoCo, MSX etc...)   NOT 0=-1 & NOT 1=-2  which is a binary NOT.

I never knew different BASICs used NOT differently till I tried to translate an Atari BASIC game to TI BASIC, which is a bit of a translation. the way Atari BASIC uses strings, the use of POP to jump from loops and a host of other oddities of Atari BASIC makes for a slow translation. 

  • Like 1

Share this post


Link to post
Share on other sites

Traditionally, NOT should produce a bit inversion in the number you are negating. So the TI implementation is the correct one, which is the arithmetic NOT.

The logical NOT is what I believe the Atari and Apple are using, which has a spectrum of True or False (0 or 1). What do you get if you do a NOT(2) for example on theses machines?

Share this post


Link to post
Share on other sites
54 minutes ago, Vorticon said:

Traditionally, NOT should produce a bit inversion in the number you are negating. So the TI implementation is the correct one, which is the arithmetic NOT.

The logical NOT is what I believe the Atari and Apple are using, which has a spectrum of True or False (0 or 1). What do you get if you do a NOT(2) for example on theses machines?

NOT anything but 0 gives you 0. ie NOT 100=0. only NOT 0=1. that would be consistent with logical NOT. I'm used to the bit inversion NOT in programming, which is the way I think most languages handle it. I don't know what made me check this but i'm glad I did. the Atari BASIC program uses this throughout the program i'm translating to TI-99 XB. All the values supposed to be 0 or 1 would be -1 and -2 which would drove me crazy to figure out what was wrong.  

Share this post


Link to post
Share on other sites
21 hours ago, hloberg said:

NOT anything but 0 gives you 0. ie NOT 100=0. only NOT 0=1. that would be consistent with logical NOT. I'm used to the bit inversion NOT in programming, which is the way I think most languages handle it. I don't know what made me check this but i'm glad I did. the Atari BASIC program uses this throughout the program i'm translating to TI-99 XB. All the values supposed to be 0 or 1 would be -1 and -2 which would drove me crazy to figure out what was wrong.  

You have to remember Texas Instruments has produced Calculators for many many years, unlike Atari or anyone else has done making computers.

  • Like 1

Share this post


Link to post
Share on other sites

according to Wikipedia: TI BASIC is an ANSI-compliant BASIC programming language interpreter built into the 1981 Texas Instruments TI-99/4A home computer and its predecessor, the TI-99/4 (1979). It was developed at Microsoft by Bob Wallace[1] and Bob Greenberg.

Well that explains why TI BASIC & XB are so similar to MS BASIC on the other machines. Atari BASIC & Apple Integer BASIC where the few BASICs not based on some version of MS BASIC. looks like all the MS BASIc versions treated NOT the same.

to get around the (NOT PLAYER) throughout the program I created a CALL to IF PLAYER=1 then NOPLAYER=0 ELSE NOPLAYER=1

Share this post


Link to post
Share on other sites
8 minutes ago, hloberg said:

according to Wikipedia: TI BASIC is an ANSI-compliant BASIC programming language interpreter built into the 1981 Texas Instruments TI-99/4A home computer and its predecessor, the TI-99/4 (1979). It was developed at Microsoft by Bob Wallace[1] and Bob Greenberg.

Well that explains why TI BASIC & XB are so similar to MS BASIC on the other machines. Atari BASIC & Apple Integer BASIC where the few BASICs not based on some version of MS BASIC. looks like all the MS BASIc versions treated NOT the same.

to get around the (NOT PLAYER) throughout the program I created a CALL to IF PLAYER=1 then NOPLAYER=0 ELSE NOPLAYER=1

If it only bounces around between 1 and 0, then PLAYER = 1 - PLAYER will work.

  • Thanks 1

Share this post


Link to post
Share on other sites
5 hours ago, RXB said:

You have to remember Texas Instruments has produced Calculators for many many years, unlike Atari or anyone else has done making computers.

I wonder what a TI programmable calculator gives as a value?

Share this post


Link to post
Share on other sites

Those TI calculators I have don't have "NOT".

In UCSD Pascal, the boolean value is internally represented as 0 and 1. You can create a packed array of boolean, where you can fit 16 booleans into one word. So no sign there.

However, to allow bitwise and, or and not in Pascal, UCSD Pascal has the special trick of using the ord operator. It's normally used to see what the numerical value of something is. Like in the enumerated type green, red, blue and yellow, ord(red) is 1, ord(yellow) is 3.

You can do an ord(one_integer_value) and ord(another_integer_value) and get the bitwise and of the two.

Share this post


Link to post
Share on other sites
3 hours ago, apersson850 said:

You can do an ord(one_integer_value) and ord(another_integer_value) and get the bitwise and of the two.

I'm not too clear on this. Ord(integer) = integer, right? 

Share this post


Link to post
Share on other sites
On 8/17/2019 at 10:18 PM, hloberg said:

according to Wikipedia: TI BASIC is an ANSI-compliant BASIC programming language interpreter built into the 1981 Texas Instruments TI-99/4A home computer and its predecessor, the TI-99/4 (1979). It was developed at Microsoft by Bob Wallace[1] and Bob Greenberg.

Well that explains why TI BASIC & XB are so similar to MS BASIC on the other machines.

Sorry, that is wrong. Thanks for the interviews that Dan Eicher did with TI employees we know for certain that the TI Basic for the TI-99/4 was developed in house by TI. There were several projects started to build computers in TI. The TI-99/4 was in the end the only that got continued for production. Since TI was low on ressources Microsoft got contracted to develop the Basic for the SR-70, a computer which was not produced in the end. That is the base for the false claim and false fact in several places.

TI Basic is based on Dartmouth Basic and complies to the American National Standard for minimal Basic (ANSI X3.60-1978).

 

This is an extract from one Interview I am doing with the Engineer H. Schuurman who is responsible for our File system and was in the 99/4 team in Lubbock:

 

Q: Do you know how much Microsoft or Bill Gates was involved in the TI Basic / System Rom of the 99/4?

Microsoft was not involved with the 99/4 development.  They (in the form of Bob Greenberg) were contracted to develop BASIC for the SR-70 (which is also sometimes referred to as the 99/7), but the BASIC for the 99/4 was developed in-house.

Share this post


Link to post
Share on other sites
1 hour ago, kl99 said:

Sorry, that is wrong. Thanks for the interviews that Dan Eicher did with TI employees we know for certain that the TI Basic for the TI-99/4 was developed in house by TI. There were several projects started to build computers in TI. The TI-99/4 was in the end the only that got continued for production. Since TI was low on ressources Microsoft got contracted to develop the Basic for the SR-70, a computer which was not produced in the end. That is the base for the false claim and false fact in several places.

TI Basic is based on Dartmouth Basic and complies to the American National Standard for minimal Basic (ANSI X3.60-1978).

 

This is an extract from one Interview I am doing with the Engineer H. Schuurman who is responsible for our File system and was in the 99/4 team in Lubbock:

 

Q: Do you know how much Microsoft or Bill Gates was involved in the TI Basic / System Rom of the 99/4?

Microsoft was not involved with the 99/4 development.  They (in the form of Bob Greenberg) were contracted to develop BASIC for the SR-70 (which is also sometimes referred to as the 99/7), but the BASIC for the 99/4 was developed in-house.

then the Wikipedia page needs fixing. thanks for the info. 

  • Thanks 1

Share this post


Link to post
Share on other sites

just fixed the wiki pages that referenced MS having created TI-BASIC.

  • Thanks 1

Share this post


Link to post
Share on other sites

David A. Lien writes in the BASIC Handbook that NOT may be used either as a logical operator (examples 1 and 2) or a binary operator (example 3). However the keyword was not part of the ANSI standard of the time the book was written (1981) so that might explain why different dialects implement it in different ways and some might not have it at all.

  • Thanks 2

Share this post


Link to post
Share on other sites
8 hours ago, hloberg said:

just fixed the wiki pages that referenced MS having created TI-BASIC.

that is awesome. thanks a lot.

Can you remove the part about Bob Wallace talking about:

"Wallace said, "I put in a lot of extra time trying to get the TI BASIC to do funny little things.... In BASIC, you could bring up a line and edit the line. So ... suppose you wanted the same line somewhere else. Why can't you just edit the line numbers? And it didn't work that way, so I worked a lot to get it to work that way."[1]"

together with the external reference to the book on Bill Gates?

The article revision history reveals that Bob Wallace and Bob Greenberg did work together on the Basic (for the SR-70), but again, not related to the TI-99/4 TI Basic.

 

Edited by kl99

Share this post


Link to post
Share on other sites
1 hour ago, kl99 said:

that is awesome. thanks a lot.

Can you remove the part about Bob Wallace talking about:

"Wallace said, "I put in a lot of extra time trying to get the TI BASIC to do funny little things.... In BASIC, you could bring up a line and edit the line. So ... suppose you wanted the same line somewhere else. Why can't you just edit the line numbers? And it didn't work that way, so I worked a lot to get it to work that way."[1]"

together with the external reference to the book on Bill Gates?

The article revision history reveals that Bob Wallace and Bob Greenberg did work together on the Basic (for the SR-70), but again, not related to the TI-99/4 TI Basic.

 

link me to that. I fixed the reference in several other articles on Wiki (almost every article on TI-99 refers to MS writing TI BASIC), I must've missed that one.

  • Like 1

Share this post


Link to post
Share on other sites

I'm kind of curious how one person saying one thing blows away what one other person else said? What makes the new source more reliable than the old?

 

The community has been openly hostile to the idea that Microsoft touched the 99/4 since the earliest days, and this feels more like confirmation bias than objective fact. :)

 

Gates (the book) even makes reference to the fact that it's ANSI compliant versus the usual Microsoft compliant at TI's insistence.

 

It's definitely plausible that it was all talking about this other machine, but how is a 40 year old memory proof, particularly when memories conflict?

 

  • Like 1

Share this post


Link to post
Share on other sites

Don't count me in :) ... even though I may have some, say, sceptical attitude against Microsoft today, the Microsoft of the 80s is something different in my view. But I can only speak for myself, of course.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Tursi said:

I'm kind of curious how one person saying one thing blows away what one other person else said? What makes the new source more reliable than the old?

 

The community has been openly hostile to the idea that Microsoft touched the 99/4 since the earliest days, and this feels more like confirmation bias than objective fact. :)

 

Gates (the book) even makes reference to the fact that it's ANSI compliant versus the usual Microsoft compliant at TI's insistence.

 

It's definitely plausible that it was all talking about this other machine, but how is a 40 year old memory proof, particularly when memories conflict?

 

Bill Gates book is the 1st I heard of MS creating TI BASIC. on the other hand I have heard for many years that TI created in house an ANSI compliant BASIC for the TI-99 and Klaus comment from one of the TI engineers on how MS was to create the BASIC for 99/7 not the 99/4.

But, maybe I'm wrong. So I'm going to start a new thread and see who might know for sure.

Share this post


Link to post
Share on other sites

Gates (which is not a book by Bill Gates but a book about him) was the first published writing I ever saw that claimed it, but the rumors went back years and years before that. The proposed theory was that it was for a different machine is plausible, though it's the first I'd heard that TI was planning several home computers before the 99/4 was released. How many failed machines did they pay for?? ;)

 

I don't think we can ever say /for sure/ without some internal document leaks, and the reason I spoke up was the above effort to comprehensively change all published documentation to the new story. I don't have better information, but it seemed rather abrupt.

 

Honestly, if we had a chance to ask questions to one of the original software engineers, why didn't we ask why the heck the system runs GPL instead of native code? ;)

 

Thanks for the discussion on it though, it's interesting to have new datapoints to muse over.

 

Share this post


Link to post
Share on other sites
3 hours ago, Tursi said:

Honestly, if we had a chance to ask questions to one of the original software engineers, why didn't we ask why the heck the system runs GPL instead of native code? ;)

Hi Tursi,

i will post the whole interview questions I did so far with TI employees in a dedicated thread.

  • Like 1

Share this post


Link to post
Share on other sites

Personally I never ever believed MS created TI Basic, as I have used many different Basics Languages.

TI Basic and XB has hardly anything in common with MS Basic or other Basics.

 

My main reason for not believing MS was involved was CALL HCHAR and CALL VCHAR, also CALL COINC, CALL DISTANCE

these would have been Assembly pokes and peeks with MS Basic as that is how other CPU did it.

 

Yes some Basics have PRINT or INPUT but it is BASIC after all the same language.

This is like comparing TI small c vs Apple C or Microsoft C...

  • Like 2

Share this post


Link to post
Share on other sites
10 hours ago, kl99 said:

Hi Tursi,

i will post the whole interview questions I did so far with TI employees in a dedicated thread.

Thanks, they were very interesting! The memories they have do seem fairly consistent and convincing ;)

 

  • Like 1

Share this post


Link to post
Share on other sites

Also all Microsoft BASIC dialects I'm immediately familiar with use LEFT$, MID$, RIGHT$ while the TI-99/4 BASIC uses SEG$. Also the DEF syntax is different, the RND function call doesn't take an argument, you use OLD instead of LOAD and more examples. Simply if Microsoft developed BASIC for Texas Instruments, they made sure to not make it syntax compatible with their own line of BASIC dialects.

  • Like 1

Share this post


Link to post
Share on other sites

The documented story is that TI refused Microsoft BASIC syntax, and told them to use ANSI BASIC syntax. The differences aren't that hard to understand - TI was much bigger than Microsoft and had the ability to tell them what to do. ;)

  • Like 1
  • Thanks 1
  • Haha 1

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...