diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-06-19 00:54:43 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2018-06-19 00:54:43 -0400 |
commit | 47e691cb0b7a49a797c622b6c79162428358fbe1 (patch) | |
tree | 11cbfcd397d92567953507a0f8482d269bd299d6 /builtin_exit.asm | |
parent | 16ce91dac78f9a522d6b5a5f4b0f651e25635a4f (diff) | |
download | minos-47e691cb0b7a49a797c622b6c79162428358fbe1.tar.gz |
Implement builtin terminal commands
* Reboot
* Exit
* Echo
Diffstat (limited to 'builtin_exit.asm')
-rw-r--r-- | builtin_exit.asm | 17 |
1 files changed, 17 insertions, 0 deletions
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 |