changeset 1096:37b766becf3b

Reserve space in system buffer to call XBIOS from interrupt
author Patrice Mandin <patmandin@gmail.com>
date Wed, 20 Jul 2005 17:40:58 +0000
parents f10892fa2e48
children c83fa1c650dd
files src/audio/mint/SDL_mintaudio_it.S
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/mint/SDL_mintaudio_it.S	Wed Jul 20 17:39:10 2005 +0000
+++ b/src/audio/mint/SDL_mintaudio_it.S	Wed Jul 20 17:40:58 2005 +0000
@@ -53,6 +53,9 @@
 	- Then we swap the buffers
 */
 
+#define	savptr	0x4a2
+#define	savamt	0x46
+
 /*--- GSXB interrupt vector ---*/
 
 	.text
@@ -130,6 +133,9 @@
 	/* Callback */
 	jsr	_SDL_MintAudio_Callback
 
+	/* Reserve space for registers */
+	subl	#savamt,savptr
+
 	/* Set new buffer */
 
 	moveq	#0,d0
@@ -149,6 +155,9 @@
 	trap	#14
 	lea	sp@(12),sp
 
+	/* Restore registers space */
+	addl	#savamt,savptr
+
 	moveml	sp@+,d0-d7/a0-a6
 
 	clrw	_SDL_MintAudio_mutex