Skip to content

Instantly share code, notes, and snippets.

@tomaes
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaes/f89a1a0c3feb395ba907 to your computer and use it in GitHub Desktop.
Save tomaes/f89a1a0c3feb395ba907 to your computer and use it in GitHub Desktop.
61 bytes to visually bubble sort the contents of your screen; yes, this takes a while. ("speed optimised" version (r=.:fori=4^5to2022-r:r=r+1: ...) would take 74 bytes of memory) (c64)
0 fori=4^5to2022:a=peek(i):b=peek(i+1):poke-(a>b)+i,a:pokei+1+(a>b),b:next:run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment