EasyManua.ls Logo

Xerox 7120 - Programming Examples; Sigma 5-9 Programming Example

Xerox 7120
32 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
APPENDIX
B.
PROGRAMMING
EXAMPLES
SIGMA
5-9
PROGRAMMING
EXAMPLE
The following
partial
program
is
intended
to
illustrate
the
use
of
the
I/O
instructions
and
the
card
reader
responses to
these
instructions.
The program is
coded
as
a
nonrecursive
routine
that
reads
one
EBCDIC-punched
card
and
one
binary-punched
card.
The program does not use
the
interrupt
system, but does
exit
to
another
routine
(not shown)
that
deals
with
specific
error
conditions.
Also,
the
program uses command
chaining
and
assumes
that
the
card
reader
is
in
the
"ready
automatic"
state
when
the
SIO
instruction
is
executed.
Label
RDCARD
STARno
TEsno
BZTEST
ERRCHK
10CD
EBCDIC
BINARY
Command
LI,O
510, 10
no,
10
CW,II
BCS,4
CW,II
BCS,4
BCR,O
DATA
DATA
BOUND
GEN
8,24
GEN
8,24
GEN
8~
24
GEN
8,24
RES
RES
22
Appendix
B
Argument
DA(IOCD)
3
3
BZTEST
TEsno
ERRCHK
ERROR
DONE
X
'40000000'
X'28FEOOOO'
8
X'OE', BA(EBCDIC)
X'24',80
X'OA', BA(BINARY)
X'04',
120
20
30
Comments
Load
general
register
0 with
the
doubleword address
of
the
I/o
con-
trol doubleword for
the
read
card
operation,
This
instruction
starts
the
card
reader
(device
3 on
lOP
0).
This
instruction
obtains
the
I/o
system and
card
reader
status response.
This
instruction
compares
the
status response in
register
11
with a
"busy"
test
constant.
This
instruction
causes a
branch
back
to
the
no
instruction
if
the
card
reader
is still
"busy".
This
instruction
compares
the
status response in
register
11
against
an
error
check
constant.
This
instruction
causes
a branch to a
routine
that
determines
the
cause
of
the
error(s).
This
instruction
causes
an
unconditional
branch
to
another
part
of
the
program,
where
the
card
images
are
processed.
This
assembler
directive
defines
the
"busy"
test
constant.
This assembler
directive
defines
the
error
check
constant.
This assembler
directive
establishes
a doubleword
boundary
for
data
to
follow.
These two
assembler
directives
define
the
first
I/o
command
double-
word for
the
card
reader
operation.
The command
specifies
EBCDIC
read,
normal
stacker,
stack
on error in
alternate
2,
store
card
image
in
area
EBCDIC, command
chain,
halt
on transmission
error,
and a
byte
count
of
80.
These two assembler
directives
define
the
second
I/O
command
double-
word for
the
card
read
operation.
The command doubl eword speci fies
binary
read,
normal
stacker,
stack
on
error
in
alternate
stacker
2,
store
card
image
in
area
BINARY,
halt
on transmission error, and a
byte
count
of
120.
This assembler
directive
reserves
20
word
locations
(80 bytes) for
the
EBCDIC
card
image.
This
assembler
directive
reserves 30 words (120 bytes) for
the
binary
card
image.
All manuals and user guides at all-guides.com

Related product manuals