13 KiB
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.
Navigation Menu
Toggle navigation
Appearance settings
-
Platform
- AI CODE CREATION
- DEVELOPER WORKFLOWS
- APPLICATION SECURITY
- EXPLORE
-
Solutions
- BY COMPANY SIZE
- BY USE CASE
- BY INDUSTRY
-
Resources
- EXPLORE BY TOPIC
- EXPLORE BY TYPE
- SUPPORT & SERVICES
-
Open Source
- COMMUNITY
- PROGRAMS
- REPOSITORIES
-
Enterprise
Search or jump to...
Search code, repositories, users, issues, pull requests...
Search
Clear
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
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
- Notifications You must be signed in to change notification settings
- Fork 2
- Star 23
An accessible Forth written in machine code for the RISC-V architecture.
License
23 stars 2 forks Branches Tags Activity
Notifications You must be signed in to change notification settings
Additional navigation options
AndreiDuma/SmithForth_RISC-V
main
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
License
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases 1
[Thesis v1.0
Latest
Sep 12, 2024](/AndreiDuma/SmithForth_RISC-V/releases/tag/v1.0)
Languages
Footer
© 2026 GitHub, Inc.
Footer navigation
- Terms
- Privacy
- Security
- Status
- Community
- Docs
- Contact
- Manage cookies
- Do not share my personal information
You can’t perform that action at this time.