2019-07-09 19:51:03 +02:00
|
|
|
; The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
; See the LICENSE file in the project root for more information.
|
|
|
|
|
2019-07-13 12:38:03 +02:00
|
|
|
;
|
2019-07-24 16:52:26 +02:00
|
|
|
; SHUTDOWN syscall
|
2019-07-13 12:38:03 +02:00
|
|
|
;
|
2019-07-24 16:52:26 +02:00
|
|
|
; End virtual machine
|
2019-07-13 12:38:03 +02:00
|
|
|
;
|
2019-07-24 16:52:26 +02:00
|
|
|
Sys.Shutdown := 0x00
|
2019-07-13 12:38:03 +02:00
|
|
|
|
|
|
|
;
|
2019-07-24 16:52:26 +02:00
|
|
|
; EXIT syscall
|
2019-07-13 12:38:03 +02:00
|
|
|
;
|
2019-07-24 16:52:26 +02:00
|
|
|
; Return to COMMAND.COM
|
2019-07-13 12:38:03 +02:00
|
|
|
;
|
2019-07-24 16:52:26 +02:00
|
|
|
Sys.Exit := 0x01
|
2019-07-13 12:38:03 +02:00
|
|
|
|
2019-07-10 12:26:15 +02:00
|
|
|
; FIND syscalls
|
|
|
|
;
|
|
|
|
; Find file on disk
|
|
|
|
;
|
|
|
|
; IN
|
|
|
|
; ax0 = address of name buffer
|
|
|
|
; ax1 = size of name buffer
|
|
|
|
;
|
|
|
|
; OUT
|
|
|
|
; rax = # of bytes written in name buffer
|
|
|
|
; rdx = size of file
|
|
|
|
;
|
|
|
|
;
|
|
|
|
Sys.FindFirst := 0x20
|
|
|
|
Sys.FindNext := 0x21
|
|
|
|
|
2019-07-10 17:17:45 +02:00
|
|
|
;
|
2019-08-05 15:55:46 +02:00
|
|
|
; OPEN syscall
|
2019-07-10 17:17:45 +02:00
|
|
|
;
|
2019-07-13 12:38:03 +02:00
|
|
|
; IN
|
|
|
|
; ax0 = name string
|
2019-07-10 17:17:45 +02:00
|
|
|
;
|
2019-07-13 12:38:03 +02:00
|
|
|
; OUT
|
|
|
|
; rax = handle of file, or <0 if couldn't open
|
|
|
|
;
|
|
|
|
Sys.OpenFile := 0x30
|
2019-08-05 15:55:46 +02:00
|
|
|
|
|
|
|
;
|
|
|
|
; CREATE syscall
|
|
|
|
;
|
|
|
|
; IN
|
|
|
|
; ax0 = name string
|
|
|
|
;
|
|
|
|
; OUT
|
|
|
|
; rax = 0 on success, or <0 if couldn't open
|
|
|
|
;
|
2019-07-13 12:38:03 +02:00
|
|
|
Sys.CreateFile := 0x31
|
2019-07-10 17:17:45 +02:00
|
|
|
|
2019-08-05 15:55:46 +02:00
|
|
|
;
|
|
|
|
; REMOVE syscall
|
|
|
|
;
|
|
|
|
; IN
|
|
|
|
; ax0 = name string
|
|
|
|
;
|
|
|
|
; OUT
|
|
|
|
; rax = 0 on success, or <0 if couldn't open
|
|
|
|
;
|
|
|
|
Sys.RemoveFile := 0x32
|
|
|
|
|
2019-07-10 22:37:59 +02:00
|
|
|
;
|
2019-07-13 12:38:03 +02:00
|
|
|
; CLOSE syscall
|
2019-07-10 22:37:59 +02:00
|
|
|
;
|
2019-07-13 12:38:03 +02:00
|
|
|
; IN
|
|
|
|
; ax0 = file handle
|
2019-07-10 22:37:59 +02:00
|
|
|
;
|
2019-07-13 12:38:03 +02:00
|
|
|
Sys.CloseFile := 0x35
|
|
|
|
|
|
|
|
;
|
|
|
|
; READ syscall
|
|
|
|
;
|
|
|
|
; IN
|
|
|
|
; ax0 = file handle
|
|
|
|
; ax1 = buffer address
|
|
|
|
; ax2 = buffer size
|
|
|
|
;
|
|
|
|
; OUT
|
|
|
|
; rax = number of bytes read, <0 on error
|
|
|
|
;
|
|
|
|
Sys.ReadFile := 0x38
|
2019-07-10 22:37:59 +02:00
|
|
|
|
2019-07-09 19:51:03 +02:00
|
|
|
; Halt mode
|
2019-07-13 12:38:03 +02:00
|
|
|
Sys.EnterHaltMode := 0x999
|
2019-07-09 19:51:03 +02:00
|
|
|
|