Gang Of Coders
Home
About Us
Contact Us
All Assembly Solutions on Gang of Coders
Total of 179 Assembly Solutions
Compiling assembly in Visual Studio
Windows
Visual Studio-2010
Assembly
How to write self-modifying code in x86 assembly
Assembly
X86
Jit
Vm Implementation
Self Modifying
Intel 64, rsi and rdi registers
Assembly
X86 64
Why does GCC call libc's sqrt() without using its result?
C++
Gcc
Assembly
X86 64
What is stack frame in assembly?
Assembly
X86
Micro fusion and addressing modes
Assembly
X86
Intel
Cpu Architecture
Iaca
Fastest way to calculate a 128-bit integer modulo a 64-bit integer
C
Algorithm
X86
Modulo
Assembly
What does ORG Assembly Instruction do?
Assembly
X86
Nasm
Directive
How does an assembly instruction turn into voltage changes on the CPU?
Assembly
Embedded
Cpu Architecture
What does the "rep stos" x86 assembly instruction sequence do?
Assembly
X86
Assembly Language - How to do Modulo?
Assembly
X86
Modulo
Integer Division
What registers are preserved through a linux x86-64 function call
Linux
Assembly
X86 64
Calling Convention
Abi
Does it make any sense to use the LFENCE instruction on x86/x86_64 processors?
Assembly
X86
X86 64
Atomic
Memory Barriers
What do C and Assembler actually compile to?
C++
C
Compiler Construction
Linker
Assembly
What does MOV EAX, DWORD PTR DS:[ESI] mean and what does it do?
Assembly
X86
"enter" vs "push ebp; mov ebp, esp; sub esp, imm" and "leave" vs "mov esp, ebp; pop ebp"
Assembly
X86
Stack
Micro Optimization
Stack Frame
Using GCC to produce readable assembly?
C
Gcc
Assembly
How to Detect the Number of Physical Processors / Cores on Windows, Mac and Linux
C++
Windows
Macos
Assembly
Hyperthreading
Why is gcc allowed to speculatively load from a struct?
C
Gcc
Assembly
X86
Compiler Optimization
Algorithm for finding the smallest power of two that's greater or equal to a given value
C++
Algorithm
Assembly
Stack allocation, padding, and alignment
C
Gcc
Assembly
X86
Stack
Is it possible to include inline assembly in Go code?
Go
Assembly
Inline Assembly
What is the meaning of XOR in x86 assembly?
Assembly
Xor
What is __i686.get_pc_thunk.bx? Why do we need this call?
C
Assembly
Shared Libraries
Glibc
NASM Vs GAS (Practical differences)
Assembly
X86
Nasm
Gnu Assembler
Att
Where to learn x64 assembly from?
Assembly
64 Bit
Fasm
Is it possible to "decompile" a Windows .exe? Or at least view the Assembly?
Debugging
Winapi
Assembly
Decompiling
Is there syntax highlighting for assembly in Sublime Text 2?
Text
Assembly
Ide
Syntax Highlighting
What does `rep ret` mean?
Assembly
X86
Micro Optimization
Branch Prediction
Why does Java switch on contiguous ints appear to run faster with added cases?
Java
Performance
Assembly
Compiler Construction
Switch Statement
How to run a program without an operating system?
Assembly
X86
Operating System
Bootloader
Osdev
What does multicore assembly language look like?
Assembly
X86
Cpu
Multicore
Smp
Is 'switch' faster than 'if'?
C
Performance
Switch Statement
Assembly
Jump Table
What is a retpoline and how does it work?
Security
Assembly
X86
Cpu Architecture
Spectre
Assembly code vs Machine code vs Object code?
Assembly
Machine Code
Object Code
What is exactly the base pointer and stack pointer? To what do they point?
C
Assembly
X86
Stack Frame
Stack Pointer
Why does GCC use multiplication by a strange number in implementing integer division?
C
Gcc
Assembly
X86 64
Integer Division
Why would introducing useless MOV instructions speed up a tight loop in x86_64 assembly?
Performance
Optimization
Assembly
X86 64
Freepascal
Protecting executable from reverse engineering?
C++
C
Obfuscation
Assembly
Why aren't programs written in Assembly more often?
C
Programming Languages
Assembly
Show current assembly instruction in GDB
Assembly
Gdb
Why does C++ code for testing the Collatz conjecture run faster than hand-written assembly?
C++
Performance
Assembly
Optimization
X86
Is inline assembly language slower than native C++ code?
C++
C
Performance
Assembly
The point of test %eax %eax
Assembly
X86
Att
Why does GCC generate such radically different assembly for nearly the same C code?
C
Gcc
Assembly
X86
Compiler Optimization
What's the purpose of the LEA instruction?
Assembly
X86
X86 64
X86 16
What are the calling conventions for UNIX & Linux system calls (and user-space functions) on i386 and x86-64
Linux
Assembly
X86 64
Calling Convention
Abi
Can num++ be atomic for 'int num'?
C++
C
Multithreading
Assembly
Atomic
How do you use gcc to generate assembly code in Intel syntax?
Assembly
Gcc
X86
Intel Syntax
What is the difference between MOV and LEA?
Assembly
X86
Instruction Set
Why do ARM chips have an instruction with Javascript in the name (FJCVTZS)?
Javascript
Assembly
Arm
Instructions
Floating Point-Conversion
What is the best way to set a register to zero in x86 assembly: xor, mov or and?
Performance
Assembly
Optimization
X86
Micro Optimization
Why do x86-64 instructions on 32-bit registers zero the upper part of the full 64-bit register?
Assembly
X86
X86 64
Cpu Registers
Zero Extension
How are everyday machines programmed?
C
Operating System
Microcontroller
Embedded
Assembly
What is the meaning of "non temporal" memory accesses in x86
X86
Sse
Assembly
How can I see the assembly code for a C++ program?
C++
Assembly
Disassembly
How do I achieve the theoretical maximum of 4 FLOPs per cycle?
C++
Assembly
X86 64
Cpu Architecture
Flops
How does this milw0rm heap spraying exploit work?
Javascript
X86
Exploit
Assembly
What is the purpose of XORing a register with itself?
Assembly
X86
What does `dword ptr` mean?
Assembly
X86
Dword
Pointers
Purpose of ESI & EDI registers?
Assembly
X86
How to view the assembly behind the code using Visual C++?
Visual C++
Assembly
Possible GCC bug when returning struct from a function
C
Gcc
Assembly
X86 64
Compiler Bug
What are CFI directives in Gnu Assembler (GAS) used for?
Assembly
Callstack
Gnu Assembler
Stack Unwinding
Debug Information
What is the function of the push / pop instructions used on registers in x86 assembly?
Assembly
X86
Terminology
Stack Memory
Stack Pointer
Quickly find whether a value is present in a C array?
C
Optimization
Assembly
Embedded
Arm
How can one see content of stack with GDB?
C
Assembly
Gdb
`testl` eax against eax?
Assembly
X86
Instructions
Why does Windows64 use a different calling convention from all other OSes on x86-64?
Windows
Assembly
X86 64
Calling Convention
Abi
What is the "FS"/"GS" register intended for?
Assembly
X86
Cpu Architecture
Cpu Registers
Memory Segmentation
Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)?
Gcc
Assembly
Floating Point
Compiler Optimization
Fast Math
What is the difference between native code, machine code and assembly code?
.Net
Assembly
Bytecode
Machine Code
How exactly does the callstack work?
Assembly
Cpu
Callstack
Low Level
Calling Convention
How to disassemble a binary executable in Linux to get the assembly code?
C++
Linux
Assembly
Executable
Disassembly
How can I build a small operating system on an old desktop computer?
C
Operating System
Bootstrapping
Osdev
Assembly
Why is x86 ugly? Why is it considered inferior when compared to others?
Assembly
X86
Mips
X86 64
Cpu Architecture
What's the difference between a word and byte?
Assembly
Byte
Cpu Architecture
Terminology
Word
What is the direction of stack growth in most modern systems?
Assembly
Stack
Callstack
Abi
Stack Frame
Why is SSE scalar sqrt(x) slower than rsqrt(x) * x?
Performance
Assembly
Floating Point
X86
Sse
What does "int 0x80" mean in assembly code?
Assembly
X86
How to write hello world in assembler under Windows?
Winapi
Assembly
X86
Nasm
How to break on assembly instruction at a given address in gdb?
Assembly
Gdb
Is it worthwile to learn assembly language?
Programming Languages
Assembly
Nasm
Learning assembly
Assembly
Which is faster : if (bool) or if(int)?
C++
Assembly
Int
Boolean
Difference between JE/JNE and JZ/JNZ
Assembly
X86
When is assembly faster than C?
C
Performance
Assembly
What is the purpose of the RBP register in x86_64 assembler?
C
Assembly
X86 64
Stack Pointer
Unexpected exec permission from mmap when assembly files included in the project
C
Linux
Assembly
Mmap
Dep
What is the purpose of the EBP frame pointer register?
Performance
Assembly
X86
Using gdb to single-step assembly code outside specified executable causes error "cannot find bounds of current function"
Linux
Assembly
Gdb
X86
Linux Kernel
How can I multiply and divide using only bit shifting and adding?
C
Assembly
Bit Manipulation
Division
Multiplication
Why does Intel hide internal RISC core in their processors?
Assembly
X86
Intel
Cpu Architecture
What are .S files?
File
Assembly
File Extension
Why can a T* be passed in register, but a unique_ptr<T> cannot?
C++
Assembly
Unique Ptr
Calling Convention
Abi
How do I disassemble raw 16-bit x86 machine code?
Linux
Assembly
X86
X86 16
Mbr
How do you get assembler output from C/C++ source in gcc?
C++
C
Assembly
Gcc
Disassembly
Why is a conditional move not vulnerable to Branch Prediction Failure?
Performance
Assembly
Optimization
Cpu Architecture
Branch Prediction
What does "rep; nop;" mean in x86 assembly? Is it the same as the "pause" instruction?
Assembly
X86
X86 64
Cpu
Machine Code
How to remove "noise" from GCC/clang assembly output?
C++
Assembly
Gcc
Clang
Compiler Optimization
How does the stack work in assembly language?
Assembly
Stack
Callstack
Stack Memory
Limitations of Intel Assembly Syntax Compared to AT&T
Linux
Assembly
X86
Att
Intel Syntax
If registers are so blazingly fast, why don't we have more of them?
Performance
History
Cpu Registers
Assembly
How to see JIT-compiled code in JVM?
Java
Assembly
Jvm
Jit
What does @plt mean here?
Linux
Assembly
X86 64
Disassembly
Dynamic Linking
x86_64 registers rax/eax/ax/al overwriting full register contents
Assembly
X86 64
Cpu Registers
Zero Extension
Why do you program in assembly?
C
Performance
Low Level
Assembly
If statement vs if-else statement, which is faster?
C++
Performance
C++11
Assembly
Microbenchmark
How can objdump emit intel syntax
Linux
Assembly
X86 64
Objdump
What are SP (stack) and LR in ARM?
Assembly
Stack
Arm
What are IN & OUT instructions in x86 used for?
Assembly
X86
Linux Kernel
Why does GCC pad functions with NOPs?
C
Assembly
Gcc
Memory Alignment
Enhanced REP MOVSB for memcpy
Performance
Assembly
X86
Cpu Architecture
Memcpy
"Assembly" vs. "Assembler"
Terminology
Assembly
How should I get started on writing device drivers?
C
Assembly
Hardware
Drivers
C code loop performance [continued]
C
Performance
Intel
Instructions
Assembly
Why is the loop instruction slow? Couldn't Intel have implemented it efficiently?
Performance
Assembly
X86
Intel
Cpu Architecture
What's the purpose of the CIL nop opcode?
Assembly
Bytecode
Cil
Why does adding inline assembly comments cause such radical change in GCC's generated code?
C++
Gcc
Assembly
Optimization
Inline Assembly
Go isn't linking my assembly: undefined external function
Assembly
Go
How do I compile the asm generated by GCC?
C
Gcc
Compiler Construction
Assembly
Which variable size to use (db, dw, dd) with x86 assembly?
Variables
Assembly
X86
What is Intel microcode?
Linux
Assembly
Intel
Is there a way to insert assembly code into C?
C
Inline Assembly
Assembly
What does the "lock" instruction mean in x86 assembly?
C++
Qt
Assembly
X86
Is < faster than <=?
C++
C
Performance
Assembly
Relational Operators
Why is this C++ program so incredibly fast?
C++
Performance
Assembly
Compiler Construction
Argument order to std::min changes compiler output for floating-point
Android
C++
Assembly
X86
Floating Point
int operators != and == when comparing to zero
C++
Performance
Assembly
Machine Code
How to generate assembly code with clang in Intel syntax?
C++
Assembly
X86
Clang
Intel
Why does "noreturn" function return?
C
Assembly
C11
Function Call
Noreturn
Where is the x86-64 System V ABI documented?
Linux
Assembly
X86 64
Calling Convention
Abi
Fastest way to do horizontal SSE vector sum (or other reduction)
Assembly
Optimization
Floating Point
Sse
Simd
Can I use Intel syntax of x86 assembly with GCC?
C
Gcc
Assembly
X86
Inline Assembly
What is better "int 0x80" or "syscall" in 32-bit code on Linux?
Linux
Assembly
X86
System Calls
32 Bit
What do the brackets mean in NASM syntax for x86 asm?
Assembly
X86
Nasm
To learn assembly - should I start with 32 bit or 64 bit?
Assembly
X86
X86 64
Low Level
Is this "should not happen" crash an AMD Fusion CPU bug?
Assembly
Crash
X86
Windbg
Amd Processor
How does a NOP sled work?
C
Assembly
Stack
Buffer Overflow
Nop
C++: Mysteriously huge speedup from keeping one operand in a register
C++
C
Performance
Optimization
Assembly
Why is the construction of std::optional<int> more expensive than a std::pair<int, bool>?
C++
Performance
Assembly
X86 64
C++17
Why does using the ternary operator to return a string generate considerably different code from returning in an equivalent if/else block?
C++
Assembly
Optimization
Clang
Compiler Optimization
Why is there not a register that contains the higher bytes of EAX?
Assembly
X86
Cpu Registers
Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviations with _mm_popcnt_u64 on Intel CPUs
C++
Performance
Assembly
X86
Compiler Optimization
What does the endbr64 instruction actually do?
Assembly
X86 64
Intel
Instructions
Prefetching Examples?
Gcc
Optimization
Assembly
Prefetch
Difference between rdtscp, rdtsc : memory and cpuid / rdtsc?
C++
C
Performance
Assembly
Rdtsc
When are x86 LFENCE, SFENCE and MFENCE instructions required?
Multithreading
Assembly
X86
Cpu
Memory Fences
Do x86 instructions require their own encoding as well as all of their arguments to be present in memory at the same time?
Assembly
X86
Paging
Virtualization
Kvm
x86 Assembly on a Mac
Xcode
Macos
X86
Assembly
GAS: Explanation of .cfi_def_cfa_offset
Assembly
Callstack
Gnu Assembler
Dwarf
VA (Virtual Address) & RVA (Relative Virtual Address)
Assembly
Linker
Loader
Portable Executable
What are callee and caller saved registers?
Assembly
Cpu Registers
Calling Convention
Abi
Why don't modern compilers coalesce neighboring memory accesses?
C++
Assembly
Optimization
Compiler Optimization
What are the names of the new X86_64 processors registers?
Assembly
X86
X86 64
Cpu Registers
Why does leave do "mov esp,ebp" in x86 assembly?
Assembly
X86
How was the first C compiler written?
C
Assembly
Compiler Construction
How to get assembly output from building with Cargo?
Assembly
Rust
Rust Cargo
Performance difference between Windows and Linux using Intel compiler: looking at the assembly
C++
Assembly
X86 64
Icc
Intel Vtune
How many CPU cycles are needed for each assembly instruction?
Performance
Assembly
X86
Cpu Architecture
Cpu Cycles
How Do You Make An Assembler?
X86
Assembly
Permanently Change Disassembly Flavor in GDB
Linux
Assembly
Gdb
Efficient integer compare function
C
Assembly
X86
Inline Assembly
What registers to save in the ARM C calling convention?
C
Assembly
Arm
Calling Convention
Function Call
How to force GCC to assume that a floating-point expression is non-negative?
C++
Gcc
Assembly
Floating Point
Micro Optimization
What does it mean to align the stack?
C
Assembly
Gcc
X86
Memory Alignment
Does using xor reg, reg give advantage over mov reg, 0?
Assembly
X86
Micro Optimization
Assembly - JG/JNLE/JL/JNGE after CMP
Assembly
X86
Eflags
Why GCC compiled C program needs .eh_frame section?
C
Assembly
Exception Handling
X86
Elf
What happens if you use the 32-bit int 0x80 Linux ABI in 64-bit code?
Linux
Assembly
X86 64
System Calls
Abi
what does the assembly instruction 'db' actually do?
Assembly
What are the ESP and the EBP registers?
Assembly
X86
Callstack
Stack Frame
Do programming language compilers first translate to assembly or directly to machine code?
Assembly
Gcc
Compilation
Compiler Construction
What is register %eiz?
Assembly
X86
Gnu Assembler
Objdump
Compile/run assembler in Linux?
Linux
Ubuntu
X86
Assembly
LEA or ADD instruction?
Assembly
X86
What is your favorite disassembler tool in Mac OS X?
Macos
Assembly
Disassembly
Nm
Otool
What is IACA and how do I use it?
C++
C
Performance
Assembly
Iaca
Do any languages / compilers utilize the x86 ENTER instruction with a nonzero nesting level?
Assembly
X86