当前位置:网站首页>Compile advanced notes
Compile advanced notes
2022-07-07 14:53:00 【weixin_ forty-five million seven hundred and fifty thousand fou】
1、 Pressing stack and elastic stack Is a very important machine operation :
The characteristics of the stack : Grow down , The stack top address is the smallest ;
Stack pressing is 1) Open the drawer (esp Reduce the number of bytes of data to be pressed )2) Put in the data ( high
Put bit data into high address , Put the low order data into the low address ).
The bomb stack is :1) Take out the data ( The number of bytes depends on pop Suffix or destination register , meanwhile
The high address data is put into the high order of the destination register );2) Close the drawer (esp Increase the number of corresponding bytes )
2、 Basic and special operations Operation instructions need to remember the name and specific operation , Especially the sequence of operations ( For example, subtraction is subtracting the front from the back , Put the results in the back );
3、 The four most important Condition code :
1)CF: Think of operations as “ Unsigned number operation ”, If there is progress / Borrow position , Then put 1;
2)OF: Think of operations as “ Signed number operation ”, If overflow occurs , Then put 1;
3)SF: If the highest order of the result is 1, Then put 1;
4)ZF: If the result is 0, Then put 1.
4、 Jump unconditionally jmp Jump directly to the specified address , namely : Write its operand as an address %eip, Realization CPU Change of instruction execution .
Four ways :
jmp LABEL Use it directly LABEL Address
jmp *LABEL Use LABEL Address stored in address ( indirect )
jmp 0x8048056 Directly use the immediate number as the jump address
jmp *%eax take %eax As the address of jump
5、 Conditions jump : According to different combinations of condition codes , Can determine the size relationship , A jump that depends on the size relationship is a conditional jump . The form of the instruction character is J Followed by the suffix indicating the determination result J Followed by the suffix indicating the determination result , example
Such as :JGE, Namely :jump if greater or equal— Jump when greater than or equal .
6、 Conditional transmission (cmov), Function and format and mov Exactly the same , The difference is that it is different from conditional jump
Same with suffix , Only when the comparison relationship represented by the suffix is satisfied can the data be transferred , for example :
comvge %ax,%bx Only when it is greater than or equal to %ax The content of is passed on to %bx
7、 Flag bit setting instruction ( Flag bit setting instruction (set) Is the operand that will follow ( A byte ) Set to 1, The premise is that the determination result meets its suffix
for example :setge %al Indicates that when greater than or equal to %al Set up 1. such , The result of the comparison is in one byte 1 In the form of .
8、 Circulation in the machine is through Conditions jump To achieve .
After the loop body is executed , To judge ( Loop variable , Or other cycle end conditions ), Not meeting the conditions , Jump directly to the next instruction address outside the circulation ; Meet the conditions , Jump back to the beginning of the loop .
边栏推荐
- Shengteng experience officer Episode 5 notes I
- 缓冲区溢出保护
- [server data recovery] a case of RAID data recovery of a brand StorageWorks server
- Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
- Stm32cubemx, 68 sets of components, following 10 open source protocols
- 2022pagc Golden Sail award | rongyun won the "outstanding product technology service provider of the year"
- Niuke real problem programming - day14
- 用于增强压缩视频质量的可变形卷积密集网络
- 13 ux/ui/ue best creative inspiration websites in 2022
- Ascend 910 realizes tensorflow1.15 to realize the Minist handwritten digit recognition of lenet network
猜你喜欢

13 ux/ui/ue best creative inspiration websites in 2022

CTFshow,信息搜集:web14
![[Yugong series] go teaching course 005 variables in July 2022](/img/66/4265a06a98412bd2c88d8281caf06e.png)
[Yugong series] go teaching course 005 variables in July 2022

Webrtc audio anti weak network technology (Part 1)

Niuke real problem programming - day15

What is the process of ⼀ objects from loading into JVM to being cleared by GC?

Because the employee set the password to "123456", amd stolen 450gb data?

CTFshow,信息搜集:web9

大厂做开源的五大痛点

Jetson AGX Orin CANFD 使用
随机推荐
属性关键字OnDelete,Private,ReadOnly,Required
2022年13个UX/UI/UE最佳创意灵感网站
数据库如何进行动态自定义排序?
PD virtual machine tutorial: how to set the available shortcut keys in the parallelsdesktop virtual machine?
Cvpr2022 | backdoor attack based on frequency injection in medical image analysis
广州开发区让地理标志产品助力乡村振兴
Navigation - are you sure you want to take a look at such an easy-to-use navigation framework?
Attribute keywords serveronly, sqlcolumnnumber, sqlcomputecode, sqlcomputed
Because the employee set the password to "123456", amd stolen 450gb data?
Andriod --- JetPack :LiveData setValue 和 postValue 的区别
Niuke real problem programming - Day11
PLC:自动纠正数据集噪声,来洗洗数据集吧 | ICLR 2021 Spotlight
FFmpeg----图片处理
Navigation — 这么好用的导航框架你确定不来看看?
Internal sort - insert sort
AWS学习笔记(三)
Substance Painter筆記:多顯示器且多分辨率顯示器時的設置
Notes HCIA
Webrtc audio anti weak network technology (Part 1)
Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System