1 1.1 itohy | Writes Human68k DOS process error number to dos_errno. 2 1.1 itohy | Called on errors of DOS calls for processes. 3 1.1 itohy | 4 1.2 itohy | written by ITOH Yasufumi 5 1.1 itohy | public domain 6 1.1 itohy | 7 1.2 itohy | $NetBSD: dos_procerr.S,v 1.2 2011/02/21 02:31:59 itohy Exp $ 8 1.1 itohy 9 1.1 itohy #include "dos_asm.h" 10 1.1 itohy #include "dos_errno.h" 11 1.1 itohy 12 1.1 itohy ASENTRY_NOPROFILE(PRCERROR) 13 1.1 itohy movel %d0,%sp@- 14 1.1 itohy cmpil #0xffff0100,%d0 15 1.1 itohy jcs Lnoterrcode 16 1.1 itohy negl %d0 17 1.1 itohy Lwerr: 18 1.1 itohy movel %d0,_C_LABEL(dos_errno) 19 1.1 itohy movel %sp@+,%d0 20 1.1 itohy rts 21 1.1 itohy 22 1.1 itohy Lnoterrcode: 23 1.1 itohy swap %d0 24 1.1 itohy addqw #1,%d0 25 1.1 itohy jeq Lillid 26 1.1 itohy 27 1.1 itohy moveq #DOS_EBUFOVER,%d0 28 1.1 itohy jra Lwerr 29 1.1 itohy 30 1.1 itohy Lillid: 31 1.1 itohy moveq #DOS_ESRCH,%d0 32 1.1 itohy jra Lwerr 33