
Build a real-mode address from a segment and an offset, then apply the gate.
The IBM PC AT, 1984. The 286 could address more memory than the 8088 it replaced, so programs that counted on addresses wrapping around at one megabyte broke the moment they ran on it. IBM answered with a wire. Hold address line 20 low through the keyboard controller and the old wrap comes back, and that gate outlived the controller by decades. Compute the address that reaches the bus.
phys_address(65535, 16, 1)Expected result
1048576For your own tracking. Tests grade your code.
phys_address(65535, 16, 0)Expected result
0phys_address(4096, 0, 0)Expected result
65536Expected files
a20.cAllowed functions
None. Write every helper yourself.
