/*
 *  smoke16/include/syscall.h - Useful mnemonics for Mirrors system calls.
 *  $Revision: 1.13 $
 *  Copyright 1997, 2000, Benjamin Sittler
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#ifndef SMOKE16__SYSCALL_H_INCLUDED
#define SMOKE16__SYSCALL_H_INCLUDED

/*
 * System calls marked with HACK are likely to disappear in future
 * versions of the emulator -- their use is discouraged
 */

/* _exit(a0) */
#define SMOKE16_SYS__EXIT	0x40

/* HACK: a0 = (a0 ? brk(a0) : sbrk(0)), a1 is inout errno */
#define SMOKE16__SYS_BRK	0x41

/* HACK: dump processor state to emulator's stderr */
#define SMOKE16__SYS_REGDUMP	0x42

/* HACK: perror(a0), a1 is in errno, a0 is out errno */
#define SMOKE16__SYS_PERROR	0x43

/* a0 = raise(a0), a1 is inout errno */
#define SMOKE16_SYS_RAISE	0x44

/* a0 = open(a0, a1, a2), a3 is inout errno */
#define SMOKE16_SYS_OPEN	0x45

/* a0 = close(a0), a1 is inout errno */
#define SMOKE16_SYS_CLOSE	0x46

/* a0 = read(a0, a1, a2), a3 is inout errno */
#define SMOKE16_SYS_READ	0x47

/* a0 = write(a0, a1, a2), a3 is inout errno */
#define SMOKE16_SYS_WRITE	0x48

#endif /* SMOKE16__SYSCALL_H_INCLUDED */
