quit without displaying on file read error, run on stack page instead of input page

This commit is contained in:
4am 2018-01-07 20:39:25 -05:00
parent d195ba44e8
commit 2b4e242f1e
1 changed files with 13 additions and 10 deletions

View File

@ -38,15 +38,16 @@ inputfile
inputfilebuffer
!fill $40
Start
ldx #$00
FM lda CodeStart,x
sta Open,x
inx
bne FM
ldx #(CodeEnd-CodeStart)
- lda CodeStart-1,x
sta Open-1,x
dex
bne -
txs
jmp Open
CodeStart
!pseudopc $200 {
CodeStart
!pseudopc $100 {
Open
jsr CallMLIImmediate
bcs Quit
@ -63,10 +64,9 @@ Open
jsr CallMLI
bcs Close
;DHGRCopy
tay
sta $C00A
sta $C000
tay ; A is 0 after successful MLI call
; X is still #$20
.writeToAux
sta $C005 ; read from mainmem, write to auxmem
.copya lda $2000,y
@ -83,9 +83,12 @@ Open
ldy #kMLIReadCount
jsr CallMLI
Close
php
lda #kMLIClose
ldy #kMLICloseCount
jsr CallMLI
plp
bcs Quit
;DHGRShow
lda $C05E
sta $C00D
@ -111,5 +114,5 @@ mliparam !byte kMLIOpenCount
!word inputfilebuffer
!word aFileBuffer
; !byte $00,$00,$00,$00
End
}
CodeEnd