This is how an OVERTURE arch compatible spec.isa could look like (not that this architecture really needs this):```
register // color the "register" with default generated color
r0 000
r1 001
r2 010
r3 011
r4 100
r5 101
in 110
out 110
instr 0x0000FF // now all instruction keywords will be pure blue
or 01???000 // In the standard implementation, these 3 bits are not checked at all;
nand 01???001 // this way we can document the exact functionality for each instruction,
nor 01???010 // or it could be useful in some disassembly view functionality
and 01???011 // that could be added to all memory components (like any RAM or SSD)
add 01???100
sub 01???101
nop 11???000
jmp 11???001
jz 11???010
jnz 11???011
jl 11???100
jge 11???101
jg 11???110
jle 11???111
// the remaining field definitions are not needed to implement the base "spec.isa"
alu_op 0xFFFFFF
| ???000
!& ???001
!| ???010
& ???011
- ???100
- ???101
cond 0xFFFFFF
=0 ???010
!=0 ???011
≠0 ???011
<0 ???100
= ???101
≥0 ???101
0 ???110
=<0 ???111
≤0 ???111
[instructions]
mov %a(register), %b(register)
10bbbaaa
Moves a value from %b to %a.
load %a(immediate|label)
00aaaaaa
Moves %a to r0.
%a(instr)
aaaaaaaa
Execute instruction %a.
If it is an ALU instruction, then evaluate it on r1 and r2 and store the result in r3.
If it is a jump instruction, then jump to r0 if r3 fulfills the instructions condition.
// That is all that is needed to express all instructions in this architecture,
// but we could modernize the syntax to make it feel a bit more like a higher level language:
%a(register) = %b(register)
10bbbaaa
Moves a value from %b to %a.
r0 = %a(immediate|label)
00aaaaaa
Moves %a to r0.
r3 = r1 %a(alu_op) r2
01aaaaaa
Execute an ALU instruction %a; evaluate %a on r1 and r2 and store the result in r3.
if r3 %a(cond) goto r0
11aaaaaa
Execute a jump instruction %a; jump to r0 if r3 fulfills the instruction %a's condition.