?? main.asm
字號:
;*****************************************************
;
; This programme is for study Ver2.0.0 beta
; The main control programe
;This programme must be run in 12MHz standard settings
; Designer: Mr.Koii
; Copyright 2002 koiistudio
; 2003.03.31 at Changsha. H.N. P.R.China
;
;*****************************************************
;*****************************************************
;參數定義
;*****************************************************
beep bit p1.5 ;蜂鳴器引腳
digital_bit equ 08h ;顯示位
keys_byte equ 09h ;按鍵字節
digital_flash_time equ 0ah ;閃爍計時
digital_flash_bit equ 0bh ;閃爍位
aleart_data equ 0ch ;時間報警字節(連續兩字節)
aleart_byte equ 0eh ;報警設置字節
digital_byte equ 10h ;顯存首址,連續8字節為顯存
date_data equ 20h ;時鐘數據首地址
;*****************************************************
;主程序
;*****************************************************
org 0000h
jmp start
org 000bh
jmp time_int
org 0013h
jmp keys_int
org 0030h
start: mov p0,#0
mov p1,#0fh
mov p2,#0
mov p3,#0ffh
mov sp,#60h ;堆棧地址
mov r0,#7fh ;Clear the ram
clr a
main_clear0: mov @r0,a
djnz r0,main_clear0
mov digital_bit,#1
mov r0,#aleart_data ;默認的報警時間
mov @r0,#00h ;分
inc r0
mov @r0,#07h ;時
call timer_set
call iicread
setb ex0
setb ex1
setb ea
call beep1
main_wait: call digital
mov a,keys_byte
cjne a,#0,keysmanagement
jmp main_wait
keysmanagement: call keys_management
mov keys_byte,#0
jmp main_wait
;*****************************************************
;子程序文件載入
;*****************************************************
include "iic.asm"
include "beep.asm"
include "keysmanagement.asm"
include "timer.asm"
include "display.asm"
include "time_int.asm"
include "aleart_check.asm"
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -