1# 2# modified version of cerror 3# 4# The idea is that every time an error occurs in a system call 5# I want a special function "syserr" called. This function will 6# either print a message and exit or do nothing depending on 7# defaults and use of "onsyserr". 8# 9 10.globl cerror 11.comm _errno,4 12 13cerror: 14 movl r0,_errno 15 calls $0,_syserr # new code 16 mnegl $1,r0 17 ret 18 19.globl __mycerror # clumsy way to get this loaded 20 21__mycerror: 22 .word 0 23 ret 24