'############################################### '### Juan F. Miguez 7-1-98 ### '### Detects the Parallel Port Automatically ### '### The condition here is that if the info ### '### gathered from the port is 255, then the ### '### parallel port does not exist. ### '### Send all the comments to: ### '### miguez@bifoot.com ### '############################################### 'Basix Fanzine editor's note - perhaps the email address is really ' miguez@bigfoot.com ?? ' #### Define the parallel ports as par1 and par2 par1 = &H378 par2 = &H3BC ' #### If the input from the port is 255 then the port does not exist ' #### INP sends acknowledges a bit from the specified port ' #### as INP(par1) gets a bit from the 378 parallel port and tests it. IF (INP(par1) <> 255 AND INP(par2) <> 255) THEN LOCATE 12, 12 PRINT "Both Parallel ports &H378 and &H3BC were found. " INPUT "Which one would you like to use for the experiment?"; ParPort$ IF (ParPort$="&H378") then P=&H378 IF (ParPort$="&H3BC") then P=&H3BC ELSE IF (INP(par1) < 255) THEN ParPort$ = "&H378" ' Parallel port is 3BC" P = &H378 ELSEIF (INP(par2) < 255) THEN ParPort$ = "&H3BC" ' Parallel port is 378 P = &H3BC END IF END IF PRINT "Your parallel port is located at: "; ParPort$ END