Could be simplified: ;;; Copy the ladders X position to the player (here) LDA tileX AND #%11110000 STA ladderX SEC SBC #4 ;;; Sprite X offset STA Object_x_hi,x