ES> You will need to use INP and OUT to do input and output with parallel
ES> port. For example,
ES>
ES> def seg=&h40
ES> lpt1=peeki(&h8)
ES> lpt2=peeki(&ha)
ES> lpt3=peeki(&hc)
ES> print hex$(lpt1),hex$(lpt2),hex$(lpt3)
ES> def seg
ES> out lpt1,255
ES> x=inp(lpt1)
ES>
ES> the OUT writes to the parallel port, the INP inputs from it. There are
ES> 3 total registers for each parallel port. For standard old style
ES> parallel ports (not bi-directional) you will not be able to input from
ES> the data register (the base address). the register at lpt1+1 however
ES> will let you do TTL inputs, only 6 bits though. I have not done any
ES> programming with bi-directional printer ports yet, so dunno if you have
ES> to set bits in registers to use it in bi-directional mode or not, and
ES> haven't seen any good explanations of it yet either. oh, you can use
ES> inp to read from data register on standard ports, but it will just show
ES> you the last data you wrote to it. these pins have latched outputs,
ES> meaning they will hold last data written to them until you write
ES> something else.
ES>
ES> I have done a lot of interfacing thru the parallel port: stepper motor
ES> controllers, a/d & d/a circuits, testing TTL logic IC chips, etc. So
ES> what exactly are you trying to do with it? It would help with example
ES> code if we knew what you wanted to do. Eric
Oh yeah. Yeah. I am using a cable from one computer to the other, and
trying to use it just like a serial cable, to send and receive data from one
computer to the other. I know there are other programs such as LapLink and
o
on, to do this, but i want to do other things within my program aswell. Soo.
Yeah, all i basically want is some example source to just send a letter, say
the letter W, through the serial port, and be able to input it at the other
end, and print it to the screen. Anyway, thanx for this example source
e..
CyA! WaynE
--- GEcho 1.00
---------------
* Origin: DarkZone BBS, NODE1 V.34+ V.fc HST +61-63-726978 (3:623/683)
|