Re: PC<->Linkport.
[Prev][Next][Index][Thread]
Re: PC<->Linkport.
nevermind. I got it.
example code for NASM:
;get the port of LPT1 (not 1,2,3, but the hardware port, should be
;378h, 3C8h, or 2C8h, depending on computer). store in PPort.
MOV AX, 0x0040
MOV ES, AX
MOV BX, 8
MOV AX, [ES:BX]
MOV [PPort], AX
;to put 00 on the wire:
MOV DX, [PPort]
MOV AL, 0 ;generates 00.
MOV AL, 1 ;generates 10.
MOV AL, 2 ;generates 01.
MOV AL, 3 ;generates 11.
OUT DX, AL
PPort dW 0
this was just a real quick example for those interested. NB: to get
info from the calc you need to activate bidirectional port. that's a
bit more complicated, and rather than boring the NG with it, I suggest
you pick up a parallel port guide (or INTWIN- that huge reference work
also has all the info you need on direct LPT1 communication.. i got
all this from there.)
References:
- PC<->Linkport.
- From: Reinier Zwitserloot <R.Zwitserloot@BTINTERNET.COM>