Question

6 (10 points) What are incorrect in the following assembly program? 1 AREA myCode, CODE EXPORT main main PROC 4 PROC sum 5 6
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The modified code is written in BOLD format

myStr should end with null. So, it is attained by adding 0.

Program :-   

AREA myCode, CODE
   EXPORT __main
__main PROC
   .....
sum       PROC
   .....
       ENDP
   .....
   ENDP
   END
  
   AREA myData, DATA
myStr   DCB "mid term",0
a       DCD   1,2,3,4,5

Add a comment
Know the answer?
Add Answer to:
6 (10 points) What are incorrect in the following assembly program? 1 AREA myCode, CODE EXPORT...
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
  • 6 (10 points) What are incorrect in the following assembly program? 1 AREA myCode, CODE EXPORT...

    6 (10 points) What are incorrect in the following assembly program? 1 AREA myCode, CODE EXPORT main main PROC 4 PROC sum 5 6 ENDP 7 8 ENDP 9 END 10 AREA myData, DATA myStr DCB "mid term" DCD 1,2,3,4,5 11 12 13 Please point out the line number of the incorrect code and give correct ones. 23 6 (10 points) What are incorrect in the following assembly program? 1 AREA myCode, CODE EXPORT main main PROC 4 PROC sum...

  • Find out what the following assembly code calculates AREA my code, CODE EXPORT main ALIGN ENTRY...

    Find out what the following assembly code calculates AREA my code, CODE EXPORT main ALIGN ENTRY main PROC MOVS MOVS MOVS r0,#0 r1,#15 r2,#0 loop CMP BGT MLA ADDS r2,r1 stop re,r2,r2,ro r2,r2,#1 loop % The final result is saved in register r0 stop B stop ENDP END

  • The MIPS assembly program given here is expected to find the sum of elements in array...

    The MIPS assembly program given here is expected to find the sum of elements in array "myArr. Even though the code is syntactically correct, there are four bugs because of which the program is not glving the required output. With the help of the line numbers given identify the bug. Write the line number where you find the bug and give how the correct statement to eliminate the corresponding logical error (10 points partial points given for partial correct answers)...

  • share your program enhance your work after submitting export to repl Due: Oct 12, 2020 05:00...

    share your program enhance your work after submitting export to repl Due: Oct 12, 2020 05:00 pm submit : back to classroom run Instructions from your teacher: #include <iostream> Complete this program. using namespace std; When the program is complete it should ask the user to enter a rectangle's length and width, then display the rectangle's area. The program calls the following functions which need to be completed: double getLength() { // Add code here } double getWidth() { //...

  • Assembly Language Programming Assignment program must be in: MASM assembly language / x86 architecture / irvine...

    Assembly Language Programming Assignment program must be in: MASM assembly language / x86 architecture / irvine library procedures Objectives: 1. using register indirect addressing 2. passing parameters 3. generating “random” numbers 4. working with arrays Description: Write and test a MASM program to perform the following tasks: 1. Introduce the program. 2. Generate ARRAYSIZE random integers in the range [LO = 10 .. HI = 29], storing them in consecutive elements of an array. ARRAYSIZE should be set to 200....

  • The following program simulates shuffling a deck of cards. (The line numbers are not ) part of the code). Without changing its functionality, rewrite the program by replacing the 2D array card [5...

    The following program simulates shuffling a deck of cards. (The line numbers are not ) part of the code). Without changing its functionality, rewrite the program by replacing the 2D array card [52] [2] with a double pointer char **card and replacing the code between line 12 and line 26 with a function. The function prototype could be void shuffleCards (char **, char [, char [) 1 7/Shuffling cards 2 4 using namespace std; 6 main() #include #include <cstdlib> <iostream>...

  • 1) (5 points) The following program is used to display numbers between two intervals include stdio.h...

    1) (5 points) The following program is used to display numbers between two intervals include stdio.h define true 1 define false 0 5 void prime (int low, int high) int i -o, flag-0 ; printf ("Prime numbers between %d and %d are: ", low, high); while (low <high) 10 flag false; 12 13 for (i 0; i <-low/2; ++i) - 15 16 17 if(low % ?--0) flagtrue: break; 19 20 21 if (flagtrue ) 23 24 25 26 27 28...

  • What is the value of  result after the following code executes?   int a = 60; int b...

    What is the value of  result after the following code executes?   int a = 60; int b = 15; int result = 20; if (a = b) result *= 3; 30 20 60 10 code will not execute The numeric data types in C++ can be broken into two general categories which are integers and floating-point numbers singles and doubles real and unreal numbers numbers and characters numbers and literals Which line in the following program will cause a compiler error?...

  • (2+2+1 5 points) Problem 10.1: simple cpu machine code = The following program has been written...

    (2+2+1 5 points) Problem 10.1: simple cpu machine code = The following program has been written for the simple central processing unit introduced in class. The table below shows the initial content of the 16 memory cells. The first column denotes the memory address. Machine Code Assembly Code Description 001 1 0001 0 010 0 1111 1 001 1 0000 3 101 1 0100 110 1 0110 4 111 1 0000 5 6 001 0 001 1 100 1 0001...

  • 1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program!...

    1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program! 3     public static void main(String[] args) { 4         System.out.println("Hello, World!"); 5     } 6 } What is on line 1? a. a variable declaration b. a statement c. a method (subroutine) definition d. a comment e. a class definition 2) Which one of the following does NOT describe an array? a. It can be used in a for-each loop. b. It has a numbered sequence...

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
ADVERTISEMENT