Welcome! Please view the documentation for SCRINT down below.
Here is a link to the Screw wiki
SCRINT is the Screw Interpreter. Screw is a programming language that is closely modeled after Brainf**k. How Screw differs is that it has some different symbols, extra features, and has a termination character for the end of programs.
Screw is interpreted through a program written in C. Screw files are saved with an extention of ".scw" and the interpreter will handle only those types of files. The file is read by the interpreter, reduced down to essential operations (ignoring all other non-essential characters), then each operation is handled one at a time and turned into C code to run behind the scene.
- '+' : Increment Cell by 1
- '-' : Decrement Cell by 1
- '{' : Begin Loop
- '}' : End Loop
- '?' : Input Char
- '.' : Output Char
- '<' : Shift One Cell Left
- '>' : Shift One Cell Right
- '*' : Cell Dump (See Features Below)
- '^' : Enumeration symbol (as in 0 to 5)
- 0-9 : Numbers 0 through 9
- 'A' : Add Given Number to Current Cell
- 'S' : Subtract Given Number From Current Cell
- ';' : Comment
- '~' : End File
Screw's syntax is similar to Brainf**k. You must have a tilda (~) at the end of your program and commenting is done with a semi-colon (;). For examples of Screw, you can check out the .scw files that I uploaded.
- Screw has a feature known as "cell dump". This feature allows the user to output multiple adjacent cells by giving a lower bound and an upper bound. After that, each of the cells "dumped" are then wiped and reset to their default value (0). An example of cell dumping: *0^6 will output the contents of cells 0 through 6, then wipe the contents. Note: Cell dumping only works for cells 0-9.
- Screw has commenting. This feature allows only for single-line commenting and is done by using a semi-colon (;)
- Screw can add a given number to a cell. An example is: A48 which adds 48 to the current cell.
- Screw can subtract a given number from a cell. An example is S2 which subtracts 2 from the current cell.
NOTE: SCRINT was developed to be run on a bash terminal
To run Screw you will have to download the main.c and make files from the "Interpreter" folder in this repo, then open your bash terminal in the same directory as the files you downloaded. Then type the following: make
Hit enter and then then you will have an executable named "scrint". Next make sure your Screw programs are in the same directory as your scrint exectubale. Then in bash, just type: ./scrint <your_file_here>.scw
There are sample Screw programs in the "Programs" folder of this repo.
This will run your file and that is it! You can view version information if you wish by typing: ./scrint -v