return during "int"
Posted: Tue Jun 28, 2005 5:39 pm
my system call set up works like this:
which gets called after int 30h, which in turn calls:
but i think whats wrong is the functions get called and after they do what they do, they "ret" but because it has been after an "int" it should be a "iret" so the sys goes crazy, help???
Code: Select all
_int_handler_set:
push eax
push ebx
push ecx
push edx
mov eax, _int_handler
call eax
iret
Code: Select all
void int_handler(volatile unsigned int EDX, volatile unsigned int ECX,
volatile unsigned int EBX, volatile unsigned int EAX)
{
if(EAX == 1)
free((void *)EBX);
else if(EAX == 2)
EAX = (unsigned int)malloc(EBX);
else if(EAX == 3)
cls();
else if(EAX == 4)
putchar((char)EBX);
else if(EAX == 5)
putint(EBX);
else if(EAX == 6)
puts((unsigned char *)EBX);
else if(EAX == 7)
attr((short)EBX);
}