Question

1. Briefly explain what the overall purpose of this program is and complete the memory table below which should show what is2. Assuming you have the same data section as in the above, write a pro- gram that adds 1 to each of the five numbers in memo

ANSWER NUMBER 2 PLEASE

1. Briefly explain what the overall purpose of this program is and complete the memory table below which should show what is in memory after the program has been run. (e.g. Purpose: finds largest of five numbers) $1000 DC.B $18, $39, $E1, $8B, $15 ORG TABLE ORG $2000 LDX #TABLE LDAB #5 LDAA 0, X STAA 5, X LOOP INX DBNE B, LOOP BRA $1000 $1001 $1002 $1003 $1004 $1005 $1006 $1007 $1008 $1009
2. Assuming you have the same data section as in the above, write a pro- gram that adds 1 to each of the five numbers in memory. This must be done using a program loop.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

ORG $1000

TABLE DC.B $18,$39,$E1,$8B,$15

ORG $2000

LDX #TABLE

LDAB #5

LOOP LDAA 0,X

ADDA #1

STAA 0,X

INX

DBNE B,LOOP

BRA *

Add a comment
Know the answer?
Add Answer to:
ANSWER NUMBER 2 PLEASE 1. Briefly explain what the overall purpose of this program is and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can anybody briefly explain what this assembly program does? Question 2.1) Consider the following program: [3...

    Can anybody briefly explain what this assembly program does? Question 2.1) Consider the following program: [3 marks] ORG $7000 dc.b $11,$22,$33,$44,$55,$66,$77 LDS #$ 1000 LDX #$ 7000 LDAB #$7 LOOP1: LDAA 0,X PSHA INX DECB BNE LOOP1 LDX #$ 7000 LDAB #$7 LOOP2: PULA STAA 0,X INX DECB BNE LOOP2 WAI

  • HCS12 Question 1: Fill the blank cells below. Assume that X=$1000. (20 marks) Addressing mode Effective...

    HCS12 Question 1: Fill the blank cells below. Assume that X=$1000. (20 marks) Addressing mode Effective address [A] Instruction LDAA 2,X+ LDAB #SA ABA STAA 4,X LDAA (1,FFD] 00 10 01 C1 18 Address FFD FFE FFF 1000 1001 1002 1003 1004 1005 1006 38 Memory content DF EE 01 4C

  • b. The program code below involves IO. The first line of an interrupt (IRQ) service routine is also shown. Describe...

    b. The program code below involves IO. The first line of an interrupt (IRQ) service routine is also shown. Describe the purpose of each line of code and insert suitable comments EQU $1003 EQU $1007 EQU $4FFF IRQVECT EQU SFFF2 PORTC DDRC STACK ORG $1000 START SEI #STACK LDS LDD #INTSERV STD IRQVECT #S0F LDAA STAA DDRC PORTC STAA CLI More code ORG $2000 INTSERV LDAB PORTC [8 marks b. The program code below involves IO. The first line of...

  • For each code fragment below, show a memory diagram that traces the execution of the calling...

    For each code fragment below, show a memory diagram that traces the execution of the calling method. d) //calling method intp data = {1, 3, 5); method(datal2 public static int methodliot size) nt source new intfsize: for (int i-0; issourclength:i) sourceli)-size; return source; Heap Identifier Address Contents Main Stack Frame 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 Identifier Address Contents 101 102 103 Method Stack Frame Identifier Address Contents 200 201 202

  • //calling method int[] data = {7, 4, 3, 2}; int size = 2; method(data, size); public...

    //calling method int[] data = {7, 4, 3, 2}; int size = 2; method(data, size); public static int[] method(int[] array, int length) {             int[] result = new int[length];             for (int index = 0; index < length && index < array.length; ++index)                         result[index] = array[index];             return result; }                                                                                                                         Heap Identifier Address Contents 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 Main Stack Frame         Identifier Address Contents 101 102 103...

  • (30 points; 6 points each part) For each code fragment below, show a memory diagram that traces t...

    (30 points; 6 points each part) For each code fragment below, show a memory diagram that traces the execution of the calling method. 2. a) //main method nt data-14,7,3; method(data, 0); public static void method(int[l array, int value) for (int index array,length/2; index

  • the language i wan used in C# is visual basic.Create a console program that contains the...

    the language i wan used in C# is visual basic.Create a console program that contains the following ·         A Class named Account with the following properties: o   public int Id { get; set; } o   public string Firstname { get; set; } o   public string Lastname { get; set; } o   public double Balance { get; set; } o   public DateTime CreationDate { get; set; } o   Create a constructor that initializes all of the properties. o   Create a ToString...

  • Write a program that will first receive as input the name of an input file and an output file. It will then read in a list of names, id #s, and balances from the input file specified (call it InFile.t...

    Write a program that will first receive as input the name of an input file and an output file. It will then read in a list of names, id #s, and balances from the input file specified (call it InFile.txt) which you will create from the data provided below. The program will then prompt the user for a name to search for, when it finds the name it will output to a file (call it OFile.txt) the person’s id#, name,...

  • SQL QUERIES 1) Using the Product and PC relations, create both tables in your database and...

    SQL QUERIES 1) Using the Product and PC relations, create both tables in your database and insert all the data. Show the SQL statements to create each table and show a representative SQL insert statement for the data in each table (i.e. you do not need to show insert statements for all the data). – For the remaining questions, assume that your SQL is part of a program function and the function provides the input needed for your SQL query....

  • Please help we are suppose to explain what the C code does. This is the electronics database (6 pts) This problem is...

    Please help we are suppose to explain what the C code does. This is the electronics database (6 pts) This problem is based on Electronics database. Add some annotations to the following table to explain what the C program is doing in detail. Note that "void" is how C declares a function that does not return anything. You are expected to generalize or research svntaxes not mentioned in the lecture C Program Annotation void newPCproduct EXEC SQL BEGIN DECLARE SECTION;...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT