導航:首頁 > 源碼編譯 > x86編譯器偽指令都一樣嗎

x86編譯器偽指令都一樣嗎

發布時間:2022-07-01 18:39:52

❶ 基於x86平台的windows和linux是否使用統一匯編語言呀

並不統一。Windows下的匯編語法是Intel匯編格式,Linux下的匯編語法是AT&T匯編格式。

Linux是Unix家族的一員,盡管Linux的歷史不長,但與其相關的很多事情都發源於Unix。就Linux所使用的386匯編語言而言,它也是起源於Unix。Unix最初是為PDP-11開發的,曾先後被移植到VAX及68000系列的處理器上,這些處理器上的匯編語言都採用的是AT&T的指令格式。當Unix被移植到i386時,自然也就採用了AT&T的匯編語言格式,而不是Intel的格式。盡管這兩種匯編語言在語法上有一定的差異,但所基於的硬體知識是相同的。

在Intel的語法中,寄存器和和立即數都沒有前綴。但是在AT&T中,寄存器前冠以「%」,而立即數前冠以「$」。在Intel的語法中,十六進制和二進制立即數後綴分別冠以「h」和「b」,而在AT&T中,十六進制立即數前冠以「0x」。

Intel語法
mov eax,8
mov ebx,0ffffh
movl $8,%eax
movl $0xffff,%ebx

AT&T語法
int 80h
int $0x80

操作數的方向

Intel與AT&T操作數的方向正好相反。在Intel語法中,第一個操作數是目的操作數,第二個操作數源操作數。而在AT&T中,第一個數是源操作數,第二個數是目的操作數。
例如:在Intel中, mov eax,[ecx]
在AT&T中,movl (%ecx),%eax

單片機匯編語言中,指令和偽指令有何區別

單片機匯編語言,指令是CPU可以識別的代碼,與編譯器無關,對於任何編譯器,指令是不變的。偽指令是只有編譯器識別的語句,編譯完成後就失去作用了,不同編譯器偽指令可以不同。

❸ x86等架構的CPU和指令系統都是以硬體的形式固化在CPU上的么

是,如果你學過體系結構你應該知道指令實際上是一組二進制代碼,是通過向量機(控制器的實質,這方面的知識看看數電!)控制流水線寄存器實現一定的目的,換句話說就是代表了一個處理周期內的寄存器狀態的代碼!不過這只是簡單的定義,在現代的CPU中(尤其是英特爾的),使用了一種叫做微代碼的指令系統,這樣我們實際使用的許多匯編代碼在實質上是一種偽代碼,需要經過編譯器譯為需要的機器碼!!!所以說指令系統都是以硬體的形式固化在CPU上的。

❹ 匯編語言分幾種分別是什麼作用

人與電腦的溝通主要是通過匯編語言來完成,匯編語言具體為

匯編語言(AssemblyLanguage)是面向機器的程序設計語言。在匯編語合中,用助記符(Memoni)代替操作碼,用地址符號(Symbol)或標號(Label)代替地址碼。這樣用符號代替機器語言的二進制碼,就把機器語言變成了匯編語言。於是匯編語言亦稱為符號語言。使用匯編語言編寫的程序,機器不能直接識別,要由一種程序將匯編語言翻譯成機器語言,這種起翻譯作用的程序叫匯編程序,匯編程序是系統軟體中語言處理系統軟體。匯編程序把匯編語言翻譯成機器語言的過程稱為匯編。

要注意的是,匯編語言和機器的cpu是有很大聯系的,當然匯編語言也並不全是cpu的指令。

不同架構的CPU指令並不相同,如x86,powerpc,ARM各有各的指令系統;甚至同一種架構的CPU有幾套指令集,典型的如arm除了有32位的指令集外,還有一套16位的thumb指令集。但是作為開發語言的匯編,本質上是一套語法規則和助記符的集合,它可以包容不同的指令集。如果從CPU體系來劃分,常見的匯編有兩種:IBM PC匯編和ARM匯編。

  1. IBM PC匯編也就是Intel的匯編,因為IBM最早推出PC機,後來的體系很多都要和它兼容,所以也使用了相同的匯編語言。ARM壓根沒考慮過兼容,它的指令集和x86完全是兩個體系,所以匯編語言也獨立發展出一套。

  2. CPU只是限定了機器碼,作為開發語言的匯編,其實還和編譯器息息相關。匯編語言出現的早,沒有像C語言一樣定義出標准,所以編譯器的廠商各搞一套。到現在,最有名的也是兩家:MASM和GNU ASM。前者是微軟的,只支持x86,用在DOS/Windows平台中;後者是開源產品,主要用在Linux中,基本上支持大部分的CPU架構。這兩者的區別在於偽指令的不同,偽指令是用來告訴編譯器如何工作的,和編譯器相關,和CPU無關。

