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 */
Summary of Contents for EBC-BX
Page 72: ...8 APPENDIX C EBC BX Parts Placement Guide Top 030923 OPERATIONS MANUAL EBC BX Page 8 1...
Page 73: ...EBC BX Parts Placement Guide Bottom Page 8 2 OPERATIONS MANUAL EBC BX 030923...
Page 74: ...9 APPENDIX D EBC BX Parts List...
Page 82: ...10 APPENDIX E EBC BX Mechanical Drawing...
Page 83: ......
Page 84: ...11 APPENDIX F WS16C48 I O Routines and Sample Program Listings...