Created
October 22, 2018 20:15
-
-
Save roehst/31b4f230f48d2c83dd8c1b0825c9d98d to your computer and use it in GitHub Desktop.
ASM can be parsed with Elixir
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
# just try ASM.example on IEx | |
# assembly-ish code parses alright | |
defmodule ASM do | |
def example() do | |
quote do | |
section data | |
msg db "hello, world" | |
len equ - msg | |
section text | |
mov eax, 1 | |
mov ebx, 1 | |
mov ecx, output | |
syscall | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment