annotate lib/alib/getfmd.as @ 2784:2594295f9cc7 lwtools-port

Merged Drencor's work
author Boisy Pitre <boisy.pitre@nuance.com>
date Sat, 26 Jan 2013 17:19:06 -0600
parents 03f26e88b809
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 ************************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * Get the "last modified" date of an open file
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * NOTE: Even though OS9 does not save seconds in its
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * files this routine stores a zero in this position.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7 * This is done to make the routine compatible with
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * DATESTR.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * ENTRY: X=buffer for 6 byte date
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13 * A=path of open file
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15 * EXIT: CC carry set if error
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 * B error code (if any) from SS.FD
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19 nam Get Last Modified Date
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21
2782
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2474
diff changeset
22 section .text
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 BUFSIZ equ 8
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 GETFMD:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 pshs x,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 leas -BUFSIZ,s where to put FD sector info
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 tfr s,x pointer for FD sector info
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 ldy #BUFSIZ bytes to read from FD sector
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 ldb #$0F SS.FD
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 os9 I$GetStt
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 bcs exit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 ldy BUFSIZ,s get back orig X
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35 ldx 3,s get 2 bytes
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 stx ,y++ move year,month
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37 ldx 5,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 stx ,y++ move date,hour
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39 lda 7,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
40 sta ,y+ move minutes
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
41 clr ,y null for seconds
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
42
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
43 exit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
44 leas BUFSIZ,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
45 puls x,y,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
46
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
47 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
48