Dec 222017
KDCG is an EGA/VGA graphic implementation of a hand-held calculator. It will add, subtract, multiply and divide. Scroll-back tape function.
File KDCALCG.ZIP from The Programmer’s Corner in
Category Science and Education
KDCG is an EGA/VGA graphic implementation of a hand-held calculator. It will add, subtract, multiply and divide. Scroll-back tape function.
File Name File Size Zip Size Zip Type
KDCG.DOC 11342 4484 deflated
KDCG.EXE 73104 37656 deflated

Download File KDCALCG.ZIP Here

Contents of the KDCG.DOC file

KDCalc Graphic Version 1.1 - April 1989
A Product of KD Ranch Enterprises (c)


KDCG is an EGA/VGA graphic implementation of a hand-held calculator.
It will add, subtract, multiply and divide. It uses an on-screen tape,
capability to list the tape on a printer and features a nine memory
register sub-function for storage and recall. It was written using
Turbo Pascal 5.0. KDCG will not run on a CGA system.


Version 1.0 - Initital Release (January 1989).
Version 1.1 - Implemented "Tape Scrolling" sub-function (April 1989).


By default KDCG will start in "Float Mode". If you prefer
"Dollar Mode" use the d parameter -- see FUNCTIONS for
explanation of these modes. This mode can be changed from
inside the calculator.

Also, by default, KDCG will detect your display capability
(either EGA or VGA) and initialize in that mode. If you have
VGA, but prefer to use KDCG in EGA mode, then use an e
parameter. Sorry, you can't get VGA on an EGA system.
This mode CANNOT be changed once inside the calculator.

If you use two parameters they must be separated by a space
(e.g. KDCG d e).


As I said, the calculator emulates a hand-held version.
Calculations are entered and performed just like you would
say them:

You would say,
"6 plus 5 minus 13 times 4 divided by 2 equals".
You would enter,
6 + 5 - 13 * 4 / 2 = (NOTE: "=" is the ENTER key)

Actually, if you don't know how a cheap hand-held calculator
works, you probably don't need this program.

The KeyPad shown on the graphic is from an Enhanced keyboard.
Other keyboards will work the same, only the location of some
keys may be different.

KDCG will automatically turn your NumLock and CapsLock on and
return them to their original state when you exit the program.
strange reason they are not automatically activated, please turn
them on.


The screen displays all keys that are active with a short
description of what they do. Hopefully, most are self
explanatory and if not, a try or two should suffice. I
don't plan to explain the white keys from the keypad or
the specific application of the * / + keys, however
the following is offered:

Operator Keys:
Operator keys cause the calculator to PERFORM AN OPERATION
affecting the results shown in the display window and/or
the screen listing.

The keys are: +,*,/,=(ENTER),S and sometimes - and R.
Also, while they are not strictly "operators", O and C
will have some similar effects. You might note that the
current mathematical operator (+,*,/,-) is always hilighted
on the keypad display. + is the default operator.

Minus Key (-):
The minus key has two functions depending on when it is
hit. If used directly after any operator, it simply
becomes part of the next number entered, making it a
negative number. Otherwise, it is an operator representing
the subtraction function.

Equal Key (= or ENTER):
Your display will always show the current running total
after hitting an operator key. The Equal key will clear
the display and the running total, setting the current
total to 0. Remember, the Equal key is also an operator.

Dollar/Float Toggle (D):
Toggles between Dollar Mode and Float Mode. Dollar mode
always assumes 2 decimals -- particularly useful to do
checkbooks and stuff. In Dollar Mode the decimal key is
disabled. If you hit 123 the display will read 1.23. Be
careful of multiply and divide in Dollar Mode (keystrokes
"123 * 2" will result in 1.23 * .02 -- that result is NOT
246 -- it will be 0.02). I recommend using Float mode to
multiply or divide. Float mode allows you to place the
decimal and results will be rounded to the maximum capacity
of the calculator -- which is pretty darn big.

