; TASKING TriCore C compiler v1.5r1 Build 322 SN 00090364
; options: -e -A1 -g -O0 -Id:\ctri\include -s -N8 -zTC112_COR1 -zTC112_COR4
;          -zTC112_COR10 -zTC112_COR13 -zTC112_COR14 -zTC112_COR16 -zTC112_COR17
	.name	"rtc_test"
	.symb	TOOL, "TASKING TriCore C compiler v1.5", 1
	.symb	TYPE, 256, "bit", 'g', 0, 1
	.symb	FILE, "rtc_test.c"
; file "rtc_test.c":
;    1 |/* file rtcdemo.c */
;    2 |
;    3 |/* this file shows the basic use of the software in an example */
;    4 |
;    5 |/*
;    6 |
;    7 |Description
;    8 |-----------
;    9 |The Real-time clock (RTC) is initialized with an generic date/time structure.
;   10 |
;   11 |After setting of the date/time the RTC is read at maximum speed. You should see 
;   12 |in the following on your screen the RTC counting the time up every second (endless).
;   13 |
;   14 |To stop the output RESET the target. If the RTC should also RESET you must power 
;   15 |down the power supply of the RTC explicity for five seconds.
;   16 |
;   17 |
;   18 |Programming
;   19 |-----------
;   20 |How "the first time" is evaluated:
;   21 |For simplicity the RTC is always set to a known date every time the program is started.
;   22 |
;   23 |You can evaluate the full example on a ready-compiled hex file (file rtcdemo.hex).
;   24 |Compiling the example should result in the same binary code.
;   25 |The example MUST BE loaded under MONITOR control because it has no code to initialize 
;   26 |the serial interface. Running the example from an FLASH-EEPROM do not work!
;   27 |
;   28 |*/
;   29 |
;   30 |
;   31 |/****************************************************************************/
;   32 |/* start of code example                                                    */
;   33 |/* for simplicity no error checking is done                                 */
;   34 |/****************************************************************************/
;   35 |
;   36 |#include <stdio.h>		/* for printf-function */
	.symb	FILE, "d:\\ctri\\include\\stdio.h"
	.symb	FILE, "d:\\ctri\\include\\stdarg.h"
	.symb	ENDF
	.symb	TYPE, 258, 'P', #2
	.symb	TYPE, 259, "_iobuf", 'S', 24,\
		 "_ptr", #258, 0,\
		 "_base", #258, 4,\
		 "_cnt", #16, 8,\
		 "_bufsiz", #16, 12,\
		 "_flag", #5, 16,\
		 "_file", #2, 18,\
		 "_wcnt", #16, 20
	.symb	TYPE, 260, "FILE", 'T', #259
	.symb	TYPE, 261, "va_list", 'T', #258
	.symb	TYPE, 262, "size_t", 'T', #18
	.symb	TYPE, 263, "fpos_t", 'T', #7
	.symb	TYPE, 264, "off_t", 'T', #6
	.symb	ENDF
;   37 |#include "main.h"
	.symb	FILE, "main.h"
	.symb	TYPE, 265, "uword", 'T', #18
	.symb	FILE, "TC1775BRegs.h"
	.symb	ENDF
	.symb	FILE, "IO.H"
	.symb	ENDF
	.symb	FILE, "ASC0.H"
	.symb	TYPE, 266, "ushort", 'T', #5
	.symb	ENDF
	.symb	FILE, "ASC1.H"
	.symb	ENDF
	.symb	FILE, "CAN.H"
	.symb	TYPE, 267, "ubyte", 'T', #3
	.symb	TYPE, 268, 'Z', #3, 7
	.symb	TYPE, 270, 'S', 20,\
		 "usMsgCfg", #5, 0,\
		 "uwID", #18, 2,\
		 "uwMask", #18, 6,\
		 "ubData", #268, 10,\
		 "usCounter", #5, 18
	.symb	TYPE, 271, "TCAN_SWObj", 'T', #270
	.symb	ENDF
	.symb	ENDF
;   38 |#include "rtcdrv.h"
	.symb	FILE, "rtcdrv.h"
	.symb	TYPE, 272, "REAL_TIME", 'S', 10,\
		 "WeekDay", #3, 0,\
		 "Year", #5, 2,\
		 "Month", #3, 4,\
		 "Day", #3, 5,\
		 "Hour", #3, 6,\
		 "Minute", #3, 7,\
		 "Second", #3, 8
	.symb	TYPE, 273, "REAL_TIME", 'T', #272
	.symb	ENDF
