# Convert assembly code from solc to binary code

**URL:** <https://forum.soliditylang.org/t/convert-assembly-code-from-solc-to-binary-code/1745>\
**Category:** Feedback\
**Created:** [July 24, 2023, 2:40pm UTC](https://forum.soliditylang.org/t/convert-assembly-code-from-solc-to-binary-code/1745 "2023-07-24T14:40:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastiandine](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.soliditylang.org/sebastiandine/32/1024_2.png) [@sebastiandine](https://forum.soliditylang.org/u/sebastiandine)\
**Post date:** [July 24, 2023, 2:40pm UTC](https://forum.soliditylang.org/t/convert-assembly-code-from-solc-to-binary-code/1745/1 "2023-07-24T14:40:09Z")

</div>

I cannot find a proper option to compile assembly code that I generated from Solidity code (via `solc --asm`) into EVM bytecode. There is the flag `--assemble` for `solc` which I assumed to be the correct way to convert either the assembly code or the opcodes of my Solidity code into bytecode, but none of it worked. Unfortunately, I could not find much documentation on the `--assemble` mode either.  
Does anybody know how to do this or where to find proper documentation on the topic?

---

<div class="post-metadata">

**Author:** ![barakman](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.soliditylang.org/barakman/32/830_2.png) [@barakman](https://forum.soliditylang.org/u/barakman)\
**Post date:** [July 27, 2023, 7:42am UTC](https://forum.soliditylang.org/t/convert-assembly-code-from-solc-to-binary-code/1745/3 "2023-07-27T07:42:08Z")

</div>

> [@Worthy](#):
>
> To compile Solidity code into EVM bytecode

The question says “to compile **assembly** code into EVM bytecode”.

---

<div class="post-metadata">

**Author:** ![Worthy](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.soliditylang.org/worthy/32/1034_2.png) [@Worthy](https://forum.soliditylang.org/u/Worthy)\
**Post date:** [July 28, 2023, 6:37am UTC](https://forum.soliditylang.org/t/convert-assembly-code-from-solc-to-binary-code/1745/4 "2023-07-28T06:37:07Z")

</div>

you’re right, sorry for the confusion

---

<div class="post-metadata">

**Author:** ![sebastiandine](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.soliditylang.org/sebastiandine/32/1024_2.png) [@sebastiandine](https://forum.soliditylang.org/u/sebastiandine)\
**Post date:** [August 4, 2023, 10:23am UTC](https://forum.soliditylang.org/t/convert-assembly-code-from-solc-to-binary-code/1745/5 "2023-08-04T10:23:23Z")

</div>

There you go: [GitHub - sebastiandine/evm-asm: EVM assembler compatible with solc output](https://github.com/sebastiandine/evm-asm)  
I found a proper project and forked and extended it a little. It now even supports a “helper opcode” to peek for stack items.
