Real-mode programs freely execute CLI and STI to control interrupts, PUSHF and POPF to manipulate flags, INT n for DOS and BIOS calls, and IN/OUT for hardware I/O. In normal protected mode, these instructions are privilege-checked -- they execute normally if the caller has sufficient privilege, and fault otherwise. The 386 can't simply let V86 tasks execute them freely -- a DOS program disabling interrupts would bring down the whole system -- but trapping on every INT 21h call would make V86 impractically slow.
An array is sizeof(union alloc_header) + length * sizes[type] bytes
,更多细节参见51吃瓜
FT Digital Edition: our digitised print edition。关于这个话题,Line官方版本下载提供了深入分析
An example of dithering using random noise. Top to bottom: original gradient, quantised after dithering, quantised without dithering.