Skip to content

Instantly share code, notes, and snippets.

@reidrac
Created February 28, 2015 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reidrac/c7b3184e5921f7a1a491 to your computer and use it in GitHub Desktop.
Save reidrac/c7b3184e5921f7a1a491 to your computer and use it in GitHub Desktop.
#include "d64.h"
int
main()
{
uint8_t r;
clrscr();
while(1)
{
// module is slow, using AND instead
r = rand() & 3;
putch(176 + (r > 2 ? 1 : r));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment