微内核和宏内核的区别_8086微处理器中的过程和宏之间的区别

微内核和宏内核的区别

Prerequisite

先决条件

  • Procedure in 8086 Microprocessor

    8086微处理器中的过程

  • Macros in 8086 Microprocessor

    8086微处理器中的宏

过程和宏之间的区别 (Differences between Procedures and Macros )

CharacteristicProcedureMacro
Number of Instructions that can be effectively handled by the microprocessorIt is better to use Procedures for a set of a large number of instructions. Hence, it is optimal to use Procedures when the number of instructions is more than 10.Macros are useful over Procedures when the number of instructions in the set is less. Therefore, when the subprogram contains less than 10 instructions, Macros are more efficient to use in such cases.
Assembler Directives usedThe assembler directive - PROC is used to define a Procedure. And the assembler directive - ENDP is used to indicate that the body of the procedure has ended.The assembler directive- MACRO is used to define a Macro, And to indicate that the body of the procedure has ended, the assembler directive- ENDM is used.
Execution Process Every time a procedure is called, the CALL and RET instructions are required for shifting the control of instruction execution. Every time a Macro is called, the assembler of the microprocessor places the entire set of instructions of the Macros in the mainline program form where the call to the macro is made.
Execution TimeThe Procedures execute slower than the Macros because every time a procedure is called, it is necessary to integrate and link it with the calling program and this takes time. The execution of macros is faster as compared to procedures because there is no need to integrate or link the macros with the calling program. It is simply loaded into the main memory every time it is called.
Overhead timeOverhead time occurs while calling the procedure and returning the control to the calling program. Overhead time is avoided as calling and returning does not take place.
Amount of memory requiredThe Procedures require less amount of memory than the Macros because a Procedure is written and loaded into the main memory only once, and is linked to the calling program when called.The Macros require a large amount of memory because it is loaded into the main memory every time it is called.
Number of times machine code generatedThe machine code (containing the instructions within the Procedure) is generated only once when the procedure is defined.The machine code (containing the instructions within the Macros) is generated every time the macro is called.
Passing of parametersIn procedures, we cannot pass the parameter to id directly. However, the values can be passed to it using registers and also via stack.The macros are capable of handling parameters within their definition and we can pass them in the statement which calls the macro.
特性 程序 巨集
微处理器可以有效处理的指令数 最好将过程用于大量指令集。 因此,当指令数大于10时,最好使用过程。 当集合中的指令数较少时,宏比过程有用。 因此,当子程序包含少于10条指令时,在这种情况下使用宏会更有效。
所使用的汇编程序指令 汇编程序指令-PROC用于定义过程。 汇编程序指令ENDP用于指示过程主体已结束。 汇编程序指令MACRO用于定义宏,并指示程序的主体已结束,因此使用汇编程序指令ENDM。
执行过程 每次调用一个过程时,都需要CALL和RET指令来转移对指令执行的控制。 每次调用宏时,微处理器的汇编程序都将宏的整个指令集置于主程序形式中,以进行宏调用。
执行时间处理时间 这些过程的执行速度比宏要慢,因为每次调用一个过程时,都需要将其与调用程序集成和链接,这需要时间。 与过程相比,宏的执行速度更快,因为不需要将宏与调用程序集成或链接。 每次调用时,它都被简单地加载到主存储器中。
开销时间 在调用过程并将控件返回到调用程序时会发生开销时间。 避免了开销时间,因为不会进行呼叫和返回。
所需的内存量 与宏相比,过程只需要较少的内存,因为过程只写入一次并加载到主存储器中,并且在调用时链接到调用程序。 宏需要大量的内存,因为每次调用宏时都会将其加载到主内存中。
机器代码生成的次数 定义过程后,机器代码(包含过程中的指令)仅生成一次。 每次调用宏时都会生成机器代码(包含宏中的指令)。
参数传递 在过程中,我们无法将参数直接传递给id。 但是,可以使用寄存器以及通过堆栈将值传递给它。 宏能够在其定义内处理参数,我们可以在调用该宏的语句中传递它们。

翻译自: https://www.includehelp.com/embedded-system/procedures-vs-macros-in-8086-microprocessors.aspx

微内核和宏内核的区别

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/380289.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

对决

描述 Topcoder 招进来了 n 个新同学,Yougth计划把这个n个同学分成两组,要求每组中每个人必须跟另一组中每个同学进行一次算法对决,问存不存在一种分组方式在k场完成对决。(两组中每一组中人数都要大于0) //注意&…

我的世界方块云服务器bug,我的世界:两个方块能无限刷经验?这装置太BUG了

在我的世界中,刷经验是一种很常见的事情,不过以往的刷经验机,常常需要建造刷怪塔刷怪,不仅麻烦,工程量大,怪物积累多了还会造成卡顿,非常不方便。但是随着我的世界更新了火炉这种物品之后&#…

远控免杀5---Veil免杀

0x01 免杀能力一览表 1、下表中标识 √ 说明相应杀毒软件未检测出病毒,也就是代表了Bypass。2、为了更好的对比效果,大部分测试payload均使用msf的windows/meterperter/reverse_tcp模块生成。3、由于本机测试时只是安装了360全家桶和火绒,所以…

ADO.NET_09_Using 关键字

