Skip to content

Instantly share code, notes, and snippets.

View oriapp's full-sized avatar
🍌
get freaky

R C N oriapp

🍌
get freaky
  • Merlingo
  • Planet Earth
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
import argparse
import ast
import json
import os
from termcolor import colored
from typing import List, Dict
# Define colors for different priorities
COLORS = {
@oriapp
oriapp / stddef.h
Last active June 3, 2024 18:05
Standard Definitions for RorthOS
#ifndef RORTH_STDDEF_H
#define RORTH_STDDEF_H
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <ctype.h>
#include <sys/sysinfo.h>
#include <sys/types.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define NUM_TASKS 4 // number of tasks
// structure to represent a task
typedef struct task {
int id; // task id
int burstTime; // time required to complete the task
@oriapp
oriapp / ata_lba_write.S
Created January 9, 2023 15:55
FAT16 ata lba write
; ata_lba_write - Write a sector to an ATA device using LBA mode
;
; @device: ATA device (0 for primary, 1 for secondary)
; @lba: LBA address of the sector to write
; @buffer: pointer to the buffer containing the data to write
;
; Returns: CF set on error, CF clear on success
global ata_lba_write
@oriapp
oriapp / rr.c
Created January 8, 2023 11:31
(Scheduling Algorithm) Round Robin PoC for my Operating System (v.2)
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define TIME_SLICE 5 // time slice for each task
// structure to represent a task
typedef struct task {
int id; // task id
int burstTime; // time required to complete the task
@oriapp
oriapp / rr.c
Created January 8, 2023 11:12
Round Robin PoC
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define QUANTUM 4 // time slice in milliseconds
// structure to represent a task
typedef struct task {
int id; // task id
int burstTime; // time required to complete the task
@oriapp
oriapp / CGame.c
Last active November 27, 2022 07:57
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <stdbool.h>
#define MIN_CELLS 10
#define MAX_CELLS 25
#define COINS 6
@oriapp
oriapp / bootloader.asm
Created November 14, 2022 20:44
bootloader
ORG 0x7c00
[BITS 16]
CODE_SEG equ gdt_code - gdt_start
DATA_SEG equ gdt_data - gdt_start
jmp short start
nop