diff options
Diffstat (limited to 'kernel/panic.s')
| -rw-r--r-- | kernel/panic.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/panic.s b/kernel/panic.s new file mode 100644 index 0000000..f4e0f26 --- /dev/null +++ b/kernel/panic.s @@ -0,0 +1,20 @@ +; +; panic.s - provides panic() which disables +; interrupts and halts the system. currently used +; mainly for debugging, will eventually be expanded +; to display some useful information on the +; console. +; + +global panic +extern printf + +panic: + push ebp + mov ebp, esp + push .msg + call printf + add esp, 4 + cli + hlt +.msg: db "Kernel panic!", 10, 0 |
