I asked a question referencing a mode sometimes referred to as ring -2 (System Management Mode) which can be exploited to create rootkits. There's also even a r
Suppose we have a variable in memory, which is constantly being updated by a thread of execution by doing something like MOV into it with alternating values (si
SORRY if i make you confuse about the question, but i don't know a better to describe it i'm trying to write a NASM program to reverse a string in place. i ha
I am trying to disable hardware prefetching on my machine: CPU family: 6 Model: 78 Model name: Intel(R) Core(TM) i5-6200U CPU
Is there an instruction or efficient branchless sequence of instructions to figure out the INDEX of (not the value of) the largest (or smallest) element of an u
Is there a way to get gcc to output the available -march=arch options? I'm getting build errors (tried -march=x86_64) and I don't know what my options are. The
To the best of my knowledge, MMAP can be used to change a protection of mapped memory region. For example, If I want to add executable permission to one of m
Going through the shellcode article on wikipedia, it gives an example as follows: B8 01000000 MOV EAX,1 // Set the register EAX to 0x000000001 To
When I try to build my source into a 32-bit static executable for Linux with nasm -f elf -F dwarf -g loop.asm ld -m elf_i386 -o loop loop.o I get this R_386_
In the case that a load overlaps two earlier stores (and the load is not fully contained in the oldest store), can modern Intel or AMD x86 implementations forwa
I'm doing micro-optimization on a performance critical part of my code and came across the sequence of instructions (in AT&T syntax): add %rax, %rbx mov %r
At this point i have been learning assembly for about 6 months. My current project is a random number generator. I need to generate 1 random n
So im reading the user's 8-digit input, and saving it into a variable. for example: Enter an 8-digit hex number: 1ABC5678 So, then i loop through the 1ABC5678 h
I'm looking at some practice code for assembly, and the assignment is basically to replace one jump point with another. The original jmp is a SHORT jmp, and th
I keep seeing people claim that the MOV instruction can be free in x86, because of register renaming. For the life of me, I can't verify this in a single tes
I'm developing my own bare-metal hypervisor over intel vt-x technology. My goal is to make it inaccessible to the OS I'm running over my hypervisor in any way,
I have to add two 3*3 arrays of words and store the result in another array. Here is my code: .data a1 WORD 1,2,3 WORD 4,2,3 WORD 1,4,3 a2 WORD 4, 3, 8
I have found something unexpected (to me) using the Intel® Architecture Code Analyzer (IACA). The following instruction using [base+index] addressing add
I have this code that is suppose to add two numbers, a float(3.25) and a integer(2). EDITED: extern _printf, _scanf global _main section .bss num1: resb 4 s
I have added a file function.S in sys folder in XINU. .text .globl zfunction zfunction: <x86 code> equivalent C code for this function is long