Skip to content

Instantly share code, notes, and snippets.

View adiee5's full-sized avatar
😜
Hail EggMan

adiee5

😜
Hail EggMan
View GitHub Profile
@adiee5
adiee5 / fnv.asm
Last active December 14, 2025 22:40
6502 implementation of FNV-1a hashing algorithm, ca65 assembler
; 6502 implementation of the FNV-1a hash algorithm. It calculates a 32 bit hash and also casts the hash into a 16 bit value stored in CPU regs upon returning
.export fnv
; CONFIGURATION:
; feel free to modify bellow symbols on a way that suit your needs
; ----------------------------------------------------------------------
; two 32 bit variables, preferably in Zero Page in order to improve execution speed
@adiee5
adiee5 / queue.p8
Last active June 30, 2024 10:52
An example of a queue in prog8
; Simple library, that implements a queue
; The code bellow expects the user to define a `queue_cfg` block alongside some values. See queue_demo.p8 for more info
queue{
uword @zp fi
uword @zp fo
ubyte state=0
const ubyte initialised=1
@adiee5
adiee5 / obj.p8
Created April 13, 2024 21:43
An example of a object oriented programming in Prog8 language
%import textio
%import lk_mem
%zeropage basicsafe
%option no_sysinit
main{
sub start(){
;sys.exit(0)
uword andrzej=human.new("andrzej","marecki")
uword poet=human.new("czes£aw","mi£osz")