Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: QBasic - The Interpreted and Compiled Language.

  1. #1
    Join Date
    May 2003
    Location
    Back of Burke (Guday!), Australia
    Posts
    2,905

    Default QBasic - The Interpreted and Compiled Language.

    I was wondering if anyone had any thoughts about how QBasic would deal with certain problems while shifting from it's Interpreted Form into the Compiled format, or if it's being written in a certain way to avoid certain problems.

    I can only draw upon experiences from my own system (Amstrad CPC) and Locomotive BASIC. It's a fine language, though it wasn't bundled with Compiler as standard, so many 3rd Party software houses made their own Compilers based on the language, lots of them lack the use of Floating Numbers (not all, but many) and it's left me with the feeling that certain parts of the Language are omitted because they have written something which is emphasised on Speed rather than Accuracy, though again I don't know if it's due to the way an Interpreted language can do certain things which are more problematic in Z80 Assembly.
    In recent years a Cross Compiler was written (under Windows), it too wants to create something which is close to that BASIC, but it also wants to enhance it's performance with speed, though it seems to sacrifice in a number of other areas, I have a List somewhere translated documentation of the differences & there's a Website if anyone wanted to see it. A few years ago I tried writing a Game for it, but some frustrating issues left me to leave that Compiler and code it in Pascal instead and I had no problems completing the project with that. Execution times were excellent and I only thing I had to worry about was running out of memory as I only had 20Kb.

    I don't know if the problem is QBasic runs under DOS on 16-Bit Platform and 16-Bit Assembly has more provisions to make Interpreted Languages much easier to translate to. Please share your thoughts.

  2. #2

    Default

    I could be wrong but QBASIC was just a tokenized BASIC. It was not a true compiler in the sense that it would create code like a C compiler. It did make better use of the line numbers and replaced them with actual addresses. Most BASICS of that time were simple but very inefficient. Most could be significantly improves if the subroutines used the most were at the beginning of the program with the lowest numbers. One could make a guess how they worked just knowing that.
    Dwight

  3. #3
    Join Date
    May 2009
    Location
    Connecticut
    Posts
    4,271
    Blog Entries
    1

    Default

    QBASIC is QuickBasic without the ability to emit executable files. The result is the same as running the program within QuickBasic for debugging purposes. About a year before QBASIC was added to MS-DOS, the MS Press book Learn BASIC Now had a similarly cut down version of QuickBasic.

  4. #4
    Join Date
    Jun 2016
    Location
    Guisborough, England
    Posts
    193

    Default

    QBasic (Quick Basic) is available in two forms that I'm aware of, both PC/DOS systems, nothing to do with CP/M.

    There is the 'free' version, which comprises a cut down (I believe) IDE and in effect an interpretive version.

    Then there is the full (commercial) version which has the same language, the same IDE, but the extra facilities to provide the immed interpreter, and the compiler (which has both a semi interp form using a run-time module, or a full compiler which creates a stand-alone .EXE file.

    As far as I know, the latter is a full compilation. I have version 4.0, with the full (3 volume) manual set.

    Geoff

  5. #5

    Default

    This was my favorite BASIC, the commercial version. It could also emit OS/2 native executables, and i used it to write a simple but absolutely critical OS/2 program for a customer years ago. Won massive brownie points.

  6. #6

    Default

    I really loved QuickBasic. Something about the way it worked clicked with me when I was in my early teens. Anyway to the topic, the compiler stopped being able to compile my program when it got to a certain point - I can't remember what size that was, perhaps something like 60kb.

  7. #7
    Join Date
    May 2003
    Location
    Back of Burke (Guday!), Australia
    Posts
    2,905

    Default

    Sorry, I've been confused, probably because of my limited knowledge and what I have been referring to as QBasic, I should of referred to it as QuickBASIC (which is Interpreter/Compiler).

    I found more than a Satisfactory explanation of it on Rosetta Code, which refers to QBASIC as an Interpreted Version based on QuickBASIC 4.5 with the Compiler removed.

    Interesting I didn't know it could produce OS/2 program.

    Being on Rosetta Code a little bit, I'd read about other languages based on QuickBASIC, such as QB64, and on other forums I've seen people use that to produce Arcade style games for the PC.

  8. #8
    Join Date
    Mar 2011
    Location
    Atlanta, GA, USA
    Posts
    1,420

    Default

    There was also BASIC PDS (Professional Development System) that added significantly more developer features and libraries. I assume it also produced better code output.

    I believe all 'interpreted' versions still reduced the BASIC script into a pre-parsed binary representation that was much quicker to execute in the run-time.
    "Good engineers keep thick authoritative books on their shelf. Not for their own reference, but to throw at people who ask stupid questions; hoping a small fragment of knowledge will osmotically transfer with each cranial impact." - Me

  9. #9
    Join Date
    Apr 2019
    Location
    Tasmania, Australia
    Posts
    13

    Default

    Quote Originally Posted by Caleb Hansberry View Post
    I really loved QuickBasic. Something about the way it worked clicked with me when I was in my early teens. Anyway to the topic, the compiler stopped being able to compile my program when it got to a certain point - I can't remember what size that was, perhaps something like 60kb.
    Ugh, I had the same problem! I was working on a pretty cool RPG engine, but lost all interest when I realised it would't compile.

    Anybody ever try QB64? It's a fully 64bit reimplementation for modern computers. Pretty fun to mess around with, and it even has a bunch of commands that were sorely missing.

  10. #10
    Join Date
    Jul 2015
    Location
    Vancouver Island
    Posts
    369

    Default

    ^^ I've been distributing native OS/X & Linux ports of Gridfighter 3D via QB64. It's a great tool!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •