kvisc/ka/crt/crt.k

59 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

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:27:13 +02:00
; See the LICENSE file in the project root for more information.
;
2019-07-24 16:52:26 +02:00
; Limits
2019-05-30 12:27:13 +02:00
;
2019-07-24 16:52:26 +02:00
2019-08-21 18:47:03 +02:00
#define CHAR_MIN 0x80
#define SHRT_MIN 0x8000
#define INT_MIN 0x80000000
#define LONG_MIN 0x8000000000000000
2019-07-24 16:52:26 +02:00
2019-08-21 18:47:03 +02:00
#define XCHAR_MIN 0xFFFFFFFFFFFFFF80
#define XSHRT_MIN 0xFFFFFFFFFFFF8000
#define XINT_MIN 0xFFFFFFFF80000000
2019-07-24 16:52:26 +02:00
2019-08-21 18:47:03 +02:00
#define CHAR_MAX 0x7F
#define SHRT_MAX 0x7FFF
#define INT_MAX 0x7FFFFFFF
#define LONG_MAX 0x7FFFFFFFFFFFFFFF
2019-07-24 16:52:26 +02:00
2019-08-21 18:47:03 +02:00
#define BYTE_MAX 0xFF
#define WORD_MAX 0xFFFF
#define LWORD_MAX 0xFFFFFFFF
#define QWORD_MAX 0xFFFFFFFFFFFFFFFF
2019-07-24 16:52:26 +02:00
2019-08-21 18:47:03 +02:00
#define FNAME_MAX 0x80
#define FILE_MAXSZ 0x8000
#define STRLEN_MAX 0x7AFFFFFF
2019-07-24 16:52:26 +02:00
;
; Magic numbers
;
2019-08-21 18:47:03 +02:00
#define PRN_CLEAR 0x8BF00001
#define PRN_FLUSH 0x8BF00002
2019-07-24 16:52:26 +02:00
;
; CRT librairies
;
2019-08-21 18:47:03 +02:00
#include "crt/sys.k"
#include "crt/str.k"
#include "crt/mem.k"
#include "crt/time.k"
2019-08-14 20:23:05 +02:00
2019-08-21 18:47:03 +02:00
#include "crt/fmt/ltostr.k"
#include "crt/fmt/strtol.k"
#include "crt/fmt/doprnt.k"
#include "crt/fmt/printf.k"
2019-08-21 16:57:32 +02:00
exit:
2019-09-07 16:45:03 +02:00
mov eax, Sys.Exit
2019-08-21 16:57:32 +02:00
trap 0
2019-07-22 14:41:50 +02:00
abort:
crash