annotate lib/alib/datestr.a @ 2746:20a6dfbe8982

Updated makefile(s) to build becker boot disks for drivewire4 server related to KingsQuest1 and Goldrush.
author drencor-xeen
date Wed, 09 Jan 2013 13:34:05 -0600
parents 7d70b7e1cb21
children aaba193af04f
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 * Convert a date to a string. This can be used
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 * for converting the system time as well as
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * modify/create dates from files. The date must
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * be 6 bytes -- null pad file dates.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * OTHER MODULES NEEDED: BIN_ASC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * ENTRY: X=binary date
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * Y=buffer for ascii
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14 * EXIT: all registers preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 nam Get ASCII Date
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 ttl Assembler Library Module
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
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 psect DATESTR,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22 DATESTR:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 pshs d,x,y,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 leau delims,pcr
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 loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 bsr get1 convert a byte
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 lda ,u+ get next delimiter
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 sta ,y+ add to ascii buffer
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 bne loop not end yet
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 puls d,x,y,u,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 get1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 ldb ,x+ get next byte to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35 clra only doing one byte value
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 pshs x save ptr to date packet
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37 leas -8,s buffer for ascii number
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 tfr s,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39 lbsr BIN_DEC convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
40 ldd ,x get ascii
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
41 tstb 1byte number?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
42 bne get2 no
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
43 tfr a,b
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
44 lda #'0 leading "0"
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
45
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
46 get2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
47 std ,y++ to buffer
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
48 leas 8,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
49 puls x,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
50
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
51 delims
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
52 fcc '// ::'
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
53 fcb 0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
54
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
55 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
56 t