QBasic compiler

by Ben (no login)

 

I would assume that when you open some code in the qbasic 1,1, it is an interpreter and will have to do a bunch of stuff like check what graphics mode and stuff, and then not do many checks to keep it fast so that it interprets ast when pressing f5.

But I was wondering, if the QBasic 4+ compiler will be clever about things like whether image is \8 or width of screen, or optimize vga-like for stuff like pset in simpler modes? If it must only do these checks once and it is writing machine code, then it probably has such features that will make code optimal?

I tried disassembling some qbasic exes to investigate something I saw posted on forum. I read somewhere that the SLEEP statement will somehow suspend the program from the multitasker, but the do:loop until inkey$<>""... would always keep checking for key press in the multitasker. I thought, what the hell? It sounded stupid as qbasic was written for dos and stuff like multitasker wasnt considered. I disassemble the exes and it was full of garbage, i checked the difference and couldnt understand anything. so i was confused about how qbasic generate exes.

Posted on Feb 22, 2009, 8:28 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Well...Artelius on Feb 23, 3:46 AM
 Waiting for input...Tim on Feb 23, 8:04 AM
 xorBen on Feb 23, 12:47 PM
  XOR is a mathmatical functionClippy on Feb 23, 4:50 PM
   * Port 890..??Tim on Feb 23, 9:56 PM
    &H378, 379, 37A are the first 3 addresses for common LPT port programs.Clippy on Feb 23, 10:40 PM
     * Oh... NO ONE ever writes those in decimalTim on Feb 24, 11:17 AM
      I DO! What is the BIG DEAL about Hex? It is just converted by QB anyhow!Clippy on Feb 24, 11:38 AM
  Re: xorMichael Calkins on Feb 23, 10:11 PM
   interesting informationBen on Mar 4, 12:05 PM
    Computers used big buildings and lots of tubes.Clippy on Mar 4, 1:39 PM
     tubes = semiconductors?Ben on Mar 4, 3:56 PM
      Probably vacuum tubesqbguy on Mar 4, 4:56 PM
       Wow!Ben on Mar 5, 10:14 AM
        Relays use coils to produce magnetismClippy on Mar 5, 11:28 AM
        hmmmBen on Mar 5, 11:29 AM
         All is not lost. You can create a magnet coil to pick up stuff.Clippy on Mar 5, 11:49 AM
          I knew about the coil since i took apart the speaker, butBen on Mar 5, 12:50 PM
           Y'er learning kid.Clippy on Mar 5, 1:07 PM
          *Why insulated?Ben on Jul 29, 1:15 PM
           Because the wires would short the coil circuit.Clippy on Jul 29, 10:51 PM
         Welcome to the 21st century.Artelius on Mar 7, 1:32 AM
      * Vacuum Tubes (URL)Clippy on Mar 4, 6:54 PM
    Re: interesting informationMichael Calkins on Mar 4, 2:05 PM
    Re: interesting informationTim on Mar 4, 2:59 PM
     * Analog is like AM and Digital is like FM radio.Clippy on Mar 4, 3:29 PM
      er... no. AM, FM and PM are ways of transfering data.lkt153 on Mar 4, 5:48 PM
       It was just a comparison. Not literal ! AM and PM are also time related.Clippy on Mar 4, 6:58 PM
     *turing machine in the game of life(URL)Michael Calkins on Mar 4, 9:00 PM
    A tube calculatorDavid on Jun 5, 11:16 AM
   Been there (relays)Iain on Jun 6, 12:13 PM
  alsoMichael Calkins on Feb 23, 10:22 PM
 BC.EXE /ABen on Apr 12, 12:34 PM
  AnswersAnonymous on Apr 12, 4:19 PM
   * http://pastebin.com/f71ce8a40* on Apr 12, 4:35 PM
    ThanksBen on Apr 13, 11:10 AM
  Calling conventionArtelius on Apr 13, 6:00 PM
   I was wondering...Ben on Apr 13, 8:32 PM
    No, but yes!Artelius on Apr 14, 1:25 AM
     *kb(url)Michael Calkins on Apr 14, 1:36 PM
     Can I find their address?Ben on Dec 30, 1:43 PM
      Re: Can I find their address?Laanan Fisher on Jan 2, 1:16 AM

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement