MAWP is a stack-based, esoteric programming language written in 2020. Here is the list of current availible commands:

Symbol | Meaning |
---|---|

0-9 | Any subsequent numbers from 0 to 9 will be pushed as one multi-digit number. |

" | Any characters between a pair of " will get pushed to stack as a string. |

+ | Pops two values off of stack. If at least one of the values is a string, pushes a string consisting of two concatenated values. Else, pushes sum of values. |

- | Pops two values off of stack. If one of the top two values is a string, pushes values and a 0. Else, pushes difference of values. |

* | Pops two values off of stack. If both of two top values of stack is string, push a 0. Else, if only one of values is a string, pushes the string repeated n times, where n is the other value. Else, push two values multiplied. |

$ | Pops two values off of stack. If one of the top two values is a string, pushes values and a 0. Else, push result of second value divided by the top. |

% | Pops two values off of stack. If one of the top two values is a string, pushes values and a 0. Else, pushes result of second value modulo top value. |

` | Pops top of stack. |

MAWP | M,A,W,P are now 4 global variables. If the previous character before one of the variables was =, then assigns top of stack to the corresponding variable. Else, pushes the variable to stack. |

! | Duplicates top of stack. |

: | Prints top of stack without newline, removing it. |

; | If top of stack is a string, output string as sequence of ASCII codes. Else, output the corresponding ASCII character. |

. | Terminates program |

[ | Start of loop. jumps to its ] if top of stack equals to 0 |

] | End of loop. If top of stack doesn't equal to 0, then moves back to start of loop. |

( | Start of inverted [] loop. Jumps to its ) if top of stack doesn't equal to 0 |

) | End of inverted [] loop. Jumps to its ( if top of stack equals to 0 |

< | Long conditional. If top of stack doesn't equal to 0, jumps to its > |

> | End of long conditional |

_ | Pushes length of stack |

? | Short conditional. If top of stack doesn't equal to 0, skips next operator. |

| | Pushes whole input byte by byte by its ASCII value |

~ | Reverses the stack |

{ | Long inverted conditional. If top of stack equals to 0, jumps to its } |

} | End of long inverted conditional |

@ | Pushes whole input byte by byte. If character is an integer, then push that integer. Else push a 0 |

/ | Cycles stack clockwise |

\ | Cycles stack anticlockwise |

Code: 0 chars

Input:

Max output size --- Max executions

Output will appear here.

Time of code executing will appear here

0-9 | Any subsequent numbers from 0 to 9 will be pushed as one multi-digit number. |

" | Any characters between a pair of " will get pushed to stack as a string. |

+ | Pops two values off of stack. If at least one of the values is a string, pushes a string consisting of two concatenated values. Else, pushes sum of values. |

- | Pops two values off of stack. If one of the top two values is a string, pushes values and a 0. Else, pushes difference of values. |

* | Pops two values off of stack. If both of two top values of stack is string, push a 0. Else, if only one of values is a string, pushes the string repeated n times, where n is the other value. Else, push two values multiplied. |

$ | Pops two values off of stack. If one of the top two values is a string, pushes values and a 0. Else, push result of second value divided by the top. |

% | Pops two values off of stack. If one of the top two values is a string, pushes values and a 0. Else, pushes result of second value modulo top value. |

` | Pops top of stack. |

MAWP | M,A,W,P are now 4 global variables. If the previous character before one of the variables was =, then assigns top of stack to the corresponding variable. Else, pushes the variable to stack. |

The stack will appear here.