Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

open/seek/read/write any binary file in ProDOS filesystem.
runs from any directory on floppy or hard disk.
searches the file system for the requested file, can even look inside subdirectories.
can simulate DOS 3.3 RWTS (including format) to allow disk images on the hard disk, and multiple sides in the same file.
can read sparse files, and read and write tree files


jsr init ;one-time call to unhook ProDOS, detect drive type, and relocate code if needed

;open and read bytes from a file without address override or writing enabled
lda #<file_to_read
sta namlo
lda #>file_to_read
sta namhi
lda #6 ;bytes
sta sizelo
lda #0
sta sizehi
jsr opendir ;open and read file into memory at its load address

;write to an open file with address override
lda #<file_to_write
sta namlo
lda #>file_to_write
sta namhi
lda #0
sta sizelo
lda #>bytes_to_write
sta sizehi
lda #<place_to_write
sta adrlo
lda #>place_to_write
sta adrhi
lda #cmdwrite
sta reqcmd
jsr rdwrpart ;write bytes from memory to specified load address

format of request name is Pascal-style (length, text):
e.g. !raw 5, "MYDIR" or !raw 6, "MYFILE" or !raw 14, "QKUMBAROXURSOX"

You can’t perform that action at this time.