<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>phphot - _c/c++/汇编</title><link>http://blog.csdn.net/phphot/category/369140.aspx</link><description /><dc:language>zh-CN</dc:language><lastUpdateTime>Tue, 22 Jul 2008 21:39:00 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>phphot</dc:creator><title>看到公司以前的人写的代码，被雷到了！刚进来啊，何去何从？</title><link>http://blog.csdn.net/phphot/archive/2008/07/21/2687199.aspx</link><pubDate>Mon, 21 Jul 2008 22:51:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/21/2687199.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2687199.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/21/2687199.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2687199.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2687199</trackback:ping><description>int RemoveSpace(char * target)

{
    int iLen ;
    int i,j;

    if (!target) return false;

    iLen = strlen(target);

    for (i =0,j = 0;  j &lt; iLen; ) {
        if (target[j] != ' ') {
            target[i] = target[j];
            ++i;   
        }           
        ++j; 
    }
    return succe;
}&lt;img src ="http://blog.csdn.net/phphot/aggbug/2687199.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>下一代浏览器脚本语言——C?</title><link>http://blog.csdn.net/phphot/archive/2008/07/10/2636211.aspx</link><pubDate>Thu, 10 Jul 2008 22:50:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/10/2636211.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2636211.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/10/2636211.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2636211.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2636211</trackback:ping><description>Adobe的Scott Petersen上周在Mozilla谈论了他创造的工具链（Toolchain）——不久后将开源——可以让C代码跑在Tamarin虚拟机上(相关中文描述)。工具链包含了许多其它方面的细节，如一个定制的POSIX系统调用API和C多媒体库，让程序运行在flash上。Petersen设计一个特别的byte array去直接贴图到RAM，因此降低模拟时的耗损并提升效率，可以让游戏之类的应用跑起来飞快。这样做的好处能在flash中以可接受的速度执行任何基于C的代码，如php、ruby、perl、python甚至java与objective-c。Petersen演示了一个flash版的Quake 游戏，以及在一个基于C的任天堂模拟器上跑Zelda，两者都完全可以玩，包括了音效和音乐。&lt;img src ="http://blog.csdn.net/phphot/aggbug/2636211.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>汇编与反汇编之小技巧</title><link>http://blog.csdn.net/phphot/archive/2008/07/08/2626662.aspx</link><pubDate>Tue, 08 Jul 2008 23:47:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/08/2626662.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2626662.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/08/2626662.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2626662.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2626662</trackback:ping><description>大家都知道，对于位于当前调试目标中的指令，可以使用WinDBG的u命令进行反汇编。u命令的参数是要反汇编代码的地址值或者符号，如果不指定，那么WinDBG会使用当前程序指针寄存器所指向的代码，例如：

0:001&gt; u

ntdll!DbgBreakPoint:

7c901230 cc              int     3

7c901231 c3              ret

如果要想将汇编指令翻译为机器码，那么应该使用a命令，a命令使用的参数格式与u命令相同，只不过参数的含义代表的是要产生的机器码要存放的起始地 址。例如执行a 0x400000命令后，WinDBG会启动交互式编辑提示符（Input&gt;），而后便可以输入汇编指令，没输入一条后，按回车，然后可以继续输入 下一条，结束时直接按回车。

举个实际的例子，启动记事本程序，然后将WinDBG附加上去，此时执行u命令看到的就是上面的反汇编结果，也就是EIP指向的是ntdll中的 DbgBreakPoint函数，这个函数只有两条指令。接下来执行a命令，在Input提示符后输入nop然后按回车，&lt;img src ="http://blog.csdn.net/phphot/aggbug/2626662.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>这个函数用来登录QQ2005</title><link>http://blog.csdn.net/phphot/archive/2008/06/24/2583574.aspx</link><pubDate>Tue, 24 Jun 2008 20:56:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/24/2583574.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2583574.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/24/2583574.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2583574.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2583574</trackback:ping><description>这个函数用来登录QQ2005&lt;img src ="http://blog.csdn.net/phphot/aggbug/2583574.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>把c++学得很牛，有用吗？  </title><link>http://blog.csdn.net/phphot/archive/2008/06/19/2567207.aspx</link><pubDate>Thu, 19 Jun 2008 23:27:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/19/2567207.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2567207.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/19/2567207.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2567207.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2567207</trackback:ping><description>  最近真的很郁闷。作为一个学习计算机和c++的人，听到这句话之后，真的陷入了深深的迷茫之中，想到这里和大家一起讨论一下。 &lt;img src ="http://blog.csdn.net/phphot/aggbug/2567207.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>主流编程语言优劣考</title><link>http://blog.csdn.net/phphot/archive/2008/06/10/2533583.aspx</link><pubDate>Tue, 10 Jun 2008 21:57:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/10/2533583.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2533583.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/10/2533583.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2533583.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2533583</trackback:ping><description>本文的目的并非是想挑起语言之争，而是希望通过客观地分析每一种主流语言的能力，辨明其长短，让程序员能够扬长避短，有效地使用各种语言。让各种语言能够各安其位，为你更好的服务。
程序员应当成为语言的主人，而不是语言的奴隶。
&lt;img src ="http://blog.csdn.net/phphot/aggbug/2533583.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>动态规划与排列组合</title><link>http://blog.csdn.net/phphot/archive/2008/06/07/2518668.aspx</link><pubDate>Sat, 07 Jun 2008 00:21:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/07/2518668.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2518668.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/07/2518668.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2518668.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2518668</trackback:ping><description>像所有的新手一样，对一种算法思想的理解需要经历从肤浅（流于表面形式）到逐渐触摸到本质的过程。为什么说"逐渐"触摸到本质，是因为很多时候你并不确定一个解释是不是最本质的，有时候会有好几个等价的解释，各自在不同的场景下具有启发。

