Turn negative shift amount into positive.
No idea what this was supposed to do.
Convert more VGA memory operations.