/* personal notes of renzo diomedi */



Basix . . Linux . . Dos .. Processore fotonico





Hex digit = Nibble

0x0 = 0000
0x1 = 0001
0x2 = 0010
0x3 = 0011
0x4 = 0100
0x5 = 0101
0x6 = 0110
0x7 = 0111
0x8 = 1000
0x9 = 1001
0xa = 1010
0xb = 1011
0xc = 1100
0xd = 1101
0xe = 1110
0xf = 1111

1 = 00000001 = 0x01
-1 = 11111110+1 = 11111111 = 0xFF

Operand must be a register

Data must be moved into a CPU register from RAM in order to be operated upon. Once the calculations are completed, the result may be copied from the register and placed into a variable

mov dest, src
The source operand is copied from the source operand into the destination operand. The value of the source operand is unchanged. The destination and source operand must be of the same size (both bytes, both words, etc.).
The destination operand cannot be an immediate.
Both operands cannot be memory. If a memory to memory operation is required, two instructions must be used
mov eax, dword [var0]
mov dword [var1], eax

for double-word destination and source operand, the upper-order portion of the quadword register is set to 0.

The only way to access memory is with the brackets [].

Omitting the brackets will not access memory and instead obtain the address of the item. For example:

mov rax, qword [var1] ; value of var1 in rax

mov rax, var1 ; address of var1 in rax































































































~ back ~