Reserve space in system buffer to call XBIOS from interrupt

This commit is contained in:
Patrice Mandin
2005-07-20 17:40:58 +00:00
parent fd532c4b52
commit 2a5e3ab7d5

View File

@@ -53,6 +53,9 @@
- Then we swap the buffers
*/
#define savptr 0x4a2
#define savamt 0x46
/*--- GSXB interrupt vector ---*/
.text
@@ -130,6 +133,9 @@ _SDL_MintAudio_XbiosInterrupt:
/* Callback */
jsr _SDL_MintAudio_Callback
/* Reserve space for registers */
subl #savamt,savptr
/* Set new buffer */
moveq #0,d0
@@ -149,6 +155,9 @@ _SDL_MintAudio_XbiosInterrupt:
trap #14
lea sp@(12),sp
/* Restore registers space */
addl #savamt,savptr
moveml sp@+,d0-d7/a0-a6
clrw _SDL_MintAudio_mutex