Brokenthorn's Known Bugs

From OSDev.wiki
Revision as of 20:52, 26 August 2018 by Ender (talk | contribs) (Added ISR handler issue thing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

iret using inline ASM

In OSDev15, the provided ISR handler uses inline asm to iretd from a C function:

void int_handler_5 () {
 
	_asm add esp, 12
	_asm pushad
 
	// do whatever...
 
	_asm popad
	_asm iretd
}

This makes assumptions about the calling conventions used, and isn't a good idea in general. Better options may be found [here].