<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > keil C51中的本征函數(shù)庫及使用說明

          keil C51中的本征函數(shù)庫及使用說明

          作者: 時間:2016-11-18 來源:網絡 收藏
          本征函數(shù)(intrinsicroutines)是指編譯時直接將固定代碼插入當前行,而不用ACALL和LCALL

          來實現(xiàn)(無需堆棧操作?),可大大提高函數(shù)的訪問效率.

          本文引用地址:http://www.ex-cimer.com/article/201611/315687.htm


          函數(shù)原型
          extern void _nop_ (void);
          extern bit _testbit_ (bit);
          extern unsigned char _cror_ (unsigned char, unsigned char);
          extern unsigned int _iror_ (unsigned int, unsigned char);
          extern unsigned long _lror_ (unsigned long, unsigned char);
          extern unsigned char _crol_ (unsigned char, unsigned char);
          extern unsigned int _irol_ (unsigned int, unsigned char);
          extern unsigned long _lrol_ (unsigned long, unsigned char);
          extern unsigned char _chkfloat_(float);
          頭文件
          #include

          說明

          extern void _nop_ (void);
          產生一個nop指令

          extern bit_testbit_ (bit);
          產生一個JBC指令,若該位置位,返回1,否則為0;只能作用于直接尋址的位變量,不能用于表達式

          之中

          extern unsigned char _cror_ (unsigned char val, unsigned char n);
          (unsigned char)val右移n位

          extern unsigned int _iror_ (unsigned int val, unsigned char n));
          (unsigned int)val右移n位

          extern unsigned long _lror_ (unsigned long val, unsigned char n));
          (unsigned long)val右移n位

          extern unsigned char _crol_ (unsigned char val, unsigned char n));
          (unsigned char)val左移n位

          extern unsigned int _irol_ (unsigned int val, unsigned char n));
          (unsigned int)val左移n位

          extern unsigned long _lrol_ (unsigned long val, unsigned char n));
          (unsigned long)val左移n位

          extern unsigned char _chkfloat_(float);
          測試并返回float的狀態(tài)
          一下摘自keil C51的幫助文檔
          0 Standard floating-point numbers 標準浮點數(shù)
          1 Floating-point value 0 浮點數(shù)0
          2 +INF (positive overflow) 正溢出
          3 -INF (negative overflow) 負溢出
          4 NaN (Not a Number) error status出錯


          參考文獻
          李軍等編著.51系列單片機高級實例開發(fā)指南.北京-北京航空航天大學出版社 2004
          keil software,inc. C51 users guide



          評論


          技術專區(qū)

          關閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();