Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Compute sum of the four digits in your AccessID and print it out. Please initialize your access ID as input data by using DC syntax.

Compute sum of the four digits in your AccessID and print it out. Please initialize your access ID as input data by using DC syntax. Your output should be in this format:

My AccessID is ab1234

The sum is 10

Paste your code and screenshot of the output.

.

.

Please create a very, very simple program as I am only a beginner. You don't need to store the four digits as variables. This is what I have so far. I am getting an error and I also need the program to display the access ID that I entered in and to display the sum of the numbers stored in D1. PLEASE don't create a complicated program, just build on the one I have here.

I will rate up, again please keep it simple! Thank you!

.

*-----------------------------------------------------------

ORG $1000

START: ; first instruction of program

LEA TXT,A1

MOVE.B #14,D0

TRAP #15

MOVE.B #4,D0

TRAP #15

MOVE.B #1,D1

ADD.B #2,D1

ADD.B #3,D1

ADD.B #4,D1

MOVE.B #9,D0

TRAP #15

* Put variables and constants here

CR EQU $0D ; define const

LF EQU $0A ; define const

TXT DC.B 'Enter Access ID: ',CR,LF,

'My AccessID is: ',CR,LF,

'The sum is',0

END START ; last line of source

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