(X N) Display Word Reg I Ster; Counter; (Z N) Set Zero Flag; Monitor I/O Support For User Programs - Advanced Micro Computers Am96/4016 User Manual

Table of Contents

Advertisement

3-30. (X n) DISPLA.Y WORD REGISTER
Displays the 16-bit contents of CPU re-
gister n, where n
=
0 to 15. Register
15 is the stack pointer and is initial-
ized during power-up to 40AE.
3-3"1. (XP) DISPLA.Y PROGRAM
COUNTER
Displays the address contained in the
program counter register.
3-3~~.
(Z n) SET ZERO FLAG
Sets or resets the zero (Z) flag to n
=
1 or O. The flags can be displayed with
the XF command.
3-33. MONITOR I/O SUPPORT FOR
USER PROGRAMS
I/O through the serial
or parallel
ports can be done ei ther by your pro-
gram, through the CPU
I
s I/O i nst ruc-
t ions in system mode, or by the Mon-
itor.
To use the Monitor for
I/O,
these
general steps are followed:
1~
Store a block of four 16-bit con-
trol words in memory.
2~
Store the beginning address of
this block in register Rl.
38
Execute the SC instruction using
a value of zero (a non-zero value
will be interpreted as a program
exit which will return control
to the monitor).
The block of four 16-bit control words
is ordered as shown in table 3-2.
The
funct i on code is stored in the most
significant byte of word one; the least
significant byte of word one contains
the response code.
Words two, three
and four provi de the address of the
file name, the beginning address of
3-8
data, and the number of bytes to be
wri tten on read as descri bed in the
following function code description.
Read Control Statement (function code
0) - Thi s command is intended for use
by the assembl ere
It transfers the
user call command line to the specified
area in the same form as the Read
Console function code 1
Read Console (function code 1) - Reads
a single line from the console.
The
fi
1
e name address is unused.
The data
length represents a maximum and is re-
placed by the actual length.
A con-
sole message is always terminated by a
carriage return.
The response code is
nomally zero unless the message was
truncated, in which case, the response
code is 1.
Write
Console
(function
code
2)
Writes a single line to the console.
The fil e name address is unused.
The
data
length
represents
the
write
1
ength.
The system prov ides no auto-
mat i c end of
1
i ne thus, the message
must contain any required carriage re-
turn or line feed codes.
The response
code is zero.
Write Line Printer (function code 3) -
Outputs a single line to the line
printer.
The file name address is
unused.
The data length represents the
write length.
All
printer controls
must be user supplied.
The System 8/8
host must be connected and its monitor
in execution.
The response code is
zero.
Open Disk File (function code 4) -
Prepares a disk file to be read.
The
data address and length are unused. The
file name address points to the address
of the fi
1
e name, whi ch must be thi r-

Advertisement

Table of Contents
loading

Related Products for Advanced Micro Computers Am96/4016

This manual is also suitable for:

Amz8000

Table of Contents