Nothing like replying two months later, eh? I don't know if anyone will see this...
Anyway, you don't need WAKELOCK or any other fancy stuff just to run in the background. Run this:
for i=1to60;pause 1000;next
While it's running, press the HOME key. Some seconds later, start BASIC! again; doesn't matter if you go from the launcher or from the "recents" list (square button).
The HOME key stops the current activity and puts it on the Android backstack. No UI action is possible. In BASIC!, the current activity is either the Console, the Graphics screen, or the HTML WebView. All of those can sit on top of the BASIC! interpreter.
The BASIC! interpreter is ALWAYS in the background, in the sense that it is not running in the UI thread. It's not part of an Android "activity", it's running in its own thread. So hitting the HOME key (or executing the HOME command) does not stop your program. It keeps right on running.
Except, as Roy said, if you ask it to render on the graphics screen, and the graphics screen is stopped, the program waits for the graphics screen to start up again. That's why you need the background() check.
Of course, if the Android device goes into a idle state or sleep state, it stops pretty much everything. That would pause the interpreter along with everything else. You use WAKELOCK to keep running even if the rest of the device is asleep.
Another possible background problem is that the activity that owns the UI (shows on the screen) has higher priority than background tasks. If you have a BASIC! screen showing, it keeps the interpreter at high priority, too. If you put the BASIC! activity in the background, the interpreter is still running, but now whatever is on the screen has higher priority than BASIC!. If the system needs memory for the app on the screen, it kills off background apps. So while you're running BASIC! in the background, it is vulnerable to being killed by the Android system.
I hope that's clearer. You can do a lot with BASIC! without knowing much about Android, but for some things, like changing screens or running the background, you have to understand the way Android works.