这是本人写的一个C51单片机的软件重启的工程示例

源代码在线查看: reset.lst

软件大小: 27 K
上传用户: thor
关键词: C51 单片机 软件 工程
下载地址: 免注册下载 普通下载 VIP

相关代码

				A51 MACRO ASSEMBLER  RESET                                                                04/14/2006 10:09:05 PAGE     1
				
				
				MACRO ASSEMBLER A51 V7.08a
				OBJECT MODULE PLACED IN Reset.OBJ
				ASSEMBLER INVOKED BY: C:\Program Files\Keil\C51\BIN\A51.EXE Reset.asm SET(SMALL) DEBUG EP
				
				LOC  OBJ            LINE     SOURCE
				
				                       1     ;-------------------------------------------------
				                       2     ;-------------SoftReset test C51------------------
				                       3     ;----Written by WangBiao---20060414---------------
				                       4     ;-------------------------------------------------
				                       5     ; C prototype:extern void reset (void);
				                       6     ;-------------------------------------------------
				                       7     ?PR?RESET SEGMENT CODE
				----                   8     RSEG ?PR?RESET
				                       9     PUBLIC reset
				0000 75D000           10     reset:  MOV PSW, #0   ; using bank0
				0003 D0E0             11             POP ACC       ; pop return address
				0005 D0E0             12             POP ACC
				0007 E4               13             CLR A         ; push 0 as new
				0008 C0E0             14             PUSH ACC      ; return address to stack
				000A C0E0             15             PUSH ACC
				000C 32               16             RETI          ; execute return of interrupt
				                      17             END
				                             ;--------------------------------------------------
				A51 MACRO ASSEMBLER  RESET                                                                04/14/2006 10:09:05 PAGE     2
				
				SYMBOL TABLE LISTING
				------ ----- -------
				
				
				N A M E             T Y P E  V A L U E   ATTRIBUTES
				
				?PR?RESET. . . . .  C SEG    000DH       REL=UNIT
				ACC. . . . . . . .  D ADDR   00E0H   A   
				PSW. . . . . . . .  D ADDR   00D0H   A   
				RESET. . . . . . .  C ADDR   0000H   R   SEG=?PR?RESET
				
				
				REGISTER BANK(S) USED: 0 
				
								ASSEMBLY COMPLETE.  0 WARNING(S), 0 ERROR(S)
							

相关资源