edit · history · upload · logout · print

PeriodicTasks.DayTODg History

Hide minor edits - Show changes to markup

April 25, 2007, at 10:14 PM by Pierre -
Changed line 7 from:
Authors: Pierre Delore
to:
Author: Pierre Delore
January 14, 2007, at 09:32 PM by Pierre -
Changed lines 28-29 from:

More creation can be found here: Custom Day Of Week

to:

More creations can be found here: Custom Day Of Week

January 14, 2007, at 09:31 PM by Pierre -
Changed lines 28-29 from:

More creation can be found here:

to:

More creation can be found here: Custom Day Of Week

January 14, 2007, at 09:31 PM by Pierre -
Changed lines 27-30 from:

Find below Day of week created with the PC configurator. Clic on the image the download the .gdw file.
If you want to share your design don't hesitate to contact me. Use this form Contact.

to:

Find below some example of Day of week created with the PC configurator.
More creation can be found here:

January 07, 2007, at 01:19 AM by Pierre -
Changed lines 23-40 from:
to:


Custom Day of week


Find below Day of week created with the PC configurator. Clic on the image the download the .gdw file.
If you want to share your design don't hesitate to contact me. Use this form Contact.

Name:French
Author:Pierre Delore
Name:English
Author:?
January 07, 2007, at 01:10 AM by Pierre -
January 07, 2007, at 01:08 AM by Pierre -
Changed line 17 from:
to:
January 07, 2007, at 01:08 AM by Pierre -
Changed line 16 from:
to:
January 07, 2007, at 01:07 AM by Pierre -
Added line 5:
Changed lines 9-14 from:
Authors: Pierre Delore
 : Ray Allen (Moon display & Julian date)
Version: 1.10
to:
January 07, 2007, at 01:06 AM by Pierre -
Changed lines 8-13 from:
to:
Authors: Pierre Delore
 : Ray Allen (Moon display & Julian date)
Version: 1.10
January 07, 2007, at 01:06 AM by Pierre -
January 07, 2007, at 01:06 AM by Pierre -
Changed line 5 from:
border=0
to:
January 07, 2007, at 01:05 AM by Pierre -
January 07, 2007, at 01:04 AM by Pierre -
Changed line 5 from:
to:
border=0
January 07, 2007, at 01:04 AM by Pierre -
Changed line 19 from:

The PC configurator

to:

The PC Configurator

January 07, 2007, at 01:02 AM by Pierre -
January 07, 2007, at 01:01 AM by Pierre -
Changed lines 15-16 from:

Binary:
Source:

to:
January 07, 2007, at 12:56 AM by Pierre -
Changed line 20 from:
to:

\\

January 07, 2007, at 12:55 AM by Pierre -
Deleted lines 4-5:

This periodic task display in the TOD screen the graphic day of week, the full date and the week number.

Added lines 8-10:

This periodic task display in the TOD screen the graphic day of week, the full date and the week number.

Changed lines 18-19 from:
to:

The PC configurator

January 07, 2007, at 12:54 AM by Pierre -
Added lines 3-4:

Description

\\

Added lines 6-16:
Authors: Pierre Delore
Version: 1.20


Downloads


Binary:
Source:
\\

January 07, 2007, at 12:53 AM by Pierre -
Added lines 5-7:
January 07, 2007, at 12:50 AM by Pierre - Add the screenshoot
Changed line 4 from:
to:
December 30, 2006, at 10:52 PM by Pierre -
Deleted lines 4-197:
 (:source lang=s1c88 :) 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Periodic Task: DayTODg
; Written By:    Pierre DELORE
; Version: 1.1
;
; Replace the english day of week by the a translation
;
; File Change History:
;
;   06/22/2005  PDE - First release
;   09/26/2005  PDE - Add year display
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Definitions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


        IF @DEF('SUBROUTINE')
            UNDEF SUBROUTINE
        ENDIF
        DEFINE SUBROUTINE "'DayTODgTask'"


                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

		; skip over the data area
                jr      DayTODgTask

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; DATA AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        db  'G','T','1','2'
DayPattern:
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for su
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for mo
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for tu
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for we
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for th
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for fr
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for sa
Options:
        db 00H                                              ;Display options
           ;0000 000X : 0 - Normal date display (internal)
           ;            1 - Date with year
           ;0000 00X0 : 0 - Don't show week number
           ;            1 - Show week number

CharWeek:
        db 00H,0BH,0DH


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; CODE AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;***************************************
dTODLocalTimeBuffer:
dTODSec:    db 00 ;second
dTODMin:    db 00 ;minute
dTODHour:   db 00 ;hour
dTODDate:   db 00 ;date
dTODMonth:  db 00 ;month
dTODYearLo: db 00 ;year lo
dTODYearHi: db 00 ;year hi
dTODDow:    db 00 ;dow
dTODWeek:   db 00 ;week number
;***************************************

;-- Display the custom day of week --
DayTODgTask:
    		;now, copy hour into our local buffer
    		ld	    A, [COREPTZIndex]
    		ld	    IY, #dTODLocalTimeBuffer
        KTOD_COPY_TIME_FROM_RESOURCE

        ld      A,[dTODDow]
        ld      L,#12
        mlt

        ld      IY,#DayPattern
        add     IY,HL

        ld      B, #12
        ld      IX, #0F802H
        UTL_COPY_IYREG_TO_IXREG

;-- Display the date with the year - Date format correspond to the watch setting --
        ld      A,[Options]
        bit     A,#01
        jr      Z,DispWeek
        ;-- Clear the punctuation
        LCD_UPD_DASH1_FLAG OFF
        LCD_UPD_DASH2_FLAG OFF

        LCD_UPD_PER1_FLAG OFF
        LCD_UPD_PER2_FLAG OFF

Disp_Year:
        ld      HL,#COREPTZFormat
        ld      A,[HL]
        AND     A,#03
        CP      A,#00   ; D.M.Y
        JR      NZ,Disp1
            LCD_UPD_PER1_FLAG ON
            LCD_UPD_PER2_FLAG ON
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A
            JR      DispD

Disp1:  CP      A,#01   ; Y-M-D
        JR      NZ,Disp2
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODYearLo]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            JR      DispD

Disp2:  CP      A,#02   ; M-D-Y
        JR      NZ,DispD
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A

DispD:
        POP     A
        LD      IX, #LCDSEGDIGIT5
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT3
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT1
        LCD_DISP_2DIG_SEG_DATA_SUP_ZERO_MSD

;        LCD_UPD_COLON1_FLAG OFF
;        LCD_UPD_COLON2_FLAG OFF
;        LCD_UPD_DASH1_FLAG OFF
;        LCD_UPD_DASH2_FLAG OFF

;        LCD_UPD_PER1_FLAG ON
;        LCD_UPD_PER2_FLAG ON

;-- Display the week number --
DispWeek:
        ld      A,[Options]
        bit     A,#02
        jr      Z,dTODExit
          ld A, [dTODWeek]
          ld IX, #LCDMAINDMLINE1COL34
          LCD_DISP_SMALL_PROP_WIDTH_2DIG_DM_DATA_NO_ZERO_SUP

          ld B, #3
          ld  IY,#CharWeek   ;TODO: Change the label name
          ld IX, #0F91FH
          UTL_COPY_IYREG_TO_IXREG

dTODExit:

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ; All periodic task must exit through this section.
                ; The periodic task builder will insert code to complete task.
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

December 30, 2006, at 10:51 PM by Pierre -
Added lines 5-198:
 (:source lang=s1c88 :) 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Periodic Task: DayTODg
; Written By:    Pierre DELORE
; Version: 1.1
;
; Replace the english day of week by the a translation
;
; File Change History:
;
;   06/22/2005  PDE - First release
;   09/26/2005  PDE - Add year display
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Definitions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


        IF @DEF('SUBROUTINE')
            UNDEF SUBROUTINE
        ENDIF
        DEFINE SUBROUTINE "'DayTODgTask'"


                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

		; skip over the data area
                jr      DayTODgTask

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; DATA AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        db  'G','T','1','2'
DayPattern:
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for su
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for mo
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for tu
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for we
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for th
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for fr
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for sa
Options:
        db 00H                                              ;Display options
           ;0000 000X : 0 - Normal date display (internal)
           ;            1 - Date with year
           ;0000 00X0 : 0 - Don't show week number
           ;            1 - Show week number

