Adding New Opcodes

Some ROM sequencers have several commands that can be used to do conditional and unconditional jumps, subroutine calls, loops and so forth. In order to simplify the creation of microcode for these sequencers, the ROM preprocessor allows these commands to be defined as opcodes. The first step is to define a field as an opcode field. The following is an example of an opcode field.
opfld: field width=12,position=10,type=opcode
Next, each new opcode must be defined using an equate instruction, as illustrated below.
jump: equ 1

cjump: equ 2

return: equ 3

The values assigned to these opcodes must, of course, be meaningful to the microcode sequencer. Now, the defined opcodes may be used in place of the "word" opcode to specify a "word" statement. However when the "word" opcode is used, the opcode field will be assigned its default value. When one of the new opcodes is used, the opcode field will be assigned the value of the new opcode.

For claritly, defined symbols may be used in the place of the "word" opcode, even if no opcode field has been defined. In this case, the values assigned to the opcodes are immaterial.