}
/* Clean up the screen for our display. Nothing fancy */
clrscr();
for(x=1; x<25; x++)
{
gotoxy(1,x);
printf("Bit number %02d ",x);
}
/* We will continue to display until any key is pressed */
while(!kbhit())
{
/* Retrieve any pending transitions and update the counts */
check_ints();
/* Display the current count values */
for(x=1; x < 25; x++)
{
gotoxy(16,x);
printf("%05u",int_counts[x]);
}
}
getch();
}
void check_ints()
{
int current;
/* Get the bit number of a pending transition interrupt */
current = get_int();
/* If it's 0 there are none pending */
if(current == 0)
return;
/* Clear and rearm this one so we can get it again */
clr_int(current);
/* Tally a transition for this bit */
++int_counts[current];
}
Содержание 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...