Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - ebp
Search - ebp - List
该程序模拟UNIX中save与resume函数,并介绍在VC中如何使用汇编进行机器级的操作. 主函数很简单首先引入两个外部函数,extern \"C\"表示按传统C命名习惯.函数save将程序指针保存在(*s)中并返回0,为什么有 if(save(&sp)){...} if后的语句看起来永远都不会被执行,但是运行结果表明它被执行了.这个问题同UNIX中处理机调度函数(switch)的那个if语句(第一句)一样. 程序执行完save(&sp)后得到因为条件为假而执行else语句,却在判断之前将程序指针保存在sp中了. else语句中的resume(&sp),该函数很狡猾将堆栈中的返回地址改变了,改到了sp所指出,即将程序指针改到了执行条件判断前.resume返回1,条件满足,执行if语句. save函数堆栈: eip ebp+8 s ebp+4 ebp ebp+0 resume函数堆栈与save的相同. 新建一个win32的工程,将unixc.cpp和unix.obj加入过程即可. unix.obj是用masm6.11生成的:ml /c /coff unix.asm,生成coff格式的obj而不是omf格式.-the simulation UNIX save and resume function, and the VC on how to use the compiled class machines for the operation. main function is very simple to introduce the first two external function, extern "C" said C. named by the traditional habits. function pointer procedures will save preserved in (* s) and return 0, why are there if (save (
Date : 2008-10-13 Size : 6.11kb User : 摩尔

该程序模拟UNIX中save与resume函数,并介绍在VC中如何使用汇编进行机器级的操作. 主函数很简单首先引入两个外部函数,extern "C"表示按传统C命名习惯.函数save将程序指针保存在(*s)中并返回0,为什么有 if(save(&sp)){...} if后的语句看起来永远都不会被执行,但是运行结果表明它被执行了.这个问题同UNIX中处理机调度函数(switch)的那个if语句(第一句)一样. 程序执行完save(&sp)后得到因为条件为假而执行else语句,却在判断之前将程序指针保存在sp中了. else语句中的resume(&sp),该函数很狡猾将堆栈中的返回地址改变了,改到了sp所指出,即将程序指针改到了执行条件判断前.resume返回1,条件满足,执行if语句. save函数堆栈: eip ebp+8 s ebp+4 ebp ebp+0 resume函数堆栈与save的相同. 新建一个win32的工程,将unixc.cpp和unix.obj加入过程即可. unix.obj是用masm6.11生成的:ml /c /coff unix.asm,生成coff格式的obj而不是omf格式.-the simulation UNIX save and resume function, and the VC on how to use the compiled class machines for the operation. main function is very simple to introduce the first two external function, extern "C" said C. named by the traditional habits. function pointer procedures will save preserved in (* s) and return 0, why are there if (save (
Date : 2025-12-19 Size : 6kb User : 摩尔

顾名思义O汇编语言也是一门汇编语言,它具有传统汇编语言的基本特点,也有与它们诸多不同之处。O汇编语言一个最大显著的特点是支持语言配置,使得它可以支持所有你想支持的语言,当然,O汇编语言的初衷是为了支持中文,所以它可以非常好的支持中文汇编。如果你已经习惯了其它英文的汇编模式,比如你喜欢用EAX、EBP类似这样的方式来命名寄存器,不要紧,只需要修改一下语言配置文件,这可以轻松做到。O汇编语言另一个显著的特点是指令使用非常直观和人性化,在不缺失汇编语言灵活性的情况下,使汇编语句的语意可以很直观地表现出来,这主要得益于用了一些象征性的符号,使得汇编语句不再是千篇一律的 (指令 寄存器,内存操作数) 这样的格式,而是更像 (寄存器 = 内存操作数)这样的格式,不但容易理解,而且便于记忆,使汇编语言不再那么枯燥,使人一团雾水。 -As the name implies O assembly language is a compiled language, it has the basic characteristics of the traditional assembly language, and they also have many differences. O assembly language a maximum notable feature is support for language configuration, such that it can support all the languages ​ ​ you want to support, of course, O assembly language originally to support Chinese, so it can be very good support Chinese assembler. If you' re used to other English compilation mode, for example, you like to use EAX, EBP similar way to name this register, it does not matter, only need to change the language configuration file, which can be easily done. O assembly language Another notable feature is the instruction to use very intuitive and user-friendly, without missing the flexibility of assembly language, so that the assembly statements can be very intuitive semantic demonstrated, mainly due to use some symbolic symbol, allows the assembler statement no longer be stereoty
Date : 2025-12-19 Size : 10.34mb User : 232323
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.