;   39 |
;   40 |#define CLRSCR   26
;   41 |#define TRUE 0xFF
;   42 |#define FALSE 0x00
;   43 |
;   44 |/****************************************************************************/
;   45 |/*                                                                          */
;   46 |/* function prototypes                                                      */
;   47 |/*                                                                          */
;   48 |/****************************************************************************/
;   49 |void PrintTime(REAL_TIME Time);
;   50 |void AlarmTime(REAL_TIME Time);
;   51 |unsigned char ucRtcTest(void);
;   52 |
;   53 |/****************************************************************************/
;   54 |/*                                                                          */
;   55 |/* function definitions                                                     */
;   56 |/*                                                                          */
;   57 |/****************************************************************************/
;   58 |void PrintAlarm(REAL_TIME Time) {
	.sdecl	"code.rtc_test",CODE
	.sect	"code.rtc_test"
	.align	4
	.symb	LINE, 58
	.symb	TYPE, 274, 'X', 8, #1, 26, 1, #272
	.symb	GFUN, "PrintAlarm", PrintAlarm, #274, 0, 16, 0
	.symb	ALAB, PrintAlarm, #274
PrintAlarm:
	.symb	SOFF, 16
	.symb	IDEN, "Time", 0, #272, 129, 0x805
	nop
	sub16.a	sp,#16
;   59 |   printf("   ");
	.symb	LINE, 59
	lea	a4,_17
	callg	printf
;   60 |   printf("%02X.%02X.,", (WORD)Time.Day, (WORD)Time.Month);
	.symb	LINE, 60
	movh.a	a4,#@his(_18)
	lea	a4,[a4]@los(_18)
	ld.bu	d15,[sp]21
	ld.bu	d7,[sp]20
	st.w	[sp]4,d7
	st16.w	[sp],d15
	callg	printf
;   61 |   printf(" %02X:%02X:00", (WORD)Time.Hour,
;   62 |                             (WORD)Time.Minute);
	.symb	LINE, 62
	movh.a	a4,#@his(_19)
	lea	a4,[a4]@los(_19)
	ld.bu	d15,[sp]22
	ld.bu	d7,[sp]23
	st.w	[sp]4,d7
	st16.w	[sp],d15
	callg	printf
;   63 |   printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
	.symb	LINE, 63
	movh.a	a4,#@his(_20)
	lea	a4,[a4]@los(_20)
	callg	printf
;   64 |}
	.symb	LINE, 64
	ret16
	.symb	EFUN
