Added: codebase constructs, types and keywords
This commit is contained in:
parent
fc6a5eaac6
commit
d8c55982a7
|
@ -6,6 +6,8 @@ if not exist ".\build" mkdir ".\build"
|
|||
|
||||
pushd .\build
|
||||
|
||||
cl ..\src\main.c /Feapp.exe /nologo
|
||||
set links= kernel32.lib
|
||||
|
||||
cl ..\src\eightysix.c /Feeightysix.exe /nologo /link %links%
|
||||
|
||||
popd .\build
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
Tasks
|
||||
- [ ] finish the 'simple' arena implementation.
|
||||
- [ ] arena_alloc
|
||||
- [ ] arena_release
|
||||
- [ ] String8 implementation
|
||||
- [ ] String8Node and String8List.
|
||||
- [ ] push node
|
||||
- [ ] list join
|
||||
- [ ] Convert cstring to String8.
|
||||
- [ ] Convert String8 to cstring.
|
||||
- [ ] Read/Write to file.
|
||||
- [ ] Create CLI output.
|
||||
- [ ] Testcases?
|
|
@ -0,0 +1,23 @@
|
|||
j
|
||||
//= rhjr: [h]
|
||||
|
||||
#include "eightysix.h"
|
||||
#include "win32_platform.h"
|
||||
|
||||
//= rhjr: [c]
|
||||
|
||||
#include "win32_platform.c"
|
||||
|
||||
u8 backing_buffer[2048];
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
Arena arena = {0};
|
||||
arena.backing_buffer = &backing_buffer[0];
|
||||
arena.offset = 0;
|
||||
arena.size = 2048;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
#ifndef EIGHTYSIX_CORE_H
|
||||
#define EIGHTYSIX_CORE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
//= rhjr: types
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
typedef int8_t i8;
|
||||
typedef int16_t i16;
|
||||
typedef int32_t i32;
|
||||
typedef int64_t i64;
|
||||
|
||||
typedef uint8_t b8;
|
||||
typedef uint16_t b16;
|
||||
typedef uint32_t b32;
|
||||
typedef uint64_t b64;
|
||||
|
||||
#define internal static
|
||||
#define global static
|
||||
|
||||
typedef struct String8
|
||||
{
|
||||
u8* contents;
|
||||
i32 length;
|
||||
}
|
||||
String8;
|
||||
|
||||
//= rhjr: allocator
|
||||
|
||||
typedef struct Arena
|
||||
{
|
||||
u8 *backing_buffer;
|
||||
i32 offset;
|
||||
i32 size;
|
||||
}
|
||||
Arena;
|
||||
|
||||
//= rhjr: instructions.
|
||||
// Intel 8086 manual, pg. 4-22
|
||||
|
||||
typedef enum InstrOpcode
|
||||
{
|
||||
InstrOpcode_MOV = 0x22 // 0010 0010
|
||||
}
|
||||
InstrOpcode;
|
||||
|
||||
#endif // EIGHTYSIX_CORE_H
|
|
@ -1,5 +0,0 @@
|
|||
int
|
||||
main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
String8 *
|
||||
platform_write_file()
|
||||
{
|
||||
String8 *result;
|
||||
|
||||
return result;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef WIN32_PLATFORM_H
|
||||
#define WIN32_PLATFORM_H
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
internal String8 * platform_write_file(Arena *arena);
|
||||
|
||||
#endif // WIN32_PLATFORM_H
|
Loading…
Reference in New Issue
Block a user