Sure, a lib is basically that. There are some difficulties however, no absolute jumps, no variables at fixed addresses, but if this is overcome, it will work.
Another option is $INC, which would include not only data, but also program data at the position it's placed, the compiled code needs to be in its binary representation though.
The question is, how do you want to create this precompiled code, as for that purpose Bascom offers no tools.
↧