Array, delete value

Asked

Viewed 70 times

1

Good afternoon, someone can get some hint for an exercise in which it is necessary to go through an array and if you find a certain value delete it from the array, this in Assembly. Any hint?

1 answer

1

I don’t know much about Assembly but it can be done like this:

   str1    Array   1,2,4,7,67,99,100,323,421,10

   start:
       call    Deletar
       call    Crlf
       call    Crlf
       call    esperarMsg

   Deletar Proc
       mov     esi, offset str1 
       mov     ecx, 10

   PrintArray:
       mov     eax, [esi]
       call    WriteDec
       mov     eax, " "
       call    WriteChar

   NextNum:
    add     esi, 4
    loop    PrintArray

   Done:    
    ret
Deletar endp   

Browser other questions tagged

You are not signed in. Login or sign up in order to post.