An open API service indexing awesome lists of open source software.

https://github.com/ocdbytes/huff-lang


https://github.com/ocdbytes/huff-lang

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# Huff

```sh
// =========================================
// EVM assembly description (ADD TWO NUMS)
// =========================================
// BYTECODE MNEMONIC STACK ACTION
// 60 00 // PUSH1 0x00 // [0x00]
// 35 // CALLDATALOAD // [number1] Store the first 32 bytes on the stack
// 60 20 // PUSH1 0x20 // [0x20, number1]
// 35 // CALLDATALOAD // [number2, number1] Store the second 32 bytes on the stack
// 01 // ADD // [number2+number1] Take two stack inputs and add the result
// 60 00 // PUSH1 0x00 // [0x0, (n2+n1)]
// 52 // MSTORE // [] Store (n2+n1) in the first 32 bytes of memory
// 60 20 // PUSH1 0x20 // [0x20]
// 60 00 // PUSH1 0x00 // [0x00, 0x20]
// f3 // RETURN // [] Return the first 32 bytes of memory
```