.lcomm var1 8 .global _start _start: # load the address of "var1" into register %eax movl $3,%eax # eax = 3 movw $0xabcd,var1(,%eax,2) # ((short int*)var1)[eax] = 0xcd movl $0, %ebx movl $1, %eax int $0x80