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

  • 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() { //...

  • The following program supposes to calculate the area of a rectangle and produce the following output....

    The following program supposes to calculate the area of a rectangle and produce the following output. Area of rectangle = 20 Unfortunately, the program has Compile-time and Run-time errors that prevent the program from running and producing the correct result. Using the table 2.1 below, allocate the error(s) on each program line. 1 class Rectangle{ 2 int length 3 Int width; 4 viod insert(int l, int w){ 5 length == l; 6 width = ww; 7 8 void calculateArea( {...

  • 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>...

  • Question 116 pts (TCO 2) What is the output of the following code?                         void func(int...

    Question 116 pts (TCO 2) What is the output of the following code?                         void func(int x)                         {                                     x = x * 2;                         } int main( ) {         int x = 10;         func(x);         cout << x << endl; } 20 30 10 5 Question 126 pts (TCO 2) A derived class is typically an example of _____. a “has a” relationship an “is a” relationship a “uses a” relationship an “is used” relationship Question...

  • 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?...

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