Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

Strange err

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

  • Strange err

    select case atcfg.blasteroverride <error here
    case 0
    ?"No"
    ?:?:?:?
    case 1
    ?"Yes"
    ?hex$(atcfg.baseaddr)
    ?atcfg.irq
    ?atcfg.lodma
    ?atcfg.hidma
    end select

    error 11: Division by zero

    Any hints?

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


    [This message has been edited by Pawel Kusmierek (edited August 06, 2002).]

  • #2
    I have been told that using periods in a label is not a good
    idea. With PB3.5, I have bumped against this a couple of times,
    but byin-large, it works okay. Try deleting the period in the
    label(s) and see what happens.


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


    [This message has been edited by Mel Bishop (edited August 06, 2002).]
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3

      Actually, it is record.field, not a label with period.
      In the line just above there was [something]/1e3
      I changed it to /1000 and the program was OK.

      Previously, /1e3 was fine, the error showed up after changes
      somewhere far away in the code. Now, with /1000, errors
      show in other strange places. It looks like PB/DOS fails
      with large code (((.



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

      Comment


      • #4
        If you're not using $ERROR ALL ON ... do. It's exactly designed to help
        you find program errors.

        It looks like PB/DOS fails with large code
        If I had a nickel for every time someone blamed the compiler for their
        own mistakes...! C'mon, Pawel, let's not jump to conclusions. PB/DOS
        has been through many, many years of testing by many, many thousands
        of customers. It surely still has bugs but, it's a quite mature product,
        and it's almost certain that the problem is in your code. If you can
        show us otherwise, of course, please notify mailto:[email protected][email protected]</A>
        so we can fix it. In the meantime, vague allegations of doom are not
        greatly appreciated.

        ------------------
        Tom Hanlin
        PowerBASIC Staff

        Comment


        • #5
          Thanks Tom, but I have:
          $error bounds on, numeric on, overflow on, stack on

          Maybe my conclusions went to far, however I have been receiving
          obviously strange error messages since my code exceeded 200K
          or something. These errors can be overcome by 'magical' methods,
          such as changing order of procedures, or, as above, replacing
          something by its equivalent.

          I am absolutely aware that my program is rather poorly written,
          overcomplicated and so on. But I do not like to receive
          mysterious error messages at a place in the code when I make
          minor changes in a far, unrelated (or at least not directly
          related) part of the code.

          I apologize if my words are too bitter, I am just slightly
          desperate. Since the code size exceed about 200K, I have had
          to fight with magical methods for almost every extension
          of the program.

          Sorry for bad English and for my bad mood.

          PS. Tom, you said 'PB/DOS has been through many, many years
          of testing by many, many thousands of customers.'

          Has this testing produced any patches to PB 3.5. Maybe I
          missed something?

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




          [This message has been edited by Pawel Kusmierek (edited August 06, 2002).]

          Comment


          • #6
            Use Compile / Get Info to check on your segment sizes. If any of them
            are too close to maximum, try adjusting your $SEGMENT statements.

            There have been a number of minor updates to PB/DOS 3.5. See the Support
            page for the latest version info:

            http://www.powerbasic.com/support/

            If you do not have the latest, ask mailto:[email protected][email protected]</A> for an update.
            Don't forget to let them know your serial number.

            ------------------
            Tom Hanlin
            PowerBASIC Staff

            Comment


            • #7
              Tom,

              I have asked [email protected] for an update twice, but they
              don't answer.

              Here is a copy of my last @mail, dated 7-7-2002:

              Dear Sirs,

              In January 13th, 2002 I send to you the following @email:

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

              From a reply posted by Lance Edmonds in the PB forums:

              "Finally, if your copy of PB.EXE is dated earlier than 19-12-97 (dd/mm/yy) then you should send an email to [email protected] (with your serial number!) and request an update to that edition."

              Mine is dated 17-12-97. Would you please send me the updated version?
              My serial number is xxxxxxxxx.

              Regards.

              José Roca
              Daman Software, S.L.L.
              ----------------------------------------------------------------------------------

              I'm still awaiting for a response.
              Regards


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

              Comment


              • #8
                Originally posted by JOSE ROCA:
                I have asked [email protected] for an update twice, but they
                don't answer.
                Actually... I have record of your email on 1/13/02
                and my subsequent reply on the 14th which I will not post here.

                I will send my inquiry to you again via email and attach all
                previous correspondence for clarification.

                For future reference - Although we are awfully busy here,
                it will never take us a month to respond to an email of that
                nature.



                ------------------
                Neil Bertz
                [email protected]
                PowerBASIC Staff

                Comment


                • #9
                  Thank you, Tom.
                  Use Compile / Get Info to check on your segment sizes. If any of them
                  are too close to maximum, try adjusting your $SEGMENT statements.
                  How much is too close? 60K? 63K?


                  If you do not have the latest, ask mailto:[email protected][email protected]</A> for an update.
                  Don't forget to let them know your serial number.

                  I will as them as soon as I find my serial number .

                  Pawel

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

                  Comment


                  • #10
                    Use Compile / Get Info to check on your segment sizes. If any of them
                    are too close to maximum, try adjusting your $SEGMENT statements.
                    Agree; concur; assent; aye; yes.

                    MCM
                    Michael Mattias
                    Tal Systems Inc. (retired)
                    Racine WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #11
                      64 Kb would be 65,535 bytes. The maximum you ever want to use is 65,520.
                      I'd suggest a more comfortable margin-- say, 65,000 bytes maximum.
                      More, if you expect to add more code to that section in the future.

                      ------------------
                      Tom Hanlin
                      PowerBASIC Staff

                      Comment


                      • #12
                        say, 65,000 bytes maximum.
                        More, if you expect to add more code to that section in the future
                        I'd say less, maybe in the 50 Kb range.

                        I've had problems over the years with all kinds of strange things happening when segments start getting even that close to the 64 Kb magic number.

                        Besides, it costs nothing to add a $SEGMENT, as $SEGMENTs may not occur within a procedure, and all calls to procedures are FAR (full segemnt ffset) calls anyway (AFAIK).

                        (Unless you are doing something really dopey, like getting a CODESEG value,making it a SHARED variable and assuming it never changes).

                        MCM
                        Michael Mattias
                        Tal Systems Inc. (retired)
                        Racine WI USA
                        [email protected]
                        http://www.talsystems.com

                        Comment


                        • #13
                          Again, please avoid vague allegations about "I thought I sometime saw
                          something." If you can demonstrate a problem, tell us. If you can't,
                          don't assume it has anything to do with PowerBASIC.

                          There is no great harm in limiting segments to 50K or less, as long
                          as you don't run out of segments.

                          ------------------
                          Tom Hanlin
                          PowerBASIC Staff

                          Comment


                          • #14
                            I wouldn' t consider the 64 KB a magic number, it' s right the size limit for code segments.
                            I must say that it happened to me sometimes to get rid of unexplicable runtime errors by just moving or adding $SEGMENT or $CODE SEG metastatements, but unfortunately i didn' t keep the code to demonstrate it (so i can' t even tell that the cause wasn' t in my code ).
                            On the other hand, my current PB/DOS project is made of several segments one of which is 62K, and this never never gave absolutely any trouble.
                            So my conclusion was that simply when there is some "problem" in my code which corrupts memory somewhere, or when i' ve met one of those darned memory manager problems, then if the segment size is very big this makes the problem more likely to show up. I don' t know whether this is true anyway, it' s just my impression.

                            ------------------
                            Davide Vecchi
                            [email protected]

                            Comment


                            • #15
                              Over the past 12-odd years I've written a fairly large number of commercial application suites, utilizing every version of PowerBASIC/DOS that has ever been released, from v2 through v3.5.

                              Each of these suites contains large numbers of program and chain modules, containing anything from 1 to 16 segments each, and each segment pushed very close to the edge of the 64K segment limit.

                              In all this time, I've never experienced the problems alluded to here. I've seen similar effects with faulty memory managers though, so such symptoms can indeed be misleading and difficult to pin down.

                              Hence, to investigate this problem, we need to enlist <U>your</U> help folks, and you can do this by submitting a detailed report and source code/data directly to Tech Support. If/when we receive the code necessary to duplicate the problem, believe me, we will take the report very seriously and investigate.

                              Therefore, if you do happen to encounter such a problem, please be sure to immediately save a copy of the code (and any support/data files necessary to run the code), and then continue on with the original code to determine if moving the $SEGMENT metastatements sorts out the problem. If it does, you can then easily email the saved copy of the code/data to Tech Support for investigation.

                              Naturally, we'll also need to see details of your OS version, memory manager version(s), memory settings (conventional/EMS/XMS), and also the time/date of your PB.EXE file.

                              Thanks!


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

                              Comment

                              Working...
                              X