本文内容 演示 Using 关键字验证 Using 关键字演示 Using 关键字 string connStr "data sourceora11; uidscott; pwdtiger; unicodetrue"; string sqlStr "SELECT * FROM EMP"; using (OracleConnection conn new OracleConnection(connStr)) { conn.Op…

js isinteger_在JavaScript中使用示例使用Number isInteger()方法

js isinteger编号isInteger()方法 (Number isInteger() Method) isInteger() is a Number Method, it is used to check whether a given number is an integer or not. isInteger()是一个数字方法,用于检查给定数字是否为整数。 It returns true if given number …

最新:日文.NET Framework 3.5 与 VS 2008 beta 2 已经公布

半个月以前,微软发布了Beta2版本的.NET Framework 3.5 与 Visual Studio 2008,可以从这里下载.而本周,代表双字节字符区域的第一个日文版本Beta2已经发布,现在同样也可以提供下载,这意味着中文版将在不久后与我们见面(按照微软软件的惯例,除微软中国研究院自主推出的软件外,中文…

三角形描边css,[CSS] tips带有描边的小箭头

linear-gradient和border:Document.box {position: relative;padding: 10px; /* 重要 防止内容被覆盖 */text-align: center;border: 1px solid #f60;border-radius: 5px;}.box::after {content: ;position: absolute;left: 50%;display: table;width: 10px;height: 10px;margi…

sql语句中出现笛卡尔乘积

没有join条件导致笛卡尔乘积 学过线性代数的人都知道,笛卡尔乘积通俗的说,就是两个集合中的每一个成员,都与对方集合中的任意一个成员有关联。可以想象,在SQL查询中,如果对两张表join查询而没有join条件时,…

远控免杀专题6---Venom免杀

0x01 免杀能力一览表 几点说明: 1、上表中标识 √ 说明相应杀毒软件未检测出病毒,也就是代表了Bypass。 2、为了更好的对比效果,大部分测试payload均使用msf的windows/meterperter/reverse_tcp模块生成。 3、由于本机测试时只是安装了360全…

人工智能 自然语言处理_自然语言处理(NLP)| 人工智能

人工智能 自然语言处理Natural Language Processing (NLP) is one of the most successful applications of Artificial Intelligence in the real world. The Natural Language Processing in the terms of AI means that the Artificial Agents are able to able to understa…

精挑细选

描述 小王是公司的仓库管理员,一天,他接到了这样一个任务:从仓库中找出一根钢管。这听起来不算什么,但是这根钢管的要求可真是让他犯难了,要求如下: 1、 这根钢管一定要是仓库中最长的; 2、 这根…

hoho,我要坚持写blog

争取一天一篇,提高技术. 转载于:https://www.cnblogs.com/lbq1221119/archive/2007/08/17/859183.html

查看ajax传来的数据,jQuery AJAX 方法 success()后台传来的4种数据

1.后台返回一个页面js代码/**(1)用$("#content-wrapper").html(data);显示页面*/$.ajax({async : false,cache : false,type : POST,url : area/prepareCreate,error : function() {alert(smx失败 );},success : function(data) {$("#content-wrapper").ht…

远控免杀专题7 ---shellter免杀

0x01 免杀能力一览表 几点说明: 1、上表中标识 √ 说明相应杀毒软件未检测出病毒,也就是代表了Bypass。 2、为了更好的对比效果,大部分测试payload均使用msf的windows/meterperter/reverse_tcp模块生成。 3、由于本机测试时只是安装了360全…

Notepad++高亮AS文件

如果编写ActionScript,可以选择语言->Flash actionScript 但是软件似乎不能确定as文件使用的语言,需要修改软件配置 Notepad 有 ActionScript 的语法高亮功能, 但它似乎不能被程序探查到. 打开的每个 AS 文件, 都要自行套用语法高亮, 特别麻烦. 当你打…

python 示例_Python日历类| yeardayscalendar()方法与示例

python 示例Python Calendar.yeardayscalendar()方法 (Python Calendar.yeardayscalendar() Method) Calendar.yeardayscalendar() method is an inbuilt method of the Calendar class of calendar module in Python. It uses an instance of this class and returns the list…

获取两个数的最大值,判断是否相等;

package asdwwssq; import java.util.Scanner;//引入扫描仪Scanner,创建键盘录入对象; public class qweqwe { public static void main(String[] args) { Scanner anew Scanner(System.in);//将一个新扫描仪赋给a; System.out.println(“请输入第一…

ASP.NET 开发规范 第五章 命名

第五章 命名规范<?xml:namespace prefix o ns "urn:schemas-microsoft-com:office:office" />5.1 命名概述名称应该说明“什么”而不是“如何”。通过避免使用公开基础实现&#xff08;它们会发生改变&#xff09;的名称&#xff0c;可以保留简化复杂…

ajax传值controller怎么写,ajax向 controller传值(示例代码)

第一种传值&#xff1a;controller中是几个单独的基本类型参数RequestMapping("update")ResponseBody//此注解不能省略 否则ajax无法接受返回值public Map update(Long num, Long id, BigDecimal amount){Map resultMap new HashMap();if(num null || id null || …

将文件拖到docker容器里,将docke 容器里文件拖到宿主里

docker将/root/shell目录下的putty.exe复制到容器内部&#xff1a; 查看容器ID&#xff1a; docker ps 复制&#xff1a; docker cp /root/shell/putty.exe 容器ID:/root docker将容器内部的/root/shell/payload.exe复制到宿主里&#xff1a; docker cp b8d6b6b6296d:/root…