Question

today I was learning a bit on x86 assembly today and learned a lot of new stuff and I like the language very much but have encountered something that I would like to know if it's possible.

I would like to know if it's possible to only assemble the code, without having an output of an entire executable.

Now obviously this would not be practical if I had to have to use data like strings and etc, but what I want to only assemble is code like this:

  mov si, 1
loop:
  inc si
  jnz loop

(I know this this has some stuff missing but that's not the point.)

I can just assemble this and just find the raw entry point of the code and copy it as input, however it just seems very hackish in a way I cannot describe with words.

Thank you.

BTW, I'm using FASM.

Was it helpful?

Solution

I found the answer, duo to my lack of knowledge with assembly, I figured you need to have full program in order to make it assemble, but I noticed all I needed to do is just write down the instructions without anything and it just assembles it into a .BIN file (I think it's short for binary).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top