Copy Link
Add to Bookmark
Report
DSP 56001 Host Communication Example
This example illustrates a typical DSP Host communication program.
; DSP Host Port IO
: Author: Fredrik Noring, 1994
M_HSR EQU $FFE9 ; Host Status Register
M_HRX EQU $FFEB ; Host Receive Data Register
M_HTX EQU $FFEB ; Host Transmit Data Register
org p:$0
jmp <start
org p:$40
start jsr <Host_get ; Receive Host data
move #0.27,A ; Move value to the 56-bits A register
move #0.31415,y0 ; Move value to the 24-bits y0 register
mac x0,y0,A ; Multiply x0 and y0 and accumulate to A
move A,x0 ; Move the A1 portion of A to x0
jsr <Host_send ; Send Host data
jmp <start ; Continue
; Host I/O routines.
Host_get jclr #0,X:<<M_HSR,<Host_get
movep X:<<M_HRX,x0 ; Move 24-bits Host data to x0
rts
Host_send jclr #1,X:<<M_HSR,<Host_send ;
movep x0,X:<<M_HTX ; Move x0 to 24-bits Host data
rts