-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lrc572
committed
Dec 25, 2017
0 parents
commit 728a071
Showing
9 changed files
with
748 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# ti-brainfck (v1.0.0) | ||
a brainfuck interpreter in ti-basic | ||
----------------------------------- | ||
|
||
|Key|Function| | ||
|---|---| | ||
|LN|[| | ||
|STO|]| | ||
|4|>| | ||
|1|<| | ||
|5|+| | ||
|2|-| | ||
|6|.| | ||
|3|,| | ||
|ENTER|Newline| | ||
|(-)|Run| | ||
|
||
* ti-brainfck (v1.0.0) has successfully interpreted the [hello-world bf program](https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages#Brainfuck). | ||
* ti-brainfck (v1.0.0) may (probably) have some bugs. | ||
* Bug fixes and new features will come out in the next version. | ||
* More detailed docs will be included in the next version. | ||
|
||
-------------------------------------- | ||
|
||
### How To Install: | ||
|
||
#### Interpreter: | ||
- Download BFITPT.8xp to your GC (Ti-84 Plus C SE / Ti-84 Plus CE / ...). | ||
- Edit brainfck source code(Str0) | ||
- Run it. | ||
|
||
#### Editor: | ||
- Download EDITOR.8xp to your GC (Ti-84 Plus C SE / Ti-84 Plus CE / ...). | ||
- Run it. | ||
|
||
-------------------------------------- | ||
|
||
### Features: | ||
|
||
- Automatically add new line when reaching the end of a line. | ||
- ClrHome when newline is needed at the last line of the screen. | ||
- Memory currently contains 900 cells and the maximum depth of loop allowed is 400, due to constraints of the GC. | ||
- Memory is wrapped on overflow and underflow (Cell(-1)=Cell(900), Cell(901)=Cell(1)). | ||
- Only the 8 command chars are allowed to be in the source. | ||
- Cells are emulated as to be 8-bit (0-255). | ||
- Use ASCII printable characters as input/output. | ||
- Currently only allows numbers and ALPHA characters(excluding theta and SOlVE) as input. | ||
- Type capital letters by pressing 'ALPHA' key followed by the letter keys. | ||
- Type numbers by directly pressing the number keys. | ||
- " sign is always automatically replaced by ' sign because GC does not allow the use of " in string variables. | ||
+ Both "(ASCII:34) and '(ASCII:39) are shown as ' in output. | ||
+ " ("ALPHA" + "+") is converted to 34 in input. | ||
- \ sign is always automatically replaced by / sign due to constraints of the GC. | ||
|
||
-------------------------------------- | ||
|
||
### Todos: | ||
|
||
- Add line buffer so as to move all lines up instead of clrhome when reaching the last line. | ||
- When editting source code: | ||
+ Allow non-command chars as comment (which are ignored by the interpreter) (is it necessary?) | ||
- Translate newline to 10 on input, and 10 to newline on output | ||
- Display instructions at the start (to be added when all functions are complete) | ||
- Show cursor when waiting for input | ||
|
||
-------------------------------------- | ||
|
||
* BRAINFCK.8xg is the project file (can be used in [SourceCoder3](https://www.cemetech.net/sc)). | ||
* BFITPT.8xp is the program file of the interpreter. | ||
* Str0.8xs is a [hello-world bf program](https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages#Brainfuck). | ||
* EDITOR.8xp is the program file for the editor. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |