Inhibit interrupts when calling ProRWTS

This commit is contained in:
Martin Haye 2021-03-02 17:41:14 -08:00
parent e9399116c7
commit 44dc06287e
2 changed files with 4 additions and 0 deletions

View File

@ -421,6 +421,7 @@ _jbrk jmp $1111 ; self-modified by init
; On return, A contains status (for opendir only)
callProRWTS:
inc _diskOpCt
sei ; inhibit interrupts during aux operations
; Copy the parameters to aux zero page
ldx #$F
- sta clrAuxZP
@ -440,6 +441,7 @@ callProRWTS:
stx treeflgsave ; ...get overwritten between calls to mem mgr
tax ; re-test A for zero
sta clrAuxZP
cli ; interrupts ok again
rts
treeflgsave !byte 0

View File

@ -1171,6 +1171,7 @@ end
// Params: cmd | open<<8, filename, addr, size. Returns: status (for open only)
export asm callProRWTS(cmdPlusOpenFlg, filename, addr, size)#1
+asmPlasmRet 4
sei ; inhibit interrupts during aux operations
; Params come to us from PLASMA in reverse order
sta setAuxZP
sta sizelo
@ -1211,6 +1212,7 @@ export asm callProRWTS(cmdPlusOpenFlg, filename, addr, size)#1
bit setLcRW+lcBank2
bit setLcRW+lcBank2
sta clrAuxZP
cli ; interrupts ok again
rts
end