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
37 lines
893 B
Brainfuck
37 lines
893 B
Brainfuck
[
|
|
Tests of various optimizable loops
|
|
]
|
|
|
|
>>>>>> Set c6 = 5
|
|
+++++
|
|
|
|
>>>>>> Set c12 = 5
|
|
+++++
|
|
|
|
<<<<<<
|
|
|
|
[-<<<+>>>] Move the value of c6 to c3
|
|
|
|
|
|
<+++ Set c5 = 3
|
|
|
|
[-<<+>>] Add c5 to c3 (so add 3 to 5 in c3)
|
|
|
|
<<
|
|
Print the value of c3 as a single ASCII digit
|
|
++++++++ ++++++++ ++++++++ ++++++++ ++++++++ ++++++++.
|
|
|
|
[-] Clear c3
|
|
|
|
Print the value of c3 as a single ASCII digit
|
|
++++++++ ++++++++ ++++++++ ++++++++ ++++++++ ++++++++.
|
|
|
|
Set values in c3 to c10 to nonzero
|
|
|
|
>+>+>+>+>+>+>+
|
|
|
|
Hop back to the first zero field before c10
|
|
|
|
[<<]
|
|
Print its (c2) value of as a single ASCII digit
|
|
++++++++ ++++++++ ++++++++ ++++++++ ++++++++ ++++++++. |