vm-implementation

What are the primitive Forth operators? [closed]

一世执手 提交于 2019-11-29 20:37:57
I'm interested in implementing a Forth system, just so I can get some experience building a simple VM and runtime. When starting in Forth, one typically learns about the stack and its operators (DROP, DUP, SWAP, etc.) first, so it's natural to think of these as being among the primitive operators. But they're not. Each of them can be broken down into operators that directly manipulate memory and the stack pointers. Later one learns about store (!) and fetch (@) which can be used to implement DUP, SWAP, and so forth (ha!). So what are the primitive operators? Which ones must be implemented

Interpreters vs Compilers vs Virtual Machines

主宰稳场 提交于 2019-11-29 19:23:58
I have a question about Interpreters,Compilers and VM Now I know the Differences between Interpreters and Compilers but what is different about the VIRTUAL MACHINES from the previous 2? What are the Pros and Cons of a VM over Interpreters and Compilers? Thanks a lot A virtual machine isn't exactly an alternative to compilers or interpreters. I think you are thinking of a JIT compiler, which is how many VMs are implemented. A virtual machine itself is exactly what the name says - it's a machine (processor) that doesn't actually exist. For example, most processors don't have any intrinsic way of

What are the primitive Forth operators? [closed]

試著忘記壹切 提交于 2019-11-28 16:43:01
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 months ago . I'm interested in implementing a Forth system, just so I can get some experience building a simple VM and runtime. When starting in Forth, one typically learns about the stack and its operators (DROP, DUP, SWAP, etc.) first, so it's natural to think of these as being among the

Interpreters vs Compilers vs Virtual Machines

做~自己de王妃 提交于 2019-11-28 15:47:28
问题 I have a question about Interpreters,Compilers and VM Now I know the Differences between Interpreters and Compilers but what is different about the VIRTUAL MACHINES from the previous 2? What are the Pros and Cons of a VM over Interpreters and Compilers? Thanks a lot 回答1: A virtual machine isn't exactly an alternative to compilers or interpreters. I think you are thinking of a JIT compiler, which is how many VMs are implemented. A virtual machine itself is exactly what the name says - it's a

What is the minimum instruction set required for any Assembly language to be considered useful?

谁都会走 提交于 2019-11-28 05:01:01
I am studying Assembly programming in general, so I've decided to try and implement a "virtual microprocessor" in software, which has registers, flags and RAM to work with, implemented with variables and arrays. But since I want to simulate only the most basic behavior of any microprocessor , I want to create an assembly language that has only the essential instructions, only those instructions without which it couldn't be useful. I mean, there are assembly languages that can do multiplication and swapping register values, etc, but these operations are not basic because you can implement them

What is this asm style “x | 0” some javascript programmers are now using?

那年仲夏 提交于 2019-11-27 20:14:17
I've seen some performance critical javascript code, like the one on this project that makes extensive use of bitwise OR operations with 0. Ex: GameBoyAdvanceCPU.prototype.write8 = function (address, data) { address = address | 0; data = data | 0; this.memory.memoryWrite8(address | 0, data | 0); I know about the use case of flooring numbers with "|0", but that isn't the case here, as these are always int's. It looks a bit like asm.js, is this to tell the js engine that we are working with integers, allowing some optimizations? If so, which browsers will make those optimizations? Any pointers

Java's Virtual Machine and CLR

∥☆過路亽.° 提交于 2019-11-27 09:57:58
As a sort of follow up to the question called Differences between MSIL and Java bytecode? , what is the (major) differences or similarity in how the Java Virtual Machine works versus how the .NET Framework Common Language Runtime (CLR) works? Also, is the .NET framework CLR a "virtual machine" or does it not have the attributes of a virtual machine? benjismith There are a lot of similarities between both implementations (and in my opinion: yes, they're both "virtual machines"). For one thing, they're both stack-based VM's, with no notion of "registers" like we're used to seeing in a modern CPU

Is the CLR a virtual machine?

☆樱花仙子☆ 提交于 2019-11-27 06:16:14
I read a book which referred to the .net CLR as a virtual machine ? Can anyone justify this? What is the reason we need the concept of virtual machines on some development platforms? Isn't it possible to develop a native framework [one without virtual machine] that is fully object oriented and as powerful as .net? The book which refers to CLR as virtual machine is " Professional .Net Framework 2.0 ". There are a lot of misconceptions here. I suppose you could think of .Net as a virtual machine if you really wanted, but let's look at how the .Net Framework really handles your code. The typical

What is this asm style “x | 0” some javascript programmers are now using?

最后都变了- 提交于 2019-11-27 04:25:45
问题 I've seen some performance critical javascript code, like the one on this project that makes extensive use of bitwise OR operations with 0. Ex: GameBoyAdvanceCPU.prototype.write8 = function (address, data) { address = address | 0; data = data | 0; this.memory.memoryWrite8(address | 0, data | 0); I know about the use case of flooring numbers with "|0", but that isn't the case here, as these are always int's. It looks a bit like asm.js, is this to tell the js engine that we are working with

What is the minimum instruction set required for any Assembly language to be considered useful?

跟風遠走 提交于 2019-11-27 00:44:42
问题 I am studying Assembly programming in general, so I've decided to try and implement a "virtual microprocessor" in software, which has registers, flags and RAM to work with, implemented with variables and arrays. But since I want to simulate only the most basic behavior of any microprocessor , I want to create an assembly language that has only the essential instructions, only those instructions without which it couldn't be useful. I mean, there are assembly languages that can do