# GETSCANLINE

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
GETSCANLINE

Description:
This will report on the line that is currently being drawn on the VGA monitor.
Using this to time updates to the screen can avoid timing effects caused by updates while the screen is being updated.

GETSCANLINE zero is always the start of the first visible line.

The maximum value returned for each mode varies depending on the mode..
The table below contains the maximum value returned by GETSCANLINE for each mode.
Finally it lists the time in microseconds for the time between the end of the last line and the start of the first line.

Most mode take between 20 and 30 uS per line so something like
IF GETSCANLINE = MM.VRES might take a few video frames before triggering.
You need to allow a range of values to be sure that your code will see the value at the earliest opportunity..
IF GETSCANLINE > MM.VRES and GETSCANLINE < (MM.VRES+5)
is a safer way to initialise an action and will work for all modes.

When you set a MODE, you can specify a subroutine that gets called at the start of the blanking period.
This is often a simpler way of doing things during blanking.

GETSCANLINES
mode display maximum uS of
lines scan lines blanking
1 600 627 750
2 400 499 2690
3 200 249 2690
4 432 499 1800
5 216 249 1800
6 240 249 540
7 240 249 540
8 480 499 540
9 768 805 800
10 480 516 1190
11 720 749 670
12 540 562 670
13 300 313 750

Last edited: 07 April, 2021