Plotter Driver (PC Magazine Vol 4 No 10 May 14, 1985 PC Tutor) The PC's normal order of events for printing is: 1) latch the data character to the output port; 2) wait until the plotter is not busy; 3) strobe the data ready line (high then low). The IBM routines also make sure that two of the printer lines (-Initialize and -Select input) have the correct default values (off). IBM printer ports can occupy a number of different values, and the IBM monochrome adapter's printer port is at a different address from the AT serial/parallel port. If your plotter gets confused by data on the cable while it is busy, use the BASIC routine below. It does not incorporate time-out provisions. In this routine, lines 120 and 130 read the port address from the BIOS data area; they don't impose a fixed value. Lines 140 and 150 wait until busy line is low (not busy); they ignore other lines such as paper out (&H20). Line 160 sends data, and lines 170 and 180 turn the strobe high/low and keep the initialize and select lines corrent. If your printer is connected up as LPT2, change line 130 to: PORTNO%=PEEK(10)+PEEK(11)*256 100 'Improved Plotter Output Driver 110 'No data until plotter reay 120 DEF SEG=&H40 'BIOS data segment 130 PORTNO%=PEEK(8)+PEEK(9)*256 'get LPT1 140 Q=INP(PORTNO%+6) 'wait until not 150 IF NOT (Q and 128) THEN 140 'busy 160 OUT (PORTNO%+4),ASC(Z$) 'send data 170 OUT (PORTNO%+6),13 'strobe high 180 OUT (PORTNO%+6),12 'strobe low