Announcement

Collapse
No announcement yet.

PB exe's and non MS dos versions

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

  • PB exe's and non MS dos versions

    Hello people,

    i'm running into problems with my compiled code on freedos and ptsdos.
    my program works fine under MSdos version 7.1 (the version that came with
    windows 98, so to say). when i run my exe under freedos, ptsdos or other
    non-MS versions i get all sorts of errors, appearing randomly. sometimes
    i get file open errors, sometimes arrays that are out of bound, sometimes
    files don't even get written to disk. the file open errors can be
    reproduced, the array errors appear to be somewhat more random.
    appearing file errors are 72 and 75, array error is usually 9.
    the only non MS dos version that works okay is caldera dos (the version
    that is shipped with partition magic, drive image etc.).
    my code contains error trapping for filehandling which works great under
    MS-dos, but does not appear to do anything under freedos/ptsdos etc.
    if anybody has any tips on how to get PB compiled exe's to work better
    under freedos/ptsdos etc, i'd be extremely grateful. thanx.

    Tom


    ------------------
    [URL=http://www.DiyDataRecovery.nl]
    [URL=http://www.DiyDataRecovery.nl]

  • #2
    I believe PowerBASIC for MS-DOS is only supported on MS-DOS, so you may be facing a long climb.

    That said, I'd look for any CALL INTERRUPT, inline assembly language, direct access to hardware via PEEK/POKE, CALL DWORD or maybe any floating point math.

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

    Comment


    • #3
      Tom,

      freedos and ptsdos just emulate DOS, they are not 100% compatible. Some dos-interrupts are only partially implemented. Some responses to interrupt calls will be slightly different to MS-DOS (which is probably the reason for your file open errors). A register may be changed which MS-DOS never changes. Depending on which command you use these differences can be sufficient to make your Powerbasic program unstable.

      Powerbasic was written and tested for MS-DOS and I don't think it makes sense for Powerbasic Inc. to rewrite it to support dos-compatible operating systems. Although I wish it would.

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


      [This message has been edited by Georg Potthast (edited August 03, 2004).]

      Comment


      • #4
        Tom,

        After a LONG exposure to this, I can tell you that PowerBasic 3.5 works
        darned well on IBM's MS-DOS, including the emulation of MS-DOS that is
        a part of all the OS/2 distributions. Yes, there has been some expressed
        question of the EMS/XMS memory management implementation that IBM gives
        us as a part of MS/DOS and the emulation of that as a further part of
        OS/2. But if you scan all the PB forum postings on this for quite a
        few years, you'll see that there are also a substantial number of similar
        threads for upper memory management and memory use issues for non-OS/2
        operations as well.

        In that PB 3.5 code works darned well in the IBM arena, as far as I can
        tell, if you are planning an embedded system operation or for some other
        reason want to use DOS, you might want to really talk with IBM about
        the use of their licensed DOS products. Not only are they still being
        maintained to date, and thoroughly so in the OS/2 variations, but they
        are -- within whatever DOS, I guess lets you be -- Y2K compatible as
        released by IBM and certified so! Oh but nobody uses this? Well, the
        published span of use just a few months back from IBM lists over 2
        million currently used and licensed seats for their DOS!! And don't
        ask me where or who, I have no real idea plus they won't tell you as
        well, as far as I know. After all, of their over 80 billion in annual
        revenue, a couple years back they admitted that less than 1500 customers
        world-wide accounted for over 90% of that money!

        And with over 2 million DOS licensed seats in the house still playing?
        Interesting and worth examining if you really need and want continued
        support for DOS, in my humble opinion.

        Your previous poster's remarks as to why some of the 'DOS' distributions
        don't perhaps work well with PB is to my experience, right on the mark.
        But there are a substantial number of dedicated systems and so on which
        are still very much in need of and based on DOS. And I'll be the first
        one to champion Bob Zale and his careful coding that has made PB the
        wonderful DOS product it is. And that performance isn't at all limited
        to the Microsoft actual release at all, as I have noted to you.



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

        Comment


        • #5
          Originally posted by Mike Luther:
          ...I can tell you that PowerBasic 3.5 works darned well on IBM's MS-DOS,...
          Also works extremely well on Caldera DOS 7.x here.



          ------------------
          Scott Slater
          Summit Computer Networks, Inc.
          www.summitcn.com
          Scott Slater
          Summit Computer Networks, Inc.
          www.summitcn.com

          Comment


          • #6
            let me clarify some things here. i need a dos version to distribute with
            my program. it should be clear that there is no way in hell that i (as i simple
            shareware coder) can pay for a deal with ibm to use their dos version,
            as godly beautiful as it may be. my aim is to distribute my program
            with a dos version so that i can supply my users with a complete ready
            to use package.
            in response to another post: freedos/ptsdos etc. are NOT dos emulators.
            check their documentation. freedos etc. are attempts (keyword) to rebuild a
            new dos version that's supposed to be 100% compatible with msdos 5.x.
            freedos can't really be blamed, since that is free (and managed by linux people)
            you can't expect that much. i just had higher hopes for commercial versions.
            anyway, i understand that PB is not to blame here. i just hoped for some general
            tips & tricks that might have made things work better.
            so that's enough freedos trashing for one day, back to the drawing board.
            thanx people.

            Tom

            ------------------
            [URL=http://www.DiyDataRecovery.nl]
            [URL=http://www.DiyDataRecovery.nl]

            Comment


            • #7
              Have you tried DR-DOS? We always used it for our NetWare servers without any problem.
              You can download a trial version: http://www.drdos.net/download.htm
              I believe that one license only costs some ~ USD 20.

              ------------------
              Regards,
              Peter
              Regards,
              Peter

              Comment


              • #8
                Tom, perhaps you should try to create a small test case that illustrates this behavior and then send it to the FreeDOS developers. If this is a bug in FreeDOS, or a bug that should be copied from MS-DOS, then I think they would be willing to implement patch to make it work.

                I should also mention that I've used quite a few PB-compiled programs in FreeDOS as well as PB itself and have never had any problems. Of course it has been many years since I seriously did anything in DOS. I must say, also, that the FreeDOS command interpreter is so much better and nicer than command.com ever was. It's a pity FreeDOS wasn't around 10 to 15 years ago.


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




                [This message has been edited by Michael Torrie (edited August 05, 2004).]

                Comment


                • #9
                  Tom,

                  did you test your programs under any earlier version of MS-DOS,
                  for example 6.22? - Version 7.10 is not really "DOS", since it
                  implements several features not present in "real" DOS, such as
                  long filenames etc. This might be another reason for your
                  programs to work under 7.10, but not with other versions.

                  Regards,

                  Hans Ruegg

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

                  Comment


                  • #10
                    update:

                    i've done some more testing and found out the following:
                    exes compiled from the IDE do not work as expected on Freedos, leading
                    to random crashes as described before. however, exes compiled from the
                    PBC compiler work okay, except for 1 error that can be reproduced.
                    this would obviously lead to questions about differences between the compiler
                    versions. as i stated before, i find this somewhat alarming and would
                    like some replies from the PB developers on this. for now i only use
                    the IDE compiler for small programs. note: this behaviour is the same
                    for all dos versions is use: msdos (yes, msdos too), caldera, pts, freedos.
                    additional info: i've noticed that the errors that pop up when using
                    the IDE compiler are always related to basic functions from PB itself.
                    all my code that uses interrupts or bypasses PB in any way, does this
                    perfectly under freedos. it's functions like error trapping and file-
                    handling that lead to errors.

                    Tom

                    ------------------
                    [URL=http://www.DiyDataRecovery.nl]
                    [URL=http://www.DiyDataRecovery.nl]

                    Comment


                    • #11
                      exes compiled from the IDE do not work as expected on Freedos....however, exes compiled from the PBC compiler work okay...
                      ..this would obviously lead to questions about differences between the compiler versions [sic]... would like some replies from the PB developers on this..
                      This "difference" between the IDE compiler and command-line compiler (not version differences) has been brought up here and on the predecessor Compuserve BBS many times over the years.

                      And every time the "problem" has turned out to be a difference in the set of compiler-directing metastatements (e.g. $FLOAT, $STRING, etc) used.

                      You need to make sure you are using the same options when compiling, either by specifiying the same PBCONFIG.PB file or by making sure that <U>all</U> available metastatements are included in the source code and none use the default values.

                      FWIW, if you are compiling/running on non-MS-DOS operating systems, you are in uncharted, unsupported territory anyway.



                      [This message has been edited by Michael Mattias (edited August 10, 2004).]
                      Michael Mattias
                      Tal Systems Inc. (retired)
                      Racine WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        I am a FreeDOS user myself and never had any problems with PB,
                        so I would also think the problem is elsewhere.

                        Regards,

                        Hans Ruegg.

                        Comment


                        • #13
                          It is also possible (I've seen similar problems a few times before) that there could be a problem with the memory manager (EMS/XMS) on the PC being used to compile the code, causing problems in the compiled code that then show up on some other platforms. In these cases, small changes to the code and/or using the command-line compiler cause the symptom to change unpredictably.


                          ------------------
                          Lance
                          Conductive Software Systems
                          mailto:[email protected][email protected]</A>
                          Lance
                          mailto:[email protected]

                          Comment

                          Working...
                          X