takenobu-hs / cpu-assembly-examples

CPU assembly examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CPU assembly examples

  • This is a repo about tiny assembly examples for various CPUs (x86, Arm, and RISC-V).
  • There are examples such as system-calls, library-calls, load/store, if/for/call, barriers, atomics, and threads.
  • This repo focuses on CPU hardwares, not assembly notation or ABI conventions.

Contents

An example

100.main/simple_main.S:

        .global main

main:
        ret

Assemble and excecute

$ cd <sample-directory>
$ make -f ../Makefile  <sample>             # assemble
$ ./<sample>                                # execute

About

CPU assembly examples

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Assembly 99.5%Language:Makefile 0.5%