[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DOS3.3 program in cc65?



gids.rs@sasktel.net writes:

>> Do you know if there is an undocumented call within ProDOS 8 to set the file 
>> dates or is this simply not supported as a system call? I lost even some 
>> more hair I didn't have searching for such a call a week or so ago... 
>> perhaps I didn't look hard enough.
>
>
>
> Maybe an option with less hassle
>
> The CREATE call is the only MLI call that can change the creation date.
> So, what you could do is store a $60 at $BF06
> Then poke the date and time that you want into $BF90-BF93
>
> Create a new file or directory
> Store a $4C back into $BF06, which will return the date and time to the present at the next MLI call
> Then save over top of the file you just created, or copy all the files from the other folder into the new one.
>
> The creation date of the file/folder should not be affected when being saved over top.

Actually, you can specify the create_date and create_time in the CREATE
MLI call explicitly, and it will use the values you gave it.  If you
leave those fields set to $0000, it will use the current time.


e.g.

        jsr mli
        db  $c0
        da  createParam
        sta error
        rts

createParam
        db 7
        da pathname
        hex c3          ; access bits
        db  6           ; file type  BIN
        da  $1234       ; aux type
        db  1           ; storage type (normal file)
        da  $1ac1       ; date: 1-Jun-13
        da  $101e       ; time: 16:13

pathname db :pathEnd-*
         asc "/volume/filename"
:pathEnd 


--
Jerry    awanderin at yahoo dot ca