Skip to content

Instantly share code, notes, and snippets.

@debrouxl
debrouxl / diceware.c
Last active March 3, 2024 15:15
A slightly faster and smaller version of Matt Whitlock's TI-68k/AMS Bitcoin diceware C+ASM program
/*
* This work is dedicated to the public domain. The statements in the
* Creative Commons Zero 1.0 Universal Public Domain Dedication apply.
* https://creativecommons.org/publicdomain/zero/1.0/
*
* Original author: Matt Whitlock, http://www.mattwhitlock.com/diceware/diceware.c
*
* Modified by Lionel Debroux:
* - build with GCC4TI, which has stdint.h;
* - manually unroll several short loops, for more speed without meaningful size impact;