2474
|
1 ************************************
|
|
2
|
|
3 * Get the "last modified" date of an open file
|
|
4
|
|
5 * NOTE: Even though OS9 does not save seconds in its
|
|
6 * files this routine stores a zero in this position.
|
|
7 * This is done to make the routine compatible with
|
|
8 * DATESTR.
|
|
9
|
|
10 * OTHER MODULES NEEDED: none
|
|
11
|
|
12 * ENTRY: X=buffer for 6 byte date
|
|
13 * A=path of open file
|
|
14
|
|
15 * EXIT: CC carry set if error
|
|
16 * B error code (if any) from SS.FD
|
|
17
|
|
18
|
|
19 nam Get Last Modified Date
|
|
20 ttl Assembler Library Module
|
|
21
|
|
22 psect GETFMD,0,0,0,0,0
|
|
23
|
|
24 BUFSIZ equ 8
|
|
25
|
|
26 GETFMD:
|
|
27 pshs x,y
|
|
28 leas -BUFSIZ,s where to put FD sector info
|
|
29 tfr s,x pointer for FD sector info
|
|
30 ldy #BUFSIZ bytes to read from FD sector
|
|
31 ldb #$0F SS.FD
|
|
32 os9 I$GetStt
|
|
33 bcs exit
|
|
34 ldy BUFSIZ,s get back orig X
|
|
35 ldx 3,s get 2 bytes
|
|
36 stx ,y++ move year,month
|
|
37 ldx 5,s
|
|
38 stx ,y++ move date,hour
|
|
39 lda 7,s
|
|
40 sta ,y+ move minutes
|
|
41 clr ,y null for seconds
|
|
42
|
|
43 exit
|
|
44 leas BUFSIZ,s
|
|
45 puls x,y,pc
|
|
46
|
|
47 endsect
|
|
48
|