# fiveth

**Source:** https://github.com/dramforever/fiveth

GitHub - dramforever/fiveth: A stack-based language implemented in RISC-V assembly



[Skip to content](#start-of-content)













## Navigation Menu

Toggle navigation

[Sign in](/login?return_to=https%3A%2F%2Fgithub.com%2Fdramforever%2Ffiveth)

Appearance settings

* Platform

  + AI CODE CREATION
    - [GitHub CopilotWrite better code with AI](https://github.com/features/copilot)
    - [GitHub SparkBuild and deploy intelligent apps](https://github.com/features/spark)
    - [GitHub ModelsManage and compare prompts](https://github.com/features/models)
    - [MCP RegistryNewIntegrate external tools](https://github.com/mcp)
  + DEVELOPER WORKFLOWS
    - [ActionsAutomate any workflow](https://github.com/features/actions)
    - [CodespacesInstant dev environments](https://github.com/features/codespaces)
    - [IssuesPlan and track work](https://github.com/features/issues)
    - [Code ReviewManage code changes](https://github.com/features/code-review)
  + APPLICATION SECURITY
    - [GitHub Advanced SecurityFind and fix vulnerabilities](https://github.com/security/advanced-security)
    - [Code securitySecure your code as you build](https://github.com/security/advanced-security/code-security)
    - [Secret protectionStop leaks before they start](https://github.com/security/advanced-security/secret-protection)
  + EXPLORE
    - [Why GitHub](https://github.com/why-github)
    - [Documentation](https://docs.github.com)
    - [Blog](https://github.blog)
    - [Changelog](https://github.blog/changelog)
    - [Marketplace](https://github.com/marketplace)

  [View all features](https://github.com/features)
* Solutions

  + BY COMPANY SIZE
    - [Enterprises](https://github.com/enterprise)
    - [Small and medium teams](https://github.com/team)
    - [Startups](https://github.com/enterprise/startups)
    - [Nonprofits](https://github.com/solutions/industry/nonprofits)
  + BY USE CASE
    - [App Modernization](https://github.com/solutions/use-case/app-modernization)
    - [DevSecOps](https://github.com/solutions/use-case/devsecops)
    - [DevOps](https://github.com/solutions/use-case/devops)
    - [CI/CD](https://github.com/solutions/use-case/ci-cd)
    - [View all use cases](https://github.com/solutions/use-case)
  + BY INDUSTRY
    - [Healthcare](https://github.com/solutions/industry/healthcare)
    - [Financial services](https://github.com/solutions/industry/financial-services)
    - [Manufacturing](https://github.com/solutions/industry/manufacturing)
    - [Government](https://github.com/solutions/industry/government)
    - [View all industries](https://github.com/solutions/industry)

  [View all solutions](https://github.com/solutions)
* Resources

  + EXPLORE BY TOPIC
    - [AI](https://github.com/resources/articles?topic=ai)
    - [Software Development](https://github.com/resources/articles?topic=software-development)
    - [DevOps](https://github.com/resources/articles?topic=devops)
    - [Security](https://github.com/resources/articles?topic=security)
    - [View all topics](https://github.com/resources/articles)
  + EXPLORE BY TYPE
    - [Customer stories](https://github.com/customer-stories)
    - [Events & webinars](https://github.com/resources/events)
    - [Ebooks & reports](https://github.com/resources/whitepapers)
    - [Business insights](https://github.com/solutions/executive-insights)
    - [GitHub Skills](https://skills.github.com)
  + SUPPORT & SERVICES
    - [Documentation](https://docs.github.com)
    - [Customer support](https://support.github.com)
    - [Community forum](https://github.com/orgs/community/discussions)
    - [Trust center](https://github.com/trust-center)
    - [Partners](https://github.com/partners)
* Open Source

  + COMMUNITY
    - [GitHub SponsorsFund open source developers](https://github.com/sponsors)
  + PROGRAMS
    - [Security Lab](https://securitylab.github.com)
    - [Maintainer Community](https://maintainers.github.com)
    - [Accelerator](https://github.com/accelerator)
    - [Archive Program](https://archiveprogram.github.com)
  + REPOSITORIES
    - [Topics](https://github.com/topics)
    - [Trending](https://github.com/trending)
    - [Collections](https://github.com/collections)
* Enterprise

  + ENTERPRISE SOLUTIONS
    - [Enterprise platformAI-powered developer platform](https://github.com/enterprise)
  + AVAILABLE ADD-ONS
    - [GitHub Advanced SecurityEnterprise-grade security features](https://github.com/security/advanced-security)
    - [Copilot for BusinessEnterprise-grade AI features](https://github.com/features/copilot/copilot-business)
    - [Premium SupportEnterprise-grade 24/7 support](https://github.com/premium-support)
* [Pricing](https://github.com/pricing)

Search or jump to...


# Search code, repositories, users, issues, pull requests...

Search

Clear

[Search syntax tips](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)

# Provide feedback

We read every piece of feedback, and take your input very seriously.


Include my email address so I can be contacted

Cancel
 Submit feedback





# Saved searches

## Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our [documentation](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax).

Cancel
 Create saved search

[Sign in](/login?return_to=https%3A%2F%2Fgithub.com%2Fdramforever%2Ffiveth)

[Sign up](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=dramforever%2Ffiveth)

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
 


Dismiss alert

{{ message }}

[dramforever](/dramforever) 
/
**[fiveth](/dramforever/fiveth)**
Public

* [Notifications](/login?return_to=%2Fdramforever%2Ffiveth) You must be signed in to change notification settings
* [Fork
  0](/login?return_to=%2Fdramforever%2Ffiveth)
* [Star
   17](/login?return_to=%2Fdramforever%2Ffiveth)

A stack-based language implemented in RISC-V assembly

[17
stars](/dramforever/fiveth/stargazers) [0
forks](/dramforever/fiveth/forks) [Branches](/dramforever/fiveth/branches) [Tags](/dramforever/fiveth/tags) [Activity](/dramforever/fiveth/activity)

[Star](/login?return_to=%2Fdramforever%2Ffiveth)

[Notifications](/login?return_to=%2Fdramforever%2Ffiveth) You must be signed in to change notification settings

* [Code](/dramforever/fiveth)
* [Issues
  0](/dramforever/fiveth/issues)
* [Pull requests
  0](/dramforever/fiveth/pulls)
* [Actions](/dramforever/fiveth/actions)
* [Projects
  0](/dramforever/fiveth/projects)
* [Security
  0](/dramforever/fiveth/security)
* [Insights](/dramforever/fiveth/pulse)

Additional navigation options


* [Code](/dramforever/fiveth)
* [Issues](/dramforever/fiveth/issues)
* [Pull requests](/dramforever/fiveth/pulls)
* [Actions](/dramforever/fiveth/actions)
* [Projects](/dramforever/fiveth/projects)
* [Security](/dramforever/fiveth/security)
* [Insights](/dramforever/fiveth/pulse)

# dramforever/fiveth

main

[Branches](/dramforever/fiveth/branches)[Tags](/dramforever/fiveth/tags)

Go to file

Code

Open more actions menu

## Folders and files

| Name | | Name | Last commit message | Last commit date |
| --- | --- | --- | --- | --- |
| Latest commit   History[96 Commits](/dramforever/fiveth/commits/main/)   96 Commits | | |
| [docs](/dramforever/fiveth/tree/main/docs "docs") | | [docs](/dramforever/fiveth/tree/main/docs "docs") |  |  |
| [src](/dramforever/fiveth/tree/main/src "src") | | [src](/dramforever/fiveth/tree/main/src "src") |  |  |
| [.envrc](/dramforever/fiveth/blob/main/.envrc ".envrc") | | [.envrc](/dramforever/fiveth/blob/main/.envrc ".envrc") |  |  |
| [.gitignore](/dramforever/fiveth/blob/main/.gitignore ".gitignore") | | [.gitignore](/dramforever/fiveth/blob/main/.gitignore ".gitignore") |  |  |
| [Makefile](/dramforever/fiveth/blob/main/Makefile "Makefile") | | [Makefile](/dramforever/fiveth/blob/main/Makefile "Makefile") |  |  |
| [README.md](/dramforever/fiveth/blob/main/README.md "README.md") | | [README.md](/dramforever/fiveth/blob/main/README.md "README.md") |  |  |
| [config.mk](/dramforever/fiveth/blob/main/config.mk "config.mk") | | [config.mk](/dramforever/fiveth/blob/main/config.mk "config.mk") |  |  |
| [flake.lock](/dramforever/fiveth/blob/main/flake.lock "flake.lock") | | [flake.lock](/dramforever/fiveth/blob/main/flake.lock "flake.lock") |  |  |
| [flake.nix](/dramforever/fiveth/blob/main/flake.nix "flake.nix") | | [flake.nix](/dramforever/fiveth/blob/main/flake.nix "flake.nix") |  |  |
| [shell.nix](/dramforever/fiveth/blob/main/shell.nix "shell.nix") | | [shell.nix](/dramforever/fiveth/blob/main/shell.nix "shell.nix") |  |  |
| View all files | | |

## Repository files navigation

* [README](#)

# Fiveth

A stack-based language implemented in RISC-V assembly.

## Building and running Fiveth

* Edit `config.mk` to suit your environment
* `make` to build the program

With the default config this should end a message like:

```
* Build complete: build/fiveth
```

The default configuration is to run an interactive Fiveth shell that works under
a 64-bit RISC-V Linux environment. You can now:

* `make qemu` to run it in QEMU user-mode emulation
* `make run` to run it directly, if you are actually on RISC-V

Try typing some simple Fiveth programs. Outputs are shown after a semicolon.

```
0 > 1 2 + .  ; 3
0 > 10 [ . ] count  ; 0 1 2 3 4 5 6 7 8 9
0 > "Hello, world!" s.  ; Hello, world!
```

Press Ctrl-D to quit. [`docs/shell.md`](/dramforever/fiveth/blob/main/docs/shell.md) has more details on
running and using the Fiveth interactive shell.

## Installing the required tools

On Ubuntu 22.04:

```
# apt install qemu-user make
# # If using GNU toolchain
# apt install gcc-riscv64-linux-gnu
# # If using LLVM toolchain
# apt install clang lld
```

If you have Nix, you can try to use the provided `shell.nix` or `flake.nix`.

On other systems, you can try to acquire a LLVM toolchain or a RISC-V toolchain,
as well as GNU make. To run Fiveth in an emulator, `qemu-riscv64` can be used to
emulate a Linux binary but is only supported on Linux hosts.

## About

A stack-based language implemented in RISC-V assembly

### Topics

[assembly](/topics/assembly "Topic: assembly")
[riscv](/topics/riscv "Topic: riscv")
[forth-like](/topics/forth-like "Topic: forth-like")

### Resources

[Readme](#readme-ov-file)

### Uh oh!

There was an error while loading. Please reload this page.

[Activity](/dramforever/fiveth/activity)

### Stars

[**17**
stars](/dramforever/fiveth/stargazers)

### Watchers

[**2**
watching](/dramforever/fiveth/watchers)

### Forks

[**0**
forks](/dramforever/fiveth/forks)

[Report repository](/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fdramforever%2Ffiveth&report=dramforever+%28user%29)

## [Releases](/dramforever/fiveth/releases)

No releases published

## Languages

* [Assembly
  89.1%](/dramforever/fiveth/search?l=assembly)
* [Makefile
  7.1%](/dramforever/fiveth/search?l=makefile)
* [C
  2.5%](/dramforever/fiveth/search?l=c)
* [Nix
  1.3%](/dramforever/fiveth/search?l=nix)

## Footer

© 2026 GitHub, Inc.

### Footer navigation

* [Terms](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
* [Privacy](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
* [Security](https://github.com/security)
* [Status](https://www.githubstatus.com/)
* [Community](https://github.community/)
* [Docs](https://docs.github.com/)
* [Contact](https://support.github.com?tags=dotcom-footer)
* Manage cookies
* Do not share my personal information



You can’t perform that action at this time.