}
/* 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];
}
Summary of Contents for EBC-LP
Page 68: ...APPENDIX C Mechanical Drawing...
Page 69: ......
Page 70: ......
Page 71: ...APPENDIX D WS16C48 I O Routines and Sample Program Listings...