Skip to content

Instantly share code, notes, and snippets.

View NunoLava1998's full-sized avatar

NunoLava1998 NunoLava1998

View GitHub Profile
// Beacuse we don't want to include any files, we'll have
// to predefine it here, then actually define it.
size_t strlen(const char* str);
void update_videoptr(void);
void newline(void);
void backspace(void);
void restrictions_tty(void);
void writec(char c, uint8_t bc, uint8_t fc);
// Beacuse we don't want to include any files, we'll have
// to predefine it here, then actually define it.
size_t strlen(const char* str);
void update_videoptr(void);
void newline(void);
void restrictions_tty(char c);
void writec(char c, uint8_t bc, uint8_t fc);
void writes(const char* c, uint8_t bc, uint8_t fc);
#include "../defs.h"
void run(void) {
int* val = (int *)malloc(128);
if (val == 0) {
if ((const char*)command == (const char*)"ver") {
y++;
x = 0;
terminal_writestring("Dixium OS v1.1 alpha", WHITE, BLACK, x, y);
y++;
#include "../defs.h"
void* memmove(void* dstptr, const void* srcptr, size_t size) {
unsigned char* dst = (unsigned char*) dstptr;
const unsigned char* src = (const unsigned char*) srcptr;
if (dst < src) {
for (size_t i = 0; i < size; i++)
dst[i] = src[i];
} else {
for (size_t i = size; i != 0; i--)
SMM: enter
EAX=00000001 EBX=0000000b ECX=02000000 EDX=02000628
ESI=00000000 EDI=02000000 EBP=07fab7b0 ESP=00006d2c
EIP=000ee54b EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
CS =0008 00000000 ffffffff 00cf9b00 DPL=0 CS32 [-RA]
SS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
DS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
FS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
GS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA]
myos.bin: file format elf32-i386
Disassembly of section .text:
00100000 <_start-0xc>:
100000: 02 b0 ad 1b 03 00 add 0x31bad(%eax),%dh
100006: 00 00 add %al,(%eax)
100008: fb sti