I don't understand what does this code initialize, how will the data look in the memory map? .section .data A:.long 3 .quad B .quad 0 B: .long 4 .quad
This is my approach: and rdx, 0x1 ror rdx, 1 or rax, rdx But I think this is not very efficient. And I don't know if shift operations would be more cost effici
I am writing a version of malloc that is compatible with multi-threading. Is is going to use arenas to help facilitate the parallelism. mmap is being used to cr
I am attempting to create a custom operating system (for educational purposes) for which I am also creating the bootloader (multiboot 2). I am
I am new to programming with the AVX/AVX2 instructions and am trying to optimize the speed of my code. Following the older expectation that passing by reference
I would like to automate the building of an application I am writing. I want to build it for ARM64/v8 (aarch64) and amd64 (x86). I successfully created a Github
i have a some simple lines of code in C and wanted to disassemble it: #include <stdio.h> int main(){ int i=42; } After compiling it and starting gdb, i
I've been writing some x64 assembly on linux - exactly what it is is not relevant - and I've come across a strange problem. In my assembly code, I've declared p
I have intel system with Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04). I have downloaded the datasheet like d
I am studying AVX by writing AVX code with inline assembly. In this case, I tried to implement AVX in a simple function. The function name I made is lower_all_c
#include <stdio.h> #include <iostream> #include <string> #include <chrono> #include <memory> #include <cstdlib> #include <
I was reading this article " assembly-challenge-jump-to-a-non-relative-address-without-using-registers ". I need to do exactly what he suggests here (Jump to a
While testing things around Compiler Explorer, I tried out the following overflow-free function for calculating the average of 2 unsigned 32-bit integers: uint3
I am trying to build a pintool that should be able to instrument an open() syscall that targets a specific file/directory and replace the file path argument wit
I recently been trying to execute system commands using pure assembly. I managed to achieve it in a x32 bit binary as posted here: execute system command (bash)
I have following piece of code: typedef struct { int x; int y; int z; int w; } s32x4; s32x4 f() { s32x4 v; v.x
In a separate C program, I have passed 4 parameters to an x86 ASM program. dividend divisor Quotient pointer Remainder pointer dividend = 0xA divisor = 0x3 Whic
Here is a simple function #include <stdio.h> int foo() { int a = 3; int b = 4; int c = 5; return a * b * c; } int main() { int a = f
Where I can find info on AMD Ryzen CPUs and how they expect MSI address/data to be programmed? The Intel manual is crystal clear in its description (pictured be
(This question refers specifically to x86/x86_64) I'm working on an application that needs to insert a small block of instructions at specific points within ano