单片机原理与C51程序设计:详解存储器类型与指针操作

需积分: 0 6 下载量 50 浏览量 更新于2024-08-09 收藏 5.74MB PDF 举报
在《存储器类型的编码值——numerical.algorithms.methods》这篇文档中,主要讲解了单片机中内存组织和指针的概念,以及它们在C51程序设计中的应用。文章首先介绍了存储器类型的编码,区分了片内数据存储单元(如idata、data和pdata)和片外数据存储单元(如code和xdata),这些存储器类型决定了指针变量的大小,比如一个字节(1个字节的指针)或两个字节(2个字节的指针)。对于数据存储,指针变量被用来存储其他变量的地址,它是特殊变量,只能存储地址,不能存储数值。 文档中通过示例展示了如何定义不同类型的指针变量,例如用于整型、字符型和浮点型数据的指针,并强调了取地址运算符(&)和指针运算符(*)的使用。通过"&",可以获取变量的地址并将其赋给指针,而"*"则用于通过指针访问所指向变量的值。举例说明了如何使用指针进行变量地址的传递和赋值。 接下来,文档提及了一个具体的编程示例,通过C51语言编写程序来输入两个整数并根据大小关系输出,这体现了指针在实际编程中的运用。同时,它还提到了一本名为《单片机原理与应用及C51程序设计》的教材,该教材由唐颖主编,旨在培养电气信息类创新型应用人才,内容全面且实用,不仅包含理论知识,还提供了大量实例和设计性练习,采用汇编语言与C语言对照的方式,帮助读者提升实际编程技能。 本文是针对单片机初学者和专业人员的一份指南,重点讲解了存储器类型对指针的影响,以及如何在C51环境中正确使用指针进行内存操作,这对于理解和开发单片机应用项目至关重要。

翻译 This is Elsevier's new document class for typeset journal articles, elsarticle.cls. It is now accepted for submitted articles, both in Elsevier's electronic submission system and elsewhere. Elsevier's previous document class for typeset articles, elsart.cls, is now over 10 years old. It has been replaced with this newly written document class elsarticle.cls, which has been developed for Elsevier by the leading TeX developer STM Document Engineering Pvt Ltd. elsarticle.cls is based upon the standard LaTeX document class article.cls. It uses natbib.sty for bibliographical references. Bugs and problems with elsarticle.cls may be reported to the developers of the class via elsarticle@stmdocs.in. The file manifest.txt provides a list of the files in the elsarticle bundle. The following are the main files available: - elsarticle.dtx, the dtx file - elsdoc.pdf, the user documentation - elsarticle-template-num.tex, template file for numerical citations - elsarticle-template-harv.tex, template file for name-year citations - elsarticle-template-num-names.tex, template file for numerical citations + new natbib option. Eg. Jones et al. [21] - elsarticle-num.bst, bibliographic style for numerical references - elsarticle-harv.bst, bibliographic style for name-year references - elsarticle-num-names.bst, bibliographic style for numerical referencces + new natbib option for citations. To extract elsarticle.cls from *.dtx: latex elsarticle.ins The documentation file is elsdoc.tex in the contrib directory. To compile it: 1. pdflatex elsdoc 2. pdflatex elsdoc 3. pdflatex elsdoc

2023-06-01 上传
2023-05-23 上传