日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

存储器间接寻址方式_8086微处理器的程序存储器寻址模式

發布時間:2023/12/1 编程问答 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 存储器间接寻址方式_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:

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

  • Direct Program memory Addressing

    直接程序存儲器尋址

  • Indirect Program memory Addressing

    間接程序存儲器尋址

  • 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.


    Please enable JavaScript to view the comments powered by Disqus. 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論壇 。


    請啟用JavaScript以查看由Disqus提供的評論。

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

    存儲器間接尋址方式

    總結

    以上是生活随笔為你收集整理的存储器间接寻址方式_8086微处理器的程序存储器寻址模式的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。