74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/programs/Xserver/hw/xfree86/common/scoasm.h,v 3.0 1996/10/03 08:34:06 dawes Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * scoasm.h - used to define inline versions of certain functions which
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * do NOT appear in sys/inline.h.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifdef SCO325
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _SCOASM_HDR_INC
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _SCOASM_HDR_INC
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncasm void outl(port,val)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync{
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port,val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port; mem val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port; reg val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port,val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncasm void outw(port,val)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync{
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port,val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync data16
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port; mem val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw val, %ax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync data16
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port; reg val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync data16
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port,val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw val, %ax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync data16
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncasm void outb(port,val)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync{
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port,val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outb (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port; mem val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movb val, %al
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outb (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port; reg val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl val, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outb (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port,val;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movb val, %al
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync outb (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncasm int inl(port)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync{
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync inl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync inl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncasm int inw(port)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync{
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync subl %eax, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync data16
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync inl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync subl %eax, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync data16
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync inl (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncasm int inb(port)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync{
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%reg port;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync subl %eax, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movl port, %edx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync inb (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync%mem port;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync subl %eax, %eax
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync movw port, %dx
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync inb (%dx)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync}
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _SCOASM_HDR_INC */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* SCO325 */