存儲器間接尋址方式_8086微處理器的程序存儲器尋址模式

存儲器間接尋址方式

The Program Memory Addressing mode is used in branch instructions. These branch instructions are instructions which are responsible for changing the regular flow of the instruction execution and shifting the control to some other location. In 8086 microprocessor, these instructions are usually JMP and CALL instructions.

在分支指令中使用程序存儲器尋址模式 。 這些分支指令是負責更改指令執行的常規流程并將控件移至其他位置的指令。 在8086微處理器中,這些指令通常是JMP和CALL指令。

The Program memory Addressing Mode contains further three addressing modes within it. They are:

程序存儲器尋址模式中還包含另外三種尋址模式。 他們是:

  1. Direct Program memory Addressing

    直接程序存儲器尋址

  2. Indirect Program memory Addressing

    間接程序存儲器尋址

  3. Relative Program memory Addressing

    相對程序存儲器尋址

Let us study each of them in detail about their instructions and the way of processing by the microprocessor while executing them.

讓我們詳細研究它們中的每一個,以了解它們的指令以及在執行它們時微處理器的處理方式。

1)直接程序存儲器尋址 (1) Direct Program Memory Addressing)

In this addressing mode, the offset address where the control is to be shifted is defined within the instruction. This mode is called direct addressing mode because the required address is directly present in the instruction rather than being stored in some register.

在該尋址模式下,將在指令內定義要在其中移動控件的偏移地址。 這種模式稱為直接尋址模式,因為所需的地址直接存在于指令中,而不是存儲在某個寄存器中。

Example:

例:

    JMP 4032H

Here, the working of the above instruction will be as follows:

在這里,以上指令的工作方式如下:

The current value of IP which holds the address of next instruction to be executed will be stored in the TOP OF THE STACK. Now, the IP will be replaced by the mentioned value, i.e. IP

持有下一條要執行指令地址的IP的當前值將存儲在堆棧頂部 。 現在,IP將被上述值替換,即IP

Now, the Memory address is calculated as: (Contents of CS) X 10H + (contents of IP)

現在,內存地址的計算公式為: (CS的內容)X 10H +(IP的內容)

2)間接程序尋址模式 (2) Indirect Program Addressing mode)

As the name suggests, in this addressing mode, the offset address is not present directly in the instruction. It is rather stored in any of the CPU registers (Internal Register). So, the contents of the Instruction Pointer (IP) will be replaced by the contents of that register.

顧名思義,在這種尋址模式下,偏移地址不直接存在于指令中。 而是存儲在任何CPU寄存器(內部寄存器)中。 因此,指令指針(IP)的內容將被該寄存器的內容替換。

Example:

例:

    JMP BX

Working:

加工:

Suppose that the content of the BX register is 0003H. So, the working of the microprocessor for executing the above instruction will be as follows:

假設BX寄存器的內容為0003H 。 因此,微處理器用于執行以上指令的工作如下:

            IP 

And the required memory address is calculated in a similar way as in Direct Addressing mode: (Contents of CS) X 10H + (contents of IP)

3) Relative Program Memory Addressing

In this Addressing mode, the offset address is equal to the content of the Instruction Pointer (IP) plus the 8 or 16-bit displacement. For the 8 bit displacement, SHORT is used and for 16-bit displacement, LONG is used. This type of displacement will only be intra-segment, i.e. within the segment.

Example:

Here, SHORT is used to represent the 8-bit displacement and OVER is the Label defined for any particular memory location.



TOP Interview Coding Problems/Challenges

  • Run-length encoding (find/print frequency of letters in a string)

  • Sort an array of 0's, 1's and 2's in linear time complexity

  • Checking Anagrams (check whether two string is anagrams or not)

  • Relative sorting algorithm

  • Finding subarray with given sum

  • Find the level in a binary tree with given sum K

  • Check whether a Binary Tree is BST (Binary Search Tree) or not

  • 1[0]1 Pattern Count

  • Capitalize first and last letter of each word in a line

  • Print vertical sum of a binary tree

  • Print Boundary Sum of a Binary Tree

  • Reverse a single linked list

  • Greedy Strategy to solve major algorithm problems

  • Job sequencing problem

  • Root to leaf Path Sum

  • Exit Point in a Matrix

  • Find length of loop in a linked list

  • Toppers of Class

  • Print All Nodes that don't have Sibling

  • Transform to Sum Tree

  • Shortest Source to Destination Path



Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.


            IP 

And the required memory address is calculated in a similar way as in Direct Addressing mode: (Contents of CS) X 10H + (contents of IP)

3) Relative Program Memory Addressing

In this Addressing mode, the offset address is equal to the content of the Instruction Pointer (IP) plus the 8 or 16-bit displacement. For the 8 bit displacement, SHORT is used and for 16-bit displacement, LONG is used. This type of displacement will only be intra-segment, i.e. within the segment.

Example:

Here, SHORT is used to represent the 8-bit displacement and OVER is the Label defined for any particular memory location.



TOP Interview Coding Problems/Challenges

  • Run-length encoding (find/print frequency of letters in a string)

  • Sort an array of 0's, 1's and 2's in linear time complexity

  • Checking Anagrams (check whether two string is anagrams or not)

  • Relative sorting algorithm

  • Finding subarray with given sum

  • Find the level in a binary tree with given sum K

  • Check whether a Binary Tree is BST (Binary Search Tree) or not

  • 1[0]1 Pattern Count

  • Capitalize first and last letter of each word in a line

  • Print vertical sum of a binary tree

  • Print Boundary Sum of a Binary Tree

  • Reverse a single linked list

  • Greedy Strategy to solve major algorithm problems

  • Job sequencing problem

  • Root to leaf Path Sum

  • Exit Point in a Matrix

  • Find length of loop in a linked list

  • Toppers of Class

  • Print All Nodes that don't have Sibling

  • Transform to Sum Tree

  • Shortest Source to Destination Path



評論和討論

廣告:您是博主嗎? 加入我們的Blogging論壇 。


翻譯自: https://www.includehelp.com/embedded-system/program-memory-addressing-mode-of-8086.aspx

存儲器間接尋址方式

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/379695.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/379695.shtml
英文地址,請注明出處:http://en.pswp.cn/news/379695.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Servlet的配置

1&#xff0c;基本配置 <!-- Servlet類的配置 --><servlet><servlet-name>sq</servlet-name><servlet-class>beyond.servlet.QuickStartServlet</servlet-class></servlet><!-- Servlet的虛擬路徑的配置 --> <servlet-mapp…

Asp.net頁面生存周期

# 事件或方法 功能 描述   1 Init 事件 頁面初始化 初始化設置。   2 LoadViewState 方法 加載視圖狀態 填充ViewState屬性。   3 LoadPostData 方法 處理回發數據 處理傳入窗體數據。   4 Load 事件 加載頁面 頁面控件初始化完成并反映了客戶端的數據。   5 RaisePo…

你正確關閉WCF鏈接了嗎?

通常情況下我們關閉一個WCF鏈接都是簡單地寫把ICommunicationObject.Close()方法&#xff0c;但是這個方法有個問題就是當調用發生異常時&#xff0c;Close()會發生次生的異常&#xff0c;導致鏈接不能正常關閉。如果當這種異常很多時&#xff0c;必然對系統的穩定性有很大的影…

Visual Studio進行linux遠程開發

目錄準備工作創建一個項目配置遠程項目準備工作 查看linux IP地址 安裝了工具 sudo apt-get install openssh-server g gdb make ninja-build rsync zip開啟ssh服務&#xff1a; sudo service ssh startVS2019按裝了linux功能&#xff0c;如果沒有&#xff0c;找到Visual S…

在給定總和K的二叉樹中找到級別

Description: 描述&#xff1a; The article describes how to find the level in a binary tree with given sum K? This is an interview coding problem came in Samsung, Microsoft. 本文介紹了如何在給定總和K下在二叉樹中找到級別 &#xff1f; 這是一個面試編碼問題&a…

PostgreSQL學習手冊(數據庫維護) 轉

原文&#xff1a; PostgreSQL學習手冊(數據庫維護)一、恢復磁盤空間&#xff1a;在PostgreSQL中&#xff0c;使用delete和update語句刪除或更新的數據行并沒有被實際刪除&#xff0c;而只是在舊版本數據行的物理地址上將該行的狀態置為已刪除或已過期。因此當數據表中的數據變化…

++i與i++的根本性區別(兩個代碼對比搞定)

首先來看i 代碼如下&#xff1a; #include <stdio.h> #include <stdlib.h> int main() {int i0;int ai;printf("%d\n",a);printf("%d\n\n\n",i);return 0; }輸出結果如下&#xff1a; 解釋&#xff1a;i其實是兩行代碼的簡寫形式&#xff0c…

國企和外企的比較

由于本人在外企&#xff0c;而很多朋友在國企&#xff0c;因此我個人的說法應該還是有一定的權威性。 首先&#xff0c;國企和外企不能一概而論。正如任何事物都有三六九等&#xff0c;這個&#xff0c;只能在同等級別上進行比較。 國企分類&#xff1a; 一等國企&#xff1…

Python | 使用matplotlib.pyplot創建線圖

Problem statement: Write a program in python (using matplotlib.pyplot) to create a line plot. 問題陳述&#xff1a;用python編寫程序(使用matplotlib.pyplot)以創建線圖。 Program: 程序&#xff1a; import matplotlib.pyplot as pltx [1,2,3,4,5,6,7,8,9,10]y [3,…

QI(接口查詢)

接觸AE一段時間了&#xff0c;總的來說收獲不少&#xff0c;今天仔細分析了一下AE開發中經常會用到的QI即接口查詢&#xff0c;有了自己的一些理解。 COM類至少有一個接口。事實上一般它們有好幾個接口。即一個類經常會實現多個接口&#xff08;一個類無法繼承多個類&#xff0…

linux內核設計與實現---從內核出發

獲取、編譯、安裝內核1 獲取內核源碼安裝內核源代碼何處安裝源碼使用補丁2 內核源碼樹3 編譯內核減少編譯的垃圾信息衍生多個編譯作業安裝內核啟用指定內核作為引導4 內核開發的特點沒有libc庫頭文件沒有內存保護機制容積小而固定的棧1 獲取內核源碼 在linux內核官方網站http:…

MySQL在DOS下的基本命令操作

啟動net start mysql 重置root密碼 方法一:在my.ini的[mysqld]字段加入&#xff1a; skip-grant-tables 重啟mysql服務&#xff0c;這時的mysql不需要密碼即可登錄數據庫然后進入mysql mysql>use mysql;mysql>更新 user set passwordpassword(新密碼) WHERE Userroot; …

strlen的神奇實現

https://blog.delphij.net/2012/04/freebsd-strlen3.html 與 Pascal 等語言不同&#xff0c;C 的字符串并不保存串的長度&#xff0c;而是在字符串末尾以 nul 字符&#xff08;\0&#xff09;來表示字符串結束。這個設計決策是上世紀 60 年代作出的&#xff0c;有都市傳說是為了…

python求和_Python程序查找特殊求和系列的解決方案

python求和We are going to design a special sum series function which has following characteristics: 我們將設計一個特殊的求和系列函數&#xff0c;該函數具有以下特征&#xff1a; f(0) 0f(1) 1f(2) 1f(3) 0f(x) f(x-1) f(x-3)Python solution of the above sum…

linux內核設計與實現---進程管理

進程管理1 進程描述符及任務結構分配進程描述符進程描述符的存放進程狀態設置當前進程狀態進程上下文進程家族樹2 進程創建寫時拷貝fork()vfork()3 線程在Linux中的實現內核線程4 進程終結刪除進程描述符孤兒進程造成的進退微谷5 小結進程的另一個名字叫做任務&#xff08;task…

JS錯誤代碼解釋大全+VBS錯誤代碼解釋大全

JScript 運行時錯誤 JScript 運行時錯誤是指當 JScript 腳本試圖執行一個系統不能運行的動作時導致的錯誤。當正在運行腳本、計算變量表達式、或者正在動態分配內存時出現 JScript 運行時錯誤時。 錯誤號 描述 5029 數組長度必須為一有限正整數 5030 必須賦給數組長度一個有…

生日蠟燭(藍橋杯)

某君從某年開始每年都舉辦一次生日party&#xff0c;并且每次都要吹熄與年齡相同根數的蠟燭。 現在算起來&#xff0c;他一共吹熄了236根蠟燭。 請問&#xff0c;他從多少歲開始過生日party的&#xff1f; 請填寫他開始過生日party的年齡數。 注意&#xff1a;你提交的應該是…

python日歷模塊_Python日歷模塊| firstweekday()方法與示例

python日歷模塊Python calendar.firstweekday()方法 (Python calendar.firstweekday() Method) firstweekday() method is an inbuilt method of the calendar module in Python. It works on simple text calendars and returns the current setting for the weekday to start…

php 處理 mysql to json, 前臺js處理

public function GetJson(){$query"select * from table";$result mysql_query($query);$rows array();while($row mysql_fetch_array($result)){$rows [] $row;}echo json_encode($rows); } js處理 $.get( "./bll.php", option,function(data ) {var j…

Linux內核設計與實現---進程調度

進程調度1 策略I/O消耗型和處理器消耗型的進程進程優先級時間片進程搶占2 Linux調度算法可執行隊列優先級數組重新計算時間片schedule()計算優先級和時間片睡眠和喚醒負載平衡程序3 搶占和上下文切換用戶搶占內核搶占4 實時5 與調度相關的系統調用與調度策略和優先級相關的系統…