xref: /csrg-svn/usr.bin/pascal/pdx/vax/cerror.s (revision 62168)
162167Sbostic# Copyright (c) 1982, 1993
262167Sbostic#	The Regents of the University of California.  All rights reserved.
35561Slinton#
448067Sbostic# %sccs.include.redist.sh%
58021Slinton#
6*62168Sbostic#	@(#)cerror.s	8.1 (Berkeley) 06/06/93
722758Smckusick#
848067Sbostic
95561Slinton# modified version of cerror
105561Slinton#
115561Slinton# The idea is that every time an error occurs in a system call
125561Slinton# I want a special function "syserr" called.  This function will
135561Slinton# either print a message and exit or do nothing depending on
145561Slinton# defaults and use of "onsyserr".
155561Slinton#
165561Slinton
175561Slinton.globl	cerror
185561Slinton.comm	_errno,4
195561Slinton
205561Slintoncerror:
215561Slinton	movl	r0,_errno
225561Slinton	calls	$0,_syserr	# new code
235561Slinton	mnegl	$1,r0
245561Slinton	ret
255561Slinton
265561Slinton.globl	__mycerror		# clumsy way to get this loaded
275561Slinton
285561Slinton__mycerror:
295561Slinton	.word	0
305561Slinton	ret
31