;   65 |/****************************************************************************/
;   66 |void PrintTime(REAL_TIME Time) {
	.symb	LINE, 66
	.symb	TYPE, 275, 'X', 8, #1, 26, 1, #272
	.symb	GFUN, "PrintTime", PrintTime, #275, 0, 16, 0
	.symb	ALAB, PrintTime, #275
PrintTime:
	.symb	SOFF, 16
	.symb	IDEN, "Time", 0, #272, 129, 0x805
	nop
	sub16.a	sp,#16
;   67 |
;   68 |   printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
	.symb	LINE, 68
	movh.a	a4,#@his(_21)
	lea	a4,[a4]@los(_21)
	callg	printf
;   69 |
;   70 |   switch (Time.WeekDay) {
	.symb	LINE, 70
	ld.bu	d15,[sp]16
	jeq	d15,#0,_31			; case 0
	jeq	d15,#1,_32			; case 1
	jeq	d15,#2,_33			; case 2
	jeq	d15,#3,_34			; case 3
	jeq	d15,#4,_35			; case 4
	jeq	d15,#5,_36			; case 5
	jeq	d15,#6,_37			; case 6
	j	_38				; default
;   71 |      case SUNDAY:
	.symb	LINE, 71
_31:
;   72 |         printf("SUN,");
	.symb	LINE, 72
	lea	a4,_22
	callg	printf
;   73 |         break;
	.symb	LINE, 73
	j	_45
;   74 |
;   75 |      case MONDAY:
	.symb	LINE, 75
_32:
;   76 |         printf("MON,");
	.symb	LINE, 76
	lea	a4,_23
	callg	printf
;   77 |         break;
	.symb	LINE, 77
	j	_45
;   78 |
;   79 |      case TUESDAY:
	.symb	LINE, 79
_33:
;   80 |         printf("TUE,");
	.symb	LINE, 80
	lea	a4,_24
	callg	printf
;   81 |         break;
	.symb	LINE, 81
	j	_45
;   82 |
;   83 |      case WEDNESDAY:
	.symb	LINE, 83
_34:
;   84 |         printf("WED,");
	.symb	LINE, 84
	lea	a4,_25
	callg	printf
;   85 |         break;
	.symb	LINE, 85
	j	_45
;   86 |
;   87 |      case THURSDAY:
	.symb	LINE, 87
_35:
;   88 |         printf("THU,");
	.symb	LINE, 88
	lea	a4,_26
	callg	printf
;   89 |         break;
	.symb	LINE, 89
	j	_45
;   90 |
;   91 |      case FRIDAY:
	.symb	LINE, 91
_36:
;   92 |         printf("FRI,");
	.symb	LINE, 92
	lea	a4,_27
	callg	printf
;   93 |         break;
	.symb	LINE, 93
	j	_45
;   94 |
;   95 |      case SATURDAY:
	.symb	LINE, 95
_37:
;   96 |         printf("SAT,");
	.symb	LINE, 96
	lea	a4,_28
	callg	printf
;   97 |         break;
	.symb	LINE, 97
	j	_45
;   98 |
;   99 |      default:
	.symb	LINE, 99
_38:
;  100 |         break;
;  101 |   }
	.symb	LINE, 101
_45:
;  102 |
;  103 |   printf(" %02X.%02X.%04X,", (WORD)Time.Day, 
;  104 |                              (WORD)Time.Month,
;  105 |                              (WORD)Time.Year);
	.symb	LINE, 105
	movh.a	a4,#@his(_29)
	lea	a4,[a4]@los(_29)
	ld.bu	d15,[sp]21
	ld.bu	d7,[sp]20
	ld.hu	d6,[sp]18
	st.w	[sp]8,d6
	st.w	[sp]4,d7
	st16.w	[sp],d15
	callg	printf
;  106 |   printf(" %02X:%02X:%02X",  (WORD)Time.Hour, 
;  107 |                              (WORD)Time.Minute,
;  108 |                              (WORD)Time.Second);
	.symb	LINE, 108
	movh.a	a4,#@his(_30)
	lea	a4,[a4]@los(_30)
	ld.bu	d15,[sp]22
	ld.bu	d7,[sp]23
	ld.bu	d6,[sp]24
	st.w	[sp]8,d6
	st.w	[sp]4,d7
	st16.w	[sp],d15
	callg	printf
;  109 |}
	.symb	LINE, 109
	ret16
	.symb	EFUN
