home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_10 / DEVELOP.LZH / DSP / SAMPLES / MEMDUMP / DBPROG.ASM next >
Assembly Source File  |  1992-07-24  |  1KB  |  72 lines

  1. ;
  2. ;    Block move of DSP memory to manage subroutine area
  3. ;
  4.  
  5. PBC    equ    $ffe0
  6. BCR    equ    $fffe
  7. HSR    equ    $ffe9
  8. HTX    equ    $ffeb
  9.  
  10.     org    p:$0
  11.     jmp    start
  12.     org    P:$40
  13. start
  14.     movep     #1,X:PBC        ; Configure for host port
  15.     movep    #0,X:BCR        ; 0 wait states
  16.  
  17. get_command
  18.     jclr    #0,X:HSR,get_command    ; if no data jump to the top
  19.     clr    a
  20.     movep    X:HTX,a1        ; Get command from host port
  21.     move    #>1,x1
  22.     cmp    x1,a
  23.     jeq    dump_x            ; jump to aux a receive routine
  24.     move    #>2,x1
  25.     cmp    x1,a
  26.     jeq    dump_y
  27.     jmp    dump_p
  28.  
  29. dump_p:
  30.     jclr    #0,X:HSR,dump_p
  31.     movep    X:HTX,r0        ; r0 = source location
  32. ploop1:
  33.     jclr    #0,X:HSR,ploop1
  34.     movep    X:HTX,r1        ; r1 = count
  35.     do    r1,pendloop1        ; Begin block move
  36.     move    P:(r0)+,A1
  37. pxmit    jclr    #1,X:HSR,pxmit
  38.     move    A1,X:HTX
  39. pendloop1
  40.     nop                ; Need an instruction before rti???
  41.     jmp    get_command
  42.  
  43. dump_x:
  44.     jclr    #0,X:HSR,dump_x
  45.     movep    X:HTX,r0        ; r0 = source location
  46. xloop1:
  47.     jclr    #0,X:HSR,xloop1
  48.     movep    X:HTX,r1        ; r1 = count
  49.     do    r1,xendloop1        ; Begin block move
  50.     move    X:(r0)+,A1
  51. xxmit    jclr    #1,X:HSR,xxmit
  52.     move    A1,X:HTX
  53. xendloop1
  54.     nop                ; Need an instruction before rti???
  55.     jmp    get_command
  56.  
  57. dump_y:
  58.     jclr    #0,X:HSR,dump_y
  59.     movep    X:HTX,r0        ; r0 = source location
  60. yloop1:
  61.     jclr    #0,X:HSR,yloop1
  62.     movep    X:HTX,r1        ; r1 = count
  63.     do    r1,yendloop1        ; Begin block move
  64.     move    Y:(r0)+,A1
  65. yxmit    jclr    #1,X:HSR,yxmit
  66.     move    A1,X:HTX
  67. yendloop1
  68.     nop                ; Need an instruction before rti???
  69.     jmp    get_command
  70.  
  71.     end
  72.