Sunday, 25 December 2011

Difference between branch and call subroutine instruction


Difference between branch and call subroutine instruction?

              Branch instruction:
  • Every time it is not possible to use line-sequence of instruction, sometime we need breakup in our program according to some condition this is nothing but branching and to perform these branching we require some instruction that is called branch instruction
       Eg:       MOV                    R0,     num1
                   MOV                    R2,     num2
                   CMP           R0,     R1
                   JB .             next
                   Sub            R0,     R1
                   MOV                    R2,     R1
       Next:   Sub            R1,     R0
                   MOV                    R2,     R0
  • Here the task of IB. is it compairs the two Numbers i.e. R0, and R1, if R0, < R1, then it goes to next and execute the instruction otherwise it execute the instructions just next to it.
  • The IB is your branch instruction.
       e.g. : IC, INC, IZ, INZ, IB, INB etc.

       Subroutine instruction:
  • Subrouting instruction is the instruction which is used to call the particular procedure.
  • In your main program we call particular procedure execute that procedure and then again switch to main program.
  • The instruction used for. This called to procedure and getting switch to main program is called subroutine instruction.

Interrupt handling of 68000.

Interrupt handling of 68000.

In 68000 the address of the interrupt handler was placed at 4x interrupt handler number thus if interrupt 3 occurred, you went to address 12 ten, at the address was the address of the handler.
With many different I/O devices that can be interrupt controller. I/O devices are hooked up to the PIC and the PIC is the only device that sends the interrupt.

MOV instruction of 8051

MOV instruction of 8051.

MOV copies the value of operand 2 into operand 1 the value of operand 2 is not affected. Both operand 1 and operand 2 must be in Internal RAM. No flags are affected unless the instruction is moving the value of a bit into the carry bit in which case the carry bit is affected or unless the instruction is moving a value into the PSW register.

Synchronous bus & Asynchronous bus


Synchronous bus:
  • Transmitter and receivers are synchronized of clock.
  • Data bits are transmitted with synchronization of clock.
  • Character is received at constant Rate.
  • Data transfer takes place in block.
  • Start and stop bit are required to establish communication of each character.
  • Used in high – speed transmission.
Asynchronous bus:
  • Transmitters and receivers are not synchronized by clock.
  • Bit’s of data are transmitted at constant rate.
  • Character may arrive at any rate at receiver.
  • Data transfer is character oriented.
  • Start and stop bits are required to establish communication of each character.
  • Used in low – speed transmission.

Volatile memory and NonVolatile memory

Nonvolatile memory: If memory can hold data even if power is turned off, then such type of memory are called nonvolatile memory.

Volatile memory: If memory Remove the data if power is turned OFF, then such type of memory are called volatile memory.

ROM: (Read only memory) and PROM: (Programmable read only memory)


 ROM: (Read only memory)
  • ROM is a read only memory.
  • We can not write anything in it.
  • In this we can use diode, MOS to store the information.
  • Decoder is used to select the address lines
  • OE signal is used to enable the output.
PROM: (Programmable read only memory)
  • PROM is a programmable ROM
  • It is used for permanent storage purpose
  • Once we write something in it then we cannot change it. i.e. it become permanent
  • We can use diode along with fusible link in series with it to store the information
  • We can burns the fuse according to the information stored in it.

Function of signals of 8085.

 Function of signals of 8085.

  (i) HOLD                (ii) HLDA

HOLD and HLDA: HOLD is an active high, input signal used by other controller to request microprocessor about use of address, data and control signals.

The microprocessor in response to HOLD generates a signal to acknowledge the requesting device by HLDA signal. When HLDA is active it indicates that microprocessor has received HOLD request and will relinquish the buses in next clock cycle. The other controller will use buses and upon completion of work will remove HOLD signal, because of this microprocessor will also make HLDA low. The microprocessor takes control of buses half clock cycle after HLDA goes low.