The Hex Processor


The Hex processor is an instruction set where all instructions are readable in a Hex dump.For example it has the '10ad' instruction to access memory or the 'baff1e' (produce obscure error message) instruction.


The hex instruction set - an instruction set whose sole design criteria
was that it be readable in a hex dump.

V0.05 07/10/01 01:05  dave atsign treblig.org

Rules:
  All letters A-F are allowed,
  Numbers allowed as themselves
  0 - for O
  1 - for I and L (try not to mix within one instruction!!)
  4 - for the suffix fore
  5 - for S
  8 - for the suffix ate

  Less liked:
  9 - g
  2 - z

Contributions from:
  Dave Gilbert (dave atsign treblig.org)
  Andrew Bardsley (bardslea atsign cs.man.ac.uk)
  Jim Garside (jdg atsign cs.man.ac.uk)
  (Charlie_Gibbs atsign mindlink.bc.ca)
  Gene Wirchenko (genew atsign mindlink.bc.ca)
  James Youngman (jay atsign gnu.org)

05        - return to OS, terminate process
052       - switch to OS/2
0be5e     - switch to VAX instruction set
0dd       - set low-order bit
0de       - generate poetry
0f10      - trap arithmetic overflow
0ffa1     - gut the system
0ff10ad   - store
0ff1c1a1  - OS trap
105e      - output
105e      - (lose a file - alternative)
10ad      - load a word from memory
10b       - output more vigourously
10ca1e    - switch to international hex instruction set 
15        - assignment
15d       - enable VR extension
1abe1     - place marker for 1f .. e1se .. f1
1abe1     - assembler mnemonic for explicitly declaring labels
1c1c1e    - Really, really turn up air conditioners
1ed       - set console display indicators
1eee      - floating point ops.
1e55      - subtract
1e551e55  - decrement by 1
1f        - if
1f18      - trap to timeout routine (If Late !)
10ada11   - restore after trap
10ca1     - allocate space for local variables
5011d     - select final(?) version
50da      - Refresh
50d0ff    - Branch (50d 0ff to ....)
511de     - shift
5a1ad     - Munch card
5a1d      - input?
5afe      - switch to user mode
5c01d     - produce error message
5ca1e     - multiply
5cab      - Instruction fetched during a strike?
5caff01d  - build stack frame
5eed      - initialise random number generator
510b      - do nothing
a110c     - push to stack
a1d       - call admin
a1901     - Unimplemented
a1ia5     - See 1abe1
a5c11     - Superseded by dec0de
abide     - Wait for interrupt
ab1e      - optimise logic expressions
ab5ci55a  - Reserved for future use my maths co-processor
abba      - Enable swedish extensions
ac1d      - enable VR extension
acce55    - Attempt privilege level elevation
ada       - Switch to ada interpretation
add       - addition
addadd    - increment by 1
affab1e   - Enable debugging support
b055ca11  - OS trap
ba51c     - not for the RISC version
babb1e    - access comms ports (or other IO)
Babba9e   - See Ada
bad       - the error message
baff1e    - Produce obscure error message
be5ie9e   - See f100d
b00       - unexpected error
b001      - enable binary logic
b0i1      - Reverses the effect of 1c1c1e instruction
b0110c5   - discard input
b0991e    - See baff1e
b100d     - terminate with extreme prejudice
bia5ed    - Add constant to result of next dec1de instruction
b1ab      - Copy data between privilege levels
b1e55     - verify program
b1i55     - Disable interrupts
b10b      - Ends program unless followed by 1c1c1e
b4        - post-loop processing (done after d0)
b5        - generate unreliable data
bed       - Wait for NMI
be9       - High-priority request (otherwise equivalent to a1d)
c001      - activate air conditioner
c01d      - interrupt on low temperature
c0b       - sandwich interrupt
c0bb1e    - select first version
c0b01     - Multiply program length
c0de      - encrypt
c0ffee    - switch to J-code instruction set
c109      - Input instruction complementary to 10b
c15c      - trap out of RISC version
c1a55     - enable OO features
c1a551c   - switch to PDP11 instruction set
c105e     - end of file processing
ca11      - call a subroutine
ca1c      - evaluate expression
ca5cade   - coprocessor escape
ca5e      - multi-way branch
ca5e      - jump table based jump (indirect jump)
cab1e     - network escape
cafebabe  - Run Java Class file (cafebabe really is the magic number on Java class files! (even if it is wrong endian))
ce110     - used in music generation routines (string handling?)
c1a55     - Used by C++ support library
daff0di1  - See 0de
decibe1   - Set output volume
def       - define constant
def18     - data compression routine
defec8    - garbage compaction and disposal
d0        - Loop start
d0d0      - dead/orphan code
d00d1e    - (aliased from 1d1e) - an Idle loop
d15cf11e  - as above with parameter
d1ce      - read random number generator
d1d       - loop end
dc        - arithmetic operations ;)
deaf      - disable interrupts
dea11oc   - Stack freeing
dec       - possibly decrement
dec0de    - Conversion from .... (Indexing into lookup table?)
dec1de    - Comparison
decade    - BCD arithmetic
d1ff      - subtract
Ecc1e5    - See f00d
e151f     - see e1se
e15e      - 1f ... e1se ... f1
e0f       - End of file (too obvious really...)
ebcdic    - Superseded by c0de
f01d      - give up
f01dca5E  - toupper(register)
f00d      - generate data
f00l      - generate deceptive output
f1        - end 1f
f11e      - read/write filing system
f1a5c0    - switch to x86 instruction set
f1ab      - run Nigel's programme
f1a9      - See fea51b1e
f1b       - produce error
f1dd1e    - generic bit manipulation
f1ee      - throw an exception
f1ed      - catch an exception
f1eece    - run Doug's financial programme
f100d     - generate huge amounts of data
f1055     - clean stray bits from between registers
fa110ff   - enable 'Stack underflow' exception
fade      - appear to give up (or screen intensity)
fa11      - shut the system down
fe11      - system shutdown complete
fee       - Report instruction cost
fcc       - test EMI emissions
fda       - throw 'This processor is not a food stuff' exception
fea51b1e  - test and set ?
feed      - more input
f1e1d     - bit field extract
01d       - restore registers from stack

An example program
------------------
(Hello World by Andrew Bardsley   bardslea@cs.man.ac.uk)
PUTS:
  10ad e1 500000001
  
  d0
    10ad e2 11
    1f e2 15 d00000000 50d0ff dC
    a110c d00000001
    10ad 500000000 e2
    ca11 dPUTCHAR
    dea110c d00000002
  d1d  
C:  50d0ff 500000000

A:  "Hello world"
  
  10ad e0 d00000001

  d0
    a110c d00000001
    10ad 500000000 dA
    ca11 dPUTS
    dea110c d00000002
    add e0 e0 d00000001
    1f e0 15 d0000000A 50d0ff dB 
  d1d
B: