{"id":13836104,"url":"https://github.com/philburk/pforth","last_synced_at":"2025-04-14T08:56:58.592Z","repository":{"id":24707007,"uuid":"28118577","full_name":"philburk/pforth","owner":"philburk","description":"Portable Forth in C","archived":false,"fork":false,"pushed_at":"2025-02-15T18:43:14.000Z","size":677,"stargazers_count":642,"open_issues_count":32,"forks_count":106,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-07T02:08:26.831Z","etag":null,"topics":["c","forth"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philburk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-17T03:05:04.000Z","updated_at":"2025-04-06T00:37:05.000Z","dependencies_parsed_at":"2023-01-14T01:27:42.994Z","dependency_job_id":"b4e80b82-d5db-4494-b616-5c7220714e19","html_url":"https://github.com/philburk/pforth","commit_stats":{"total_commits":138,"total_committers":16,"mean_commits":8.625,"dds":0.5942028985507246,"last_synced_commit":"8da2f097a6a4b856e659e08556ff938ac612d8ed"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philburk%2Fpforth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philburk%2Fpforth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philburk%2Fpforth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philburk%2Fpforth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philburk","download_url":"https://codeload.github.com/philburk/pforth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852116,"owners_count":21171839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","forth"],"created_at":"2024-08-04T15:00:35.678Z","updated_at":"2025-04-14T08:56:58.569Z","avatar_url":"https://github.com/philburk.png","language":"C","readme":"# PForth - a Portable ANS-like Forth written in ANSI 'C'\n\nby Phil Burk\nwith Larry Polansky, David Rosenboom and Darren Gibbs.\nSupport for 64-bit cells by Aleksej Saushev.\n\nPortable Forth written in 'C' for most 32 and 64-bit platforms.\n\nPForth is written in 'C' and can be easily ported to new 32 and 64-bit platforms. \nIt only needs character input and output functions to operate and, therefore, does not require an operating system.\nThis makes it handy for bringing up and testing embedded systems.\n\nPForth also works on desktops including Windows, Mac and Linux and supports command line history.\nThis lets you develop hardware tests on a desktop before trying them on your embedded system.\nBut pForth is not a rich and friendly desktop programming environment.\nThere are no GUI tools for developing desktop applications. PForth is lean and mean and optimized for portability.\n\nPForth has a tool for compiling code on a desktop, then exporting the dictionary in big or little endian format as 'C' source code.\nThis lets you compile tests for an embedded system that does not have file I/O.\n\nPForth is based on ANSI-Forth but is not 100% compatible. https://forth-standard.org/standard/words\n\nCode for pForth is maintained on GitHub at: https://github.com/philburk/pforth\n\nDocumentation for pForth at: http://www.softsynth.com/pforth/\n\nTo report bugs or request features please file a GitHub Issue.\n  \nFor questions or general discussion please use the pForth forum at:\n  http://groups.google.com/group/pforthdev\n\n## LEGAL NOTICE\n\nPermission to use, copy, modify, and/or distribute this\nsoftware for any purpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL\nWARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL\nTHE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR\nCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING\nFROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF\nCONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n## Contents of SDK\n\n    platforms - tools for building pForth on various platforms\n    platforms/unix - Makefile for unix\n\n    csrc - pForth kernel in ANSI 'C'\n    csrc/pf_main.c - main() application for a standalone Forth\n    csrc/stdio - I/O code using basic stdio for generic platforms\n    csrc/posix - I/O code for Posix platform\n    csrc/win32 - I/O code for basic WIN32 platform\n    csrc/win32_console - I/O code for WIN32 console that supports command line history\n\n    fth - Forth code\n    fth/util - utility functions\n\n## How to Build pForth\n\nBuilding pForth involves two steps:\n1) building the C based Forth kernel\n2) building the Forth dictionary file using: ./pforth -i system.fth\n3) optional build of standalone executable with built-in dictionary\n\nWe have provided build scripts to simplify this process.\n\nOn Unix and MacOS using Makefile:\n\n    cd platforms/unix\n    make all\n    ./pforth_standalone\n    \nFor more details, see the [Wiki](https://github.com/philburk/pforth/wiki/Compiling-on-Unix)\nPlease note that this can help with other platforms as well, see platforms/zig-crossbuild/ for an example.\n\nUsing CMake:\n\n    cmake .\n    make\n    cd fth\n    ./pforth_standalone\n\nFor embedded systems, see the pForth reference manual at:\n\n  http://www.softsynth.com/pforth/pf_ref.php\n\n## How to Run pForth\n\nTo run the all-in-one pForth enter:\n\n    ./pforth_standalone\n    \nOR, to run using the dictionary file, enter:\n\n    ./pforth\n\nQuick check of Forth:\n\n    3 4 + .\n    words\n    bye\n\nTo compile source code files use:\n\n    INCLUDE filename\n\nTo create a custom dictionary enter in pForth:\n\n    c\" newfilename.dic\" SAVE-FORTH\n    \nThe name must end in \".dic\".\n\nTo run PForth with the new dictionary enter in the shell:\n\n    pforth -dnewfilename.dic\n\nTo run PForth and automatically include a forth file:\n    pforth myprogram.fth\n    \n## How to Test pForth\n\nPForth comes with a small test suite.  To test the Core words,\nyou can use the coretest developed by John Hayes.\n\nOn Unix and MacOS using Makefile:\n\n    cd platforms/unix\n    make test\n\nUsing CMake:\n\n    cmake .\n    make\n    cd fth\n    ./pforth\n    include tester.fth\n    include coretest.fth\n\nTo run the other tests, enter:\n\n    pforth t_corex.fth\n    pforth t_strings.fth\n    pforth t_locals.fth\n    pforth t_alloc.fth\n\nThey will report the number of tests that pass or fail.\n\nYou can also test pForth kernel without loading a dictionary using option \"-i\".\nOnly the primitive words defined in C will be available.\nThis might be necessary if the dictionary can't be built.\n\n    ./pforth -i\n    3 4 + .\n    23 77 swap .s\n    loadsys\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilburk%2Fpforth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilburk%2Fpforth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilburk%2Fpforth/lists"}