❺ 不同單片機偽指令都一樣嗎

怎麼說呢……不完全相同,比如AVR單片機和51單片機的指令系統中都有MOV指令,但意義不一樣;對位操作的指令、邏輯操作指令、跳轉和調用等指令的助記符就不相同了。實際上偽指令相同與否與你使用的編譯器有關,比如你可以選擇CPY(COPY)助記符來代替MOV,只要你的編譯器支持就可以了。

❻ 87. 宏指令與偽指令的區別是什麼

偽指令是用來告訴編譯器如何編譯源程序的.
宏指令是由用戶按照宏定義格式編寫的一段程序,其中語句可以是指令、偽指令,甚至是已定義的宏指令。
偽指令和指令的區別在於,每一條指令必須生成機器代碼,然後在程序運行期間由CPU來執行其操作;而偽指令是在匯編期間由匯編程序執行的操作命令,除了數據定義及存儲器分配偽指令分配存儲器空間外,其它偽指令不生成目標碼。和各種指令一樣,偽指令也是程序設計不可缺少的工具。
宏是偽指令,宏的作用是把一個復雜的或者是不直觀的語句或是組合用一個簡單的、易記的形式表示,當編譯器遇到源程序中的宏時,就把它定義的內容原封不動的過來。如果程序中使用100次宏,這段代碼就被復制100次。因此,使用多次調用能使源程序變短,而不能使運行代碼變短(子程序調用可以,但也增大系統開銷)。

❼ X86指令集的內容有哪些

x86匯編指令集

數據傳輸指令 它們在存貯器和寄存器、寄存器和輸入輸出埠之間傳送數據.
1. 通用數據傳送指令.
MOV 傳送字或位元組.
MOVSX 先符號擴展,再傳送.
MOVZX 先零擴展,再傳送.

MOVSX reg16,r/m8 ; o16 0F BE /r [386]
MOVSX reg32,r/m8 ; o32 0F BE /r [386]
MOVSX reg32,r/m16 ; o32 0F BF /r [386]

MOVZX reg16,r/m8 ; o16 0F B6 /r [386]
MOVZX reg32,r/m8 ; o32 0F B6 /r [386]
MOVZX reg32,r/m16 ; o32 0F B7 /r [386]

PUSH 把字壓入堆棧.
POP 把字彈出堆棧.
PUSHA 把AX,CX,DX,BX,SP,BP,SI,DI依次壓入堆棧.
POPA 把DI,SI,BP,SP,BX,DX,CX,AX依次彈出堆棧.
PUSHAD 把EAX,ECX,EDX,EBX,ESP,EBP,ESI,EDI依次壓入堆棧.
POPAD 把EDI,ESI,EBP,ESP,EBX,EDX,ECX,EAX依次彈出堆棧.
BSWAP 交換32位寄存器里位元組的順序
XCHG 交換字或位元組.( 至少有一個操作數為寄存器,段寄存器不可作為操作數)
CMPXCHG 比較並交換操作數.( 第二個操作數必須為累加器AL/AX/EAX )
XADD 先交換再累加.( 結果在第一個操作數里 )
XLAT 位元組查表轉換.
—— BX 指向一張 256 位元組的表的起點, AL 為表的索引值 (0-255,即
0-FFH); 返回 AL 為查表結果. ( [BX+AL]->AL )
2. 輸入輸出埠傳送指令.
IN I/O埠輸入. ( 語法: IN 累加器, {埠號│DX} )
OUT I/O埠輸出. ( 語法: OUT {埠號│DX},累加器 )
輸入輸出埠由立即方式指定時, 其范圍是 0-255; 由寄存器 DX 指定時,
其范圍是 0-65535.
3. 目的地址傳送指令.
LEA 裝入有效地址.
例: LEA DX,string ;把偏移地址存到DX.
LDS 傳送目標指針,把指針內容裝入DS.
例: LDS SI,string ;把段地址:偏移地址存到DS:SI.
LES 傳送目標指針,把指針內容裝入ES.
例: LES DI,string ;把段地址:偏移地址存到ES:DI.
LFS 傳送目標指針,把指針內容裝入FS.
例: LFS DI,string ;把段地址:偏移地址存到FS:DI.
LGS 傳送目標指針,把指針內容裝入GS.
例: LGS DI,string ;把段地址:偏移地址存到GS:DI.
LSS 傳送目標指針,把指針內容裝入SS.
例: LSS DI,string ;把段地址:偏移地址存到SS:DI.
4. 標志傳送指令.
LAHF 標志寄存器傳送,把標志裝入AH.
SAHF 標志寄存器傳送,把AH內容裝入標志寄存器.
PUSHF 標志入棧.
POPF 標志出棧.
PUSHD 32位標志入棧.
POPD 32位標志出棧.

