Created
February 13, 2023 13:29
-
-
Save kangsangsoo/d6002f0ed37f9158e97e577d08f0c89e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.18; | |
contract A{ | |
uint public a = 3; | |
uint public b; | |
uint public c; | |
function test() public { | |
assembly{ | |
function inter(a, b) { | |
} | |
function first() -> z { | |
z := mload(0x80) | |
sstore(1, z) | |
z := sub(z, 1) | |
mstore(0x80, z) | |
} | |
function second() -> z { | |
z := mload(0x80) | |
sstore(2, z) | |
z := sub(z, 1) | |
mstore(0x80, z) | |
} | |
mstore(0x80, 3) | |
inter(first(), second()) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment