Skip to content

Instantly share code, notes, and snippets.

View ascpial's full-sized avatar

ascpial

  • France
  • 13:14 (UTC +01:00)
View GitHub Profile
@ascpial
ascpial / btree.lua
Last active February 9, 2025 21:35
A very basic B-Tree implementation in lua
-- This is a simple implementation of BTree Currently including only the hard part: insertions and deletions
--
-- This implementation supports using custom comparison functions (this allows to include more data in the keys for example).
-- I also designed this implementation to allow easy support for on-disk storage.
--
-- Copyright © 2025 ascpial
-- This project is licensed under the [MIT License](https://mit-license.org/).
--- @class BTreeNode
@ascpial
ascpial / factorial.asm
Created December 14, 2021 08:04
This program do a factorial in assembler
MOV R12, #1 //resultat
MOV R0, #0 //iteration
INP R2, 2
boucle1:
CMP R0, R2 //max
BEQ finboucle1
MOV R1, R0 //iteration mutliplication
MOV R11, R12
boucle2:
CMP R1, #0