Skip to content

Instantly share code, notes, and snippets.

View RiscInside's full-sized avatar

Iurii Zamiatin RiscInside

View GitHub Profile
@RiscInside
RiscInside / Tiny.lean
Last active December 19, 2022 11:46
Tiny lambda calculus extended with Fix combinators, unit, pair, and sum values
-- One argument operations with strict evaluation strategy
inductive UnOp : Type :=
| ufst : UnOp -- first element of the pair
| usnd : UnOp -- second element of the pair
| umkl : UnOp -- left constructor of either type
| umkr : UnOp -- right constructor of either type
deriving DecidableEq
open UnOp
/*...*/
section .data
global syscall_count
syscall_count equ ((syscall_table.end - syscall_table) / 8)
/*...*/
extern syscall_execute_bytecode
dq syscall_execute_bytecode ;44
#include <amd64/gdt.h>
#include <amd64/tss.h>
#include <memory/bdalloc.h>
#include <smp/percpu.h>
#define GDT_ENTRIES 7
struct gdt {
uint64_t entries[GDT_ENTRIES];
struct gdt_pointer {