2010-04-05 15:25:49 +00:00
|
|
|
;
|
|
|
|
; Copyright (c) 2010, Kajtar Zsolt <soci@c64.rulez.org>
|
|
|
|
; All rights reserved.
|
|
|
|
;
|
|
|
|
; Redistribution and use in source and binary forms, with or without
|
|
|
|
; modification, are permitted provided that the following conditions
|
|
|
|
; are met:
|
|
|
|
; 1. Redistributions of source code must retain the above copyright
|
|
|
|
; notice, this list of conditions and the following disclaimer.
|
|
|
|
; 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
; notice, this list of conditions and the following disclaimer in the
|
|
|
|
; documentation and/or other materials provided with the distribution.
|
|
|
|
; 3. Neither the name of the Institute nor the names of its contributors
|
|
|
|
; may be used to endorse or promote products derived from this software
|
|
|
|
; without specific prior written permission.
|
|
|
|
;
|
|
|
|
; THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
; ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
|
|
|
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
; SUCH DAMAGE.
|
|
|
|
;
|
|
|
|
; This file is part of the Contiki operating system.
|
|
|
|
;
|
|
|
|
; Author: Kajtar Zsolt <soci@c64.rulez.org>
|
2016-03-28 12:06:47 +00:00
|
|
|
; Author: Greg King <gregdk@users.sf.net>
|
2010-04-05 15:25:49 +00:00
|
|
|
;
|
|
|
|
;---------------------------------------------------------------------
|
2016-03-28 12:06:47 +00:00
|
|
|
.define F_IDE64 0 ; C128 doesn't have IDE64
|
|
|
|
|
|
|
|
.constructor init_pfs
|
|
|
|
.destructor done_pfs
|
2016-10-15 14:33:24 +00:00
|
|
|
.importzp sp, ptr1, ptr2, ptr3, tmp1
|
2016-03-28 12:06:47 +00:00
|
|
|
.import curunit, __filetype, popax, addysp, subysp
|
|
|
|
.export pfs_rwcommon, pfs_rwsetflags, pfs_rwcommonend
|
|
|
|
.if F_IDE64
|
|
|
|
.export ide64_rwprepare, ide64_rwfinish
|
|
|
|
.endif
|
|
|
|
.export cmdc, flags
|
|
|
|
.export pfs_makename, pfs_scratch
|
|
|
|
|
|
|
|
.export _pfs_open, _pfs_read, _pfs_close
|
2016-10-15 14:33:24 +00:00
|
|
|
|
2010-04-05 15:25:49 +00:00
|
|
|
;---------------------------------------------------------------------
|
2016-03-28 12:06:47 +00:00
|
|
|
MAXLEN = 80 ;maximum filename length
|
|
|
|
|
|
|
|
; Flag bits
|
|
|
|
F_EOF = %10000000 ;end of file
|
|
|
|
F_NBLK = %01000000 ;block read/write not available
|
|
|
|
F_OPEN = %00100000
|
|
|
|
|
|
|
|
; Kernal variables
|
|
|
|
ST := $90 ;status
|
|
|
|
FN := $BB ;filename
|
|
|
|
FNL := $B7 ;filename length
|
|
|
|
LF := $B8 ;logical file number
|
|
|
|
|
|
|
|
OPNVec := $031A ;address vector to OPEN function's code
|
|
|
|
|
|
|
|
; IDEDOS function
|
|
|
|
READ := $DEF4
|
|
|
|
|
|
|
|
; Kernal functions
|
|
|
|
SETLFS := $FFBA
|
|
|
|
SETNAM := $FFBD
|
|
|
|
OPEN := $FFC0
|
|
|
|
CLOSE := $FFC3
|
|
|
|
CHKIN := $FFC6
|
|
|
|
CHKOUT := $FFC9
|
|
|
|
CLRCHN := $FFCC
|
|
|
|
CHRIN := $FFCF
|
|
|
|
CHROUT := $FFD2
|
2010-04-05 15:25:49 +00:00
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.data
|
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
; illchr and sw must stay together because the comma, also, is illegal in names.
|
|
|
|
illchr: .byte "*?:=" ;illegal chars
|
|
|
|
sw: .byte ",s,w"
|
2015-10-29 21:25:48 +00:00
|
|
|
cmdc: .byte 0
|
2016-03-28 12:06:47 +00:00
|
|
|
flags: .res 10 ;(Kernal allows only ten open files)
|
2010-04-05 15:25:49 +00:00
|
|
|
;---------------------------------------------------------------------
|
2016-03-06 20:11:18 +00:00
|
|
|
.segment "ONCE"
|
2010-04-05 15:25:49 +00:00
|
|
|
|
|
|
|
init_pfs:
|
2016-03-28 12:06:47 +00:00
|
|
|
ldy #MAXLEN + 8
|
|
|
|
jsr subysp ;allocate because open2 will free it
|
|
|
|
lda #0 ;no name, file number 1
|
|
|
|
sta FNL
|
|
|
|
ldy #15 - 1 ;secondary address 15
|
|
|
|
jsr open2 ;open command channel
|
2010-04-05 15:25:49 +00:00
|
|
|
sta cmdc
|
|
|
|
rts
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
.code
|
|
|
|
|
|
|
|
_pfs_open:
|
2016-03-28 12:06:47 +00:00
|
|
|
sta ptr2 ;save open-mode flags
|
|
|
|
|
|
|
|
; Get and store name
|
2010-04-05 15:25:49 +00:00
|
|
|
jsr popax
|
2016-03-28 12:06:47 +00:00
|
|
|
jsr pfs_makename
|
|
|
|
lda FNL
|
|
|
|
beq error ;must have a filename
|
|
|
|
|
2016-10-15 14:33:24 +00:00
|
|
|
; A directory listing needs a special secondary address
|
|
|
|
ldy tmp1
|
|
|
|
bne open1 ;branch if not directory
|
|
|
|
lda #2 - 1
|
|
|
|
dey ;.Y = 0 - 1
|
|
|
|
bne open2 ;branch always
|
|
|
|
|
|
|
|
open1: lda #2 - 1 ;file number
|
2016-03-28 12:06:47 +00:00
|
|
|
tay ;secondary address
|
|
|
|
open2: sta ptr2
|
|
|
|
sty ptr2 + 1
|
|
|
|
|
|
|
|
next: inc ptr2 ;next file number
|
|
|
|
ldx ptr2 ;file number
|
|
|
|
cpx #.sizeof(flags) + 1
|
|
|
|
bcs error ;no more files
|
|
|
|
lda flags - 1,x
|
|
|
|
bne next ;already used
|
|
|
|
nextsa: inc ptr2 + 1 ;next channel
|
|
|
|
retr: lda ptr2 ;file number
|
|
|
|
ldx curunit
|
|
|
|
ldy ptr2 + 1 ;secondary address (channel number)
|
|
|
|
jsr SETLFS
|
|
|
|
jsr OPEN ;open a pair of files (in computer and drive)
|
|
|
|
bcs oerr ;branch if could not open computer file
|
|
|
|
ldx cmdc
|
|
|
|
beq opok ;branch if error channel just was openned
|
|
|
|
jsr CHKIN
|
|
|
|
bcs error
|
|
|
|
jsr CHRIN
|
|
|
|
pha ;first digit of error code
|
|
|
|
jsr CHRIN
|
|
|
|
sta ptr1 ;second digit
|
|
|
|
@L4: jsr CHRIN ;flush status message
|
|
|
|
lda ST
|
|
|
|
beq @L4
|
|
|
|
jsr CLRCHN
|
|
|
|
pla
|
|
|
|
cmp #'2'
|
|
|
|
bcc opok ;no serious error
|
|
|
|
pha
|
|
|
|
lda ptr2
|
|
|
|
jsr CLOSE ;close computer file
|
|
|
|
pla
|
|
|
|
ldx ptr1
|
|
|
|
cmp #'7' ;no channel?
|
|
|
|
bne nnoc
|
|
|
|
cpx #'0'
|
|
|
|
bne error ;not "no channel"
|
|
|
|
lda ptr2 + 1
|
|
|
|
cmp #14
|
|
|
|
bcc nextsa ;try next channel
|
|
|
|
bcs error ;give up
|
|
|
|
|
|
|
|
opok: ldx ptr2
|
|
|
|
lda #F_OPEN
|
|
|
|
sta flags - 1,x
|
|
|
|
txa ;OK, return file number
|
|
|
|
ret0: ldx #>$0000
|
|
|
|
ret: ldy #MAXLEN + 8 ;free filename space
|
|
|
|
jmp addysp
|
|
|
|
|
|
|
|
oerr: dec ptr2 + 1
|
|
|
|
cmp #2 ;already open,
|
|
|
|
beq next ;retry with next
|
|
|
|
|
|
|
|
error: lda #<-1
|
|
|
|
tax ;failed
|
|
|
|
bne ret
|
|
|
|
|
|
|
|
nnoc: inc ptr3
|
|
|
|
bne error ;no retry
|
|
|
|
cmp #'6'
|
|
|
|
bne error ;not "file exists"
|
|
|
|
cpx #'3'
|
|
|
|
bne error
|
|
|
|
jsr pfs_scratch
|
|
|
|
bcc retr
|
|
|
|
bcs error ;branch always
|
|
|
|
|
|
|
|
pfs_scratch:
|
|
|
|
ldx cmdc
|
|
|
|
jsr CHKOUT
|
|
|
|
bcs @L5
|
|
|
|
ldy #1
|
|
|
|
lda #'s' ;scratch
|
|
|
|
@L4: jsr CHROUT
|
|
|
|
lda (FN),y
|
|
|
|
iny
|
|
|
|
cmp #','
|
|
|
|
bne @L4
|
|
|
|
lda #$0D ;carriage return
|
|
|
|
jsr CHROUT
|
|
|
|
jsr CLRCHN
|
|
|
|
clc ;carry = 0: OK
|
|
|
|
@L5: rts ;carry = 1: error
|
|
|
|
|
|
|
|
pfs_makename:
|
2010-04-05 15:25:49 +00:00
|
|
|
sta FN
|
2016-03-28 12:06:47 +00:00
|
|
|
stx FN+1 ;Kernal filename pointer
|
|
|
|
ldy #MAXLEN + 8
|
|
|
|
jsr subysp ;allocate name space
|
|
|
|
|
|
|
|
; Validate the name; and, find its length
|
|
|
|
ldy #<-1
|
2016-10-15 14:33:24 +00:00
|
|
|
sty ptr3 ;init. the count of retries
|
2010-04-05 15:25:49 +00:00
|
|
|
sty ptr1
|
|
|
|
@L10: iny
|
2016-03-28 12:06:47 +00:00
|
|
|
cpy #MAXLEN
|
|
|
|
bcs badchr ;too long
|
|
|
|
lda (FN),y
|
|
|
|
ldx #.sizeof(illchr); 4 + 1 (includes comma)
|
2010-04-05 15:25:49 +00:00
|
|
|
@L12: cmp illchr,x
|
2016-03-28 12:06:47 +00:00
|
|
|
beq badchr ;illegal char
|
2010-04-05 15:25:49 +00:00
|
|
|
dex
|
|
|
|
bpl @L12
|
2016-03-28 12:06:47 +00:00
|
|
|
cmp #'/'
|
2010-04-05 15:25:49 +00:00
|
|
|
bne @L11
|
2016-03-28 12:06:47 +00:00
|
|
|
sty ptr1 ;last slash
|
|
|
|
@L11: tax ;test for '\0'
|
2010-04-05 15:25:49 +00:00
|
|
|
bne @L10
|
2016-03-28 12:06:47 +00:00
|
|
|
cpy #0
|
|
|
|
beq badchr ;no name
|
2016-10-15 14:33:24 +00:00
|
|
|
sty FNL ;save original length
|
2010-04-05 15:25:49 +00:00
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
tay ;zero index reg.
|
2016-10-15 14:33:24 +00:00
|
|
|
lda (FN),y
|
|
|
|
sta tmp1 ;preset not-directory flag to true
|
|
|
|
cmp #'$'
|
|
|
|
bne @L9
|
|
|
|
sty tmp1 ;set not-directory flag to false
|
|
|
|
rts
|
|
|
|
|
|
|
|
@L9: lda #'0' ;drive 0 or current partition
|
2010-04-05 15:25:49 +00:00
|
|
|
sta (sp),y
|
|
|
|
iny
|
|
|
|
inc ptr1
|
|
|
|
beq nopath
|
2016-03-28 12:06:47 +00:00
|
|
|
lda #'/'
|
2010-04-05 15:25:49 +00:00
|
|
|
@L13: sta (sp),y
|
|
|
|
iny
|
|
|
|
lda (FN,x)
|
|
|
|
inc FN
|
|
|
|
bne @L14
|
|
|
|
inc FN+1
|
|
|
|
@L14: cpy ptr1
|
|
|
|
bcc @L13
|
2016-03-28 12:06:47 +00:00
|
|
|
;lda #'/' ; (.A already has a slash)
|
2010-04-05 15:25:49 +00:00
|
|
|
sta (sp),y
|
|
|
|
iny
|
2016-03-28 12:06:47 +00:00
|
|
|
nopath: lda #':'
|
2010-04-05 15:25:49 +00:00
|
|
|
@L16: sta (sp),y
|
|
|
|
iny
|
|
|
|
lda (FN,x)
|
|
|
|
inc FN
|
|
|
|
bne @L15
|
|
|
|
inc FN+1
|
2016-03-28 12:06:47 +00:00
|
|
|
@L15: ora #$00 ;test for '\0'
|
2010-04-05 15:25:49 +00:00
|
|
|
bne @L16
|
|
|
|
lsr ptr2
|
2016-03-28 12:06:47 +00:00
|
|
|
bcs ro ;read-only (read-write not supported)
|
2010-07-22 10:16:58 +00:00
|
|
|
lda __filetype
|
2016-03-28 12:06:47 +00:00
|
|
|
sta sw + 1 ;set filetype
|
|
|
|
lsr ptr2
|
|
|
|
lda #'w' ;write-only
|
|
|
|
lsr ptr2
|
|
|
|
bcc write
|
|
|
|
lda #'a' ;append
|
|
|
|
write: sta sw + 3 ;set mode
|
|
|
|
ldx #$0100 - .sizeof(sw)
|
|
|
|
@L20: lda sw - ($0100 - .sizeof(sw)),x
|
|
|
|
sta (sp),y
|
2010-04-05 15:25:49 +00:00
|
|
|
iny
|
|
|
|
inx
|
|
|
|
bne @L20
|
2016-03-28 12:06:47 +00:00
|
|
|
ro: tya ;pathname length
|
2010-04-05 15:25:49 +00:00
|
|
|
ldx sp
|
|
|
|
ldy sp+1
|
2016-03-28 12:06:47 +00:00
|
|
|
namset: jmp SETNAM
|
2010-04-05 15:25:49 +00:00
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
badchr: lda #0
|
|
|
|
beq namset
|
2010-07-22 10:16:58 +00:00
|
|
|
|
2010-04-05 15:25:49 +00:00
|
|
|
.proc _pfs_read
|
|
|
|
jsr pfs_rwcommon ; pop params, check handle
|
|
|
|
beq error2 ; not open
|
|
|
|
|
|
|
|
bmi eof
|
2016-03-28 12:06:47 +00:00
|
|
|
|
|
|
|
.if F_IDE64
|
|
|
|
asl a
|
2010-04-05 15:25:49 +00:00
|
|
|
bmi nblk ; no block operation
|
|
|
|
|
|
|
|
jsr CHKIN
|
|
|
|
bcs error2
|
2016-03-28 12:06:47 +00:00
|
|
|
|
2010-04-05 15:25:49 +00:00
|
|
|
; check support
|
|
|
|
jsr ide64_rwprepare
|
|
|
|
bcs norm
|
2016-03-28 12:06:47 +00:00
|
|
|
|
|
|
|
; do a block read
|
2010-04-05 15:25:49 +00:00
|
|
|
jsr READ
|
|
|
|
bcs nosup
|
|
|
|
jmp ide64_rwfinish
|
|
|
|
|
|
|
|
nosup: lda #F_NBLK
|
|
|
|
jsr pfs_rwsetflags
|
2016-03-28 12:06:47 +00:00
|
|
|
.endif
|
2010-04-05 15:25:49 +00:00
|
|
|
|
|
|
|
; Valid lfn. Make it the input file
|
|
|
|
nblk: jsr CHKIN
|
|
|
|
bcs error2
|
|
|
|
|
|
|
|
; Decrement the count
|
|
|
|
norm: ldy #0
|
|
|
|
@L3: inc ptr1
|
|
|
|
bne @L0
|
|
|
|
inc ptr1+1
|
2016-03-28 12:06:47 +00:00
|
|
|
beq done
|
2010-04-05 15:25:49 +00:00
|
|
|
|
|
|
|
; Read the next byte
|
|
|
|
@L0: jsr CHRIN
|
|
|
|
tax ; save the input byte
|
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
lda ST ; read the file status
|
|
|
|
cmp #$01 ; save it
|
|
|
|
and #%10111111 ; check anything but the EOF bit
|
2010-04-05 15:25:49 +00:00
|
|
|
bne error5 ; assume device not present
|
|
|
|
|
|
|
|
; Store the byte just read
|
|
|
|
txa
|
|
|
|
sta (ptr2),y
|
|
|
|
inc ptr2
|
|
|
|
bne @L1
|
|
|
|
inc ptr2+1 ; *buf++ = A;
|
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
; Get the status again; and, check the EOF bit
|
|
|
|
@L1: bcc @L3 ; loop if not end of file
|
2010-04-05 15:25:49 +00:00
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
; Set the EOF flag; and, bail out
|
2010-04-05 15:25:49 +00:00
|
|
|
lda #F_EOF
|
|
|
|
jsr pfs_rwsetflags
|
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
; Read done; cancel the input channel
|
|
|
|
done: jsr CLRCHN
|
2010-04-05 15:25:49 +00:00
|
|
|
|
|
|
|
; Return the number of chars read
|
2016-03-28 12:06:47 +00:00
|
|
|
eof:
|
|
|
|
; jmp pfs_rwcommonend ; (fall through)
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
.proc pfs_rwcommonend
|
|
|
|
lda ptr2
|
|
|
|
sec
|
|
|
|
sbc ptr3
|
|
|
|
pha
|
|
|
|
lda ptr2+1
|
|
|
|
sbc ptr3+1
|
|
|
|
tax
|
|
|
|
pla
|
|
|
|
rts
|
2010-04-05 15:25:49 +00:00
|
|
|
.endproc
|
|
|
|
|
|
|
|
done_pfs:
|
2016-03-28 12:06:47 +00:00
|
|
|
ldx #.sizeof(flags)
|
|
|
|
@L2: ldy flags - 1,x ; file open?
|
2010-04-05 15:25:49 +00:00
|
|
|
beq @L1
|
|
|
|
txa
|
2016-03-28 12:06:47 +00:00
|
|
|
jsr close1
|
2010-04-05 15:25:49 +00:00
|
|
|
@L1: dex
|
2016-03-28 12:06:47 +00:00
|
|
|
bne @L2
|
2010-04-05 15:25:49 +00:00
|
|
|
rts
|
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
error5: jsr CLRCHN
|
2010-04-05 15:25:49 +00:00
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
; Error entry, file is not open
|
|
|
|
error2: ldx #>-1
|
2010-04-05 15:25:49 +00:00
|
|
|
txa
|
|
|
|
rts
|
|
|
|
|
|
|
|
_pfs_close:
|
2016-03-28 12:06:47 +00:00
|
|
|
cmp #.sizeof(flags) + 1
|
|
|
|
bcs close0 ; don't close if not valid file number
|
|
|
|
close1: pha
|
|
|
|
jsr CLOSE
|
2010-04-05 15:25:49 +00:00
|
|
|
pla
|
|
|
|
tax
|
2016-03-28 12:06:47 +00:00
|
|
|
lda #$00
|
|
|
|
sta flags - 1,x
|
|
|
|
close0: rts ; .X = file number
|
2010-04-05 15:25:49 +00:00
|
|
|
|
|
|
|
.proc pfs_rwcommon
|
|
|
|
eor #$FF
|
|
|
|
sta ptr1
|
|
|
|
txa
|
|
|
|
eor #$FF
|
|
|
|
sta ptr1+1 ; remember -count-1
|
|
|
|
|
|
|
|
jsr popax ; get buf
|
|
|
|
sta ptr2
|
|
|
|
stx ptr2+1
|
|
|
|
|
|
|
|
sta ptr3
|
|
|
|
stx ptr3+1 ; for length
|
|
|
|
|
|
|
|
jsr popax ; get the handle
|
|
|
|
sta LF
|
2016-03-28 12:06:47 +00:00
|
|
|
lda #$00
|
|
|
|
; beq pfs_rwsetflags ; (fall through)
|
2010-04-05 15:25:49 +00:00
|
|
|
.endproc
|
|
|
|
|
2016-03-28 12:06:47 +00:00
|
|
|
.proc pfs_rwsetflags
|
|
|
|
ldx LF
|
|
|
|
ora flags - 1,x
|
|
|
|
sta flags - 1,x
|
|
|
|
rts
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
.if F_IDE64
|
2010-04-05 15:25:49 +00:00
|
|
|
.proc ide64_rwprepare
|
2016-03-28 12:06:47 +00:00
|
|
|
sec ; assume it won't use IDEDOS
|
2010-04-05 15:25:49 +00:00
|
|
|
lda ptr1+1
|
2016-03-28 12:06:47 +00:00
|
|
|
eor #$FF ; convert -count-1 back to count
|
2010-04-05 15:25:49 +00:00
|
|
|
beq small ; too small, not worth it
|
|
|
|
tay
|
2016-03-28 12:06:47 +00:00
|
|
|
lda ptr1 ; set up registers
|
|
|
|
eor #$FF
|
2010-04-05 15:25:49 +00:00
|
|
|
tax
|
2016-03-28 12:06:47 +00:00
|
|
|
lda OPNVec+1
|
|
|
|
eor #>$DE00
|
|
|
|
bne noide ; is OPEN vector set to IDEDOS?
|
2010-04-05 15:25:49 +00:00
|
|
|
lda $DE60
|
2016-03-28 12:06:47 +00:00
|
|
|
eor #'i'
|
2010-04-05 15:25:49 +00:00
|
|
|
bne noide ; check identification
|
|
|
|
lda $DE61
|
2016-03-28 12:06:47 +00:00
|
|
|
eor #'d'
|
2010-04-05 15:25:49 +00:00
|
|
|
bne noide
|
|
|
|
lda $DE62
|
2016-03-28 12:06:47 +00:00
|
|
|
eor #'e'
|
2010-04-05 15:25:49 +00:00
|
|
|
bne noide
|
2016-03-28 12:06:47 +00:00
|
|
|
clc ; it will use IDEDOS
|
2010-04-05 15:25:49 +00:00
|
|
|
lda #ptr2
|
|
|
|
small: rts
|
2016-03-28 12:06:47 +00:00
|
|
|
|
2010-04-05 15:25:49 +00:00
|
|
|
noide: lda #F_NBLK
|
|
|
|
bne pfs_rwsetflags
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
.proc ide64_rwfinish
|
2016-03-28 12:06:47 +00:00
|
|
|
txa ; push .YX
|
2010-04-05 15:25:49 +00:00
|
|
|
pha
|
|
|
|
tya
|
|
|
|
pha
|
|
|
|
jsr CLRCHN
|
2016-03-28 12:06:47 +00:00
|
|
|
pla ; pull .XA
|
2010-04-05 15:25:49 +00:00
|
|
|
tax
|
|
|
|
pla
|
|
|
|
rts
|
|
|
|
.endproc
|
2016-03-28 12:06:47 +00:00
|
|
|
.endif
|