zeroxlive

Sep 22

·2 min read

Assembly or Assembler language indicates a low-level programming language that can be converted to machine code by using assembler.EVM is a simple stack machine. To work with this stack machine, we are provided opcodes.

Solidity Assembly

Solidity has an option to write an assembly language code inside the smart contract’s source code.EVM is a simple stack machine. To work with this stack machine, we are provided opcodes.

With the help of Solidity assembly, we can directly interact with the EVM using the opcodes.Assembly provides more control over some logic which cannot be possible using only solidity, like pointing to the specific memory block.

These opcodes are instructions that tell the EVM what to do. For example, push1 pushes 1 byte to the stack, add pops the last two items of the stack, and returns the result, and so on.

One of the main advantages is that it reduces the cost of the

Keep reading this article on Blockchain-Medium.

Leave a Reply