old_handler = getvect(0x72); /* Hardwired for IRQ10 */
/* Install out new interrupt handler */
setvect(0x72,int_handler);
/* Clear the transition count values and enable the falling edge
interrupts.
*/
for(x=1; x<25; x++)
{
int_counts[x] = 0;
/* Clear the counts */
enab_int(x,FALLING);
/* Enable the falling edge interrupts */
}
/* Unmask the interrupt controller */
outportb(0xa1,(inportb(0xa1) & 0xfb)); /* Unmask IRQ 10 */
/* Reenable interrupts */
enable();
/* Set up the display */
clrscr();
/* Clear the Text Screen */
for(x=1; x<25; x++)
{
gotoxy(1,x);
printf("Bit Number %02d ",x);
}
/* We will continuously print the transition totals until a
key is pressed */
/* All of the processing of the transition interrupts, including
updating the counts is done in the background when an interrupt
occurs.
*/
while(!kbhit())
{
for(x=1; x < 25; x++)
{
gotoxy(16,x);
printf("%05u",int_counts[x]);
}
}
getch();
/* Disable interrupts while we restore things */
disable();
/* Mask off the interrupt at the interrupt controller */
Содержание EBC-LP
Страница 2: ...REVISION HISTORY P N 403 0306 000B ECO Number Date Code Rev Level ORIGINATED 030110 B 03 59 030530 B1...
Страница 68: ...APPENDIX C Mechanical Drawing...
Страница 69: ......
Страница 70: ......
Страница 71: ...APPENDIX D WS16C48 I O Routines and Sample Program Listings...