[comp.sources.atari.st] v02i077: gcclib2 -- Patches to GCC library part06/07

koreth%panarthea.ebay@sun.com (Steven Grimm) (08/20/89)

Submitted-by: uunet.UU.NET!unido!sbsvax!roeder (Edgar Roeder)
Posting-number: Volume 2, Issue 77
Archive-name: gcclib2/part06



#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 6 (of 7)."
# Contents:  include/osbind.h
# Wrapped by roeder@sbsvax on Wed Aug 16 22:03:04 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'include/osbind.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'include/osbind.h'\"
else
echo shar: Extracting \"'include/osbind.h'\" \(20404 characters\)
sed "s/^X//" >'include/osbind.h' <<'END_OF_FILE'
X#ifndef _OSBIND_H
X#define _OSBIND_H
X/*
X *	OSBIND.H	Mnemonic names for operating system calls
X *
X * Adapted from Dale Schumacher's version to Mark Johnson C by Eric Gisin.
X */
X
X/* (er)	11.8.89 changed macros to inline functions */
X/*	this is ABSOLUTELY necessary for Super(),  */
X/*	because the changed stack would be changed */
X/*	back by the unlk instruction               */
X
X#pragma once
X
X/* ..sb correction of the calls 19/11/88 */
X/* hacked by jrd for GNU */
X
X/*	
X *	GEMDOS	(trap1)
X */
X
Xstatic __inline volatile void
XPterm0(void)
X{
X	__asm("movew #0x00,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	/* we will never come back, so we don't have to correct the stack */
X}
X
Xstatic __inline long
XCconin(void)
X{
X	long	ret;
X
X	__asm("movew #0x00,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XCconout(short c)
X{
X	__asm("movew %0,sp@-" :: "g" (c));
X	__asm("movew #0x02,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X}
X
Xstatic __inline long
XCauxin(void)
X{
X	long	ret;
X
X	__asm("movew #0x03,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XCauxout(short c)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (c));
X	__asm("movew #0x04,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XCprnout(short c)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (c));
X	__asm("movew #0x05,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XCrawio(short data)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (data));
X	__asm("movew #0x06,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XCrawcin(void)
X{
X	long	ret;
X
X	__asm("movew #0x07,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XCnecin(void)
X{
X	long	ret;
X
X	__asm("movew #0x08,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XCconws(char *s)
X{
X	__asm("movel %0,sp@-" :: "g" (s));
X	__asm("movew #0x09,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X}
X
Xstatic __inline void
XCconrs(char *buf)
X{
X	__asm("movel %0,sp@-" :: "g" (buf));
X	__asm("movew #0x0A,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X}
X
Xstatic __inline short
XCconis(void)
X{
X	short	ret;
X
X	__asm("movew #0x0B,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline const void
XDsetdrv(short d)
X{
X	__asm("movew %0,sp@-" :: "g" (d));
X	__asm("movew #0x0E,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X}
X
Xstatic __inline short
XCconos(void)
X{
X	short	ret;
X
X	__asm("movew #0x10,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XCprnos(void)
X{
X	short	ret;
X
X	__asm("movew #0x11,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XCauxis(void)
X{
X	short	ret;
X
X	__asm("movew #0x12,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XCauxos(void)
X{
X	short	ret;
X
X	__asm("movew #0x13,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XDgetdrv(void)
X{
X	long	ret;
X
X	__asm("movew #0x19,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XFsetdta(void *dta)
X{
X	long	ret;
X
X	__asm("movel %0,sp@-" :: "g" (dta));
X	__asm("movew #0x1A,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
X/*
X * The next binding is not quite right if used in another than the usual ways:
X *	1. Super(1L) from either user or supervisor mode
X *	2. ret = Super(0L) from user mode and after this Super(ret) from
X *	   supervisor mode
X * We get the following situations (usp, ssp relative to the start of Super):
X *	Parameter	Userstack	Superstack	Calling Mode	ret
X *	   1L		   usp		   ssp		    user	 0L
X *	   1L		   usp		   ssp		 supervisor	-1L
X *	   0L		  usp-6		   usp		    user	ssp
X *	   0L		   ssp		  ssp-6		 supervisor   ssp-6
X *	  ptr		  usp-6		  ptr+6		    user	ssp
X *	  ptr		  usp+6		   ptr		 supervisor	 sr
X * The usual C-bindings are safe only because the "unlk a6" is compensating
X * the errors when you invoke this function. In this binding the "unlk a6" at
X * the end of the calling function compensates the error made in sequence 2
X * above (the usp is 6 to low after the first call which is not corrected by
X * the second call).
X */
Xstatic __inline long
XSuper(long ptr)
X{
X	long	ret;
X
X	__asm("movel %0,sp@-" :: "g" (ptr));
X	__asm("movew #0x20,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XTgetdate(void)
X{
X	long	ret;
X
X	__asm("movew #0x2A,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XTsetdate(long date)
X{
X	__asm("movel %0,sp@-" :: "g" (date));
X	__asm("movew #0x2B,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X}
X
Xstatic __inline long
XTgettime(void)
X{
X	long	ret;
X
X	__asm("movew #0x2C,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XTsettime(long time)
X{
X	__asm("movel %0,sp@-" :: "g" (time));
X	__asm("movew #0x2D,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X}
X
Xstatic __inline long
XFgetdta(void)
X{
X	long	ret;
X
X	__asm("movew #0x2F,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline const short
XSversion(void)
X{
X	short	ret;
X
X	__asm("movew #0x30,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline volatile void
XPtermres(long save, short rv)
X{
X	__asm("movew %0,sp@-" :: "g" (rv));
X	__asm("movel %0,sp@-" :: "g" (save));
X	__asm("movew #0x31,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	/* if we don't call Ptermres(save,-32) and ignore SIGINT, */
X	/* we can't come back */
X	__asm("addql #8,sp");
X}
X
Xstatic __inline long
XDfree(void *buf, short d)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (d));
X	__asm("movel %0,sp@-" :: "g" (buf));
X	__asm("movew #0x36,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #8,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XDcreate(char *path)
X{
X	short	ret;
X
X	__asm("movel %0,sp@-" :: "g" (path));
X	__asm("movew #0x39,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XDdelete(char *path)
X{
X	short	ret;
X
X	__asm("movel %0,sp@-" :: "g" (path));
X	__asm("movew #0x3A,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XDsetpath(char *path)
X{
X	short	ret;
X
X	__asm("movel %0,sp@-" :: "g" (path));
X	__asm("movew #0x3B,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFcreate(char *fn,short mode)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (mode));
X	__asm("movel %0,sp@-" :: "g" (fn));
X	__asm("movew #0x3C,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #8,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFopen(char *fn,short mode)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (mode));
X	__asm("movel %0,sp@-" :: "g" (fn));
X	__asm("movew #0x3D,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #8,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XFclose(short handle)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (handle));
X	__asm("movew #0x3E,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XFread(short handle,long cnt,char *buf)
X{
X	long	ret;
X
X	__asm("movel %0,sp@-" :: "g" (buf));
X	__asm("movel %0,sp@-" :: "g" (cnt));
X	__asm("movew %0,sp@-" :: "g" (handle));
X	__asm("movew #0x3F,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #12,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XFwrite(short handle,long cnt,char *buf)
X{
X	long	ret;
X
X	__asm("movel %0,sp@-" :: "g" (buf));
X	__asm("movel %0,sp@-" :: "g" (cnt));
X	__asm("movew %0,sp@-" :: "g" (handle));
X	__asm("movew #0x40,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #12,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFdelete(char *fn)
X{
X	short	ret;
X
X	__asm("movel %0,sp@-" :: "g" (fn));
X	__asm("movew #0x41,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XFseek(long where,short handle,short how)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (how));
X	__asm("movew %0,sp@-" :: "g" (handle));
X	__asm("movel %0,sp@-" :: "g" (where));
X	__asm("movew #0x42,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #10,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFattrib(char *fn,short rwflag,short attr)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (attr));
X	__asm("movew %0,sp@-" :: "g" (rwflag));
X	__asm("movel %0,sp@-" :: "g" (fn));
X	__asm("movew #0x43,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #10,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFdup(short handle)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (handle));
X	__asm("movew #0x45,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFforce(short Hstd,short Hnew)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (Hnew));
X	__asm("movew %0,sp@-" :: "g" (Hstd));
X	__asm("movew #0x46,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XDgetpath(char *buf,short d)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (d));
X	__asm("movel %0,sp@-" :: "g" (buf));
X	__asm("movew #0x47,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #8,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XMalloc(long size)
X{
X	long	ret;
X
X	__asm("movel %0,sp@-" :: "g" (size));
X	__asm("movew #0x48,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XMfree(void *ptr)
X{
X	__asm("movel %0,sp@-" :: "g" (ptr));
X	__asm("movew #0x49,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X}
X
Xstatic __inline short
XMshrink(void *ptr,long size)
X{
X	short	ret;
X
X	__asm("movel %0,sp@-" :: "g" (size));
X	__asm("movel %0,sp@-" :: "g" (ptr));
X	__asm("clrw sp@-");
X	__asm("movew #0x4A,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #12,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XPexec(short mode,char *prog,char *tail,char *env)
X{
X	long	ret;
X
X	__asm("movel %0,sp@-" :: "g" (env));
X	__asm("movel %0,sp@-" :: "g" (tail));
X	__asm("movel %0,sp@-" :: "g" (prog));
X	__asm("movew %0,sp@-" :: "g" (mode));
X	__asm("movew #0x4B,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #16,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline /* volatile */ void
XPterm(short rv)
X{
X	__asm("movew %0,sp@-" :: "g" (rv));
X	__asm("movew #0x4C,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	/* if we don't call Pterm(-32) and ignore SIGINT, we can't come back */
X	__asm("addql #4,sp");
X}
X
Xstatic __inline short
XFsfirst(char *filespec,short attr)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (attr));
X	__asm("movel %0,sp@-" :: "g" (filespec));
X	__asm("movew #0x4E,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #8,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFsnext(void)
X{
X	short	ret;
X
X	__asm("movew #0x4F,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XFrename(char *old,char *new)
X{
X	short	ret;
X
X	__asm("movel %0,sp@-" :: "g" (new));
X	__asm("movel %0,sp@-" :: "g" (old));
X	__asm("clrw sp@-");
X	__asm("movew #0x56,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #12,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XFdatime(long *timeptr,short handle,short rwflag)
X{
X	__asm("movew %0,sp@-" :: "g" (rwflag));
X	__asm("movew %0,sp@-" :: "g" (handle));
X	__asm("movel %0,sp@-" :: "g" (timeptr));
X	__asm("movew #0x57,sp@-");
X	__asm("trap #1" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #10,sp");
X}
X
X
X/* codes for Pexec */
X
X#define	PE_LOADGO		0		/* load & go */
X#define	PE_LOAD			1		/* just load */
X#define	PE_CBASEPAGE		2		/* just create basepage */
X#define	PE_GO			3		/* just go */
X
X/* zzz do the rest later */
X
X/*
X *	BIOS	(trap13)
X */
X
Xstatic __inline void
XGetmpb(void *mpb)
X{
X	__asm("movew #0,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X}
X
Xstatic __inline short
XBconstat(short DEV)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (DEV));
X	__asm("movew #1,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline short
XBconin(short DEV)
X{
X	short	ret;
X
X	__asm("movew %0,sp@-" :: "g" (DEV));
X	__asm("movew #2,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movew d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void
XBconout(short DEV,short c)
X{
X	__asm("movew %0,sp@-" :: "g" (c));
X	__asm("movew %0,sp@-" :: "g" (DEV));
X	__asm("movew #3,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #6,sp");
X}
X
Xstatic __inline long
XRwabs(short rwflag,void *buf,short n,short sector,short d)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (d));
X	__asm("movew %0,sp@-" :: "g" (sector));
X	__asm("movew %0,sp@-" :: "g" (n));
X	__asm("movel %0,sp@-" :: "g" (buf));
X	__asm("movew %0,sp@-" :: "g" (rwflag));
X	__asm("movew #4,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addw #14,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void *
XSetexc(short vnum,void *vptr)
X{
X	void	*ret;
X
X	__asm("movel %0,sp@-" :: "g" (vptr));
X	__asm("movew %0,sp@-" :: "g" (vnum));
X	__asm("movew #5,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #8,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XTickcal()
X{
X	long	ret;
X
X	__asm("movew #6,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline void *
XGetbpb(short d)
X{
X	void	*ret;
X
X	__asm("movew %0,sp@-" :: "g" (d));
X	__asm("movew #7,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XBcostat(short DEV)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (DEV));
X	__asm("movew #8,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XMediach(short d)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (d));
X	__asm("movew #9,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XDrvmap(void)
X{
X	long	ret;
X
X	__asm("movew #10,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #2,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
Xstatic __inline long
XKbshift(short mode)
X{
X	long	ret;
X
X	__asm("movew %0,sp@-" :: "g" (mode));
X	__asm("movew #11,sp@-");
X	__asm("trap #13" ::: "d0", "d1", "d2", "a0", "a1", "a2");
X	__asm("addql #4,sp");
X	__asm volatile ("movel d0,%0" : "=g" (ret));
X	return(ret);
X}
X
X#define Getshift()	Kbshift(-1)
X
X/*
X *	XBIOS	(trap14)
X */
X#define	Initmous(type,param,vptr)	trap_14_wwll(0,type,param,vptr)
X#define	Physbase()			trap_14_www(2)
X#define	Logbase()			trap_14_www(3)
X#define	Getrez()			(int)trap_14_www(4)
X#define	Setscreen(lscrn,pscrn,rez)	trap_14_wllw(5,lscrn,pscrn,rez)
X#define	Setpallete(palptr)		trap_14_wllw(6,palptr)
X#define	Setcolor(colornum,mixture)	trap_14_wwll(7,colornum,mixture)
X#define	Floprd(buf,x,d,sect,trk,side,n)	trap_14_wllwwwwwlw(8,buf,x,d,sect,trk,side,n)
X#define	Flopwr(buf,x,d,sect,trk,side,n)	trap_14_wllwwwwwlw(9,buf,x,d,sect,trk,side,n)
X#define	Flopfmt(b,x,d,spt,trk,sd,i,m,v)	trap_14_wllwwwwwlw(10,b,x,d,spt,trk,sd,i,m,v)
X#define	Midiws(cnt,ptr)			trap_14_wwll(12,cnt,ptr)
X#define	Mfpint(vnum,vptr)		trap_14_wwll(13,vnum,vptr)
X#define	Iorec(ioDEV)			trap_14_wwll(14,ioDEV)
X#define	Rsconf(baud,flow,uc,rs,ts,sc)	trap_14_wwwwwww(15,baud,flow,uc,rs,ts,sc)
X#define	Keytbl(nrml,shft,caps)		trap_14_wlll(16,nrml,shft,caps)
X#define	Random()			trap_14_www(17)
X#define	Protobt(buf,serial,dsktyp,exec)	trap_14_wllwwwwwlw(18,buf,serial,dsktyp,exec)
X#define	Flopver(buf,x,d,sect,trk,sd,n)	trap_14_wllwwwwwlw(19,buf,x,d,sect,trk,sd,n)
X#define	Scrdmp()			trap_14_www(20)
X#define	Cursconf(func,rate)		trap_14_www(21,func,rate)
X#define	Settime(time)			trap_14_wllw(22,time)
X#define	Gettime()			trap_14_www(23)
X#define	Bioskeys()			trap_14_www(24)
X#define	Ikbdws(len_minus1,ptr)		trap_14_wwll(25,len_minus1,ptr)
X#define	Jdisint(vnum)			trap_14_www(26,vnum)
X#define	Jenabint(vnum)			trap_14_www(27,vnum)
X#define	Giaccess(data,reg)		trap_14_www(28,data,reg)
X#define	Offgibit(ormask)		trap_14_www(29,ormask)
X#define	Ongibit(andmask)		trap_14_www(30,andmask)
X#define	Xbtimer(timer,ctrl,data,vnum)	trap_14_wwwwl(31,timer,ctrl,data,vnum)
X#define	Dosound(ptr)			trap_14_wllw(32,ptr)
X#define	Setprt(config)			trap_14_www(33,config)
X#define	Kbdvbase()			trap_14_www(34)
X#define	Kbrate(delay,reprate)		trap_14_www(35,delay,reprate)
X#define	Prtblk(pblkptr)			trap_14_wllw(36,pblkptr)
X#define	Vsync()				trap_14_www(37)
X#define	Supexec(funcptr)		trap_14_wllw(38,funcptr)
X#define Blitmode(flag)			trap_14_www(64,flag)
X#endif /* _OSBIND_H */
END_OF_FILE
if test 20404 -ne `wc -c <'include/osbind.h'`; then
    echo shar: \"'include/osbind.h'\" unpacked with wrong size!
fi
# end of 'include/osbind.h'
fi
echo shar: End of archive 6 \(of 7\).
cp /dev/null ark6isdone
MISSING=""
for I in 1 2 3 4 5 6 7 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 7 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0