;+ ; The following are C callable Aed routines: ; ; function aedflush[n] ;if n=0 do a flush, else do ; ;a flush if less than n bytes ; ;left in buffer ; function aedline2[x,y] ;draw a line to x,y ; function aedmove2[x,y] ;go to x,y ; function aedinit ;initialize and assign channel ; function aeddma[fn,addr,len,cmd] ;dma fn is `w' or `r' lower case ; ;cmd is one of the aed commands: ; ; wrd, rrd, wda, rda, or scd ; ; addr and len are the buffer ; ; len must be an even # of bytes ; ; function obyte[c,d] ;This calls the qio with programmed ; ;io functions ; ;returns a 32 bit value with the low ; ;word qio return data, high word is ; ;zero or the error code ; ; ; The external verbose is: ; < -1 suppress ALL error messages ; = 0 suppress tracing messages, output error messages where appropriate ; > 1 output trace and error messages ; > 2 when doing dma, suppress the dma but trace it on terminal ; = 100 force dma to do obyte on buffer instead of dma, also does ; dumps on terminal ; ; terminal dumps can be redirected to the nla0: via ; prog ?nla0: parm...parm This is a fortran routine that draws a line (note that the main program is still the C runtime main program) subroutine main(argc,argv) integer argc,argv(20) call aedinit call aedmove2(%val(1),%val(1)) call aedline2(%val(500),%val(500)) type *,'Done here' end The following is the bld file for this $ here := SYS$DISK:'F$DIRECTORY()' $ link/exe=tfor jplclib:cheader, - 'here'tfor,dra0:[levy.dr]obyte, - jplclib:runtime/lib The following are the qio parameters ;- ; AE_START - Start a transmit, receive, set mode, or prgio operation ; ; Functional description: ; ; ; Functions supported ;------------------------------------------------------------------------------ ; io$_read dma read ;------------------------------------------------------------------------------ ; p1 p2 p3 ; -- -- -- ; buffer size dvma or aio command to issue ;------------------------------------------------------------------------------ ; io$_write dma write ;------------------------------------------------------------------------------ ; p1 p2 p3 ; -- -- -- ; buffer size dvma or aio command to issue ;------------------------------------------------------------------------------ ; io$_access (p1,p2 not used) programmed io functions ;------------------------------------------------------------------------------ ; p3 p4 ; -- -- ; Data going out 0 Normal parallel byte out ; ; ; Terminal # 1 Selects the terminal we want ; ; ; n.a. 2 Does a reset on selected terminal ; ; ; Data going out 3 Parallel byte out, then byte in, does ; the handshake, 2nd stat word has input ; ; n.a. 4 Gets input byte, does handshake, no ; interupts ; ; stat value 100 Returns stats values (for debugging) ; Stats are longwords at bottom of driver ; stored in driver itself. Most are ; num_xxx symbols (stats to estats) ;------------------------------------------------------------------------------