1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-08-25 18:29:11 +00:00

Allocate seq buffer on heap and keep ints disabled durin aux memory move

This commit is contained in:
David Schmenk 2018-03-29 21:44:40 -07:00
parent 43a03d2882
commit f11a1470f0
2 changed files with 7 additions and 5 deletions

View File

@ -75,7 +75,7 @@ def compiler(defptr)#0
*$003C = defptr=>bytecodeaddr
*$003E = *$003C + defptr->bytecodesize
*$0042 = bytecode
call($C311, 0, 0, 0, $00) // CALL XMOVE with carry clear (AUX->MAIN)
call($C311, 0, 0, 0, $04) // CALL XMOVE with carry clear (AUX->MAIN) and ints disabled
//^$C053 // MIX TEXT
//puts("Addr Xlate: $"); puth(addrxlate); putln
//puts("Bytecode: $"); puth(bytecode); putln

View File

@ -6,8 +6,8 @@ include "inc/sndseq.plh"
//
// These are utility sequences/routines needed to test the music sequencer code.
//
word arg
word ref
word arg, seq, len
byte ref
//
// Sample background process to show it's working
//
@ -19,9 +19,11 @@ arg = argNext(argFirst)
if ^arg
ref = fileio:open(arg)
if ref
fileio:read(ref, heapmark(), heapavail())
seq = heapalloc(heapavail - 256)
len = fileio:read(ref, seq, heapmark - seq)
fileio:close(ref)
musicPlay(heapmark(), TRUE)
heaprelease(seq + len)
musicPlay(seq, TRUE)
musicGetKey(8, @backgroundProc) // Yield every 8/16 second
musicStop
else