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. http协议tcp协议ip协议三次握手四次挥手,为什么三次握手,为什么四次挥手,sockete套接字理解

    1.1 TCP是什么? TCP是Tranfer Control Protocol的简称,TCP协议是一种面向连接的.可靠的.基于字节流的运输层通信协议.通过TCP协议传输,得到的是一个顺序的无差错的数 ...

  2. DRF-Rest_Framework 学习文档

    序列化器(serializer) 定义Serializer 1. 定义方法 Django REST framework中的Serializer使用类来定义,须继承自rest_framework.ser ...

  3. 1--常用linux命令

    参考链接:http://www.cnblogs.com/yjd_hycf_space/p/7730690.html 文件和目录 cd /home 进入 '/ home' 目录' cd .. 返回上一级 ...

  4. 初识爬虫见到的两个类 BufferedWriter和 BufferedReader

    BufferedWriter 和 BufferedReader 为带有默认缓冲的字符输出输入流,因为有缓冲区所以很效率比没有缓冲区的高. 使用BufferedWriter和BufferedReader ...

  5. 对ajax中数据的得到以及绑定的认识

    1.将后台得到的数据绑定到datagrid为例: 第一种是: 后台得到的数据直接绑定到datagrid上面,如下图: 这样操作的好处在于可以使界面比较简洁. 第二种是将得到的数据作为参数的形式绑定到d ...

  6. linux列出目录下所有目录

    我的一个目录下有很多文件,但是我想列出该目录下所有的目录,并且删除 列出目录下所有的目录,常用的方法是ll配合管道命令,比如 ll | grep "^d" 通过对ll命令的输出,抓 ...

  7. python---map 用法 [转载]

    map()函数 map()是 Python 内置的高阶函数,它接收一个函数 f 和一个 list,并通过把函数 f 依次作用在 list 的每个元素上,得到一个新的 list 并返回. 1.当seq只 ...

  8. hdoj-1022(栈的模拟)

    #include <iostream> #include <cstring> #include <algorithm> #include <stack> ...

  9. day 020 常用模块02

    主要内容: 什么是序列化 pickle shelve json configparser(模块) 一 序列化 我们在存储数据或者网络传输数据的时候,需要对我们的对象进行处理,把对象处理成方便存储和 传 ...

  10. linux 的IP配置和网络问题的排查

    1.6  IP的配制, 首先要会用: ifconfig  和加相关参数如: ifconfig -a, 来查看,自己的电脑网络配制. 再次就必需要知道,默认IP配制文件的地方: cd /etc/sysc ...