<s>
STXIT	B-Application
is	O
a	O
macro	O
instruction	O
for	O
the	O
DOS/360	O
operating	B-General_Concept
system	I-General_Concept
for	O
the	O
IBM	B-Application
System/360	I-Application
series	O
of	O
mainframe	B-Architecture
computers	I-Architecture
,	O
and	O
its	B-Application
successors	I-Application
on	O
later	O
mainframe	B-Architecture
series	O
,	O
and	O
was	O
also	O
available	O
for	O
the	O
UNIVAC	B-Device
Series	I-Device
90	I-Device
mainframes	B-Architecture
running	O
its	O
TOS/DOS	O
operating	B-General_Concept
system	I-General_Concept
and	O
later	O
on	O
its	O
VS/9	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
The	O
macro	O
was	O
an	O
abbreviation	O
of	O
the	O
term	O
"	O
Set	O
Exit	O
,	O
"	O
and	O
was	O
used	O
by	O
programs	O
written	O
in	O
assembly	B-Language
language	I-Language
.	O
</s>
<s>
It	O
is	O
used	O
to	O
create	O
a	O
recovery	O
routine	O
in	O
the	O
event	O
of	O
program	O
errors	O
,	O
similar	O
to	O
signal	B-Operating_System
handlers	I-Operating_System
in	O
C	O
and	O
Try/Finally	O
blocks	O
in	O
C++	B-Language
,	O
Java	B-Language
and	O
other	O
object	O
oriented	O
languages	O
.	O
</s>
<s>
The	O
STXIT	B-Application
macro	O
would	O
provide	O
an	O
error	O
recovery	O
address	O
for	O
several	O
major	O
types	O
of	O
errors	O
and	O
certain	O
operator	O
signals	O
.	O
</s>
<s>
The	O
errors	O
covered	O
depended	O
upon	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
Interrupt	B-Application
resume	O
,	O
a	O
function	O
on	O
the	O
UNIVAC	B-Device
Series	I-Device
90	I-Device
where	O
an	O
interactive	B-General_Concept
user	O
has	O
issued	O
a	O
break	O
to	O
a	O
program	O
to	O
go	O
to	O
command	O
mode	O
,	O
and	O
issued	O
an	O
INTR	O
command	O
to	O
cause	O
the	O
program	O
to	O
resume	O
at	O
the	O
INTR	O
point	O
.	O
</s>
<s>
This	O
is	O
similar	O
to	O
the	O
REENTER	O
command	O
on	O
the	O
RT-11	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
on	O
Digital	O
computers	O
.	O
</s>
<s>
The	O
timer	O
interrupt	B-Application
STXIT	B-Application
provided	O
a	O
mechanism	O
for	O
sampling	O
program	O
execution	O
and	O
was	O
used	O
by	O
various	O
legacy	O
performance	O
analyzers	O
.	O
</s>
<s>
The	O
program	O
check	O
STXIT	B-Application
provided	O
a	O
mechanism	O
for	O
program	O
animation	O
via	O
the	O
deliberate	O
introduction	O
of	O
invalid	O
opcodes	O
(	O
on	O
the	O
fly	O
)	O
to	O
locations	O
in	O
the	O
target	O
programs	O
.	O
</s>
<s>
For	O
DOS/VSE	O
it	O
was	O
one	O
of	O
two	O
forms	O
,	O
either	O
the	O
macro	O
call	O
to	O
establish	O
(	O
create	O
)	O
a	O
STXIT	B-Application
routine	O
to	O
handle	O
the	O
appropriate	O
event	O
,	O
or	O
a	O
macro	O
call	O
to	O
de-establish	O
(	O
no	O
longer	O
handle	O
)	O
the	O
event	O
.	O
</s>
<s>
To	O
establish	O
a	O
STXIT	B-Application
routine	O
,	O
you	O
would	O
code	O
:	O
</s>
<s>
These	O
indicated	O
which	O
event	O
you	O
were	O
handling	O
for	O
that	O
particular	O
STXIT	B-Application
call	O
.	O
</s>
<s>
Except	O
for	O
the	O
AB	O
handler	O
,	O
a	O
STXIT	B-Application
handler	O
routine	O
completed	O
through	O
use	O
of	O
the	O
EXIT	O
macro	O
.	O
</s>
<s>
This	O
determines	O
whether	O
a	O
program	O
dump	O
is	O
issued	O
once	O
the	O
STXIT	B-Application
routine	O
completes	O
.	O
</s>
<s>
If	O
an	O
abnormal	O
task	O
termination	O
occurs	O
without	O
a	O
STXIT	B-Application
routine	O
to	O
handle	O
it	O
,	O
the	O
program	O
is	O
terminated	O
with	O
an	O
error	O
.	O
</s>
<s>
is	O
also	O
used	O
if	O
there	O
is	O
a	O
Program	O
Check	O
event	O
during	O
any	O
other	O
STXIT	B-Application
routine	O
.	O
</s>
<s>
An	O
Interval	O
Timer	O
event	O
is	O
ignored	O
if	O
no	O
STXIT	B-Application
routine	O
exists	O
to	O
handle	O
it	O
.	O
</s>
<s>
The	O
STXIT	B-Application
routine	O
can	O
provide	O
a	O
clean	O
recovery	O
of	O
the	O
program	O
in	O
such	O
cases	O
.	O
</s>
<s>
If	O
a	O
Program	O
Check	O
event	O
occurs	O
during	O
a	O
STXIT	B-Application
routine	O
(	O
other	O
than	O
AB	O
)	O
,	O
the	O
AB	O
routine	O
is	O
invoked	O
.	O
</s>
<s>
Return	O
from	O
the	O
PC	O
routine	O
is	O
to	O
the	O
next	O
instruction	O
after	O
the	O
failing	O
one	O
,	O
unless	O
the	O
STXIT	B-Application
routine	O
terminates	O
the	O
program	O
.	O
</s>
<s>
This	O
is	O
ignored	O
if	O
no	O
STXIT	B-Application
routine	O
exists	O
to	O
handle	O
it	O
.	O
</s>
<s>
If	O
a	O
task	O
timer	O
event	O
occurs	O
and	O
no	O
STXIT	B-Application
routine	O
exists	O
to	O
handle	O
it	O
,	O
the	O
timer	O
is	O
ignored	O
.	O
</s>
<s>
Each	O
STXIT	B-Application
routine	O
must	O
have	O
its	O
own	O
save	O
area	O
,	O
as	O
it	O
is	O
possible	O
for	O
one	O
STXIT	B-Application
routine	O
to	O
be	O
interrupted	O
by	O
another	O
,	O
for	O
example	O
,	O
the	O
interval	O
timer	O
might	O
fire	O
while	O
handling	O
a	O
task	O
timer	O
.	O
</s>
<s>
When	O
a	O
STXIT	B-Application
routine	O
completes	O
,	O
it	O
returns	O
to	O
the	O
point	O
where	O
it	O
was	O
invoked	O
via	O
the	O
EXIT	O
macro	O
to	O
return	O
to	O
the	O
appropriate	O
point	O
where	O
called	O
,	O
unless	O
it	O
is	O
an	O
AB	O
routine	O
,	O
in	O
which	O
case	O
it	O
is	O
not	O
permitted	O
to	O
return	O
and	O
must	O
issue	O
a	O
termination	O
macro	O
(	O
EOJ	O
,	O
CANCEL	O
,	O
DETACH	O
or	O
DUMP	O
)	O
.	O
</s>
<s>
To	O
de-establish	O
,	O
or	O
cancel	O
a	O
STXIT	B-Application
routine	O
,	O
you	O
would	O
code	O
:	O
</s>
<s>
For	O
z/System	O
VSE	O
,	O
all	O
STXIT	B-Application
functions	O
provided	O
previously	O
by	O
IBM	O
DOS/VSE	O
are	O
still	O
supported	O
.	O
</s>
<s>
In	O
addition	O
,	O
a	O
new	O
STXIT	B-Application
macro	O
function	O
'	O
Disabled	O
Timer	O
Appendage	O
(	O
DIE	O
)	O
'	O
is	O
available	O
,	O
but	O
only	O
for	O
use	O
in	O
Supervisor	O
Mode	O
(	O
Key	O
0	O
,	O
PSW	O
privilege	O
bit	O
=	O
1	O
)	O
.	O
</s>
<s>
The	O
abend	O
handler	O
is	O
also	O
called	O
if	O
a	O
progcheck	O
occurs	O
in	O
the	O
progcheck	O
STXIT	B-Application
routine	O
;	O
a	O
progcheck	O
during	O
an	O
abend	O
routine	O
terminates	O
the	O
program	O
immediately	O
with	O
an	O
EO79	O
error	O
,	O
allowing	O
the	O
user	O
to	O
request	O
a	O
PDUMP	O
if	O
desired	O
,	O
unless	O
a	O
shutdown	O
is	O
in	O
progress	O
in	O
which	O
case	O
the	O
EO79	O
error	O
is	O
displayed	O
,	O
and	O
the	O
program	O
is	O
cancelled	O
without	O
allowing	O
the	O
user	O
to	O
request	O
a	O
PDUMP	O
,	O
and	O
the	O
user	O
is	O
automatically	O
logged	O
off	O
.	O
</s>
<s>
A	O
progcheck	O
occurring	O
in	O
any	O
STXIT	B-Application
routine	O
except	O
progcheck	O
and	O
abend	O
is	O
passed	O
here	O
;	O
a	O
program	O
check	O
during	O
the	O
program	O
check	O
handler	O
causes	O
the	O
abend	O
routine	O
to	O
be	O
invoked	O
.	O
</s>
<s>
If	O
no	O
INTR	O
routine	O
exists	O
,	O
an	O
INTR	O
command	O
by	O
the	O
user	O
is	O
rejected	O
but	O
the	O
user	O
may	O
issue	O
the	O
R	O
command	O
to	O
resume	O
at	O
the	O
point	O
of	O
interrupt	B-Application
.	O
</s>
<s>
setic	O
is	O
the	O
label	O
of	O
an	O
optional	O
routine	O
used	O
if	O
the	O
program	O
issued	O
the	O
SETIC	O
macro	O
to	O
create	O
an	O
Interrupt	B-Application
Condition	O
timer	O
.	O
</s>
<s>
Return	O
is	O
to	O
the	O
instruction	O
after	O
the	O
interrupt	B-Application
occurs	O
unless	O
this	O
routine	O
specifies	O
a	O
new	O
address	O
.	O
</s>
<s>
As	O
the	O
STXIT	B-Application
macro	O
on	O
VS/9	O
was	O
parameter	O
based	O
,	O
missing	O
entries	O
had	O
to	O
be	O
entered	O
with	O
commas	O
,	O
e.g.	O
</s>
<s>
To	O
remove	O
one	O
or	O
more	O
handlers	O
,	O
the	O
STXIT	B-Application
macro	O
is	O
re-invoked	O
with	O
a	O
blank	O
entry	O
for	O
the	O
handlers	O
to	O
be	O
removed	O
.	O
</s>
<s>
Only	O
one	O
STXIT	B-Application
macro	O
call	O
can	O
be	O
in	O
effect	O
at	O
any	O
time	O
.	O
</s>
<s>
An	O
unhandled	O
class	O
of	O
event	O
causes	O
that	O
error	O
to	O
be	O
handled	O
by	O
the	O
operating	B-General_Concept
system	I-General_Concept
's	O
"	O
default	O
"	O
handler	O
.	O
</s>
<s>
Later	O
error	O
recovery	O
systems	O
would	O
provide	O
for	O
specifying	O
errors	O
explicitly	O
as	O
opposed	O
to	O
by	O
the	O
position	O
of	O
the	O
parameter	O
on	O
the	O
STXIT	B-Application
macro	O
.	O
</s>
<s>
Univac	O
's	O
VS/9	O
continued	O
to	O
support	O
STXIT	B-Application
but	O
also	O
added	O
the	O
CRTN	O
(	O
"	O
Contingency	O
Routine	O
"	O
)	O
macro	O
to	O
provide	O
even	O
more	O
powerful	O
error	O
recovery	O
,	O
as	O
well	O
as	O
recovery	O
of	O
some	O
errors	O
which	O
STXIT	B-Application
did	O
not	O
capture	O
.	O
</s>
<s>
Originally	O
,	O
CRTN	O
and	O
STXIT	B-Application
could	O
not	O
be	O
used	O
together	O
.	O
</s>
<s>
Later	O
releases	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
provided	O
for	O
both	O
;	O
if	O
a	O
CRTN	O
and	O
a	O
STXIT	B-Application
macro	O
were	O
both	O
used	O
,	O
the	O
CRTN	O
handled	O
any	O
events	O
not	O
covered	O
by	O
STXIT	B-Application
;	O
if	O
both	O
were	O
used	O
to	O
cover	O
an	O
event	O
,	O
the	O
STXIT	B-Application
routine	O
handled	O
the	O
event	O
and	O
the	O
CRTN	O
routine	O
was	O
not	O
invoked	O
.	O
</s>
