How would I go about indexing and declaring arrays in AT&T assembly?
Declaring do I do it like this:
array:
.zero 256
Creates array of 256, with values of zero.
Indexing it do I do it like this:
movq $array, %r14 //Set array to a register name
//Say that r11 has the number 5 stored
movq (%r14, %r11, 8), %r15 //This will make r15 at index 5 of array
movq %rbx ,%r15 //This will store value of rbx into r15
Is this how I do it? If not, how do I go about creating and indexing arrays in AT&T assembly?