dalerkd / easyvm Goto Github PK
View Code? Open in Web Editor NEW一种虚拟机: 它是一个试水之作,它有可能会和编译器,SuperShell结合起来,当然它会变得设计优良.
一种虚拟机: 它是一个试水之作,它有可能会和编译器,SuperShell结合起来,当然它会变得设计优良.
对于涉及 立即数 的命令,存在数据宽度的问题.
从内存读和写一个数据的时候会遇到这个问题.
eg:
char* a ="1234";
指令宽度
124
[operator] [reg:dest,source][模式:dest,source] [寄存器宽度,数据宽度] data
这样设计有一个问题没有解决:寄存器宽度.如何控制寄存器间宽度?
ah,al我们只支持al,和ax,eax,rax?
1,2,4,8位
intel支持 mov [eps+4],0x1234
我们不支持....
立即数做目标地址[]
dest寄存器做目标地址[]
dest寄存器做目标
source寄存器做来源
立即数做来源
我认为这些组的顺序或许可以做更合理的调动.
这样就能将所有的同种操作合并在一起了.
将以下指令合并成了一条eg:
mov eax,1
mov [eax],0x12345678
mov [eax],[ebx]
mov 0x12345678,eax
除了以上的具体选择改善,其实可以做指令的合并来做改善,
如果将某些指令和另些指令合并压缩在一个数据的位置上.
但这样会导致这些指令难以让人手工编写.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.