当前位置:网站首页>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 .
边栏推荐
- Because the employee set the password to "123456", amd stolen 450gb data?
- WebRTC 音频抗弱网技术(上)
- 缓冲区溢出保护
- Delete a whole page in word
- 《微信小程序-进阶篇》组件封装-Icon组件的实现(一)
- Instructions d'utilisation de la trousse de développement du module d'acquisition d'accord du testeur mictr01
- Navigation — 这么好用的导航框架你确定不来看看?
- MicTR01 Tester 振弦采集模塊開發套件使用說明
- Protection strategy of server area based on Firewall
- [Yugong series] go teaching course 005 variables in July 2022
猜你喜欢
随机推荐
Andriod --- JetPack :LiveData setValue 和 postValue 的区别
Niuke real problem programming - Day10
拼多多败诉,砍价始终差0.9%一案宣判;微信内测同一手机号可注册两个账号功能;2022年度菲尔兹奖公布|极客头条...
Attribute keywords serveronly, sqlcolumnnumber, sqlcomputecode, sqlcomputed
Huawei cloud database DDS products are deeply enabled
#yyds干货盘点# 解决名企真题:交叉线
PG基础篇--逻辑结构管理(锁机制--表锁)
CTFshow,信息搜集:web13
PyTorch模型训练实战技巧,突破速度瓶颈
Xiaomi's path of chip self-development
Deformable convolutional dense network for enhancing compressed video quality
因员工将密码设为“123456”,AMD 被盗 450Gb 数据?
Mlgo: Google AI releases industrial compiler optimized machine learning framework
asp. Netnba information management system VS development SQLSERVER database web structure c programming computer web page source code project detailed design
【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例
Full details of efficientnet model
Jetson AGX Orin CANFD 使用
Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
Pytorch model trains practical skills and breaks through the bottleneck of speed
解析PHP跳出循环的方法以及continue、break、exit的区别介绍