From 48f00ba3b135d83023725fb591f02100a0c7ac08 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 14 Dec 2022 18:41:41 +0000 Subject: [PATCH] Optimised start_64 vga_clear() --- arch/x86_64/start_64.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86_64/start_64.S b/arch/x86_64/start_64.S index 1efbcc4..d0bd140 100644 --- a/arch/x86_64/start_64.S +++ b/arch/x86_64/start_64.S @@ -12,11 +12,11 @@ kernel_identifier: .section .boot.text, "ax", @progbits vga_clear: - mov $0xb8000, %edi # VGA buffer - mov $0xFA0, %ecx # 4,000 bytes to clear - mov $0x0, %eax + mov $0xb8000, %rdi # VGA buffer + mov $500, %rcx # 4,000 bytes to clear = 500 quadwords + mov $0x0, %rax - rep stosb + rep stosq ret