Is there any way to make this more efficient?.386            ; assembler use 80386 instructions.MODEL  FLAT    ; use modern standard memory model INCLUDE io.h    ; header file for input/outputcr      EQU     0dh     ; carriage returnLf      EQU     0ah     ; line feedmaxArr  EQU     5       ; constant for array sizeExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORDEXTERN      SEARCH:near32.STACK  4096    ; reserve 4096-byte stack.DATA   ; reserve storage for dataprompt0     BYTE    cr, Lf, 'Please enter 5 numbers.', cr, Lf            BYTE    'This program will then search the array for a specific '            BYTE    'value: ', 0array       DWORD   maxArr DUP (?)  ; array variable, size: maxArrelemCount   DWORD   ?               ; number of elements enteredvalToSearch DWORD   ?               ; value to search forprompt1     BYTE    cr, Lf, 'Which value would you like to search for?: ', 0dwinput     BYTE    16 DUP (?)      ; for inputposlabel    BYTE     cr,Lf,Lf, 'The value was found at position (0 if not found): 'dwoutput    BYTE    16 DUP (?), cr, Lf, 0   ; for outputnoPos       BYTE    cr, Lf, 'The value entered is not present in the array.', 0.CODE   ; program code_start:     ; program entry point    output  prompt0         ; output directions and prompt input    mov     ecx, maxArr     ; initialize ECX with the array capacity value    lea     ebx, array      ; place address of array in EBX    xor     edx, edx        ; initialize EDXgetArrayInput:    input   dwinput, 16     ; get input    atod    dwinput         ; convert to DWORD, place in EAX    jo      subroutine          ; if any overflow, end number entry    mov     [ebx], eax      ; store number in address pointed to by EBX (array                              ; index position)    inc     edx             ; increment counter if number entered so far    add     ebx,4           ; get address of next item of array (4 bytes away)    loop    getArrayInput   ; loop back (up to 5 times)subroutine:    output  prompt1         ; get value to search for    input   dwinput, 16     ; get input    atod    dwinput         ; convert to DWORD, place in EAX    mov     valToSearch, eax    ; store value to search for    mov     elemCount, edx  ; move no. of elements to elemCount     lea     eax, array      ; get starting address of array again    push    eax             ; Parameter 1: push address of array (4 bytes)    push    elemCount       ; Parameter 2: push elemCount by value (4 bytes)        push    valToSearch     ; Parameter 3: push address of valToSearch (4 bytes)    call   SEARCH           ; search for value, return eax    add esp, 12             ; remove arguments from stack    dtoa    dwoutput, eax   ; convert to ASCII    cmp     eax, 0          ; check if eax(position) = 0    je      zeroPosition    ; if position=0, go to error message    output  poslabel        ; output the position    jmp     exitSeq         ; exit the programzeroPosition:       output  noPos   ; output error & exitexitSeq:INVOKE ExitProcess, 0   ; exit with return code 0PUBLIC _start           END            SUBROUTINE:--------------------------------------------------.386            ; assembler use 80386 instructions.MODEL  FLAT    ; use modern standard memory model PUBLIC SEARCH       ; make SEARCH proc visible.CODE   ; program codeSEARCH  PROC   NEAR32    push    ebp         ; save base pointer    mov     ebp,esp     ; establish stack frame    push    ebx         ; save registers    push    ecx    push    edx    pushf               ; save flags    mov     eax, [ebp+8]    ; move value to search for to eax    mov ebx, [ebp+16]       ; move array address to EBX    mov ecx, [ebx]      ;move first element to ECX    cmp ecx, eax        ;comparing search number to the first value in the array    je first                ;If equal return the position.    mov ecx, [ebx+4]        ;move first element to ECX    cmp ecx, eax        ;comparing search number to the second value in the array    je second           ;If equal return the position.    mov ecx, [ebx+8]    cmp ecx, eax    ;comparing search number to the third value in the array    je third                ;If equal return the position.    mov ecx, [ebx+12]    cmp ecx, eax        ;comparing search number to the fourth value in the array    je fourth               ;If equal return the position.    mov ecx, [ebx+16]    cmp ecx, eax        ;comparing search number to the fifth value in the array    je fifth                ;If equal return the position.    jmp nonefirst:                  ;returns position 1    mov eax, 1          jmp donesecond:             ;returns position 2    mov eax, 2    jmp donethird:                  ;returns position 3    mov eax, 3    jmp donefourth:             ;returns position 4    mov eax, 4    jmp donefifth:                  ;returns position 5    mov eax, 5    jmp donenone:                   ;returns 0 if the search value is not found.    mov eax, 0    jmp donedone:retpop:     popf                ; restore flags    pop     edx         ; restore registers    pop     ecx     pop     ebx              pop     ebp         ; restore base pointer    ret                 ; return to mainSEARCH  ENDPPUBLIC SEARCHEND      
Search procedure to find inputted DWORD in MASM Array
homework;assembly