Skip to content

Instantly share code, notes, and snippets.

View sprive's full-sized avatar
👾

Scott Prive sprive

👾
View GitHub Profile
@sprive
sprive / tinylog.c
Created September 1, 2022 05:48
tinylog.c, log2 calculation for both FPU and no FPU
/* Simple log2 calculation; on FPU-less platform it will bitshift instead of log2 */
//
// linux/mac:
// clang -fdiagnostics-color=always -g ./tinylog.c -o ./tinylog
// CC65:
// cl65 -t atari ./tinylog.c -o tinylog.xex
// atari800 -nobasic -run ./tinylog.xex
#include<stdio.h>
#include<stdint.h>