Terminal Guide

Report Lines (if not smaller than 25)

ESC1B P50 $24 q71 t74 ESC1B \5C
xterm

Reports the height of the terminal, if it's not smaller than 25 lines.

The terminal responds with:

ESC1b P50 131 $24 r72 size t74 ESC1b \5c 

where size is max(25, the size in lines of the terminal) - 1.