15561Slinton# 2*22758Smckusick# Copyright (c) 1982 Regents of the University of California. 3*22758Smckusick# All rights reserved. The Berkeley software License Agreement 4*22758Smckusick# specifies the terms and conditions for redistribution. 58021Slinton# 6*22758Smckusick# @(#)cerror.s 5.1 (Berkeley) 06/07/85 7*22758Smckusick# 85561Slinton# modified version of cerror 95561Slinton# 105561Slinton# The idea is that every time an error occurs in a system call 115561Slinton# I want a special function "syserr" called. This function will 125561Slinton# either print a message and exit or do nothing depending on 135561Slinton# defaults and use of "onsyserr". 145561Slinton# 155561Slinton 165561Slinton.globl cerror 175561Slinton.comm _errno,4 185561Slinton 195561Slintoncerror: 205561Slinton movl r0,_errno 215561Slinton calls $0,_syserr # new code 225561Slinton mnegl $1,r0 235561Slinton ret 245561Slinton 255561Slinton.globl __mycerror # clumsy way to get this loaded 265561Slinton 275561Slinton__mycerror: 285561Slinton .word 0 295561Slinton ret 30