M Program Listing For The Two-Bug Version Of The Change Maker Program - Intel l2ICE User Manual

Integrated instrumentation and in-circuit emulation system
Table of Contents

Advertisement

There are two versions of the PL/M program in source code—the code in each version is the
same but the comments are different. These two versions are used in the tutorial for two
tutorial sessions that introduce the PICE screen editor. In the sessions, users are asked to edit
the PL/M source code to correct the two bugs detected during emulation. The names of the two
source code files are as follows:
CMKER2.S1
CMKER2.S2
In addition to the three absolute code CMKER files and the two source code CMKER files, the
tutorial disk also contains the following CMKER list file:
CMKERO.LST A
This file is supplied for your convenience. It is not used during the tutorial.
PL/M Program Listing for the Two-Bug Version of the
Change Maker Program
The tutorial refers to the list file in this section; the listing is for the CMKER program version
with two bugs. (The two bugs are marked in the listing.)
The program was compiled using OPTIMIZE(O). Compile options are explained in the PL/M-
86 Programming Manual (order number 121636).
1
Cmaker:DO;
2 1
DECLARE
TRUE literally 'OFFH',
FALSE literally 'O',
IN_PORT literally '1 ',
OUT_PORT literally '2 ',
If_cr (2) BYTE DATA (OAH, ODH),
paid text (*) BYTE DATA (7, 'Paid = '),
purchased_text (*) BYTE DATA (8, 'Price = '),
coins
change
dollars
quarters
nickels
dimes
pennies
paid
purchased
3
1
read: PROCEDURE BYTE;
4 2
DECLARE
Guide to the PICE™ System Tutorial
Source code with two bugs. This code is used in editing session 1.
Also source code with two bugs. This version is used in editing
session 2.
list file that includes the assembly code.
WORD,
WORD,
WORD,
WORD,
WORD,
WORD,
WORD,
WORD,
WORD;
/* Line feed, return
/* Facilitates user
It
interaction
/* Reads port 1 input from an ASCII
/* keyboard and stores 1 byte at a
*/
*/
*/
*/
*/
2-17

Advertisement

Table of Contents
loading

Table of Contents