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

📄 v3k_fram_use_example_sdcc.rst

📁 这是ramtron公司的铁电单片机的开发程序
💻 RST
📖 第 1 页 / 共 4 页
字号:
                            453 	.area PSEG    (PAG,XDATA)
                            454 ;--------------------------------------------------------
                            455 ; external ram data
                            456 ;--------------------------------------------------------
                            457 	.area XSEG    (XDATA)
                    8000    458 G$frambase$0$0 == 0x8000
                    8000    459 _frambase	=	0x8000
                            460 ;--------------------------------------------------------
                            461 ; external initialized ram data
                            462 ;--------------------------------------------------------
                            463 	.area XISEG   (XDATA)
                            464 	.area CSEG    (CODE)
                            465 	.area GSINIT0 (CODE)
                            466 	.area GSINIT1 (CODE)
                            467 	.area GSINIT2 (CODE)
                            468 	.area GSINIT3 (CODE)
                            469 	.area GSINIT4 (CODE)
                            470 	.area GSINIT5 (CODE)
                            471 ;--------------------------------------------------------
                            472 ; interrupt vector 
                            473 ;--------------------------------------------------------
                            474 	.area CSEG    (CODE)
   0000                     475 __interrupt_vect:
   0000 02 01 2F            476 	ljmp	__sdcc_gsinit_startup
                            477 ;--------------------------------------------------------
                            478 ; global & static initialisations
                            479 ;--------------------------------------------------------
                            480 	.area CSEG    (CODE)
                            481 	.area GSINIT  (CODE)
                            482 	.area GSFINAL (CODE)
                            483 	.area GSINIT  (CODE)
                            484 	.globl __sdcc_gsinit_startup
                            485 	.globl __sdcc_program_startup
                            486 	.globl __start__stack
                            487 	.globl __mcs51_genXINIT
                            488 	.globl __mcs51_genXRAMCLEAR
                            489 	.globl __mcs51_genRAMCLEAR
                    0000    490 	G$main$0$0 ==.
                    0000    491 	C$V3K_FRAM_Use_Example_SDCC.c$27$1$1 ==.
                            492 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:27: xdata unsigned char * data framptr = &frambase ;		//Init a pointer in IRAM pointing to the frambase var.
                            493 ;     genAddrOf
   0188 75 08 00            494 	mov	_framptr,#_frambase
   018B 75 09 80            495 	mov	(_framptr + 1),#(_frambase >> 8)
                            496 	.area GSFINAL (CODE)
   018E 02 00 03            497 	ljmp	__sdcc_program_startup
                            498 ;--------------------------------------------------------
                            499 ; Home
                            500 ;--------------------------------------------------------
                            501 	.area HOME    (CODE)
                            502 	.area CSEG    (CODE)
                            503 ;--------------------------------------------------------
                            504 ; code
                            505 ;--------------------------------------------------------
                            506 	.area CSEG    (CODE)
   0003                     507 __sdcc_program_startup:
   0003 12 00 08            508 	lcall	_main
                            509 ;	return from main will lock up
   0006 80 FE               510 	sjmp .
                            511 ;------------------------------------------------------------
                            512 ;Allocation info for local variables in function 'main'
                            513 ;------------------------------------------------------------
                            514 ;cptr                      Allocated with name '_main_cptr_1_1'
                            515 ;framread                  Allocated with name '_main_framread_1_1'
                            516 ;------------------------------------------------------------
                    0008    517 	G$main$0$0 ==.
                    0008    518 	C$V3K_FRAM_Use_Example_SDCC.c$33$0$0 ==.
                            519 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:33: void main (void){
                            520 ;	-----------------------------------------
                            521 ;	 function main
                            522 ;	-----------------------------------------
   0008                     523 _main:
                    0002    524 	ar2 = 0x02
                    0003    525 	ar3 = 0x03
                    0004    526 	ar4 = 0x04
                    0005    527 	ar5 = 0x05
                    0006    528 	ar6 = 0x06
                    0007    529 	ar7 = 0x07
                    0000    530 	ar0 = 0x00
                    0001    531 	ar1 = 0x01
                    0008    532 	C$V3K_FRAM_Use_Example_SDCC.c$34$1$0 ==.
                            533 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:34: volatile idata int  cptr= 0x00;					   //general purpose counter
                            534 ;     genAssign
   0008 78 0A               535 	mov	r0,#_main_cptr_1_1
   000A E4                  536 	clr	a
   000B F6                  537 	mov	@r0,a
   000C 08                  538 	inc	r0
   000D F6                  539 	mov	@r0,a
                    000E    540 	C$V3K_FRAM_Use_Example_SDCC.c$35$1$0 ==.
                            541 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:35: volatile idata char framread = 0x00;
                            542 ;     genAssign
   000E 78 0C               543 	mov	r0,#_main_framread_1_1
   0010 76 00               544 	mov	@r0,#0x00
                    0012    545 	C$V3K_FRAM_Use_Example_SDCC.c$37$1$1 ==.
                            546 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:37: DEVMEMCFG  |= 0xC0;					     //Activate the FRAM
                            547 ;     genOr
   0012 43 F6 C0            548 	orl	_DEVMEMCFG,#0xC0
                    0015    549 	C$V3K_FRAM_Use_Example_SDCC.c$40$1$1 ==.
                            550 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:40: FRAMCFG1 = 0x01;						//Set FRAMWEL = 1 Enable Write  (FRAMOP = 00)
                            551 ;     genAssign
   0015 75 DC 01            552 	mov	_FRAMCFG1,#0x01
                    0018    553 	C$V3K_FRAM_Use_Example_SDCC.c$41$1$1 ==.
                            554 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:41: while(!(FRAMCFG1&0x80));					//Wait FREADIDLE == 1  (FRAM IDLE)
   0018                     555 00101$:
                            556 ;     genAnd
   0018 E5 DC               557 	mov	a,_FRAMCFG1
                            558 ;     genIfxJump
                            559 ;	Peephole 111	removed ljmp by inverse jump logic
   001A 30 E7 FB            560 	jnb	acc.7,00101$
   001D                     561 00170$:
                    001D    562 	C$V3K_FRAM_Use_Example_SDCC.c$43$1$1 ==.
                            563 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:43: FRAMCFG2 = 0x00;						//Configure FRAMCFG2 to remove FRAM content Protection 
                            564 ;     genAssign
   001D 75 DD 00            565 	mov	_FRAMCFG2,#0x00
                    0020    566 	C$V3K_FRAM_Use_Example_SDCC.c$44$1$1 ==.
                            567 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:44: FRAMCFG1 = 0x07;						//Execute Transfert of FRAMCFG2 module to FRAM Module
                            568 ;     genAssign
   0020 75 DC 07            569 	mov	_FRAMCFG1,#0x07
                    0023    570 	C$V3K_FRAM_Use_Example_SDCC.c$45$1$1 ==.
                            571 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:45: while(!(FRAMCFG1&0x80));					//Wait FREADIDLE == 1  (FRAM IDLE)
   0023                     572 00104$:
                            573 ;     genAnd
   0023 E5 DC               574 	mov	a,_FRAMCFG1
                            575 ;     genIfxJump
                            576 ;	Peephole 111	removed ljmp by inverse jump logic
   0025 30 E7 FB            577 	jnb	acc.7,00104$
   0028                     578 00171$:
                    0028    579 	C$V3K_FRAM_Use_Example_SDCC.c$47$1$1 ==.
                            580 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:47: FRAMCFG1 = 0x03;						//Disable the write operations 
                            581 ;     genAssign
   0028 75 DC 03            582 	mov	_FRAMCFG1,#0x03
                    002B    583 	C$V3K_FRAM_Use_Example_SDCC.c$49$1$1 ==.
                            584 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:49: while(!(FRAMCFG1&0x80));					//Wait FREADIDLE == 1  (FRAM IDLE)
   002B                     585 00107$:
                            586 ;     genAnd
   002B E5 DC               587 	mov	a,_FRAMCFG1
                            588 ;     genIfxJump
                            589 ;	Peephole 111	removed ljmp by inverse jump logic
   002D 30 E7 FB            590 	jnb	acc.7,00107$
   0030                     591 00172$:
                    0030    592 	C$V3K_FRAM_Use_Example_SDCC.c$53$1$1 ==.
                            593 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:53: for(cptr = 0; cptr < 0x2000; cptr++)
                            594 ;     genAssign
   0030 78 0A               595 	mov	r0,#_main_cptr_1_1
   0032 E4                  596 	clr	a
   0033 F6                  597 	mov	@r0,a
   0034 08                  598 	inc	r0
   0035 F6                  599 	mov	@r0,a
   0036                     600 00131$:
                            601 ;     genCmpLt
   0036 78 0A               602 	mov	r0,#_main_cptr_1_1
                            603 ;     genCmp
   0038 C3                  604 	clr	c
   0039 E6                  605 	mov	a,@r0
   003A 94 00               606 	subb	a,#0x00
   003C 08                  607 	inc	r0
   003D E6                  608 	mov	a,@r0
   003E 64 80               609 	xrl	a,#0x80
   0040 94 A0               610 	subb	a,#0xa0
                            611 ;     genIfxJump
                            612 ;	Peephole 108	removed ljmp by inverse jump logic
   0042 50 1C               613 	jnc	00134$
   0044                     614 00173$:
                    0044    615 	C$V3K_FRAM_Use_Example_SDCC.c$54$1$1 ==.
                            616 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:54: *(framptr+cptr) = 0x55;
                            617 ;     genPlus
   0044 78 0A               618 	mov	r0,#_main_cptr_1_1
   0046 E6                  619 	mov	a,@r0
   0047 25 08               620 	add	a,_framptr
   0049 F5 82               621 	mov	dpl,a
   004B 08                  622 	inc	r0
   004C E6                  623 	mov	a,@r0
   004D 35 09               624 	addc	a,(_framptr + 1)
   004F F5 83               625 	mov	dph,a
                            626 ;     genPointerSet
                            627 ;     genFarPointerSet
   0051 74 55               628 	mov	a,#0x55
   0053 F0                  629 	movx	@dptr,a
                    0054    630 	C$V3K_FRAM_Use_Example_SDCC.c$53$1$1 ==.
                            631 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:53: for(cptr = 0; cptr < 0x2000; cptr++)
                            632 ;     genPlus
   0054 78 0A               633 	mov	r0,#_main_cptr_1_1
                            634 ;     genPlusIncr
   0056 74 01               635 	mov	a,#0x01
   0058 26                  636 	add	a,@r0
   0059 F6                  637 	mov	@r0,a
                            638 ;	Peephole 181	changed mov to clr
   005A E4                  639 	clr	a
   005B 08                  640 	inc	r0
   005C 36                  641 	addc	a,@r0
   005D F6                  642 	mov	@r0,a
                            643 ;	Peephole 112.b	changed ljmp to sjmp
   005E 80 D6               644 	sjmp	00131$
   0060                     645 00134$:
                    0060    646 	C$V3K_FRAM_Use_Example_SDCC.c$58$1$1 ==.
                            647 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:58: framread = *(framptr + 0x0100);         //framread will contain 0x55
                            648 ;     genPlus
                            649 ;     genPlus shortcut
   0060 AA 08               650 	mov	r2,_framptr
   0062 74 01               651 	mov	a,#0x01
   0064 25 09               652 	add	a,(_framptr + 1)
   0066 FB                  653 	mov	r3,a
                            654 ;     genPointerGet
                            655 ;     genFarPointerGet
   0067 8A 82               656 	mov	dpl,r2
   0069 8B 83               657 	mov	dph,r3
   006B E0                  658 	movx	a,@dptr
   006C FC                  659 	mov	r4,a
                            660 ;     genAssign
   006D 78 0C               661 	mov	r0,#_main_framread_1_1
   006F A6 04               662 	mov	@r0,ar4
                    0071    663 	C$V3K_FRAM_Use_Example_SDCC.c$61$1$1 ==.
                            664 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:61: *(framptr + 0x0100) = 0x23;
                            665 ;     genPointerSet
                            666 ;     genFarPointerSet
   0071 8A 82               667 	mov	dpl,r2
   0073 8B 83               668 	mov	dph,r3
   0075 74 23               669 	mov	a,#0x23
   0077 F0                  670 	movx	@dptr,a
                    0078    671 	C$V3K_FRAM_Use_Example_SDCC.c$64$1$1 ==.
                            672 ;c:/APP_ENG/Released_Demo_Programs/V3k_demo_programs/V3K_FRAM_Demo_SDCC/V3K_FRAM_Use_Example_SDCC.c:64: framread = *(framptr + 0x0100);        //framread will contain 0x23
                            673 ;     genPointerGet
                            674 ;     genFarPointerGet
   0078 8A 82               675 	mov	dpl,r2
   007A 8B 83               676 	mov	dph,r3
   007C E0                  677 	movx	a,@dptr
   007D FA                  678 	mov	r2,a

⌨️ 快捷键说明

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