1
/* $Header: d:/cvsroot/tads/TADS2/H_IX86.H,v 1.2 1999/05/17 02:52:12 MJRoberts Exp $ */
4
* Copyright (c) 1998, 2002 Michael J. Roberts. All Rights Reserved.
6
* Please see the accompanying license file, LICENSE.TXT, for information
7
* on using and copying this software.
11
h_ix86.h - hardware definitions for Intel x86.
13
These definitions are for 16-bit and 32-bit Intel CPUs. Note that these
14
probably will NOT work on 64-bit Intel hardware, because we assume that
15
the largest type is 32 bits.
19
10/17/98 MJRoberts - Creation
25
/* round a size to worst-case alignment boundary */
26
#define osrndsz(s) (((s)+3) & ~3)
28
/* round a pointer to worst-case alignment boundary */
29
#define osrndpt(p) ((uchar *)((((ulong)(p)) + 3) & ~3))
31
/* read unaligned portable unsigned 2-byte value, returning int */
32
#define osrp2(p) ((int)*(unsigned short *)(p))
34
/* read unaligned portable signed 2-byte value, returning int */
35
#define osrp2s(p) ((int)*(short *)(p))
37
/* write int to unaligned portable 2-byte value */
38
#define oswp2(p, i) (*(unsigned short *)(p)=(unsigned short)(i))
40
/* read unaligned portable 4-byte value, returning long */
41
#define osrp4(p) (*(long *)(p))
43
/* write long to unaligned portable 4-byte value */
44
#define oswp4(p, l) (*(long *)(p)=(l))