initial commit

This commit is contained in:
Redo
2020-05-19 02:22:30 -05:00
commit 1cdffd4e01
203 changed files with 108753 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
return function(gate, argv)
if argv[1]=="\\:" then argv[1] = ";" end
local keycode = keyboard_keyToCode[argv[1]] or keyboard_keyToCode["invalid"]
local status = keyboard_strToBool[argv[2]]
local code = keycode+(status and 128 or 0)
local function queueBit(bit)
table.insert(gate.queueBits, 1, bit)
end
queueBit(true)
for bitidx = 1, 8 do
local val = bit.band(code, 0x80)~=0
queueBit(val)
code = bit.lshift(code, 1)
end
queueBit(false)
gate:queue(0)
end