Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1.         cpu     68040
  2.  
  3.         org     $1000
  4.  
  5.         ; automatic length deduction must use 16 bit displacement for
  6.         ; BSR instruction, since a displacement of 0 is not allowed
  7.         ; for a 8-bit displacement:
  8.  
  9.         bsr     next
  10. next:   nop
  11.  
  12.         ; similar here: note that this is a programming error since
  13.         ; the instruction is 4 bytes long, so we branch *into* the
  14.         ; instruction itself!
  15.  
  16.         bsr     *+2
  17.  
  18.         ; same code as in first example
  19.  
  20.         bsr.l   next_l
  21. next_l: nop
  22.  
  23.         ; this would result in an error since an 8-bit displacement
  24.         ; of 0 is not allowed, and the BSR instruction cannot be
  25.         ; replaced with a NOP.
  26.  
  27. ;       bsr.s   next_s
  28. ;next_s:        nop
  29.  
  30.         ; in this case a branch to the next instruction can be
  31.         ; replaced with a NOP.  Will throw a warning however...
  32.  
  33.         if      mompass=3
  34.          expect 60
  35.         endif
  36.          bra.s   next_b
  37.         if      mompass=3
  38.          endexpect
  39.         endif
  40. next_b: nop
  41.