Files
forth_bootslop/references/ForthNotes/SmithForth_RISC-V.md
2026-02-19 16:16:24 -05:00

13 KiB
Raw Permalink Blame History

SmithForth_RISC-V

Source: https://github.com/AndreiDuma/SmithForth_RISC-V

GitHub - AndreiDuma/SmithForth_RISC-V: An accessible Forth written in machine code for the RISC-V architecture.

Skip to content

Navigation Menu

Toggle navigation

Sign in

Appearance settings

Search or jump to...

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

Search

Clear

Search syntax tips

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.

Cancel Create saved search

Sign in

Sign up

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

AndreiDuma / SmithForth_RISC-V Public

An accessible Forth written in machine code for the RISC-V architecture.

License

EUPL-1.2 license

23 stars 2 forks Branches Tags Activity

Star

Notifications You must be signed in to change notification settings

Additional navigation options

AndreiDuma/SmithForth_RISC-V

main

BranchesTags

Go to file

Code

Open more actions menu

Folders and files

Name Name Last commit message Last commit date
Latest commit History4 Commits 4 Commits
.gitignore .gitignore
LICENSE LICENSE
Makefile Makefile
README.md README.md
SForth.dmp SForth.dmp
build.sh build.sh
input.fs input.fs
system.fs system.fs
View all files

Repository files navigation

This is an accessible Forth implementation written directly in machine code for the RISC-V architecture. It is an adaptation of David Smith's excellent x86-64 SmithForth.

Run with make run. You will need to run Linux either on RISC-V hardware or in a QEMU environment.

This project was developed as part of my Master's thesis, in which I thoroughly annotate SmithForth's machine code before porting it to RISC-V. The abstract of my thesis is given below:

In this thesis we present the implementation of a usable Forth system, built using only RISC-V machine code and the Linux operating system as foundations. We begin by justifying the need for accessible programming language implementations, discussing desirable features in educational compilers. Having selected Forth as our language of choice for an educational language implementation, we review existing Forth systems and we motivate why creating a RISC-V port is a worthwhile task. Next we thoroughly examine SmithForth, a high-quality Forth system for the x86-64 architecture. After understanding its principles, we port it to RISC-V, adapting it to our purposes. Finally, we extend this Forth system in Forth itself: we write a RISC- V assembler, we provide useful arithmetic and logic operators plus conditional and looping constructs. We complete our demonstration with a Forth implementation of FizzBuzz, showing the usability of the system.

Those interested can download the thesis document in PDF format.

About

An accessible Forth written in machine code for the RISC-V architecture.

Topics

compiler master-thesis forth machine-code risc-v

Resources

Readme

License

EUPL-1.2 license

Uh oh!

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

Activity

Stars

23 stars

Watchers

4 watching

Forks

2 forks

Report repository

Releases 1

[Thesis v1.0

Latest

Sep 12, 2024](/AndreiDuma/SmithForth_RISC-V/releases/tag/v1.0)

Languages

© 2026 GitHub, Inc.

You cant perform that action at this time.