Skip to content

Instantly share code, notes, and snippets.

Created October 18, 2010 21:20
Show Gist options
  • Save anonymous/633086 to your computer and use it in GitHub Desktop.
Save anonymous/633086 to your computer and use it in GitHub Desktop.
set 1
sta result
next, lda stdin
brz done
brp skip
neg
skip, sta value
mlt result
sta result
lda value
dec
brp skip
br next
done, lda result
sta stdout
hlt
value, noop
result,noop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment