Considering the name of the thread, I assume you want to do good old QBasic or (PC Basic) or whatever other name it goes under these days. If so, try looking for a 6-10 year old product called QuickBasic. It compiles! Probably can be had at some 2nd hand software shop for $20 US. FYI, QBasic is actually a subset of QuickBasic, which is a grandchild of Dartmouth Basic. (Original BASIC) There are also, other brands of Basic, most of which are no longer being sold.
Forturately we evolved into VisualBasic & VBA (VB for Applications, etc).
As for references, I learned from 2 texts called "Basic Basic" & "Advanced Basic" some 25 years ago.
FYI, If you are trying to do comples OS stuff like create your own command.com, give it up. I say this because I just read a threat w/ that consept. QBasic & its close relatives are NOT going to replace an OS. The rely too heavily on the OS in place. Try the C family.
Good luck...
7ony