-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.vm
More file actions
79 lines (79 loc) · 1.34 KB
/
Main.vm
File metadata and controls
79 lines (79 loc) · 1.34 KB
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
69
70
71
72
73
74
75
76
77
78
79
function Main.main 9
push constant 16
call String.new 1
push constant 67
call String.appendChar 2
push constant 101
call String.appendChar 2
push constant 108
call String.appendChar 2
push constant 108
call String.appendChar 2
push constant 32
call String.appendChar 2
push constant 115
call String.appendChar 2
push constant 105
call String.appendChar 2
push constant 122
call String.appendChar 2
push constant 101
call String.appendChar 2
push constant 63
call String.appendChar 2
push constant 32
call String.appendChar 2
push constant 40
call String.appendChar 2
push constant 62
call String.appendChar 2
push constant 51
call String.appendChar 2
push constant 41
call String.appendChar 2
push constant 32
call String.appendChar 2
call Keyboard.readInt 1
pop local 2
push local 2
call Grid.new 1
pop local 5
call Screen.clearScreen 0
pop temp 0
push local 5
call Mover.new 1
pop local 0
label WHILE_TOP_0
push local 7
not
not
if-goto WHILE_BREAK_0
push local 0
call Mover.step 1
pop temp 0
push local 0
call Mover.done 1
pop local 7
push constant 100
call Sys.wait 1
pop temp 0
goto WHILE_TOP_0
label WHILE_BREAK_0
push local 0
call Mover.state 1
pop local 6
push local 6
call Life.new 1
pop local 1
label WHILE_TOP_1
push constant 0
not
not
if-goto WHILE_BREAK_1
push local 1
call Life.step 1
pop temp 0
goto WHILE_TOP_1
label WHILE_BREAK_1
push constant 0
return