Friday, August 14, 2009

microcontroller 8-bit instructions

Most 8-bit operations could only be performed on the 8-bit accumulator (the A register). For dyadic 8-bit operations, the other operand could be either an immediate value, another 8-bit register, or a memory cell addressed by the 16-bit register pair HL. Direct copying was supported between any two 8-bit registers and between any 8-bit register and a HL-addressed memory cell. Due to the regular encoding of the MOV-instruction (using a quarter of available opcode space) there were redundant codes to copy a register into itself (MOV B,B, for instance), which was of little use, except for delays. However, what would have been a copy from the HL-addressed cell into itself (i.e., MOV M,M) was instead used to encode the HLT instruction (halting execution until an external reset or interrupt).

No comments:

Post a Comment