National Instruments Corporation GPIB-1014P User Manual page 130

Table of Contents

Advertisement

Sample Programs
68000
Code
------------------------------------------------------------------------------------------------------------------------------------------------
DSEND:
link
a6,-8
movl
d1,a6@(-4)
movl
d2,a6@(-8)
movl
d0,d1
DSEND1: movb ISR1.L,d2
btst
#DO=ERR,d2
beq
DSEND1
btst
#ERR,d2
bne
DSEND3
subl
#1,d1
bmi
DSEND4
bne
DSEND2
cmpb #0,vseoi.L
beq
DSEND2
movb #SEOI,AUXMR.L
DSEND2: movb a0@,CDOR.L
bra
DSEND1
movb #DMAO,IMR2
DSEND3: movl
#-1,d0
DSEND4: movl
a6@(-8),d2
movl
a6@(-4),d1
unlk
a6
rts
GPIB-1014P User Manual
|
|
Comments
|
| Link
| Save d1
| Save d12
| Copy byte count
|
| Wait for CDOR or ERR
|
| Look for error
|
| dec byte counter
| Have all bytes been sent?
| No–Is this last byte?
| Yes–EOI in use?
| No
| Send EOI with last byte
| Next byte
|
| Enable DMA to the CDOR
| Return (-1) indicating error
| Restore d2
| Restore d1
| Unlink
| Return
C-14
Appendix C
© National Instruments Corporation

Advertisement

Table of Contents
loading

Table of Contents