home *** CD-ROM | disk | FTP | other *** search
- /* GET.C: Testing receipt of large amount data (without use of interrupts)
- * 1. On the PC, type: get
- * 2. On the Amiga, type: machaddr 4
- * dump 1 4
- */
- #include <stdio.h>
- #include "pardev.h"
-
- main(int argc,char **argv)
- {
- unsigned char buffer[4096+8];
- unsigned int Length;
- unsigned long count=0;
-
- ParAddress(1,0x03bc);
-
- printf("port: chksum: length: Kb:\n");
- while(1)
- if (ParDataReady())
- {
- Length=ParRead(buffer,4096+8);
- if (Length >0)
- {
- printf("%04x %04x %08x ",buffer[0]*256+buffer[1],
- buffer[2]*256+buffer[3],
- buffer[4]*65536+buffer[5]*4096+buffer[6]*256+buffer[7]);
- printf("%d\n",count/1024);count+=Length;
- }
- }
- }
-