AARoads Forum

Please login or register.

Login with username, password and session length

Author Topic: Atari BASIC  (Read 835 times)

bandit957

  • *
  • Offline Offline

  • Posts: 1586
  • A natural gas bunk!

  • Age: 45
  • Location: Bellevue, KY
  • Last Login: Today at 09:53:19 AM
Atari BASIC
« on: December 13, 2018, 12:31:14 PM »

If you've ever been in computer programming, you're surely familiar with Atari BASIC. You've surely noticed that Atari BASIC has a POP command.

Despite my Atari BASIC expertise, I could never figure out what the POP command does. At first, I thought it was something to do with bubble gum. But people always tell me it "pops" commands off the "stack." I'm still not sure what that means.

Have any of you Atari BASIC programmers ever actually used the POP command?
« Last Edit: December 13, 2018, 11:36:43 PM by Scott5114 »
Logged
The highway to not having your teeth fall out...

Number of remaining teeth: https://goo.gl/maps/dgsWdCme9s72

1

  • *
  • Online Online

  • Posts: 6774
  • UMass Lowell student

  • Age: 20
  • Location: MA/NH border
  • Last Login: Today at 01:32:08 PM
    • Flickr account
Re: POP command in Atari BASIC
« Reply #1 on: December 13, 2018, 12:32:12 PM »

No, but I have used "pop" in Python, which pops an item off a list.

If you've ever been in computer programming, you're surely familiar with Atari BASIC.
You're outdated by 3 decades.
Logged
Clinched

Traveled, plus:
US ⒉⒔50
MA ⒐22.40.99.10⒎10⒐1⒒1⒚127.141.159
NH 27,111A; NY 366; GA 42,140; FL A1A; CT 32

Flickr

MNHighwayMan

  • *
  • Offline Offline

  • Posts: 3683
  • Blue and gold forever!

  • Age: 27
  • Location: Des Moines
  • Last Login: Today at 09:29:37 AM
Re: POP command in Atari BASIC
« Reply #2 on: December 13, 2018, 12:41:14 PM »

If you've ever been in computer programming, you're surely familiar with Atari BASIC.

Umm, no. Due to being born in 1992, I've only studied programming in this millennium.
Logged

cjk374

  • *
  • Offline Offline

  • Posts: 2048
  • The road less travelled is well worn under my feet

  • Age: 45
  • Location: Simsboro, LA
  • Last Login: May 24, 2019, 09:24:30 PM
Re: POP command in Atari BASIC
« Reply #3 on: December 13, 2018, 04:26:48 PM »

If you've ever been in computer programming, you're surely familiar with Atari BASIC.

Umm, no. Due to being born in 1992, I've only studied programming in this millennium.

You missed out on all the fun of telling an old green-screen computer to repeat something infinitely many times.  :bigass:
Logged
Runnin' roads and polishin' rails.

bandit957

  • *
  • Offline Offline

  • Posts: 1586
  • A natural gas bunk!

  • Age: 45
  • Location: Bellevue, KY
  • Last Login: Today at 09:53:19 AM
Was Atari BASIC the best BASIC of that era?
« Reply #4 on: December 13, 2018, 04:46:02 PM »

I contend that Atari BASIC was the best version of BASIC you could find in the 1980s. It might not be as good as FreeBASIC, which is intended for newer computers, but it was the best in its day.

You could do neato graphics with Atari BASIC, and write programs that were very advanced for the time. But it was obsessed with the number 255. It also suffered from the dreaded "2-line lockup" bug that spoiled entire programs at the drop of a hat.

Atari BASIC was cool, and it's a shame software companies stopped using it before its time was up.
Logged
The highway to not having your teeth fall out...

Number of remaining teeth: https://goo.gl/maps/dgsWdCme9s72

bandit957

  • *
  • Offline Offline

  • Posts: 1586
  • A natural gas bunk!

  • Age: 45
  • Location: Bellevue, KY
  • Last Login: Today at 09:53:19 AM
The Atari BASIC Reference Manual falling apart
« Reply #5 on: December 13, 2018, 11:03:22 PM »

Anyone else remember this? The Atari BASIC Reference Manual would always fall apart because it was in a cheap binder style and the pages always slipped out of the rings.

One time I threw it across the room and the pages flew everywhere. I think I gathered all the pages but never got them put back in the right order ever again.
Logged
The highway to not having your teeth fall out...

Number of remaining teeth: https://goo.gl/maps/dgsWdCme9s72

OracleUsr

  • *
  • Offline Offline

  • Posts: 835
  • Age: 48
  • Location: North Carolina
  • Last Login: Today at 09:15:23 AM
Re: Atari BASIC
« Reply #6 on: December 14, 2018, 12:13:35 AM »

I cut my teeth on Commodore BASIC (had a Vic-20 as my first personal computer)
Logged
Anti-center-tabbing, anti-sequential-numbering, anti-Clearview BGS FAN

kurumi

  • *
  • Offline Offline

  • Posts: 1542
  • Location: Cupertino, CA
  • Last Login: May 24, 2019, 11:59:39 PM
    • kurumi.com
Re: Atari BASIC
« Reply #7 on: December 14, 2018, 01:31:05 AM »

"POP" is not what I thought it was. It seems like a way to fix yourself ("un**ck" is a better word, but we have all ages here) if your code slips out of a "subroutine" without returning. In languages without out-of-block GOTOs, I don't think there's a reason for POP.

I think if you don't POP, you just fill up the stack; the next gosub/return should still work if you have space left.

Quote from: https://archive.org/stream/atari-basic-reference-manual/ataribasicreferencemanual_djvu.txt
The POP command must be used according to the following rules:

1. It must be in the execution path of the program.
2. It must follow the execution of any GOSUB statement that is not brought  back to the main program by a RETURN statement.

The following example demonstrates the use of the POP command with a GOSUB when the RETURN is not executed:

10 GOSUB 1800
15 REM LINE 20 WILL NOT BE EXECUTED
20 PRINT "NORMAL RETURN PRINTS THIS MESSAGE."
30 PRINT "ABNORMAL RETURN PRINTS THIS MESSAGE."
40 POP
999 END

1800 PRINT "NOW EXECUTING SUBROUTINE."
1815 REM derp
1810 GOTO 30
1820 RETURN

P. S. If you do still have a VIC-20 lying around, go get the following PDF (from 1984), go to page 214, and type in the Chord Organ program I published when I was a wee lad: https://computerarchive.org/files/comp/books/Compute/Compute%27s_Third_Book_of_Vic.pdf
Logged

Jim

  • *
  • Offline Offline

  • Posts: 3800
  • Check out http://travelmapping.net

  • Location: Amsterdam, NY
  • Last Login: Today at 09:03:05 AM
    • Travel and Other Pictures
Re: Atari BASIC
« Reply #8 on: December 14, 2018, 08:22:50 AM »

I mostly got started with BASIC on the Commodore 64.  However, I did have the "Basic Programming" cartridge for my Atari 2600 before that.
Logged
Photos I post are my own unless otherwise noted.
Signs: http://www.teresco.org/pics/signs/
Travel Mapping: http://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, weather, sports)

roadman

  • *
  • Offline Offline

  • Posts: 3629
  • Age: 57
  • Location: Boston, MA
  • Last Login: May 24, 2019, 04:24:26 PM
Re: Atari BASIC
« Reply #9 on: December 14, 2018, 09:08:46 AM »

If you've ever been in computer programming, you're surely familiar with Atari BASIC.

Umm, no. Due to being born in 1992, I've only studied programming in this millennium.

You missed out on all the fun of telling an old green-screen computer to repeat something infinitely many times.  :bigass:
Freshman year of college (1980-1981), I took Basic programming (even though I was in the Transportation Management program, it was a required course).  We did all our work on terminals at a central computer center.  One day, when I went to get a printout of an assignment, there was a notice that the printer was down.  In the output bin, I noticed a printout that was many, many pages long, and a note from the computer center administrator for the person who sent the printout to see them.  Looking a the first page, I could see it was the same assignment I'd just completed, and it was obvious they had forgotten to close the infinite loop in their code.
Logged
"And ninety-five is the route you were on.  It was not the speed limit sign."  - Jim Croce (from Speedball Tucker)

"My life has been a tapestry
Of years of roads and highway signs" (with apologies to Carole King and Tom Rush)

