
Communications Kernel Source Code
A-10
;====================================================================;
; HOST HPI communications routines packed into himem ;
; ;
; NOTE: These routines can be called from a high level langauge ;
; compiler using the C31s TRAP commands, by directly linking their ;
; resolved addresses or by using the jump table. ;
;====================================================================;
; W_HOST performs an interlocked Host Port write of the contents ;
; of R0 to the host using the HPSTB/HPACK protocol. When called the ;
; host PC should be waiting for this function to send data. ;
;====================================================================;
W_HOST push AR0 ; Used for HPI address
push AR1 ; Used for loop counter
push ST ; Keep flags
push DP ; Might not be on same page
ldp WSCOUNT ;
ldi 0xF000,AR0 ; HPI address sign extends to 0xFFF000
ldi @WSCOUNT,AR1 ;
WH sti R0,*AR0++(16) ; Store lsbs to HPI
lsh @WSHIFT,R0 ; shift to next lsbs
db AR1,WH ; loop until done
pop DP ;
b COMNHST ;
;====================================================================;
; R_HOST performs an interlocked Host Port read from the printer ;
; port interface and places the result into R0. ;
;====================================================================;
R_HOST push AR0 ; HPI Address
push AR1 ; loop counter
push ST ;
push R1 ; temp register
ldi 0xF000,AR0 ; HPI address sign extends to 0xFFF000
ldi 3,AR1 ; bytes–1 to receive
RH lsh –8,R0 ; shift result right one byte
ldi *AR0++,R1 ; Load byte
lsh 24,R1 ; shift to upper byte
or R1,R0 ; or w/result
db AR1,RH ; loop until done
pop R1 ; restore
;;;; b COMNHST ; <– Branch can be saved
COMNHST pop ST ; Next 4 opcodes common to W_HOST/R_HOST
pop AR1 ;
pop AR0 ;
rets ;
;====================================================================;
; XWRIT is a host port command designed to transfer a block of ;
; data from the host to the C31’s memory. ;
;====================================================================;
XWRIT call COMN ;
XW1 call R_HOST ;
sti R0,*AR0++(IR1) ;
db AR1,XW1 ;
b SR2 ;
Содержание TMS320C3 Series
Страница 1: ...TMS320C3x DSP Starter Kit User s Guide...
Страница 18: ...1 4...
Страница 28: ...2 10...
Страница 82: ...5 18...
Страница 140: ...Communications Kernel Source Code A 12...
Страница 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 146: ...Schematics B 6...
Страница 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 148: ...Schematics B 8...
Страница 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 150: ...Schematics B 10...
Страница 154: ...B 14...
Страница 160: ...C 6...
Страница 166: ...Index 6...