;  110 |
;  111 |/****************************************************************************/
;  112 |
;  113 |unsigned char ucRtcTest(void) {
	.symb	LINE, 113
	.symb	TYPE, 276, 'X', 8, #3, 26, 0
	.symb	GFUN, "ucRtcTest", ucRtcTest, #276, 0, 48, 0
	.symb	ALAB, ucRtcTest, #276
ucRtcTest:
	.symb	SOFF, 48
	.symb	IDEN, "ClkID", -36, #3, 131, 0x5
	.symb	IDEN, "Time", -32, #272, 129, 0x5
	.symb	IDEN, "Alarm", -20, #3, 131, 0x5
	.symb	IDEN, "TEST", -16, #3, 131, 0x5
	nop
	sub16.a	sp,#48
;  114 |   BYTE              ClkID;            /* I2C-address of RTC                */
;  115 |   REAL_TIME         Time;             /* structure for time handling       */
;  116 |   BYTE              Alarm;
;  117 |   BYTE				TEST = 0x13;
	.symb	LINE, 117
	mov16	d15,#19				; TEST
	st.b	[sp]32,d15			; TEST
;  118 |
;  119 |   ClkID = 0xA2;                       /* base I2C-Address of RTC           */
	.symb	LINE, 119
	mov16	d15,#162			; ClkID
	st16.b	[sp]12,d15			; ClkID
;  120 |
;  121 |// RTCPutRAM(&TEST, 0xA2, 0x04, 1);
;  122 |//I2CWrite( &TEST, 0xA2, (WORD)0x04, 0x0001, ADDR_8BIT );
;  123 |
;  124 |
;  125 |//   RTCInit();
;  126 |
;  127 | 
;  128 |//   printf("This is an example for the use of the PHYTEC RTC-Driver.\n");
;  129 |
;  130 |   Time.WeekDay   = MONDAY;          // preset real time                  
	.symb	LINE, 130
	mov16	d15,#1
	st.b	[sp]16,d15
;  131 |   Time.Day       = INT2BCD(11);
	.symb	LINE, 131
	mov	d4,#11				; 11
	callg	INT2BCD
	st.b	[sp]21,d2
;  132 |   Time.Month     = INT2BCD(10);
	.symb	LINE, 132
	mov	d4,#10				; 10
	callg	INT2BCD
	st.b	[sp]20,d2
;  133 |   Time.Year      = INT2BCD(1999);
	.symb	LINE, 133
	mov	d4,#1999			; 1999
	callg	INT2BCD
	st.h	[sp]18,d2
;  134 |   Time.Hour      = INT2BCD(11);
	.symb	LINE, 134
	mov	d4,#11				; 11
	callg	INT2BCD
	st.b	[sp]22,d2
;  135 |   Time.Minute    = INT2BCD(11);
	.symb	LINE, 135
	mov	d4,#11				; 11
	callg	INT2BCD
	st.b	[sp]23,d2
;  136 |   Time.Second    = INT2BCD(57);
	.symb	LINE, 136
	mov	d4,#57				; 57
	callg	INT2BCD
	st.b	[sp]24,d2
;  137 |
;  138 |   if (RTCSetTime(&Time, ClkID) != RTC_SUCCESSFUL) { // write time to clock 
	.symb	LINE, 138
	lea	a4,[sp]16
	ld.bu	d4,[sp]12			; ClkID
	callg	RTCSetTime
	jeq	d2,#0,_54
;  139 |      printf("\n\nERROR!!! Unable to set time\n\7");
	.symb	LINE, 139
	movh.a	a4,#@his(_46)
	lea	a4,[a4]@los(_46)
	callg	printf
;  140 |      return (FALSE);
	.symb	LINE, 140
	mov16	d2,#0				; 0
	ret16
;  141 |   }
	.symb	LINE, 141
_54:
;  142 |
;  143 |   printf("\nRealtime                    Alarmtime\n");
	.symb	LINE, 143
	movh.a	a4,#@his(_47)
	lea	a4,[a4]@los(_47)
	callg	printf
;  144 |   printf("                         ");
	.symb	LINE, 144
	movh.a	a4,#@his(_48)
	lea	a4,[a4]@los(_48)
	callg	printf
;  145 |   PrintTime(Time);
	.symb	LINE, 145
	lea	a15,[sp]16			; Time
	lea	a7,[sp]				; Time
	mov16.a	a6,#4				; Time
_69:
	nop
	ld16.h	d15,[a15+]
	st16.h	[a7+],d15
	isync
	loop16	a6,_69
	callg	PrintTime
;  146 |
;  147 |   Time.Minute += 1;
	.symb	LINE, 147
	ld.bu	d15,[sp]23
	add16	d15,#1
	st.b	[sp]23,d15
;  148 |
;  149 |   if (RTCSetAlarm(&Time, ClkID) != RTC_SUCCESSFUL) { // write time to clock 
	.symb	LINE, 149
	lea	a4,[sp]16
	ld.bu	d4,[sp]12			; ClkID
	callg	RTCSetAlarm
	jeq	d2,#0,_55
;  150 |      printf("\n\nERROR! Unable to set alarm\n\7");
	.symb	LINE, 150
	movh.a	a4,#@his(_49)
	lea	a4,[a4]@los(_49)
	callg	printf
;  151 |      return (FALSE);
	.symb	LINE, 151
	mov16	d2,#0				; 0
	ret16
;  152 |   }
	.symb	LINE, 152
_55:
;  153 |
;  154 |   PrintAlarm(Time);
	.symb	LINE, 154
	nop
	lea	a15,[sp]16			; Time
	lea	a7,[sp]				; Time
	mov16.a	a6,#4				; Time
_70:
	nop
	ld16.h	d15,[a15+]
	st16.h	[a7+],d15
	isync
	loop16	a6,_70
	callg	PrintAlarm
;  155 |
;  156 |
;  157 |   while (1) {
	.symb	LINE, 157
	j	_62
_56:
;  158 |
;  159 |      if (RTCGetTime(&Time, ClkID) != RTC_SUCCESSFUL) { // get time         
	.symb	LINE, 159
	nop
	lea	a4,[sp]16
	ld.bu	d4,[sp]12			; ClkID
	callg	RTCGetTime
	jeq	d2,#0,_57
;  160 |         printf("\n\nERROR! Unable to get time\n\7");
	.symb	LINE, 160
	movh.a	a4,#@his(_50)
	lea	a4,[a4]@los(_50)
	callg	printf
;  161 |         return (FALSE);
	.symb	LINE, 161
	mov16	d2,#0				; 0
	ret16
;  162 |      }
	.symb	LINE, 162
_57:
;  163 |
;  164 |      PrintTime(Time);
	.symb	LINE, 164
	nop
	lea	a15,[sp]16			; Time
	lea	a7,[sp]				; Time
	mov16.a	a6,#4				; Time
_71:
	nop
	ld16.h	d15,[a15+]
	st16.h	[a7+],d15
	isync
	loop16	a6,_71
	callg	PrintTime
;  165 |
;  166 |      if ((Time.Minute == INT2BCD(13)) &&  (Time.Second >= INT2BCD(5)))  {
	.symb	LINE, 166
	ld.bu	d14,[sp]23
	mov	d4,#13				; 13
	callg	INT2BCD
	jne	d14,d2,_59
	ld.bu	d14,[sp]24
	mov16	d4,#5				; 5
	callg	INT2BCD
	jlt	d14,d2,_59
;  167 |         printf("\n\nERROR! No Alarm! Timeout\n\7");
	.symb	LINE, 167
	movh.a	a4,#@his(_51)
	lea	a4,[a4]@los(_51)
	callg	printf
;  168 |		 return (FALSE);
	.symb	LINE, 168
	mov16	d2,#0				; 0
	ret16
;  169 |	  }
	.symb	LINE, 169
_59:
;  170 |
;  171 |      if (RTCGetAlarmStatus(&Alarm, ClkID) != RTC_SUCCESSFUL) {
	.symb	LINE, 171
	nop
	lea	a4,[sp]28
	ld.bu	d4,[sp]12			; ClkID
	callg	RTCGetAlarmStatus
	jeq	d2,#0,_60
;  172 |         printf("\n\nERROR! Unable to get alarm status\n\7");
	.symb	LINE, 172
	movh.a	a4,#@his(_52)
	lea	a4,[a4]@los(_52)
	callg	printf
;  173 |         return (FALSE);
	.symb	LINE, 173
	mov16	d2,#0				; 0
	ret16
;  174 |      }
	.symb	LINE, 174
_60:
;  175 |
;  176 |      if (Alarm) {
	.symb	LINE, 176
	nop
	ld.bu	d15,[sp]28			; Alarm
	jeq	d15,#0,_61			; Alarm
;  177 |         printf("\7\n"); //Beep
	.symb	LINE, 177
	lea	a4,_53
	callg	printf
;  178 |		 return(TRUE);
	.symb	LINE, 178
	mov	d2,#255				; 255
	ret16
;  179 |      }
	.symb	LINE, 179
_61:
	.symb	LINE, 157
_62:
	j	_56
;  180 |   }
;  181 |//return(TRUE);
;  182 |
;  183 |}
	.symb	LINE, 183
