From 47e691cb0b7a49a797c622b6c79162428358fbe1 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 19 Jun 2018 00:54:43 -0400 Subject: Implement builtin terminal commands * Reboot * Exit * Echo --- builtin_exit.asm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 builtin_exit.asm (limited to 'builtin_exit.asm') diff --git a/builtin_exit.asm b/builtin_exit.asm new file mode 100644 index 0000000..74594e1 --- /dev/null +++ b/builtin_exit.asm @@ -0,0 +1,17 @@ +%ifndef _BUILTIN_EXIT_ASM +%define _BUILTIN_EXIT_ASM + +builtin_exit: + push bp + mov bp, sp + + push .msg_fmt + call printf + add sp, 2 * 1 + + add sp, 2 ; cleanup previous call address + + jmp terminal + .msg_fmt db 'exiting...\n', 0 + +%endif -- cgit