anchor.diff:  create rO       0 ,
   create leaves   0 ,
   create tethered 0 ,
  +create fineforoptimisation 0 ,
   create tib      #128 allot
   
   header state :noname state ;
  
positive.code: 
  header ]
  : t]
      d# 3
  ;fallthru
  : state!
      state _!
  
negative.code: \     inline: exit
  \ ;
  
  : prev
      dp @i d# 2 -
  ;
  
  \ Do not handle ALU instructions for size reasons, as only negative literals and R-Stack cause ALUs to be compiled
  
  header-imm exit
  : texit
      fineforoptimisation @i
      if
        prev @ h# 4000 xor             
        dup h# e000 and
        if
          drop
        else
          prev _!
          exit
        then
      then
      
      inline: exit
  ;
  
  