Copy Link
Add to Bookmark
Report

DSP 56001 Host Communication Example

DrWatson's profile picture
Published in 
atari
 · 23 Nov 2023

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

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT