2011-05-29 13:47:41 UTC
previous
next
$ ->
# term = new Terminal("terminal")
ctx = $('#terminal').get(0).getContext("2d")
ctx.font = "15px monospace"
ctx.fillStyle = "#ffffff"
ctx.fillText("testtest", 100, 100)
$(document).keydown (ev) =>
ctx.fillText("blah: #{ev.which}", 200, 200)
###
class Terminal
constructor: (@id) ->
@cv = $('#' + @id)
$(document).keydown((ev) => @keydown(ev))
@ctx = @cv.get(0).getContext("2d")
@ctx.font = "15px monospace"
@ctx.fillStyle = "#ffffff"
@ctx.fillText("testtest", 100, 100);
keydown: (ev) ->
@ctx.fillText("key: #{ev.which}", 150, 150);
###
class VM
start_process: (bitcode) ->
class VMProcess
constructor: (bitcode) ->
@instructions = new Array()
parse_bitcode: (bitcode) ->