Created
February 8, 2018 10:35
-
-
Save janwilmans/04cd05409cbd0c71dc605374f790cc0a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ```c++ | |
| struct Z80 | |
| { | |
| volatile uint8_t& memory(const uint16_t address) | |
| { | |
| return *reinterpret_cast<uint8_t*>(address); | |
| } | |
| }; | |
| int main() | |
| { | |
| Z80 z80; | |
| auto useFreeLambda = [&]() { | |
| z80.memory(0xa000) = 0x10; | |
| }; | |
| useFreeLambda(); | |
| return 0; | |
| } | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment