aboutsummaryrefslogtreecommitdiff
path: root/examples/o.s
blob: 5246a417b7498ba4015c762b2d2aefcf3f3522f3 (plain)
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
;All operand types, presented in various ways

:start	set a, 5
		set a, b
		set a, [b]
		set a, [b + 3]
		set a, [3 + b]	;both ways should be acceptable
		set a, [b+3]	;spaces should not be forced
		set a, POP
		set a, PEEK
		set PUSH, a
		set a, start
		set a, [start]
		set a, PC
		set a, SP
		set a, O
		
		;reverse these
		
		;set 5, a		;allowable in the spec though
		
		set b, a
		set [b], a
		set [b + 3], a
		set [3 + b], a
		set [b+3], a
		set POP, a
		set PEEK, a
		set a, PUSH
		set start, a
		set [start], a
		set PC, a
		set SP, a
		set O, a