unsigned short a=10;
unsigned short b;
unsigned short c;
unsigned long d;

b = (unsigned short)(d/2400)/60;   /*ok */

==============================================

//sbit p3_0 = P3^0;

unsigned long fun();

unsigned short a=10;
unsigned short b;
unsigned short c;
unsigned long d;
//int a,b;
//long c;

void main()
{
d = (unsigned long)b * a;
// d = (long)b*a;
// b = d / a;
// unsigned long tmp;
// unsigned short tmp1,tmp2;

// #pragma ot(4,size)
// c = ((long)a * b)/10; /* MUL and DIVL */

intrinsic function for 32bit multiplication

hello,
are there intrinsic functions available for the XC164 to use the multiply unit of the ALU?
For example for calculations like:
16bit x 16bit = 32bit (MUL-instruction)or
32bit / 16bit = 16bit (DIVL-instruction)?

regards!
Andreas

 
Read-Only
Author
Mike Kleshov
Posted
5-Jun-2005 12:03 GMT
Toolset
C166
 RE: intrinsic function for 32bit multiplication

As far as I know, there are no such intrinsic functions. Besides, why would you need them when the compiler emits the appropriae instructions well enough? Just compile the following piece of code and see the compiler output:

int a, b;
long c; void main(void)
{
c = a * (long)b;
b = c / a;
}

Regards,
- mike

 
Read-Only
Author
Andreas Greif
Posted
11-Jun-2005 17:14 GMT
Toolset
C166
 RE: intrinsic function for 32bit multiplication

Hi Mike,
Thanks for the answer!
With the tasking compiler this was a problem.
With Keil it works well!

regards
Andreas

c166 -div的更多相关文章

  1. IE6/7下空div占用空间的问题

    最近注意力没在前端上面,工作碰到这样一个问题,下意识的写了句 font-size:0;line-height:0;哪知道引发了更大的bug.后来插入数据进去的时候都不显示了..再后来百度一番找到,原来 ...

  2. div实现自适应高度的textarea,实现angular双向绑定

    相信不少同学模拟过腾讯的QQ做一个聊天应用,至少我是其中一个. 过程中我遇到的一个问题就是QQ输入框,自适应高度,最高高度为3row. 如果你也像我一样打算使用textarea,那么很抱歉,你一开始就 ...

  3. 冒泡,setinterval,背景图的div绑定事件,匿名函数问题

    1.会冒泡到兄弟元素么? $(function(){ $("#a").click(function(){alert("a")}) $("#b" ...

  4. css居中div的几种常用方法

    在开发过程中,很多需求需要我们居中一个div,比如html文档流当中的一块div,比如弹出层内容部分这种脱离了文档流等.不同的情况有不同的居中方式,接下来就分享下一下几种常用的居中方式. 1.text ...

  5. Div Vertical Menu ver5

    这个小功能,如果是算此次,已经是第5次修改了.可以从这里看到前4次:V1, http://www.cnblogs.com/insus/archive/2011/10/17/2215637.html V ...

  6. 计算Div标签内Checkbox个数或已被disabled的个数

    先看下面的html: 计算div内的checkbox个数:$('#divmod input[type="checkbox"]').length 计算div内checkbox被dis ...

  7. [jquery]显示隐藏div标签的几种方法

    1.$("#demo").attr("style","display:none;");//隐藏div $("#demo" ...

  8. CSS3变形记(上):千变万化的Div

    传统上,css就是用来对网页进行布局和渲染网页样式的.然而,css3的出现彻底打破了这一格局.了解过css3的人都知道,css3不但可以对网页进行布局和渲染样式,还可以绘制一些图形.对元素进行2D和3 ...

  9. 如何隐藏DIV对象

    DIV对象在网页里面,相当于一个容器,在其内部,可以显示文字.图片.视频控件等等. 以下的教程,和大家一起来学习,如何隐藏DIV对象. 这必须使用CSS来控制,才能达到隐藏的目的,那么,就得使用CSS ...

随机推荐

  1. <Using parquet with impala>

    Operations upon Impala Create table stored as parquet like parquet '/user/etl/datafile1' stored as p ...

  2. day 27 多态 接口 类方法 静态方法 hashlib 摘要算法模块

    # 多态的理解:# Python 天生自带多态# 鸭子类型 list 和 tuple 就是一对鸭子类型 很像但是没有继承关系## 而其他的类型 上传参数或者打印参数的时候 必须是指定的数据类型# -- ...

  3. xampp 忘记密码的处理方式.

    网上看到一些方法: 大部分是第一种:  方法一 这个方法, 我使用的时候没有生效. -------------- 后来看到另外一种方法 .  直接替换user表的三个文件.  这个方法成功了. xam ...

  4. Day15作业及默写

    1.整理今天内容 PASS 2.现有列表alist = [3,1,-4,2,-6] 按照元素的绝对值大小进行排序 alist = [3,1,-4,2,-6] sorted(alist,key=lamb ...

  5. vuejs 1.x与2.x差异

    1.x与2.x区别 v-for列表查询中 当前下标:$index --> index 1.x 用法 v-for="v in myData" =>$index获取下标 / ...

  6. SQL注入之Sqli-labs系列第二关

    废话不在多说  let's go!   继续挑战第二关(Error Based- Intiger) 同样的前奏,就不截图了 ,and 1=1和and 1=2进行测试,出现报错 还原sql语句 查看源代 ...

  7. 大数据-07-Spark之流数据

    摘自 http://dblab.xmu.edu.cn/blog/1084-2/ 简介 DStream是Spark Streaming的编程模型,DStream的操作包括输入.转换和输出. Spark ...

  8. [转]redis主从配置及主从切换

    http://blog.csdn.net/zfl092005/article/details/17523945 环境描述: 主Redis:192.168.10.1 6379 从redis:192.16 ...

  9. I.MX6 使用Ubuntu文件系统

    /********************************************************************************* * I.MX6 使用Ubuntu文 ...

  10. Bigining

    今天,我的第一个软件工程项目团队组建成功,找到了自己的队友. 从现在开始就要分析和构思项目的具体内容.