Re: [PARPORT] Red Hat 6.5 and Mandrake 8.0 ECP problem

From: Tim Waugh (twaugh@redhat.com)
Date: Mon Sep 03 2001 - 10:51:28 EDT

  • Next message: Ing. Giorgio Alboni: "Re: [PARPORT] Red Hat 6.5 and Mandrake 8.0 ECP problem"

    On Mon, Sep 03, 2001 at 03:31:58PM +0200, Ing. Giorgio Alboni wrote:

    > The software initialise the ECR (ECP extended control register) correctly.
    > In other case the software could not work under Win ME.

    Well, that's not necessarily true: different operating systems could
    leave the ECR in different states after booting. That's why I asked.

    > run correctly and because a symple instruction "if (0) printf
    > ("22");" increse the problem under linux (under win ME continue to
    > work fine).

    Are you absolutely sure about this? I ask because gcc (at least the
    version I'm using here) optimises this kind of stuff out completely
    before the assembler even sees it. Look:

    [tim@cyberelk tmp]$ cat out.c
    void fn (void)
    {
            if (0) printf ("22");
    }
    [tim@cyberelk tmp]$ gcc -S out.c
    [tim@cyberelk tmp]$ cat out.s
            .file "out.c"
            .version "01.01"
    gcc2_compiled.:
                    .section .rodata
    .LC0:
            .string "22"
    .text
            .align 4
    .globl fn
            .type fn,@function
    fn:
            pushl %ebp
            movl %esp, %ebp
            subl $8, %esp
            leave
            ret
    .Lfe1:
            .size fn,.Lfe1-fn
            .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-97.1)"

    Do you have some example code that doesn't work as expected, to show
    to the list?

    Tim.
    */



    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Mon Sep 03 2001 - 10:54:37 EDT