This repository was archived by the owner on Oct 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp.txt
68 lines (63 loc) · 6.38 KB
/
help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Micrologic Help
=== Basic Principle ===
* The world of Micrologic is made up of 2 elements: "line" (including "wide line") and "block".
* A line contains a value between 0 and 1 (aka. 1bit), while a wideline contains a value ranging from 0 to 15 (aka. 4bits).
* A block has some input ports and some output ports. When you define a block, you must link all these ports to a line (or wideline). The block reads all its input values, does something inside it, and then output to the output lines linking with it.
* Every "tick", every block on the board updates its outputs based on its previous (aka. before this tick) inputs. There's no need for users to worry about "update order", because in fact the interpreter saves a snapshot of the values before this tick and update outputs based on it. So, as long as you don't set one line as an output of multiple blocks (of course this is unrecommanded!), the order doesn't matter.
* Note: Every object in Micrologic is automatically assigned a order number, and you'll have to follow it.
* Note: The order number of lines and wide lines are shared.
=== Commands ===
Note: When creating blocks, the front part are inputs and the rest are outputs.
Note: Many commands have no error messages when you make a mistake. So be careful to what you write on your own.
Note: [ALINE] = [LINE | WLINE] below.
end Closes the interpreter.
line Creates an new line.
line [NUM] Creates multiple new lines.
wline Creates an new wide line.
wline [NUM] Creates multiple new wide lines.
N [LINE] [LINE] Creates an block N. It is used as "not".
A [LINE] [LINE] [LINE] Creates an block A. It is used as "and".
R [LINE] [LINE] [LINE] Creates an block R. It is used as "or".
T [ALINE] [ALINE] Creates an block T. It is used as "identity", often as a 1 tick delay.
C [LINE] [LINE] [LINE] [LINE] [WLINE] Creates an block C. It is used to combine 4 lines into a wide line.
P [WLINE] [LINE] [LINE] [LINE] [LINE] Creates an block P. It is used to split 1 wide line into 4 lines.
set [LINE] [VALUE] Set the value of a designated line.
set [WLINE] [VALUE] [VALUE] [VALUE] [VALUE] Set the value of the 4 digits of a designated wline.
check Outputs values of all lines in order.
check [ALINE] Outputs value of a designated line.
input: [ALINE] Set a designated line as an input line.
input [INPUT] [LINE] Set the value of a designated input line.
input [INPUT] [LINE] [LINE] [LINE] [LINE] Set the value of a designated input wline.
output: [ALINE] Set a designated line as an output line.
output Output the value of all lines.
output [OUTPUT] Output the value of a designated output wline.
tick Tick once.
tick [TIMES] Tick mutiple times.
tick! Tick once, and output values of all lines after it.
tick! [TIMES] Tick mutiple times, and output values of all lines after every tick.
speed [SPEED] Set speed. The default speed is 1.
path Check current path.
path [PATH] Set path of scripts. Use double quotation marks when the path name include spaces.
open [FILE] Open an Micrologic script file. Use double quotation marks when the file name include spaces.
safe-open [FILE] Similar to open, but disable some commands.
mod [MOD] [FILE] Give an file a mod name, in order to use it as a block afterwards.
check-mods Check all current mods.
block [MOD] [INPUT [INPUT ...]] [OUTPUT [OUTPUT ...]] Creates a user-defined block.
block-type [BLOCK] Check the type of a designated block.
tag [ALINE] Check whether a line is set as input or output.
type [ALINE] Check whether a line is wide.
check-input Lists the line order numbers of input lines.
check-input [INPUT] Lists the line order number of a designated input line.
check-output Lists the line order numbers of output lines.
check-output [OUTPUT] Lists the line order number of a designated output line.
inspect [BLOCKTYPE] [BLOCK] Checks whether a block connects correct line type.
del [BLOCKTYPE] [BLOCK] Delete a designated block.
del line [ALINE] Delete a designated line. No bugs were found in tn test but you'd betterbe careful of those blocks without line connection.
export Export current blocks.
echo [MESSAGE] Outputs a message.
@echo [ECHO] Set whether to echo messages. Requires 0 or 1.
clear Clear the interpreter' data and restart.
help Show help.
help [COMMAND] Show help for a designated command.
lang list list all avilable languages.
lang [LANGUAGE] Change language.