|
本帖最后由 oldbeginner 于 2014-1-13 19:56 编辑
网上找了个8051模拟的C++代码,有makefile,要用g++,我在windows下编译失败,有人能试一下码?
还有,如果把该文件移到vc中,难不难?谢谢。
操作指导
Instructions
The simulator will continue executing the provided program until either the user hit Ctrl-C or the program completion condition is met. The program completion condition can be set by defining a macro PROGRAM_COMPLETION located in i8051.h to indicate the program completion condition, e.g., RAM[P0] == 0x01.
The program's output can be controlled through the macros PORTS, DEBUG, DEBUG_PC and DETAIL located in i8051.h. If PORTS is defined, anytime one of the output ports of the 8051 changes all ports will be printed out. If DEBUG is defined, a trace of all instructions executed by the simulator will be outputted to the output file specified by the user. If DEBUG is defined and DEBUG_PC is defined the PC for each instruction executed will be outputted to the output file. Finally, if DETAIL is defined, more information regarding each instruction will outputted to the output file.
NOTE: DEBUG_PC and DETAIL are not available in version 1.0.
To use the simulator, edit i8051.h and uncomment the PORTS, DEBUG, DEBUG_PC, and/or DETAIL macros to enable the respective output. Modify the macro PROGRAM_COMPLETION to the appropriate completion condition. If there is no program completion condition do not define PROGRAM_COMPLETION. Make the executable using the supplied Makefile. The program can be invoked by the following command
8051sim < hexfile > < outfile >
网站地址:http://www.cs.ucr.edu/~dalton/i8051/i8051sim/ |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|