Skip to content

Commit

Permalink
perf: move reset escape code into separator symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
ErrorNoInternet committed Aug 20, 2024
1 parent 90f9b04 commit 26121a8
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 41 deletions.
6 changes: 1 addition & 5 deletions colors.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ print_colors:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rsi, offset blue
Expand Down
6 changes: 1 addition & 5 deletions desktop.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ print_desktop:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rsi, offset desktop
Expand Down
6 changes: 1 addition & 5 deletions kernel/common.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ print_kernel:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rsi, offset sysname
Expand Down
6 changes: 1 addition & 5 deletions memory.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ print_memory:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rax, memtotal
Expand Down
6 changes: 1 addition & 5 deletions shell.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ print_shell:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rsi, offset shell_path
Expand Down
6 changes: 1 addition & 5 deletions storage.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ print_storage:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rax, [statfs_buf + 16]
Expand Down
2 changes: 1 addition & 1 deletion symbols.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ colors_symbol:
.ascii " "

separator_symbol:
.ascii " "
.ascii "\x1b[m\xf "

circle_symbol:
.ascii " "
6 changes: 1 addition & 5 deletions system.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ print_system:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

mov rsi, offset pretty_name + 1
Expand Down
6 changes: 1 addition & 5 deletions uptime.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ print_uptime:
mov rcx, 10
call print

mov rsi, offset reset
mov rcx, 4
call print

mov rsi, offset separator_symbol
mov rcx, 4
mov rcx, 8
call print

xor r9, r9
Expand Down

0 comments on commit 26121a8

Please sign in to comment.