Announcement

Collapse
No announcement yet.

Why does it work HERE but not HERE?

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

  • Why does it work HERE but not HERE?

    I have two BBS door programs that I am trying to "elegantize."
    The aspects of both of them that I want to improve are the
    keyboard timeouts. As they are now (they're both production
    releases, already - am simply trying to accomplish it in a
    less kludgye manner), while waiting for input from the user,
    whether he is logged on locally or remotely, in their input
    loops, they call a GOSUB routine at the start of each iteration
    of the loops. What I *want* to do is to use ON TIMER. That way,
    I can trim out about 25 linesof code, and replace them with
    about 6. However, the ON TIMER only works successfully (i.e.,
    times out and sets the FlagTimer var, which notifies the keypress
    input loops that the timeout limit has expired, so the doors
    can terminate) on local logons. It has NO effect on remote logons.

    Would this be because the FOSSIL and the internal comm input
    routines are "blocking" in nature? According to my Rolf Brown
    Interrupts list, the FOSSIL driver interrupt service I'm using
    should NOT be. However, I can't think of any reason why the
    exact same program will work in a local logon, but not in a
    remote logon. I cannot understand how it could be because of
    having BASIC commands running in the foreground while the ON TIMER
    (which uses a hardware interrupt?) is running, as that should also affect
    the local logons.

    Unfortunately, both programs are too big to post the questionable code
    here.

    The FOSSIL driver version of the input uses interrupt: &H14, AH = &H20.
    The internal comm input routine uses:

    IF ISTRUE(LOC(FF1)) THEN
    S = INPUT$(LOC(FF1), #FF1)

    and so on.

    Any ideas?

    Thanks in advance!

    Cordially,



    ------------------
    Clay C. Clear
    mailto:[email protected][email protected]</A>
    Clay Clear's Software (Frames Only)

  • #2
    OK, disregard original message. IF I simply cannot fix the
    problem, I will post a new message in this thread.

    I just wrote a test program that is SIMILAR to my live
    programs, except that it doesn't use a live remote connection.
    All it does is open a commport and use INPUT$. The test program
    worked with ON TIMER. So, am now going to go and review the
    source code for my two production programs. Apparently, there
    is an error in my attempts to use ON TIMER.

    Regards,


    ------------------
    Clay C. Clear
    mailto:[email protected][email protected]</A>
    Clay Clear's Software (Frames Only)

    Comment


    • #3
      OK, there IS a problem with using ON TIMER with live remote
      connections. I just wrote a second test program, which tested
      it, and it hung.

      Hmmm...could it be because my terminal program and my remote node's
      logon are done from the same computer? Unfortunately, I do not
      have a cosysop to test things with. But, if that's the
      case, then ON TIMER probably would not be safe for a BBS door,
      as there is a chance of the same door being run simultaneously
      on different nodes.

      Any ideas, anybody?


      ------------------
      Clay C. Clear
      mailto:[email protected][email protected]</A>
      Clay Clear's Software (Frames Only)

      Comment


      • #4
        It's hard to guess Clay, when only two lines of code have been posted, and they relate to data input.

        How about stripping the non-working code down to its barest, and posting it...? Maybe we can spot something.

        Regarding the "blocking"... this should be easy to test for by interleaving lines that write data to the screen or a log file, including the time, etc.


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

        Comment


        • #5
          Lance,

          Disregard, I figured out the cause of the problem. The ON TIMER
          *was* working on the remote logons - I just wasn't waiting long
          enough. In other words, I have finally fallen prey to the Windows
          timeslicing. Makes sense, since my BBS is an old, old DOS-based 16-bit
          program, which means that my programs are that, also. And, on top
          of that, because of the nature of the means that I was doing the
          remote logon testing, the remote node's window was necessarily
          minimized to the taskbar, so I could use my terminal program.

          The solution? Keep my current format in the programs! Got to,
          since any other sysops who have my brand of BBS, which these two programs
          are specifically written for, would incur the same problem.

          Thanks anyway, Lance.

          Cordially,


          ------------------
          Clay C. Clear
          mailto:[email protected][email protected]</A>
          Clay Clear's Software (Frames Only)

          Comment

          Working...
          X