-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathasmfetch.S
95 lines (77 loc) · 1.5 KB
/
asmfetch.S
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.intel_syntax noprefix
.lcomm number_buf, 10
.include "atoi.S"
.include "constants.S"
.include "copy.S"
.include "itoa.S"
.include "print.S"
.include "symbols.S"
.include "env.S"
.include "meminfo.S"
.include "release.S"
.include "sysinfo.S"
.include "uname.S"
.include "circles.S"
.include "desktop.S"
.include "host.S"
.include "memory.S"
.include "storage.S"
.include "system.S"
.include "uptime.S"
# customization
.include "colors/default.S"
.include "kernel/without_machine.S"
.include "logo/fedora.S"
.include "shell/path.S"
.global _start
_start:
mov rbp, rsp
add rbp, 24
call parse_envs
call uname
call parse_release
call sysinfo
call parse_meminfo
mov rsi, offset LOGO_0
mov rcx, LOGO_1 - LOGO_0
call print
call print_host
mov rsi, offset LOGO_1
mov rcx, LOGO_2 - LOGO_1
call print
call print_system
mov rsi, offset LOGO_2
mov rcx, LOGO_3 - LOGO_2
call print
call print_kernel
mov rsi, offset LOGO_3
mov rcx, LOGO_4 - LOGO_3
call print
call print_shell
mov rsi, offset LOGO_4
mov rcx, LOGO_5 - LOGO_4
call print
call print_uptime
mov rsi, offset LOGO_5
mov rcx, LOGO_6 - LOGO_5
call print
call print_desktop
mov rsi, offset LOGO_6
mov rcx, LOGO_7 - LOGO_6
call print
call print_memory
mov rsi, offset LOGO_7
mov rcx, LOGO_8 - LOGO_7
call print
call print_storage
mov rsi, offset LOGO_8
mov rcx, LOGO_END - LOGO_8
call print
call print_colors
mov rsi, offset reset
mov rcx, 4
call print
call flush
mov rax, SYS_EXIT
xor rdi, rdi
syscall