This repository has been archived on 2024-10-03. You can view files and clone it, but cannot push or open issues or pull requests.
PlutOS-Archive/commands.asm
2024-09-28 22:11:50 +02:00

50 lines
No EOL
1.8 KiB
NASM

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; PlutOS ;
; Copyright (C) 2024 Patrick_Pluto ;
; ;
; This program is free software: you can redistribute it and/or modify ;
; it under the terms of the GNU General Public License as published by ;
; the Free Software Foundation, either version 3 of the License, or ;
; (at your option) any later version. ;
; ;
; This program is distributed in the hope that it will be useful, ;
; but WITHOUT ANY WARRANTY; without even the implied warranty of ;
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;
; GNU General Public License for more details. ;
; ;
; You should have received a copy of the GNU General Public License ;
; along with this program. If not, see <https://www.gnu.org/licenses/>.;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
process_command:
mov si, buffer
mov di, cmd_cls
call compare_str
je clear_screen
mov si, buffer
mov di, cmd_hlp
call compare_str
je help_command
mov si, unknown_msg
call print_str
mov si, buffer
call print_str
mov al, 0x0A
call print_char
mov al, 0x0D
call print_char
ret
help_command:
mov si, help_txt
call print_str
ret
cmd_cls: db "clear", 0
cmd_hlp: db "help", 0
help_txt: db "help - shows this menu", 0x0D, 0x0A, "clear - clears the screen", 0x0D, 0x0A, 0