home *** CD-ROM | disk | FTP | other *** search
- page 132,63,1,1
- opt rc
- title 'DSP CARD 3 initialization'
-
- ;***************************************************************
- ;* INIT.ASM -- DSP56001 interrupt vector table and DSP CARD 3 *
- ;* initialization code *
- ;* *
- ;* Here are all DSP56001 interrupt vectors and space for *
- ;* interrupt contexts. Also included are initalization code *
- ;* and some stuff for debugging. *
- ;* *
- ;* Copyright (C) 1990-1992 by Alef Null. All rights reserved. *
- ;* Author(s): Jarkko Vuori, OH2LNS *
- ;* Modification(s): *
- ;***************************************************************
-
- ; Mies katsoo tuossa,
- ; on nainen sieltä poissa.
- ; Itku katseen samentaa
- ; ja särky ohimoissa.
- ;
- ; Korvissa soi jo kohisten.
- ; Kuin takaa järjen rajan
- ; nyt mieleen tunkee, täyttää sen
- ; vain meri koko ajan.
- ;
- ; On poissa hän, on lähtenyt
- ; pois yhteisiltä teiltä.
- ; Vain kipu syöpyy luuhun nyt
- ; ja nielee kaiken hältä.
- ;
- ; Jacques Berg
-
- nolist
- include 'ioequlc'
- list
-
- section Vector
- xref m_rx,m_sr,m_tx,m_ssr,m_srxl
-
- nolist
- include 'intequlc'
- list
-
- ; Reset vector
- org p:i_reset
- jmp start
-
- ; SSI transmitter interrupt
- ;(because syncronous mode, we can use the same interrupt for both reading and writing)
- org p:i_ssitd
- movep y:(r7),x:m_tx
- movep x:m_rx,x:(r7)+
-
- ; SSI transmitter interrupt with errors
- org p:i_ssitde
- movep x:m_sr,x:m_tx ; clear TUE
-
- ; SCI receive interrupt
- org p:i_scird
- jsr sci_rec
-
- ; SCI receive interrupt with errors
- org p:i_scirde
- jsr sci_err
-
- ; SCI transmitter interrupt
- org p:i_scitd
- jsr sci_xmt
-
- endsec
-
-
- section Init
- xdef start
- xref ssi_ini
- xref lpc_i
- xref m_loop
- xref m_bcr,m_pcc,m_pcddr,m_pcd,m_ipr
-
- nolist
- include 'macros'
- list
-
- org p:
-
-
- ;****************************
- ;* Start of the program *
- ;****************************
- ; no wait states on external memory
- start movep #$0000,x:m_bcr ; no wait states
-
- ; initialize peripherals
- jsr <ssi_ini
- jsr <sci_ini
-
- ; initialize port C
- movep #$01eb,x:m_pcc ; TXD,RXD,SC0,SC2,SCK,SRD,STD
- movep #$0014,x:m_pcddr ; SCLK,SC1 as output
- movep #$0000,x:m_pcd
-
- ; initialize modules
- jsr <lpc_i
- jsr <pro_i
-
- ; start interrupts
- movep #$b400,x:m_ipr ; SSI=IPL2,SCI=IPL1,HOST=IPL0
- andi #$fc,mr ; unmask interrupts
-
- ; and jump to the main module
- jmp <m_loop
-
- endsec
-
-
- ;****************************
- ;* CONTEX STORE FOR INTS *
- ;****************************
-
- section Contexts
- xdef scix,scir
-
- nolist
- include 'macros'
- list
-
- org l:
-
- scix roomab
- scir roomab
-
- endsec
-
-
- end
-