diff --git a/wip-hugo/routines/memory/memcpy.s b/wip-hugo/routines/memory/memcpy.s index 4001096..de752f6 100644 --- a/wip-hugo/routines/memory/memcpy.s +++ b/wip-hugo/routines/memory/memcpy.s @@ -13,12 +13,16 @@ change_length: DEC length BNE loop - ;;check if length hi byte is 0. if it is end this - LDA length + 1 - BEQ loop_end - DEC length +1 - JMP loop + BPL loop + JMP loop_end + + ;;;;check if length hi byte is 0. if it is end this + ;;LDA length + 1 + ;;BEQ loop_end + + ;;DEC length +1 + ;;JMP loop y_overflow: LDY #$00 INC B_start + 1