摘要 |
PURPOSE:To simplify a program by providing the program with a comparing instruction for setting a compared result in a register or a memory to be operands of multiplying and adding instructions respectively. CONSTITUTION:The 1st and 2nd operands to be compared are defined as an accumulator ACC and a prescribed address of a memory respectively and inputted and compared to/by an arithmetic unit ALU to set/reset a specific bit in a flag register F.Reg on the basis of the compared result. In this case, the operated result of the comparing instruction is set up in the least significant bit of the ACC, and when both the operands coincide with each other at the execution of the comparing instruction, only the least significant bit is made to ''1''. In case of inconsistency, all bits are turned to ''0''. After the comparison, the contents of the ACC are multiplied by A, the sum is added to the multiplied result and the contents of the ACC are stored. Thus, a JUMP instruction can be omitted. |