I needed a demo program for the FPGA-Elf that was at least a little more interesting than simply counting, so I wrote a dice program. When you press the input button, it simulates rolling a pair of six-sided dice. Perfect for playing board games. The program is 49 bytes long, so it is somewhat tedious to toggle in, but not completely awful. It’s almost certainly possible to do it in fewer bytes, but I’m not going to try to optimize it right now.
For anyone with an Elf that cares to try it, the code (starting at address zero) is:
F8 00 B1 B2 B3 F8 80 A1 F8 81 A2 F8 82 A3 F8 60 52 F8 06 53 3F 14 02 FC F0 52 3A 28 F8 60 52 03 FC FF 53 3A 28 F8 06 53 02 E3 F1 E1 51 64 21 30 14