bandit957

  • *
  • Offline Offline

  • Posts: 1586
  • A natural gas bunk!

  • Age: 45
  • Location: Bellevue, KY
  • Last Login: Today at 09:53:19 AM
Re: Atari BASIC
« Reply #10 on: December 14, 2018, 09:45:45 AM »

Freshman year of college (1980-1981), I took Basic programming (even though I was in the Transportation Management program, it was a required course).  We did all our work on terminals at a central computer center.  One day, when I went to get a printout of an assignment, there was a notice that the printer was down.  In the output bin, I noticed a printout that was many, many pages long, and a note from the computer center administrator for the person who sent the printout to see them.  Looking a the first page, I could see it was the same assignment I'd just completed, and it was obvious they had forgotten to close the infinite loop in their code.

I took a computer class at community college in 2006, and somebody wasted all the paper and ink in the printer by printing out the entire Hulk Hogan and Def Leppard fan websites.
Logged
The highway to not having your teeth fall out...

Number of remaining teeth: https://goo.gl/maps/dgsWdCme9s72

inkyatari

  • *
  • Offline Offline

  • Posts: 1350
  • Widen I-80 through all of Illinois!

  • Age: 50
  • Location: Morris, IL
  • Last Login: May 23, 2019, 05:21:25 PM
    • Pie Factory Podcast - Classic Arcade gaming talk
Re: Atari BASIC
« Reply #11 on: December 14, 2018, 09:52:49 AM »

I learned a little Applesoft basic, then SmartBASIC on the *ahem* Coleco ADAM.  I current own an Atari 8-bit, and have been interested in learning its basic.
Logged
I'm never wrong, just wildly inaccurate.

roadman

  • *
  • Offline Offline

  • Posts: 3629
  • Age: 57
  • Location: Boston, MA
  • Last Login: May 24, 2019, 04:24:26 PM
Re: Atari BASIC
« Reply #12 on: December 14, 2018, 11:05:26 AM »

Freshman year of college (1980-1981), I took Basic programming (even though I was in the Transportation Management program, it was a required course).  We did all our work on terminals at a central computer center.  One day, when I went to get a printout of an assignment, there was a notice that the printer was down.  In the output bin, I noticed a printout that was many, many pages long, and a note from the computer center administrator for the person who sent the printout to see them.  Looking a the first page, I could see it was the same assignment I'd just completed, and it was obvious they had forgotten to close the infinite loop in their code.

I took a computer class at community college in 2006, and somebody wasted all the paper and ink in the printer by printing out the entire Hulk Hogan and Def Leppard fan websites.
I agree that's annoying, but it's far different than a basic (pardon the pun) programming error.
Logged
"And ninety-five is the route you were on.  It was not the speed limit sign."  - Jim Croce (from Speedball Tucker)

"My life has been a tapestry
Of years of roads and highway signs" (with apologies to Carole King and Tom Rush)

nexus73

  • *
  • Offline Offline

  • Posts: 1647
  • Age: 63
  • Location: Coos Bay OR
  • Last Login: Today at 09:24:54 AM
Re: Atari BASIC
« Reply #13 on: December 14, 2018, 12:05:18 PM »

FORTRAN and its simpler cousin BASIC were learned by me in 1971-72 at our high school.  How long ago was that in tech terms?  We had no monitors, just a printout terminal for the BASIC that connected via modem (what a miracle back then!) to a mainframe close to the PDX area.  Doing FORTRAN meant using an IBM punchcard machine to create the program, which was then sent off to the local community college where their mainframe did the job of seeing if what we students did was correct.  Alas, that mainframe would not handle subroutines.  No explanation ever came back as to the cause.

Being able to play around with a C-64 a decade and a half later seemed such an improvement!  Cassette drive, using a TV for a monitor, heck, there were even cartridges...LOL! 

My young years could be called the oxcart era of computing.  Seeing what it became was absolutely amazing although the side effects of addiction to devices are sad to see.  Back when the Atari 2600 was THE machine for videogaming, it was bad enough to see time get absorbed so completely by merely playing games.  That was light fare compared to the addictive qualities of smartphones and tablets, which are 100% pharmaceutical grade heroin in comparison. 

Where do we go from here and what will the unintended consequences look like? 

Rick
Logged
US 101 is THE backbone of the Pacific coast from Bandon OR to Willets CA.  Industry, tourism and local traffic would be gone or severely crippled without it being in functioning condition in BOTH states.

bandit957

  • *
  • Offline Offline

  • Posts: 1586
  • A natural gas bunk!

  • Age: 45
  • Location: Bellevue, KY
  • Last Login: Today at 09:53:19 AM
Re: Atari BASIC
« Reply #14 on: December 14, 2018, 12:08:41 PM »

FORTRAN and its simpler cousin BASIC were learned by me in 1971-72 at our high school.

Our high schools here wouldn't even teach it yet in 1992!
Logged
The highway to not having your teeth fall out...

Number of remaining teeth: https://goo.gl/maps/dgsWdCme9s72

Scott5114

  • *
  • *
  • Offline Offline

  • Posts: 8027
  • Age: 29
  • Location: Norman, OK
  • Last Login: Today at 05:59:14 AM
    • Denexa 100% Plastic Playing Cards
Re: Atari BASIC
« Reply #15 on: December 14, 2018, 01:15:33 PM »

"POP" is not what I thought it was. It seems like a way to fix yourself ("un**ck" is a better word, but we have all ages here) if your code slips out of a "subroutine" without returning. In languages without out-of-block GOTOs, I don't think there's a reason for POP.

I seem to remember, but am not confident because I've never used it, that push/pop in Perl performs the commands on an array rather than the stack.

FORTRAN and its simpler cousin BASIC were learned by me in 1971-72 at our high school.

Our high schools here wouldn't even teach it yet in 1992!

My high school was not teaching any kind of programming as late as 2007. I took the most advanced computer science class offered and the teacher admitted she didn't know any of the material because I was the only one who had taken that class, so she just kind of let me do whatever.

BASIC (especially Visual Basic) kind of sucks as a first language because it teaches you all kinds of bad habits. Nowadays I think they teach Java or Python, both of which are practical languages in their own right.
Logged

ErmineNotyours

  • *
  • Offline Offline

  • Posts: 364
  • Age: 51
  • Location: Renton, Washington
  • Last Login: Today at 12:13:35 AM
Re: Atari BASIC
« Reply #16 on: December 14, 2018, 11:43:35 PM »

In 1991, when I left college, I surreptitiously used the Apple II terminals of my previous community college to write a version of Tetris in Applesoft BASIC.  The Apple II was supposedly built around Breakout as a demonstration program, so I figured someone should write the even simpler Tetris for it in lo-res graphics.  It worked, and soon I got my own Macintosh, but got too distracted by its features to continue practicing programming.  Fast forward to a couple of years ago and I was planning to go to a coding academy.   To ramp myself up for programming again, I decided to initiate my own project.  I wanted to make a Columns program in Game Maker.  It wouldn't be the environment I would use in the school, but fundamental concepts would be the same.  I couldn't get it to work, which was frustrating.  I thought, "Things were so much easier when I was programming Tetris in BASIC."  I checked, and I found an Applesoft BASIC emulator.  I dug out my faded Tetris printout and started typing it in.  It was so hard to read that most of the debugging was finding the typos I made, but it worked.  Then I tackled Columns.  It had the same problems it had in Game Maker, in moving down multiple cleared cells.  I studied the Tetris program I made more than 25 years before, and focused down on the way that program cleared lines.  I got Columns to work, using my own logic, but I have no idea how I came up with it then and I can't explain it now.  I then made the change in the Game Maker version, and it still doesn't work.

Later in the school, I took Java Script, and made a version of Columns for that.  That version doesn't work either, and when I get around to it, I hope to debug it and start working on collaborative projects with others.  I'm also trying to polish my Columns program and submit it and Tetris to the emulator author to see if he will post them.  He used to have a "Fork me in GitHub" banner on the homepage, but it has disappeared, so I don't know if he is taking new submissions.
Logged

KeithE4Phx

  • *
  • Offline Offline

  • Posts: 171
  • Location: Mesa, AZ
  • Last Login: Today at 11:36:39 AM
Re: Atari BASIC
« Reply #17 on: December 15, 2018, 12:03:06 AM »

BASIC (especially Visual Basic) kind of sucks as a first language because it teaches you all kinds of bad habits. Nowadays I think they teach Java or Python, both of which are practical languages in their own right.

Is anybody using Basic of any kind anymore, other than for maintaining old software?  The last time I used Visual Basic was about 20 years ago, and QuickBasic about 5 years before that.  Today, anyone who needs an interpreted language uses Python, Perl, Java, or Ruby.  They're modern and they're free, even on Windows.  BASIC in all its forms has gone the way of Forth and Pascal -- to the Museum of Antique Programming.  In other words:  It's dead, Jim.

Atari Basic was well done, and had some things that sped up execution, and had hooks into Atari's OS, but it was non-standard and only worked on the 8-bit machines (400, 800, 1200XL), not the ST series.  Everybody else used a version of Microsoft Basic (Applesoft, BasicA, GWBasic, Extended Color Basic, etc).  Even Atari offered a version of Microsoft Basic on disk, beginning in 1983 or so.  I used my Atari 800 regularly from the time I bought it in 1983 until I could afford a real PC in '88 -- I still have the thing, sitting in storage.  Atari Basic served me well, but Microsoft Basic was more important for my job.  I could write programs with it on my Atari and be able to use it on an XT at work with minimal porting.
Logged
"Oh, so you hate your job? Well, why didn't you say so? There's a support group for that. It's called "EVERYBODY!" They meet at the bar." -- Drew Carey

bandit957

  • *
  • Offline Offline

  • Posts: 1586
  • A natural gas bunk!

  • Age: 45
  • Location: Bellevue, KY
  • Last Login: Today at 09:53:19 AM
Re: Atari BASIC
« Reply #18 on: December 15, 2018, 12:08:05 AM »

Is anybody using Basic of any kind anymore, other than for maintaining old software?

I use FreeBASIC all the time. Other languages are so bloated and hard to learn, and FreeBASIC can do most of the things other languages can do.
Logged
The highway to not having your teeth fall out...

Number of remaining teeth: https://goo.gl/maps/dgsWdCme9s72

OracleUsr

  • *
  • Offline Offline

  • Posts: 835
  • Age: 48
  • Location: North Carolina
  • Last Login: Today at 09:15:23 AM
Re: Atari BASIC
« Reply #19 on: December 15, 2018, 12:14:14 AM »

I use VBA from time to time but my language of preference is C#
Logged
Anti-center-tabbing, anti-sequential-numbering, anti-Clearview BGS FAN

Scott5114

  • *
  • *
  • Offline Offline

  • Posts: 8027
  • Age: 29
  • Location: Norman, OK
  • Last Login: Today at 05:59:14 AM
    • Denexa 100% Plastic Playing Cards
Re: Atari BASIC
« Reply #20 on: December 15, 2018, 02:55:20 AM »

Is anybody using Basic of any kind anymore, other than for maintaining old software?  The last time I used Visual Basic was about 20 years ago, and QuickBasic about 5 years before that.

At work we have an enterprise database application (!!!) that is done in Visual Basic. I know because it throws very obvious VB runtime errors.

Is anybody using Basic of any kind anymore, other than for maintaining old software?

I use FreeBASIC all the time. Other languages are so bloated and hard to learn, and FreeBASIC can do most of the things other languages can do.

Python is pretty simple, and only gets complex when you start importing extra modules into it.
« Last Edit: December 15, 2018, 05:15:52 AM by Scott5114 »
Logged

english si

  • *
  • Offline Offline

  • Posts: 3475
  • Age: 33
  • Location: Buckinghamshire, England
  • Last Login: May 21, 2019, 07:30:10 PM
Re: Atari BASIC
« Reply #21 on: December 15, 2018, 04:54:48 AM »

At uni, my lab group got bonus points for style on a big group project for using BASIC to write a program to make an output readable on a computer - the person marking got all nostalgic (it was 2006) and said he'd have used BASIC for that task as it was easy to do and he didn't much like the newer languages that we were taught (C and C++, the latter badly) as they weren't as elegant.

This was an electronics lab. If it was a lab for the programming module, with a Computer Scientist in charge, we'd have lost marks for being too clever and not showing what we were meant to have learnt.
Logged

