S1E3 Atari Calculator – Supplement

 

This episode features Atari Calculator, originally released in 1981.  This calculator for the Atari 8 bit line of computers was intended or release on cartridge in 1979 but was released on disk nearly 2 years later in 1981.

Podcast: Download

Box Art

Atari Calculator Box

Atari Calculator In Action

After program loading:

Atari Calculator

 

Interest Calculation Mode:

Atari Calculator Interest Mode

 

Statistics Calculation Mode:

Atari Calculator Statistics Mode

 

Programming Mode:

Atari Calculator Programming Mode

 

Program Execution:

Atari Calculator Program Execution

 

Manual Error:

Atari Calculator Manual Error

Test Program

Here is the source for the test program I wrote.  I used the commenting feature to document what it is doing at each step.  Comments follow a ‘:’.

Source

0000    ALG  :Set Algebraic Mode
0001    CLR  :Clear registers
0002  CLMEM  :Clear memory locations
0003  11111  :Signify user input (Start mileage)
0011    STP  :Get user input (into X)
0012    STO  :Store result in memory location 0
0013      0
0021  22222  :Signify user input (End mileage)
0029    STP  :Get user input (into X)
0030    STO  :Store result in memory location 1
0031      1
0039  33333  :Signify user input (Gallons)
0047    STP  :Get user input (into X)
0048    STO  :Store result in memory location 2
0049      2
0057  44444  :Signify user input (Price per gallon)
0065    STP  :Get user input (into X)
0066    STO  :Store result in memory location 3
0067      3
0075    RCL  :Recall memory location 1 (End mileage)
0076      1
0084      -  :Subtract next number from it
0085    RCL  :Recall memory location 0 (Start mileage)
0086      0
0094      =  :Get subtract result
0095    STO  :Store result in memory location 5 (Miles)
0096      5
0104      /  :Divide by next number
0105    RCL  :Recall memory location 2 (Gallons)
0106      2
0114      =  :Get divide result
0115    STO  :Store result in memory location 6 (Miles per gallon)
0116      6
0124    RCL  :Recall memory location 2 (Gallons)
0125      2
0133      *  :Multiply by next number
0134    RCL  :Recall memory location 3 (Price per gallon)
0135      3
0143      =  :Get multiply result
0144    STO  :Store result in memory location 7 (Total fuel cost)
0145      7
0153      /  :Divide by next number
0154    RCL  :Recall memory location 5 (Miles)
0155      5
0163      =  :Get divide result
0164    STO  :Store result in memory location 8 (Cost per mile)
0165      8
0173    STP  :Stop program

Usage

  1. When 11111 appears, enter the start mileage such as 1109.4, then enter CONT or press Shift-8 (@).
  2. When 22222 appears, enter the end mileage such as 1463.8, then enter CONT or press Shift-8 (@).
  3. When 33333 appears, enter the number of gallons such as 11.13, then enter CONT or press Shift-8 (@).
  4. When 44444 appears, enter the price per gallon such as 3.299, then enter CONT or press Shift-8 (@).
  5. Observe results in memory locations 5 through 8, which are:
    • 5 = Distance (miles)
    • 6 = Miles per gallon
    • 7 = Total cost
    • 8 = Cost per mile

Command Cheat Sheet

Download PDF: Cheat Sheet

 

Show Links:

 Bit Rating 6

Intro music is an excerpt from a chip tune by Wizwars named 8 Bit Raceway.  It is used under Creative Common license Attribution-NonCommercial-ShareAlike 3.0 United States.
Advertisements

4 thoughts on “S1E3 Atari Calculator – Supplement

  1. While I found your dissection of Atari Calculator interesting, I disagree a little bit on your verdict. While an 800 running calculator isn’t a perfect replacement for a programmable handheld calculator, the cheapest comparable HP programmable with only 49 steps cost at least three times as much and had a single line display only (as per hpmuseum.org). The Atari had a lot more functions and memory (e.g. HEX/OCT/BIN). So if you had an Atari and needed the occasional calculation without portability the Atari might have been a good choice (Why Atari did not use label programming which HP had invented (in its basic form) years earlier I don’t know, especially as it would have been really easy to implement on a computer with a full keyboard and fullscreen editor.)

    As for the 1+2*3/4 example one would either enter

    1 ENTER 2 ENTER 3* 4/ +

    or

    2 ENTER 3* 4/ 1+

    to get the correct result on an RPN calculator. (The idea being that the way of entry forces the user to break down the problem “inside out” instead of using parentheses that get confusing quickly if you can’t see them (as e.g. on an algebraic TI calc).

    Interestingly, the calculator was ported to the C64 rather recently by the same emulation guru who ported Asteroids and HP calcs to the Atari –> http://atariwiki.strotmann.de/wiki/Wiki.jsp?page=Atari%20Calculator

    1. Thanks for the feedback. Yes comparable handhelds (number of steps/memory locations) were quite a bit more expensive. However I still disagree on the price comparison, partly, in that you can’t compare the handheld cost to just the cost of the Calculator program. You must compare complete package to complete package, so the cost for the Atari solution is quite high. Even if you already had the Atari system before the Calculator program, there would have been some cost translated into Calculators use. Simply because the Calculator program is useless without the rest of the system.

      What you listed for RPN appears to be correct. I’ve only used RPN a few times in the past and completely messed that up. The next podcast will have a correction! Thanks for pointing the mistake out. And yes, Labels seems like a no brainer to me. It’s not like labels hadn’t been used in programming languages.

  2. No one in their right mind would have bought an Atari if they had wanted a calculator. For 99% of purposes a HP41 would have been a much better deal. But if you had an Atari on your desk 30 bucks for the program would have beaten buying almost any calculator price-wise if portability wasn’t your objective.

    Two more things:

    * Pause commands are used on HP calcs to show results without stopping the program. I.e. you have the intermediate result on the stack during the calculation and use pause to let the user see it without having to hit a “continue” (or R/S on HP calcs) to continue with the calculation.

    * the X and Y terminology for the “base” and “first level” of the RPN stack has been used by HP since their very first desktop calculator (http://www.hpmuseum.org/9100/9100bdss.jpg). It has nothing to to with the X and Y registers of the 6502 which can hold 1 byte (0..255) only. What you enter is put in the X register, pushing the previous content to Y (and further to Z and T on HPs or 2 and up on the Atari. Even if you enter a value and an operator in the “command line” at the bottom you can see the value briefly in the X register before the operation is carried out.

    Compared to HPs it’s interesting that the stack moves “downward” as HP usually depicts their stacks as moving upwards (and even has the term “stack lift” and “stack drop” for movements of values on the stack following entries and calculations.

    What’s also interesting is that there does not seem to be an option to limit the stack size to allow for easier use of constants. (If you “fill” the 4-level stack on HPs with a onstant value and start calculating, the top value gets copied when the stack “drops”, so you always have your constant available without re-entering or recalling it from memory.

    Once you’ve mastered RPN (which isn’t very hard) you’ll never want to go back…..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s