Array, delete value [closed]

1

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

    
asked by anonymous 19.05.2016 / 17:27

1 answer

1

I do not understand 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   
    
19.05.2016 / 18:41