BCI-assembler/assembler/test/test_012_opcodes.py

15 lines
261 B
Python
Raw Normal View History

2018-10-09 09:44:00 +00:00
from assembler.opcodes import make_opcodes
def test_make_opcodes():
mnemonics = ["ldi", "ld", "st", "add", "mul"]
opcodes = make_opcodes(mnemonics)
assert opcodes == {"ldi": 32704
, "ld" : 16320
, "st": 49088
, "add": 8128
, "mul": 24512
}