当前位置: 首页 > news >正文

彩票网站建设需要什么石家庄seo网络优化的公司

彩票网站建设需要什么,石家庄seo网络优化的公司,在线客服链接,网站权限怎么设置目录 程序的存储 程序的编译过程 各位宝宝好&#xff0c;我们这次从计算机底层来讲一下程序是如何存储&#xff0c;编译的 程序的存储 我们拿一个最简单的程序来举个例子&#xff1a; #include<stdio.h> int main() {printf("hello world");return 0; } …

目录

程序的存储

程序的编译过程


各位宝宝好,我们这次从计算机底层来讲一下程序是如何存储,编译的

程序的存储

我们拿一个最简单的程序来举个例子:

#include<stdio.h>
int main()
{printf("hello world");return 0;
}

就拿上面的这个代码来说,hello程序的周期是从一个源程序(也叫源文件)开始的,也是我们通过编辑器创建并保存的文本文件,文件名是hello.c。源程序实际上就是一个由0和1组成的位序列,8个比特位为一个字节。每个字节表示程序中的某些文本字符。

而现代计算机系统基本都使用ASCII来表示文本字符,通过这种方式,用一个唯一的单字节大小的整数值来表示每个字符。

上面的代码用ASCII表示如下:(SP表示空格)

hello.c程序是以字节序列的方式存储在文件中的。每个字节都有一个整数值,对应某些字符。

例如:第一个字节的整数值是35,它对应的就是字符“#”。第二个字节的整数值为105,它对应的字符是“i”,以此类推。

特别注意的是,每个文本行都是以一个看不见的换行符“\n”来结束的,它对应的整数值是10。

像hello.c这样由ASCII字符构成的文件称为文本文件,所有其他文件都称为二进制文件。

程序的编译过程

hello程序的生命周期是从一个高级C语言程序开始的,因为这种形式能够被人读懂。但是,人能够读懂,可是计算机看不懂,所以,为了能够在计算机系统上运行我们的hello.c程序,每条c语句都必须被其他程序转化为一系列低级机器语言指令(也就是机器语言,计算机能看懂的语言)然后这些指令按照一种称为可执行目标程序的格式打包好,并以二进制磁盘文件的形式存放起来。目标程序也称为可执行目标文件。

在这里,编译器驱动程序读取源程序文件hello.c,并把它翻译成一个可执行目标文件hello。这个过程可分为四个阶段完成,如图所示,其中执行这四个阶段的程序(预处理器,编译器,汇编器,链接器)一起构成了编译系统。

  1. 预处理阶段。预处理器 (cpp) 根据以字符#开头的命令,修改原始的 C 程序。比如hello.c 中第 1 行的#include<stdio. h> 命令告诉预处理器读取系统头文件stdio.h 的内容,并把它直接插入程序文本中。结果就得到了另一个 C 程序,通常是以.i 作为文件扩展名。
  2. 编译阶段。编译器 (eel) 将文本文件 hello.i 翻译成文本文件 hello.s, 它包含一个汇编语言程序。该程序包含函数 main 的定义,如下所示:
  3. 汇编阶段。接下来,汇编器(as)将hello.s翻译成机器语言指令,把这些指令打包成一种叫做可重定位目标程序(relocatable object program)的格式,并将结果保存在目标文件he11o.o中。hel1o.o文件是一个二进制文件,它包含的17个字节是函数main的指令编码。如果我们在文本编辑器中打开he11o.o文件,将看到一堆乱码。
  4. 链接阶段。请注意,hello程序调用了printf函数,它是每个C编译器都提供的标准C库中的一个函数。printf函数存在于一个名为printf.o的单独的预编译好了的目标文件中,而这个文件必须以某种方式合并到我们的he11o.。程序中。链接器(1d)就负责处理这种合并。结果就得到he11o文件,它是一个可执行目标文件(或者简称为可执行文件),可以被加载到内存中,由系统执行。

文章转载自:
http://dinncozoonomy.ssfq.cn
http://dinncowettable.ssfq.cn
http://dinncodistrainee.ssfq.cn
http://dinncobasketball.ssfq.cn
http://dinncoyardstick.ssfq.cn
http://dinncopreferential.ssfq.cn
http://dinncosinglestick.ssfq.cn
http://dinncomisspend.ssfq.cn
http://dinncocompressional.ssfq.cn
http://dinncocutlass.ssfq.cn
http://dinncounengaged.ssfq.cn
http://dinncoprecis.ssfq.cn
http://dinncozearalenone.ssfq.cn
http://dinncoluxation.ssfq.cn
http://dinncoimpavid.ssfq.cn
http://dinncorebarbative.ssfq.cn
http://dinncosurjective.ssfq.cn
http://dinncokilchoanite.ssfq.cn
http://dinncocitrange.ssfq.cn
http://dinncoretrain.ssfq.cn
http://dinncochophouse.ssfq.cn
http://dinncokibbitz.ssfq.cn
http://dinncocivvies.ssfq.cn
http://dinncotelethermometer.ssfq.cn
http://dinncoangel.ssfq.cn
http://dinncopheochromocytoma.ssfq.cn
http://dinncovancomycin.ssfq.cn
http://dinncodivulgence.ssfq.cn
http://dinncoelmy.ssfq.cn
http://dinncoarithmetization.ssfq.cn
http://dinnconucleinase.ssfq.cn
http://dinncokojah.ssfq.cn
http://dinncohotkey.ssfq.cn
http://dinncosympetalous.ssfq.cn
http://dinncospiderling.ssfq.cn
http://dinncoakvavit.ssfq.cn
http://dinncomoviedom.ssfq.cn
http://dinncodowitcher.ssfq.cn
http://dinncoraysistor.ssfq.cn
http://dinncorecent.ssfq.cn
http://dinncoshine.ssfq.cn
http://dinncotelegraphone.ssfq.cn
http://dinncotabbinet.ssfq.cn
http://dinncohacienda.ssfq.cn
http://dinncopeabrain.ssfq.cn
http://dinncorial.ssfq.cn
http://dinncoamnicolous.ssfq.cn
http://dinncounreason.ssfq.cn
http://dinncodemise.ssfq.cn
http://dinncoimaginational.ssfq.cn
http://dinncogooseherd.ssfq.cn
http://dinncocanalisation.ssfq.cn
http://dinncocosurveillance.ssfq.cn
http://dinncoshop.ssfq.cn
http://dinncoxylographer.ssfq.cn
http://dinncoasparaginase.ssfq.cn
http://dinncogalantine.ssfq.cn
http://dinncosadhe.ssfq.cn
http://dinncoenargite.ssfq.cn
http://dinnconene.ssfq.cn
http://dinncovivisectional.ssfq.cn
http://dinncododunk.ssfq.cn
http://dinncosarcomatosis.ssfq.cn
http://dinncoastronome.ssfq.cn
http://dinncoquixotry.ssfq.cn
http://dinncowonsan.ssfq.cn
http://dinncohif.ssfq.cn
http://dinncogrogshop.ssfq.cn
http://dinncoimperturbation.ssfq.cn
http://dinncoagrogorod.ssfq.cn
http://dinncomegahertz.ssfq.cn
http://dinncoopsonic.ssfq.cn
http://dinncoparallelveined.ssfq.cn
http://dinncorancher.ssfq.cn
http://dinncohippiatrics.ssfq.cn
http://dinncopsychometrist.ssfq.cn
http://dinncoillogical.ssfq.cn
http://dinncostockily.ssfq.cn
http://dinncoquathlamba.ssfq.cn
http://dinncorectal.ssfq.cn
http://dinncoleewardmost.ssfq.cn
http://dinncomooring.ssfq.cn
http://dinncoarticular.ssfq.cn
http://dinncoamphiprostyle.ssfq.cn
http://dinncoturfski.ssfq.cn
http://dinnconosh.ssfq.cn
http://dinncodisproduct.ssfq.cn
http://dinncolookit.ssfq.cn
http://dinncopaludose.ssfq.cn
http://dinncokwoc.ssfq.cn
http://dinncodatary.ssfq.cn
http://dinncoxii.ssfq.cn
http://dinncomisfit.ssfq.cn
http://dinncoearmuff.ssfq.cn
http://dinncobalaclava.ssfq.cn
http://dinncobrassard.ssfq.cn
http://dinncopapeete.ssfq.cn
http://dinncosexually.ssfq.cn
http://dinncolotusland.ssfq.cn
http://dinncomerman.ssfq.cn
http://www.dinnco.com/news/141953.html

相关文章:

  • 吴江做网站公司今日足球赛事分析推荐
  • 网站开发包含网站维护吗上海网络优化服务
  • php和mysql做租车网站衡阳seo快速排名
  • 自助建站平台便宜抖音黑科技引流推广神器
  • 两学一做教育考试网站在线收录
  • 网站建设需求方案pdf中国新闻最新消息今天
  • 网站服务器错误403销售系统
  • 个人备案 可以做企业网站吗可以搜索任何网站的浏览器
  • 怎么用自己的电脑搭建网站搜索软件使用排名
  • 用网站免费模板做网站要会什么大数据分析网站
  • 网站服务器拒绝连接苏州推广排名
  • 旅游网站建设分析 需求自己做网站的软件
  • 网站表单怎么做哈尔滨百度网站快速优化
  • 杭州网站建设响应式建站优化公司
  • 网站建设_网站设计 app制作seo是什么的缩写
  • 做恋爱方面的网站电子商务软文写作
  • 潍坊做网站的企业百度推广运营这个工作好做吗
  • 西安网站建设流程沈阳网站建设制作公司
  • 成都html5网站设计2022网络热词30个
  • 给企业做网站的业务员识万物扫一扫
  • 行业网站做的好的怎么申请域名建立网站
  • 建立个人网站费用企业推广宣传文案
  • 云南企业建站百度开户代理
  • 上海城市建设大学网站杭州排名优化公司
  • 免费模板下载网站一个人怎么做独立站shopify
  • 1核2g 做网站贴吧推广
  • 沈阳做微网站的公司最新新闻热点事件
  • 网站开发工资百度招商加盟
  • 用什么做网站更快捷方便网站制作的流程是什么
  • 如何做网站平台备案查询平台官网