_68:
	ret16
	.symb	EFUN
;  184 |
;  185 |/****************************************************************************/
;  186 |/* end of code example                                                      */
;  187 |/****************************************************************************/
;  188 |/* end example.c                                                            */
;  189 |/****************************************************************************/
	.symb	ENDF
	.sdecl	"fardata.rtc_test",DATA,INIT
	.sect	"fardata.rtc_test"
	.align	4
_30:
	.ascii	" %02X:%02X:%02X"
	.byte	0x00
	.symb	TYPE, 279, 'P', #272
	.symb	TYPE, 277, 'X', 8, #3, 26, 2, #279, #3
	.symb	ALAB, RTCGetTime, #277
	.sdecl	"data.rtc_test",DATA,INIT,ABS18
	.sect	"data.rtc_test"
	.align	4
_24:
	.ascii	"TUE,"
	.byte	0x00
	.symb	TYPE, 280, 'X', 8, #3, 26, 2, #279, #3
	.symb	ALAB, RTCSetAlarm, #280
	.align	2
_25:
	.ascii	"WED,"
	.byte	0x00
	.sect	"fardata.rtc_test"
_47:
	.byte	0x0a
	.ascii	"Realtime                    Alarmtime"
	.byte	0x0a,0x00
	.symb	TYPE, 283, 'P', #3
	.symb	TYPE, 281, 'X', 8, #3, 26, 2, #283, #3
	.symb	ALAB, RTCGetAlarmStatus, #281
