Can you show me the screen shot of the following assembly code please INCLUDE Irvine32.inc .data lowerLimit dword 20 upperLimit dword 40 array_1 sdword 10,30,25,15,17,19,40,41,43 array_2 sdword 10,-30,25,15,-17,55,40,41,43 array_1_msg BYTE "Sum of array_1 elements within range: ", 0 array_2_msg BYTE "Sum of array_2 elements within range: ", 0 .code main PROC     mov eax, 0          ; initialize sum to zero     mov ebx, offset array_1     mov ecx, lowerLimit     mov edx, upperLimit sum_loop:     cmp ecx, edx        ; check if lower limit <= upper limit     jnle sum_done       ; if not, we're done adding     mov esi, [ebx+ecx*4] ; get array element at index ecx     cmp esi, edx        ; check if array element is within range     jng not_in_range     ; if not, skip adding to sum     cmp esi, ecx        ; check if array element is within range     jnl in_range         ; if so, add to sum not_in_range:     inc ecx             ; increment loop counter     jmp sum_loop in_range:     add eax, esi        ; add array element to sum     inc ecx             ; increment loop counter     jmp sum_loop sum_done:     ; display sum on console for array_1     mov eax, OFFSET array_1_msg     call WriteString     mov eax, eax     call WriteInt     call Crlf     ; display sum on console for array_2     mov eax, 0     mov ebx, offset array_2     mov ecx, lowerLimit     mov edx, upperLimit     mov eax, OFFSET array_2_msg     call WriteString sum_loop_2:     cmp ecx, edx     jnle sum_done_2     mov esi, [ebx+ecx*4]     cmp esi, edx     jng not_in_range_2     cmp esi, ecx     jnl in_range_2 not_in_range_2:     inc ecx     jmp sum_loop_2 in_range_2:     add eax, esi     inc ecx     jmp sum_loop_2 sum_done_2:     mov eax, eax     call WriteInt     call Crlf     ; exit program     mov eax, 0     ret main ENDP END

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Can you show me the screen shot of the following assembly code please

INCLUDE Irvine32.inc

.data
lowerLimit dword 20
upperLimit dword 40
array_1 sdword 10,30,25,15,17,19,40,41,43
array_2 sdword 10,-30,25,15,-17,55,40,41,43
array_1_msg BYTE "Sum of array_1 elements within range: ", 0
array_2_msg BYTE "Sum of array_2 elements within range: ", 0

.code
main PROC
    mov eax, 0          ; initialize sum to zero
    mov ebx, offset array_1
    mov ecx, lowerLimit
    mov edx, upperLimit

sum_loop:
    cmp ecx, edx        ; check if lower limit <= upper limit
    jnle sum_done       ; if not, we're done adding
    mov esi, [ebx+ecx*4] ; get array element at index ecx
    cmp esi, edx        ; check if array element is within range
    jng not_in_range     ; if not, skip adding to sum
    cmp esi, ecx        ; check if array element is within range
    jnl in_range         ; if so, add to sum
not_in_range:
    inc ecx             ; increment loop counter
    jmp sum_loop
in_range:
    add eax, esi        ; add array element to sum
    inc ecx             ; increment loop counter
    jmp sum_loop
sum_done:
    ; display sum on console for array_1
    mov eax, OFFSET array_1_msg
    call WriteString
    mov eax, eax
    call WriteInt
    call Crlf

    ; display sum on console for array_2
    mov eax, 0
    mov ebx, offset array_2
    mov ecx, lowerLimit
    mov edx, upperLimit
    mov eax, OFFSET array_2_msg
    call WriteString
sum_loop_2:
    cmp ecx, edx
    jnle sum_done_2
    mov esi, [ebx+ecx*4]
    cmp esi, edx
    jng not_in_range_2
    cmp esi, ecx
    jnl in_range_2
not_in_range_2:
    inc ecx
    jmp sum_loop_2
in_range_2:
    add eax, esi
    inc ecx
    jmp sum_loop_2
sum_done_2:
    mov eax, eax
    call WriteInt
    call Crlf

    ; exit program
    mov eax, 0
    ret
main ENDP

END

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Hash Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education