-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyntax_test_instructions.pio
55 lines (43 loc) · 1.45 KB
/
syntax_test_instructions.pio
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
// SYNTAX TEST "Packages/PIO Syntax/pio.sublime-syntax"
// ********** Instructions **********
// simple instruction
out x, 1
// <- source.pio meta.instruction
//^ instruction.type
// ^ instruction.register variable.parameter.pio
// ^ punctuation.separator.continuation.pio
// instruction in upper case
OUT y, 2
// <- source.pio meta.instruction
//^ instruction.type
// instruction with side value
jmp !x high_0 side 1
// <- source.pio meta.instruction
// ^ instruction.side.keyword
// ^ instruction.side.value
// instruction with delay value
jmp x-- 0x56 [2]
// <- source.pio meta.instruction
// ^ punctuation.instruction.delay.begin
// ^ instruction.delay.value
// ^ punctuation.instruction.delay.end
// instruction with side and delay value
jmp !y high_0 side 1 [0x3]
// <- source.pio meta.instruction
// ^ instruction.side.keyword
// ^ instruction.side.value
// ^ punctuation.instruction.delay.begin
// ^ instruction.delay.value
// ^ punctuation.instruction.delay.end
mov pins, 1
set pindirs, 1
//********** Example program (from pico-examples/pio/hello_pio) **********
loop:
// <- source.pio label
pull
// <- source.pio meta.instruction
//^ instruction.type
out pins, 1
// ^ instruction.keyword.pio
jmp loop
// ^ variable.function