Home > Software engineering >  Update array in assembly
Update array in assembly

Time:03-14

Just starting to learn assembly, so I am having trouble with some basic. For example, I am trying to modify a file that normally runs to find the maximum value.

What I am trying to do is iterate through the data_items and modify it by changing the list item, while still maintaining its ability to execute to find the maximum value.

I have tried modifying the start_loop to include an addl data_items, 0x01 but it errors out since it only pulls the first value.

I then adjusted it to do something like addl data_items(,%esi,4), 0x01 and iterate through adjusting it but that didn't work either. I know this is probably very simplistic, but I can't seem to find a method that works.

 #
.section .data
data_items:          #These are the data items trying to modify and store
 .long 3,67,34,222,45,75,54,34,44,33,22,11,66,0

.section .text
.globl _start
_start:
    movl $0,            
  • Related