Delphi汇编基础
来源:互联网 发布:手机阿里云下载 编辑:程序博客网 时间:2024/06/05 10:29
The registers are set with values before entering the function or procedure. How these are set depends on how the function or procedure was defined. There are two possibilities.
Stand alone, or explicitly defined procedures and functions
On entry,
eax holds the value of the first parameter of the function or procedure if such exists.
ebx holds the address of the data block of the function or procedure. You must be careful when using ebx, for it must hold its initial value whenever you refer to a function or procedure's parameters or data in your assembler code block. Furthermore ebx must hold its initial value when exiting. The Delphi manual actually says don't touch.
ecx holds the value of the third parameter.
edx holds the second parameter value.
On exit,
eax holds the result of the function, or in the case of a procedure, convention states it holds the value of any relevant error code you may define.
ebx must hold its initial value. Failure to ensure this will cause a system crash.
Object method, procedures and functions
On entry,
eax holds the address of the parent object's data block. You don't need to maintain this value, however it is needed whenever you wish to access or change the values of the parent object's fields.
ebx is the same as above.
ecx holds the second parameter value.
edx holds the value of the first parameter.
On exit, the register values are as for a stand alone procedure or function.
注:64位汇编,过程或函数的前面四个传参寄存器变成了:RCX, RDX, R8, R9(或XMM0-XMM3)
- Delphi汇编基础
- Delphi+汇编例子2
- Delphi 嵌入汇编学习
- Delphi与汇编asm
- Delphi 中内嵌汇编
- Delphi+汇编例子2
- Delphi汇编级初探
- Delphi 小知识汇编
- Delphi反汇编笔记
- delphi与汇编
- Delphi与汇编
- Delphi与汇编
- Delphi嵌入汇编
- delphi string 汇编
- 汇编学习--汇编基础
- 汇编基础
- 汇编基础
- 汇编基础
- C#中的数组
- jprofile安装与使用
- 从一个例子看网站发展过程
- storyboard自动布局
- 卸载,分享,启动
- Delphi汇编基础
- swift 3
- spring中IOC和AOP原理分析
- Unity5的AssetBundle
- ipv4-only网络环境下访问ipv6站点的三种方式
- 手动设置jdbctemplate的一种方法
- PAT L3-006 迎风一刀斩 计算几何
- IOS-发起微信支付方法
- 程序员资料,附下载地址,持续更新中!