PAGING is a program that appears on page 55 (listing 4-3) of the book "Pascal Primer" by David Fox and Mitchell Waite. It demonstrates PROCEDURES calling PROCEDURES and reuse of PROCEDURES. 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
- Additional POSITION statements were added to compensate for the default Atari behavior of indenting two space
The link command looks like:
LINKER V1.0
*D2:PAGING,GRSND,PASLIB/S
When you run the program, it looks like:
No comments:
Post a Comment