xref: /csrg-svn/usr.bin/pascal/pdx/vax/cerror.s (revision 62168)
1# Copyright (c) 1982, 1993
2#	The Regents of the University of California.  All rights reserved.
3#
4# %sccs.include.redist.sh%
5#
6#	@(#)cerror.s	8.1 (Berkeley) 06/06/93
7#
8
9# modified version of cerror
10#
11# The idea is that every time an error occurs in a system call
12# I want a special function "syserr" called.  This function will
13# either print a message and exit or do nothing depending on
14# defaults and use of "onsyserr".
15#
16
17.globl	cerror
18.comm	_errno,4
19
20cerror:
21	movl	r0,_errno
22	calls	$0,_syserr	# new code
23	mnegl	$1,r0
24	ret
25
26.globl	__mycerror		# clumsy way to get this loaded
27
28__mycerror:
29	.word	0
30	ret
31