Questions tagged [x86]

The term x86 denotes a family of backward compatible instruction set architectures based on the Intel 8086 CPU. From Wikipedia: http://en.wikipedia.org/wiki/X86

The term x86 denotes a family of backward compatible instruction set architectures based on the Intel 8086 CPU. The 8086 was introduced in 1978 as a fully 16-bit extension of Intel's 8-bit based 8080 microprocessor, with memory segmentation as a solution for addressing more memory than can be covered by a plain 16-bit address. The term x86 derived from the fact that early successors to the 8086 also had names ending in "86".

Many additions and extensions have been added to the x86 instruction set over the years, almost consistently with full backward compatibility. The architecture has been implemented in processors from Intel, Cyrix, AMD, VIA and many other companies; there are also open implementations, such as the Zet SoC platform.

The term is not synonymous with IBM PC compatibility as this implies a multitude of other computer hardware; embedded systems as well as general-purpose computers used x86 chips before the PC-compatible market started, some of them before the IBM PC itself.

From Wikipedia: x86


For ABI documents, assembly reference manuals, guides, tutorials, and optimization / performance stuff, see Stack Overflow's x86 tag wiki

40 questions
48
votes
8 answers

Why (not) segmentation?

I am studying operating systems and the x86 architecture, and while I was reading about segmentation and paging I naturally was curious how modern OSes handle memory management. From what I found Linux and most other operating systems essentially…
Mr. Shickadance
  • 676
  • 1
  • 5
  • 10
33
votes
3 answers

What does the 'R' in x64 register names stand for?

I know the 32 bit registers were named like the 16 bit registers with an 'E' prefix to mean extended. I've always assumed that meant extended from 16 to 32 bits although I've never seen that explicitly stated. I was trying to find out what the 'R'…
Matt
  • 433
  • 1
  • 4
  • 6
25
votes
3 answers

Why is multithreading often preferred for improving performance?

I have a question, it's about why programmers seems to love concurrency and multi-threaded programs in general. I'm considering 2 main approaches here: an async approach basically based on signals, or just an async approach as called by many papers…
user1849534
  • 361
  • 1
  • 3
  • 5
25
votes
5 answers

Is there a canonical book on x86 assembly?

There are lots of books on assembly. However, they usually deal with ISAs about which I don't care, such as MIPS or ARM. I don't deal with these architectures; there's no reason for me to try to learn them. But x86 assembly books seem...…
Billy ONeal
  • 8,073
  • 6
  • 43
  • 57
19
votes
7 answers

Purpose of NOP instruction and align statement in x86 assembly

It has been a year or so since I last took an assembly class. In that class, we were using MASM with the Irvine libraries to make it easier to program in. After we'd gone through most of the instructions, he said that the NOP instruction…
alvonellos
  • 432
  • 1
  • 4
  • 16
12
votes
9 answers

I understand what a stack pointer is - but what is it used for?

The stack pointer points to the top of the stack, which stores data on what we call a "LIFO" basis. To steal someone else's analogy, it's like a stack of dishes in which you put and take dishes at the top. The stack pointer, OTOH, points to the top…
moonman239
  • 2,023
  • 4
  • 18
  • 23
9
votes
4 answers

Is there much difference between X86 Assembly language on Windows and Linux?

I'm a complete beginner at Assembly, and my aim is to learn as much as I can to do with Assembly to one day I can reach expert level (I know I'm way off right now, but you never know). My only problem is this: I've got two books which both teach…
Logan545
  • 635
  • 1
  • 6
  • 5
8
votes
2 answers

How does a CPU load multiple bytes at once if memory is byte addressed?

I've been reading about CPUs and how they are implemented, and some big complex architectures (looking at you x86) have instructions that load from memory during one clock cycle. Since one address points to a single byte, how is it possible that I…
DylanG
  • 125
  • 1
  • 5
8
votes
1 answer

Why data alignment is used exactly?

Each data type must be aligned to a multiple of some number of bytes, for example a short int must be aligned to a multiple of 2 bytes, and an int must be aligned to a multiple of 4 bytes. But why data alignment is used exactly, is it because the…
mahmoud_t1
  • 189
  • 3
7
votes
2 answers

What's the REAL benefit of using CDECL? (more specifically pushing instead of reg-ing)

So, I'm learning assembly, and I've come to know the ABIs and i got some basics tests working using the cdecl calling convention to use the c's stdlib under nasm. But I've seen other Calling Conventions (like topspeed/Clarion/JPI/watcom/borland…
Nande
  • 173
  • 1
  • 7
7
votes
2 answers

What is the difference between Times and Dup in Assembly Language?

In a bootloader, the second last line is : TIMES 510-($-$$) db 0 Now, will this command also do the same : db 510-($-$$) DUP (0) If not why? I know what TIMES does, but its not mentioned in my x86 book by Mazidi (Pearson Publication). Any idea…
7
votes
4 answers

Why does ARM processors dominate Mobile platforms while x86 dominates Desktop/Server platforms

Almost all of the mobile phones, except the ones being produced by Intel, use ARM based processors while desktop/server industry is dominated x86 processors. What features does one provide over the other with regards to the domination they have in…
Chander Shivdasani
  • 382
  • 1
  • 4
  • 10
5
votes
3 answers

What's so special about x64 vs x86?

What is the difference between building a .NET project to target 32-bit or 64-bit? Are there computers that aren't able to run 32-bit programs and only 64-bit? Do x64 programs run twice as fast?
5
votes
1 answer

How do hybrid interpreter-JIT compilers work?

Chrome's V8 compiler, the Java HotSpot compiler, and many more have multiple tiers of interpretation and compilation. A function starts off as interpreted in HotSpot and then, if it is run often enough, it is compiled to native code (and later…
4
votes
3 answers

How does Branch Target Prediction differ from Branch Prediction?

I do not understand how BTP differs from BP? Yes I understand BP evaluates whether a conditional is true/false, but surely implicitly this also determines the "target" instruction? If I predict the first branch of an IF to be true, then surely I…
user997112
  • 1,469
  • 2
  • 19
  • 24
1
2 3