A few days ago some QQ group recommended this game, Baidu found the next bar download, but the strategy seems to have not found, B station to is there is a introductory video introduction is full of useful.
It's highly recommended to read about it first.
http://www.bilibili.com/video/av3312630/
Because I also novice did not play for a few days, so the program optimization of nothing, can only be considered reluctant clearance, there are written in two of the algorithm directly ignore the good.
Levels are ordered by x row y
First, 1_1.
There is no doubt that this should be no one can not pass, really is the Hello world, left to in.x to Out.x, right divert on the line
1_2
This is not much to say, because the game command only add, subtract, shift and jump, so multiplication is nothing but a+a,
Read the data into the register, then add itself, the output will be finished
1_3
A-p value output to p,p-a value output to n
This is primarily to tell you that one data can be sent to multiple CPU ports.
Like In.a the data first.
1. Read in registers,
2. Send to the right
3. Get the value on the right, minus the value you get with ACC
4. Send the ACC results to the bottom
On the right side, note that the order of execution and wait for the instruction,
Click Step to run to see a running to sub right while waiting for the left side to run to the last line
MOV ACC left to continue running,
It is very important to understand the wait, this I just started to toss for a long time to understand, the manual that comes with does not seem to mention the content of the wait, although I did not seriously see is ...
In short, the concept of data synchronization is very important, the back level will be very dependent on the concept,
Sometimes the program clearly solves the logic of the thought out, but the execution is not correct, mostly is waiting and execution order of the problem
Also pay attention to the input, the output number is equal, such as the most simple
A is 2 in (up, right in), 2 out (right out, down)
B is also 2 into (up, left into), 2 out (down, left out)
A output to B data, B must be received, or the program will block the lock dead.
In the same vein, the data is sent to the unused CPU port, and will be locked without processing.
Therefore must have the data to have out, must have in, the garbage data also must have the reception processing concept.
Of course, this is something, the current level of direct use of intuition to write can pass, in short, there is this concept, the latter will be used.
1_4
The g,e,l three outputs are the true and false values of the data >,= and the < three states, respectively.
If the data >0, then G is 1, the other two is 0,
data = 0, then E is 1, the other two is 0
Data <0,l is 1, the other two is 0
Here is the pit is the first time you can read the question, anyway, the first time I did not read this thing, is not human language ...
1_5
3 x in,1 out
Judging by the S value
S=-1 output A
S=1 Output B
S=0 Output A+b
MOV up ACC//Read value to Accjlz RA//less than 0 jump to RA label Jgz RB//greater than 0 jump to Rbmov left ACC//otherwise calculate a+b and output add Rightmov ACC downjmp Endra:mov left DOW Nmov right accjmp Endrb:mov right Downmov left Accend:nop
Because this code is written earlier, and later found that you can add a label to the first line,
This will not jump to the end of the last row of NOP, but directly from the start, you can save a row,
But the current is able to pass the line, temporarily regardless of his
To be Continued ...
TIS100 Introduction to Introduction