-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdesktop.S
More file actions
68 lines (50 loc) · 964 Bytes
/
desktop.S
File metadata and controls
68 lines (50 loc) · 964 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
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
desktop_label: .ascii "Desktop "
print_desktop:
mov rsi, offset desktop_symbol
mov rcx, 5
call print
mov rsi, offset accent1
mov rcx, 5
call print
mov rsi, offset desktop_label
mov rcx, 10
call print
mov rsi, offset separator_symbol
mov rcx, 8
call print
mov rcx, desktop_length
test rcx, rcx
je print_unknown_desktop
mov rsi, offset desktop
jmp print_known_desktop
print_unknown_desktop:
mov rsi, offset unknown_label
mov rcx, 7
print_known_desktop:
call print
mov rax, session_length
test rax, rax
jne check_session
mov byte ptr [r10], '\n'
inc r10
ret
check_session:
mov rsi, offset open_paren_label
mov rcx, 2
call print
mov ebx, [session]
cmp ebx, 0x797474
je upper
sub bl, 0x20
jmp print_session
upper:
sub ebx, 0x202020
print_session:
mov [session], ebx
mov rsi, offset session
mov rcx, session_length
call print
mov rsi, offset close_paren_label
mov rcx, 2
call print
ret