Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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**

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

11. Are your speaking notes helpful and effective?

Answered: 1 week ago

Question

The Goals of Informative Speaking Topics for Informative

Answered: 1 week ago