Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/0xffset/x86-assembly

A lot of x86-Assembly programs with C/C++
https://github.com/0xffset/x86-assembly

assembly c low-level-programming nasm register x86

Last synced: 23 days ago
JSON representation

A lot of x86-Assembly programs with C/C++

Awesome Lists containing this project

README

        




x86-Assembly



A lot of x86-Assembly programs with their counterpart in C/C++

GitHub license

### Quickly Assembly x86 References
#### General-Purpose Register

> *General-purpose registers (GPRs) can store both data and addresses, i.e., they are combined data/address registers; in some architectures, the register file is unified so that the GPRs can store floating-point numbers as well.*
>
> *Wikipedia*

| Register | Common Use |
|--|--|
| EAX | *Accumulator*|
| EBX | *Memory pointer, base register*
| ECX | *Loop control an counters*
| EDX | *Interger multiplication and division*
| ESI | *String instruction source pointer and index register*
| EDI | *String instruction destination pointer and index register*
| ESP | *Stack pointer*
| EBP | *Stack frame pointer*

### Instruction Operants
|Type| Example | Equal to|
|--|--|--|
| Immediate | *mov eax,45* |*eax = 45*|
|| *imul ebx, 12h* | ebx *= 0x12|
|| *xor dl, 44h* | ebx *= 0x44
|| *add esi,8* | *esi ^= 8*
|Register| *mov eax, ebx* | *eax = ebx*
|| *inc ecx* | *ecx += 1*
|| *add ebx,esi* | *ebx += esi*
|| *mul ebx* | edx:eax = eax * ebx
|Memory| *mov eax,[ebx]* | eax= *ebx
|| add eax,[val] | eax += *val
|| or ecx,[ebx+esi] | ecx |= *(ebx + asi)
|| sub word ptr [edi],12 | * (short*) edit -=12