diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-04-26 15:40:14 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-04-26 15:40:14 +0300 |
| commit | 7ca56c1a730fcecd0fe3af5e6b652fa09514a18b (patch) | |
| tree | e2ef6a4d28fa26adf11e00d138ef21b8316497f6 /atk16_asm | |
| parent | 2b18b320e97260f1d27143a37fe14953cf62e56d (diff) | |
Refactor project structure, add README and LICENSE
Diffstat (limited to 'atk16_asm')
| -rwxr-xr-x | atk16_asm/assembler.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |
