ESP and EBP change not committed after return from interrupt
-
- Posts: 12
- Joined: Mon Aug 06, 2012 12:19 pm
- Location: Pretoria, South Africa
Re: ESP and EBP change not committed after return from inter
Ok, I have multitasking working!!! I can switch between tasks but if the task includes a call to a function my OS crashes with a Exception but this is due to invalid register values. The only reason I can think of is the fact that it tries to pop values back off the stack but ESP points to an incorrect location.
A living being seeks above all else to discharge its strength. Life itself is will to power. Nothing else matters.
Project: HazeOS, HazeAV
Project: HazeOS, HazeAV
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: ESP and EBP change not committed after return from inter
call/ret, yes. push/pop, no. interrupt/iret, I doubt they're common enough for them to care about (also, both cases are microcode monstrosities)Nable wrote:AFAIK, it can be a bad idea if you care about performance: CPU's out-of-order and other execution units like when what pairs of call/ret, push/pop, interrupt/iret are balanced.You can simply discard it (increase ESP by 4 instead of popping anything).