M68K Project Part 5

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 3

  • @AK-vx4dy
    @AK-vx4dy Місяць тому +1

    Did i rember corectly that on MC68K move instruction changes flags ?

    • @Rick62820
      @Rick62820  Місяць тому

      Well... Yes and no. By default, MOVE does not alter the flags in the condition code register. It simply transfers the data. However, the MOVE instruction can explicitly alter the flags in the CCR or the status register (SR) if it's used to load a value into the CCR or SR. For standard data transfers (e.g., between registers or memory), MOVE does not change the flags. When MOVE is used to manipulate the CCR or SR directly, it will affect the flags as determined by the operation. So, yes and no. 😂

    • @AK-vx4dy
      @AK-vx4dy Місяць тому +1

      @Rick62820 I thought about indirect change just like ALU was used to transfer but i probably mixed something in decades old memeories 😉
      But if i checked documentation When the MOVE source, destination format is used,
      the Negative and Zero flags are set as per the data
      moved, the Overflow and Carry flags are reset to zero
      and the Extend flag is unaffected.
      When the MOVE source, CCR / SR formats are used, the
      flags are set directly from the data.
      When the MOVE is done with the USP as an operand, no
      flags are affected."