It's quite simple, really:
the most classic incorporation in qbasic that you can find is ASM. The reason is very obvious: speed!
To incorporate ASM with Qbasic you need first of all to know ASM and a ASM comiler.
You might have noticed that every time you compile a BAS file, with the new EXE file come even an OBJ file. This last file can be LINKed (With LINK.EXE) to a LIB file, that is a Qbasic Library File.
I know i mixed up things a bit, so ie:
wright your prosedure in ASM and call it let's say SAY_HI
compile your file into an EXE (SAY_HI.exe)
take the SAY_HI.OBJ and link with LINK.EXE (like this "C:/YOURQBFOLDER/LINK SAY_HI.OBJ"
after that you should have your SAY_HI.LIB to use with Qbasic (C:/YOURQBFOLDER/QB /L SAY_HI - remember you need a .BI file too to declare it with '$INCLUDE !)
finally you just use your ASM procedure by calling it like normal QB library sub!
typically if the library is compiled and present to QBasic, the language differents is really not needed, if the Lib was compiled for QBasic, the compiler will understand what functions exist, and their parameters, like Alex said above best reasons for this is speed and functionality, for example there is a QB Lib floating around on the net ( I havent found the address yet ) that is a graphic library that lets you work with high speed graphics, it is of course written in ASM, and definitly helps out some Die hard Qbasic coders that want to go back to one of thier old graphical progs and enchance it with this (I would too).
In the end basically QB doesnt understand any of the other languages, it will only be presented with a libraries capabilites, and how to call them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.