Printer Toggle (P):
Toggles printer on and off. Obviously this assumes you have
a printer and would like a tape of your activity. Most line
feed type printers should work (don't use a laser). There is
an error message built in if your printer is not ready to
print, but I have found that checking the availability of a
printer is not always reliable (funny switch settings, certain
ram and external buffers, etc.). You'll just have to try it.

Subtotal (S):
Subtotal does pretty much what you expect. It lists the current
running total without clearing it.

Tape Scroller (T): [***** New to release 1.1 *****]
Executes a sub-function allowing you to scroll through the tape
listing that has "scrolled off the screen". It is limited to 500
previous entries. The tape scroll buffer is cleared at startup
and whenever "Over" (see below) is executed.

Clear (C) and Backspace (<-):
Clear DOES NOT clear the running total. Its only
function is to remove all numbers that you have entered
in prior to hitting an operator key. Backspace removes
one number at a time. Hitting the Backspace key an
appropriate number of times will produce the same results
as Clear.

Over (O):
Over is just a quick way to remove the screen listing and reset
the calculator. It will also set the printer toggle off and clear.
the tape scroller buffer. Dollar/Float toggle and the Memory
registers will not be affected.

Quit (Q):
You guessed it - EXIT. There is NO WARNING like "are you sure?".
This isn't like a spreadsheet that you may have worked on for hours.
I figure that if your done, your done!

Memory Storage (M):
Memory will "grab" the current running total and execute a sub-
function allowing you to do a lot of things with the 9 memory
registers. It will only function after an operator has executed.

[You should remember that if you have hit the Equal
key (ENTER) the current running total is 0. There
is not a lot you can do with 0. So use M after +,/,
*,S and sometimes -, C or R.]

Upon execution, a new window will pop up displaying the "grabbed"
total and asking you which memory register you want to work with.
Select 1 - 9 (or 0 to just return to the calculator).

Assuming you choose 1 - 9, the current value of that register will
be shown and a series of options listed. Select the option you
want. The result will be transferred to the selected register and
a summary of what has happened will be displayed for you. At that
point, just hit any key to return to the calculator. The stored
value can simply be used to verify another calculation, called again
and used in this sub-function, or Recalled into the calculator as
explained below.

Recall Memory (R):
Recall will "grab" a stored memory value and transfer it to the
calculator based on the operation set by the current operator.
It will only work after an operator has been issued and will have
no affect if the selected memory register value is 0.

Upon execution, a new window will pop up asking you which memory
register value to transfer. The window will also show you the
current "inherent total" (running total of the calculator) and an
indication of what you are about to do to that "inherent total"
based on the current mathematical operator. This indication is
significant because once you choose a register, the rest is

This may sound complicated, and I guess it is (a little), but after
you try it a few times it should be clear. The main thing to
remember is that not only will a value be transferred, but the current
operator will also be issued. This is intentional for the sake of
speed. It saves a lot of keystrokes. You can get the same results
by issuing an operator, keying the number you want by looking at
the memory register and then issuing another operator.


Every reasonable attempt has been made to offer a fun product that
may be of some use and be "bug" free. I (the author) can, however,
offer no guarantees as to the suitability or use of this program.
Therefore (here we go)...


You may copy and distribute this program freely. Please don't
charge for it and please provide this DOC file with it.

Anyone who is interested, can send the author (me) $5.00 or so.
(Mainly, I'm curious to see if anyone is interested!)

David A. Befort
KD Ranch Enterprises (c)
Rt.3, Box 8080
Bartlesville, Ok. 74003

P.S. While I'm not a programmer by profession, I have written a few
other things -- usually because I can't find or buy precisely
what I'm looking for. You may see some of these floating around.

[All of my programs begin with KD -- logo bottom left of KDCG].

KDQwik - a small, easy word processor. Extremely straight
forward for a beginner or an executive, yet with
a few twists (like real-time sort) for the more

KDGraph - a pull-down menu driven graphics package for EGA/VGA.
It's fast and does some 3D stuff along with your basic
bars,lines and pies.

KDCalc - a non-graphics version of KDCG. Has a few more
functions and can be made memory resident for
pop-up capability.

KDLogic - a set of 5 brain teaser logic puzzles (HiQ,Minefield,
Mastermind,Fifteen Squares and Towers). Program can
made memory resident for quick pop up and down.

KDPoker - There are a lot of good blackjack games, but I couldn't
find a good, true rendition of the Draw Poker machines
that are now extremely popular in Las Vegas, Reno, etc.
Two commercial versions I bought were awful. This plays
pretty much like the real thing.

 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>