add .space directive

This commit is contained in:
Redo 2022-11-02 12:43:55 -06:00
parent 7ea1c56362
commit 50b13fec4c

View File

@ -122,6 +122,7 @@ local directiveFunctions = {
org = function(state, addr) state.curAddr = decodeNumber(addr) end,
align = function(state, alns) local aln = decodeNumber(alns); if state.curAddr % aln ~= 0 then state.curAddr = state.curAddr + (aln - state.curAddr%aln) end end,
define = true,
space = function(state, amts) local amt = decodeNumber(amts); state.curAddr = state.curAddr + amt; end,
}
local function assembleCode(code, instrs)
local validWords = validWordsFromInstrs(instrs)