I'm trying out assembly for my current project and am running into a strange error. I have a file (regs.asm) with several constants defined in order to emulate registers, and I'm using the #include_h directive to load that file into my main file (main.asm). When I try to assemble my project, I get this error:
Traceback (most recent call last):
File "[redacted]/Command-Block-Assembly/mcc.py", line 4, in <module>
start()
File "[redacted]/Command-Block-Assembly/mcc/cli.py", line 353, in start
run_with_args(args)
File "[redacted]/Command-Block-Assembly/mcc/cli.py", line 360, in run_with_args
main(args)
File "[redacted]/Command-Block-Assembly/mcc/cli.py", line 275, in main
top = dispatcher.make_top(args)
File "[redacted]/Command-Block-Assembly/mcc/cli.py", line 132, in make_top
assembler.parse(self.text_file().read(), self.infile.name)
File "[redacted]/Command-Block-Assembly/asm/assembler.py", line 47, in parse
self.consume_reader(AsmReader(text, self.filename))
File "[redacted]/Command-Block-Assembly/asm/assembler.py", line 54, in consume_reader
self.handle_token(token, arg)
File "[redacted]/Command-Block-Assembly/asm/assembler.py", line 69, in handle_token
self.handle_directive(*arg)
File "[redacted]/Command-Block-Assembly/asm/assembler.py", line 135, in handle_directive
if isinstance(val, Variable) and val.owner:
AttributeError: 'GlobalVariable' object has no attribute 'owner'
I'm trying out assembly for my current project and am running into a strange error. I have a file (
regs.asm
) with several constants defined in order to emulate registers, and I'm using the#include_h
directive to load that file into my main file (main.asm
). When I try to assemble my project, I get this error:Here's my source code:
regs.asm
:main.asm
:Is this a bug in the assembler, and if not, how do I fix my code? Thanks in advance!