blob: c2cc967781e28ac9bdd061618d99351b4913632d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
(export _global_offset_table_)
(import a-string)
(macro stdout 1)
(macro write (lambda (fd buffer amount)
`(begin (mov ecx ,buffer)
(mov ebx ,fd)
(mov edx ,amount)
(mov eax ,4)
(int #x80))))
(macro exit (lambda (exit-code)
`(begin (mov eax 1)
(mov ebx ,exit-code)
(int #x80))))
(entry _start)
(text (label _start get-got
(write stdout (& ebx (got a-string)) 9)
(exit 0)))
|