0% found this document useful (0 votes)
29 views3 pages

Digital Clock Program For Micro-86/88Lcd R:2 Kit

This program stores the current time in memory locations 1500-1502 and converts it to a digital clock display on an LCD. It calls subroutines to convert the stored time values to ASCII digits and display them on the LCD by outputting to port addresses. The program continuously loops through calling the conversion and display subroutines to continuously update the displayed time.

Uploaded by

pdeepik37
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Digital Clock Program For Micro-86/88Lcd R:2 Kit

This program stores the current time in memory locations 1500-1502 and converts it to a digital clock display on an LCD. It calls subroutines to convert the stored time values to ASCII digits and display them on the LCD by outputting to port addresses. The program continuously loops through calling the conversion and display subroutines to continuously update the displayed time.

Uploaded by

pdeepik37
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

DIGITAL CLOCK PROGRAM FOR MICRO-86/88LCD R:2 KIT:

org 1000h
store time value in memory location 1500- SECONDS
1501- MINUTES
1502- HOURS
1000
1000
1003
1006
1006
1008
100A
100C
100C
100E
1010
1012
1014
1014
1015
1016
1017
1018
101A
101C
101E
1020
1022
1024
1026
1029
102B
102D
102F
1031
1033
1035
1037
1038
103A
103C
103E
1040
1042
1044
1046
1047
1049
104B
104D
104F

start:
E8 0060
E8 0051

call
call

convert
display

delay:
B0 B0
E6 16
B1 07

mov al,0b0h
out 16h,al
mov cl,07h
s2:

B0
E6
B0
E6

90
90
90
90
E4
8A
E4
0A
75
FE
75
BE
8A
FE
88
3C
75
B0
88
46
8A
FE
88
3C
75
B0
88
46
8A
FE
88
3C
75

88
14
80
14

14
D0
14
C2
F2
C9
E6
1500
04
C0
04
3C
CD
00
04
04
C0
04
3C
BE
00
04
04
C0
04
18
AF

mov
out
mov
out

al,88h
14h,al
al,80h
14h,al

s1:
;
mov
al,80h
;
out
16h,al
nop
nop
nop
nop
in al,14h
mov dl,al
in al,14h
or al,dl
jnz s1
dec cl
jnz s2
mov si,1500h
mov al,[si]
inc al
mov [si],al
cmp al,3ch
jnz start
mov al,00h
mov [si],al
inc si
mov al,[si]
inc al
mov [si],al
cmp al,3ch
jnz start
mov al,0
mov [si],al
inc si
mov al,[si]
inc al
mov [si],al
cmp al,18h
jnz start

1051
1053
1055
1057
1057
1059
105C
105E
1060
1062
1063
1063
1066
1069
106B

B0 00
88 04
EB A9

mov al,0
mov [si],al
jmp start
display:

B4
BA
B5
B1
CD
C3

06
1600
01
00
05

mov
mov
mov
mov
int

ah,06h
dx,1600h
ch,01h
cl,0h
5

BE
BB
B0
88

1500
1608
24
07

mov
mov
mov
mov

si,1500h
bx,1608h
al,24h
[bx],al

106D
106F
1071
1073
1075
1078
1079
107B
107C
107E
1080
1081
1083
1085

8A
B4
B6
F6
80
4B
88
4B
04
88
4B
B0
88
4B

04
00
0A
F6
C4 30

mov
mov
mov
div
add

al,[si]
ah,0
dh,0ah
dh
ah,30h

1086
1087
1089
108B
108D
108F
1092
1094
1095
1097
1099
109A
109C
109E

46
8A
B4
B6
F6
80
88
4B
04
88
4B
B0
88
4B

109F
10A0
10A2
10A4
10A6
10A8
10AB

46
8A
B4
B6
F6
80
88

ret
convert:

dec bx
27

mov [bx],ah
dec bx

30
07

add al,30h
mov [bx],al
dec bx

3A
07

mov al,3ah
mov [bx],al
dec bx
inc si

04
00
0A
F6
C4 30
27

mov
mov
mov
div
add
mov

;minutes
al,[si]
ah,0
dh,0ah
dh
ah,30h
[bx],ah

dec bx
30
07

add al,30h
mov [bx],al
dec bx

3A
07

mov al,3ah
mov [bx],al
dec bx
inc si

04
00
0A
F6
C4 30
27

mov
mov
mov
div
add
mov

;hours
al,[si]
ah,0
dh,0ah
dh
ah,30h
[bx],ah

;seconds

10AD
10AE
10B0
10B2

4B
04 30
88 07
C3

10B3
10B3
10B5
10B7
10B9

E4
24
3C
75

dec bx
add al,30h
mov [bx],al
ret
getc:

02
FF
F0
F8

in
and
cmp
jne

END

al,02h
al,0FFH
al,0f0h
getc

You might also like