A microcomputer that can process plural tasks time-divisionally and in
parallel, wherein one of a plural programs described by one of the tasks
is described as a looped specific task in which the increment of program
addresses is fixed, a program counter is usable as a timer counter, a
peripheral function instruction is described in the specific task, the
peripheral function instruction is set so as to indicate one or more
general-purpose registers as an operand. The CPU executes the peripheral
function instruction as one instruction and achieves information needed
to execute the instruction by a general-purpose register and stores the
execution result into the general-purpose registers. An instruction code
encoding system includes an operation code and plural operands for
indicating operation targets of an instruction in an instruction code and
executing an instruction indicated by the operation code on the operation
targets. When the operation targets indicated by the plural operands are
set to a combination in which an execution result does not vary, the
processing corresponding to an instruction different is executed.