I am trying to make a small ping pong game in nasm assembly(thats the way i learn languages :) ) but i am having a problem ,i cant access any item of a list
my code:
mov eax,counter ;counter=2 double checked
mov esi,bitmap_data+eax*4 ;copy the 2nd item of the array in to esi
bitmap data is in.bss section
bitmap_data: resd 100
tried:
mov eax,2
mov esi,[bitmap_data+eax*4] ;copy the 2nd item of the array in to esi
this is not saving in the esi the correct (2th) element of the list while the following is doing it right
mov esi,[bitmap_data+2*4]
but i need to be able to change the item that i am getting by using a variable