First commit 14/08/1999
This commit is contained in:
commit
e00d930f44
23
LPT.BAK
Normal file
23
LPT.BAK
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#include <dos.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void main( void )
|
||||||
|
{
|
||||||
|
clock_t start, end;
|
||||||
|
float cont;
|
||||||
|
|
||||||
|
cont = 0;
|
||||||
|
start = clock();
|
||||||
|
while ( ((clock() - start) / CLK_TCK) < 20 )
|
||||||
|
{
|
||||||
|
outportb( 0x378, 0x00 ); cont++;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("En 20 segundo, realice %f outports\n", cont );
|
||||||
|
cont /= 20;
|
||||||
|
printf("%f por segundo... (%f Kb/s)\n", cont, (cont/1024) );
|
||||||
|
printf("2 bit (segidos) -> 1 Hz ===>>> %f KHz", (cont/2000) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
23
LPT.CPP
Normal file
23
LPT.CPP
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#include <dos.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void main( void )
|
||||||
|
{
|
||||||
|
clock_t start, end;
|
||||||
|
float cont;
|
||||||
|
|
||||||
|
cont = 0;
|
||||||
|
start = clock();
|
||||||
|
while ( ((clock() - start) / CLK_TCK) < 20 )
|
||||||
|
{
|
||||||
|
outportb( 0x378, 0x00 ); cont++;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("En 20 segundo, realice %f outports\n", cont );
|
||||||
|
cont /= 20;
|
||||||
|
printf("%f por segundo... (%f Kb/s)\n", cont, (cont/1024) );
|
||||||
|
printf("2 bit (segidos) -> 1 Hz ===>>> %f KHz\n", (cont/2000) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user