Reputation: 29
In 8086 CPU Real mode, Assembly language: How does an IRQ initialize the stack?
When DOS initializes, it loads the interrupt vector table. When an interrupt signal occurs, it will save the flag register. I want to know, when it saves the data, how is the stack initialized?
Upvotes: 0
Views: 174
Reputation: 92261
An 8086 only has one mode (no user/supervisor separation). So unless the interrupt routine sets up its own stack, it will use the stack of the application that was running when the interrupt occurred.
As long as you only use a "small" amount of stack space, this will work ok.
Upvotes: 1