From: CKL on
Hi All,

There is now a long time that I work with tcl, and It's really a great
language
My current application is intended to control the 4 bits of the LPT
register

0x37a (port Cont)
// Port Nb
1 : => output (Cont 0 )
14 : => output (Cont 1 )
16 : => output (Cont 2 )
17 : => output (Cont 3 )

The application should work in Windows (and if possible in Linux)

There is now a long time that I try to find a easy solution to set/
reset this bits in tcl, but without success.

Please has any body a solution

Many Many Thanks in advance,

Christian
From: Helmut Giese on
Hi,
I am pretty sure that you cannot access hardware registers under
modern versions of Windows.
Post your code and the error you get.
Best regards
Helmut Giese

>Hi All,
>
>There is now a long time that I work with tcl, and It's really a great
>language
>My current application is intended to control the 4 bits of the LPT
>register
>
>0x37a (port Cont)
>// Port Nb
>1 : => output (Cont 0 )
>14 : => output (Cont 1 )
>16 : => output (Cont 2 )
>17 : => output (Cont 3 )
>
>The application should work in Windows (and if possible in Linux)
>
>There is now a long time that I try to find a easy solution to set/
>reset this bits in tcl, but without success.
>
>Please has any body a solution
>
>Many Many Thanks in advance,
>
>Christian

From: slebetman on
On Oct 7, 5:07 am, CKL <christian.klugesh...(a)gmail.com> wrote:
> Hi All,
>
> There is now a long time that I work with tcl, and It's really a great
> language
> My current application is intended to control the 4 bits of the LPT
> register
>
> 0x37a (port Cont)
> // Port Nb
> 1             : => output (Cont 0 )
> 14           : => output (Cont 1 )
> 16           : => output (Cont 2 )
> 17           : => output (Cont 3 )
>
> The application should work in Windows (and if possible in Linux)
>
> There is now a long time that I try to find a easy solution to set/
> reset this bits in tcl, but without success.
>

see http://wiki.tcl.tk/2816

The LPTTCL extension worked for me when I last used it a couple of
years ago to control a PIC programmer. Not sure if it would work on
Vista though, I was on XP.

On Linux, if you simply want write only access (standard printer mode)
then simply open /dev/parport0 and write bytes to it.
From: CKL on
Thank you for your answers :-)

I'm very disappointed that tcl do not permit to access to hardware
Registers.

Relative to your answer Slebetman, I have heart that lpttcl is not
very fast, and as you said, not compatible with vista :-((

So what could be another solution to access to these hardware
register.
Write the code in C, and call the function from tcl ?
Is there a example ?

For my application, I use freewrap to compile my tcl code, so as I
know, there is no possibility to add C code to tcl

Again thanks in advance

Christian
From: Harald Oehlmann on
On 7 Okt., 09:36, CKL <christian.klugesh...(a)gmail.com> wrote:
> Thank you for your answers :-)
>
> I'm very disappointed that tcl do not permit to access to hardware
> Registers.
>
> Relative to your answer Slebetman, I have heart that lpttcl is not
> very fast, and as you said, not compatible with vista :-((
>
> So what could be another solution to access to these hardware
> register.
> Write the code in C, and call the function from tcl ?
> Is there a example ?
>
> For my application, I use freewrap to compile my tcl code, so as I
> know, there is no possibility to add C code to tcl

Hi Christian,

I am sorry, that you feel disappointed of this lack.

The parallel port is (since Windows NT) IMHO very difficult to
control.
AFAIK, you need a driver because direct access is blocked.

If I would do those things, I would use C programming.
AFAIK, it is also possible to load a TCL extension DLL with Freewrap.
Freewrap will copy the DLL out the archive in the temp folder befor
execution.
Otherwise, you may put the dll somewhere outside the executable and
load it using the load command.
Or you may use freewrap, which is able to do this.

I have recently implemented a dll to control the spooler (because
since Win NT, the special device "LPT1" only exists, when the spooler
runs and is fully controled by the spooler. There is never a feedback,
when a file is really sent. So I wrote a c-lib to query the state from
the spooler.

Sorry, no "better" news

Thank you,
Harald