Convert some VGA memory operations to function calls.