From 5ebdd89ffb61c144f3226a3b2beb06de3216a013 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 11 Apr 2017 14:50:00 +0200 Subject: [PATCH] Add an `error` function --- src/arch/x86_64/boot.asm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index 1a531c0..8139834 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -6,3 +6,12 @@ start: ; print `OK` to screen mov dword [0xb8000], 0x2f4b2f4f hlt + +; Prints `ERR: ` and the given error code to screen and hangs. +; parameter: error code (in ascii) in al +error: + mov dword [0xb8000], 0x4f524f45 + mov dword [0xb8004], 0x4f3a4f52 + mov dword [0xb8008], 0x4f204f20 + mov byte [0xb800a], al + hlt