90 likes | 344 Views
Addressing MODES. DIRECT ADDRESSING (instruction itself carries the address of the operand) IMMEDIATE ADDRESSING (instruction has the operand itself) INDIRECT ADDRESSING (instruction has an address of a Register which contains the address of the operand). Direct Addressing. ANDWF f, 1.
E N D
Addressing MODES • DIRECT ADDRESSING (instruction itself carries the address of the operand) • IMMEDIATE ADDRESSING (instruction has the operand itself) • INDIRECT ADDRESSING (instruction has an address of a Register which contains the address of the operand)
Direct Addressing ANDWF f, 1
Immediate Addressing ANDLW k • There is no address in this case. Operand is already available in the instruction itself. • W = W AND k ; The value of K is directly got from the Instruction register.
Indirect Addressing Address is specified in a Register called FSR INCF INDF, 0
Arithmetic Logic Unit • 8 bit ALU and 8 bit Working Register • Performs arithmetic and boolean functions between Working Register and any register file • ALU may affect values of the Carry(C), Digit Carry(DC) and Zero(Z) bits in STATUS Register
RAM (Data Memory) address generation 1)Direct addressing: Addr mux gets 7 bits from IR and 2 bits from STATUS (RP1,RP0) 2)Indirect addressing: 8 bits from FSR and 1 bit from STATUS (IRP) 3)According to OPCODE, the control unit sends mux select signals to choose appropriate addresses.