Added error code handling.
Added comparing instruction generation.