Announcement

Collapse
No announcement yet.

ASM question

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

  • ASM question

    Forgive me if this sounds offensive, but I want to know whether an ASM statement in Power Basic generates simply Assembly-language code, or whether it is some sort of emulator. Here is why: I have a sorting application in Power Basic, with pointers and ASM statements. I have the same thing in highly optimized bloatware with Fortran pointers. The bloatware is Intel Fortran and is 480K, vs. about 20K for the Power Basic. Both apps are fully debugged and give perfect results. However, the Fortran (sorry to say this) is about 3 times faster, with my test data set, than the Power Basic. True, we are looking at 0.03 to 0.04 second (Fortran) vs. 0.09 to 0.10 second (Power Basic), but I am wondering why the blaotware, using only Fortran pointers, is measurably faster. Sorry, I know you don't like to see compilers compared with each other in this forum, so please forgive the offense.
    P.S. The same thing in Power Basic, with pointers but without ASM code, is about 0.18 seconds, so the ASM code is definitely working.

  • #2
    Harry,
    inline ASM statements each compule to a single opcode. There is no emulation.
    If you want to know why one sort is faster than another then you'll need to post some compilable code.

    Paul.

    Comment


    • #3
      ASM question

      Thanks for the info that ASM compiles directly to opcodes and is not an emulator.
      As for posting codes, one code is PB with ASM, and the other is Fortran -- something that should probably not to be considered here.
      However, I would be happy to post the PB code (with ASM) as a working example of a comb-sort. The sorting routine is heavily laced with comments, and is about 220 lines.
      I would be happy to do this, but - - is this the place for code examples?

      Comment


      • #4
        - - is this the place for code examples?
        Hi Harry;

        Yes! This would be the place to post code samples. Please remember to use the code tags (# icon) so that your code can be copied and pasted.

        Code:
        'Your code here.

        Comment


        • #5
          Harry, you may want to post your code in the brand new Assembler Forum.

          Comment


          • #6
            Or maybe "source code" should go in the "Source Code" Forum?

            I'm not sure what the PBPTB had in mind should the new Assembler forum generate user source code constributions.
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              ASM question

              I have just submitted it to the Assembler forum.

              Comment

              Working...
              X