3 #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
11 #include <hw/cpu/cpu.h>
12 #include <hw/dos/dos.h>
13 #include <hw/8254/8254.h>
14 #include <hw/8259/8259.h>
15 #include <hw/dos/doswin.h>
16 #include <hw/parport/parport.h>
19 #include <hw/isapnp/isapnp.h>
20 #include <hw/parport/parpnp.h>
26 printf("PC parallel printer port test program\n");
28 printf("ISA Plug & Play version\n");
31 cpu_probe(); /* ..for the DOS probe routine */
32 probe_dos(); /* ..for the Windows detection code */
33 detect_windows(); /* Windows virtualizes the LPT ports, and we don't want probing to occur to avoid any disruption */
36 printf("8254 not found (I need this for time-sensitive portions of the driver)\n");
41 printf("8259 not found (I need this for portions of the test involving serial interrupts)\n");
45 if (!init_parport()) {
46 printf("Cannot init parport library\n");
51 if (!init_isa_pnp_bios()) {
52 printf("Cannot init ISA PnP\n");
55 if (find_isa_pnp_bios()) pnp_parport_scan();
56 else printf("Warning, ISA PnP BIOS not found\n");
58 printf("Probing BIOS-listed locations ");
59 for (i=0;i < bios_parports;i++) {
60 uint16_t port = get_bios_parport(i);
62 if (probe_parport(port)) printf("[OK] ");
67 printf("Probing standard port locations ");
68 for (i=0;i < STANDARD_PARPORT_PORTS;i++) {
69 uint16_t port = standard_parport_ports[i];
71 if (probe_parport(port)) printf("[OK] ");
77 printf("Found parallel ports:\n");
78 for (i=0;i < info_parports;i++) {
79 struct info_parport *prt = &info_parport[i];
80 printf(" [%u] port=0x%04x IRQ=%d DMA=%d 10-bit=%u max-xfer-size=%u type='%s'\n",i+1,prt->port,prt->irq,prt->dma,prt->bit10,prt->max_xfer_size,parport_type_str[prt->type]);