
4. Using the I/O Address Map
CNT16-8(FIT)GY, CNT16-8L(FIT)GY
37
outp( ADR+0x10, 0x11 );
/* interrupt mask open */
outp( ADR+0x11, 0x00 );
outp( ADR+0x10, 0x14 );
/* count start */
outp( ADR+0x11, 0xff );
while( intcnt < 10 && kbhit() == 0) {
ReadData();
/* read data */
Display();
/* display */
}
Display();
/* display */
outp( ADR+0x10, 0x11 );
/* interrupt mask close */
outp( ADR+0x11, 0xff );
outp( ADR+0x2, 0x0 );
/* interrupt level */
ResVect();
/* restore vector */
outp( ADR+0x10, 0x14 );
/* count stop */
outp( ADR+0x11, 0x00 );
}
/* --------------------------------------------------------- End of file --- */