I\'m very new to assembly, and have some very basic questions.
What is the difference between these four commands?
mov ebx, eax
mov [ebx], eax
mov eb
You were missing the operand delimiter , in the instructions. I don't know (yet) of any assembler without it. I fixed that in the quotes.
In x86 assembly some registers can be used as data registers or as address registers (a difference to other architectures). These registers are called GPRs ("General Purpose Registers"). They can contain 32-bit-values or 32-bit addresses. Their "names" are EAX,EBX,ECX,EDX,ESI,EDI,ESP,EBP.
mov ebx, eax
does move the value in EAX to EBX.
mov [ebx], eax
does move the value in EAX to the 32-bit DWORD value pointed to by the 32-bit address in EBX
mov ebx, [eax]
does move the 32-bit DWORD value pointed to by the 32-bit address in EAX to EBX
mov [ebx], [eax]
is an invalid instruction in 32-bit Intel assembly, because basic x86 assembly does not support two memory operands in one (two-operand) instruction. Newer instructions (SSE, AVX) with three or four operands are able to use more than one memory operand. This is a result of a more complex instruction encoding (using instruction prefixes).