XVME-682 Manual
October, 1989
6.7 BYTE SWAPPING
The VMEbus and PC/AT conventions differ in two important ways. The first is in how each
addresses data bus bits. The second involves references to numeric variables longer than eight
bits.
When comparing the way the VMEbus addresses data bus bits, relative to the way the PC/AT
family addresses them, we find that the bytes are swapped as follows:
DATA BITS V M E b u s P C / A T b u s
D15-D08 B y t e 0 B y t e 1
D7-DO B y t e 1 B y t e 0
When referring to a numeric variable longer than eight bits, the PC/AT stores the least
significant byte (LSB) at the lower address while the VMEbus (Motorola type) requires that
the most significant byte (MSB) be stored at the lowest address.
This problem concerns only numeric values. String-type variables are treated the same by
both devices.
Xycom solved the data bus bit-swapping problem by connecting Byte 0 of the CPU to D15-
D8 of the VMEbus, and Byte 1 of the CPU to D7-DO of the VMEbus.
PC/AT DATA BUS V M E DATA BUS B Y T E
D7-DO
D
1
5
-D8
0
D15-D8
D
7
-DO
1
The second problem must be solved with software because the external hardware cannot
distinguish between numeric and string-type variables. The programmer must be aware of the
fact that whenever numerics are to be exchanged between the PC/AT and the Motorola-type
devices on the VMEbus, data bytes must be swapped.
Example
PC/AT word = 1234
This word must be written to VMEbus (Motorola-type) devices as 3412
6-17
Artisan Technology Group - Quality Instrumentation
... Guaranteed I (888) 88
I www.artisantg.com
Summary of Contents for XVME-682
Page 5: ......