Digital Research
This commit is contained in:
2020-11-06 18:50:37 +01:00
parent 621ed8ccaf
commit 31738079c4
8481 changed files with 1888323 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
******************************************************************************
*
* Assembly language interface to signal processing in C.
*
* Majority of work is done by "signal.c". All we do is take the
* exception and call the proper C function. Registers, condition
* codes, etc. are all preserved. A return from the function causes
* resumption of normal processing.
*
******************************************************************************
.globl __illinst * Illegal instruction EPA
.globl __trace * Trace Trap EPA
.globl __trap * All trap instructions
.globl __buserr * BUSERR, addressing EPA
.globl __arith * Arithmetic traps EPA
.comm ___signal,64 * -> epa's of C functions
.bss * Ugh!
epa: .ds.l 1 * non-reentrant!!
.text
__illinst: *
move.l ___signal+16,epa * Set up epa
add.l #2,2(a7) * Bump PC to next inst
bra process * Process exception
__trace:
move.l ___signal+20,epa * Set up epa
bra process * process
__trap: *
move.l ___signal+24,epa * Select epa
bra process *
__buserr: * Here for buserr crap
cmpm.l (a7)+,(a7)+ * Prune junk
move.l ___signal+40,epa * move in epa
bra process * process exception
__arith: *
move.l ___signal+32,epa * move in epa
process: * Here to process exception
movem.l d0-d7/a0-a6,-(sp) * Save all registers
move.l epa,a0 * Load entry point
clr.l a6 * Clear out a6
jsr (a0) * Call processing routine
movem.l (sp)+,d0-d7/a0-a6 * restore registers
rtr * Resume processing
ar out a6
jsr (a0) * Call processing routine
movem.l (sp)+,d0-d7/a0-a6 * restore registers
rtr * Resume processing
ar out a6
jsr (a0) * Call processing routine
movem.l (sp)+,d0-d7/a0-a6 * restore registers
rtr * Resume processing
ar out a6
jsr (a0) * Call processing routine
movem.l (sp)+,d0-d7/a0-a6 * restore registers