mirror of
https://github.com/keystone-engine/keystone
synced 2026-06-08 15:15:30 +00:00
regress: add directives 'db', 'dw' to x86_nasm_directive.py
This commit is contained in:
@@ -20,7 +20,10 @@ class TestX86(regress.RegressTest):
|
||||
ks.syntax = KS_OPT_SYNTAX_NASM
|
||||
|
||||
# compile an instruction in NASM syntax
|
||||
#encoding, count = ks.asm(b"bits 32\n add eax, ebx\nbits 16\nadd eax, ebx")
|
||||
encoding, count = ks.asm(b"db 12, 13\ndw 14, 15")
|
||||
# Assert the result
|
||||
self.assertEqual(encoding, [ 0x0c, 0x0d, 0x0e, 0x00, 0x0f, 0x00 ])
|
||||
|
||||
encoding, count = ks.asm(b"bits 32\n add eax, ebx\nbits 16\nadd eax, ebx")
|
||||
# Assert the result
|
||||
self.assertEqual(encoding, [ 0x01, 0xd8, 0x66, 0x01, 0xd8 ])
|
||||
|
||||
Reference in New Issue
Block a user