2019-05-30 12:44:56 +02:00
|
|
|
; The OS/K Team licenses this file to you under the MIT license.
|
2019-05-30 12:19:38 +02:00
|
|
|
; See the LICENSE file in the project root for more information.
|
|
|
|
|
|
|
|
;
|
|
|
|
; Entry point
|
|
|
|
;
|
2019-05-30 12:27:13 +02:00
|
|
|
_start:
|
2019-05-30 12:19:38 +02:00
|
|
|
mov rbp, 0x200000
|
|
|
|
mov rsp, rbp
|
|
|
|
|
2019-05-30 12:27:13 +02:00
|
|
|
call main
|
2019-05-30 12:19:38 +02:00
|
|
|
|
2019-05-30 12:27:13 +02:00
|
|
|
.1:
|
2019-05-30 12:19:38 +02:00
|
|
|
stop
|
2019-05-30 12:27:13 +02:00
|
|
|
jmp .1
|
2019-05-30 12:19:38 +02:00
|
|
|
|
2019-06-13 17:13:59 +02:00
|
|
|
;
|
2019-06-13 22:20:35 +02:00
|
|
|
; Some definitions
|
2019-06-13 17:13:59 +02:00
|
|
|
;
|
2019-06-13 22:20:35 +02:00
|
|
|
|
|
|
|
CHAR_MIN := 0x80
|
|
|
|
SHRT_MIN := 0x8000
|
|
|
|
INT_MIN := 0x80000000
|
|
|
|
LONG_MIN := 0x8000000000000000
|
|
|
|
|
|
|
|
XCHAR_MIN := 0xFFFFFFFFFFFFFF80
|
|
|
|
XSHRT_MIN := 0xFFFFFFFFFFFF8000
|
|
|
|
XINT_MIN := 0xFFFFFFFF80000000
|
|
|
|
|
2019-06-13 17:13:59 +02:00
|
|
|
CHAR_MAX := 0x7F
|
2019-06-13 22:20:35 +02:00
|
|
|
SHRT_MAX := 0x7FFF
|
|
|
|
INT_MAX := 0x7FFFFFFF
|
|
|
|
LONG_MAX := 0x7FFFFFFFFFFFFFFF
|
|
|
|
|
|
|
|
BYTE_MAX := 0xFF
|
|
|
|
WORD_MAX := 0xFFFF
|
|
|
|
LWORD_MAX := 0xFFFFFFFF
|
|
|
|
QWORD_MAX := 0xFFFFFFFFFFFFFFFF
|
|
|
|
|
|
|
|
STRLEN_MAX := 0xFFFFFFFF
|
2019-06-13 17:13:59 +02:00
|
|
|
|
2019-05-30 18:31:50 +02:00
|
|
|
;
|
|
|
|
; Include librairies
|
|
|
|
;
|
2019-06-14 16:47:01 +02:00
|
|
|
include "crt/err/errno.k"
|
|
|
|
include "crt/fmt/format.k"
|
|
|
|
include "crt/prn/print.k"
|
|
|
|
include "crt/str/string.k"
|
|
|
|
|
|
|
|
;
|
|
|
|
; Include drivers
|
|
|
|
;
|
|
|
|
include "sys/memdev.k"
|
2019-05-30 18:31:50 +02:00
|
|
|
|
|
|
|
;
|
|
|
|
; Disk Operating System
|
|
|
|
;
|
|
|
|
include "main.k"
|
2019-05-30 12:19:38 +02:00
|
|
|
|