/* vim: set filetype=c:
 *
 * functions.h86  -  DOS system call function numbers
 *
 * Copyright (C) 2003-2007 Gero Kuhlmann <gero@gkminix.han.de>
 *
 *  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
 *  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.
 *
 * $Id: functions.h86,v 1.5 2007/01/06 18:30:53 gkminix Exp $
 */

#ifndef DOS_FUNCTIONS_H86
#define DOS_FUNCTIONS_H86


/*
 * This file can only get included into target C or assembler source files.
 */
#define GCC_INCLUDE
#include <compiler.h>



/*
 * DOS function codes
 */
#define DOS_FN_TERMINATE	0x00
#define DOS_FN_READ_STDIN	0x01
#define DOS_FN_WRITE_STDOUT	0x02
#define DOS_FN_READ_STDAUX	0x03
#define DOS_FN_WRITE_STDAUX	0x04
#define DOS_FN_WRITE_PRINTER	0x05
#define DOS_FN_DIRECT_IO	0x06
#define DOS_FN_DIRECT_READ	0x07
#define DOS_FN_NOECHO_INPUT	0x08
#define DOS_FN_WRITE_STRING	0x09
#define DOS_FN_READ_STRING	0x0A
#define DOS_FN_STDIN_STATUS	0x0B
#define DOS_FN_FLUSH_STDIN	0x0C
#define DOS_FN_DISK_RESET	0x0D
#define DOS_FN_SELECT_DRIVE	0x0E
#define DOS_FN_FCB_OPEN		0x0F
#define DOS_FN_FCB_CLOSE	0x10
#define DOS_FN_FCB_FIND_FIRST	0x11
#define DOS_FN_FCB_FIND_NEXT	0x12
#define DOS_FN_FCB_DELETE	0x13
#define DOS_FN_FCB_READ		0x14
#define DOS_FN_FCB_WRITE	0x15
#define DOS_FN_FCB_CREATE	0x16
#define DOS_FN_FCB_RENAME	0x17
#define DOS_FN_GET_DRIVE	0x19
#define DOS_FN_SET_DTA		0x1A
#define DOS_FN_GET_ALLOC_INFO	0x1B
#define DOS_FN_GET_ALLOC_DRIVE	0x1C
#define DOS_FN_GET_DEF_DPB	0x1F
#define DOS_FN_FCB_READ_RANDOM	0x21
#define DOS_FN_FCB_WRITE_RANDOM	0x22
#define DOS_FN_FCB_FILE_SIZE	0x23
#define DOS_FN_FCB_SET_RECORD	0x24
#define DOS_FN_SET_INTERRUPT	0x25
#define DOS_FN_CREATE_PSP	0x26
#define DOS_FN_FCB_READ_BLOCK	0x27
#define DOS_FN_FCB_WRITE_BLOCK	0x28
#define DOS_FN_PARSE_FILENAME	0x29
#define DOS_FN_GET_DATE		0x2A
#define DOS_FN_SET_DATE		0x2B
#define DOS_FN_GET_TIME		0x2C
#define DOS_FN_SET_TIME		0x2D
#define DOS_FN_GET_DTA		0x2F
#define DOS_FN_GET_VERSION	0x30
#define DOS_FN_TERM_STAY	0x31
#define DOS_FN_GET_DRIVE_DPB	0x32
#define DOS_FN_BREAK		0x33
#define DOS_FN_GET_INDOS_ADDR	0x34
#define DOS_FN_GET_INTERRUPT	0x35
#define DOS_FN_GET_FREE_DISK	0x36
#define DOS_FN_SWITCH_CHAR	0x37
#define DOS_FN_COUNTRY_INFO	0x38
#define DOS_FN_DIR_MAKE		0x39
#define DOS_FN_DIR_DELETE	0x3A
#define DOS_FN_DIR_CHANGE	0x3B
#define DOS_FN_FILE_CREATE	0x3C
#define DOS_FN_FILE_OPEN	0x3D
#define DOS_FN_FILE_CLOSE	0x3E
#define DOS_FN_FILE_READ	0x3F
#define DOS_FN_FILE_WRITE	0x40
#define DOS_FN_FILE_DELETE	0x41
#define DOS_FN_FILE_SEEK	0x42
#define DOS_FN_FILE_ATTR	0x43
#define DOS_FN_FILE_IOCTL	0x44
#define DOS_FN_FILE_DUP		0x45
#define DOS_FN_FILE_FORCEDUP	0x46
#define DOS_FN_GET_CWD		0x47
#define DOS_FN_MEM_ALLOC	0x48
#define DOS_FN_MEM_FREE		0x49
#define DOS_FN_MEM_RESIZE	0x4A
#define DOS_FN_EXECUTE		0x4B
#define DOS_FN_EXIT		0x4C
#define DOS_FN_GET_EXIT_CODE	0x4D
#define DOS_FN_FILE_FIND_FIRST	0x4E
#define DOS_FN_FILE_FIND_NEXT	0x4F
#define DOS_FN_SET_PSP_ADDR	0x50
#define DOS_FN_GET_PSP_ADDR	0x51
#define DOS_FN_GET_SYSVARS	0x52
#define DOS_FN_BPB_TO_DPB	0x53
#define DOS_FN_GET_VERIFY	0x54
#define DOS_FN_CREATE_CHILD_PSP	0x55
#define DOS_FN_FILE_RENAME	0x56
#define DOS_FN_FILE_TIME	0x57
#define DOS_FN_MEM_STRATEGY	0x58
#define DOS_FN_GET_ERROR_INFO	0x59
#define DOS_FN_TEMP_CREATE	0x5A
#define DOS_FN_FILE_NEW		0x5B
#define DOS_FN_FILE_LOCK	0x5C
#define DOS_FN_FILE_TRUENAME	0x60
#define DOS_FN_FILE_FLUSH	0x68
#define DOS_FN_FILE_COMMIT	0x6A
#define DOS_FN_LONG_FILENAME	0x71
#define DOS_FN_FILE_FAT32	0x73


#define DOS_FN_WORD(f)	((f) * 256)


#endif

