The 8088 had no problems. It treated memory as a linear array of bytes. Since the data bus was also a byte wide, then every write to memory was a byte. If the 8088 wanted to write a word, then it required to sepsrate writes to accomplish this. So, eventhough the CPU was working on 16 bits, all writes to memory used sequences of 8 bits.
The 80286 was still a 16-bit processor, but now there was also a 16 bit bus. It also treated memory as a linear array of bytes. Since there was a 16-bit bus, it was easy to write a word at a time. However, there was a problem when the CPU only wanted to write a byte. There needed to be a pin that would indicate that only the low order byte on the bus was being written to memory. This is the function of the BHE (Byte High Enable) pin on the 80286. If it is a 0, then only a byte is being written, if it is a 1 then all 16 bits of the bus will be written to memory. If a byte is being written, it will always be in the low order 8 bits of the data bus.
The 80386 was a 32-bit processor with a 32 bit data bus. Now an entire longword could be written at once. However, there needed to be pins to indicate if a byte, word, or longword was being written. The 80386 also changed how memory was addressed. It now treated memory as a 2-dimensional array of bytes. Each address from the 80386 actually was the address of a longword (4 bytes), not a byte. This is why only 30 bits of the address were sent over the bus. If a byte was to be written, then one of the BE0, BE1, BE2, BE3 pins would be set. If a word was to be written, then either BE0-BE1 or BE2-BE3 would be set. If a longword was to be written then all four of the pins would be set.
Suppose there was a 4 bit address field instead of a 32 bit address field. Then the following table indicates how the 80386 views memory. 2 bits would be specified by the address lines, and then the rest of the address would be determined by the BEx pins.
Calculating a complete address for the 80386 | ||||
---|---|---|---|---|
BE3 | BE2 | BE1 | BE0 | |
2 bit address | 11 | 10 | 01 | 00 |
00 | 0011 | 0010 | 0001 | 0000 |
01 | 0111 | 0110 | 0101 | 0100 |
10 | 1011 | 1010 | 1001 | 1000 |
11 | 1111 | 1110 | 1101 | 1100 |
Due to this configuration, the 80386 can only write longwords on addressess that end in 00, and words on addresses that end in 0.
The 68030 was also a 32-bit processor with a 32-bit data bus. It viewed memory as a linear array of bytes. It had 32 address lines and two pins, SIZ0 and SIZ1, that indicated the size of the data to write: 8, 16, or 32 bits. A word or longword could begin at any address.