Skip to content

Instantly share code, notes, and snippets.

@andkerosine
Created September 9, 2012 00:48
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 andkerosine/3681686 to your computer and use it in GitHub Desktop.
Save andkerosine/3681686 to your computer and use it in GitHub Desktop.
push 3
push 0
dup
inum
load
0:
swap
push 3
mul
swap
push 1
sub
dup
push 1
swap
sub
jn 0
push 1
sub
swap
store
push 0
jump 1
1:
dup
push 0
load
dup
mul
sub
jn 2
pop
exit
2:
dup
push 0
load
mod
copy 1
push 0
load
div
call 3
slide 2
ochr
push 1
add
dup
push 0
load
mod
jz 6
jump 1
3:
copy 1
copy 1
add
jz 4
copy 1
copy 1
push 3
mod
swap
push 3
mod
copy 1
copy 1
add
copy 2
copy 2
mul
add
push 3
sub
jz 5
pop
pop
push 3
div
swap
push 3
div
swap
jump 3
4:
push 35
ret
5:
slide 2
push 32
ret
6:
push 10
ochr
jump 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment