diff --git a/circles.S b/circles.S index 4d703be..268e48d 100644 --- a/circles.S +++ b/circles.S @@ -30,8 +30,8 @@ print_colors: mov rsi, offset purple call print_circle - mov bl, 10 - call printc + mov byte ptr [print_buf + r10], '\n' + inc r10 ret diff --git a/desktop.S b/desktop.S index 96a5245..179dc8c 100644 --- a/desktop.S +++ b/desktop.S @@ -35,8 +35,8 @@ print_known_desktop: test rax, rax jne check_session - mov bl, '\n' - call printc + mov byte ptr [print_buf + r10], '\n' + inc r10 ret diff --git a/host.S b/host.S index bcdf510..f64a596 100644 --- a/host.S +++ b/host.S @@ -23,8 +23,8 @@ print_known_user: mov rcx, 5 call print - mov bl, '@' - call printc + mov byte ptr [print_buf + r10], '@' + inc r10 mov rsi, offset green mov rcx, 5 diff --git a/kernel/common.S b/kernel/common.S index 7f1e2e8..592715d 100644 --- a/kernel/common.S +++ b/kernel/common.S @@ -21,5 +21,5 @@ print_kernel: mov rcx, sysname_length call print - mov bl, ' ' - call printc + mov byte ptr [print_buf + r10], ' ' + inc r10 diff --git a/memory.S b/memory.S index d79d5fd..0fde927 100644 --- a/memory.S +++ b/memory.S @@ -49,8 +49,8 @@ print_memory: add rsi, offset number_buf call print - mov bl, '%' - call printc + mov byte ptr [print_buf + r10], '%' + inc r10 mov rsi, offset reset mov rcx, 4 @@ -78,8 +78,8 @@ print_memory_number: call print print_memory_decimal: - mov bl, '.' - call printc + mov byte ptr [print_buf + r10], '.' + inc r10 mov rcx, 2 call print @@ -87,6 +87,6 @@ print_memory_decimal: ret print_memory_zero: - mov bl, '0' - call printc - jmp print_memory_decimal + mov byte ptr [print_buf + r10], '0' + inc r10 + jmp print_memory_decimal diff --git a/print.S b/print.S index 7339035..b79af42 100644 --- a/print.S +++ b/print.S @@ -27,11 +27,6 @@ println: ret -printc: - mov [print_buf + r10], bl - inc r10 - ret - flush: mov rax, SYS_WRITE mov rdi, 1 diff --git a/storage.S b/storage.S index 9958b61..1715351 100644 --- a/storage.S +++ b/storage.S @@ -67,8 +67,8 @@ print_storage_numbers: add rsi, offset number_buf call print - mov bl, '%' - call printc + mov byte ptr [print_buf + r10], '%' + inc r10 mov rsi, offset reset mov rcx, 4 @@ -97,8 +97,8 @@ print_storage_number: call print print_storage_decimal: - mov bl, '.' - call printc + mov byte ptr [print_buf + r10], '.' + inc r10 mov rcx, 2 call print @@ -106,6 +106,6 @@ print_storage_decimal: ret print_storage_zero: - mov bl, '0' - call printc - jmp print_storage_decimal + mov byte ptr [print_buf + r10], '0' + inc r10 + jmp print_storage_decimal diff --git a/uptime.S b/uptime.S index d472045..56f7af1 100644 --- a/uptime.S +++ b/uptime.S @@ -46,8 +46,8 @@ uptime_minutes: jne print_comma_minutes uptime_done: - mov bl, '\n' - call printc + mov byte ptr [print_buf + r10], '\n' + inc r10 ret print_day_label: