Skip to content
/ HaSM Public

An assembly language EDSL for Haskell, compiling into opcodes

License

Notifications You must be signed in to change notification settings

Mesabloo/HaSM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 #-}

import Language.HaSM

main :: IO Int
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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published