Question: Intro Microprocessor System (CDA 3331C) MSP430G2553 Microprocessor Used **TYPE THE SOLUTION PLEASE** An example of an assembly program is given below: .cdecls C,LIST,msp430.h .text .retain

Intro Microprocessor System (CDA 3331C)

MSP430G2553 Microprocessor Used

**TYPE THE SOLUTION PLEASE**

Intro Microprocessor System (CDA 3331C) MSP430G2553 Microprocessor Used **TYPE THE SOLUTION PLEASE**

An example of an assembly program is given below:

.cdecls C,LIST,"msp430.h"

.text .retain .retainrefs

RESET mov.w #WDTPW|WDTHOLD,WDTCTL mov.w #__STACK_END,SP mov.w #007Dh,&0200h ;the first number mov.w #00B5h,&0202h ;the second number mov.w #00E8h,&0204h ;the third number

jmp $

;------------------------ ;Stack Pointer definition ;------------------------ .global __STACK_END .sect .stack ;------------------- ;Interrupt Vectors ;------------------- .sect RESET_VECTOR .short RESET .end

I was given this, I dont think its correct since its not in an assembly program, here it is:

7.2

Part: A

MVI A, 2H ;Copy value 2H in register A

MVI B, 4H ;Copy value 4H in register B

DATA SEGMENT

NUM1 DB 8H

NUM2 DB 8H

SUM DB ?

ENDS

CODE SEGMENT

ASSUME DS:DATA CS:CODE

START:

MOV AX,DATA

MOV DS,AX

MOV AL,NUM1

ADD AL,NUM2

MOV SUM,AL

INT 21H

ENDS

END START

Part: B

0100 + 0100 = 1000 (overflow flag is turned on)

1000 + 1000 = 0000 (overflow flag is turned on)

Part: C

0100 + 0001 = 0101 (overflow flag is turned off)

0110 + 1001 = 1111 (overflow flag is turned off)

1000 + 0001 = 1001 (overflow flag is turned off)

1100 + 1100 = 1000 (overflow flag is turned off)

7.2 Write a program in assembly language such that: a. Two binary numbers are saved in two separate memory locations. b. Asthe numbers areadded, an overflow will cCor. c. As the numbers are added, no overflow occurs. 7.2 Write a program in assembly language such that: a. Two binary numbers are saved in two separate memory locations. b. Asthe numbers areadded, an overflow will cCor. c. As the numbers are added, no overflow occurs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!