aboutsummaryrefslogtreecommitdiffstats
path: root/asm/test.py
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-02-25 21:01:03 +0000
committerGravatar Peter McGoron 2023-02-25 21:01:03 +0000
commit09d636c02cdbb13d10f1435d918cc36116715fc4 (patch)
treec7099a6c49ffa4521e144c5ed5a19186d08ec1ec /asm/test.py
parentget rid of unused lablen (diff)
export creole_decode; add db test
Diffstat (limited to 'asm/test.py')
-rw-r--r--asm/test.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/asm/test.py b/asm/test.py
index e49d46d..986a06d 100644
--- a/asm/test.py
+++ b/asm/test.py
@@ -438,6 +438,16 @@ class DataTest(unittest.TestCase):
p = Program()
p.parse_asm_line("db d0 [4d2,1234,0,5]")
self.assertEqual(p(), b'\x0b\xc0\x80\xe0\x93\x92\xf0\x81\x88\xb4\xc0\x80\xc0\x85\x00')
+ def test_alloc_multiple(self):
+ p = Program()
+ p.parse_lines([
+ "db d0 [1,2,3,4]",
+ "db d1 [10,11,12,13]"
+ ])
+ ex = ffi.Environment(p())
+ self.assertEqual(ex(), ffi.RunRet.STOP)
+ self.assertEqual(ex.getdat(0), [1,2,3,4])
+ self.assertEqual(ex.getdat(1), [0x10,0x11,0x12,0x13])
class SCEnv(ffi.Environment):
def syscall(self, s):