From f49c9b138ec57b59d807f3553af72d36d745d0c2 Mon Sep 17 00:00:00 2001 From: PedroPertusi Date: Wed, 19 Oct 2022 15:45:25 -0300 Subject: [PATCH] arrumando nasm_test --- bits/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bits/__init__.py b/bits/__init__.py index db24f40..0f391c0 100644 --- a/bits/__init__.py +++ b/bits/__init__.py @@ -48,7 +48,11 @@ def vm_test(f, time=100000): def nasm_test(nasm, ram, test, time=1000): name = getName(nasm) hack = name + ".hack" - nasm_to_hack(nasm, hack) + path_atual = os.getcwd() + if path_atual[-8:] == '/sw/nasm': + nasm_to_hack(nasm, hack) + else: + nasm_to_hack(f'sw/nasm/{nasm}', hack) rom = rom_init_from_hack(hack) run = proc_run(name, rom, ram, time)