summaryrefslogtreecommitdiffstats
path: root/lib/libjove/syscall/debug_putc.c
blob: 2d68ee1a4a702ba41a082dcb94549b7156731f33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "jove/syscall.h"
#include "jove/jove.h"
#include <kernel/syscall.h>

void
_syscall_debug_putc(char c)
{
    *((char*)_syscall_message_ptr) = c;
    register uint64_t box  asm ("rdi") = _syscall_message_box;
    register uint64_t call asm ("rsi") = SYSCALL_DEBUG_PUTC;

    __asm__ volatile("syscall"::: "memory");
}