Vesa BIOS Example. Page 1:

VESA BIOS Example

Page 7: Scrolling


OK, this is nice and easy. What we're going to do is to scroll the screen in a big circle so that the physical screen just touches each edge of the logical screen.

The formula for moving in a circle, as if you need telling, is:

	X = sin(angle) * xradius + xcenter
	Y = cos(angle) * yradius + ycenter

I am assuming that we were able to set the Logical screen width to twice that of the X resolution, and that the variable MaxScans has been set from page 5.
So, first calculate the size of the circle to move in:

	xcenter = (Xresoluion - LogicalWidth) / 2
	xradius = (Xresoluion - LogicalWidth) / 2

	ycenter = (Yresoluion - MaxScans) / 2
	yradius = (Yresoluion - MaxScans) / 2
Now, make the screen scroll in a full circle in steps of 0.1 of a degree.
for angle=0 to 720 in steps of 0.1
begin loop
	
	AX = 4F07h
	BX = 0
	CX = sin(angle) * xradius + xcenter
	DX = cos(angle) * yradius + ycenter
	
	call int 10h

end loop