首页 \ 问答 \ C代码如何调用汇编代码(例如,优化的strlen)?(How does C code call assembly code (e.g. optimized strlen)?)

C代码如何调用汇编代码(例如,优化的strlen)?(How does C code call assembly code (e.g. optimized strlen)?)

我总是阅读有关C编程语言中某些函数如何通过汇编写入来优化的内容。 如果这句话听起来有点误导,让我道歉。

所以,我会说清楚:当你在UNIX / C系统上调用像strlen这样的函数时,你调用的实际函数是用汇编语言编写的? 你能否以某种方式将程序集编写成C程序,还是外部呼叫情况? 它能够做到这一点是C标准的一部分,还是它是一个特定于操作系统的东西?


I always read things about how certain functions within the C programming language are optimized by being written in assembly. Let me apologize if that sentence sounds a little misguided.

So, I'll put it clearly: How is it that when you call some functions like strlen on UNIX/C systems, the actual function you're calling is written in assembly? Can you write assembly right into C programs somehow or is it an external call situation? Is it part of the C standard to be able to do this, or is it an operating system specific thing?


原文:https://stackoverflow.com/questions/7300160
更新时间:2022-03-24 17:03

最满意答案

其他回答

ed2k://|file|cn_windows_7_ultimate_x86_dvd_x15-65907.iso|2604238848|D6F139D7A45E81B76199DDCCDDC4B509|/

复制,迅雷新建任务。粘贴

相关问答

更多
  • 如果想不刻盘安装LINUX系统,可以使用GRUB FOR DOS这个工具,在网上找的到,这样就可以用WINDOWS系统对引导区进行硬盘引导LINUX。 但前提需要将ISO中的引导内核取出来,并且您熟悉GRUB配置,将ISO引导起来就可以进行安装操作了。 当然如果刻盘出来就容易的多了,直接光盘引导,中文界面安装,想怎么分区怎么分,如果是SUSE,建议 /10G /boot/1G /home/10GB 跟分区10GB做系统用,/boot作为引导目录,方便在系统引导部分出问题后作修复, /home 目录是用户目录 ...
  •  具体步骤如下:   1、点击开始按钮,进入“设置”   2、找到“更新和安全”   3、在“Windows 更新”中找到“高级选项”   4、在“高级选项”页面下方点击“停用会员版本”   确认后即可退出Windows Insider计划,但如果你当前的Win10系统并不是由Win7/Win8.1升级而来,那你需要为该版本付费。另外需要提醒各位注意的是,如果你使用的系统版本早于Build 10240,那么最好先升级到该版本后再退出Insider计划,不然你的Win10预览版将无法收到正式版推送。
  • Windows8.1正式版的脚步离我们越来越近了,带来了windows8.1正式版安装教程,为大家讲解了两种win8.1系统的安装方法,大家可以来参考一下。 如果你的电脑带有刻录光驱,下载 Windows8.1 ISO 光盘镜像文件后,刻盘从光驱安装是一个很好的方法,其中要注意的主要是从光驱启动计算机,具体方法大同小异,只要您略懂英文,设置都不是什么大的问题,或者开机按F12,直接选择从光驱启动计算机,也十分方便。 在进入安装界面后,选择要将 Windows8.1 安装到的磁盘,可以将原先的系统磁盘进行格式 ...
  • Ubuntu 12.10正式版的发布,很多朋友就迫不及待地想换Ubuntu 12.10正式版了,但是还有朋友不懂得怎么安装~下面就来教大家Ubuntu 12.10正式版怎么安装。 Ubuntu 12.10 官方中文ISO镜像正式版 http://www.33lc.com/soft/19381.html Ubuntu 64位 12.10 官方中文ISO镜像正式版 http://www.33lc.com/soft/19382.html 1使用DVD? 可以很容易地从DVD安装Ubuntu。这里就是你需要做的: ...
  • http://www.conft.cn/down/59031.html这里还有隐藏英雄密码
  • WIN7自带的帮助功能,就是最好的说明书。
  • 你是要java_api文档吗?是的话,采纳留下邮箱,顺便多发点资料给你
  • Windows7教程[2022-03-12]

    相信你看完这些教程,对Windows 7也有个大体的了解了。 http://bbs.shanstar.org/thread-1056-1-1.html http://bbs.shanstar.org/thread-171-1-2.html
  • windows7正式旗舰版下载 http://www.windows7zj.info/windows7/category/windows7-down windows7免激活版 http://www.windows7zj.info/windows7/category/windows7-down 希望可以帮到你
  • 现在网上有一个破解版,正式版安装起来很简单,根据提示一步一步的选择安装路径,因为他是宿主,里面有很多的插件,这就像是一个大软件,携带着几个小软件,但是小软件只能在大软件里工作运行,所以一步一步的选择路径即可,最好同一路径,你也可以孩唬粉舅莠矫疯蝎弗莽进一些论坛,例如七线阁,编曲中国等,里面有很多安装教程,祝你好运,望采纳

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)