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.

Fetch and execute operation

Fetch and execute operation:
OPCODE fetch cycle: The microprocessor uses this cycle to take the OPCODE of an instruction i.e. fetch OPCODE. In this case, the address of memory location where the OPCODE is stored is given by program counter. This is always the first cycle of any instruction cycle. The OPCODE is taken from memory and transferred to instruction register for decoding and execution.


              The time required to complete this cycle is 4 or 6 T states.

              Operand fetch cycle: In 2 and 3 byte instruction, taking OPCODE, doesn’t complete the instruction fetching; so we require operand fetch cycle. For 2 byte instruction we require two operand fetch cycles. In this cycle the address is given by program counter. But the contents are not transferred to instruction register instead they are stored in temporary registers. The time required to complete the operand fetch cycle is 3 T states.

              Memory read cycle: The microprocessor executes these cycles to read data from memory. The address of memory location is give by instruction. In this case, the program counter is not used, instead, instruction will give address or will specify, where the address is present. IO/M=0.


Memory write cycle: The microprocessor executes these cycles to write data to memory. The address to memory is given by instruction IO/M=0.


I/O read cycle: The microprocessor executes these cycles to read data from I/O device instead of memory. The status of IO/ line is HIGH. The address of port is given by instruction.
I/O write cycle: The microprocessor executes these cycles to write or send data from I/O device. The status of IO/M line is HIGH. The address of port is given by instruction.

Emulator and its uses in the system design.

Emulator is a device computer program, or system that accepts the same inputs and produces the outputs as a given system.
A software application which enables the computer to “emulate’’ a piece of hardware, fooling the computer into thinking that the hardware, such as a CD-ROM, is attached to it. Emulators are often used in situations where there is no CD-ROM present, as in case of some laptops or to test an image of a CD-ROM created by CD burning software such as Nero.

STACK operation in 8085 microprocessor.

STACK operation in 8085 microprocessor.
 
The stack is a reserved area of the memory in RAM where temporary information may be stored. An 8-bit stack pointer is used to hold the address of the most recent stack entry. This location which has the most recent entry is called as the top of the stack.
When the information is written on the stack, the operation is called PUSH. When the information is read from the stack, the operation is called POP. The stack works on the principle of Last in First Out or Fist in Lat Out.

Important features of Motorola 68000 microprocessor.

Important features of Motorola 68000 microprocessor.
Features of Motorola 68000 microprocessors:
The Motorola 68000 is a 32-bit CISC microprocessor.
It includes multiuser microcomputers like the WICAT 150, Tandy TRS – 80 Model 16, and Fortune 32: 16 and single – user workstations.
Multiprocessing control.
Binary coded decimal arithmetic e.g. ABCD and SBCD.
Its software is generally forward with the rest of the line.

Vectored interrupts:

 Vectored interrupts: 
When interrupt request is activated the microprocessor control logic executes ideal machine cycle. During this cycle, it generates starting address of interrupt service routine. These addresses are fixed for different interrupts. This memory address of interrupt service routine is called as vector location and interrupts which use these vector locations are called as vectored interrupts.
                   E.g. TRAP, RST 7.5, RST 6.5, RST 5.5

8085 µP instructions

Function of following 8085 µP instructions with examples (i) SHLD (ii) LDAX
       (i)    SHILD Address:
              Mnemonic : SHLD address
              Algorithm        :         (Address) ← L
                                      (Address + 1) ← H
              Operation       :         (Address) = L
                                      (Address + 1) = H
This instruction copies the contents of registers H and L to the memory location specified in instruction.
The contents of L register are stored at the memory location whose address is specified and the contents of register H to the next memory location.
              No. of bytes    :         3 bytes
              First Byte                 :         Opcode
              Second Byte   :         Low order byte of the address
              Third Byte      : High order byte of the address
              Addressing mode: Direct addressing mode
              Flags               :         No flags are affected.
              Example                   :         SHLD 5648 H.
              (ii)          LDAX Rp:
              Mnemonic                :         LDAX Rp
              Algorithm                 :         A ← (Rp)
              Operation                 :         A + (Rp)
This instruction copies the contents of memory location whose address is pointed by the specified register pair to the accumulator.
              The register Rp can be any valid register pair like BC or DE only.
              The contents of the memory location remain unchanged.
              No. of bytes    :         1 byte
                                                ode of LDAX Rp   
              ddressing mode        :        Register indirect addressing mode
              Flags               :         No flags are affected.

Single chip microcomputer

Single chip microcomputer

