www.pudn.com > s3c9454.rar > seg_sam_head.src


      include "c:\skStudio\include\reg\S3C9454.reg" 
 
led_data_buf0		equ	00h 
led_data_buf1		equ	01h 
led_data_buf2		equ	02h 
led_data_buf3		equ	03h 
led_data_buf4		equ	04h 
 
led_1_cnt		equ	05h 
led_2_cnt		equ	06h 
led_3_cnt		equ	07h 
run_number_cnt		equ	09h 
led_cnt			equ	0ah 
 
all_led_flg0		equ	0bh 
 
refurbish_flg0		equ	00000001b 
dis_H_led_flg0		equ	00000010b 
un_refurbish_flg0	equ	11111110b 
undis_H_led_flg0	equ	11111101b 
;========时间定义============ 
one_ms_cnt		equ	0ch 
ten_ms_cnt		equ	0dh 
quarter_s_cnt		equ	0eh 
half_second_cnt		equ	0fh 
one_second_cnt		equ	010h 
one_minu_cnt		equ	011h 
one_hour_cnt		equ	012h 
;=========蜂鸣器内存定义=========== 
all_beep_flg		equ	013h 
 
beep_stop_flag		equ	00000001b 
er_beep_flg		equ	00000010b 
allow_beep_flg		equ	00000100b 
 
clr_beep_stop_flag	equ	11111110b 
clr_er_beep_flg		equ	11111101b 
unallow_beep_flg	equ	11111011b 
 
beep_tim_cnt		equ	014h 
give_beep_times		equ	015h 
long_beep_cnt		equ	016h 
beep_buf		equ	017h 
;==========按键扫描===================== 
;直接扫描方式,前5行为设置输入输出 
;keybuf0,keybuf1为存放键值,低电平为按键有效2006-3-22 14:22 
;keybuf2,keybuf3存放上次键值 0-2 1-3 
;一次按键加一的寄存器keyactcnt 
;加到N次后确定按键的寄存器keycmpcnt 
; 
;==========内存定义=========================== 
 
allkeyflag		equ	018h 
 
key_part_flg		equ	00010000b 
samekeyflag		equ 00001000b			;同一按键标志 
Keyingflag		equ	00000100b			; 
keyonflag		equ	00000010b			;确定有键按下的标志 
keybackflag		equ	00000001b			;手是否松开的标志 
 
clr_key_part_flg	equ	11101111b 
clrsamekeyflag		equ	11110111b			; 
clrKeyingflag		equ	11111011b			; 
clrkeyonflag		equ	11111101b			; 
clrkeybackflag		equ	11111110b			; 
clr_samekey_on_flg	equ	11110101b 
;=======功能数据--- 
quicks_cook_data	equ	1 
criterion_cook_data	equ	2 
cook_tile_rice_data	equ	3 
cook_conjee_data	equ	4 
cook_soup_data		equ	5 
again_heat_data		equ	6 
;=======按键数据--- 
open_close_data		equ	0feh 
func_choice_data	equ	0efh 
faith_data		equ	0fdh 
hour_key_data		equ	0bfh 
minu_key_data		equ	0f7h 
;================ 
key_dec_times		equ	019h 
key_buf0		equ	01ah 
key_buf2		equ	01bh 
;============================ 
main_program_cnt	equ	01ch 
 
work_flg0		equ	01dh 
start_work_flg0		equ	00000001b 
faith_start_flg0	equ	00000010b 
faith_work_flg0		equ	00000100b 
have_function_flg0	equ	00001000b 
 
unchange_faith_t_flg0	equ	00010000b 
allow_timing_flg0	equ	00100000b 
unfaith_work_flg0	equ	11111011b 
 
function_key_cnt	equ	01eh 
work_time_minu		equ	01fh 
work_time_max		equ	020h 
work_time_min		equ	021h 
faith_time_m_H		equ	022h 
faith_time_m_L		equ	023h 
work_one_second		equ	024h 
 
 
 
 
p0_0_is_low macro	 
		or	p0,#00001110b 
		or	p1,#00000001b 
		and	p0,#11111110b 
	endm 
p0_1_is_low macro	 
		or	p0,#00001101b 
		or	p1,#00000001b 
		and	p0,#11111101b 
	endm 
p0_2_is_low macro	 
		or	p0,#00001011b 
		and	p0,#11111011b 
	endm 
p0_3_is_low macro	 
		or	p0,#00000111b 
		or	p1,#00000001b 
		and	p0,#11110111b 
	endm 
p1_1_is_low	macro 
		or	p0,#00001111b 
		and	p1,#11111110b 
	endm 
Reg_save macro	 
		push	SYM 
		push	flags 
		push	R0 
		push	R1 
		push	R2 
		push	R3 
	endm 
; 
Reg_restore macro 
		pop	R3 
		pop	R2 
		pop	R1 
		pop	R0 
		pop	flags 
		pop	SYM 
	endm