Has anyone tried to get <https://www.keystone-engi...
# kotlin-native
Has anyone tried to get https://www.keystone-engine.org working in kotlin-native and mingwX64? I have a particularly weird result here that I can't wrap my head around. Given this c code https://www.keystone-engine.org/docs/tutorial.html I have translated it to https://github.com/Syrou/kotlin-native-keystone/blob/main/src/nativeMain/kotlin/main.kt which compiles and runs, problem is, the result is wrong. The size, and the statement counter seems to be correct. Everything seems to setup properly, yet again, no matter what I do the result is wrong.
Copy code
INC ecx; DEC edx = 41 4a
is the expected outcome. However it always returns
Copy code
INC ecx; DEC edx = 60 43
Does anyone have an idea to what is going on? Have I done any obvious misstakes or is the generated bindings somehow messing up?
Got it to work, pushed the working code to the repo if anyone is curious