Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [segmentation]

Segment-based memory addressing and management. Far pointers, allocation, normalisation, etc.

Filter by
Sorted by
Tagged with
11 votes
5 answers
6k views

How did 16-bit MS-DOS programs use a large (> 64KB) stack?

The "large" memory model of x86 allowed a program to have multiple code segments and multiple data segment, using far calls to jump across code segments, and far pointers to access data from ...
airman's user avatar
  • 1,350
2 votes
0 answers
173 views

What does OpenWatcom put to the CONST segment? [closed]

According to the documentation of OpenWatcom, CONST and CONST2 are read-only non-executable segments, string literals are put to CONST, and user-defined const global variables are put to CONST2. My ...
pts's user avatar
  • 2,013
24 votes
4 answers
4k views

How can a 32-bit x86 CPU start with reset vector 0xFFFFFFF0 even though it starts in 16-bit real mode?

As far as I know, x86 CPUs start up in 16-bit 'real' mode (maybe some don't). The reset vector is 0xFFFFFFF0 (in most CPUs and in this context) In this 16-bit real mode, we can only access 16 bit ...
Example person's user avatar
14 votes
1 answer
1k views

What happens when the segment plus offset overflows 20 bits?

What happens if a segment register plus offset overflows the 20-bit address space of the 8086? I assume it wraps around to 00000h, but want to confirm. For example, say DS is F001h and the offset is ...
Jacob Krall's user avatar
  • 2,289
1 vote
1 answer
466 views

Why doesn't the Intel 8086 CPU use real memory addresses? [duplicate]

The address bus of the Intel 8086 CPU is 20-bits, and when you want to specify a memory address to read from or write to, you would form the memory address using a segment register and an offset ...
user14630's user avatar
  • 151
14 votes
7 answers
5k views

Does the Intel 8085 CPU use real memory addresses?

The Intel 8086 CPU uses memory segmentation, which means that when, for example, you write the value 123 to the memory address 1001, the memory address 1001 will actually get converted first into ...
user14630's user avatar
  • 151
10 votes
1 answer
2k views

Which operating systems for 80286 computers allowed a process to use more than 128k data?

Out of all the operating systems for the 80286 processor I found, only two make use of the protected mode's ability to load more than one segment for text and one for data. These are MS-DOS (through ...
fuz's user avatar
  • 1,564
55 votes
8 answers
11k views

Why didn't the 8086 use linear addressing?

The 8086 used a segmented memory architecture where the linear address was computed from a 16-bit segment number and a 16-bit offset. This greatly complicated things from a programming perspective. ...
Alex Hajnal's user avatar
  • 9,350
3 votes
4 answers
1k views

Was there ever a compiler type that was just large enough to contain a memory segment?

From this answer, Hark back to the days of segmented 16-bit architectures for example: an array might be limited to a single segment (so a 16-bit size_t would do) BUT you could have multiple ...
Evan Carroll's user avatar
  • 3,388
16 votes
1 answer
7k views

How to write directly to video memory using "debug.exe" in MS-DOS?

The base address for the video memory in MS-DOS is 0xB8000. I am trying to write to this address using debug.exe, but I am getting an error: 1165:0103 mov [b8000],ax ^ Error
user5161's user avatar
  • 475