Changes
/* Split Screen facility */
Also, during vertical retrace, the value in register 6801h should not be set to 257 less the total number of scan lines on the screen.
The split line is 8-bit only and has a range of 0-255 and will wrap around (255->0). A normal screen has 312 scanlines. This means that with some values, the counter will wrap and the split line will occur 2 times. With a normal screen of 312 scan lines, the value 312 - 257 = 55, or 37h should not be programmed, otherwise instead of seeing a split at line 55, you see a split at line 2. To avoid this (1) the vertical total adjust register is set to 1 while 6801h contains 37h (or some other value where the wrap will occur before the new frame starts), or (2) the raster interrupt (see 2.4 below) should be used such that 6801h contains 0 during vertical retrace so that it is disabled and doesn't wrap.
EDIT: A programmed value of 1 shows 2 lines before the split.
A programmed value of 0 turns off the split. Therefore the only way to have a single line then have a split is to allow the counter to wrap around by setting the value to 55 (normal screen) as mentioned above.
===Programmable raster interrupt===