Talk:Marble Machine
Jump to navigation
Jump to search
Alright I'm going to try to explain how this works without knowing for sure how it works, to add information, destub the article, and make it so that others can use it. All of the info comes from the presented programs.
The "marble" starts in the top left of the program, and goes down by one character every step. If the character is one of the following, the corresponding action is done:
Character | Action |
---|---|
o | See x |
x | Moves marble up to the o in the same column |
\ | Moves the marble right |
/ | Moves the marble left |
p | Prints stack as text |
. | Prints top of stack as number |
? | Get text input, put it on stack |
# | Get numeric input, put it on stack |
! | Terminates program |
" | Adds next character passed onto stack, also skipping it if it normally does something |
, | Unknown. Appears in quote-character-comma structure in the Hello World program, but can't be simply acting as a end quote as it appears in the Cat program without a matching quote |
g | Makes the { or } below it do a greater than. No other condition type is shown in any of the programs |
{ | If [top of stack] [condition] [second to top of stack], go left, else go right |
} | If [top of stack] [condition] [second to top of stack], go right, else go left |
0-9 | Pushes the corresponding number onto the stack |
+ | Adds top two items of the stack |
- | Probably subtracts top two items of the stack (second to top minus top style) |
* | Probably multiplies top two items of the stack |
& | Unknown |
~ | Unknown |
What pops and what doesn't is unknown --CreeperBomb (talk) 15:35, 20 May 2023 (UTC)