32.64-Bit 80X86 Assembly Language Architecture
Authors: Leiterman J. C.
Published year: 2003
Pages: 156-158/191
Buy this book on amazon.com >>

Appendix A: Data Structure Definitions

When dealing with three-dimensional transformation, data structures are needed to contain the data type. The data structures listed here are discussed in terms of this book.

Integer 2D Point

This is mostly used within a 2D game but has uses within a 3D game. It is used for specifying a starting point within a bitmap image with the origin {0,0} located in the upper-left corner. This is primarily used as the starting point of a texture within a bitmap image. It is also used in relationship to the anchor point of a font baseline so as where to position it within an image or two-triangle quad polygon tile.

typedef struct iPosType
{
  int   x;
  int   y;
} iPos;

Integer 2D Size

Normally bitmaps range from 0 to w1 for width and 0 to h1 for height and are never negative. With that in mind, only unsigned arguments are used.

typedef struct iSizeType
{
  uint  w;      // Width
  uint  h;      // Height
} iSize;

Integer Rectangle

Some rectangle structures are designed with a field definition such as {x1,y1,x2,y2}, but any movement has to be translated with the modification of four coordinates. With the following structure {x,y,w,h}, only the two fields {x,y} need to be modified.

typedef struct iRectType
{
  int   x;      // X coord.
  int   y;      // Y coord.
  uint  w;      // Width
  uint  h;      // Height
} iRect;

3D Vector (Integer)

typedef struct iVector3DType
{
  int   x;
  int   y;
  int   z;
} iVector3D;

3D Quad Vector (Integer)

typedef struct iQVector3DType
{
  int   x;
  int   y;
  int   z;
  int   w;
} iQVector3D;

3D Vector (Floating Point)

typedef struct vmp3DVector
{
  float x;
  float y;
  float z;
} vmp3DVector;
   
   
  vmp3DVector point =   {0.0, 0.0, 0.0};
  vmp3DVector vector = {1.0, 2.0, 3.0};

3D Quad Vector (Floating Point)

typedef struct vmp3DQVector
{
  float x;
  float y;
  float z;
  float w;
} vmp3DQVector;
   
   
vmp3DQVector point =   {0.0, 0.0, 0.0, 0.0};
vmp3DQVector vector = {1.0, 2.0, 3.0, 0.0};

Quaternion (Single-precision Floating-point)

typedef struct vmpQuat
{
  float x;
  float y;
  float z;
  float w;
} vmpQuat;

Appendix B: Mnemonics

Mnemonics Part 1

The following is the supported mnemonic lookup table per processor. They have been divided into revisions of Intel and AMD. Sub-instruction types are indented and the root mnemonic has a shaded background.

 

Intel

P

Pentium

PII

Pentium II

SSE

SSE (Katmai NI)

SSE2

SSE2

SSE3

SSE3 (Prescott NI)

EM64T

64-bit memory

 

AMD

K6

K6

3D!

3DNow!

3Mx+

3DNow! & MMX Ext.

A64

AMD64

Legend:

 

Mnemonics Part 2

Mnemonic

Page#

P

PII

K6

3D!

3Mx+

SSE

SSE2

A64

SSE3

E64T

AAA

394

32.64-Bit 80X86 Assembly Language Architecture
Authors: Leiterman J. C.
Published year: 2003
Pages: 156-158/191