I'm designing a programming language which compiles to an intermediary bytecode. However, I'm having a lot of trouble designing the bytecode structure. Does anybody have any pointers on how to represent a program in binary? Alternatively, are there any resources (preferably free) on how to do this? The closest I've found is the description of the Lua interpreter's bytecode.
EDIT: A bit more information: I'm implementing my own garbage collection scheme which is heavily optimized for immutability and concurrency. For efficiencies' sake I need some unique bytecode instructions that allow programs to interact with the garbage collection scheme.