Compare commits

..

No commits in common. "872e6f33928d9247bf9901a624611fb6f36190bf" and "e9705f75793063e2a4da07eda2f16c304bb1239d" have entirely different histories.

8 changed files with 7 additions and 40 deletions

View File

@ -1 +0,0 @@
BasedOnStyle: Google

1
.gitignore vendored
View File

@ -1,2 +1 @@
builddbg/
compile_commands.json

View File

@ -1,12 +1,6 @@
add_executable(zion
debug/debug.cpp
zion.cpp)
target_include_directories(zion
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
# -c -- Don't run the linker.
# -nostdlib -- Don't include the standard library.
# -mabi=sysv -- Explicitly specify the ABI since we will rely on it.

View File

@ -1,6 +1,6 @@
# Needs to be copied into the EFI partition of the drive.
TIMEOUT=0
TIMEOUT=10
:AcadiaOS

View File

@ -1,13 +0,0 @@
#pragma once
#include <stdint.h>
static inline uint8_t inb(uint16_t port) {
uint8_t result;
asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port));
return result;
}
static inline void outb(uint16_t port, uint8_t value) {
asm volatile("outb %0, %1" ::"a"(value), "Nd"(port));
}

View File

@ -1,13 +0,0 @@
#include "debug/debug.h"
#include "common/port.h"
#define COM1 0x3f8
void dbgln(const char* str) {
while (*str != 0) {
outb(COM1, *str);
str++;
}
outb(COM1, '\n');
}

View File

@ -1,3 +0,0 @@
#pragma once
void dbgln(const char *str);

View File

@ -1,9 +1,13 @@
#include <stdint.h>
#include "debug/debug.h"
#define COM1 0x3f8
void outb(uint16_t port, uint8_t value) {
asm volatile("outb %0, %1" ::"a"(value), "Nd"(port));
}
extern "C" void zion() {
dbgln("Hello World!");
outb(COM1, 'a');
while (1)
;