Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

3150 - Module #4

Adressing Mode

QuestionAnswer
What addressing modes does 8051 support? 8051 supports: Register, Implied, Direct, Indirect, Immediate, Relative, Absolute, Long, and Indexed addressing modes.
For register addressing, explain the instruction format. You have 5 bits for the op.code and the 3 least significant bits to specify the register (1 byte).
What addressing mode represents the following instruction? ADD A, R7 This is register addressing mode.
Is this a valid instruction? Why or why not? MOV R4, R7 No, you can't move data between Rn registers. You must first move data into the accumulator then into the desired register.
Is this a valid instruction? Why or why not? MOV DPTR, A No, the source and destination registers must match in size.
What addressing mode represents the following instruction? MOV A, 7 This is register addressing mode.
What addressing mode represents the following instructions? INC DPTR - and - MUL AB This is implied addressing mode.
For implied addressing, explain the instruction format. When referring to specific registers, you don't need address bits. Therefore, only op.code indicates the register involved.
What is direct addressing mode used for? Direct addressing mode allows access to any on-chip variable or hardware register.
For direct addressing, explain the instruction format. You have 1 byte for op.code and 1 byte appended for the location being used. Therefore, direct addressing is 2 bytes.
What addressing mode represents the following instruction? MOV P1, A This is direct addressing mode.
For indirect addressing, explain the instruction format. You have 1 byte in total for indirect addressing, 7 bits of op.code and the least significant bit specifies which address (R0 or R1).
Explain how indirect addressing mode works. In 8051, R0 and R1 can essentially be a 'pointer' register. Indirect addressing is identified by "@" with either R0 or R1 following.
What addressing mode represents the following instruction? MOV A, @R1 This is indirect addressing.
Explain how immediate addressing mode works. Identified by the "#" symbol, the operand may be a numeric constant, a symbolic variable, or an arithmetic expression using constants, symbols, and operators. The assembler calculates the expression and substitutes the result into the instruction.
For immediate addressing, explain the instruction format. You have 1 byte for the op.code and 1 byte for the immediate data.
Is this a valid instruction? Why or why not? MOV DPTR, #68975 No because 68975 > 65535.
What addressing mode represents the following instruction? MOV A, #12 This is immediate addressing mode.
How long is the following instruction? What's so special about this instruction? MOV DPTR, #8000H This is a 3-byte instruction with a 16-bit constant. When using the data pointer, we need a 16-bit constant.
For relative addressing, explain the instruction format. You have 1 byte for op.code and 1 byte for the relative offset (positive or negative).
When do we use relative addressing? We use relative addressing mode with certain jump instructions.
Explain how relative addressing mode works. A relative address, an 8-bit signed value, is added to the contents of the PC. This forms the address of the next instruction to be fetched and executed.
What's the jump range for relative addressing? The range for jumping is -128 to +127 locations.
For absolute addressing, explain the instruction format. This is a 2-byte instruction, 11 bits for the destination address and 5 bits for the op.code. You have the 3 most significant bits for the destination address, 5 bits for the op.code, and the 8 least significant bits are also the destination address.
When do we use absolute addressing? We use absolute addressing for ACALL and AJMP instructions. We use absolute addressing to jump anywhere in external memory (64K bytes)
Explain how absolute addressing mode works. For absolute addressing, these 2-byte instructions allow branching within the current 2K page of code memory.
What's the jump range for absolute addressing? Why? You can jump anywhere within the same 2K page of code memory. This is because the upper 5 bits of the destination address are the current value of the upper 5 bits of the PC.
For long addressing, explain the instruction format. You have 1 byte for op.code and 2 bytes for the destination address. This results in a 3 byte long instruction.
When do we use long addressing? We use long addressing for LCALL and LJMP instructions.
For index addressing, explain the instruction format. This is a 1 byte instruction which is made up of the effective address. The effective address is determined by adding the base register (PC or DPTR) to the offset (accumulator).
Explain how index addressing mode works. Index addressing uses a base register (either the PC or DPTR) and an offset (ACC) in forming the effective addressing.
When do we use index addressing? We use index addressing for JMP and MOVC instructions.
What must be within the same 2K page of code memory for absolute addressing? The next instruction after the branch and the destination instruction must be within the same 2K page of code memory.
How many 2K pages does 8051 have? 32. This implies that there's 64K memory in 8051.
MOV R5, R7 is ____________. illegal
Direct addressing allows access to _____________. any on-chip variable or hardware register
In 8051 assembly language, indirect addressing is identified as __________. @
Relative addressing allows a jump in the range of ___________. -128 to +127 bytes
Absolute addressing is used with _______ and _________ instructions. AJMP, ACALL
Long addressing is used with _________ and _________ instructions. These instructions are _______ bytes long. LCALL, LJMP, 3
Index addressing uses ________ and ________ as a base register. program counter, data pointer
MOV A, 55H means _______________________________________. moves the value at 55H into the accumulator
MOV A, #55H means ______________________________________. moves the value 55H into the accumulator
Direct addressing is a ______ bytes instruction. 2
Created by: bmcisme
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards