(assemble compiled-and-optimized-statement) -> procedure
Assemble is the third and final step when converting code from human-readable form to machine-readable form. It is preceded by compile and optimize.
This has been put here primarily for an understanding of the underlying code. Most users will find it easier to use eval, load, or mosc, depending on their specific needs. These three automate the process described here for specific usages. The repl also includes them.
The example follows what was begun in compile and continued in optimize.
>> (define testprog (read-lisp-file "lib/mosc.ms")) :: ((import "lib/compile") (import "lib/optimize") (define (...) (...) (...) (...) (...) (...)) (export mosc)) >> (set! testprog (compile testprog)) :: #f >> (set! testprog (optimize testprog)) :: #f >> (set! testprog (assemble testprog)) :: [procedure 2822400]