Switching to your chosen resolution is the easiest of all the functions in the VESA BIOS. All you have to do is tell it the mode you want, and it does the rest. This will only work, of course, if you ask for a mode the BIOS has explicitly told you it supports.
AX = 4F02h BX = mode number call interrupt 10h
if AX = 4F00h then
continue the program
else
print "Could not switch to that mode"
end if