title: External assembler function for digital signal processor
body: <p>I need to create external function on TMS320C5515 Fixed-Point Digital Signal Processor around <code>BFXTR</code> command. I need to write some value directly into memory. I tried something like this:</p>
  
  <pre><code>.def _bfxtr
  
  _bfxtr:
      PSH mmap(ST0_55)
      PSHBOTH XCDP
      MOV T0, AC0
      MOV T1, AC1
      BCC why, AC1 &gt;= #0
  why:
      MOV HI(AC0), *(#(metka + 1))
      NOP
      //here comes 512 NOP commands to supress conveyor
      ....
      NOP
      NOP
      B metka
  
  metka:
      BFXTR #0x0, AC1, T2
      MOV T2, T0
      POPBOTH XCDP
      POP mmap(ST0_55)
      RET
  </code></pre>
  
  <p>But nothing changes memory value. What can I do about it?</p>