Category "x86"

How does the EBP register get saved?

I couldn't find much information or specification that suits me, so I have no choice but to ask here. When we call some function with the call instruction and t

How to update GDT entries after initial loading?

Once I initialize and load my GDT into the GDTR using lgdt, how can I update the GDT later? Am I correct if I use the sgdt command to get the base address and t

What calling convention does printf() in C use?

So I've been practicing to write simple subroutines in FASMW using the CDECL and STDCALL calling conventions and it got me wondering about what the printf funct

Allocate a vector of bytes on stack in assembly x86

I try to put on stack the values contained by array_output but every time I print the values from the stack it prints just 0s. If I try to print the array simpl

Custom bootloader booted via USB drive produces incorrect output on some computers

I am fairly new to assembly, but I'm trying to dive into the world of low level computing. I'm trying to learn how to write assembly code that would run as boot

memory bandwidth for many channels x86 systems

I'm testing the memory bandwidth on a desktop and a server. Sklyake desktop 4 cores/8 hardware threads Skylake server Xeon 8168 dual socket 48 cores (24 per so

What does this i386 os code mean? The code is for resetting the system

/* jump to reset vector. esp := 0 */ int main(int argc, char **argv) { PRINT("reset\n"); _eflags = 0; // interrupt disabled __asm__ __volatile__ ("\

Are there any instructions (other than those that use RIP-relative addressing) that are position dependent?

(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

Is a mov to a segmentation register slower than a mov to a general purpose register?

Specifically is: mov %eax, %ds Slower than mov %eax, %ebx Or are they the same speed. I've researched online, but have been unable to find a definitive an

how to understand if a CPU support ECC?

I have an old pc powered by an Intel Core2 Quad [email protected] (both Bios and linux dmidecode don't tell more than that), I can add that the CPU belongs to: Family

Finding the minimum value on a list Assembly Language GAS

I'm trying to find the minimum value of a list using assembly language. I'm trying to use -1 to compare all the other values to. my current code is data_items:

Finding the minimum value on a list Assembly Language GAS

I'm trying to find the minimum value of a list using assembly language. I'm trying to use -1 to compare all the other values to. my current code is data_items:

Find out higher bit with assembly language

I am new to assembly language. Please help me how to find the higher bits after these instruction MOV AX,08H MOV BX, 07H ADD AX,BX I know a little bit shiftin

Program in assembly x86 [closed]

I recently made a program with C++ and ASM. Can anyone help me make this code a more efficient one , in the ASM part or both. I would really a

Can modern x86 hardware not store a single byte to memory?

Speaking of the memory model of C++ for concurrency, Stroustrup's C++ Programming Language, 4th ed., sect. 41.2.1, says: ... (like most modern hardware) the

The most correct way to refer to 32-bit and 64-bit versions of programs for x86-related CPUs?

This question is about terminology for 32-bit vs. 64-bit x86. If I have 2 directories with source code of the same program - one for 32-bit Windows and another

Load only first byte into a register, from a string at a label

I am trying to load only the first byte in a register after data is passed into it for example if I have the following ASM code global _start section .data stri

Migrate to arm64 on AWS Lambda show error: Unable to import module 'encryptor-lambda'

I have a lambda function runs on Python 3.7 with architecture x86_64 before. Now I would like to migrate it to arm64 to use the Graviton processor and upgrade t

Why didn't x86 implement direct core-to-core messaging assembly/cpu instructions?

After serious development, CPUs gained many cores, gained distributed blocks of cores on multiple chiplets, numa systems, etc but still a piece of data has to p

What is the benefit of calling ioread functions when using memory mapped IO

To use memory mapped I/O, we need to first call request_mem_region. struct resource *request_mem_region( unsigned long start, u