CBM DOS: How to read directory in raw format?
Posted: Fri Sep 14, 2018 7:04 am
Hi there,
am trying to read a directory but I don't want to process the BASIC listing version. Using a secondary address of $60 was supposed to help with that but I still get the BASIC thing. Any ideas?
am trying to read a directory but I don't want to process the BASIC listing version. Using a secondary address of $60 was supposed to help with that but I still get the BASIC thing. Any ideas?
Code: Select all
.proc _cbm_opendir
lda #1
ldx s
ldy s+1
jsr SETNAM
ldx #8
ldy #$60 ; secondary address.
lda #$02 ; logical file number.
jsr SETLFS
jsr OPEN
bcs error
ldx #$02
jsr CHKIN
bcs error
; Skip load address.
jsr read
bcs error
jsr read
bcs error
;; Skip first three lines.
ldx #3
; Skip load address, first address of next line and line number.
m: ldy #6
l1: jsr read
bcs error
dey
bne l1
; ... Etc. still BASIC