-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathfunc4.fj
More file actions
43 lines (31 loc) · 656 Bytes
/
Copy pathfunc4.fj
File metadata and controls
43 lines (31 loc) · 656 Bytes
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
// Tests the ptr_flip_dbit and function calls
stl.startup_and_init_all 10
// Prints "ABCDEFGH-" and then 0/1, the invert of x4
test4:
stl.output 'A'
hex.push_hex x4
stl.output 'B'
stl.call func4
stl.output 'G'
hex.pop_hex x4
stl.output 'H'
bit.bin2ascii ascii, x4
stl.output '-'
bit.print ascii
stl.output '\n'
stl.loop
func4:
stl.output 'C'
stl.get_sp __func4_arg_ptr
stl.output 'D'
hex.ptr_dec __func4_arg_ptr
stl.output 'E'
hex.ptr_flip_dbit __func4_arg_ptr
stl.output 'F'
stl.return
__func4_arg_ptr:
hex.vec w/4, 0
x4:
bit.bit 0
ascii:
bit.vec 8