Upload
sabrina-garrett
View
212
Download
0
Embed Size (px)
Citation preview
Four LEDs are connected to Port 4, bits 0 thru 3. Indicate which LEDs are ON/OFF after each instruction is executed.
Quiz 4.1
mov.b #0x0f,&P4DIR
1. and.b
#0xf0,&P4OUT
2. bis.b
#0x09,&P4OUT
3. xor.b
#0x0f,&P4OUT
4. bic.b
#0x06,&P4OUT
5. add.b
#0x03,&P4OUT
P4.7
P4.6
P4.5
P4.4
P4.3
P4.2
P4.1
P4.0
Quiz 4.2
1. ALU
2. Clocks
3. Control
4. I/O
5. Memory
6. Peripherals
7. Registers
a. Address space
b. Execution speed
c. External devices
d. Fast memory
e. Finite State Machine
f. Memory mapped
g. Word length
Match the following terms:
Nam
e___________________
Sectio
n_______
Quiz 4.3
1. add.w tab(r10),r9
2. and.w &mask,r12
3. bis.b #0x08,r6
4. mov.b cnt,r11
5. mov.w r4,r5
6. mov.w #100,r14
7. sub.w @r4+,r5
8. xor.b @r8,r15
a. Absolute
b. Constant
c. Immediate
d. Indexed register
e. Indirect auto-increment
f. Indirect register
g. Register
h. Symbolic
Match the following source operand modes:
PCPCPCPC
Quiz 4.4Present the destination operand of the following instruction to the ALU: add.w r4,cnt ; M[cnt] += r4
cnt
Memory
Registers
CPU
ADDER
IR
PC
ALU
0x5480
R40x021
8
0x5480