二、算術運算指令
———————————————————————————————————————
ADD 加法.
ADC 帶進位加法.
INC 加 1.
AAA 加法的ASCII碼調整.
DAA 加法的十進制調整.
SUB 減法.
SBB 帶借位減法.
DEC 減 1.
NEC 求反(以 0 減之).
CMP 比較.(兩操作數作減法,僅修改標志位,不回送結果).
AAS 減法的ASCII碼調整.
DAS 減法的十進制調整.
MUL 無符號乘法.
IMUL 整數乘法.
以上兩條,結果回送AH和AL(位元組運算),或DX和AX(字運算),
AAM 乘法的ASCII碼調整.
DIV 無符號除法.
IDIV 整數除法.
以上兩條,結果回送:
商回送AL,余數回送AH, (位元組運算);
或 商回送AX,余數回送DX, (字運算).
AAD 除法的ASCII碼調整.
CBW 位元組轉換為字. (把AL中位元組的符號擴展到AH中去)
CWD 字轉換為雙字. (把AX中的字的符號擴展到DX中去)
CWDE 字轉換為雙字. (把AX中的字元號擴展到EAX中去)
CDQ 雙字擴展. (把EAX中的字的符號擴展到EDX中去)

三、邏輯運算指令
———————————————————————————————————————
AND 與運算.
OR 或運算.
XOR 異或運算.
NOT 取反.
TEST 測試.(兩操作數作與運算,僅修改標志位,不回送結果).
SHL 邏輯左移.
SAL 算術左移.(=SHL)
SHR 邏輯右移.
SAR 算術右移.(=SHR)
ROL 循環左移.
ROR 循環右移.
RCL 通過進位的循環左移.
RCR 通過進位的循環右移.
以上八種移位指令,其移位次數可達255次.
移位一次時, 可直接用操作碼. 如 SHL AX,1.
移位>1次時, 則由寄存器CL給出移位次數.
如 MOV CL,04
SHL AX,CL

四、串指令
———————————————————————————————————————
DS:SI 源串段寄存器 :源串變址.
ES:DI 目標串段寄存器:目標串變址.
CX 重復次數計數器.
AL/AX 掃描值.
D標志 0表示重復操作中SI和DI應自動增量; 1表示應自動減量.
Z標志 用來控制掃描或比較操作的結束.
MOVS 串傳送.
( MOVSB 傳送字元. MOVSW 傳送字. MOVSD 傳送雙字. )
CMPS 串比較.
( CMPSB 比較字元. CMPSW 比較字. )
SCAS 串掃描.
把AL或AX的內容與目標串作比較,比較結果反映在標志位.
LODS 裝入串.
把源串中的元素(字或位元組)逐一裝入AL或AX中.
( LODSB 傳送字元. LODSW 傳送字. LODSD 傳送雙字. )
STOS 保存串.
是LODS的逆過程.
REP 當CX/ECX<>0時重復.
REPE/REPZ 當ZF=1或比較結果相等,且CX/ECX<>0時重復.
REPNE/REPNZ 當ZF=0或比較結果不相等,且CX/ECX<>0時重復.
REPC 當CF=1且CX/ECX<>0時重復.
REPNC 當CF=0且CX/ECX<>0時重復.

