Check out this #javascript implementation of the Apollo Guidance Computer http://www.svtsim.com/moonjs/agc.html