Assembly - Moving through a register/array with an offset of 5
问题 Quick question. This code will not compile: mov eax, dword [rbx+rsi*5] I don't expect it to, with the explaination that mov and multiplication are two different CPU operations. The only reason it can be achieved is through bit-shifting. However, this does compile: mov eax, dword [lst+rsi*5] With "lst" being a variable array. It also produces output when used in context (so the code compiles AND runs). What's the explanation for why this works? yasm -Worphan-labels -g dwarf2 -f elf64 NAME.asm