Far pointer in 16-bit x86
The article is written in
* A far pointer is a pointer that includes a segment selector, making it possible
* to point to addresses outside of the default segment.
* In 16-bit code, a far pointer has two parts: a 16-bit segment value and a 16-bit
* offset value. A linear address is obtained by shifting the binary segment value
* four times to the left, and then adding the offset value.
* There can be up to 4096 different segment-offset address pairs pointing to one
* physical address.
* On C compilers targeting the 8086 processor family, far pointers were declared
* using a non-standard `far` qualifier.
* The given example prints 81 because both addresses point to same location.
* Physical Address = (value of segment register) * 0x10 + (value of offset).
* Location pointed to by pointer 'p' is : 0x5555 * 0x10 + 0x0005 = 0x55555
* Location pointed to by pointer 'q' is : 0x5333 * 0x10 + 0x2225 = 0x55555
char far *p = (char far *)0x55550005;
char far *q = (char far *)0x53332225;
*p = 80;