Announcement

Collapse
No announcement yet.

I Want.....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Russ Srole
    replied
    Be prepared! Someday soon MicroSoft won't be selling a version of
    windows that allows the direct port access.

    ------------------

    Leave a comment:


  • MehmeT Ali
    Guest replied
    Why Run Under Win2000 Profesional ???

    ------------------

    Leave a comment:


  • MehmeT Ali
    Guest replied
    SELAM
    THANK YOU THE SAMPLES IS RUNING

    AND I AM SORY MY ENGLISH LANGUAGE NOT VERY....
    THANK YOU
    THANK YOU ALL FRIENDS


    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    Yes... install a kernel-mode driver (similar to a Win9x VxD) and do your I/O through that. See www.lvr.com for more info.

    Originally posted by ARTHUR KOHL:
    Lance,
    I tryed it on W98 and it worked ok.
    I don't have NT or W2000.
    Do you have a solution for them?

    Arthur
    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Russ Srole
    replied
    www.sstnet.com has a really nice freeware package (DLPORTIO)
    that works with NT. I haven't tried it with win2000, but will oon.
    You will need to get Depends.exe (Dependency Walker) to get change
    the alias' in the include file. The DLL has those "C mangled"
    names, so if you don't change them, nothing works.
    I can't remember where I got Dependency Walker. It is free on
    the web, maybe even on the PB site.

    I've gotten the byte i/o routines to work just fine. They have
    some buffer version, but not luck. Since it's a freebie they
    would really like it if you don't bother them with tech support.

    Russ Srole

    ------------------

    Leave a comment:


  • ARTHUR KOHL
    replied
    Lance,
    I tryed it on W98 and it worked ok.
    I don't have NT or W2000.
    Do you have a solution for them?

    Arthur

    ------------------



    Leave a comment:


  • ARTHUR KOHL
    replied
    Mehmet,
    In revisig my posting above, I noticed that a line of code
    was devided improperly.
    Please correct the line as follows:
    DIALOG NEW 0, "IN-OUT test to PORT 3F8H", ,, 200, 100, 0, 0 TO hDlg

    Good Luck!
    Arthur


    ------------------



    Leave a comment:


  • Lance Edmonds
    replied
    It says it works, but it won't under Win NT/2000!


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • ARTHUR KOHL
    replied
    MEHMET ALI,

    TRY THIS,


    '=============================================================================
    ' portest3.bas - It Works!
    '-----------------------------------------------------------------------------
    #COMPILE EXE
    #INCLUDE "win32api.inc"
    '-----------------------------------------------------------------------------
    %IDsend = 1
    %IDExit = 2
    %IDreceive = 3
    %IDenvia = 4
    GLOBAL Value AS INTEGER
    GLOBAL valorrecebido AS INTEGER
    GLOBAL PortAddress AS INTEGER
    GLOBAL F AS INTEGER
    '-----------------------------------------------------------------------------
    CALLBACK FUNCTION sendport()
    CALL out32 (BYVAL PortAddress, BYVAL Value)
    CONTROL SET TEXT CBHNDL,%IDenvia, STR$(value)
    CALL in32 (BYVAL PortAddress)
    CONTROL SET TEXT CBHNDL,%IDreceive, STR$(F)
    Value = Value + 1
    IF Value => 255 THEN Value = 0
    END FUNCTION
    '-----------------------------------------------------------------------------
    CALLBACK FUNCTION Fim()
    DIALOG END CBHNDL, 0
    END FUNCTION
    '-----------------------------------------------------------------------------

    FUNCTION PBMAIN() AS LONG
    LOCAL hDlg AS LONG
    PortAddress = &H378 '(Usual PARALEL-port address IS &h378)
    Value = 1 'Valor inicial a ser enviado para o Port
    DIALOG NEW 0, "IN-OUT test to PORT 3F8H", ,, 200, _
    100, 0, 0 TO hDlg
    CONTROL ADD LABEL,hDlg,-1,"Read value ",10,10,80,8
    CONTROL ADD LABEL,hDlg,-1,"Sent value ",10,30,80,8
    CONTROL ADD TEXTBOX,hDlg,%IDreceive,"",90,10,60,12
    CONTROL ADD TEXTBOX,hDlg,%IDenvia,"",90,30,60,12
    CONTROL ADD BUTTON, hDlg, %IDsend, "Send", 50, 75, 40, 14, _
    %BS_DEFAULT CALL sendport
    CONTROL ADD BUTTON, hDlg, %IDEXIT, "End", 110, 75, 40, 14,0 CALL Fim
    DIALOG SHOW MODAL hDlg
    END FUNCTION
    '-----------------------------------------------------------------------------

    REM DECLARE SUB Out32(BYVAL PortAddress AS INTEGER,BYVAL ByteValue AS BYTE)
    SUB Out32(BYVAL PortAddress AS INTEGER,BYVAL ByteValue AS BYTE)
    ' ! push dx
    ! mov dx,PortAddress
    ! mov al,Value
    ! out dx,al
    ' ! pop dx
    END SUB

    '-----------------------------------------------------------------------------

    REM DECLARE FUNCTION In32(BYVAL PortAddress AS INTEGER) AS BYTE
    FUNCTION In32(BYVAL PortAddress AS INTEGER) AS BYTE
    LOCAL Valorrecebido AS BYTE
    ' ! push dx
    ! mov dx,PortAddress
    ! in al,dx
    ! mov Valorrecebido,al
    ' ! pop dx
    F = Valorrecebido
    END FUNCTION
    '----------------------------------------------------------------------------

    SALAM,

    ------------------



    Leave a comment:


  • Lance Edmonds
    replied
    See the FAQ forum for inline-assembler code for port I/O under Win9x (not NT/2000).

    See www.lvr.com for hardware access DLL's and Kernel-mode drivers for PowerBASIC.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Peter Manders
    replied
    You can't use IN and OUT instructions in 32 bit Windows. But they might work in Windows95/98/ME.

    If you really really really really must, you can use:

    ASM db &H0EE 'out dx, al
    ASM db &H0EC 'in al, dx

    No guarantees though! Use at your own risk!

    There is a DLL out there for this too, which I'm sure I have on my harddisk but it's hiding from me now...

    Peter.


    ------------------
    [email protected]

    Leave a comment:


  • Cecil Williams
    Guest replied
    I believe we have a com problem. Could you please restate
    your concern a little more clearly?????

    Cheers,
    Cecil

    ------------------

    Leave a comment:


  • MehmeT Ali
    Guest started a topic I Want.....

    I Want.....

    I Want Document Power Basic DLL 6.00
    And I am Not Run
    Out PortNumber, Value
    INP PortNumber

    Or ASM OUT &h..
    ASM IN &h..

    Plese Help ME....


    ------------------
Working...
X