diff options
| author | 2023-02-21 17:42:51 +0000 | |
|---|---|---|
| committer | 2023-02-21 17:42:51 +0000 | |
| commit | 6e0d124efd41b9c6df384a4c41343a65ade7fa87 (patch) | |
| tree | 86eac3ac8328d1d59c7100fec8a6be0dbfe18815 /asm/test.py | |
| parent | test many jumps (diff) | |
add data parsing
Diffstat (limited to 'asm/test.py')
| -rw-r--r-- | asm/test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/asm/test.py b/asm/test.py index 4ab05e6..e49d46d 100644 --- a/asm/test.py +++ b/asm/test.py @@ -433,6 +433,12 @@ class ProgramTest(unittest.TestCase): self.range_test(0x7FFFF00, 0x8000000, sgn=True) self.range_test(-100, 0, sgn=True) +class DataTest(unittest.TestCase): + def test_parse_db(self): + 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') + class SCEnv(ffi.Environment): def syscall(self, s): self.s = s.value |
