Question

Draw a flowchart that corresponds to code

                  MOV ECX, LENGTHOF array

                  MOV EAX, 0

                  MOV ESI, OFFSET array

            L1: ADD EAX, DWORD PTR [ESI]

                  JC L2

                  ADD ESI, TYPE array

                  LOOP L1

                  JMP L3

            L2: MOV EAX, 0

            L3: MOV sum, EAX


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Draw a flowchart that corresponds to code
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • rnte a P instruction with indirect addressing, and call the ReadChar ein AL.)(10 pts.) BYTE named myString. Use the LOO edure from the book's link library- (ReadChar-returns its valu 50. Code a P...

    rnte a P instruction with indirect addressing, and call the ReadChar ein AL.)(10 pts.) BYTE named myString. Use the LOO edure from the book's link library- (ReadChar-returns its valu 50. Code a PROC declaration for a procedure named MySub. Use the USES operator to preserve the EAX and EBX registers. 51. Draw a flowchart that corresponds to the following code: (6 pts.) mov ecx, LENGTHOF array mov eax, 0 mov esi, OFFSET array L1: add eax, [esi] add esi, TYPE...

  • Create a flowchart for the following algorithm Program: (exchange.asm) Thia program exchanges every pair of values in a...

    Create a flowchart for the following algorithm Program: (exchange.asm) Thia program exchanges every pair of values in an array of even numbe red size model flat,stdcall stack 4096 ExitProcess PROTO, dwExitCode: dword data arrayDW dword 1, .code main PROC ov esi initialize index register with 0(i-0) loop counter mov ecx, LENGTHOF arrayDw) /2 L1 mov eax, arrayDW[esi) mov ebx, arrayDW [esi 41 mov arrayDW[esi], ebx move the item i into EAX 2move item 141 into EBX move item i+1 into...

  • sample bubble sort code: ;---------------------------------------------------------- BubbleSort PROC USES eax ecx esi, pArray:PTR DWORD, ; pointer to...

    sample bubble sort code: ;---------------------------------------------------------- BubbleSort PROC USES eax ecx esi, pArray:PTR DWORD, ; pointer to array Count:DWORD ; array size ; ; Sort an array of 32-bit signed integers in ascending ; order, using the bubble sort algorithm. ; Receives: pointer to array, array size ; Returns: nothing ;----------------------------------------------------------- mov ecx,Count dec ecx ; decrement count by 1 L1: push ecx ; save outer loop count mov esi,pArray ; point to first value L2: mov eax,[esi] ; get array...

  • sample bubble sort code: ;---------------------------------------------------------- BubbleSort PROC USES eax ecx esi, pArray:PTR DWORD, ; pointer to...

    sample bubble sort code: ;---------------------------------------------------------- BubbleSort PROC USES eax ecx esi, pArray:PTR DWORD, ; pointer to array Count:DWORD ; array size ; ; Sort an array of 32-bit signed integers in ascending ; order, using the bubble sort algorithm. ; Receives: pointer to array, array size ; Returns: nothing ;----------------------------------------------------------- mov ecx,Count dec ecx ; decrement count by 1 L1: push ecx ; save outer loop count mov esi,pArray ; point to first value L2: mov eax,[esi] ; get array...

  • Task is to implement the following algorithms in Assembly language for x86 processor

    Task is to implement the following algorithms in Assembly language for x86 processor1) Insertion sort Demonstrate Sorted Array of 10 elements in Watch Window for each one Running time of each algorithmsample bubble sort code:;----------------------------------------------------------BubbleSort PROC USES eax ecx esi,pArray:PTR DWORD, ; pointer to arrayCount:DWORD ; array size;; Sort an array of 32-bit signed integers in ascending; order, using the bubble sort algorithm.; Receives: pointer to array, array size; Returns: nothing;-----------------------------------------------------------mov ecx,Countdec ecx ; decrement count by 1L1: push ecx ; save outer...

  • X86 Assembly Language Help to implement the CipherChar Procedure at the end of the given code...

    X86 Assembly Language Help to implement the CipherChar Procedure at the end of the given code INCLUDE Irvine32.inc         .data       KeyPrompt BYTE "Enter the passphrase: ",0       TextPrompt BYTE "Enter the plaintest: ",0           str1 BYTE "The passphrase has length:",0           str2 BYTE "The plaintest has length:",0       KeyIs BYTE "The passphrase: ",0       PlainTextIs BYTE "The plaintext: ",0       CipherTextIs BYTE "The ciphertext: ",0       KMAX = 64                        ; passphrase buffer maximum size       BMAX = 128                       ; test...

  • Assembly language. You can see the question in blue box. Loop Instruction Problem 4: Write and...

    Assembly language. You can see the question in blue box. Loop Instruction Problem 4: Write and run a program and answer the questions in the box. .data temp dword? First, build and run the program .code - Trace ECX value mov eax,0 ECX=? mov ecx, 10 ; outer loop counter - EAX =? L1: Second: If we removed mov ecx, temp mov eax, 3 What will happen? mov temp.ecx mov ecx,5 ; inner loop counter - build and run the...

  • MASM Assembly Language programming question. I'm having serious issues. I am attempting to scan through a...

    MASM Assembly Language programming question. I'm having serious issues. I am attempting to scan through a string and replace all the "o" characters with an exclamation mark (!). However my program does not work and no change seems to occur to the string. Also the loop breaks once the first "o" character is encountered.Is there anyone in this Universe that can help me???Please main PROC    ;mov edi,OFFSET string    mov ecx, LENGTHOF string    mov edi,OFFSET string    L1:...

  • Assembly Please answer the following above, compile and single step through the program, writing...

    Assembly Please answer the following above, compile and single step through the program, writing down the value of the destination for each instruction. 1. Using Visual Studio on the system, create a project using the code given below unsigned char short int int gArray 0x09, 0xFA, 0x5A, 0x18, 0x48, 0xAC, 0xD4, 0x71 ; cAr rays 1 [ ] = { 0:09, 0xfa, Ox5A, Ox18, 0x48, OxAC, OxD4, 0x71 }; gArray! [ ] = { Ox09, OxFA, Ox5A, Ox18, 0x48, OxAC,...

  • And also when recursive(5). Consider the following funtion int recursive(int n) f The assembly code equivalent...

    And also when recursive(5). Consider the following funtion int recursive(int n) f The assembly code equivalent of the above function is: recursive push %ebp mov %esp,%ebp push %ebx sub $0x14,%esp cmpl $0x1,0x8(%ebp) je L1 cmpl $0x2,0x8(%ebp) jne L2 L1 mov 0x8 (%ebp),%eax jmp L3 L2 mov 0x8 (%ebp),%eax sub $0x1,%eax mov %eax, (%esp call recursive mov %eax,%ebx mov ox8(%ebp),%eax sub $0x2,%eax mov %eax, (%esp call recursive imul %ebx,%eax L3 add $0x14,%esp pop %ebx pop %ebp ret

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