Writing Svc Routines; Characteristics Of Svc Routines; Programming Conventions For Svc'routines - IBM System/360 System Programmer's Manual

Operating system
Hide thumbs Also See for System/360:
Table of Contents

Advertisement

WRITING SVC ROUTINES
Because your SVC routine will be a part cf the control
program,
you
must
follow
the
same
programming
conventions
used
in SVC routines
supplied with System/360 Operating System.
Four types of SVC routines are
su~plied
with
System/360
Operating
System,
and
the
programming
conventions
for
each type differ.
The
general characteristics of the four types are described in the following
text, and the programming conventions for all types are shown in tabular
form.
Characteristics of SVC Routines
All SVC routines operate in the supervisor state.
You
should
keep
the
following
characteristics
in
mind when deciding what type of SVC
routine to write:
• Location of the routine - Your SVC routine can
be
either
in
main
storage
at all times as part of the resident control program, or on
a direct-access device as part of the SVC library.
Type 1 and 2 SVC
routines are part of the resident control program, and types 3 and 4
are in the SVC library •
• Size of the routine - Types 1, 2, and 4 SVC routines are not limited
in size.
However, you nust divide a type 4 SVC
routine
into
load
modules
of
1024
bytes
or less.
The size of a type 3 SVC routine
must not exceed 1024 bytes.
• Design of the routine - Type
1
SVC routines must be
reenterable
or
serially reusable; all other types must be reenterable .
• Interruption
of
the
routine - When
your
SVC
routine
receives
control,
the
CPU
is masked for all maskable interruptions but the
machine check interruption.
All type
1
SVC routines must execute in
this masked state.
If you want
to
allow
interruptions
to
occur
during
the
execution
of
a
type 2, 3, or 4 SVC routine, you must
change the appropriate niasks.
If you expect that a type 2, 3, or
4
SVC
routine
will
run
for
an
extended
period
of
time,
it is
recommended that you
allow
interruptions
to
be
processed
where
possible.
Programming Conventions for SVC Routines
The
programming
conventions
for the four types of SVC routines are
summarized in Table 1.
Details about many of the conventions are in the
reference notes that follow the table.
The notes are referred to by the
numbers in the last column of the table.
If
a
reference
note
for
a
convention
does
not
pertain to all types of SVC routines, an asterisk
indicates the types to which the note refers.
32

Advertisement

Table of Contents
loading

Table of Contents