Skip to content

Instantly share code, notes, and snippets.

@hansent
Forked from anonymous/gist:633086
Created October 18, 2010 23:29
Show Gist options
  • Save hansent/633290 to your computer and use it in GitHub Desktop.
Save hansent/633290 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