Announcement

Collapse
No announcement yet.

Is PB support parellel port programming?

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

  • Is PB support parellel port programming?

    Presently I am doing one small project which envolve LPT1 port. I want to know is Power Basic support parellel port programming.
    Can any one give me detailes.

    Bye Code Warrior

    ------------------
    Deshmukh

  • #2
    Dear Mr. Warrior,

    Forum rules require that all participants use their full real name. Not nicknames or handles.

    Please re-register before posting additional messages?

    Thanks!

    Bob Zale
    PowerBASIC Inc.


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

    Comment


    • #3
      Dear Bob Zale,
      My real name is Deshmukh which is below the Code Warrior.

      ------------------
      Deshmukh

      Comment


      • #4
        Originally posted by Code Warrior:
        Dear Bob Zale,
        My real name is Deshmukh which is below the Code Warrior.
        I understand. But I'd be willing to place a small wager that you have two names -- a first name and a last name (surname/family name). You need to register under your name, not under "Code Warrior".

        Regards,

        Bob Zale
        PowerBASIC Inc.


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

        Comment


        • #5
          Hi BOB,
          I have re-registered using my real name.
          Any one tell me is DOS based PB support parellel port programming?

          Comment


          • #6
            Hi Arif,

            To start parallel port programming you need to know how does
            the parallel port working.
            You can start reading from here: www.lvr.com/parport.htm .
            I think this is the best resource on computer interfaces.

            In PowerBASIC you may use these commands: INP and OUT.
            INP - return a byte value from port
            OUT - write a byte value to port
            You can also use BIT function to test individual bits.

            See your manual or help file.


            Regards,
            Aslan.


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

            Comment


            • #7
              Dear Aslan,
              Thank you very much for giving me such a nice link. Where are you from, can you tell me some thing about your self. You can write directly to my email ID.
              Bye

              Comment


              • #8
                Arif,

                go here: b_aslan at mail.ru

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

                Comment


                • #9
                  Aslan ..

                  Be careful when trying to us INP and OUT in some operating systems.
                  If you use these functions in a DOS-VDM in OS/2, for example, and
                  something goes wrong with the port connection, it can become very
                  hard to debug or handle the resulting mess for your program.

                  That problem was addressed in the old MIcrosoft PD7 compiler which
                  can produce both native DOS and OS/2 executables. In this case the
                  function only worked in the DOS compile runs. The INP and OUT fucntion
                  wasn't even normally available in the compiler for use in OS/2 native.

                  I have no experience in the WIN world at all. However, we read that
                  direct access to the ports is not permited at some point in WIN-NT
                  and upward. In order to gain such access, writing your own drivers
                  seems to be possible, but my guess is that anyone who does work at
                  the direct hardware level still has to consider things. If you yank
                  the cable or something goes wrong with the printer or whatever is
                  on that port, you'll have to provide a graceful way to recover from
                  that error as the programmer.

                  You can, by the way, set up a DOS-VDM in OS/2 so that it does give
                  the DOS application direct access to the hardware. And, as you may
                  guess of the INP and OUT issues I mention above, some DOS programs
                  do require that when used with OS/2. But if you do decide to use
                  or write programs which do these things, unhandled or badly handled
                  programs that do this can seriously lock up a box including other
                  programs running on it at the time.

                  Just trying to help.


                  ------------------
                  Mike Luther
                  [email protected]
                  Mike Luther
                  [email protected]

                  Comment


                  • #10
                    Thanks Mike!

                    Newer though that hardware programming under OS/2 with DOS-VDM could
                    cause troubles.I have never worked under OS/2,but anyway - well informative.

                    I have hardware control DOS project and I'm thinking to port it to QNX platform.
                    Now, I'm in the stage of reading documentation on QNX..... and see that almost everything
                    can be done with Watcom C compiler. It's pity. Just don't want to switch to C


                    Cheers,
                    Aslan.

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

                    Comment


                    • #11
                      Thanks all of you for replying to my posting. I also dont know much about WIN programming (But started learning) and I also heard that WIN does not allow direct access to I/O ports. Can any one tell me why WIN does not allow direct access to I/O ports or hardware.
                      Bye

                      Comment


                      • #12
                        http://www.powerbasic.com/support/pb...hread.php?t=42

                        ------------------
                        tom hanlin
                        powerbasic staff

                        Comment

                        Working...
                        X