Skip to content

Commit

Permalink
Add missing constants
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Sep 29, 2023
1 parent 699eac2 commit 8f2e54c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ncc/include/stdint.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
#define uint64_t u64

// Unsigned integer ranges
#define UINT8_MAX 0xFF
#define UINT16_MAX 0xFFFF
#define UINT32_MAX 0xFFFFFFFF
#define UINT64_MAX 0xFFFFFFFFFFFFFFFF

// Signed integer ranges
#define INT8_MIN 0x80
#define INT8_MAX 0x7F
#define INT16_MIN 0x8000
#define INT16_MAX 0x7FFF
#define INT32_MIN 0x80000000
#define INT32_MAX 0x7FFFFFFF
#define INT64_MIN 0x8000000000000000
#define INT64_MAX 0x7FFFFFFFFFFFFFFF

#endif
2 changes: 2 additions & 0 deletions ncc/include/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <assert.h>

#define EOF -1

int puts(char* str)
{
asm (str) -> void { syscall print_str; };
Expand Down

0 comments on commit 8f2e54c

Please sign in to comment.