Microprocessor 8051 help

Discussion in 'Homework Help' started by delp307, Jun 5, 2011.

  1. delp307

    Thread Starter New Member

    Jun 5, 2011
    Hi guyz, i need help on the following questions

    1. Give an example instruction of every addressing mode of 8051 and explain in detail
    how the addressing mode is used in the instruction. If your example instruction has two
    operands, tell which one of the operands is addressed by the mode you have mentioned.

    2. Write different short programs that
    a) clear the two least significant bits of R2 without changing the other bits,
    b) set the three most significant bits of R3 without changing the other bits,
    c) subtract the contents of the accumulator from register R4. SUBB A,R4

    3. What are the contents of the accumulator after the execution of the following instructions?
    It is assumed that the contents are 55H before each instruction.
    a) INC A
    b) ADD A,#10B
    c) ANL A,#33H
    d) ORL A,#33H
    e) RR A
    f) CPL A

    4. Intel 8051 external memory locations 3001...304FH contain 8-bit binary numbers. Write a
    program that calculates how many of the numbers are equal to 0 and writes the result in
    memory location 3000H.

    5. How have the contents of Intel 8051 memory changed when the following program has
    been executed? Notice that also registers and special function registers are located in the
    memory. Register bank 0 is in use.

    MOV R0,#2H
    MOV R1,0H
    MOV DPTR,#8800H
    MOV A,#0AAH
    CPL A
    SETB C
    RLC A
    L1: INC DPTR
    DEC R0
    MOV A,R0
    CJNE A,#0H,L1
    ADD A,R1
    L2: SJMP L2
  2. beenthere

    Retired Moderator

    Apr 20, 2004
  3. delp307

    Thread Starter New Member

    Jun 5, 2011
    I have seen the instruction set, but the problem is i am not so familiar with microprocessor , so i just need help for the answers from anyone who will be a ble to do it. I have tried but am still stuck in all of those question. For question no1 its oki, i got it done, but the rest, am stuck, i dont know where to start