Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/getfmd.as @ 3220:9ccec98c9897
Updated IDE Driver makefile so it will have place holders for
dsk, dskclean, and dskcopy so that make does not error out when
chaining into the driver tree to build disk images where applicable.
author | David Ladd <drencor-xeen@users.sourceforge.net> |
---|---|
date | Wed, 20 Dec 2017 16:10:50 -0600 |
parents | 03f26e88b809 |
children |
rev | line source |
---|---|
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 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2474
diff
changeset
|
22 section .text |
2474 | 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 |