2081 12

BIT151 ยท 2081 ยท 5 marks

Write short notes on (any two): a) DMA b) Flags in 8085 Microprocessor c) Instruction set.

Write short notes on (any two): a) DMA b) Flags in 8085 Microprocessor c) Instruction set. [5]

Microprocessor and Computer ArchitectureChapter 9: Input Output and Data TransferDirect Memory Access

Quick answer

DMA is a technique that allows peripheral devices to transfer data directly to/from memory without involving the CPU for each byte of transfer.

Short Notes (Any Two): 5 Marks


a) DMA (Direct Memory Access)

Key Points:

  • Normally, the CPU handles all data transfers between I/O devices and memory, which wastes CPU time.
  • In DMA, a special hardware unit called the DMA Controller (DMAC) takes over the system bus temporarily.
  • The CPU sends the starting address, block size, and direction (read/write) to the DMAC, then releases the bus.
  • The DMAC performs the transfer and sends an interrupt to the CPU when done.

Steps in DMA Transfer:

  1. CPU initializes the DMAC (address, count, mode).
  2. DMAC sends a Bus Request (BR) to the CPU.
  3. CPU grants the bus via Bus Grant (BG) and suspends its activity.
  4. DMAC transfers data directly between memory and I/O device.
  5. After transfer, DMAC releases the bus and interrupts the CPU.

Advantages:

  • Very fast data transfer.
  • CPU is free to do other tasks.
  • Suitable for high-speed devices like disk drives, video cards.

b) Flags in 8085 Microprocessor

The 8085 microprocessor has a special 8-bit Flag Register (also called the Program Status Word) that reflects the result of arithmetic and logical operations.

The 8085 has 5 flags:

FlagSymbolDescription
Sign FlagSSet to 1 if result is negative (MSB = 1); else 0
Zero FlagZSet to 1 if result is zero; else 0
Auxiliary Carry FlagACSet to 1 if carry from bit 3 to bit 4 occurs (used in BCD operations)
Parity FlagPSet to 1 if result has even number of 1s; else 0
Carry FlagCYSet to 1 if there is a carry out from the MSB (bit 7)

Flag Register Bit Layout:

D7   D6   D5   D4   D3   D2   D1   D0
 S    Z    0   AC    0    P    1   CY

Importance:

  • Flags are used by conditional jump instructions (e.g., JZ, JNZ, JC, JNC) to control program flow.
  • They are automatically set or reset after arithmetic/logical operations.

c) Instruction Set

An instruction set (also called Instruction Set Architecture, ISA) is the complete collection of instructions that a processor can understand and execute.

Key Points:

  • It defines the interface between hardware and software.
  • Each instruction tells the CPU what operation to perform, on what data, and where to store the result.

Types of Instructions:

CategoryExamplesDescription
Data TransferMOV, MVI, LDA, STAMove data between registers/memory
ArithmeticADD, SUB, INR, DCRPerform arithmetic operations
LogicalANA, ORA, XRA, CMAPerform bitwise logical operations
Branch/ControlJMP, CALL, RET, JZControl flow of program
I/O and Machine ControlIN, OUT, HLT, NOPHandle I/O and CPU control

Instruction Format:

An instruction typically has:

  • Opcode: specifies the operation
  • Operand(s): specifies the data or address

Types of Instruction Sets:

  • RISC (Reduced Instruction Set Computer): fewer, simpler instructions (e.g., ARM)
  • CISC (Complex Instruction Set Computer): many complex instructions (e.g., x86, 8085)

Importance:

  • Determines the capability and performance of a processor.
  • Programmers and compilers use the instruction set to write programs.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.