0040h:0082h           Keyboard Buffer End Offset Pointer

Length: 2 bytes

This word contains the offset of the end of the keyboard buffer
plus one. This allows you to move the buffer, increase its size,
or decrease its size. There is one catch, however: The address
here is an offset starting at address 0040h:0000h. For example,
the default 32-byte buffer at 0040h:001Eh forces this offset
address to be 003Eh (20h for the 32-byte buffer itself).
Therefore, if the buffer is to be moved to another location, the
buffer ending offset must be relative to 0040h:0000h.