Instructions

General

Arithmetic/Logic

Jump

Directive

  nop  

    nothing  

  halt  

    stop exe  

  inte  

    psw.I = 1  

  intd  

    psw.I = 0  

  trpe  

    psw.T = 1  

  trpd  

    psw.T = 0  

  vare  

    psw.P = 1  

  vard  

    psw.P = 0  

  edge  

    psw.E = 1  

  edgd  

    psw.E = 0  

 Load/store 

  ldimm x.1234, r5  

    r5 = 1234  

  ldmem x.1234, r5  

    r5 = memory[1234]  

  stri [r0], r1  

    memory[r0] = r1  

  stmem x.1234, r5  

    memory[x.1234] = r5  

  mvrrl r0, r1  

    r0 = r1  

  mvrrr r0, r1  

    r1 = r0  

  mvrpl r0, pc/psw  

    r0 = pc/psw  

  mvrpr r0, pc/psw  

    pc/psw = r0  

  mvril r0, ivtp/imr  

    r0 = ivtp/imr  

  mvrir r0, ivtp/imr  

    ivtp/imr = r0  

  push r0  

    stack.push( r0 )  

  pop r0  

    r0 = stack.pop  

  clr r0  

    r0 = 0  

 Arithmetic 

  add r0, r1, r2  

    r0 = r1 + r2  

  sub r0, r1, r2  

    r0 = r1 - r2  

  cmp r0, r1  

    init_psw ( r0 - r1 )  

  inc r0  

    r0 ++  

  dec r0  

    r0 --  

 Logic 

  and r0, r1, r2  

    r0 = r1 & r2  

  or r0, r1, r2  

    r0 = r1 | r2  

  xor r0, r1, r2  

    r0 = r1 ^ r2  

  tst r0, r1  

    init_psw ( r0 & r1 )  

  not r0  

    r0 = ~ r0  

 Shift/rotate 

  asr r0  

    r0.shiftRight  

  lsr r0  

    r0.shiftRight_unsigned  

  ror r0  

    r0.rotateRight  

  rorc r0  

    (C -- r0).rotateRight  

  sl r0  

    r0.shiftLeft  

  rol r0  

    r0.rotateLeft  

  rolc r0  

    (C -- r0).rotateLeft  

 if (cond) jump to label 

  beql label  

    equal  

  bneq label  

    not equal  

  bgrt label  

    greater  

  bgre label  

    greater or equal  

  blss label  

    lesser  

  bleq label  

    lesser or equal  

  bgrtu label  

    unsigned greater  

  bgreu label  

    unsigned greater 
      or equal  

  blssu label  

    unsigned lesser  

  blequ label  

    unsigned lesser 
      or equal  

  bneg label  

    negative  

  bnng label  

    not negative  

  bovf label  

    overflow  

  bnvf label  

    not overflow  

 Non-cond 

  jmp label  

    jump  

  jmprind r0  

    jump to memory[r0]  

  jsr label  

    jump to subroutine  

  int x.1  

    jump to 1st 
      interrupt routine  

  rts  

    return from subroutine  

  rti  

    return from 
      interrupt routine  

  org x.123  

    start writing code 
      from memory[123]  

  dc x.4567, x.123,  

    memory[123] = 4567  

  onkp 1, x.456, x.789  

    activate next kp1 with 
      access_time = 456 
      int_impulse = 789  

  ondma x.456, x.789  

    activate next dma with 
      access_time = 456 
      int_impulse = 789