Hello, World! in Hack VM
Example for versions
Miller's Hack VM (JavaScript),
Miller's Hack VM (Python)
This program works in a rather evident way — ASCII-codes of characters of the message are calculated one-by-one and printed out. The only bit of hack used is processing of ‘l’ character — once its ASCII-code is calculated, it is tripled in the stack (using 0^
command), and printed twice immediately and once later.
89*P 45*99*+P 39*99*+0^0^PP 56*99*+P 29+4*P 48*P 92+8*1-P 56*99*+0^P 3+P P 25*0^*P 56*3+P
Comments
]]>blog comments powered by Disqus
]]>