当前位置:网站首页>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 .
边栏推荐
- Small game design framework
- CTFshow,信息搜集:web9
- Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
- Read PG in data warehouse in one article_ stat
- What is the process of ⼀ objects from loading into JVM to being cleared by GC?
- How does the database perform dynamic custom sorting?
- Yyds dry goods inventory # solve the real problem of famous enterprises: cross line
- 缓冲区溢出保护
- What is cloud primordial? This time, I can finally understand!
- 拜拜了,大厂!今天我就要去厂里
猜你喜欢

Deformable convolutional dense network for enhancing compressed video quality

asp.netNBA信息管理系统VS开发sqlserver数据库web结构c#编程计算机网页源码项目详细设计

JSON parsing instance (QT including source code)

MicTR01 Tester 振弦采集模块开发套件使用说明

Instructions for mictr01 tester vibrating string acquisition module development kit

EfficientNet模型的完整细节

C# 6.0 语言规范获批

什么是云原生?这回终于能搞明白了!
![[Yugong series] go teaching course 005 variables in July 2022](/img/66/4265a06a98412bd2c88d8281caf06e.png)
[Yugong series] go teaching course 005 variables in July 2022

"July 2022" Wukong editor update record
随机推荐
时空可变形卷积用于压缩视频质量增强(STDF)
数据湖(九):Iceberg特点详述和数据类型
PG basics -- Logical Structure Management (locking mechanism -- table lock)
Decrypt the three dimensional design of the game
2022云顾问技术系列之高可用专场分享会
leetcode:648. Word replacement [dictionary tree board + find the shortest matching prefix among several prefixes]
Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System
Because the employee set the password to "123456", amd stolen 450gb data?
[Yugong series] go teaching course 005 variables in July 2022
【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例
What is cloud primordial? This time, I can finally understand!
CTFshow,信息搜集:web10
Nllb-200: meta open source new model, which can translate 200 languages
Base64 encoding
在软件工程领域,搞科研的这十年!
属性关键字OnDelete,Private,ReadOnly,Required
Pandora IOT development board learning (HAL Library) - Experiment 12 RTC real-time clock experiment (learning notes)
JSON解析实例(Qt含源码)
Simple use of websocket
华为云数据库DDS产品深度赋能