What's the difference between MOV and B0MOV instructions?
MOV instruction is register read/write instruction, it can transmit data using ACC
accumulator, there are 3 operation format:
◆ MOV A, M: read data from memory and save into ACC, zero flag (Z) set 1 if the result is 0, otherwise set 0.
◆ MOV M, A: write data to memory from the ACC, this operation does not affect the PFLAG.
◆ MOV A, I: move the immediate data to ACC, this operation does not affect PFLAG.
※Note:
1.“I” is immediate data;
2.“M” is system register or user-defined registers;
B0MOV instruction is register read/write instruction, the memory must be in BANK 0, transmit data through the ACC, there were three operation format:
◆ B0MOV A, M: read data from BANK 0 memory and save into ACC, zero flag (Z) set 1 if the result is 0, otherwise set 0.
◆ B0MOV M, A: write data to memory from the ACC, this operation does not affect the PFLAG.
◆ B0MOV M, I: move the data to BANK 0 memory, the memory must be work registers (H, L, R, X, Y, Z), RBANK, or PFLAG, this operation does not affect the PFLAG.
※Note:
1.“I” is immediate data;
2.“M”is system register or user-defined BANK 0 registers;
Therefore, in chips only have BANK 0, in addition to "MOV A, I" and "B0MOV M, I" using note above, in most cases, "MOV" and "B0MOV" are equivalent; if it has more than one RAM BANK, such as with both BANK 0 and BANK 1, when BANK 1 is using, "MOV" instruction may operate on register of the current BANK (ie BANK 1), when use "B0MOV" command, there is no need to convert RAM BANK and can directly access system registers or data in RAM BANK 0
◆ MOV A, M: read data from memory and save into ACC, zero flag (Z) set 1 if the result is 0, otherwise set 0.
◆ MOV M, A: write data to memory from the ACC, this operation does not affect the PFLAG.
◆ MOV A, I: move the immediate data to ACC, this operation does not affect PFLAG.
※Note:
1.“I” is immediate data;
2.“M” is system register or user-defined registers;
B0MOV instruction is register read/write instruction, the memory must be in BANK 0, transmit data through the ACC, there were three operation format:
◆ B0MOV A, M: read data from BANK 0 memory and save into ACC, zero flag (Z) set 1 if the result is 0, otherwise set 0.
◆ B0MOV M, A: write data to memory from the ACC, this operation does not affect the PFLAG.
◆ B0MOV M, I: move the data to BANK 0 memory, the memory must be work registers (H, L, R, X, Y, Z), RBANK, or PFLAG, this operation does not affect the PFLAG.
※Note:
1.“I” is immediate data;
2.“M”is system register or user-defined BANK 0 registers;
Therefore, in chips only have BANK 0, in addition to "MOV A, I" and "B0MOV M, I" using note above, in most cases, "MOV" and "B0MOV" are equivalent; if it has more than one RAM BANK, such as with both BANK 0 and BANK 1, when BANK 1 is using, "MOV" instruction may operate on register of the current BANK (ie BANK 1), when use "B0MOV" command, there is no need to convert RAM BANK and can directly access system registers or data in RAM BANK 0