⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 howto_en.txt

📁 OllyMachine是在VC 6.0下开发的
💻 TXT
字号:
------------------------------
OllyMachine source code manual
------------------------------

1. Prolog
2. Summary
3. How to add API
4. Contact

------
Prolog
------
OllyMachine v0.20 is the final version I wrote. I will not update it anymore if there's no any special reasons. Therefore I open the source code, and I do not reserve any rights of it. You can modify it as you like, but PLEASE send me a copy.

BTW, please don't ask me the reason why stopped updates. Very simple -- I'm not rich, and I have to work for my life.

-------
Summary
-------
OllyMachine was developed in VC 6.0, please open OllyMachine.dsp, and press F7 to compile. It has about 10,000 lines source code, mainly made up of two classes: Assembler and VM.

--------------
How to add API
--------------
Please follow the following steps:

1. Open file VM.h, find this line:
#define MNEMONIC_COUNTS 122
Increse the number by one when you add a new API.

2. Open file VM.h, find variable MNEMONICTYPE, add the API name in the last, generally is:
MC_XXXXXXXX
XXXXXXXX is the new API's name.

3. Open file VM.h, in the constructor CVM(), add:
m_Mnemonics[MC_XXXXXXXX] = "XXXXXXXX";
Assembler will recognize the API's name by this variable.

4. Open file VM.h, in the constructor CVM(), add:
m_nMnemonicLen[MC_XXXXXXXX] = 1;
Assembler will get the correct offset when constructing symbol table by this variable.
Generally, API's length should all be 1.

5. Open file Assembler.cpp, in the function GenerateCodes(), add:
case MC_XXXXXXXX:
    I(&fii, MC_XXXXXXXX);
    break;
Assembler will generate opcode for API by these lines.

6. Open file VM.cpp, in the function Execute(), add:
case MC_XXXXXXXX:
    nRetCode = DoXXXXXXXX();
    VM_STATUS_ERROR(nRetCode);
    m_Cpu.eip += m_nMnemonicLen[MC_XXXXXXXX];
    break;
Virtual Machine will invoke API by these lines, you must write the DoXXXXXXXX() for the API.

-------
Contact
-------
If you have any questions, please send me an E-Mail: admin@luocong.com

Author: Luo Cong
Date  : 2004-12-7 15:27

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -