Jump to content
  • entries
    46
  • comments
    9
  • views
    48,133

dCalc 1.0 - Ready for use


k-Pack

1,581 views

Dcalc – The best Calculator app for Diamond GOS

blogentry-37655-0-13640000-1398801409_thumb.jpg

This simple calculator written in BASIC for the Diamond GOS environment should be able to handle balancing your check book. If you are trying to get to the moon you may want to double check the math with your slide rule.

 

The program was written in Atari BASIC on a 130XE, Diamond GOS 3.0, 1050 disk drive with Atari DOS 2.5. I have a feeling that there will be some systems that may not be able to run this program. What I would really like to know is the systems you have that can run it.

 

The attached ZIP file contains three files, DCALC.BAS, DIABASIC.OBJ, and DCALC.SYS. It was created on a Windows NT computer after the files were transferred from the Atari. You will need to download and transfer the programs to your Diamond equipped Atari. DIABASIC.OBJ is the page 6 ml program used to transfer control from BASIC to Diamond and back. DCALC will look for DIABASIC.OBJ on Drive 1. DCALC.SYS is a program that should auto-run D1:DCALC.BAS when you exit the Diamond Desktop to Atari BASIC.

 

dcalc.zip

 

To run dCalc

 

1. Boot up your Diamond Desktop

2. Put the disk with the three programs in Drive 1

3. Open window for drive A. Double Click DCALC.SYS and let run.

4. Choose File-Quit from the drop down menu.

5. Choose YES

6. The program should load and run.

 

If you don't/can't use DCALC.SYS then you can always quite to BASIC and type RUN “D1:DCAL.BAS”.

 

When you are ready to quite the program, clicking the “Q” button in the lower right corner of the screen should take you back to the DESK TOP.

 

The program uses Reverse Polish Notation (RPN) and is different then normal calculator data entry.

 

To Add 2 numbers.

 

Input a number. The BS key is for backspacing. (click 25)

Click the enter (click up arrow)

Enter second number. (click 32)

Click operation button (+)

(57 should be in the upper box)

 

The rest of math functions work the same way. The numbers in the boxes will be used and the result will be displayed in the upper box when ever a function key is clicked. This will take some getting use to if you have never used RPN. I am still catching myself trying to use number-function-number-equal.

 

The double arrow icon is used to swap the numbers in the registers. I was thinking that I may want to Invert and divide someday.

 

The only error that should occur is the data overflow error. Atari BASIC can't handle numbers larger then 9.99999999E-94 (or something real close). Type RUN to restart the program.

 

Divide by Zero is an error. Trying to do this should result in a beep. Nothing happens to the registers until a valid operation is attempted.

 

There is plenty of room for improvement. I left the upper left icon (#19) undefined. The only thing that I ask is that you change the title string to indicate that a change has been made.

 

I wrote this program for my own use and to get back into programing the Atari after a 22 year hiatus. So far it has been enough fun to get me thinking about my next Diamond Project.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

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