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. L322

    As a nutritionist helping people shed pounds, I often recommend incorporating portion-controlled des ...

  2. L251

    Beer before wine, or wine before beer; whatever the order, you’ll feel queer. That, at least, is the ...

  3. centos/7下安装mysql5.7

    本文参考自:https://blog.csdn.net/fanshujuntuan/article/details/78077433 背景:在ubuntu下用vagrant搭建了一个集群环境, 每个虚 ...

  4. nginx 隐藏nginx版本号

    为什么要隐藏 Nginx 版本号:一般来说,软件的漏洞都与版本有关,隐藏版本号是为了防止恶意用户利用软件漏洞进行攻击 worker_processes 1; events { worker_conne ...

  5. nginx保持会话的方式

    1)ip_hash 简单易用,但是有如下缺点 后端服务器宕机后,session会丢失 来自同一局域网的客户端会被转发到同一个后端服务器,可能导致负载失衡 不适用CDN网络,不适用于前段还有代理的情况 ...

  6. 本周java 学习进度报告

    本周java 学习进度报告 本周对我的感触很深,因为这是我初学java 语言的第一周,我认识到java 和c语言是有很多的不同之处和相同之处.我这几天几乎是在研究java 基础入门知识,而并没有太多的 ...

  7. VB识别分隔符

    strTypeEx = ReadIniFile("Type", "Type", App.Path & "\set.ini") str ...

  8. Java中的13个原子操作类

    java.util.concurrent.atomic包一共提供了13个类.属于4种类型的原子更新方式,分别是原子更新基本类型,原子更新数组,原子更新引用和原子更新属性.Atomic包里的类基本都是使 ...

  9. react-navigation 使用详解(转载)

    上篇博客和大家分享了关于React Native jsBundle预加载,界面启动优化的内容,详情可点击: 基于最新版本React Native实现JsBundle预加载,界面秒开优化 一.开源库介绍 ...

  10. Python学习笔记第十二周

    目录: 数据库介绍 mysql 数据库安装使用 mysql管理 mysql 数据类型 常用mysql命令事务 索引 创建数据库 外键 增删改查表 权限 python 操作mysql  ORM sqla ...