公告

非常抱歉,由于我们的服务器提供商硬盘出错,数据丢失,网站重建中...
I am so sorry, because of our server's hard disk error, data lost, the website reconstructioning
QQ:512000523
MSN : funchip@hotmail.com

 
首页 arrow 技术文章 arrow setp arrow AvrGCC程序跳转
AvrGCC程序跳转 Recommend to my friend via E-mail(推荐给朋友)
作者: Administrator   
2007-11-14

##########FunChip整理测试修编写########

A:怎么使程序软件复位?

Q:

  要使程序软件复位,可以有以下几种方法:
1. #define JUMPRESET asm volatile ("ijmp"::"z" (0) )
  2. asm( "rjmp .-xxxx" );   //这里的XXXX为这条指令所在的地址

Q:

  1. 还是使用ijmp.
         asm volatile
         ( 
               "ldi r31,0x0C" "\n\t" 
               "ldi r31,0x00" "\n\t" 
               "ijmp" "\n\t"
 
         ); 
需要得到要跳转的地址,使用不方便.

  2. 直接使用rjmp或者jmp

asm( "rjmp test"  );  这里test是要跳转的函数名

A:在C中,如何用汇编跳转到指定程序

Q:
  void test(void)
     {
    }

          asm volatile
         ( 
               "jmp test" "\n\t" 
         ); 

评论 (0)Add Comment

输入评论内容
quote
bold
italicize
underline
strike
url
image
quote
quote
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley
Smiley

security code
输入验证码


busy
最近更新 ( 2007-11-18 )
 
< 上一篇   下一篇 >

© 2009 杭州福芯电子 浙ICP备05040812号
Joomla!是基于GNU/GPL许可发行的免费软件.