Skip to content

Commit

Permalink
always use opcode,data pairs comment
Browse files Browse the repository at this point in the history
Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov committed Oct 5, 2023
1 parent 2901564 commit 8c4f9d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/opcodes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export const opcodes = {
END: 0xFF,
};

// Params list length can be 0 or 1,
// in case of 0 params [NOP, NOTA, NOTB, RET, END] the compiler will pad the
// memory with a 0, to align with [opcode, data] pairs.
export const opcodesParams = {
[opcodes.NOP]: 0,
[opcodes.LOADA]: 1,
Expand Down

0 comments on commit 8c4f9d3

Please sign in to comment.