A very simple “assembler”. Really it’s just a collection of routines to generate binary order codes for debugging.

There’s also a simple “disassembler” for Wirth RISC binary machine codes. Currently only the crudest decoding is performed on a single instruction (no extra information is used, in particular symbols are not supported.)

oberon.assembler.ops = {'Add': 8, 'And': 4, 'Ann': 5, 'Asr': 2, 'Div': 11, 'Fad': 12, 'Fdv': 15, 'Fml': 14, 'Fsb': 13, 'Ior': 6, 'Lsl': 1, 'Mov': 0, 'Mul': 10, 'Ror': 3, 'Sub': 9, 'Xor': 7}

Operation names mapped to their values in instructions.