comparison level1/modules/clock2_jvemu.asm @ 1724:f389c6bca482

New clock2_*.asm files split from single clock2.asm for more source clarity
author boisy
date Fri, 20 Aug 2004 11:11:58 +0000
parents
children
comparison
equal deleted inserted replaced
1723:00d6e3a47987 1724:f389c6bca482
1 ********************************************************************
2 * Clock2 - Jeff Vavasour CoCo 3 Emulator RTC Driver
3 *
4 * $Id$
5 *
6 * Edt/Rev YYYY/MM/DD Modified by
7 * Comment
8 * ------------------------------------------------------------------
9 * 2004/07/13 Robert Gault
10 * Added Vavasour/Collyer emulator & MESS (Disto) versions and relocated
11 * 'GetTime equ' statement so it is not within a chip heading.
12 *
13 * 2004/07/31 Rodney Hamilton
14 * Improved RTCJVEmu code, conditionalized RTC type comments.
15 *
16 * 1 2004/08/18 Boisy G. Pitre
17 * Separated clock2 modules for source clarity.
18
19 nam Clock2
20 ttl Jeff Vavasour CoCo 3 Emulator RTC Driver
21
22 ifp1
23 use defsfile
24 endc
25
26 tylg set Sbrtn+Objct
27 atrv set ReEnt+rev
28 rev set $00
29 edition set 1
30
31 RTC.Base equ $FFC0
32
33 mod eom,name,tylg,atrv,JmpTable,RTC.Base
34
35 name fcs "Clock2"
36 fcb edition
37
38 JmpTable
39 rts
40 nop
41 nop
42 bra GetTime
43 nop
44 rts
45
46 GetTime ldx #RTC.Base
47 ldd ,x get year (CCYY)
48 suba #20
49 bmi yr1 19xx, OK as is
50 yr0 addb #100 20xx adjustment
51 deca also check for
52 bpl yr0 21xx (optional)
53 yr1 stb <D.Year set year (~YY)
54 ldd 2,x get date
55 std <D.Month set date (MMDD)
56 IFNE Level-1
57 ldd 4,x get time (wwhh)
58 sta <D.Daywk set day of week
59 ELSE
60 ldb 5,x get hour (hh)
61 ENDC
62 stb <D.Hour set hour (hh)
63 ldd 6,x get time (mmss)
64 std <D.Min set time (mmss)
65 rts
66
67 emod
68 eom equ *
69 end
70