The subtraction carry flag is the other way around
The address overflow occurs after 0xFFF, and not 0xFFFF
Fixed the carry flag for left shift
Const reference
Slightly changed the look of a for loop