5.1: Immediate and Register addressing modes
1.
Can the programmer of a microcontroller make up new addressing modes? // unless you’re David Barahona you can’t :p
2.
Show the instruction to load 1000 0000 (binary) into R3
MOV R3, 80H or MOV R3, 1000_0000b
3.
Why is the following invalid?
“MOV R2, DPTR”
DPTR is a 16bit register and CANNOT be loaded into a 8bit register like R2.
Unless you break down DPTR into (Data Pointer High) and (Data Pointer Low) which are 8bit register, you can’t do the above instruction.
4.
True or false. DPTR is a 16bit register that is also accessiblte in lowbyte and high byte formats?
Yes! Read #3 lol.
5.
Is the PC (program counter) also avalaible in high and low byte formats?
No, the PC is the only 16bit register that cannot be accessed in 8bit formats like the DPTR. 5.2: Accessing Memory using various addressing modes
1.
The instruction “MOV A, 40H” uses ________ addressing mode. Why?
It uses direct addressing mode since it is loading the 8bit contents at memory location 40H and loading it into the accumulator register.
2.
What address is assigned to register R2 of bank 0?
02H
3.
What address is assigned to register R2 of bank 2?
12H
4.
What address is assigned to register A?
E0h
5.
Which registers are allowed to be used for register indirect addressing mode if the data is in onchip RAM?
In this mode the registers are used as a pointer to the data. R0 and R1 are the only registers used in this addressing mode as pointers (@R0 or @R1). 5.3: Bit Addressing for I/O and RAM
1.
True or false. All I/O ports of the 8051 are bitaddressable
2. True or false . All registers of the 8051 are bitaddressable
3.
True or false . All RAM locations of the 8051 are bitaddressable.
4.
Indicate which of the following registers are bit addressable.
a. A b. B c. R4 d. PSW
e. R7
5. Of the 128 bytes