xref: /netbsd-src/sys/arch/x68k/stand/libdos/dos_cerror.S (revision ed461fc193a34ff07bc68b0c28567cb8cfe199e5)
1|	Writes Human68k DOS error number to  dos_errno.
2|	Called on errors of DOS calls.
3|
4|	written by ITOH Yasufumi
5|	public domain
6|
7|	$NetBSD: dos_cerror.S,v 1.2 2011/02/21 02:31:59 itohy Exp $
8
9#include "dos_asm.h"
10#include "dos_errno.h"
11
12ASENTRY_NOPROFILE(CERROR)
13	movel	%d0,%sp@-
14	negl	%d0
15	cmpil	#_DOS_EEXIST,%d0
16	bnes	Lno_eexisists
17	moveq	#DOS_EEXIST,%d0
18Lno_eexisists:
19	movel	%d0,_C_LABEL(dos_errno)
20	movel	%sp@+,%d0
21	rts
22