Console-based REPL Implementation - Use Jump table dispatch for execution - RLE preprocessing as optimization - Buffered output to minimize redraw - File loading support via run command - Add REPL commands: help, run, clear, reset, exit - Two implementation: bf_shell_interp.asm, bf_console_interp.asm This is my first contribution to KolibriOS for GSOC 2026 WASM runtime project preparation
34 lines
1.8 KiB
Brainfuck
34 lines
1.8 KiB
Brainfuck
99 bottles in 1752 brainfuck instructions
|
|
by jim crawford (http://www (dot) goombas (dot) org/)
|
|
>++++++++++[<++++++++++>-]<->>>>>+++[>+++>+++<<-]<<<<+<[>[>+
|
|
>+<<-]>>[-<<+>>]++++>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<[[-]>>
|
|
>>>>[[-]<++++++++++<->>]<-[>+>+<<-]>[<+>-]+>[[-]<->]<<<<<<<<
|
|
<->>]<[>+>+<<-]>>[-<<+>>]+>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<
|
|
<[>>+>+<<<-]>>>[-<<<+>>>]++>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<
|
|
<[>+<[-]]<[>>+<<[-]]>>[<<+>>[-]]<<<[>>+>+<<<-]>>>[-<<<+>>>]+
|
|
+++>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<[>+<[-]]<[>>+<<[-]]>>[<
|
|
<+>>[-]]<<[[-]>>>++++++++[>>++++++<<-]>[<++++++++[>++++++<-]
|
|
>.<++++++++[>------<-]>[<<+>>-]]>.<<++++++++[>>------<<-]<[-
|
|
>>+<<]<++++++++[<++++>-]<.>+++++++[>+++++++++<-]>+++.<+++++[
|
|
>+++++++++<-]>.+++++..--------.-------.++++++++++++++>>[>>>+
|
|
>+<<<<-]>>>>[-<<<<+>>>>]>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<<<
|
|
[>>>+>+<<<<-]>>>>[-<<<<+>>>>]+>+<[-<->]<[[-]>>-<<]>>[[-]<<+>
|
|
>]<<<[>>+<<[-]]>[>+<[-]]++>>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<
|
|
+<[[-]>-<]>[<<<<<<<.>>>>>>>[-]]<<<<<<<<<.>>----.---------.<<
|
|
.>>----.+++..+++++++++++++.[-]<<[-]]<[>+>+<<-]>>[-<<+>>]+>+<
|
|
[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<<[>>+>+<<<-]>>>[-<<<+>>>]++++
|
|
>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<[>+<[-]]<[>>+<<[-]]>>[<<+>
|
|
>[-]]<<[[-]>++++++++[<++++>-]<.>++++++++++[>+++++++++++<-]>+
|
|
.-.<<.>>++++++.------------.---.<<.>++++++[>+++<-]>.<++++++[
|
|
>----<-]>++.+++++++++++..[-]<<[-]++++++++++.[-]]<[>+>+<<-]>>
|
|
[-<<+>>]+++>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<[[-]++++++++++.
|
|
>+++++++++[>+++++++++<-]>+++.+++++++++++++.++++++++++.------
|
|
.<++++++++[>>++++<<-]>>.<++++++++++.-.---------.>.<-.+++++++
|
|
++++.++++++++.---------.>.<-------------.+++++++++++++.-----
|
|
-----.>.<++++++++++++.---------------.<+++[>++++++<-]>..>.<-
|
|
---------.+++++++++++.>.<<+++[>------<-]>-.+++++++++++++++++
|
|
.---.++++++.-------.----------.[-]>[-]<<<.[-]]<[>+>+<<-]>>[-
|
|
<<+>>]++++>+<[-<->]<[[-]>>-<<]>>[[-]<<+>>]<<[[-]++++++++++.[
|
|
-]<[-]>]<+<]
|
|
|