Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I just need Q1) c,d,e Q2) d,e And all Q3 EE 264 Homework Assignment Due 10/2/18

ID: 3755078 • Letter: I

Question

I just need Q1) c,d,e Q2) d,e And all Q3
EE 264 Homework Assignment Due 10/2/18 1. Write one line of HCS12 assembly language to do the following. (Note that adds and subtracts are without carry.) a Add the number hexadecimal C7 to register A b. Subtract the contents of memory location $16CF from e. Fetch data from the memory location indicated by d Decrement register Y by 2 and then use it as the e. Move 1 word (16 bits) from the location indicated by t Exchange the contents of register D with the contents register B register Y plus 4 and add it to register B address to fetch data and load it into register A register X to the location indicated by register Y of register X 2. Briefly explain what each line of HCS12 assembly language does: CLRB b. INCA c. SUBA #7 d. ADCB 2,X+ DEX 3. Consider the following HCS12 Assembly Language code: CON EQU $10 ORG $0080 ATA FCB $80 ; data declared here DATA2 FCB $50 ORG $co00 LDAA DATA1 ; instructions start here SUBA DATA2 SUBA #CON a Where are the bytes of data DATAl and DATA2 located in memory? is the memory address of the first i e. Does DATA1 have an initial value? If so, what is it? d what is the significance of the # in front of CON in the e. What is in register A after the three instructions have r What is the significance of the semicolon (:) in some third instruction? been executed? lines?

Explanation / Answer

1.

(a) CLRA
(b) ADDB C7
(c) ADDA #0054
(d) SUBB #16CF
(e) LDAX
STAA
(f) LDAY+LDA8
   STAB

2.
(a) CLRB is used to clear register B
(b) INCA is used toincrement register A
(c) SUBA #7 is used to subtract a number from address 7 to A
(d) TFR X,Y is transfer from register X to Y