Tuesday, February 12, 2019

REVINPUT

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

REVINPUT is a program that appears on page 50 of the book "Pascal Primer" by David Fox and Mitchell Waite. It demonstrates the use of PROCEDURES, READLN, COMMENTS, and clearing the text screen. The program has been ported from UCSD Pascal for the Apple II to the Atari Pascal Language System for the Atari 8-bit computers.

I'm using the Altirra 3.10 Atari 8-bit emulator. I'm editing the code using AtariWriter 80 (AtariWriter80_b_XE-working.ATR). Note that if you use AtariWriter to edited your source code, you will need to use CONTROL+S to save your file in straight ASCII rather than the SAVE Menu option which includes some AtariWriter header info. I'm compiling, linking, running the program using the Atari Pascal Language System.

To port it, the following changes where made:
  • Reference to the Atari Graphics and Sound package was added
  • Atari Pascal POSITION statement replaces UCSD Pascal GOTOXY statement
  • Screen cleared with WRITE(CHR(125)) instead of PAGE(OUTPUT)
  • ClearScreen procedure name was changed to ClrScrn do to a naming conflict 

The link command looks like:

LINKER V1.0
*D2:REVINPUT,GRSND,PASLIB/S

When you run the program, it looks like: 


No comments:

Post a Comment