type coding
string nam 'operator name
sys mod 'encoding mode
sys dir 'direct from mem
sys cdi 'second octal code
sys imm 'immediate literal
sys cim 'second octal code
end type
coding c[32]
'=================================================
' name mode direct coder, immed, coder
' nam mod , dir , cdi , imm , cim
'=================================================
c[01] <= "load" , 0x1 , 0x8b , -1 , 0xb8 , -1
c[02] <= "stor" , 0x1 , 0x89 , -1 , -1 , -1
c[03] <= "+" , 0x2 , 0x03 , -1 , 0x81 , 0x0
c[04] <= "-" , 0x2 , 0x2b , -1 , 0x81 , 0x5
c[05] <= "cmp" , 0x2 , 0x3b , -1 , 0x81 , 0x7
c[06] <= "*" , 0x3 , 0xf7 , 0x05 , -1 , -1
c[07] <= "/" , 0x3 , 0xf7 , 0x07 , -1 , -1
c[08] <= "and" , 0x4 , 0x23 , -1 , 0x81 , 0x4
c[09] <= "or" , 0x4 , 0x0b , -1 , 0x81 , 0x1
c[10] <= "xor" , 0x5 , 0x31 , -1 , 0x81 , 0x6
c[11] <= "++" , 0x6 , 0xff , 0x0 , -1 , -1
c[12] <= "--" , 0x6 , 0xff , 0x1 , -1 , -1
c[13] <= "push" , 0x6 , 0x50 , -1 , 0x68 , -1
c[14] <= "pop" , 0x6 , 0x58 , -1 , -1 , -1
c[15] <= "call" , 0x7 , 0xff , 0x2 , 0xe8 , -1
c[16] <= "jump" , 0x7 , 0xff , 0x5 , 0xe9 , -1
c[17] <= "==" , 0x8 , -1 , 0x85 , 0x0f , 0x85
c[18] <= "<>" , 0x8 , -1 , 0x84 , 0x0f , 0x84
c[19] <= ">=" , 0x8 , -1 , 0x82 , 0x0f , 0x8c
c[20] <= "<=" , 0x8 , -1 , 0x87 , 0x0f , 0x8f
c[21] <= ">" , 0x8 , -1 , 0x86 , 0x0f , 0x8e
c[22] <= "<" , 0x8 , -1 , 0x83 , 0x0f , 0x8d
'=================================================