I'd like to ask you to read through the initial post and the comments, but will explain it here again as well.
My issue - which is a guess - seems to be an "f" in the binary assembler output, but I'm not actually sure. I'm using fasm.dll and pyfasm. I've tried fasm.exe and I've also tried nasm and they all give me an "f" in the bytecode as output.
For those like me who can't read binary: "nop; mov eax,12345; ret"
Someone in the thread suggested that the "f" doesn't seem to belong there. I've crosschecked with a python based assembler I've found on github, pyasm2, and funnily enough this "f" isn't in the output. But what's even more funny is that the code works! Unlike the one with the "f". Sadly I can't use pyasm2, because for some reason whenever I drop a label it excepts with a "privileged instruction" error I didn't manage to figure out.
Anyhow ... it makes no sense. All I want to do is generate binary code, jump to it, and continue python. Pycca and pyasm2 both work, but both have other bugs, or lack instructions, so I thought I'd seek a different way and found fasm.dll, which seems perfect ... but doesn't work as I think it should!
Is there anything you know that I can do? Maybe I'm missing something? Where does that "f" come from? Why isn't it there in pyasm2's output, yet pyasm2's output actually works?
Why? I'm desperate ....
Thank you for your time and patience.
Last edited by z0rberg on 04 Dec 2016, 20:10; edited 1 time in total
The "f" stands for 0x66h. It's that prefix I've used extensively back in the DOS days when I was programming assembler in pascal. It made 32bit reps possible. Apparently I needed to add "use32" to generate 32bit assembler output, because 16bit was standard... which I would have never guessed.
I feel so incredibly stupid now ... and please accept my apology. :/
I haven't touched assembler in over 20 years....
Thank you for your great product and time reading this.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum