Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/takenobu-hs/cpu-assembly-examples

CPU assembly examples
https://github.com/takenobu-hs/cpu-assembly-examples

arm assembly cpu risc-v x86

Last synced: 3 months ago
JSON representation

CPU assembly examples

Awesome Lists containing this project

README

        

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

* [x86(x86_64)/linux](x86/linux)
* [Arm(Armv8 aarch64)/linux](arm/linux)
* [RISC-V(RV64G)/linux](riscv/linux)

## An example

100.main/simple_main.S:

```asm
.global main

main:
ret
```

## Assemble and excecute

```
$ cd
$ make -f ../Makefile # assemble
$ ./ # execute
```