Update 6502 mathematics