CharWeek:
        db 00H,0BH,0DH


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; CODE AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;***************************************
dTODLocalTimeBuffer:
dTODSec:    db 00 ;second
dTODMin:    db 00 ;minute
dTODHour:   db 00 ;hour
dTODDate:   db 00 ;date
dTODMonth:  db 00 ;month
dTODYearLo: db 00 ;year lo
dTODYearHi: db 00 ;year hi
dTODDow:    db 00 ;dow
dTODWeek:   db 00 ;week number
;***************************************

;-- Display the custom day of week --
DayTODgTask:
    		;now, copy hour into our local buffer
    		ld	    A, [COREPTZIndex]
    		ld	    IY, #dTODLocalTimeBuffer
        KTOD_COPY_TIME_FROM_RESOURCE

        ld      A,[dTODDow]
        ld      L,#12
        mlt

        ld      IY,#DayPattern
        add     IY,HL

        ld      B, #12
        ld      IX, #0F802H
        UTL_COPY_IYREG_TO_IXREG

;-- Display the date with the year - Date format correspond to the watch setting --
        ld      A,[Options]
        bit     A,#01
        jr      Z,DispWeek
        ;-- Clear the punctuation
        LCD_UPD_DASH1_FLAG OFF
        LCD_UPD_DASH2_FLAG OFF

        LCD_UPD_PER1_FLAG OFF
        LCD_UPD_PER2_FLAG OFF

Disp_Year:
        ld      HL,#COREPTZFormat
        ld      A,[HL]
        AND     A,#03
        CP      A,#00   ; D.M.Y
        JR      NZ,Disp1
            LCD_UPD_PER1_FLAG ON
            LCD_UPD_PER2_FLAG ON
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A
            JR      DispD

Disp1:  CP      A,#01   ; Y-M-D
        JR      NZ,Disp2
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODYearLo]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            JR      DispD

Disp2:  CP      A,#02   ; M-D-Y
        JR      NZ,DispD
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A

DispD:
        POP     A
        LD      IX, #LCDSEGDIGIT5
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT3
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT1
        LCD_DISP_2DIG_SEG_DATA_SUP_ZERO_MSD

;        LCD_UPD_COLON1_FLAG OFF
;        LCD_UPD_COLON2_FLAG OFF
;        LCD_UPD_DASH1_FLAG OFF
;        LCD_UPD_DASH2_FLAG OFF

;        LCD_UPD_PER1_FLAG ON
;        LCD_UPD_PER2_FLAG ON

;-- Display the week number --
DispWeek:
        ld      A,[Options]
        bit     A,#02
        jr      Z,dTODExit
          ld A, [dTODWeek]
          ld IX, #LCDMAINDMLINE1COL34
          LCD_DISP_SMALL_PROP_WIDTH_2DIG_DM_DATA_NO_ZERO_SUP

          ld B, #3
          ld  IY,#CharWeek   ;TODO: Change the label name
          ld IX, #0F91FH
          UTL_COPY_IYREG_TO_IXREG

dTODExit:

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ; All periodic task must exit through this section.
                ; The periodic task builder will insert code to complete task.
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

December 30, 2006, at 10:32 PM by Pierre -
Deleted lines 4-197:

(:code lang=s1c88 :)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Periodic Task: DayTODg
; Written By: Pierre DELORE
; Version: 1.1
;
; Replace the english day of week by the a translation
;
; File Change History:
;
; 06/22/2005 PDE - First release
; 09/26/2005 PDE - Add year display
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Definitions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        IF @DEF('SUBROUTINE')
            UNDEF SUBROUTINE
        ENDIF
        DEFINE SUBROUTINE "'DayTODgTask'"


                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

		; skip over the data area
                jr      DayTODgTask

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; DATA AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        db  'G','T','1','2'

DayPattern:

        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for su
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for mo
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for tu
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for we
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for th
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for fr
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for sa

Options:

        db 00H                                              ;Display options
           ;0000 000X : 0 - Normal date display (internal)
           ;            1 - Date with year
           ;0000 00X0 : 0 - Don't show week number
           ;            1 - Show week number

