От: | migel | ||
Дата: | 16.11.09 19:06 | ||
Оценка: |
Ну и вот тут почитатьFrom Jeffery Richter's "Programming Applications for Windows, 4th Ed":
Let's take a closer look at how the x86 CPU handles data alignment. The x86 CPU contains a special bit flag in its EFLAGS register called the AC (alignment check) flag. By default, this flag is set to zero when the CPU first receives power. When this flag is zero, the CPU automatically does whatever it has to in order to successfully access misaligned data values. However, if this flag is set to 1, the CPU issues an INT 17H interrupt whenever there is an attempt to access misaligned data. The x86 version of Windows 2000 and Windows 98 never alters this CPU flag bit. Therefore, you will never see a data misalignment exception occur in an application when it is running on an x86 processor.
SetErrorMode, with the argument field SEM_NOALIGNMENTFAULTEXCEPT