Tribit
About
Tribit is a unit of information, which is equal to 3 bits. This fantasy console was called after this unit as it's based on tribits. Fantasy console comes with a programming language and a web IDE, to make the programming process more fun.
Also it's pretty documented. You can find the documentation, after pressing "Help" button in the IDE. In the documentation you can find ThreeB (the programming language) documentation and few sample programs.
When you create a game for this console, you have to somehow design it to fit in a 8x8 screen and low memory, and that's why I created this console. It's very challenging to create something within hard restrictions.
Capabilities
- ROM: 4 096T (=1 536 B)
- RAM: 32T (=12B)
- Screen: 8x8, 1-bit, with different pixel types and optional ghosting effect
- Registers: 8, each 3 bits
- Input: 4 keys
Features
- The console itself
- Simple but pretty convenient IDE
- Assembly Language with
- ThreeB, the B-like (C-like) high-level programming language
| Status | Released |
| Category | Tool |
| Platforms | HTML5 |
| Author | Lunaryss |
| Tags | 3-bit, Arcade, fantasy-computer, fantasy-console, lunaryss, pixel, Tetris |
| Average session | A few seconds |
| Inputs | Keyboard, Mouse |
Comments
Log in with itch.io to leave a comment.
How does declaring variables inside functions work? Does this have scope?
I read the docs but I am a bit confused about storage classes?
Take the following example:
```
let global;
let #weakGlobal := 0;
inc() {
let i;
i++
}
main() {
let a, b;
global++;
inc();
int();
}
```
1. What value is `global` initialized with?
2. Does `weakGlobal` ever go out of scope, since it is declared at the file level?
3. Does `i`'s value persist across function calls? What if it was weak? What if I did `let i = 1;` in there instead, would it keep resetting on calls of `inc`?
4. Does `main` see the vars declared inside of `inc`? Or are they scoped to `onc`? Does `inc` see the vars inside `main`?
5. The documentation mention vectors but forgets to explain their syntax. Can you elaborate on that?
Thank you!
I'd love to test all these questions out myself but the results seem "inconsistent" to me. You mention 3B being buggy in the docs. I'm not sure if it actually is being inconsistent/buggy or if I'm just not getting it. Hence, why I'm asking.
PS: Your Discord link is broken.
Great work! I'm really enjoying playing around with this. It's awesome stuff!