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_echo.asm | |
parent | 16ce91dac78f9a522d6b5a5f4b0f651e25635a4f (diff) | |
download | minos-47e691cb0b7a49a797c622b6c79162428358fbe1.tar.gz |
Implement builtin terminal commands
* Reboot
* Exit
* Echo
Diffstat (limited to 'builtin_echo.asm')
-rw-r--r-- | builtin_echo.asm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/builtin_echo.asm b/builtin_echo.asm new file mode 100644 index 0000000..1b4af89 --- /dev/null +++ b/builtin_echo.asm @@ -0,0 +1,20 @@ +%ifndef _BUILTIN_ECHO_ASM +%define _BUILTIN_ECHO_ASM + +builtin_echo: + push bp + mov bp, sp + + mov bx, word [bp + 4] + add bx, 2 + push word [bx] + push .msg_fmt + call printf + add sp, 2 * 2 + + mov sp, bp + pop bp + ret + .msg_fmt db '%s\n', 0 + +%endif |