Skip to content

Repository files navigation

HaSM

A simple assembly EDSL (Embedded Domain Specific Language) for Haskell, generating native code for fast runtime. It aims at being quite cross-platform.

Code example

{-# LANGUAGE QuasiQuotes #-}
importLanguage.HaSMmain::IOInt
main =do
hello_world <- asciz "Hello, world!"
printf <- extern "printf"
run X86 [hasm|
push ${hello_world}
call ${printf}
xor %eax, %eax
ret
|]

About

An assembly language EDSL for Haskell, compiling into opcodes

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages