Question
E2.1 Identify the four fields of the following instructions: (a) addwf OxlO,W,A ;add register 0x10 to WREG (b) wait btfss STATUS,F,A ; skip the next
E2.1 Identify the four fields of the following instructions:
(a) addwf OxlO,W,A ;add register 0x10 to WREG
(b) wait btfss STATUS,F,A ; skip the next instruction if the C flag is 1
(c) decfsz cnt, F, A ; decrement cnt and skip if it is decremented to 0
E2.2 Find the valid and invalid labels in the following instructions and explain why an invalid label is invalid. column 1 L
a. sum-hi equ 0x20
b. low-t incf WREG, W,A ; increment WREG by 1
c. abc: movwf 0x30, A
d. 5plus3 clrf 0x33, A
e. _may decf 0x35, F, A
f. ?less iotwf OxlA, F, A
g. twot_hree goto less
E2.3 Use an assembler directive to define a string "Please make a choice (112):" in program memory.
E2.4 Use assembler directives to define a table of all uppercase letters. Place this table in pro- gram memory starting from location 0x2000. Assign one byte to one letter.
E2.6 Write an instruction sequence to decrement the contents of data memory locations 0x10, 0x1 1, and 0x12 by 5, 3, and 1, respectively.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started