Brokenthorn's Known Bugs

From OSDev.wiki
Revision as of 04:38, 23 November 2019 by osdev>Slowbyte
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.