Want to light up LED's via the parallel port

I am helping my nephew with a project. He wants to light up LED's via the parallel port. I think the code to send data to the port pins is:

Port[$37F]:=1; { D0 }

I am running Windows 2000 and my nephew is using XP. I have heard that pascal cannot access the port directly under these operating systems; I need to download something?

Can anyone point me in the right direction on a simple code to light a LED via the parallel port.

Comments

  • Hy you cant acess directly to port in winXP, but u can call an interrupt emulated by windows.

    procedure initport;
    begin
    asm
    mov ah,01
    int $17{ or int 17h}
    end;
    end.

    procedure sendlpt(val:byte);
    begin
    asm
    mov ah,00
    mov al,val
    mov dx,0 { 0=lpt1,1=lpt2,2=lpt3,3=lpt4}
    int $17{ or int 17h}
    end;
    end;

    i think this will help u , otherwise i dont know . Sorry.


    SFX
    Faro Algarve Portugal


  • : Hy you cant acess directly to port in winXP, but u can call an interrupt emulated by windows.
    :
    : procedure initport;
    : begin
    : asm
    : mov ah,01
    : int $17{ or int 17h}
    : end;
    : end.
    :
    : procedure sendlpt(val:byte);
    : begin
    : asm
    : mov ah,00
    : mov al,val
    : mov dx,0 { 0=lpt1,1=lpt2,2=lpt3,3=lpt4}
    : int $17{ or int 17h}
    : end;
    : end;
    :
    : i think this will help u , otherwise i dont know . Sorry.
    :
    :
    : SFX
    : Faro Algarve Portugal
    :
    :
    :
    Thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories