close any open files on re-enter

This commit is contained in:
Peter Ferrie 2018-11-11 18:13:27 -08:00
parent d49cc0393c
commit a2e4f1f583
2 changed files with 7 additions and 0 deletions

@ -12,6 +12,7 @@ FirstMover
!pseudopc $D000 {
Reenter ; self-running demos should call this to exit back to 4cade
+READ_RAM1_WRITE_RAM1
jsr CloseHandles ; close any open handles to restore ProRWTS state to original
Main
ldx #$FF
txs

@ -292,7 +292,13 @@ end_promote
;------------------------------------------------------------------------------
packet = $40 ;word
buffer = $42 ;word
ProDOS_enter
!ifdef PASS2 {
!set CloseHandles = @imp_close
} else { ;PASS2
!set PASS2=1
}
pla
sta @fetchaddr+1
pla