31 votes
Accepted

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

They simply did not use a large stack. If you look at the standard memory models for the x86, there was a single stack segment in all of them (which was even shared with other segments in the smaller ...
dirkt's user avatar
  • 27k
28 votes
Accepted

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

When x86 boots, it's not strictly in classic real mode, it's in "unreal" mode, with CS.base = 0xFFFF0000 and CS.limit = 64K. On 286 and later, memory addressing doesn't use the segment ...
Peter Cordes's user avatar
  • 3,197
16 votes

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

To understand this, you need to understand the basics of segment:offset addressing in protected mode: the segment value points to a descriptor, which contains a base address, segment limit and various ...
Stephen Kitt's user avatar
13 votes

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

DOS programs typically have limited stack requirements, and tend to declare small stacks. DOS itself uses its own stacks in many cases, and programs’ stacks don’t need to leave much room for DOS use. ...
Stephen Kitt's user avatar
9 votes

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

In short, yes the 386 will boot from 0xFFFFFFF0 address mentioned in real mode, because CS selector base is set to 0xFFFF0000 and IP will be 0x0000FFF0. The value of the CS register itself is ...
Justme's user avatar
  • 30.4k
9 votes

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 ...
Raffzahn's user avatar
  • 220k
4 votes

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

The CONFIG.SYS file of DOS had a setting to enable multiple stacks, but these were used to handle hardware interrupts. The Huge memory model might in theory have been used to support a stack of more ...
Davislor's user avatar
  • 8,667
4 votes

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

The large-code memory models (medium, large, and huge) did not need a stack size more than 64k, they just needed the ability to push/pop a cs:ip pair rather than just an ip. That can be done without ...
paxdiablo's user avatar
  • 4,752
2 votes

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

I'm putting this in as a separate answer since some people might disagree with my logic and it will give them a chance to downvote me. If you're interested and have the time, I think you'll find https:...
Mark Morgan Lloyd's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible