Sunday, March 3, 2019

LOAN2

Table of Contents ] [ List of Example Programs ] [ LOAN2 Disk Image ]

LOAN2 is a program that appears on page 68 (listing 5-8) of the book "Pascal Primer" by David Fox and Mitchell Waite. This program demonstrates how to calculate the regular payment on a loan with formatted output.






The original Pascal source code from the book was written for the Apple II family of personal computers using UCSD Pascal. Note that you first have to enter LOAN1, then make the LOAN2 modifications.






The Atari Pascal Language System version of the program was created in an Altirra emulator-based Development Environment using the AtariWriter 80 word processor as the source code editor.



I made a few tweaks to the original Apple II/UCSD Pascal program to clear the Atari text screen and to keep the program from ending prematurely. Also, since we are using REAL number variables in this program, we MUST include the floating point library (FPLIB) when linking or the program will crash when run.

The link command looks like:

LINKER V1.0
*D2:LOAN2,FPLIB,PASLIB/S


When you run the program, it looks like:



1 comment: