Mercurial > lcfOS
comparison python/outstream.py @ 296:9417caea2eb3
Directorized some backend files
author | Windel Bouwman |
---|---|
date | Sun, 01 Dec 2013 13:36:58 +0100 |
parents | ac603eb66b63 |
children | 56e6ff84f646 |
comparison
equal
deleted
inserted
replaced
295:917eab04b8b7 | 296:9417caea2eb3 |
---|---|
88 if len(insword) == 0: | 88 if len(insword) == 0: |
89 print(' {}'.format(asm)) | 89 print(' {}'.format(asm)) |
90 else: | 90 else: |
91 print(' 0x{0:08x} 0x{1} {2}'.format(addr, insword, asm)) | 91 print(' 0x{0:08x} 0x{1} {2}'.format(addr, insword, asm)) |
92 | 92 |
93 | |
93 class TextOutputStream(OutputStream): | 94 class TextOutputStream(OutputStream): |
94 pass | 95 pass |
96 | |
95 | 97 |
96 class BinOutputStream(OutputStream): | 98 class BinOutputStream(OutputStream): |
97 | 99 |
98 @property | 100 @property |
99 def Data(self): | 101 def Data(self): |
103 def dump(self): | 105 def dump(self): |
104 self.backpatch() | 106 self.backpatch() |
105 self.backpatch() | 107 self.backpatch() |
106 section = self.sections[list(self.sections.keys())[0]] | 108 section = self.sections[list(self.sections.keys())[0]] |
107 return section.to_bytes() | 109 return section.to_bytes() |
108 | |
109 |