⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmr_wdt.asm

📁 嵌入式操作系统的基本输入输出程序
💻 ASM
字号:
;/////////////////////////////////////////////////////////////////////;////                                                             ////;////  Mini-RISC-1                                                ////;////  Timer / Wachdog                                            ////;////  Tests Timer / Wachdog                                      ////;////                                                             ////;////  Author: Rudolf Usselmann                                   ////;////          russelmann@hotmail.com                             ////;////                                                             ////;/////////////////////////////////////////////////////////////////////;////                                                             ////;//// Copyright (C) 2000 Rudolf Usselmann                         ////;////                    russelmann@hotmail.com                   ////;////                                                             ////;//// This source file may be used and distributed without        ////;//// restriction provided that this copyright statement is not   ////;//// removed from the file and that any derivative work contains ////;//// the original copyright notice and the associated disclaimer.////;////                                                             ////;//// THIS SOURCE FILE IS PROVIDED "AS IS" AND WITHOUT ANY        ////;//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT           ////;//// LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND   ////;//// FITNESS FOR A PARTICULAR PURPOSE.                           ////;////                                                             ////;/////////////////////////////////////////////////////////////////////	list	p=16c57	#include p16c5x.inc; global Registersr0	equ	0x8r1	equ	0x9r2	equ	0xar3	equ	0xbr4	equ	0xcr5	equ	0xdr6	equ	0xer7	equ	0xf; banked Registersbr0	equ	0x10br1	equ	0x11br2	equ	0x12br3	equ	0x13br4	equ	0x14br5	equ	0x15br6	equ	0x16br7	equ	0x17br8	equ	0x18br9	equ	0x19br10	equ	0x1abr11	equ	0x1bbr12	equ	0x1cbr13	equ	0x1dbr14	equ	0x1ebr15	equ	0x1f;	PORTB Indicates Test Number;	PORTA Indicates Status: 0 - Running; 1 - done OK; ff - stoped on errormain	; Main code entry	; Port IO Test	; All ports have a Pull up resistor		; SETUP all ports	clrw	movwf	FSR	movwf	PORTA	movwf	PORTB	movwf	PORTC	tris	PORTA	tris	PORTB	tris	PORTC	; ---------------------------------------	; ---- Test RMW on Register fil      ----	; ---------------------------------------	movlw	0x01	; 	TEST 1	movwf	PORTB	; Set Test Number	movlw	0x00	option	movwf	TMR0	clrwdt	nop	nop	nop	nop	clrw	movwf	r1loop2	; repeat 256 times	clrw	movwf	r0	; repeat 256 timesloop1	movfw	TMR0	decfsz	r0,F	goto	loop1	decfsz	r1,F	goto	loop2	nop	nop	nop	nop	nop	nop	clrw	movwf	TMR0	clrwdt	nop	nop	nop	nop	movlw	0x01	movwf	PORTA	nop	nop	nop	nopgood			; Loop in good on success	goto	good	nop	nop	nop	noplerr	movlw	0xff	movwf	PORTA	nop	nop	nop	noplerr_loop		; Loop in lerr on failure	goto	lerr_loop	nop	nop	nop	nop   END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -