Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / mac68k / include / pio.h
blobb163fdac94894c765541b5931231be29ff4cabce
1 /* $NetBSD: pio.h,v 1.3 1994/10/26 08:46:38 cgd Exp $ */
3 /*
4 * Mach Operating System
5 * Copyright (c) 1990 Carnegie-Mellon University
6 * All rights reserved. The CMU software License Agreement specifies
7 * the terms and conditions for use and redistribution.
8 */
10 #define inl(y) \
11 ({ unsigned long _tmp__; \
12 __asm volatile("inl %1, %0" : "=a" (_tmp__) : "d" ((unsigned short)(y))); \
13 _tmp__; })
15 #define inw(y) \
16 ({ unsigned short _tmp__; \
17 __asm volatile(".byte 0x66; inl %1, %0" : "=a" (_tmp__) : "d" ((unsigned short)(y))); \
18 _tmp__; })
20 #define inb(y) \
21 ({ unsigned char _tmp__; \
22 __asm volatile("inb %1, %0" : "=a" (_tmp__) : "d" ((unsigned short)(y))); \
23 _tmp__; })
26 #define outl(x, y) \
27 { __asm volatile("outl %0, %1" : : "a" (y) , "d" ((unsigned short)(x))); }
30 #define outw(x, y) \
31 {__asm volatile(".byte 0x66; outl %0, %1" : : "a" ((unsigned short)(y)) , "d" ((unsigned short)(x))); }
34 #define outb(x, y) \
35 { __asm volatile("outb %0, %1" : : "a" ((unsigned char)(y)) , "d" ((unsigned short)(x))); }