mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
vm
This commit is contained in:
parent
e1299836de
commit
01c19f5b49
@ -1,9 +0,0 @@
|
||||
; The OS/K Team licenses this file to you under the MIT license.
|
||||
; See the LICENSE file in the project root for more information.
|
||||
|
||||
;
|
||||
; bool isdigit(int c)
|
||||
;
|
||||
isdigit:
|
||||
ret
|
||||
|
@ -12,7 +12,7 @@ trap0_handler:
|
||||
call RFS.LoadReg, r14, $rax
|
||||
call RFS.LoadArgs, r14
|
||||
|
||||
b.z rax, zero, .handle_Shutdown
|
||||
jmp.axz .handle_Shutdown
|
||||
b.z rax, Sys.Exit, .handle_Exit
|
||||
b.z rax, Sys.FindNext, .handle_FindNext
|
||||
b.z rax, Sys.FindFirst, .handle_FindFirst
|
||||
@ -49,8 +49,7 @@ trap0_handler:
|
||||
; Assume that COMMAND.COM being
|
||||
; less then 4KB means something
|
||||
; went wrong
|
||||
cmp rax, 0x1000
|
||||
crash.b
|
||||
b.l rax, 0x1000, abort
|
||||
|
||||
; Close the handle
|
||||
call DISK.CloseFile, rax
|
||||
|
@ -122,47 +122,47 @@ main:
|
||||
|
||||
.builtin_cls = "cls"
|
||||
call strcmp, argv0, .builtin_cls
|
||||
b.z rax, zero, .handle_CLS
|
||||
jmp.axz .handle_CLS
|
||||
|
||||
.builtin_date = "date"
|
||||
call strcmp, argv0, .builtin_date
|
||||
b.z rax, zero, .handle_DATE
|
||||
jmp.axz .handle_DATE
|
||||
|
||||
.builtin_dir = "dir"
|
||||
call strcmp, argv0, .builtin_dir
|
||||
b.z rax, zero, .handle_DIR
|
||||
jmp.axz .handle_DIR
|
||||
|
||||
.builtin_dump = "dump"
|
||||
call strcmp, argv0, .builtin_dump
|
||||
b.z rax, zero, .handle_DUMP
|
||||
jmp.axz .handle_DUMP
|
||||
|
||||
.builtin_echo = "echo"
|
||||
call strcmp, argv0, .builtin_echo
|
||||
b.z rax, zero, .handle_ECHO
|
||||
jmp.axz .handle_ECHO
|
||||
|
||||
.builtin_exit = "exit"
|
||||
call strcmp, argv0, .builtin_exit
|
||||
b.z rax, zero, .handle_EXIT
|
||||
jmp.axz .handle_EXIT
|
||||
|
||||
.builtin_help = "help"
|
||||
call strcmp, argv0, .builtin_help
|
||||
b.z rax, zero, .handle_HELP
|
||||
jmp.axz .handle_HELP
|
||||
|
||||
.builtin_halt = "halt"
|
||||
call strcmp, argv0, .builtin_halt
|
||||
b.z rax, zero, .handle_HALT
|
||||
jmp.axz .handle_HALT
|
||||
|
||||
.builtin_print = "print"
|
||||
call strcmp, argv0, .builtin_print
|
||||
b.z rax, zero, .handle_PRINT
|
||||
jmp.axz .handle_PRINT
|
||||
|
||||
.builtin_time = "time"
|
||||
call strcmp, argv0, .builtin_time
|
||||
b.z rax, zero, .handle_TIME
|
||||
jmp.axz .handle_TIME
|
||||
|
||||
.builtin_ver = "ver"
|
||||
call strcmp, argv0, .builtin_ver
|
||||
b.z rax, zero, .handle_VER
|
||||
jmp.axz .handle_VER
|
||||
|
||||
jmp .command_not_found
|
||||
|
||||
@ -199,7 +199,7 @@ main:
|
||||
|
||||
.handle_ECHO:
|
||||
mov rdx, q[argv1pos]
|
||||
b.z rdx, 0, .echo.end
|
||||
jmp.dxz .echo.end
|
||||
|
||||
mov rcx, argbuf.size
|
||||
prns.rep.nz rdx
|
||||
@ -292,7 +292,7 @@ main:
|
||||
.helpmsg.halt = " HALT Put processor in halt mode\n"
|
||||
.helpmsg.print = " PRINT Display contents of text file\n"
|
||||
.helpmsg.time = " TIME Display current time of day\n"
|
||||
.helpmsg.ver = " VER Display current COMMAND.COM and DOS kernel versions\n"
|
||||
.helpmsg.ver = " VER Display current COMMAND.COM version\n"
|
||||
|
||||
.command_not_found:
|
||||
call print, argv0
|
||||
|
Loading…
Reference in New Issue
Block a user