Jump to content

Photo

Atari BASIC (rev C) Locate broken?


14 replies to this topic

#1 LinkoVitch OFFLINE  

LinkoVitch

    River Patroller

  • 2,447 posts
  • Location:Manchester UK

Posted Fri May 18, 2018 4:44 AM

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 ?



#2 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,561 posts
  • Location:Australia

Posted Fri May 18, 2018 5:08 AM

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, Fri May 18, 2018 5:09 AM.


#3 xxl OFFLINE  

xxl

    Stargunner

  • 1,053 posts
  • Location:Rabka-Zdrój /Poland

Posted Fri May 18, 2018 5:21 AM

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


#4 LinkoVitch OFFLINE  

LinkoVitch

    River Patroller

  • Topic Starter
  • 2,447 posts
  • Location:Manchester UK

Posted Fri May 18, 2018 6:06 AM

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



#5 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,561 posts
  • Location:Australia

Posted Fri May 18, 2018 6:20 AM

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

 

http://atariage.com/...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.



#6 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 760 posts

Posted Fri May 18, 2018 2:05 PM

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.



#7 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,561 posts
  • Location:Australia

Posted Fri May 18, 2018 6:30 PM

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)



#8 x=usr(1536) OFFLINE  

x=usr(1536)

    Dragonstomper

  • 555 posts
  • Location:913 S. Broadway, Los Angeles, CA 90015

Posted Fri May 18, 2018 9:36 PM

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?



#9 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,451 posts
  • Location:USA

Posted Fri May 18, 2018 10:10 PM

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.



#10 thorfdbg OFFLINE  

thorfdbg

    Dragonstomper

  • 760 posts

Posted Yesterday, 5:03 AM

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



#11 Irgendwer OFFLINE  

Irgendwer

    Stargunner

  • 1,337 posts
  • Location:Germany

Posted Yesterday, 6:48 AM

There are "issues" working with LOCATE in Gr.0:

 

https://translate.go...t-text=&act=url

 

Maybe this is what you remember...


Edited by Irgendwer, Yesterday, 6:50 AM.


#12 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,561 posts
  • Location:Australia

Posted Yesterday, 6:51 AM

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



#13 Irgendwer OFFLINE  

Irgendwer

    Stargunner

  • 1,337 posts
  • Location:Germany

Posted Yesterday, 7:20 AM

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

 

Was definitely not logged in - strange - so here the original link in German:

 

http://www.abbuc.de/...php?f=10&t=8307

 

...so you have to apply the translation for yourself...


Edited by Irgendwer, Yesterday, 7:20 AM.


#14 x=usr(1536) OFFLINE  

x=usr(1536)

    Dragonstomper

  • 555 posts
  • Location:913 S. Broadway, Los Angeles, CA 90015

Posted Yesterday, 7:23 AM

There are "issues" working with LOCATE in Gr.0:

 

https://translate.go...t-text=&act=url

 

Maybe this is what you remember...

 

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



#15 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,561 posts
  • Location:Australia

Posted Yesterday, 8:00 AM

Working now - some sort of glitch in their translate service I think.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users