Announcement

Collapse
No announcement yet.

Interrupts

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

  • Interrupts

    Can PBDLL and PBCC use interuppts to obtain information about files, particularly the date stamp, and to set file attributes.

    PBDLL documentation:

    In the PBDLL online help there is and entry for WAITKEY$ under the topic variable scope. However, in the keyword listing there is no entry for WAITKEY$. What does WAITKEY$ do and is it infact a valid PBDLL function?


    ------------------
    Walt Decker

  • #2
    walt,

    >> can pbdll and pbcc use interuppts to obtain information about files, particularly the date stamp, and to set file attributes.

    yes, look at these urls
    http://www.powerbasic.com/support/pb...ad.php?t=22763
    http://www.powerbasic.com/support/pb...ad.php?t=22576

    also look at pb6 command:

    setattr

    >>in the pbdll online help there is and entry for waitkey$ under the topic variable scope. however, in the keyword listing there is no entry for waitkey$. >>what does waitkey$ do and is it infact a valid pbdll function?

    i would assume that would be a typeo due to the fact that waitkey$ is only available
    for both the pb/cc and pb/dos version of the powerbasic compiler(s).

    according to the pb/cc help file:

    purpose reads a character from the keyboard without echoing
    the character to the screen. if no key is available, waitkey$
    does not return until a key is pressed. while waiting, time slices for the
    current thread are released back to the operating system.

    lance would know for sure, lance you there?


    ------------------
    -greg

    [this message has been edited by gregery d engle (edited october 11, 2000).]
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

    Comment


    • #3
      Thanks. Although those references use API calls instead of interrupts, it should be sufficient for my purposes.

      ------------------
      Walt Decker

      Comment


      • #4
        WAITKEY$ is only available in PB/CC (not in PB/DOS and PB/DLL), so it has to be an error. I'll let the documentation dept know... thanks!

        Walter, converting DOS code to Windows (which I assume you are doing) will mean replacing interrupt-based code (ie, that calls DOS/BIOS services) with Windows API calls... that is the Windows way fo doing things... you cannot call a DOS interrupt from a protected-mode program (ie, a 32-bit Windows application).



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

        Comment


        • #5
          Thank you, Lance. Not being able to make interrupt calls may play a part in the recommendation I make to a company for which I am doing some consulting work.



          ------------------
          Walt Decker

          Comment


          • #6
            Walt,

            You can output to ports in Windows 95/98 Kernal through 32 bit
            code, for NT platforms you need to get a driver that supports it.

            here is some code that will work with 95/98

            SUB pbOut(BYVAL oport AS INTEGER, BYVAL value AS INTEGER)
            ! mov DX, oport
            ! mov AL, value
            ! out DX, AL
            END SUB

            FUNCTION pbInp(BYVAL iport AS INTEGER) AS INTEGER
            ! mov DX, iport
            ! in AL, DX
            ! mov FUNCTION[0], AL
            END FUNCTION

            ------------------
            -Greg
            -Greg
            [email protected]
            MCP,MCSA,MCSE,MCSD

            Comment


            • #7
              Thanks, Gregery. I'm not using any ports, but that may come in handy in the future

              ------------------
              Walt Decker

              Comment

              Working...
              X