Jump to content
LinkoVitch

Atari BASIC (rev C) Locate broken?

Recommended Posts

I have had a google about and searched this forum about this but not found anything. At this point I am going back in my memory to when I was probably 12/13 which is a LONG time ago :)

 

I recall a type in listing that used the "Locate" command first highlighted a problem to me. It seems that in the 800XL I had at the time (which I believe had Rev C BASIC) the locate command simply through out an error. Any type in listing that featured it failed at the locate command with an error. I tried writing my own small simple program to test it, and it too spat out an error.

 

Possibly because I just bought another 800XL off ebay with BASIC disabled this popped to mind, who knows, there's a lot of random in my head :)

 

Anyway, I wondered if there is an issue with this instruction in Atari BASIC?

 

I really need to dig out my other A8s and try it out to see if I can get the error (be more useful than my crappy description of a 30 year old memory :D )

 

anyone else seen this or know what it is/was ?

Share this post


Link to post
Share on other sites

I can't recall hearing of a problem with LOCATE in any Basic revision. And I was of the impression that Rev C is as near as clean as you'd expect.

 

That command is essentially the same as doing POSITION X,Y : GET #6,C instead of LOCATE X,Y,C

The OS does the majority of the work in both of those cases, Basic is essentially just setting up parameters then putting the result into the num-var you specify - C.

 

Although Rev B was definitely a case of "Hey, it's not broken so let's fix it" insofar as introducing worse bugs than it attempted to squash, I don't think Rev C introduced any problems that weren't already there.

Edited by Rybags
  • Like 1

Share this post


Link to post
Share on other sites

all available OS in 800XL also correctly reflect the parameters:

 

 

LOCATE posX,posY,Var
=
GETPLT equ $F18F
lda posX
sta colcrs
lda posY
sta rowcrs
jsr GETPLT
sta Var
  • Like 1

Share this post


Link to post
Share on other sites

Cheers, I wonder what was going wrong back when I tried it. IIRC the listing was in a book of type in games, I *might* still have somewhere.

 

Wish I still had that particular 800XL, (former idiot brother in law sold it at a car boot many years ago :( )

 

In my own tests I guess perhaps I had misunderstood the command and was entering something like (but so long ago now, no way I can be sure):

 

C = LOCATE X,Y

 

or something, If I manage to reliably trigger or find the error as I remember it I'll certainly post back :)

 

Thanks

Share this post


Link to post
Share on other sites

There's probably more threads but a Google search as usual brings up this place.

 

http://atariage.com/forums/topic/242807-atari-basic-bug-list/

 

In the initial post, a reference to LOCATE and it would be a somewhat rare occurrence:

 

 

LOCATE apparently did not restore the input buffer pointer correctly and could have caused errors if followed by a VAL() that required the pointer to be seated correctly.

 

 

Unsure which version/s this is in reference to.

Share this post


Link to post
Share on other sites

LOCATE used to work fine, there is no known bug. There is only a known deficiency, namely that it does not take arrays as last argument: LOCATE X,Y,C(I) does not work. Basic++ fixes this.

Share this post


Link to post
Share on other sites

Feeding arrays doesn't work in many cases, other examples are you can't do INPUT A(1), READ A(1), GET #1,A(1)

Share this post


Link to post
Share on other sites

I have had a google about and searched this forum about this but not found anything. At this point I am going back in my memory to when I was probably 12/13 which is a LONG time ago icon_smile.gif

 

I recall a type in listing that used the "Locate" command first highlighted a problem to me. It seems that in the 800XL I had at the time (which I believe had Rev C BASIC) the locate command simply through out an error. Any type in listing that featured it failed at the locate command with an error. I tried writing my own small simple program to test it, and it too spat out an error.

 

Possibly because I just bought another 800XL off ebay with BASIC disabled this popped to mind, who knows, there's a lot of random in my head icon_smile.gif

 

Anyway, I wondered if there is an issue with this instruction in Atari BASIC?

 

I really need to dig out my other A8s and try it out to see if I can get the error (be more useful than my crappy description of a 30 year old memory icon_mrgreen.gif )

 

anyone else seen this or know what it is/was ?

 

This is ringing bells in my brain, though I can't quite put my finger on why. But I know I've run across this before as well.

 

What were the circumstances in which it was behaving strangely, and what was the strange behaviour? Any chance of tracking down that listing you mentioned?

Share this post


Link to post
Share on other sites

LOCATE works on the screen (S:) device, not the editor (E:). When a program starts, only E: is opened, so GR.0 is required to open S: for LOCATE to work.

 

 

all available OS in 800XL also correctly reflect the parameters:

 

 

LOCATE posX,posY,Var
=
GETPLT equ $F18F
lda posX
sta colcrs
lda posY
sta rowcrs
jsr GETPLT
sta Var

 

 

This is also good for gratuitously rebooting the machine on OS-B and crashing on enhanced OSes. Use CIOV, please.

  • Like 3

Share this post


Link to post
Share on other sites

Feeding arrays doesn't work in many cases, other examples are you can't do INPUT A(1), READ A(1), GET #1,A(1)

 

Indeed. All these cases have been addressed. Not being able to use an array for READ is rather painfull...

Share this post


Link to post
Share on other sites

That link no workie - probably need to be logged into Abbuc for the source to be read.

Share this post


Link to post
Share on other sites

 

That's the one I was thinking of. Thank you!

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...