Design and implementation of virtual machines, interpreters, automata, Turing machines. **DO NOT** use this tag for virtualized computers (VirtualBox, VMWare, ...), unless the question address the implementation of such tools.
Questions tagged [vm-implementation]
294 questions
0
votes
0 answers
VM that works with Java & android
I'm looking to embed some kind of scripting language so that I can use it to handle my map's scripts. I don't want to compile stuff during application's execution - only run the precompiled bytecode. I saw things like luaj, but I'm looking for…

Maciej Kozik
- 176
- 2
- 8
0
votes
1 answer
Static detection of unconditional jump targets in dalvik byte code
In x86 binaries we sometimes find statements like jmp %eax, where the jmp target eax is computed at runtime. This adds complexity in building static control flow graphs. My question is are there any similar instructions in dalvik byte code too? I…

P basak
- 4,874
- 11
- 40
- 63
0
votes
1 answer
Efficient Algorithm for Parsing OpCodes
Let's say I'm writing a virtual machine. I read in the program data into an array of bytes. Now I need to loop through those bytes (instructions are two bytes) and instantiate a little class representing each instruction and it's arguments.
What…

Josh Pearce
- 3,399
- 1
- 23
- 24
0
votes
2 answers
How to handle struct variables in byte code and stack-based VMs?
I am writing a compiler that compiles a language that has similar concepts to C to byte code which should then be interpreted by a corresponding stack-based VM. I am stuck at the moment when it comes how to compile structs, e.g.
struct my_struct_s…

Jonas
- 2,974
- 4
- 24
- 23
0
votes
1 answer
Data Segment in Compiler Construction
i am developing a compiler for my own defined language , i have generated 3 address code and now i am going to develop a virtual machine which can run that 3 address code. but for that i need Data Segment (where i can store all of my variables…

Haider Ali
- 800
- 2
- 9
- 22
0
votes
1 answer
Flow Control Instructions in a virtual machine
I've been implementing my own scripting language + virtual machine from scratch for a small experiment. A script reader parses the script and translates it to a stream of instructions that a runtime engine will execute.
At the beginning I didn't…

user390507
- 133
- 1
- 4
0
votes
1 answer
Variables and Pointers in an Isolated Environment like Virtual Machines
I'm wondering how a programming language like Java can handle Variables and/or Pointers in an isolated environment like Java Virtual Machine and its own Byte-Code.
Examples in Assembly or binary equivalents are highly appreciated.
user1960660
0
votes
1 answer
Controlling Virtualized CPU's Clock Speed?
I'm currently building a small virtual machine in c modelling an old 16-bit CPU, which runs at a super slow clock speed (a few 100 Khz). How would I throttle the virtual machine's processing speed of opcode, etc..? or would I even want to?

Daniel
- 1,692
- 2
- 13
- 19
0
votes
2 answers
Role of the JVM
Would the JVM (and probably also the CLI) be considered a virtual machine (the equivalent of the x86 in a "normal" program stack) or a virtual OS (the equivalent of Windows)?

Baruch
- 20,590
- 28
- 126
- 201
0
votes
1 answer
Virtual Machine Display Not Working
I am working on a VM and am stuck on the screen.
My code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
…

hgoel0974
- 1
- 2
0
votes
1 answer
Virtual machine to be used in a game
I am looking for a virtual machine I can embed inside a game.
The idea is that I create a game world and two avatars. Inside the avatars I embed a virtual machine that can interact with the avatar in the game world using an api, like:…

TAXfromDK
- 43
- 3
0
votes
3 answers
Python interpretation model in comparison to direct and virtual machine compilation
I have been compiling diagrams (pun intended) in hope of understanding the different implementations of common programming languages. I understand whether code is compiled or interpreted depends on the implementation of the code, and is not an…

jII
- 1,134
- 2
- 17
- 29
0
votes
2 answers
Can JIT compiler be created without VM
Can i create a JIT compiler that compiles code to machine code at runtime so i dont need a Virtual machine if i am creating a language?

pyros2097
- 11
- 1
0
votes
2 answers
Mico C virtual machine segmentation fault
My virtual machine below is segfaulting at my stack increment instruction which takes the stack offset from the bin pointer and increments it by one. If I use the value -1 this works correctly, but when i access -1 through the bp[1] offset it…

Andrew
- 11
- 1
-1
votes
1 answer
Simple bytecode translator
I'm trying to build a fast JIT using C/C++. It should translate mine bytecode to IA32. Yes, I know about libjit and similar, but I'm sure they're not simpler than this. I thought I've found a faster way to build the instruction, but I was wrong -…

blez
- 4,939
- 5
- 50
- 82