blob: 6e68ffc0f5359552d104a506f1d6016ec2e12062 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[entry: main]
// Stores 7 into a stack cell, loads it back through a pointer, and exits with it.
const SYS_EXIT = 60
proc main
{
stack cell[8]
rbx = 7
rsi = cell // address of the cell
^rsi = rbx // store
rdi = ^rsi // load it back
rax = SYS_EXIT
syscall
}
|