Machine Code: Assembly Code:Here's the terminology we'll be using for the rest of the semester:
Address Instruction Operands
0: 55 push ebp
1: 89 e5 mov ebp,esp
3: b8 07 00 00 00 mov eax,0x7
8: 5d pop ebp
9: c3 ret
mov eax,1234 ; I'm returning 1234, like the homework says...(executable NetRun link)
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 |
mov eax,0 ; Clear eax(executable NetRun link)
mov ah,0xAB ; Move "0xAB" into the next-to-the-last byte of eax
Machine Code: Assembly Code:Like x86, PowerPC machine code consists of bytes, with addresses, that represent assembly instructions and operands. PowerPC machine code also spends most of its time manipulating values in registers.
Address Instruction Operands
0: 38 60 00 07 li r3,7
4: 4e 80 00 20 blr