It is an abject of the present invention to provide a one chip microcomputer which permit the access time for an external memory to be  equal to that for an internal memory. The one chip microcomputer 10 includes are internal ROM II, control Unit 12, output terminal 13, input terminal 14, control circuit 15.

Role of an emulator in microprocessor:


 Role of an emulator in microprocessor:
  1. It is used to test and debug the hardware and software of an external system, such as the prototype of a microprocessor – based instrument.
  2. Part of the hardware of an emulator is a multiwire cable which connects the host system to the system being developed. A plug at the end of the cable is plugged into the prototype system in place its microprocessor.
  3. Through this connection the software of the emulator allows you to download your object code program into RAM in the system being tested and run it.
  4. Link a debugger, an emulator allows you to load and run programs, examine and change the contents of memory locations, insert breakpoints in the program.

SIM (set interrupt mask)


SIM set interrupt mask is used for interrupts handling in 8085: It implies that the instruction mask the interrupts. However the instruction must be executed in order to use the interrupts.It having the following functions:
  1. To set the RST 7.5, 6.5 and 5.5 interrupts.
  2. To Reset RST 7.5 Flip Flop.
  3. To Implement series I/O transmit D7 bit  to transmit data.

DMA dada transfer:


 DMA dada  transfer:
  1. For some  application, such  as  transferring  dada  bytes to  memory  form  magnetic  or optical  disk, however, the  dada  bytes  are coming  in from  the  disk  faster  then  they  can  be  read in  with  program  instruction. In a case like this we use a dedicated Hardware device called a direct memory access (DMA) controller to manage the data transfer.
  2. The DMA controller temporarily borrows the address bus, data bus, and control bus from the microprocessor and transfer the data by directly from the disk controller to a series of memory location.
  3. A DMA controller can also transfer data from memory to a port.

Instruction queue in 8086 microprocessor.

Function of instruction queue in 8086 microprocessor.
Ans.:      
  The EU is decoding or  executing  an instruction  which does not require  use  of the buses,  the BUI fetches up to six instruction bytes  for  the  following  instructions . the BUI stores  these  prefetched  bytes  in a first –in -irst –out  register  set  called a queue

When  the  EU is ready  for  it’s next  instruction , it  simply  reads  the  instruction   bytes  for  the  instruction  from  the  queue  in the  BUI     

This  is much  faster  than  sending  out  an  address to the system  memory  and  waiting  out  memory  to  send  back  the next  instruction  byte  or  bytes

8251 programmable communication interface chip


Applications of 8251 programmable communication interface chip.
Ans.:
8251 is programmable communication interface. Which is used as Universal Asynchronous Receiver Transmitter. (UART 8251), which is modeled on the peripheral interface device adapter.
     It consists:
  1. a serial transmit block.
  2. a serial receive block.
  3. a CPU interface (I/f) block
  4. 8251 is used as program control device.

Program Counter in 8085 microprocessor

 Requirement of a program counter in 8085 microprocessor.

Program counter hold the address of either the first byte of the next instruction to be fetched for execution or the address of the next by byte of instruction. Which has been completely fetched. In both the cases it gets incremented automatically one by one as the instruction byte get fetched. Also program register keeps the address of next instruction.

Synchronous bus and Asynchronous bus


       Synchronous bus:
  1. In synchronous bus, all devices derive timing information from a common
       clock signal.
  1. Fig. 2 shows the timing diagram for synchronous input transfer.
Fig. 2
  1. At time to, the processor places the device address on the address lines of system but and sets the control lines to perform the input operation, during time t1 – t1, address devices gets the address. At time t1, address devices place its data on the data bus, and at time t2, the processor reads the data lines and loads the data from data bus into its input buffer.
Asynchronous bus:
  1. In this the common clock is eliminated and data transfer on the system bus is achieved by use of a hand shake between the processor and the device being addressed. Here the clock line is replaced by two control signals ready and accept.
  2. Fig. 3 shows timing dig, for asynchronous input transfer.

PSW : PROGRAM STATUS WORD

PSW (program status word) : Program status word refers to the accumulator and flag register, this PSW will store the current data or the content of the accumulator and flag register while execution of program.
              A window editor is a program used for editing the plain text file these type of editor are provided with operating system example of one of window editor is notepad which allow the user to search and replace copy, cut and paste, undo and redo operation and also you will perform importing filtering operation with this notepad text of editor.
              Vi is the full screen editor available with all unix system. Vi is visual editor enable the user to create, edit, and correct source program, Vi makes complete use of the keyboard where pretically every key has function.