Stackmachine is a project mainly written in Java, it's free.
Interpreted Stack machine
Stack Machine
commands:
push <int|label> - push <1> on stack
pop - take arg from stack, save to <1>
dup - take arg from stack, push S[0] and S[0] on stack
add - take 2 args from stack, push S[0]+S[1] on stack
sub - take 2 args from stack, push S[0]-S[1] on stack
div - take 2 args from stack, push floor(S[0]/S[1]) on stack
mul - take 2 args from stack, push S[0]*S[1] on stack
goto <int|label> - jump to <1>
ifeq <int|label> - take 2 args from stack, compare them, if 1==2, jump to <1>
ifgr <int|label> - take 2 args from stack, compare them, if 1>2, jump to <1>
call <int|name|label> - call predefined procedure or go to
function