Last screen mode.
Source position: crth.inc line 59
var LastMode: Word = 3;
The Lastmode variable tells you which mode was last selected for the screen. It is defined on DOS only.