#!/usr/bin/env python
# By Nguyen Anh Quynh <aquynh@gmail.com>, 2016
# Sample code for Keystone assembler engine.
# This shows how to get out of KsError the number of
# assembly instructions successfully compiled when error occur
= b # input assembly with an invalid instruction
# Initialize engine in X86-32bit mode
=
, =
# get count via e.get_asm_count()
=
# print out the number of instructions succesfully compiled