From 7ca56c1a730fcecd0fe3af5e6b652fa09514a18b Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 26 Apr 2024 15:40:14 +0300 Subject: Refactor project structure, add README and LICENSE --- atk16_asm/assembler.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'atk16_asm') diff --git a/atk16_asm/assembler.py b/atk16_asm/assembler.py index cbd7cd4..7142303 100755 --- a/atk16_asm/assembler.py +++ b/atk16_asm/assembler.py @@ -2,6 +2,7 @@ # Assemble ATK16 assembly to bytecode import sys +import os from .asm_ops import * from .asm_eval import * from .asm_pass0 import pass_0 @@ -108,6 +109,9 @@ def main(): result = assemble(src, options.infile) + out_dirname = os.path.dirname(options.outfile) + os.makedirs(out_dirname, exist_ok=True) + with open(options.outfile, "wb") as f: f.write(result.program) -- cgit v1.3