QBasic compilerby 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. |