This is an implemetation of the 1bit processor as described by adimineman. Being that it's written in C, it performes about 232x better, and because of the lower level and lower overhead it provides better compatability with software written for the 1bit architecture.
This software only depens on the GNU C Library, GCC and GNU Make
make
./1bitvm infile
All described options are settable in config.h
USE_SIMD
- Improves performance by up to 2x on supported platforms (modern x86 CPUs)DEBUG
- Debugging is availiable through four debug levelsLIMIT
- Maximum number of executed instructions, -1 to disableEXIT_ON_EOF
- If set, the vm exits imediately after EOF is input, if not set, the vm is allowed to continue - IN will always be 1STDIN_PROMPT
- if set, the vm will prompt the user with the character>
, if not set, the character will not be shownSTDIN_PROMPT_STREAM
- sets the stream to which the prompt character may be printed
0 - Exited by PC non increment - graceful
1 - Execution limit reached
2 - EOF on stdin
get example files here
./asm.py *.asm
1bitvm.c - C Implementation of the 1bit architecture
Copyright (C) 2023 Oliver Wagner
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.