CharWeek:

        db 00H,0BH,0DH

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; CODE AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;***************************************
dTODLocalTimeBuffer:
dTODSec: db 00 ;second
dTODMin: db 00 ;minute
dTODHour: db 00 ;hour
dTODDate: db 00 ;date
dTODMonth: db 00 ;month
dTODYearLo: db 00 ;year lo
dTODYearHi: db 00 ;year hi
dTODDow: db 00 ;dow
dTODWeek: db 00 ;week number
;***************************************

;-- Display the custom day of week --
DayTODgTask:

    		;now, copy hour into our local buffer
    		ld	    A, [COREPTZIndex]
    		ld	    IY, #dTODLocalTimeBuffer
        KTOD_COPY_TIME_FROM_RESOURCE

        ld      A,[dTODDow]
        ld      L,#12
        mlt

        ld      IY,#DayPattern
        add     IY,HL

        ld      B, #12
        ld      IX, #0F802H
        UTL_COPY_IYREG_TO_IXREG

;-- Display the date with the year - Date format correspond to the watch setting --

        ld      A,[Options]
        bit     A,#01
        jr      Z,DispWeek
        ;-- Clear the punctuation
        LCD_UPD_DASH1_FLAG OFF
        LCD_UPD_DASH2_FLAG OFF

        LCD_UPD_PER1_FLAG OFF
        LCD_UPD_PER2_FLAG OFF

Disp_Year:

        ld      HL,#COREPTZFormat
        ld      A,[HL]
        AND     A,#03
        CP      A,#00   ; D.M.Y
        JR      NZ,Disp1
            LCD_UPD_PER1_FLAG ON
            LCD_UPD_PER2_FLAG ON
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A
            JR      DispD

Disp1: CP A,#01 ; Y-M-D

        JR      NZ,Disp2
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODYearLo]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            JR      DispD

Disp2: CP A,#02 ; M-D-Y

        JR      NZ,DispD
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A

DispD:

        POP     A
        LD      IX, #LCDSEGDIGIT5
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT3
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT1
        LCD_DISP_2DIG_SEG_DATA_SUP_ZERO_MSD

; LCD_UPD_COLON1_FLAG OFF
; LCD_UPD_COLON2_FLAG OFF
; LCD_UPD_DASH1_FLAG OFF
; LCD_UPD_DASH2_FLAG OFF

; LCD_UPD_PER1_FLAG ON
; LCD_UPD_PER2_FLAG ON

;-- Display the week number --
DispWeek:

        ld      A,[Options]
        bit     A,#02
        jr      Z,dTODExit
          ld A, [dTODWeek]
          ld IX, #LCDMAINDMLINE1COL34
          LCD_DISP_SMALL_PROP_WIDTH_2DIG_DM_DATA_NO_ZERO_SUP

          ld B, #3
          ld  IY,#CharWeek   ;TODO: Change the label name
          ld IX, #0F91FH
          UTL_COPY_IYREG_TO_IXREG

dTODExit:

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ; All periodic task must exit through this section.
                ; The periodic task builder will insert code to complete task.
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (:codeend:)
December 30, 2006, at 10:30 PM by Pierre -
Added lines 4-198:

(:code lang=s1c88 :)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Periodic Task: DayTODg
; Written By: Pierre DELORE
; Version: 1.1
;
; Replace the english day of week by the a translation
;
; File Change History:
;
; 06/22/2005 PDE - First release
; 09/26/2005 PDE - Add year display
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Definitions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        IF @DEF('SUBROUTINE')
            UNDEF SUBROUTINE
        ENDIF
        DEFINE SUBROUTINE "'DayTODgTask'"


                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

		; skip over the data area
                jr      DayTODgTask

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; DATA AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

        db  'G','T','1','2'

DayPattern:

        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for su
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for mo
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for tu
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for we
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for th
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for fr
        db 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H  ;Pattern for sa

Options:

        db 00H                                              ;Display options
           ;0000 000X : 0 - Normal date display (internal)
           ;            1 - Date with year
           ;0000 00X0 : 0 - Don't show week number
           ;            1 - Show week number

CharWeek:

        db 00H,0BH,0DH

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; CODE AREA
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;***************************************
dTODLocalTimeBuffer:
dTODSec: db 00 ;second
dTODMin: db 00 ;minute
dTODHour: db 00 ;hour
dTODDate: db 00 ;date
dTODMonth: db 00 ;month
dTODYearLo: db 00 ;year lo
dTODYearHi: db 00 ;year hi
dTODDow: db 00 ;dow
dTODWeek: db 00 ;week number
;***************************************

;-- Display the custom day of week --
DayTODgTask:

    		;now, copy hour into our local buffer
    		ld	    A, [COREPTZIndex]
    		ld	    IY, #dTODLocalTimeBuffer
        KTOD_COPY_TIME_FROM_RESOURCE

        ld      A,[dTODDow]
        ld      L,#12
        mlt

        ld      IY,#DayPattern
        add     IY,HL

        ld      B, #12
        ld      IX, #0F802H
        UTL_COPY_IYREG_TO_IXREG

;-- Display the date with the year - Date format correspond to the watch setting --

        ld      A,[Options]
        bit     A,#01
        jr      Z,DispWeek
        ;-- Clear the punctuation
        LCD_UPD_DASH1_FLAG OFF
        LCD_UPD_DASH2_FLAG OFF

        LCD_UPD_PER1_FLAG OFF
        LCD_UPD_PER2_FLAG OFF

Disp_Year:

        ld      HL,#COREPTZFormat
        ld      A,[HL]
        AND     A,#03
        CP      A,#00   ; D.M.Y
        JR      NZ,Disp1
            LCD_UPD_PER1_FLAG ON
            LCD_UPD_PER2_FLAG ON
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A
            JR      DispD

Disp1: CP A,#01 ; Y-M-D

        JR      NZ,Disp2
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODYearLo]
            PUSH    A
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            JR      DispD

Disp2: CP A,#02 ; M-D-Y

        JR      NZ,DispD
            LCD_UPD_DASH1_FLAG ON
            LCD_UPD_DASH2_FLAG ON
            LD      A,[dTODMonth]
            PUSH    A
            LD      A,[dTODDate]
            PUSH    A
            LD      A,[dTODYearLo]
            PUSH    A

DispD:

        POP     A
        LD      IX, #LCDSEGDIGIT5
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT3
        LCD_DISP_2DIG_SEG_DATA_NO_ZERO_SUP

        POP     A
        LD      IX, #LCDSEGDIGIT1
        LCD_DISP_2DIG_SEG_DATA_SUP_ZERO_MSD

; LCD_UPD_COLON1_FLAG OFF
; LCD_UPD_COLON2_FLAG OFF
; LCD_UPD_DASH1_FLAG OFF
; LCD_UPD_DASH2_FLAG OFF

; LCD_UPD_PER1_FLAG ON
; LCD_UPD_PER2_FLAG ON

;-- Display the week number --
DispWeek:

        ld      A,[Options]
        bit     A,#02
        jr      Z,dTODExit
          ld A, [dTODWeek]
          ld IX, #LCDMAINDMLINE1COL34
          LCD_DISP_SMALL_PROP_WIDTH_2DIG_DM_DATA_NO_ZERO_SUP

          ld B, #3
          ld  IY,#CharWeek   ;TODO: Change the label name
          ld IX, #0F91FH
          UTL_COPY_IYREG_TO_IXREG

dTODExit:

                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                ; All periodic task must exit through this section.
                ; The periodic task builder will insert code to complete task.
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (:codeend:)
December 30, 2006, at 08:02 PM by Pierre -
December 30, 2006, at 06:42 PM by Pierre -
Changed line 3 from:

This periodic task display in the TOD screen the graphic day of week, the full date and the week number.

to:

This periodic task display in the TOD screen the graphic day of week, the full date and the week number.

December 30, 2006, at 01:42 AM by Pierre -
Changed lines 1-3 from:

DayTODg

to:

"DayTODg" Periodic task

This periodic task display in the TOD screen the graphic day of week, the full date and the week number.

December 29, 2006, at 11:48 PM by Pierre -
Added line 1:

DayTODg

edit · history · upload · logout · print
Page last modified on April 25, 2007, at 10:14 PM