比如对动态规划（DP）的理解，一开始我理解为"递推"，但实际上这是最肤浅的理解，对于如何在特定的问题中找到递推关系毫无帮助和启发。换言之，这只是一个描述性的总结，而不是一个建设性的总结，不含方法论。
&lt;img src ="http://blog.csdn.net/phphot/aggbug/2518668.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>VC小技巧20个</title><link>http://blog.csdn.net/phphot/archive/2008/06/06/2515480.aspx</link><pubDate>Fri, 06 Jun 2008 01:13:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/06/2515480.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2515480.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/06/2515480.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2515480.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2515480</trackback:ping><description>一、打开CD-ROM
mciSendString("Set cdAudio door open wait",NULL,0,NULL);

二、关闭CD_ROM
mciSendString("Set cdAudio door closed wait",NULL,0,NULL);

三、关闭计算机
OSVERSIONINFO OsVersionInfo; //包含操作系统版本信息的数据结构
OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&amp;OsVersionInfo); //获取操作系统版本信息
if(OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
    //Windows98,调用ExitWindowsEx()函数重新启动计算机
    DWORD dwReserved;
    ExitWindowsEx(EWX_REBOOT,dwReserved); //可以改变第一个参数，实现注销用户、&lt;img src ="http://blog.csdn.net/phphot/aggbug/2515480.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>C++多线程编程，既是难点又是重点</title><link>http://blog.csdn.net/phphot/archive/2008/05/29/2493057.aspx</link><pubDate>Thu, 29 May 2008 13:20:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/05/29/2493057.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2493057.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/05/29/2493057.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2493057.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2493057</trackback:ping><description>一个进程通常定义为程序的一个实例。在Win32中， 进程占据4GB的地址空间。与它们在MS-DOS和16位Windows操作系统中不同， Win32进程是没有活力的。这就是说，一个Win32进程并不执行什么指令，它只是占据着4GB的地址空间，此空间中有应用程序EXE文件的 代码和数据。EXE需要的任意DLL也将它们的代码和数据装入到进程的地址空间。除了地址空间，进程还占有某些资源，比如文件、动态内存分配和线程。当进程终止时，在它生命期中创建的各种资源将被清除。 &lt;img src ="http://blog.csdn.net/phphot/aggbug/2493057.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>VC浏览器的定制与扩展</title><link>http://blog.csdn.net/phphot/archive/2008/04/25/2327192.aspx</link><pubDate>Fri, 25 Apr 2008 13:11:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/04/25/2327192.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2327192.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/04/25/2327192.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2327192.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2327192</trackback:ping><description>　　由于本人在开发中经常要在程序中嵌入浏览器，为了符合自己的需求经常要对浏览器进行扩展和定制， 解决这些问题需在网上找资料和学习的过程，我想可能很多开发者或许会遇到同样的问题，特写此文，以供大家参考。 &lt;img src ="http://blog.csdn.net/phphot/aggbug/2327192.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>C/C++字符串处理：std::vector与std::StringBuilder</title><link>http://blog.csdn.net/phphot/archive/2008/03/30/2230335.aspx</link><pubDate>Sun, 30 Mar 2008 12:46:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/03/30/2230335.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2230335.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/03/30/2230335.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2230335.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2230335</trackback:ping><description>C/C++字符串处理：std::vector与std::StringBuilder&lt;img src ="http://blog.csdn.net/phphot/aggbug/2230335.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>Boost在C++自己的墙上打洞</title><link>http://blog.csdn.net/phphot/archive/2008/03/25/2215600.aspx</link><pubDate>Tue, 25 Mar 2008 09:37:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/03/25/2215600.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2215600.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/03/25/2215600.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2215600.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2215600</trackback:ping><description>Boost在C++自己的墙上打洞&lt;img src ="http://blog.csdn.net/phphot/aggbug/2215600.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>C/C++字符串处理盘点：Char*/String/StringBuilder/TextPool/Rope </title><link>http://blog.csdn.net/phphot/archive/2008/03/22/2205410.aspx</link><pubDate>Sat, 22 Mar 2008 12:03:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/03/22/2205410.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2205410.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/03/22/2205410.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2205410.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2205410</trackback:ping><description>C/C++字符串处理盘点：Char*/String/StringBuilder/TextPool/Rope &lt;img src ="http://blog.csdn.net/phphot/aggbug/2205410.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>VC编写Demo Scene的一些可能技巧 </title><link>http://blog.csdn.net/phphot/archive/2008/03/21/2202713.aspx</link><pubDate>Fri, 21 Mar 2008 14:16:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/03/21/2202713.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2202713.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/03/21/2202713.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2202713.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2202713</trackback:ping><description>VC编写Demo Scene的一些可能技巧 &lt;img src ="http://blog.csdn.net/phphot/aggbug/2202713.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>基类指针指向子类对象数组的问题</title><link>http://blog.csdn.net/phphot/archive/2008/03/19/2196691.aspx</link><pubDate>Wed, 19 Mar 2008 11:59:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/03/19/2196691.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2196691.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/03/19/2196691.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2196691.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2196691</trackback:ping><description>基类指针指向子类对象数组的问题&lt;img src ="http://blog.csdn.net/phphot/aggbug/2196691.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>