RosettaCodeData/Task/Compiler-code-generator/Zkl/compiler-code-generator-4.zkl
2023-07-01 13:44:08 -04:00

6 lines
180 B
Text

ast:=load_ast(File(vm.nthArg(0)));
code:=asm(ast,Data());
code_finish(code);
unasm(code);
File("code.bin","wb").write(code);
println("Wrote %d bytes to code.bin".fmt(code.len()));