_50:
	.byte	0x0a,0x0a
	.ascii	"ERROR! Unable to get time"
	.byte	0x0a,0x07,0x00
_48:
	.ascii	"                         "
	.byte	0x00
	.sect	"data.rtc_test"
	.align	2
_27:
	.ascii	"FRI,"
	.byte	0x00
	.symb	TYPE, 284, 'X', 8, #16, 26, 2, #258, #1
	.symb	ALAB, printf, #284
	.symb	TYPE, 285, 'X', 8, #3, 26, 2, #279, #3
	.symb	ALAB, RTCSetTime, #285
	.sect	"fardata.rtc_test"
_51:
	.byte	0x0a,0x0a
	.ascii	"ERROR! No Alarm! Timeout"
	.byte	0x0a,0x07,0x00
	.sect	"data.rtc_test"
	.align	2
_28:
	.ascii	"SAT,"
	.byte	0x00
	.sect	"fardata.rtc_test"
	.align	2
_21:
	.byte	0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08
	.byte	0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08
	.byte	0x08,0x00
	.sect	"data.rtc_test"
	.align	2
_17:
	.ascii	"   "
	.byte	0x00
	.sect	"fardata.rtc_test"
_18:
	.ascii	"%02X.%02X.,"
	.byte	0x00
_20:
	.byte	0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08
	.byte	0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00
	.sect	"data.rtc_test"
_23:
	.ascii	"MON,"
	.byte	0x00
	.align	2
_53:
	.byte	0x07,0x0a,0x00
	.sect	"fardata.rtc_test"
_29:
	.ascii	" %02X.%02X.%04X,"
	.byte	0x00
	.align	2
_46:
	.byte	0x0a,0x0a
	.ascii	"ERROR!!! Unable to set time"
	.byte	0x0a,0x07,0x00
_19:
	.ascii	" %02X:%02X:00"
	.byte	0x00
_52:
	.byte	0x0a,0x0a
	.ascii	"ERROR! Unable to get alarm status"
	.byte	0x0a,0x07,0x00
	.symb	TYPE, 286, 'X', 8, #5, 26, 1, #4
	.symb	ALAB, INT2BCD, #286
	.sect	"data.rtc_test"
	.align	2
_22:
	.ascii	"SUN,"
	.byte	0x00
	.align	2
_26:
	.ascii	"THU,"
	.byte	0x00
	.sect	"fardata.rtc_test"
_49:
	.byte	0x0a,0x0a
	.ascii	"ERROR! Unable to set alarm"
	.byte	0x0a,0x07,0x00
	.sect	"data.rtc_test"
	.align	4
	.sect	"fardata.rtc_test"
	.align	4
	.global	PrintAlarm
	.global	PrintTime
	.global	ucRtcTest
	.extern	(CODE) INT2BCD
	.extern	(CODE) RTCGetAlarmStatus
	.extern	(CODE) RTCGetTime
	.extern	(CODE) RTCSetAlarm
	.extern	(CODE) RTCSetTime
	.extern	(CODE) printf
	.calls	"PrintAlarm", "printf"
	.calls	"PrintTime", "printf"
	.calls	"ucRtcTest", "INT2BCD"
	.calls	"ucRtcTest", "PrintAlarm"
	.calls	"ucRtcTest", "PrintTime"
	.calls	"ucRtcTest", "RTCGetAlarmStatus"
	.calls	"ucRtcTest", "RTCGetTime"
	.calls	"ucRtcTest", "RTCSetAlarm"
	.calls	"ucRtcTest", "RTCSetTime"
	.calls	"ucRtcTest", "printf"
