MICROPROCESSOR
PART 8
SIBIN K
Electrical Subject Matter Expert
Branch Control Group
● This group includes the instructions for conditional and unconditional jump,
subroutine call and return, and restart. Examples are: JMP, JC, JZ, CALL, CZ, RST
etc.
● JMP 2000 - Unconditional jump: jump to the instruction specified by
the address
● JZ addr - (Jump if the result is zero)
● JNZ addr - (Jump if the result is not zero)
● JC addr - (Jump if there is a carry)
● JNC addr - (Jump if there is no carry)
● JP addr - (Jump if the result is plus)
● JM addr - (Jump if the result is minus)
● JPE addr - (Jump if even parity)
● JPO addr - (Jump if odd parity)
● CALL addr - (Unconditional CALL: call the subroutine identified by the
operand)
● CALL instruction is used to call a subroutine. Before the control is transferred
to the subroutine, the address of the next instruction of the main program is
saved in the stack. The content of the stack pointer is decremented by two to
indicate the new stack top. Then the program jumps to subroutine starting at
address specified by the label.
● RET - Return from subroutine
● RSTn - (Restart) Restart is a one-word CALL instruction. The content of
the program counter is saved in the stack. The program jumps to the
instruction starting at restart location.
I/O and Machine Control Group
● This group includes the instructions for input/output ports, stack and machine
control. Examples are: IN, OUT, PUSH, POP, and HLT etc.
● PUSH B - Push the content of BC register pair to stack
● POP B - Pop the content from the stack and put it in BC reg.pair
● PUSH PSW - (PUSH Program Status Word)
● POP PSW - (Pop Program Status Word)
● IN 20H - Input to accumulator from I/O port
● OUT 40H - Output from accumulator to I/O port
● EI - (Enable Interrupts) : to enable all the interrupts
● DI - (Disable Interrupts) : to disable all the interrupts
● SIM - (Set Interrupt Masks) : to individually mask an interrupt
● RIM - (Read Interrupt Masks) : to read the status of interrupts
● NOP - (No Operation) : the instruction is fetched, and decoded, no operation
is executed, no flags are affected. Used for time delays.
● HLT - (Halt)