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