?? iovslcd.asm
字號(hào):
sz display_temp.7
set acc.0
inc acc
sdz acc
jmp $+2
jmp segment2_000
sdz acc
jmp $+2
jmp segment2_001
sdz acc
jmp $+2
jmp segment2_010
sdz acc
jmp $+2
jmp segment2_011
sdz acc
jmp $+2
jmp segment2_100
sdz acc
jmp $+2
jmp segment2_101
sdz acc
jmp segment2_111
jmp segment2_110
segment2_000:
mov a,com_000_table
jmp segment2_next
segment2_001:
mov a,com_001_table
jmp segment2_next
segment2_010:
mov a,com_010_table
jmp segment2_next
segment2_011:
mov a,com_011_table
jmp segment2_next
segment2_100:
mov a,com_100_table
jmp segment2_next
segment2_101:
mov a,com_101_table
jmp segment2_next
segment2_110:
mov a,com_110_table
jmp segment2_next
segment2_111:
mov a,com_111_table
segment2_next:
add a,pulse_count
mov tblp,a
tabrdl acc
clr segment2
sz acc
set segment2
;------------------------
segment3_out:
mov a,display_temp1
add a,number_table
mov tblp,a
tabrdl display_temp
rl display_temp
rl display_temp
rl display_temp
mov a,display_temp
and a,00000111b
inc acc
sdz acc
jmp $+2
jmp segment3_000
sdz acc
jmp $+2
jmp segment3_001
sdz acc
jmp $+2
jmp segment3_010
sdz acc
jmp $+2
jmp segment3_011
sdz acc
jmp $+2
jmp segment3_100
sdz acc
jmp $+2
jmp segment3_101
sdz acc
jmp segment3_111
jmp segment3_110
segment3_000:
mov a,com_000_table
jmp segment3_next
segment3_001:
mov a,com_001_table
jmp segment3_next
segment3_010:
mov a,com_010_table
jmp segment3_next
segment3_011:
mov a,com_011_table
jmp segment3_next
segment3_100:
mov a,com_100_table
jmp segment3_next
segment3_101:
mov a,com_101_table
jmp segment3_next
segment3_110:
mov a,com_110_table
jmp segment3_next
segment3_111:
mov a,com_111_table
segment3_next:
add a,pulse_count
mov tblp,a
tabrdl acc
clr segment3
sz acc
set segment3
;------------------------
segment4_out:
rl display_temp
rl display_temp
rl display_temp
mov a,display_temp
and a,00000111b
inc acc
sdz acc
jmp $+2
jmp segment4_000
sdz acc
jmp $+2
jmp segment4_001
sdz acc
jmp $+2
jmp segment4_010
sdz acc
jmp $+2
jmp segment4_011
sdz acc
jmp $+2
jmp segment4_100
sdz acc
jmp $+2
jmp segment4_101
sdz acc
jmp segment4_111
jmp segment4_110
segment4_000:
mov a,com_000_table
jmp segment4_next
segment4_001:
mov a,com_001_table
jmp segment4_next
segment4_010:
mov a,com_010_table
jmp segment4_next
segment4_011:
mov a,com_011_table
jmp segment4_next
segment4_100:
mov a,com_100_table
jmp segment4_next
segment4_101:
mov a,com_101_table
jmp segment4_next
segment4_110:
mov a,com_110_table
jmp segment4_next
segment4_111:
mov a,com_111_table
segment4_next:
add a,pulse_count
mov tblp,a
tabrdl acc
clr segment4
sz acc
set segment4
;------------------------
segment5_out:
clr acc
sz display_temp.7
set acc.0
inc acc
sdz acc
jmp $+2
jmp segment5_000
sdz acc
jmp $+2
jmp segment5_001
sdz acc
jmp $+2
jmp segment5_010
sdz acc
jmp $+2
jmp segment5_011
sdz acc
jmp $+2
jmp segment5_100
sdz acc
jmp $+2
jmp segment5_101
sdz acc
jmp segment5_111
jmp segment5_110
segment5_000:
mov a,com_000_table
jmp segment5_next
segment5_001:
mov a,com_001_table
jmp segment5_next
segment5_010:
mov a,com_010_table
jmp segment5_next
segment5_011:
mov a,com_011_table
jmp segment5_next
segment5_100:
mov a,com_100_table
jmp segment5_next
segment5_101:
mov a,com_101_table
jmp segment5_next
segment5_110:
mov a,com_110_table
jmp segment5_next
segment5_111:
mov a,com_111_table
segment5_next:
add a,pulse_count
mov tblp,a
tabrdl acc
clr segment5
sz acc
set segment5
;----------------------------------------
;Output COM&SEGMENT
;----------------------------------------
output_com_segment:
mov a,pb_bk
mov pb,a
mov a,pbc_bk
mov pbc,a
mov a,pa_bk
mov pa,a
;----------------------------------------
;Time
;----------------------------------------
inc msecond
mov a,msecond
sub a,192
snz c
jmp timer_end
clr msecond
inc second
mov a,second
sub a,120
snz c
jmp timer_end
clr second
inc minute
mov a,minute
sub a,60
snz c
jmp timer_end
clr minute
timer_end:
pop
reti
;*********************************************
;Table
;*********************************************
org 0700h
number_table:
; gbefadc0
dw 11111010b ;"0" 0
dw 00010010b ;"1" 1
dw 10101110b ;"2" 2
dw 10011110b ;"3" 3
dw 01010110b ;"4" 4
dw 11011100b ;"5" 5
dw 11111100b ;"6" 6
dw 00011010b ;"7" 7
dw 11111110b ;"8" 8
dw 11011110b ;"9" 9
dw 00000100b ;"-" a
dw 00000000b ;" " b
;-------------------------------------
com_000_table:
dw 0
dw 1,0,1,0,1,0
com_001_table:
dw 0
dw 1,0,1,0,0,1
com_010_table:
dw 0
dw 0,1,1,0,1,0
com_011_table:
dw 0
dw 0,1,1,0,0,1
com_100_table:
dw 0
dw 1,0,0,1,1,0
com_101_table:
dw 0
dw 1,0,0,1,0,1
com_110_table:
dw 0
dw 0,1,0,1,1,0
com_111_table:
dw 0
dw 0,1,0,1,0,1
;----------------------------------------
bcd_table:
dw 00h,01h,02h,03h,04h,05h,06h,07h,08h,09h
dw 10h,11h,12h,13h,14h,15h,16h,17h,18h,19h
dw 20h,21h,22h,23h,24h,25h,26h,27h,28h,29h
dw 30h,31h,32h,33h,34h,35h,36h,37h,38h,39h
dw 40h,41h,42h,43h,44h,45h,46h,47h,48h,49h
dw 50h,51h,52h,53h,54h,55h,56h,57h,58h,59h
dw 60h,61h,62h,63h,64h,65h,66h,67h,68h,69h
dw 70h,71h,72h,73h,74h,75h,76h,77h,78h,79h
dw 80h,81h,82h,83h,84h,85h,86h,87h,88h,89h
dw 90h,91h,92h,93h,94h,95h,96h,97h,98h,99h
end
;*********************************************
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -