loading

Step 3: Implement it using the parallel port under DOS

Picture of Implement it using the parallel port under DOS
The 74 LS 123 is what I used to get the same system as the joystick port. It has two RMM. In the PDF file you can see the datasheet and a simple circuit to attach to your parallel port. I am a Qbasic fan (because it is widely available) so the code is written in it. The procedure is the same as in the VB sample:

LPTdata = &H378
LPTstatus = LPTdata + 1: LPTcontrol = LPTdata + 2

YMAXX = 500

SCREEN 2
LINE (9, 1)-(630, 170), , B, &H3333
VIEW (10, 2)-(629, 169)
WINDOW (0, YMAXX)-(620, 0)

MAXX = 620

DIM D(MAXX)

WHILE INKEY$ = ""
OUT LPTcontrol, &H1
OUT LPTcontrol, &H0
FOR Y = 1 TO YMAXX
IF (INP(LPTstatus) AND &H10) / &H10 = 1 THEN EXIT FOR
NEXT Y

LOCATE 23, 1
PRINT USING "####"; Y

LINE (0, 0)-(MAXX, YMAXX), 0, BF

FOR I = 1 TO MAXX
LINE (I, D(I - 1))-(I, D(I))
D(I - 1) = D(I)
NEXT I
D(MAXX) = Y

WEND

One output pin is used to Trigger the MMR and one input pin to read the output of it.
74ls123.pdf(610x784) 452 KB