mov eax,1234 ; I'm returning 1234, like the homework says...There are several parts to this line:
mov eax,Yup, line-oriented stuff is indeed annoying. Be careful that your editor doesn't mistakenly add newlines!
1234 ; I'm returning 1234, like the homework says...
Size |
Register names |
Meaning (note: not the official meanings!) |
Introduced in |
8-bit |
al,ah, bl,bh, cl,ch, dl,dh |
"Low" and "High" parts of bigger registers |
1972, Intel 8008 |
16-bit |
ax, bx, cx, dx, si, di, sp, bp |
"eXtended" versions of the original 8-bit registers |
1978, Intel 8086/8088 |
32-bit |
eax, ebx, ecx, edx, esi, edi, esp, ebp |
"Extended eXtended" registers |
1985, Intel 80386 |
64-bit |
rax, rbx, rcx, rdx, rsi, rdi, rsp, rbp, r8, r9, r10, r11, r12, r13, r14, r15 |
"Really eXtended" registers |
2003, AMD Opteron / Athlon64 2004, Intel EM64T CPUs |
xor eax,eax ; Clear eax, by xor'ing it with itself.
mov ah,0xAB ; eax is return result register.