I want to open a file for writing, which works perfectly. However, if I open the command channel:
lda #1 ; Logical Number = 1 ldx #8 ldy #15 ; 15=control channel jsr SETLFSto change directory first, the same code that opens the file for writing triggers error $42 (READST).
If i change the line "ldy #15" to any other number the command will fail, but opening the file for writing will work.
If I do the SETLFS but not execute the command to it, opening a file for writing also doesn't work.
Logical file number for opening the file for writing is other then #1
Opening a file for reading works in both cases.
I'm probably missing someting obious here. Please help
;Open file for OUTPUT lda #2 ldx #8 ldy #1 jsr SETLFS lda DestFileCnt ldx #<DestFile ldy #>DestFile jsr SETNAM jsr OPEN