Why can\'t I directly move a byte from memory to a 64-bit register in Intel x86-64 assembly?
For instance, this code:
extern printf global main seg
Use move with zero or sign extension as appropriate.
For example: movzx eax, byte [rbp - 1] to zero-extend into RAX.
movsx rax, byte [rbp - 1] to sign-extend into RAX.