Created
July 1, 2025 20:44
-
-
Save jfinstrom/974d8a9a2569fa7e2e08797c7e13c92b to your computer and use it in GitHub Desktop.
fwconsole start/stop in brainfuck.... does it work? no idea
This file contains hidden or 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
+++++ +++++ [> +++++ +++++ <-] > +++++ ++ . [-] Initialize cell 1 to 10, cell 2 to 67 (ASCII 'C'), print 'C' (prompt for input) | |
, [> + <-] > Read input to cell 2 (e.g., 'p' for pre, 'o' for post, else normal) | |
[-] +++++ +++++ [> +++++ +++++ <-] > +++++ ++++ . Set cell 2 to 74 (ASCII 'J'), print 'J' (start of "START") | |
+++++++ . Print 'A' (65) | |
+++++ . Print 'F' (70) | |
++++ . Print 'I' (73) | |
+++++++ . Print 'Q' (81) | |
< [> ++++ [> +++++ +++++ <-] > + <-] > [-] If input != 0, set cell 3 to 41 | |
+++++ +++++ [> +++++ +++++ <-] > +++++ ++++ Set cell 3 to 74 (ASCII 'J') | |
[<< [> + <-] >> -] If cell 2 != 0, move cell 3 to cell 1 | |
<< [>> ++++ . <<] If cell 1 != 0, print 'N' (78) | |
>> [-] Clear cell 3 | |
< [-] +++++ +++++ [> +++++ +++++ <-] > +++++ ++ Set cell 2 to 67 (ASCII 'C') | |
[<< [>> + <-] <<-] If cell 1 != 0, move cell 2 to cell 3 | |
>> [<< +++++ +++++ . >>] If cell 3 != 0, print 'K' (75) | |
<< [-] + Set cell 1 to 1 (Asterisk running) | |
> [-] +++++ +++++ [> +++++ +++++ <-] > +++++ ++++ . Print 'J' (74) | |
+++++++ . Print 'A' (65) | |
+++++ . Print 'F' (70) | |
++++ . Print 'I' (73) | |
+++++++ . Print 'Q' (81) | |
< [> +++++ +++++ [> +++++ +++++ <-] > +++++ ++ . <-] If input = 'p' (112), print 'C' (67) for pre-hooks | |
> [-] +++++ +++++ [> +++++ +++++ <-] > +++++ +++++ . If input = 'o' (111), print 'E' (69) for post-hooks |
This file contains hidden or 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
``` | |
+++++ +++++ [> +++++ +++++ <-] > +++++ ++ . [-] Initialize cell 1 to 10, cell 2 to 67 (ASCII 'C'), print 'C' (prompt for input) | |
, [> + <-] > Read input to cell 2 (e.g., 'i' for immediate, 'p' for pre, 'o' for post) | |
[-] +++++ +++++ [> +++++ +++++ <-] > +++++ +++++ . Set cell 2 to 76 (ASCII 'L'), print 'L' (start of "STOP") | |
++++ . Print 'P' (80) | |
++++++ . Print 'V' (86) | |
--- . Print 'S' (83) | |
< [> ++++ [> +++++ +++++ <-] > + <-] > [-] If input != 0, set cell 3 to 41 | |
+++++ +++++ [> +++++ +++++ <-] > +++++ +++++ Set cell 3 to 76 (ASCII 'L') | |
[<< [> + <-] >> -] If cell 2 != 0, move cell 3 to cell 1 | |
<< [>> ++++ . <<] If cell 1 != 0, print 'P' (80) | |
>> [-] Clear cell 3 | |
< [-] +++++ +++++ [> +++++ +++++ <-] > +++++ ++ Set cell 2 to 67 (ASCII 'C') | |
[<< [>> + <-] <<-] If cell 1 != 0, move cell 2 to cell 3 | |
>> [<< +++++ +++++ . >>] If cell 3 != 0, print 'M' (77) | |
<< [-] Clear cell 1 (Asterisk stopped) | |
> [-] +++++ +++++ [> +++++ +++++ <-] > +++++ +++++ . Print 'L' (76) | |
++++ . Print 'P' (80) | |
++++++ . Print 'V' (86) | |
--- . Print 'S' (83) | |
< [> +++++ +++++ [> +++++ +++++ <-] > +++++ ++ . <-] If input = 'p' (112), print 'C' (67) for pre-hooks | |
> [-] +++++ +++++ [> +++++ +++++ <-] > +++++ +++++ . If input = 'o' (111), print 'E' (69) for post-hooks | |
< [> +++++ +++++ [> +++++ +++++ <-] > +++++ . <-] If input = 'i' (105), print 'A' (65) for immediate | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment