Announcement

Collapse
No announcement yet.

How is PB developed

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

    How is PB developed

    Has anybody ever wondered how the folks at Powerbasic actually develop the PB compiler. Do they use a high level language like C++ or maybe Powerbasic or do the use assembler languages to keep it as small and fast as possible.

    #2
    Has anybody ever wondered how the folks at Powerbasic actually develop the PB compiler.
    I have. But never worried about it enough to ask. If I had to guess, how about previous version of PB with some in-line assembly.

    Now you want to know about version 1, right?
    Dale

    Comment


      #3
      AFAIK, the PBBrow COM browser, PBRes resource compiler and PBEdit editor are all complied with some versions of PowerBASIC.
      The complier itself, instead, seems built with something different.

      Bye!
      Last edited by Marco Pontello; 10 Aug 2008, 07:25 AM.
      -- The universe tends toward maximum irony. Don't push it.

      File Extension Seeker - Metasearch engine for file extensions / file types
      Online TrID file identifier | TrIDLib - Identify thousands of file formats

      Comment


        #4
        I have been told by an unimpeachable source PowerTree is written with PB/Windows.

        I would bet a lot of money the compiler is written at least in part using an assembler, since this was an advertised feature of PB/DOS and it woud have been totally silly to throw away, say, all that 'parsing' code just because there are a few new keywords and 'what you do when you encounter a certain keyword' changes a little bit under Windows.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


          #5
          It is still assembler even the newest and the 32 bit version. That is what makes it fly.. no high level bloatware in the PB complier.
          Barry

          Comment


            #6
            Oh, how could I have forgotten?

            I'm also quite certain an important component of the development process is an ample supply of what made my hometown of Milwaukee famous.

            How else can one explain the presence of the #BLOAT directive?
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


              #7
              The PowerBASIC Compilers are all written in 100.0% assembler. That's likely to change soon enough.

              Bob Zale
              PowerBASIC Inc.

              Comment


                #8
                Originally posted by Bob Zale View Post
                The PowerBASIC Compilers are all written in 100.0% assembler. That's likely to change soon enough.

                Bob Zale
                PowerBASIC Inc.
                Now that PBCC is fast enough, it can be written in that! Some routines with the built in ASM code!


                and fix any bugs (if any)
                Barry

                Comment


                  #9
                  PowerBASIC Compilers are all written in 100.0% assembler.
                  Love it!!!....the closer to a hardware level, the faster and more stable a product is
                  That's likely to change soon enough.
                  Please Bob, Say it AIN'T SO!!!!!

                  PB is great for speed, but over the years other compilers got more and more bloated, and as far as I can tell from even back in the ole Turbo-Basic days and on to PB, has [b]NOT!!!![b] (or at least in comparison, the only so called "Bloat" was due to more options available)

                  I LOVE a compiler that not only sets down a decisive idea, sticks to it and supports all variations from beggining to end.....I would hate to see it fall into the M$ train of thinking.

                  (or then again....did you mean a hint of a cross platform kinda thing? )
                  Engineer's Motto: If it aint broke take it apart and fix it

                  "If at 1st you don't succeed... call it version 1.0"

                  "Half of Programming is coding"....."The other 90% is DEBUGGING"

                  "Document my code????" .... "WHYYY??? do you think they call it CODE? "

                  Comment


                    #10
                    >Please Bob, Say it AIN'T SO!!!!!

                    Please, Cliff, say it ain't so you said that.

                    Sounds like the little kid who takes one look at something his mama puts on his plate and proclaims," I don't like that!" before he even tries it.

                    Maybe if YOU wrote a compiler, it would be slow and bloated; but I highly doubt Mr. Zale would let anything out of the building if were noticeably slow.

                    Frankly (and I have told him this) I think he puts too much emphasis on compilation speed at the expense of other useful features (specifically forward referencing).
                    Michael Mattias
                    Tal Systems (retired)
                    Port Washington WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                      #11
                      hehe, maybe Bob would give us the source and let us decide!

                      Tasm as I recall ?

                      Comment


                        #12
                        Originally posted by Cliff Nichols View Post
                        PB is great for speed, but over the years other compilers got more and more bloated, and as far as I can tell from even back in the ole Turbo-Basic days and on to PB, has [b]NOT!!!![b] (or at least in comparison, the only so called "Bloat" was due to more options available)
                        My guess is that PB will be written in PB than. So, you basically just blamed PB to be bloated ...

                        Comment


                          #13
                          The PB compiler executables (\bin\pbcc.exe and \bin\pbwin.exe) also contain a second executable - (just search for "MZ" within the exe)
                          I haven't bothered taking a closer look at it yet but I'm guessing it's a linker?? there is already a \bin\pbres.exe so I dont think its related to resource compilation

                          But to answer the original question, I'd have to agree that the PB compilers are written in assembly. For starters we all know that PB has been around since the Borland TurboBasic days when compiler choices were quite limited! Secondly, we all know that PB's assembly compiler is very good - you can use inline assembly anywhere you like in your PB programs, and even if PB doesn't support the specific instruction you're after you can simply use its "! db, !dw" (etc) operands to get the job done, so we know that Bob is not only fluent in assembly, but highly experienced after many decades. And third, there aren't any hints of HLL compilation in its source code, nor are there any traces of say ... Visual Studio, so my conclusion is that PB is developed in assembler.

                          At the end of the day I don't think it matters what language the PB compilers were written in, because they could be written in any language and still get exactly the same job done.

                          And whether it takes 2 seconds or 2 minutes to compile a program really has no significance at the end of a project because the end-users - the customers - the users of the program - never have to deal with that, nor should they.

                          So although the PB compilers compile faster than any other respectable compilers I've used, I don't care about that. Compiling speed is great (and especially helpful when debugging!), but ALL I CARE ABOUT is the quality of the resulting compiled executable. And that is why I am still using PB after all these years, even though Bob and I have had our disagreements in the past (he's even more passionate about PB than I am!!!)
                          Last edited by Wayne Diamond; 11 Aug 2008, 05:51 AM.
                          -

                          Comment


                            #14
                            Well..

                            Its pretty clear its written in Assembly. But I'd like to see the PB Compiler written in PB. IMO, its a true test of the effectiveness of the compiler.

                            FireFly IDE, I believe is written using PB & a previous version of FireFly. Point being it shows the reliability of the code/compiler as well as the developer competence.

                            For those "against" PB being written in PB.. Here is something to consider: If PB was written and maintained in PB, we would undoubtly get faster updates. Let's face it, we have chosen BASIC because it is a clear, "easy to read' language. You generate & debug massive amounts of code quickly. We as users benefit from this, but should Bob and his crew?

                            I imagine their software turn-around time would be greatly improved.

                            Explorations v9.10 RPG Development System
                            http://www.explore-rpg.com

                            Comment


                              #15
                              For any language product to be "written in itself" is a heck of a marketing hook.
                              Michael Mattias
                              Tal Systems (retired)
                              Port Washington WI USA
                              [email protected]
                              http://www.talsystems.com

                              Comment


                                #16
                                If PB was written and maintained in PB, we would undoubtly get faster updates. Let's face it, we have chosen BASIC because it is a clear, "easy to read' language
                                And just what makes you think the development team at PB doesn't find well-written assembly-language code just as "clear [and] easy to read" as you and I would find well-written BASIC?

                                Some of these guys have been reading and writing assembly language since you and I were in short pants.

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

                                Comment


                                  #17
                                  Dude..

                                  And just what makes you think the development team at PB doesn't find well-written assembly-language code just as "clear [and] easy to read" as you and I would find well-written BASIC?

                                  Some of these guys have been reading and writing assembly language since you and I were in short pants.
                                  Dude..

                                  I was only throwing that out as a possible "pro" to using their own language. BASIC is simple, it is a high level language. ASM isn't. I written a little ASM, and its clear that the development time is much longer. Because its such a low-level language, the developers have much more work to do.

                                  I'm not trying to claim I know their expertise. I just saying that PB written in PB could be a very good thing. Lets let them (Bob & Company) decide.

                                  I didn't know being an optimist could bring such negativity. :/
                                  Explorations v9.10 RPG Development System
                                  http://www.explore-rpg.com

                                  Comment


                                    #18
                                    I written a little ASM, and its clear that the development time is much longer.
                                    For you and probably about 99.7% of the members here I'm sure that's accurate.

                                    But who really cares?

                                    Does it work as advertised?
                                    Is is reasonably efficient?
                                    Do we get regular and timely updates and upgrades?

                                    As long as we have three 'yes' answers there, it doesn't matter to me if it's written in BASIC, assembly-language or ADA.

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

                                    Comment


                                      #19
                                      I think an important point is being missed here, there are two distinct levels within a compiler. The first level is what language it uses the parse the input text file, the second is what language it uses to produce the final machine code.
                                      For example a language like Forth or its nearest modern equivalent Postscript has very few functions or statements that are actually implemented in machine codes. So statement and functions were built up out of calling simpler statements and functions down the stack until they actually run the machine code, easy to compile but results in slow processing.
                                      Another alternative is to produce P code like VB, this opens the possibility of multi platform but requires large run times and again usually results in a loss of processing speed.
                                      The fastest is using a final step of assembler to produce the machine code via programs like TASM or MASM as PB does.
                                      I really can’t see PB changing the way they do the second step which is to produce carefully tailored assembler/machine code for the final output.

                                      Comment


                                        #20
                                        Who?

                                        Well now that we know what what about who?

                                        How many people does it take to write these compilers? and who are they?

                                        Bob,
                                        How much code do you still contribute to the compilers? No doubt you still enjoy coding but running a company must take time away from that. It also seems like you've been put on documentation duty lately

                                        Looking forward to the new tools.
                                        Start as you mean to go on.

                                        Comment

                                        Working...
                                        X
                                        😀
                                        🥰
                                        🤢
                                        😎
                                        😡
                                        👍
                                        👎