RESPONDER UNA PREGUNTA

Si para responder la pregunta, crees necesario enviar un archivo adjunto, puedes hacerlo a traves del correo [email protected]

    Pregunta:  61532 - PROGRAMACION DE INTERRUPCIONES
Autor:  jose schery
Tengo dos codigos de como hacer demoras de tiempo una accediendo directamente a la variable del Bios que cuenta la cantidad de interrupciones
y el otro codigo es usando la interrupcion 8 de reloj pero no se como es que funciona esta funcion

#define CPPARGS ...

void interrpt (*oldtimer)(CPPARGS);

bool flag;
unsigned ctics;

void interrupt newtimer(CPPARGS)
{ if(flag)
{ --ctics;
if(ctics<=0)
flag=false;
}
(*oldtimer)();
}

void delay(int decseg)
{ ctics=decseg*18.2;
flag=true;
while(flag);

}

void main()
{ (oldtimer)=getvect(0*08);
setvect=(0*08,newtimer);
/* ....*/

delay(10);
setvect=(0*08,oldtimer);

}


Nombre
Apellidos
Correo
Comentarios