Question: Write a program in Easy68k Assembly Language Compute sum of the four digits in your AccessID and print it out. Please initialize your access ID

Write a program in Easy68k Assembly Language

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

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!