On the Subject of Markscript
Turing complete on the inside, wacky stripes on the outside.
This module is a computer, which itself consists of a screen, a red power button, and a keyboard. There will be a programming task for you to implement. To disarm the module, write and execute a program that completes the task. This module does not strike.
Use the ☺
key to switch between coding mode and task mode.
Task mode displays a description of the program you must write.
Pressing the power button while in coding mode executes the program. Pressing it again while the program is being executed aborts it.
Almost all keyboard keys, including the one shaped like a Tetris Z, will simply append the character shown on the key to the current line. The exceptions are listed below.
☺
: Switches modes. All other controls don’t work while in task mode.-
←
: Removes the last character from the current line. Note that this does not work if the character you are attempting to remove is a?
. ▲
,▼
: Moves the cursor to the previous or next line, respectively.
Your physical keyboard can also be used to type. Letters, space, backspace, and arrow keys work as expected. Enter and numbers work normally so long as Shift is not held. The table below shows what physical keys are changed to when Shift is held. Keep NumLock in mind when using the physical keyboard.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Enter |
« |
√ |
◊ |
∩ |
₪ |
☼ |
♣ |
♫ |
☺ |
The program will be written in a programming language called, unsurprisingly, Markscript, the complete documentation of which is provided below.
All variables presented in the task will be automatically given values before the program is run. The module will disarm when the correct output is returned five times in a row.
If an incorrect output is returned or the module attempts to execute a line with a syntax error, the screen will display the problem and the program will halt.
Press ☺
to return to coding mode while in this state.