通用apdu指令
Introduction:
介紹:
In this article, we are going to discuss about the 6 general formats of instructions.
在本文中,我們將討論6種通用指令格式。
One byte instruction:
一字節指令 :
This is only one byte long and may have implied data and register.
這只有一個字節長,可能包含隱含的數據和寄存器。
Register to register:
注冊注冊 :
This instruction is 2 byte long. First byte specified opcode and width(w) of opcode and second byte specified register operand and R/M field.
該指令為2個字節長。 第一個字節指定操作碼和操作碼的寬度(w),第二個字節指定寄存器操作數和R / M字段。
Here,
這里,
MSB - Most significant bit and LSB - Least significant bit
MSB-最高有效位, LSB-最低有效位
Register to/from memory with no displacement:
向內存中注冊/從內存中遷移 :
This format is also 2-byte form and similar to the register except the MOD field.
該格式也是2字節格式,除了MOD字段外,與寄存器相似。
Register to/from memory with displacement:
通過位移向/從內存注冊 :
This is same as the third one having one or two additional byte for displacement.
這與第三位相同,具有一個或兩個附加字節用于移位。
Immediate operand to register:
立即操作數進行注冊 :
In it first byte as well as three bits from the second byte which are used for the register field. In case of register to register format is reserved for the opcode. It also contains 1 or 2 bytes of immediate data.
在它的第一個字節以及第二個字節之后的三個位用于寄存器字段。 如果是寄存器對寄存器格式,則保留操作碼。 它還包含1或2個字節的立即數據。
Immediate Operand to memory with 16-bit displacement:
立即操作數以16位位移到內存 :
Opcode have single bit indicators their significance is as follows,
操作碼具有單個位指示符,其含義如下:
W bit: It tells us whether the instruction is to operate over an 8-bit or 16-bit
W位 :它告訴我們指令是在8位還是16位上運行
W=0 /8bit W=1 /16bit
D bit: It tells whether the register specified field is the source register or destination register.
D位 :告訴寄存器指定字段是源寄存器還是目標寄存器。
D=0 Source register D=1 Destination
S bit: This is called sign extension bit; it is used along with the w bit.
S位 :這稱為符號擴展位; 它與w位一起使用。
S W 0 0 8 bit operant with 8bit immediate 0 1 operant. 16 bit operant with 6 bit 0 1 immediate operant. 16 bit operation 1 1 with sign extended immediate data.
V bit: Used in case of shift and rotate instruction if v=0, then shift count is 1. If v=1 then count is stored into the CL register and count should be count=2.
V位 :如果v = 0,則在移位和旋轉指令的情況下使用,則移位計數為1。如果v = 1,則將計數存儲到CL寄存器中,并且計數應為count = 2。
Z bit: This is used along with the string primitives such as REP for comparison with ZF flag.
Z位 :與Z標記的字符串原語(例如REP)一起使用。
Conclusion:
結論:
In the above article, I have discussed the different instruction formats of the microprocessors briefly, with relative diagrams also. As I said earlier at the beginning of this article also that this topic of computer system organization is very important from the examination point of view and also the base of your knowledge about computer architecture. For further queries shoot your questions in the comment section below!
在以上文章中,我簡要討論了微處理器的不同指令格式 ,并附帶了相關圖表。 就像我在本文開頭所說的那樣,從檢查的角度以及計算機基礎知識的基礎來說,計算機系統組織這一主題非常重要。 如有其他疑問,請在下面的評論部分中提出您的問題!
翻譯自: https://www.includehelp.com/embedded-system/general-instruction-formats-in-8086-microprocessor.aspx
通用apdu指令