I am trying to learn how to shuffle a deck using assembly language. I am fluent in java and I can easily translate java into C but I'm having a hard time with ASM. this is the block of code I have issues with right now:
MOV R8, [RDI+RSI*4]
MOV R9, [RDI+RDX*4]
MOV [RDI+RSI*4], R9
MOV [RDI+RDX*4], R8
I keep getting
error: impossible combination of address sizes
It was run with the command
nasm -f elf FILE-NAME.asm
I'm guessing it has issues with the registers I am using but I have no idea about the rules in assembly. I am learning using tutorialspoint but if anyone has any recommendations about other places I could learn better about it, that would be helpful. I also saw on this answer that all the registers used have the same size, so why the error?