Solidity Tutorial : all about Assembly

Jean Cvllr
16 min readDec 25, 2019

Introduction

What is Assembly?

Any program written in a high level language like C, Go, or Java is first compiled down to what is called an assembly language, before it is executed. But what is assembly?

Assembly ( also called assembler language ) refers to any low-level programming language that is converted to machine code using an assembler. Assembler languages are tied to either a physical or a virtual machine, because they implement its instruction set. An instruction tells simply the CPU to do some fundamental task, such as adding two numbers

Examples of processors are the Intel x86 or ARM. Intel x86 has around 1503 machine instructions. They are commonly referred as opcodes.

Understand the EVM and the Stack

The Ethereum Virtual Machine (EVM), has also its own instruction set. At the current date that I have written this sentence ( Brexit day + 1, so 31/01/20 ):

The EVM contains 144 opcodes in its instruction set (number based on the listing in the Geth client)

--

--