五、程序轉移指令
———————————————————————————————————————
1>無條件轉移指令 (長轉移)
JMP 無條件轉移指令
CALL 過程調用
RET/RETF過程返回.
2>條件轉移指令 (短轉移,-128到+127的距離內)
( 當且僅當(SF XOR OF)=1時,OP1 JA/JNBE 不小於或不等於時轉移.
JAE/JNB 大於或等於轉移.
JB/JNAE 小於轉移.
JBE/JNA 小於或等於轉移.
以上四條,測試無符號整數運算的結果(標志C和Z).
JG/JNLE 大於轉移.
JGE/JNL 大於或等於轉移.
JL/JNGE 小於轉移.
JLE/JNG 小於或等於轉移.
以上四條,測試帶符號整數運算的結果(標志S,O和Z).
JE/JZ 等於轉移.
JNE/JNZ 不等於時轉移.
JC 有進位時轉移.
JNC 無進位時轉移.
JNO 不溢出時轉移.
JNP/JPO 奇偶性為奇數時轉移.
JNS 符號位為 "0" 時轉移.
JO 溢出轉移.
JP/JPE 奇偶性為偶數時轉移.
JS 符號位為 "1" 時轉移.
3>循環控制指令(短轉移)
LOOP CX不為零時循環.
LOOPE/LOOPZ CX不為零且標志Z=1時循環.
LOOPNE/LOOPNZ CX不為零且標志Z=0時循環.
JCXZ CX為零時轉移.
JECXZ ECX為零時轉移.
4>中斷指令
INT 中斷指令
INTO 溢出中斷
IRET 中斷返回
5>處理器控制指令
HLT 處理器暫停, 直到出現中斷或復位信號才繼續.
WAIT 當晶元引線TEST為高電平時使CPU進入等待狀態.
ESC 轉換到外處理器.
LOCK 封鎖匯流排.
NOP 空操作.
STC 置進位標志位.
CLC 清進位標志位.
CMC 進位標志取反.
STD 置方向標志位.
CLD 清方向標志位.
STI 置中斷允許位.
CLI 清中斷允許位.

六、偽指令
———————————————————————————————————————
DW 定義字(2位元組).
PROC 定義過程.
ENDP 過程結束.
SEGMENT 定義段.
ASSUME 建立段寄存器定址.
ENDS 段結束.
END 程序結束.

七、寄存器

1. Register usage in 32 bit Windows
Function parameters are passed on the stack according to the calling conventions listed on
page 13. Parameters of 32 bits size or less use one DWORD of stack space. Parameters
bigger than 32 bits are stored in little-endian form, i.e. with the least significant DWORD at the
lowest address, and DWORD aligned.
Function return values are passed in registers in most cases. 8-bit integers are returned in
AL, 16-bit integers in AX, 32-bit integers, pointers, and Booleans in EAX, 64-bit integers in
EDX:EAX, and floating-point values in ST(0). Structures and class objects not exceeding
64 bits size are returned in the same way as integers, even if the structure contains floating
point values. Structures and class objects bigger than 64 bits are returned through a pointer
passed to the function as the first parameter and returned in EAX. Compilers that don\'t
support 64-bit integers may return structures bigger than 32 bits through a pointer. The
Borland compiler also returns structures through a pointer if the size is not a power of 2.
Registers EAX, ECX and EDX may be changed by a procere. All other general-purpose
registers (EBX, ESI, EDI, EBP) must be saved and restored if they are used. The value of
ESP must be divisible by 4 at all times, so don\'t push 16-bit data on the stack. Segment
registers cannot be changed, not even temporarily. CS, DS, ES, and SS all point to the flat
segment group. FS is used for a thread environment block. GS is unused, but reserved.
Flags may be changed by a procere with the following restrictions: The direction flag is 0
by default. The direction flag may be set temporarily, but must be cleared before any call or
return. The interrupt flag cannot be cleared. The floating-point register stack is empty at the
entry of a procere and must be empty at return, except for ST(0) if it is used for return
value. MMX registers may be changed by the procere and if so cleared by EMMS before
returning and before calling any other procere that may use floating-point registers. All
XMM registers can be modified by proceres. Rules for passing parameters and return
values in XMM registers are described in Intel\'s application note AP 589 "Software
Conventions for Streaming SIMD Extensions". A procere can rely on EBX, ESI, EDI, EBP
and all segment registers being unchanged across a call to another procere.
2. Register usage in Linux
The rules for register usage in Linux appear to be almost the same as for 32-bit windows.
Registers EAX, ECX, and EDX may be changed by a procere. All other general-purpose
registers must be saved. There appears to be no rule for the direction flag. Function return
values are transferred in the same way as under Windows. Calling conventions are the
same, except for the fact that no underscore is prefixed to public names. I have no
information about the use of FS and GS in Linux. It is not difficult to make an assembly
function that works under both Windows and Linux, if only you take these minor differences
into account.

八、位操作指令,處理器控制指令
1.位操作指令,8086新增的一組指令,包括位測試,位掃描。BT,BTC,BTR,BTS,BSF,BSR
1.1 BT(Bit Test),位測試指令,指令格式:
BT OPRD1,OPRD2,規則:操作作OPRD1可以是16位或32位的通用寄存器或者存儲單元。操作數OPRD2必須是8位立即數或者是與OPRD1操作數長度相等的通用寄存器。如果用OPRD2除以OPRD1,假設商存放在Divd中,余數存放在Mod中,那麼對OPRD1操作數要進行測試的位號就是Mod,它的主要功能就是把要測試位的值送往CF,看幾個簡單的例子:
1.2 BTC(Bit Test And Complement),測試並取反用法和規則與BT是一樣,但在功能有些不同,它不但將要測試位的值送往CF,並且還將該位取反。
1.3 BTR(Bit Test And Reset),測試並復位,用法和規則與BT是一樣,但在功能有些不同,它不但將要測試位的值送往CF,並且還將該位復位(即清0)。
1.4 BTS(Bit Test And Set),測試並置位,用法和規則與BT是一樣,但在功能有些不同,它不但將要測試位的值送往CF,並且還將該位置位(即置1)。
1.5 BSF(Bit Scan Forward),順向位掃描,指令格式:BSF OPRD1,OPRD2,功能:將從右向左(從最低位到最高位)對OPRD2操作數進行掃描,並將第一個為1的位號送給操作數OPRD1。操作數OPRD1,OPRD2可以是16位或32位通用寄存器或者存儲單元,但OPRD1和OPRD2操作數的長度必須相等。
1.6 BSR(Bit Scan Reverse),逆向位掃描,指令格式:BSR OPRD1,OPRD2,功能:將從左向右(從最高位到最低位)對OPRD2操作數進行掃描,並將第一個為1的位號送給操作數OPRD1。操作數OPRD1,OPRD2可以是16位或32位通用寄存器或存儲單元,但OPRD1和OPRD2操作數的長度必須相等。
1.7 舉個簡單的例子來說明這6條指令:

AA DW 1234H,5678H
BB DW 9999H,7777H
MOV EAX,12345678H
MOV BX,9999H
BT EAX,8;CF=0,EAX保持不變
BTC EAX,8;CF=0,EAX=12345778H
BTR EAX,8;CF=0,EAX=12345678H
BTS EAX,8;CF=0,EAX=12345778H
BSF AX,BX;AX=0
BSR AX,BX;AX=15

BT WORD PTR [AA],4;CF=1,[AA]的內容不變
BTC WORD PTR [AA],4;CF=1,[AA]=1223H
BTR WORD PTR [AA],4;CF=1,[AA]=1223H
BTS WORD PTR [AA],4;CF=1,[AA]=1234H
BSF WORD PTR [AA],BX;[AA]=0;
BSR WORD PTR [AA],BX;[AA]=15(十進制)

BT DWORD PTR [BB],12;CF=1,[BB]的內容保持不變
BTC DWORD PTR [BB],12;CF=1,[BB]=76779999H
BTR DWORD PTR [BB],12;CF=1,[BB]=76779999H
BTS DWORD PTR [BB],12;CF=1,[BB]=77779999H
BSF DWORD PTR [BB],12;[BB]=0
BSR DWORD PTR [BB],12;[BB]=31(十進制)

2.處理器控制指令
處理器控制指令主要是用來設置/清除標志,空操作以及與外部事件同步等。
2.1 CLC,將CF標志位清0。
2.2 STC,將CF標志位置1。
2.3 CLI,關中斷。
2.4 STI,開中斷。
2.5 CLD,清DF=0。
2.6 STD,置DF=1。
2.7 NOP,空操作,填補程序中的空白區,空操作本身不執行任何操作,主要是為了保持程序的連續性。
2.8 WAIT,等待BUSY引腳為高。
2.9 LOCK,封鎖前綴可以鎖定其後指令的操作數的存儲單元,該指令在指令執行期間一直有效。在多任務環境中,可以用它來保證獨占其享內存,只有以下指令才可以用LOCK前綴:
XCHG,ADD,ADC,INC,SUB,SBB,DEC,NEG,OR,AND,XOR,NOT,BT,BTS,BTR,BTC
3.0 說明處理器類型的偽指令
.8086,只支持對8086指令的匯編
.186,只支持對80186指令的匯編
.286,支持對非特權的80286指令的匯編
.286C,支持對非特權的80286指令的匯編
.286P,支持對80286所有指令的匯編
.386,支持對80386非特權指令的匯編
.386C,支持對80386非特權指令的匯編
.386P,支持對80386所有指令的匯編
只有用偽指令說明了處理器類型,匯編程序才知道如何更好去編譯,連接程序,更好地去檢錯。

九,FPU instructions(摘自fasm的幫助文檔中,有時間我會反它翻譯成中文的)
The FPU (Floating-Point Unit) instructions operate on the floating–point
values in three formats: single precision (32–bit), double precision (64–bit)
and double extended precision (80–bit). The FPU registers form the stack
and each of them holds the double extended precision floating–point value.
When some values are pushed onto the stack or are removed from the top,
the FPU registers are shifted, so st0 is always the value on the top of FPU
stack, st1 is the first value below the top, etc. The st0 name has also the
synonym st.
fld pushes the floating–point value onto the FPU register stack. The
operand can be 32–bit, 64–bit or 80–bit memory location or the FPU register,
it』s value is then loaded onto the top of FPU register stack (the st0 register)
and is automatically converted into the double extended precision format.
fld dword [bx] ; load single prevision value from memory
fld st2 ; push value of st2 onto register stack
fld1, fldz, fldl2t, fldl2e, fldpi, fldlg2 and fldln2 load the commonly
used contants onto the FPU register stack. The loaded constants are
+1.0, +0.0, log2 10, log2 e, pi, log10 2 and ln 2 respectively. These instructions
have no operands.
fild convert the singed integer source operand into double extended precision
floating-point format and pushes the result onto the FPU register stack.
The source operand can be a 16–bit, 32–bit or 64–bit memory location.
fild qword [bx] ; load 64-bit integer from memory
fst copies the value of st0 register to the destination operand, which can
be 32–bit or 64–bit memory location or another FPU register. fstp performs
the same operation as fst and then pops the register stack, getting rid of
st0. fstp accepts the same operands as the fst instruction and can also
store value in the 80–bit memory.
fst st3 ; value of st0 into st3 register
fstp tword [bx] ; store value in memory and pop stack
fist converts the value in st0 to a signed integer and stores the result
in the destination operand. The operand can be 16–bit or 32–bit memory
location. fistp performs the same operation and then pops the register
stack, it accepts the same operands as the fist instruction and can also store
integer value in the 64–bit memory, so it has the same rules for operands as
fild instruction.
fbld converts the packed BCD integer into double extended precision
floating–point format and pushes this value onto the FPU stack. fbstp
converts the value in st0 to an 18–digit packed BCD integer, stores the
result in the destination operand, and pops the register stack. The operand
should be an 80–bit memory location.
fadd adds the destination and source operand and stores the sum in the
destination location. The destination operand is always an FPU register,
if the source is a memory location, the destination is st0 register and only
source operand should be specified. If both operands are FPU registers, at
least one of them should be st0 register. An operand in memory can be a
32–bit or 64–bit value.
fadd qword [bx] ; add double precision value to st0
fadd st2,st0 ; add st0 to st2
faddp adds the destination and source operand, stores the sum in the destination
location and then pops the register stack. The destination operand
must be an FPU register and the source operand must be the st0. When no
operands are specified, st1 is used as a destination operand.
38 CHAPTER 2. INSTRUCTION SET
faddp ; add st0 to st1 and pop the stack
faddp st2,st0 ; add st0 to st2 and pop the stack
fiadd instruction converts an integer source operand into double extended
precision floating–point value and adds it to the destination operand.
The operand should be a 16–bit or 32–bit memory location.
fiadd word [bx] ; add word integer to st0
fsub, fsubr, fmul, fdiv, fdivr instruction are similar to fadd, have
the same rules for operands and differ only in the perfomed computation.
fsub substracts the source operand from the destination operand, fsubr
substract the destination operand from the source operand, fmul multiplies
the destination and source operands, fdiv divides the destination operand by
the source operand and fdivr divides the source operand by the destination
operand. fsubp, fsubrp, fmulp, fdivp, fdivrp perform the same operations
and pop the register stack, the rules for operand are the same as for the faddp
instruction. fisub, fisubr, fimul, fidiv, fidivr perform these operations
after converting the integer source operand into floating–point value, they
have the same rules for operands as fiadd instruction.
fsqrt computes the square root of the value in st0 register, fsin computes
the sine of that value, fcos computes the cosine of that value, fchs
complements its sign bit, fabs clears its sign to create the absolute value,
frndint rounds it to the nearest integral value, depending on the current
rounding mode. f2xm1 computes the exponential value of 2 to the power of
st0 and substracts the 1.0 from it, the value of st0 must lie in the range ?1.0
to +1.0. All these instruction store the result in st0 and have no operands.
fsincos computes both the sine and the cosine of the value in st0 register,
stores the sine in st0 and pushes the cosine on the top of FPU register
stack. fptan computes the tangent of the value in st0, stores the result in
st0 and pushes a 1.0 onto the FPU register stack. fpatan computes the
arctangent of the value in st1 divided by the value in st0, stores the result
in st1 and pops the FPU register stack. fyl2x computes the binary logarithm
of st0, multiplies it by st1, stores the result in st1 and pop the FPU
register stack; fyl2xp1 performs the same operation but it adds 1.0 to st0
before computing the logarithm. fprem computes the remainder obtained
from dividing the

❽ 80x86指令系統中主要包括哪三大指令

80x86的指令可分為硬指令、偽指令和宏指令三類。硬指令是和機器指令—一對應的匯編指令。偽指令是由匯編語言需要而設立的,它不能夠像硬指令那樣對應機器指令。它的作用是指示匯編程序完成某些特殊的功能。宏指令是用硬指令和偽指令定義的可在程序中使用的指令。一條宏指令相當於若干條機器指令,使用宏指令可以使程序簡單明了。

❾ X86ASM 中local偽指令的用法

函數參數不是也沒寫類型么,都默認是dword類型的

閱讀全文

與x86編譯器偽指令都一樣嗎相關的資料

熱點內容
胸很大電影 瀏覽:924
台灣催淚老電影推薦 瀏覽:924
android數據觀察者 瀏覽:530
如何破解收費軟體app 瀏覽:884
原理圖編譯器生成的文件後綴 瀏覽:824
成龍非洲盜寶電影 瀏覽:597
回到古代當太子的小說免費閱讀 瀏覽:602
香港武打電影功夫片免費完整版 瀏覽:627
河南聯通伺服器地址雲空間 瀏覽:768
海泰克怎麼加密 瀏覽:895
hashset遍歷java 瀏覽:371
中國打越南電影有哪些 瀏覽:702
消失的眼角膜之瞎子傳奇在線觀看 瀏覽:272
如何在蘋果平板上設置app切換 瀏覽:707
帶著金手指到民國 瀏覽:593
les肉電影 瀏覽:821
嬰兒武打片 瀏覽:642
師徒訓誡小說推薦 瀏覽:548
好後綴演算法 瀏覽:19
關閉終端的命令 瀏覽:511