Scott5114

  • *
  • *
  • Offline Offline

  • Posts: 8027
  • Age: 29
  • Location: Norman, OK
  • Last Login: Today at 05:59:14 AM
    • Denexa 100% Plastic Playing Cards
Re: Atari BASIC
« Reply #22 on: December 15, 2018, 05:15:35 AM »

I don't think C++ has ever been accused of being elegant (Bjarne Stroustrup, its creator, has admitted that the language has gotten so large and unwieldy that even he can't hold it all in his head anymore), but seeing BASIC called 'elegant' is rather alarming. Then again, it was 2006, so maybe the guy hadn't yet heard about things like Python or Lua.
Logged

english si

  • *
  • Offline Offline

  • Posts: 3475
  • Age: 33
  • Location: Buckinghamshire, England
  • Last Login: May 21, 2019, 07:30:10 PM
Re: Atari BASIC
« Reply #23 on: December 15, 2018, 06:31:28 AM »

seeing BASIC called 'elegant' is rather alarming.
Where was it called elegant? Just that it was considered more elegant than specific other languages for the task.

The person in our team given the task of writing the program bodged it together in the final 20-30 minutes (of a week-long lab project) and it worked. The other teams' equivalent was panic coding for an hour and most didn't finish, because none of us had been taught how do this - the very thing we would need to do as Electronic Engineers - in an elegant way.

Our C module in first year was about teaching us basic programming skills using the lowest-level language the CompSci professors would go (so that the lower-level languages we'd use in our actual electronics courses would be application of these skills), and our C++ module was openly (by the curriculum director of our electronic engineering course, who was teaching it) said to be irrelevant for anything other than teaching us an object-orientated language so we'd have a back-up job option as programmers (given we had specifically chosen electronic engineering, and specifically chosen that uni as it was the best for it and most likely to give us jobs, we were not happy with that, and it was a factor in his demotion a year later when the class graduated and the uni fell through the rankings for the course).
Quote
Then again, it was 2006, so maybe the guy hadn't yet heard about things like Python or Lua.
He was in his 50s, and an electronic engineering professor. He'd have heard of these languages, but rarely needed to do programming beyond bespoke tools/machine code, so - with his age - wouldn't have bothered to learn them. If he needed a program in one of these languages, he could get an underling to write it.
Logged

vdeane

  • *
  • *
  • Offline Offline

  • Posts: 9960
  • Age: 28
  • Location: Latham, NY
  • Last Login: May 24, 2019, 05:41:13 PM
    • New York State Roads
Re: Atari BASIC
« Reply #24 on: December 15, 2018, 10:43:16 PM »

BASIC (especially Visual Basic) kind of sucks as a first language because it teaches you all kinds of bad habits. Nowadays I think they teach Java or Python, both of which are practical languages in their own right.

Is anybody using Basic of any kind anymore, other than for maintaining old software?  The last time I used Visual Basic was about 20 years ago, and QuickBasic about 5 years before that.  Today, anyone who needs an interpreted language uses Python, Perl, Java, or Ruby.  They're modern and they're free, even on Windows.  BASIC in all its forms has gone the way of Forth and Pascal -- to the Museum of Antique Programming.  In other words:  It's dead, Jim.

Atari Basic was well done, and had some things that sped up execution, and had hooks into Atari's OS, but it was non-standard and only worked on the 8-bit machines (400, 800, 1200XL), not the ST series.  Everybody else used a version of Microsoft Basic (Applesoft, BasicA, GWBasic, Extended Color Basic, etc).  Even Atari offered a version of Microsoft Basic on disk, beginning in 1983 or so.  I used my Atari 800 regularly from the time I bought it in 1983 until I could afford a real PC in '88 -- I still have the thing, sitting in storage.  Atari Basic served me well, but Microsoft Basic was more important for my job.  I could write programs with it on my Atari and be able to use it on an XT at work with minimal porting.
Excel still uses VBA for macros.  A while back, we were designing "trackers" for many tasks, and a manager wanted the date/time added to the header so he would know which one of his printouts was the most recent.  Me, being lazy, wrote a macro to add a timestamp every time the file is saved.
Logged
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

 


Opinions expressed here on belong solely to the poster and do not represent or reflect the opinions or beliefs of AARoads, its creators and/or associates.