Simulate a (gravity-based) billiard-ball-type computer
JavaScript (392 423)

Assumes machine is set in a variable called m, then alerts the final output.

l=m.split(q='\n');o='';for(r=Array(z=l[i=0].length);i&lt;l.length;i++){L=l[i];n=Array(z);for(c=0;c&lt;z;n[c]=N,r[c++]=R){C=L[c];N=~~n[c];R=~~r[c];if(C&gt;'`'){N+=x=~~prompt(C);R+=x;o+=C+': '+x+q}else if(C=='\\'||C=='/'){for(d=c+(g=C=='/'?-1:1);L[d]=='_';r[d]+=R,d+=g);if(L[d]&gt;'@'&amp;L[d]&lt;'[')r[d]+=r[c];n[d]=~~n[d]+R}else if(C&lt;'2')N+=R+=~~C;else if(C!='_')o+=C+': '+R+q}for(c=0;c&lt;z;c++)if(L[c]=='_')n[c]+=(r[c]%2)?0:r[c]&gt;0;r=n}alert(o)


Sample source (runs adder machine, see history for less golfed sources): http://jsfiddle.net/96yLj/12/

Spoilers:


   - r tracks the # of balls across current row, n tracks # of balls across next row.
 - Algorithm: process each row character by character, but process _'s last.
 - Algorithm: \ -> follow _ and increase r until non-_. Same for / but in reverse direction.  At the end increase n for gravity pulling balls down. g holds direction.
 - if(L[d]&gt;'@'&amp;L[d]&lt;'[')r[d]+=r[c]; is for the bug mentioned in Edit 1.  The reason we can't just say r[d]+=r[c]; is because \_/ will double-count balls when processing /
 - else if(C&lt;'2') handles both cases '1' and ' ', which ~~C turns into 1 and 0, respectively.




Edit 1: Fix bug with ball running over _ not included in A for sample code.