summaryrefslogtreecommitdiff
path: root/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-05-04 21:50:24 -0500
committerBryan Bishop <kanzure@gmail.com>2012-05-04 21:50:24 -0500
commitc988390334893ee5211c8d85b9e9ce49a4f41fc0 (patch)
tree2ffb6442da86d1cb7626b3e009894e16ccfa3a38 /crystal.py
parentbd0e552985da3a44602f4b93c94b878e5cf3a747 (diff)
to_asm and some constructor changes
original-commit-id: 927d96621a543e4f27d570983259920db4625429
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/crystal.py b/crystal.py
index 1557b87..0746c7e 100644
--- a/crystal.py
+++ b/crystal.py
@@ -397,8 +397,8 @@ class NewTextScript:
def __init__(self, address, map_group=None, map_id=None, debug=False, label=None, force=False):
self.address = address
self.map_group, self.map_id, self.debug = map_group, map_id, debug
- self.dependencies = []
- self.commands = []
+ self.dependencies = None
+ self.commands = None
self.force = force
if is_script_already_parsed_at(address) and not force:
@@ -415,10 +415,13 @@ class NewTextScript:
if self.dependencies != None and not recompute:
global_dependencies.update(self.dependencies)
return self.dependencies
+
dependencies = []
+
for command in self.commands:
deps = command.get_dependencies(recompute=recompute, global_dependencies=global_dependencies)
dependencies.extend(deps)
+
self.dependencies = dependencies
return self.dependencies
@@ -494,7 +497,8 @@ class NewTextScript:
return commands
def to_asm(self):
- pass
+ asm_output = "\n".join([command.to_asm() for command in self.commands])
+ return asm_output
all_texts = []
class TextScript: