7,8c7,9
<              Defseg  Main,Absolute
<              Seg     Main
---
>   ;           Defseg  Main,Absolute
>  	;	.code 	;Seg     Main
> 
10c11
<            ORG     0         ; Start
---
>            .org     0         ; Start
17c18
<  ;           ORG     7         ; Timer Int
---
>             .org     7         ; Timer Int
29c30
<            Clr     A         ;
---
>            CLR     A         ;
55c56
< Led_ClkRef:CALL    LoMode    ;
---
> Led_ClkRef: CALL    LoMode    ;
58,59c59,60
< Led_ClkRe1:MOV     R1,#LEDBUF;
<            MOV     A,#11100101B;'H'in 1st
---
> Led_ClkRe1: MOV     R1,#LEDBUF;
>            MOV     A,#0b11100101       ; was #11100101B;'H'in 1st
64c65
<            MOV     @R1,#00000001B;'-'
---
>            MOV     @R1,#0b00000001;'-'
81c82
<            MOV     R2,#11100101B;'H'in 3rd
---
>            MOV     R2,#0b11100101;'H'in 3rd
91c92
<            MOV     R2,#11100001B;'m'in 3rd
---
>            MOV     R2,#0b11100001;'m'in 3rd
100c101
<            MOV     @R0,#01000000B;
---
>            MOV     @R0,#0b01000000;
102c103
<            MOV     R2,#01011101B;'m'in 3rd
---
>            MOV     R2,#0b01011101;'m'in 3rd
114c115
<            MOV     A,#11110101B;'A'in 1st
---
>            MOV     A,#0b11110101;'A'in 1st
117c118
<            MOV     A,#11001000B;'L'in 2nd
---
>            MOV     A,#0b11001000;'L'in 2nd
122c123
<            MOV     A,#00000001B;'-'in 5th
---
>            MOV     A,#0b00000001;'-'in 5th
138c139
<            MOV     R2,#11100101B;'H'in 3rd
---
>            MOV     R2,#0b11100101;'H'in 3rd
149c150
<            MOV     R2,#11100001B;'m'in 3rd
---
>            MOV     R2,#0b11100001;'m'in 3rd
163c164
<            MOV     A,#01011101B;'S'in 1st
---
>            MOV     A,#0b01011101;'S'in 1st
166c167
<            MOV     A,#11001000B;'L'in 2nd
---
>            MOV     A,#0b11001000;'L'in 2nd
169c170
<            MOV     A,#00000010B;'.'in 3rd
---
>            MOV     A,#0b00000010;'.'in 3rd
186c187
<            MOV     @R0,#11000000B;
---
>            MOV     @R0,#0b11000000;
189c190
<            MOV     A,#01011101B;'S'in 1st
---
>            MOV     A,#0b01011101;'S'in 1st
193c194
<            MOV     A,#01011101B;'S'in 1st
---
>            MOV     A,#0b01011101;'S'in 1st
201c202
<            ANL     A,#11111110B;Timer Off
---
>            ANL     A,#0b11111110;Timer Off
219c220
<            ANL     A,#11111011B;Clear Flag
---
>            ANL     A,#0b11111011;Clear Flag
244c245
<            ORL     A,#00000001B;Timer ON,Power ON
---
>            ORL     A,#0b00000001;Timer ON,Power ON
259c260
<            ANL     A,#11111100B;Clear Power Bits
---
>            ANL     A,#0b11111100;Clear Power Bits
264c265
<            ORL     A,#00000010B;SET Power Bits
---
>            ORL     A,#0b00000010;SET Power Bits
311c312
< Power_On:  ORL     A,#00000010B;Power Bit On
---
> Power_On:  ORL     A,#0b00000010;Power Bit On
314c315
< Power_OFF: ANL     A,#11111100B;Power,Timer->0
---
> Power_OFF: ANL     A,#0b11111100;Power,Timer->0
367c368
<            MOV     R2,#00000000B;     ;10000000-Alm1 on/off
---
>            MOV     R2,#0;     ;10000000-Alm1 on/off
371c372
<            MOV     R2,#01000000B;     ;11000000-Timer set
---
>            MOV     R2,#0b01000000;     ;11000000-Timer set
375c376
< Alm1OnT:   MOV     R2,#10000000B;-Alarm On/Off
---
> Alm1OnT:   MOV     R2,#0b10000000;-Alarm On/Off
379c380
< AlmWeekT:  MOV     R2,#10010000B;-Week set
---
> AlmWeekT:  MOV     R2,#0b10010000;-Week set
383c384
< TimerT:    MOV     R2,#11000000B;-Timer
---
> TimerT:    MOV     R2,#0b11000000;-Timer
387c388
< DigChange: Ret               ;
---
> DigChange: RET               ;
390c391
<            ANL     A,#11110000B;
---
>            ANL     A,#0b11110000;
406c407
< AlmWeekS:  Ret               ; Not Used
---
> AlmWeekS:  RET               ; Not Used
437c438
<            ANL     P1,#11111001B;
---
>            ANL     P1,#0b11111001;
440c441
<            ORL     P1,#00000010B;
---
>            ORL     P1,#0b00000010;
443c444
<            ORL     P1,#00000100B;
---
>            ORL     P1,#0b00000100;
448c449
< ;           ORG     300H      ;
---
> ;           .org     300H      ;
474c475
<            ORL     A,#00000100B;+1Min Mask
---
>            ORL     A,#0b00000100;+1Min Mask
602c603
<            Ret               ;
---
>            RET               ;
604c605
< ;           ORG     400H      ;
---
> ;           .org     400H      ;
665,674c666,675
< CHAR:      DB     0FCH       ;'0'
<            DB     024H       ;'1'
<            DB     0B9H       ;'2'
<            DB     03DH       ;'3'
<            DB     065H       ;'4'
<            DB     05DH       ;'5'
<            DB     0CDH       ;'6'
<            DB     074H       ;'7'
<            DB     0FDH       ;'8'
<            DB     075H       ;'9'
---
> CHAR:      .db     0FCH       ;'0'
>            .db     024H       ;'1'
>            .db     0B9H       ;'2'
>            .db     03DH       ;'3'
>            .db     065H       ;'4'
>            .db     05DH       ;'5'
>            .db     0CDH       ;'6'
>            .db     074H       ;'7'
>            .db     0FDH       ;'8'
>            .db     075H       ;'9'
695c696
<            ANL     A,#00000011B;
---
>            ANL     A,#0b00000011;
697c698
<            ORL     P1,#00000001B;P10=0
---
>            ORL     P1,#0b00000001;P10=0
699c700
< SwitchPOn: ANL     P1,#11111110B;P10=1
---
> SwitchPOn: ANL     P1,#0b11111110;P10=1
703c704
<            MOV     A,#11100101B;'S'in 1st
---
>            MOV     A,0b11100101;'S'in 1st
708c709
<            MOV     A,#11110101B;'A'in 1st
---
>            MOV     A,#0b11110101;'A'in 1st
755c756
<            ORL     A,#00000010B;
---
>            ORL     A,#0b00000010;
761,773c762,774
< ;TimerCons: EQU     250       ;Timer constant
< ;LoByteDiv: EQU       3       ;Low byte divider
< ;HiByteDiv: EQU       1       ;High byte divider
< TimerCons: EQU     223       ;Timer constant
< LoByteDiv: EQU     101       ;Low byte divider x52
< HiByteDiv: EQU       5       ;High byte divider
< KeyRepeat: EQU       5       ;Numbers of cycles for KeyIn
< MEM_Good:  EQU      55H      ;Memory good constant
< Space:     EQU       0       ;Space on display
< MaxMode:   EQU       4       ;Maximal mode
< CntAlarms: EQU       0       ;Alarms Count
< AlarmSleep:EQU      60       ;Sleep After Alarm
< TimerStep: EQU      15       ;15 min per step
---
> ;TimerCons,     250       ;Timer constant
> ;LoByteDiv,       3       ;Low byte divider
> ;HiByteDiv,       1       ;High byte divider
> 	.equ TimerCons,     223       ;Timer constant
>         .equ LoByteDiv,     101       ;Low byte divider x52
>         .equ HiByteDiv,       5       ;High byte divider
>         .equ KeyRepeat,       5       ;Numbers of cycles for KeyIn
>         .equ MEM_Good,      55H      ;Memory good constant
>         .equ Space,       0       ;Space on display
>         .equ MaxMode,       4       ;Maximal mode
>         .equ CntAlarms,       0       ;Alarms Count
>         .equ AlarmSleep,      60       ;Sleep After Alarm
>         .equ TimerStep,      15       ;15 min per step
775,777c776,779
<            DEFSEG VARIABLES,ABSOLUTE,CLASS=DATA
<            SEG VARIABLES
<            ORG     20H
---
> ;           DEFSEG VARIABLES,ABSOLUTE,CLASS=DATA
> ;           SEG VARIABLES
> 	   .data
>            .org     20H
779,789c781,791
< SS100      DS      1 ;1/100S
< SS10       DS      1 ;1/10S
< SEC        DS      1 ;SECOND
< MIN        DS      1 ;MINUTE
< HOUR       DS      1 ;HOUR
< WEEK       DS      1 ;DAY_OF WEEK
< LEDBUF     DS      8 ;Display buffer
< LEDIND     DS      1 ;Display Number
< KeyCyc     DS      1 ;Time Of key pressed
< KeyPres    DS      1 ;Number of Key
< Mode       DS      1 ; 00-Clock
---
> SS100      .ds      1 ;1/100S
> SS10       .ds      1 ;1/10S
> SEC        .ds      1 ;SECOND
> MIN        .ds      1 ;MINUTE
> HOUR       .ds      1 ;HOUR
> WEEK       .ds      1 ;DAY_OF WEEK
> LEDBUF     .ds      8 ;Display buffer
> LEDIND     .ds      1 ;Display Number
> KeyCyc     .ds      1 ;Time Of key pressed
> KeyPres    .ds      1 ;Number of Key
> Mode       .ds      1 ; 00-Clock
793,799c795,801
< Flag       DS      1 ;(0)-Timer (1)-Power (2)-+1Min (3)-+1Sec
< Alarm1H    DS      1 ;Alarm Hour
< Alarm1M    DS      1 ;Alarm Minute
< Alarm1W    DS      1 ;Days of week on Alarm (0)-Sun, etc.
< Alarm1F    DS      1 ;(0)-On (1)-Snd (2)-Pwr (3)-Play
< Alarms     DS      4*CntAlarms;Alarms Array
< SleepT     DS      1 ;(0,15,30,45,60,75,90,105,130,145,
---
> Flag       .ds      1 ;(0)-Timer (1)-Power (2)-+1Min (3)-+1Sec
> Alarm1H    .ds      1 ;Alarm Hour
> Alarm1M    .ds      1 ;Alarm Minute
> Alarm1W    .ds      1 ;Days of week on Alarm (0)-Sun, etc.
> Alarm1F    .ds      1 ;(0)-On (1)-Snd (2)-Pwr (3)-Play
> Alarms     .ds      4*CntAlarms;Alarms Array
> SleepT     .ds      1 ;(0,15,30,45,60,75,90,105,130,145,
801,807c803,809
< AddrMod    DS      1 ;
< MaxValue   DS      1 ;
< LedG       DS      1 ;Green Led Time
< LedR       DS      1 ;Red Led Time
<            ORG     3EH
< SaveR      DS      1 ;Backup any register
< MEM_OK     DS      1 ;Power Good flag (=55H->OK)
---
> AddrMod    .ds      1 ;
> MaxValue   .ds      1 ;
> LedG       .ds      1 ;Green Led Time
> LedR       .ds      1 ;Red Led Time
>            .org     3EH
> SaveR      .ds      1 ;Backup any register
> MEM_OK     .ds      1 ;Power Good flag (=55H->OK)
