Advanced Embedded Systems Question:
Download Job Interview Questions and Answers PDF
Which register is considered as the destination register for any arithmetic operation?
Answer:
The ‘A’ register called the accumulator is used as the destination register.
Example:
ADD R2, # 12H
This is invalid as 12 is to be added to value present in R2 and data is also stored in R2.
ADD A,# 12H
This is valid as 12 is to be added to the value present in accumulator. Foregoing discussion explains why register A is used as accumulator.
Explain LCALL.
☛ It is called long call and is a 3 byte instruction.
☛ Here 1st byte is used for opcode &2nd & 3rd bytes are used for address of target subroutine.
☛ Call subroutine can be used anywhere within 64 K- byte address space.
☛ Processor automatically saves on stack the address of instruction immediately below LCALL.
☛ After execution instruction return (RET) transfers control back to next instruction.
Example:
ADD R2, # 12H
This is invalid as 12 is to be added to value present in R2 and data is also stored in R2.
ADD A,# 12H
This is valid as 12 is to be added to the value present in accumulator. Foregoing discussion explains why register A is used as accumulator.
Explain LCALL.
☛ It is called long call and is a 3 byte instruction.
☛ Here 1st byte is used for opcode &2nd & 3rd bytes are used for address of target subroutine.
☛ Call subroutine can be used anywhere within 64 K- byte address space.
☛ Processor automatically saves on stack the address of instruction immediately below LCALL.
☛ After execution instruction return (RET) transfers control back to next instruction.
Download Advanced Embedded Systems Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell me in which registers the immediate values cannot be directly loaded? | Tell me how does combination of functions reduce memory requirements in embedded systems? |